@font-face {
  font-family: Archive TC;
  src: url(./assets/title.woff2) format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper:#f8f7f1;
  --ink:#253a32;
  --muted:#58685d;
  --rule:#d8d9cd;
  --bronze:#876747;
  --gutter:clamp(18px,3vw,64px);
  font-family:
    "PingFang TC",
    "Noto Sans CJK TC",
    "Microsoft JhengHei",
    sans-serif;
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body {
  display: grid;
  grid-template-rows: clamp(60px, 6.7dvh, 80px) minmax(0, 1fr) clamp(59px, 6.4dvh, 74px);
  height: 100dvh;
  background: var(--paper);
}
button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: transparent;
  border: 0;
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
canvas:focus-visible {
  outline: 2px solid #986d42;
  outline-offset: -3px;
}
button:hover {
  color: #946840;
}
button:disabled {
  opacity: .55;
  cursor: progress;
}
button,
nav,
aside {
  touch-action: manipulation;
}
.symbols {
  width: 0;
  height: 0;
  position: absolute;
  overflow: hidden;
}
.icon,
nav svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.masthead,
.deck {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  background: var(--paper);
}
.masthead {
  border-bottom: 1px solid var(--rule);
}
.identity {
  display: flex;
  align-items: center;
  gap: 19px;
}
.mark {
  width: 34px;
  height: 39px;
  color: var(--bronze);
  margin-right: 1px;
}
.identity h1,
.gallery-header h2 {
  margin: 0;
  font:
    600 clamp(25px, 2.1vw, 38px)/1.2 "Archive TC",
    "Noto Serif CJK TC",
    "Songti TC",
    serif;
  letter-spacing: .13em;
}
.identity-rule {
  height: 23px;
  width: 1px;
  background: #c9cabb;
}
.product {
  font-size: 14px;
  letter-spacing: .14em;
  color: var(--muted);
  font-weight: 500;
}
.gallery-trigger {
  position: relative;
  padding: 4px 15px 4px 5px;
  min-height: 41px;
  gap: 10px;
  border: 1px solid #53675a;
  border-radius: 40px;
  background: #294439;
  color: #fffaf0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
}
.gallery-trigger:hover,.gallery-trigger[data-demo-focus] {
  color: #fffaf0;
  background: #365646;
  border-color: #b7a16e;
}
.gallery-trigger:focus-visible { outline: 2px solid #b68b49; outline-offset: 3px; }
.gallery-trigger img {
  width: 49px;
  height: 31px;
  border-radius: 25px;
  object-fit: cover;
  background: #c5c6b7;
}
.gallery-trigger .icon {
  width: 16px;
  height: 16px;
}
.stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #d9dfd9;
  isolation: isolate;
}
#model-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}
#model-canvas:active {
  cursor: grabbing;
}
.view-caption,
.floor-caption,
.sample {
  position: absolute;
  left: var(--gutter);
  pointer-events: none;
}
.view-caption {
  display: flex;
  align-items: center;
  gap: 9px;
  top: 24px;
  color: #21352e;
  letter-spacing: .13em;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  background: rgba(253, 251, 242, .91);
  border: 1px solid rgba(95, 88, 65, .22);
  border-radius: 30px;
}
.view-caption i {
  display: block;
  width: 24px;
  height: 2px;
  background: #927453;
}
.floor-caption {
  top: 63px;
  font:
    600 25px/1.3 "Archive TC",
    "Noto Serif CJK TC",
    serif;
  letter-spacing: .06em;
  color: #303d30;
  background: rgba(251, 249, 239, .94);
  border-left: 3px solid #b17e44;
  padding: 7px 12px;
}
.levels,
.tools {
  position: absolute;
  right: var(--gutter);
  background: rgba(249, 248, 241, .96);
  border: 1px solid rgba(72, 81, 62, .24);
  box-shadow: 0 3px 16px #2b3c2b10;
  border-radius: 4px;
}
.levels {
  top: 50%;
  transform: translateY(-50%);
  width: 63px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100% - 115px);
}
.floor-toggle {
  padding: 7px 4px;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 10px;
  letter-spacing: .1em;
  flex-shrink: 0;
}
.floor-toggle .icon {
  width: 18px;
  height: 18px;
}
.floor-list {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 4px 5px 5px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr;
}
.floor-list[hidden] {
  display: none;
}
.floor-list button {
  border-radius: 1px;
  min-height: clamp(28px, 3.16dvh, 36px);
  padding: 2px;
  font:
    500 14px/1.42 "Helvetica Neue",
    Arial,
    "Noto Sans CJK TC",
    sans-serif;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.floor-list button:hover,
.tools button:hover,
.operating button:hover {
  background: #e5e6db;
}
.floor-list button[aria-pressed=true] {
  background: var(--ink);
  color: #fff;
}
.sample {
  bottom: 22px;
  letter-spacing: .06em;
  font-size: 10px;
  font-weight: 500;
  background: #f8f7efdf;
  border: 1px solid #52635328;
  border-radius: 2px;
  padding: 4px 8px;
  color: #49594f;
}
.tools {
  display: flex;
  bottom: 18px;
  padding: 2px;
}
.tools button,
.operating button,
#gallery-close {
  width: 34px;
  height: 31px;
  border-radius: 2px;
}
.tools button + button {
  border-left: 1px solid var(--rule);
}
.tools .icon {
  width: 16px;
  height: 16px;
}
.deck {
  border-top: 1px solid var(--rule);
  gap: 14px;
}
.deck nav {
  display: flex;
  align-items: center;
  gap: 5px;
}
.deck nav button {
  padding: 9px clamp(13px, 1.3vw, 25px);
  min-height: 42px;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 3px;
  letter-spacing: .08em;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.deck nav button[aria-pressed=true] {
  color: #fffef6;
  background: var(--ink);
  border-color: var(--ink);
}
.deck nav button:hover:not([aria-pressed=true]) {
  background: #eeeee3;
}
.deck nav svg {
  width: 26px;
  height: 23px;
  stroke-width: 1.25;
}
.operating,
.hint {
  display: flex;
  align-items: center;
  gap: 10px;
}
.operating {
  gap: 16px;
  color: var(--muted);
}
.hint {
  font-size: 11px;
  letter-spacing: .07em;
}
.mouse-icon {
  width: 12px;
  height: 17px;
  border-radius: 7px;
  border: 1px solid;
  position: relative;
  display: inline-block;
}
.mouse-icon:before {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 2px;
  height: 5px;
  width: 1px;
  background: currentColor;
}
.operating button {
  border: 1px solid #c9cdbf;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}
.operating button .icon {
  width: 14px;
  height: 14px;
}
.mobile-hint {
  display: none;
}
.loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(
      160deg,
      #e6e9df,
      #d3d9cf 70%,
      #bec7b8);
  z-index: 3;
}
.loading[hidden],
#demo-caption[hidden],
[hidden] {
  display: none;
}
.loader-card {
  width: min(270px, 78vw);
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 12px;
  color: #354b3c;
  font-size: 13px;
  letter-spacing: .1em;
}
.loader-card b {
  font: 500 13px/1.4 Arial, sans-serif;
}
.loader-card progress {
  accent-color: var(--ink);
  width: 100%;
  height: 3px;
  grid-column: span 2;
  appearance: none;
  border: 0;
}
.loader-card progress::-webkit-progress-bar {
  background: #b4bfaf;
}
.loader-card progress::-webkit-progress-value {
  background: var(--ink);
}
.loader-card a {
  color: inherit;
}
.gallery-header {
  position: absolute;
  z-index: 1;
  inset: max(16px, env(safe-area-inset-top)) var(--gutter) auto;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.gallery-header h2 {
  font-size: 21px;
  padding: 7px 12px 8px;
  background: #1e302bd9;
  border-radius: 3px;
}
#gallery-close {
  width: 40px;
  height: 40px;
  border: 1px solid #788579;
  border-radius: 50%;
  color: white;
  background: #1e302bdb;
}
#gallery {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  inset: 0;
  border: 0;
  background: #1c2824;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
#gallery[open] {
  display: grid;
  place-items: center;
}
#gallery::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -36px;
  background: url(./gallery/g1-preview.webp) center/cover no-repeat;
  filter: blur(30px) brightness(.40) saturate(.65);
}
#gallery[data-photo="day"]::before {
  background-image: url(./gallery/g2.webp);
}
.gallery-header { display: grid; grid-template-columns: 1fr auto 1fr; }
.gallery-header h2 { justify-self: start; }
#gallery-close { justify-self: end; }
.photo-switch {
  display: flex;
  padding: 3px;
  border: 1px solid #e8dfcb66;
  border-radius: 24px;
  background: #20342edb;
}
.photo-switch button {
  min-width: 56px;
  min-height: 32px;
  padding: 4px 12px;
  border: 0;
  border-radius: 20px;
  color: #fffaf0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  letter-spacing: .08em;
}
.photo-switch button[aria-pressed="true"] { color: #23392f; background: #f4eddd; }
.photo-switch button:focus-visible { outline: 2px solid #c9ab73; outline-offset: 1px; }
#gallery-status {
  position: absolute;
  bottom: 1rem;
  z-index: 1;
  background: #20342ee6;
  padding: 8px 14px;
  border-radius: 3px;
}
#gallery::backdrop {
  background: #16211c;
}
#gallery > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  min-height: 0;
}
#demo-caption {
  margin: 0;
  border-radius: 3px;
  background: #e6eadf;
  color: #2b493a;
  font-weight: 500;
  font-size: clamp(13px, .92vw, 18px);
  letter-spacing: .07em;
  padding: 6px 12px;
  white-space: nowrap;
}
#demo-caption:not([hidden]) + .hint { display: none; }
@media (max-width: 760px) {
  :root {
    --gutter:16px;
  }
  body {
    grid-template-rows: 53px minmax(0, 1fr) calc(70px + env(safe-area-inset-bottom));
  }
  .identity {
    gap: 10px;
  }
  .mark {
    width: 24px;
    height: 30px;
    margin: 0;
  }
  .identity h1 {
    font-size: 24px;
    letter-spacing: .08em;
  }
  .identity-rule {
    height: 17px;
  }
  .product {
    font-size: 11px;
    letter-spacing: .06em;
  }
  .gallery-trigger {
    min-height: 32px;
    padding: 3px 9px 3px 4px;
    gap: 6px;
    letter-spacing: .04em;
    font-size: 11px;
  }
  .gallery-trigger img {
    width: 33px;
    height: 25px;
  }
  .gallery-trigger .icon {
    width: 13px;
    height: 13px;
  }
  .view-caption {
    top: 19px;
    font-size: 11px;
    gap: 7px;
  }
  .view-caption i {
    width: 17px;
  }
  .floor-caption {
    top: 52px;
    font-size: 20px;
  }
  .levels {
    top: 12px;
    transform: none;
    width: 47px;
    max-height: calc(100% - 105px);
  }
  .floor-toggle {
    padding: 7px 2px;
    gap: 2px;
  }
  .floor-list {
    padding: 3px;
  }
  .floor-list button {
    min-height: 35px;
    font-size: 14px;
  }
  .tools {
    bottom: 36px;
  }
  .tools button {
    width: 32px;
    height: 32px;
  }
  .sample {
    font-size: 9px;
    bottom: 8px;
    padding: 3px 5px;
    letter-spacing: 0;
  }
  .deck {
    padding: 2px 10px calc(2px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 2px;
    justify-content: center;
  }
  .deck nav {
    width: 100%;
    gap: 3px;
  }
  .deck nav button {
    flex: 1;
    min-width: 0;
    padding: 7px 1px;
    min-height: 36px;
    gap: 6px;
    letter-spacing: .02em;
    font-size: 12px;
  }
  .deck nav svg {
    width: 22px;
    height: 19px;
  }
  .operating {
    gap: 8px;
  }
  .hint {
    font-size: 10px;
    letter-spacing: .05em;
  }
  .desktop-hint,
  .mouse-icon {
    display: none;
  }
  .mobile-hint {
    display: inline;
  }
  .operating button {
    width: 25px;
    height: 25px;
    border: 0;
  }
  .operating button .icon {
    width: 12px;
    height: 12px;
  }
  #demo-caption {
    font-size: 12px;
    padding: 2px 8px;
  }
  .operating:has(#demo-caption:not([hidden])) { align-self: flex-end; }
}
@media (max-width: 360px) {
  .identity {
    gap: 7px;
  }
  .gallery-trigger img {
    display: none;
  }
  .deck nav svg {
    width: 18px;
  }
  .product {
    font-size: 10px;
  }
}
@media (max-height: 610px) and (min-width: 761px) {
  body {
    grid-template-rows: 45px minmax(0, 1fr) 45px;
  }
  .identity h1 {
    font-size: 24px;
  }
  .mark {
    height: 32px;
  }
  .levels {
    top: 10px;
    transform: none;
    max-height: calc(100% - 65px);
  }
  .floor-list button {
    min-height: 27px;
  }
  .floor-toggle {
    flex-direction: row;
  }
  .sample {
    bottom: 10px;
  }
  .tools {
    bottom: 8px;
  }
}
.loading {
  background: #e5e9e9 url(./gallery/g1-preview.webp) center/auto 100% no-repeat;
  align-items: end;
  padding: 0 12px clamp(35px, 8vh, 95px);
}
.loader-card {
  width: min(310px, 82vw);
  padding: 17px 20px;
  background: #f8f7f1f5;
  border: 1px solid #c5cabb;
  border-radius: 3px;
  box-shadow: 0 4px 20px #2c403019;
}
.gallery-trigger img {
  object-position: center 42%;
}
.floor-list button[data-demo-tap] {
  position: relative;
}
.floor-list button[data-demo-tap]::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 13px;
  height: 13px;
  border: 2px solid #ffe3a7;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #76552ba8, inset 0 0 0 2px #76552b80;
  transform: translateY(-50%) scale(var(--tap-scale));
  opacity: var(--tap-opacity);
  pointer-events: none;
}
.gallery-trigger[data-demo-focus] {
  box-shadow: 0 0 0 3px #be9e6380;
}
.gallery-trigger[data-demo-tap]::after {
  content: "";
  position: absolute;
  right: 7px;
  top: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid #f8d68a;
  border-radius: 50%;
  transform: translateY(-50%) scale(var(--tap-scale));
  opacity: var(--tap-opacity);
}
