/* FIIIZ · Warm Green / Offline interaction prototype. All design tokens are here. */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
  transition: background .4s,color .4s;
}

body[data-theme=forest] {
  background: var(--forest);
  color: var(--paper);
}

body[data-theme=clay] {
  background: var(--clay);
  color: var(--deep);
}

button,input,textarea {
  font: inherit;
}

button {
  cursor: pointer;
  color: inherit;
  border: 0;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: default;
}

button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,[tabindex]:focus-visible {
  outline: 3px solid #aa603e;
  outline-offset: 5px;
}

body[data-theme=forest] :focus-visible {
  outline-color: var(--butter);
}

button svg {
  pointer-events: none;
  flex-shrink: 0;
}

img {
  max-width: 100%;
  display: block;
}

svg {
  display: block;
}

button,img,svg {
  -webkit-user-select: none;
  user-select: none;
}

button:disabled {
  opacity: .43;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.serif {
  font-family: var(--editorial);
  font-weight: 400;
}

a {
  color: inherit;
}

.text-link {
  padding: 7px 0;
  background: none;
  box-shadow: 0 1px currentColor;
  font-size: 12px;
  line-height: 1.6;
  transition: opacity .2s;
}

.text-link:hover {
  opacity: .65;
}

body:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 55% 38%,#fffff84f,transparent 74%);
  z-index: -1;
}

body[data-theme=forest]:before {
  background: radial-gradient(ellipse at 52% 44%,#60826652 0%,transparent 68%),linear-gradient(140deg,#204338,transparent 55%,#143b3066);
}

.site-header {
  height: 88px;
  padding: 0 clamp(24px,4.2vw,66px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 15;
  gap: 22px;
}

.brand {
  font: 500 23px/1 Arial,sans-serif;
  letter-spacing: 5px;
  padding: 10px 0;
  background: none;
}

.header-end {
  display: flex;
  align-items: center;
  gap: 19px;
}

.header-caption {
  font-size: 11px;
  letter-spacing: 1.2px;
  opacity: .75;
}

.header-mid {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 11px;
}

.step {
  height: 32px;
  width: 32px;
  border-radius: 10px;
  border: 1px solid #294d4018;
  display: grid;
  place-items: center;
  font: 10px Arial,sans-serif;
  color: #7b8775;
  position: relative;
  transition: background .3s,color .3s,border .3s;
}

.step img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
}

.step.current {
  border-color: #78917b;
  color: var(--forest);
  background: #fff8;
}

.step-line {
  width: 24px;
  height: 1px;
  background: #294d4023;
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  background: linear-gradient(145deg,#fffbf3,#eae4d8);
  box-shadow: 2px 4px 9px #5a574411,-2px -2px 7px #fff9,inset 0 1px #fff;
  border: 1px solid #fff5;
  transition: transform .18s var(--spring),box-shadow .18s,background .18s;
}

.icon-btn:hover {
  transform: translateY(-1px);
}

.icon-btn:active {
  transform: translateY(2px);
  box-shadow: inset 2px 3px 6px #807d6826,inset -1px -1px 3px #fff8;
}

.icon-btn .icon {
  width: 17px;
  height: 17px;
}

.icon-btn.dark-ui {
  background: linear-gradient(145deg,#ffffff0f,#183c2e33);
  border: 1px solid #ffffff20;
  box-shadow: inset 0 1px #ffffff10,0 4px 9px #0e251618;
}

.icon-btn.dark-ui:hover {
  background: #ffffff16;
}

.home-return {
  font-size: 11px;
  letter-spacing: .5px;
  background: none;
  padding: 8px;
}

.primary {
  min-height: 56px;
  padding: 0 26px;
  border-radius: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 38px;
  background: linear-gradient(158deg,#f8e6a9 1%,#f0d98a 65%,#e9cd7d);
  color: #294536;
  border: 1px solid #ffeec080;
  box-shadow: inset 0 1px 1px #fff5cf,0 3px 0 #c5a75b70,0 9px 20px #20352322;
  font-weight: 500;
  font-size: 14px;
  transition: transform .17s var(--spring),box-shadow .17s var(--ease),filter .17s;
  white-space: nowrap;
  position: relative;
}

.primary:hover:not(:disabled) {
  filter: brightness(1.025);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 1px #fff5cf,0 4px 0 #c5a75b65,0 12px 24px #20352327;
}

.primary:active:not(:disabled),.primary.pressed {
  transform: translateY(3px);
  box-shadow: inset 0 2px 3px #af934c35,0 1px 0 #b3995655,0 3px 7px #2035231a;
  filter: brightness(.98);
}

.primary.green {
  background: linear-gradient(150deg,#466959,#294d40);
  color: var(--cream);
  border-color: #65837375;
  box-shadow: inset 0 1px #86a18b66,0 3px 0 #173d2c90,0 10px 20px #17372822;
}

.primary.green:active {
  box-shadow: inset 0 2px 4px #102b2366,0 1px 0 #18392b,0 3px 8px #17372822;
}

.primary .icon {
  width: 20px;
  height: 20px;
}

.glass {
  background: linear-gradient(130deg,#ffffff23,#ffffff0b);
  border: 1px solid #ffffff42;
  box-shadow: inset 0 1px #ffffff30,0 15px 35px #102f2424;
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  border-radius: 26px;
}

.view {
  min-height: calc(100svh - 88px);
  position: relative;
}

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 1px;
  opacity: .65;
}

.micro {
  font: 10px/1.7 Arial,var(--ui);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
}

/* WELCOME — the model, not a commerce hero */

.home-content {
  min-height: calc(100svh - 88px);
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
  padding: 11px 24px 24px;
  position: relative;
}

.home-title {
  margin: 9px 0 10px;
  font-size: clamp(42px,4.2vw,65px);
  letter-spacing: 1px;
  line-height: 1.35;
}

.home-subtitle {
  margin: 0;
  color: #d2ddc9;
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: .5px;
}

.model-stage {
  width: min(680px,82vw);
  height: clamp(300px,43svh,470px);
  position: relative;
  perspective: 1100px;
  margin: 2px auto 6px;
  flex-shrink: 0;
  touch-action: pan-y;
  isolation: isolate;
}

.model-stage:before {
  content: "";
  position: absolute;
  left: 13%;
  right: 11%;
  height: 43px;
  bottom: 6%;
  background: #092c22;
  filter: blur(21px);
  opacity: .44;
  border-radius: 50%;
  transform: rotate(-3deg);
  z-index: -1;
}

.model-frame {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  will-change: transform;
}

.model-image {
  height: 100%;
  width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 13px 12px #102d2328);
}

.home-tray {
  padding: 12px 13px 12px 26px;
  display: flex;
  gap: 32px;
  align-items: center;
  text-align: left;
  position: relative;
}

.home-tray-copy {
  font-size: 11px;
  color: #cbd8c6;
  line-height: 1.8;
}

.home-tray-copy strong {
  display: block;
  color: var(--cream);
  font-size: 13px;
  font-weight: 400;
}

.home-tray .primary {
  min-width: 181px;
}

.home-fine {
  margin: 22px 0 0;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10px;
  color: #b7ccb8;
  letter-spacing: .5px;
}

.home-fine .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.home-bottom {
  position: absolute;
  bottom: 26px;
  left: clamp(24px,4.2vw,66px);
  right: clamp(24px,4.2vw,66px);
  pointer-events: none;
}

.home-bottom span {
  max-width: 200px;
}

.home-bottom button {
  pointer-events: auto;
}

.home-enter .model-frame {
  animation: welcome-model .9s var(--ease) both;
}

.home-enter .home-title,.home-enter .home-subtitle {
  animation: welcome-copy .65s var(--ease) both;
}

@keyframes welcome-model {
  from {
    opacity: .6;
    transform: translateY(10px) scale(.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes welcome-copy {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.home-exit .model-stage {
  transition: transform .55s var(--ease),opacity .45s;
  transform: scale(1.43) translateY(-2%);
  opacity: 0;
}

.home-exit .home-title,.home-exit .home-subtitle,.home-exit .home-tray,.home-exit .home-fine {
  transition: opacity .24s;
  opacity: 0;
}

/* QUESTION — equal treatment, with deliberate depth only outside the artwork */

.question-content {
  width: min(840px,calc(100% - 64px));
  margin: 18px auto 0;
  padding: 0 0 148px;
  text-align: center;
}

.question-content h1 {
  font-size: clamp(26px,2.5vw,35px);
  font-weight: 500;
  letter-spacing: .1px;
  margin: 12px 0 9px;
  line-height: 1.45;
}

.question-sub {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0 0 26px;
}

.art-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 19px;
  width: 100%;
  margin: 0 auto;
}

.art-card {
  position: relative;
  border-radius: 19px;
  background: #fffaf2;
  padding: 7px 7px 0;
  box-shadow: 0 4px 14px #50534209,inset 0 1px #fff;
  border: 1px solid #ffffffe0;
  transition: box-shadow .2s,transform .16s var(--spring);
  min-width: 0;
  text-align: left;
}

.art-label {
  display: block;
  cursor: pointer;
  border-radius: 13px;
  position: relative;
}

.art-label input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

.art-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  display: block;
  border-radius: 12px;
}

.art-card:has(input:focus-visible) {
  outline: 3px solid #ab6342;
  outline-offset: 4px;
}

.art-card:has(input:active) {
  transform: translateY(2px);
  box-shadow: 0 1px 3px #233e3314;
}

.art-card.selected {
  box-shadow: 0 0 0 1.5px #42664f,0 7px 18px #294d4011;
}

.option-bottom {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 9px;
  font: 10px/1 Arial,var(--ui);
  letter-spacing: 1.3px;
  color: #78806f;
}

.zoom-btn {
  width: 44px;
  height: 40px;
  display: grid;
  place-items: center;
  background: none;
  border-radius: 9px;
  color: #697b65;
}

.zoom-btn:hover {
  background: #294d4007;
}

.zoom-btn .icon {
  width: 14px;
  height: 14px;
}

.selected-tick {
  position: absolute;
  right: -5px;
  top: -8px;
  width: 27px;
  height: 27px;
  background: var(--butter);
  border: 2px solid var(--paper);
  border-radius: 50%;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(.8);
  transition: transform .2s var(--spring),opacity .12s;
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 2px 3px #294d4014;
}

.selected-tick .icon {
  width: 15px;
  height: 15px;
  stroke-width: 1.9;
}

.selected .selected-tick {
  opacity: 1;
  transform: scale(1);
}

.operation-bar {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: max(25px,env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(850px,calc(100% - 54px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg,#e5eadfcc,#d6e0cf99);
  border-color: #ffffffb5;
  box-shadow: inset 0 1px #ffffffa0,0 14px 31px #233e3317;
}

.operation-bar .primary {
  min-width: 215px;
}

.operation-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.operation-status {
  font-size: 11px;
  color: #60715b;
  line-height: 1.6;
}

.operation-status b {
  font-weight: 500;
  color: var(--forest);
}

.fly-card {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 12px 30px #18392c22;
  transform-origin: 0 0;
}

.material-content {
  max-width: 820px;
}

.material-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 20px;
}

.material-card {
  padding: 8px 8px 0;
  border-radius: 22px;
  min-width: 0;
  background: #fcf8f0;
  position: relative;
  border: 1px solid #fff;
  box-shadow: 0 4px 18px #565a4509;
}

.material-card img {
  border-radius: 15px;
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.material-card .art-label {
  border-radius: 15px;
}

.material-copy {
  height: 55px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.material-copy strong {
  font-size: 13px;
  font-weight: 500;
}

.material-copy small {
  font-size: 10px;
  color: var(--muted);
}

.material-card.selected {
  box-shadow: 0 0 0 1.5px #42664f,0 7px 18px #294d4011;
}

.material-card:has(input:focus-visible) {
  outline: 3px solid #ab6342;
  outline-offset: 4px;
}

/* CHAPTER — a single color change, with the actual selected cards */

.chapter-content {
  max-width: 1060px;
  margin: auto;
  min-height: calc(100svh - 88px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
  padding: 10px 35px 80px;
}

.chapter-content h1 {
  font-size: clamp(36px,4.5vw,62px);
  line-height: 1.4;
  letter-spacing: .5px;
  margin: 23px 0 23px;
}

.chapter-content p {
  font-size: 13px;
  line-height: 1.95;
  max-width: 345px;
  margin-bottom: 31px;
  color: #5d5741;
}

.chapter-content .eyebrow {
  color: #735f4c;
}

.card-stack {
  height: 410px;
  position: relative;
  perspective: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.memory-card {
  position: absolute;
  width: 250px;
  height: 317px;
  border-radius: 19px;
  background: var(--cream);
  padding: 11px 11px 0;
  box-shadow: 0 14px 27px #673c2525;
  border: 1px solid #fff9;
  transform-origin: 50% 90%;
  transition: transform .5s var(--spring);
  backface-visibility: hidden;
}

.memory-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 11px;
}

.memory-card figcaption {
  font-size: 10px;
  color: #78816f;
  padding: 12px 7px;
  letter-spacing: 1px;
}

.memory-card:nth-child(1) {
  transform: rotate(13deg) translate(36px,13px);
  background: #e0e1cb;
}

.memory-card:nth-child(2) {
  transform: rotate(-5deg) translate(-13px,-5px);
}

.card-stack:hover .memory-card:nth-child(1) {
  transform: rotate(19deg) translate(52px,9px);
}

.card-stack:hover .memory-card:nth-child(2) {
  transform: rotate(-10deg) translate(-22px,-8px);
}

.chapter-enter .memory-card:nth-child(1) {
  animation: stack-back .65s var(--ease) both;
}

.chapter-enter .memory-card:nth-child(2) {
  animation: stack-front .65s var(--ease) both;
}

@keyframes stack-back {
  from {
    transform: rotate(0) translate(0,35px);
    opacity: .2;
  }
  to {
    transform: rotate(13deg) translate(36px,13px);
    opacity: 1;
  }
}

@keyframes stack-front {
  from {
    transform: rotate(0) translate(0,35px);
    opacity: .2;
  }
  to {
    transform: rotate(-5deg) translate(-13px,-5px);
    opacity: 1;
  }
}

/* ROOM — a real draggable plan, not a still image claiming to be 3D */

.space-content {
  width: min(1060px,calc(100% - 64px));
  margin: 12px auto 0;
  text-align: center;
  padding-bottom: 152px;
}

.space-content h1 {
  font-size: 31px;
  font-weight: 500;
  line-height: 1.45;
  margin: 12px 0 8px;
}

.space-content .question-sub {
  margin-bottom: 12px;
}

.space-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #e5e3d8;
  padding: 4px;
  border-radius: 13px;
  box-shadow: inset 1px 2px 5px #70726012;
  margin: 5px auto 10px;
}

.space-tabs button {
  height: 36px;
  padding: 0 17px;
  border-radius: 10px;
  background: none;
  font-size: 11px;
  color: #77806d;
}

.space-tabs button[aria-pressed=true] {
  background: #fcf8ef;
  color: var(--ink);
  box-shadow: 0 2px 5px #47492e13,inset 0 1px #fff;
}

.plan-wrap {
  position: relative;
  max-width: 900px;
  margin: auto;
  border-radius: 28px;
  background: linear-gradient(160deg,#f0ede2,#e6e4d8);
  border: 1px solid #fff8;
  box-shadow: inset 0 1px #fff8;
  overflow: hidden;
}

.plan-wrap svg {
  width: 100%;
  height: auto;
  display: block;
  touch-action: none;
  max-height: 445px;
}

.plan-badge {
  position: absolute;
  left: 21px;
  top: 17px;
  z-index: 2;
  font-size: 10px;
  letter-spacing: .7px;
  color: #68745e;
  pointer-events: none;
}

.plan-badge .live-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #57775a;
  margin-right: 6px;
  vertical-align: middle;
}

.room-photo {
  position: relative;
  max-width: 900px;
  margin: auto;
  background: #e7e0d2;
  border-radius: 27px;
  overflow: hidden;
  height: 445px;
}

.room-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-note {
  position: absolute;
  bottom: 18px;
  left: 22px;
  right: 22px;
  padding: 10px 15px;
  font-size: 11px;
  background: #f5f0e7d9;
  backdrop-filter: blur(15px);
  border-radius: 12px;
  color: #58674e;
}

.room-control-panel {
  margin: 16px auto 0;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.room-control-panel .icon-btn {
  width: 44px;
  height: 44px;
}

.control-divider {
  width: 1px;
  height: 23px;
  background: #294d4025;
  margin: 0 3px;
}

.angle-label {
  min-width: 42px;
  text-align: center;
  font: 12px Arial,sans-serif;
  font-variant-numeric: tabular-nums;
  color: #5f6e58;
}

.room-help {
  font-size: 10px;
  color: #727d67;
  margin: 15px auto 0;
  line-height: 1.8;
}

.room-help kbd {
  font: 10px Arial,sans-serif;
  border: 1px solid #c7cebf;
  border-radius: 3px;
  padding: 1px 3px;
  background: #fbf7ee;
}

.room-status {
  min-height: 21px;
  margin-top: 8px;
  font-size: 11px;
  color: #5e7057;
}

#chair {
  cursor: grab;
  outline: none;
  touch-action: none;
}

.chair-body {
  transition: transform .14s var(--ease);
}

#chair.dragging {
  cursor: grabbing;
}

#chair.dragging .chair-body {
  transform: translateY(-4px);
}

#chair .chair-halo {
  opacity: .35;
  transition: opacity .15s;
}

#chair:hover .chair-halo,#chair:focus .chair-halo,#chair.dragging .chair-halo {
  opacity: 1;
}

#chair:focus-visible .chair-halo {
  stroke: #a96742;
  stroke-width: 2.5;
}

.chair-direction {
  opacity: .65;
}

.plan-wrap.invalid .chair-halo {
  stroke: #a95d43;
  fill: #df9a7f;
}

/* RESULT — record first, then clearly marked example recommendations */

.result-content {
  width: min(1110px,calc(100% - 70px));
  margin: 38px auto 0;
  padding-bottom: 80px;
}

.result-top {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 75px;
  align-items: start;
}

.result-title {
  font-size: clamp(32px,3.2vw,48px);
  line-height: 1.5;
  margin: 20px 0 16px;
  letter-spacing: .2px;
}

.result-lead {
  font-size: 13px;
  color: #75806b;
  line-height: 1.95;
  margin: 0;
  max-width: 440px;
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 23px 0 27px;
}

.result-tags span {
  font-size: 11px;
  line-height: 1.5;
  padding: 7px 12px;
  background: #e6e6d8;
  border-radius: 10px;
}

.result-tags span:first-child {
  background: #ebdaa7;
}

.evidence {
  padding-top: 23px;
  border-top: 1px solid #294d4020;
}

.section-small {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2px;
  margin: 0 0 14px;
}

.evidence-row {
  display: flex;
  gap: 13px;
  align-items: center;
  margin: 12px 0;
}

.evidence-row img {
  width: 48px;
  height: 38px;
  object-fit: cover;
  border-radius: 7px;
}

.evidence-row>div {
  flex: 1;
  min-width: 0;
}

.evidence-row b {
  font-size: 11px;
  font-weight: 500;
  display: block;
}

.evidence-row small {
  font-size: 10px;
  color: #798471;
}

.evidence-row button {
  font-size: 10px;
  background: none;
  padding: 9px 0;
  white-space: nowrap;
  color: #657b5c;
}

.evidence-glyph {
  width: 48px;
  height: 38px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #e8e1d3;
}

.evidence-glyph .icon {
  width: 20px;
  height: 20px;
}

.expectation {
  margin-top: 17px;
  font-size: 12px;
  line-height: 1.9;
  color: #697661;
}

.expectation>span {
  display: block;
  margin-bottom: 5px;
  color: #88907f;
  font-size: 10px;
}

.result-note {
  font-size: 10px;
  line-height: 1.9;
  color: #838b79;
  margin: 21px 0 0;
}

.result-image {
  height: 225px;
  border-radius: 23px;
  position: relative;
  overflow: hidden;
  background: #e7e0d2;
}

.result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 70%;
}

.image-caption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-size: 10px;
  padding: 7px 10px;
  background: #f5f0e7d6;
  backdrop-filter: blur(14px);
  border-radius: 9px;
}

.result-direction {
  font-size: 23px;
  font-weight: 500;
  line-height: 1.6;
  margin: 22px 0 6px;
}

.result-direction-caption {
  font-size: 10px;
  letter-spacing: .5px;
  color: #819076;
  margin: 0 0 17px;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}

.feature {
  border-top: 1px solid #294d4023;
  padding: 14px 0;
}

.feature small {
  display: block;
  font-size: 10px;
  color: #849078;
  margin-bottom: 6px;
}

.feature strong {
  font-size: 12px;
  font-weight: 500;
  display: block;
  line-height: 1.8;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 26px 0 0;
}

.result-actions .primary {
  min-height: 51px;
  font-size: 12px;
  gap: 21px;
  padding: 0 21px;
}

.result-actions .text-link {
  font-size: 11px;
}

.result-bottom {
  margin-top: 41px;
  border-top: 1px solid #294d4020;
  padding-top: 22px;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #7a8771;
}

.result-bottom .text-link {
  font-size: 11px;
}

.feedback-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback-button {
  font-size: 10px;
  background: transparent;
  border: 1px solid #c9d1c0;
  border-radius: 10px;
  padding: 8px 12px;
}

.feedback-button[aria-pressed=true] {
  background: #e8d9a7;
  border-color: #c8b56e;
}

.result-wip {
  max-width: 720px;
  text-align: center;
  margin: 12vh auto;
  padding: 35px;
}

.result-wip h1 {
  font-size: 36px;
}

.result-wip p {
  color: var(--muted);
  margin-bottom: 25px;
}

/* Native dialogs, readable at actual phone sizes */

dialog {
  border: 1px solid #fff9;
  background: var(--cream);
  color: var(--ink);
  border-radius: 26px;
  padding: 27px;
  box-shadow: 0 25px 90px #09261c40;
  width: min(540px,calc(100vw - 36px));
  max-height: calc(100svh - 54px);
  overflow: auto;
}

dialog::backdrop {
  background: #16362988;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.dialog-top {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.dialog-top h2 {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 500;
  margin: 0;
}

.dialog-copy {
  font-size: 12px;
  line-height: 1.95;
  color: #75816b;
}

.dialog-copy strong {
  font-weight: 500;
  color: var(--ink);
}

.dialog-note {
  font-size: 10px;
  line-height: 1.9;
  color: #85907b;
  margin: 18px 0 0;
}

.menu-list {
  display: grid;
  gap: 5px;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding: 13px 5px;
  background: transparent;
  border-bottom: 1px solid #294d4014;
  text-align: left;
  font-size: 13px;
}

.menu-item span {
  color: #91a082;
  font: 10px Arial,sans-serif;
}

.menu-item:hover {
  background: #294d4005;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  padding: 17px 0;
  border-bottom: 1px solid #294d4017;
}

.toggle {
  width: 42px;
  height: 25px;
  border-radius: 20px;
  background: #d8dccb;
  padding: 3px;
  display: flex;
  align-items: center;
  transition: background .2s;
}

.toggle:before {
  content: "";
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fffaf1;
  box-shadow: 0 2px 3px #30473022;
  transition: transform .22s var(--spring);
}

.toggle[aria-pressed=true] {
  background: #547658;
}

.toggle[aria-pressed=true]:before {
  transform: translateX(17px);
}

.palette {
  display: flex;
  gap: 6px;
  margin: 20px 0;
}

.palette i {
  width: 29px;
  height: 29px;
  border-radius: 9px;
  border: 1px solid #294d4011;
}

.dialog-actions {
  display: flex;
  gap: 15px;
  margin-top: 23px;
  align-items: center;
}

.dialog-actions .primary {
  flex: 1;
  font-size: 12px;
  min-height: 48px;
  gap: 18px;
}

.secondary {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  background: #e7e7da;
  font-size: 12px;
}

.zoom-dialog {
  width: min(690px,calc(100vw - 34px));
}

.zoom-dialog>img {
  width: 100%;
  height: min(50svh,450px);
  object-fit: contain;
  background: #f0ece1;
  border-radius: 15px;
}

.zoom-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.zoom-controls>.primary {
  font-size: 12px;
  min-height: 48px;
  gap: 18px;
}

.zoom-nav {
  display: flex;
  gap: 10px;
}

.zoom-counter {
  font: 11px Arial,sans-serif;
  color: #849178;
}

.expect-input {
  width: 100%;
  min-height: 145px;
  resize: vertical;
  border: 1px solid #cdd4c3;
  border-radius: 15px;
  padding: 15px;
  background: #f5f1e8;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.9;
  outline-offset: 3px;
}

.expect-input:focus {
  border-color: #759074;
}

.char-count {
  font-size: 10px;
  text-align: right;
  color: #89947f;
  margin-top: 5px;
}

.toast {
  position: fixed;
  z-index: 250;
  left: 50%;
  bottom: 121px;
  transform: translate(-50%,10px);
  background: #294d40ed;
  border: 1px solid #66836b66;
  color: #f5f0e7;
  border-radius: 15px;
  padding: 12px 19px;
  font-size: 12px;
  box-shadow: 0 10px 25px #102c2220;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s,transform .2s;
  max-width: calc(100vw - 34px);
  text-align: center;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%,0);
}

.scene-scrim {
  position: fixed;
  inset: 0;
  background: var(--paper);
  opacity: 0;
  pointer-events: none;
  z-index: 12;
}

.sr-status {
  clip: rect(0,0,0,0);
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.no-script {
  margin: 10vh auto;
  max-width: 600px;
  padding: 30px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 20px;
}

@supports not (backdrop-filter:blur(1px)) {
  .glass {
    background: #486b59;
  }
  .operation-bar {
    background: #e1e7d8;
  }
  .photo-note,.image-caption {
    background: #f5f0e7;
  }
}

/* Tablets and short desktop screens */

@media (min-width:761px) and (max-height:800px) {
  .site-header {
    height: 74px;
  }
  .view,.home-content,.chapter-content {
    min-height: calc(100svh - 74px);
  }
  .home-title {
    font-size: 46px;
    margin-top: 4px;
  }
  .model-stage {
    height: 320px;
  }
  .home-fine {
    margin-top: 16px;
  }
  .home-tray {
    padding: 10px 11px 10px 24px;
  }
  .home-tray .primary {
    min-height: 51px;
  }
  .question-content {
    margin-top: 10px;
    max-width: 725px;
    padding-bottom: 125px;
  }
  .question-content h1 {
    font-size: 29px;
    margin-top: 8px;
  }
  .question-sub {
    margin-bottom: 19px;
  }
  .art-grid {
    gap: 15px;
  }
  .art-card {
    padding: 6px 6px 0;
  }
  .option-bottom {
    height: 35px;
  }
  .material-card img {
    height: 155px;
  }
  .material-copy {
    height: 47px;
  }
  .space-content {
    margin-top: 4px;
  }
  .space-content h1 {
    font-size: 28px;
  }
  .plan-wrap svg {
    max-height: 355px;
  }
  .room-photo {
    height: 355px;
  }
  .room-control-panel {
    margin-top: 10px;
  }
  .room-help {
    margin-top: 10px;
  }
  .operation-bar {
    bottom: 21px;
    padding: 10px 12px;
  }
  .operation-bar .primary {
    min-height: 51px;
  }
  .result-content {
    margin-top: 24px;
  }
  .result-image {
    height: 207px;
  }
}

@media (max-width:1000px) and (min-width:761px) {
  .home-bottom {
    display: none;
  }
  .result-top {
    gap: 40px;
  }
  .result-content {
    width: calc(100% - 64px);
  }
  .result-title {
    font-size: 34px;
  }
  .chapter-content {
    gap: 30px;
  }
  .memory-card {
    width: 220px;
    height: 285px;
  }
  .memory-card img {
    height: 229px;
  }
}

/* PHONE — independent composition, not a shrunken desktop */

@media (max-width:760px) {
  .site-header {
    height: 74px;
    padding: 0 23px;
    gap: 12px;
  }
  .brand {
    font-size: 20px;
    letter-spacing: 3.5px;
  }
  .header-end {
    gap: 10px;
  }
  .header-caption {
    font-size: 9px;
    letter-spacing: .1px;
    display: none;
  }
  .header-mid {
    gap: 7px;
  }
  .step {
    width: 27px;
    height: 27px;
    border-radius: 8px;
    font-size: 9px;
  }
  .step-line {
    width: 10px;
  }
  .step img {
    border-radius: 7px;
  }
  .header-end .icon-btn {
    width: 41px;
    height: 41px;
  }
  .view {
    min-height: calc(100svh - 74px);
  }
  .home-content {
    min-height: calc(100svh - 74px);
    padding: 28px 22px 30px;
    text-align: center;
  }
  .home-title {
    font-size: 41px;
    line-height: 1.4;
    margin: 15px 0 13px;
    letter-spacing: 1px;
  }
  .home-subtitle {
    font-size: 11px;
    line-height: 1.9;
    letter-spacing: .3px;
  }
  .model-stage {
    width: calc(100% + 22px);
    height: clamp(265px,38svh,340px);
    margin: 16px -11px 8px;
  }
  .home-tray {
    width: 100%;
    padding: 11px;
    border-radius: 25px;
    gap: 0;
  }
  .home-tray-copy {
    display: none;
  }
  .home-tray .primary {
    width: 100%;
    justify-content: space-between;
    min-height: 55px;
    padding: 0 23px;
    border-radius: 18px;
    font-size: 13px;
  }
  .home-fine {
    font-size: 9px;
    gap: 11px;
    margin-top: 23px;
  }
  .home-bottom {
    display: none;
  }
  .question-content {
    width: calc(100% - 44px);
    margin: 22px auto 0;
    padding-bottom: 150px;
    text-align: left;
  }
  .question-content h1 {
    font-size: 26px;
    line-height: 1.45;
    margin: 12px 0 10px;
    letter-spacing: 0;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 1.3px;
  }
  .question-sub {
    font-size: 11px;
    margin-bottom: 23px;
    line-height: 1.9;
  }
  .art-grid {
    grid-template-columns: 1fr 1fr;
    gap: 13px;
  }
  .art-card {
    padding: 6px 6px 0;
    border-radius: 16px;
  }
  .art-image {
    border-radius: 10px;
  }
  .option-bottom {
    height: 37px;
    padding-left: 6px;
    font-size: 9px;
  }
  .zoom-btn {
    height: 37px;
    width: 40px;
  }
  .selected-tick {
    width: 25px;
    height: 25px;
    right: -3px;
    top: -7px;
  }
  .operation-bar {
    bottom: max(20px,env(safe-area-inset-bottom));
    width: calc(100% - 30px);
    padding: 11px;
    border-radius: 25px;
    gap: 10px;
  }
  .operation-bar .primary {
    min-width: 0;
    flex: 1;
    max-width: 218px;
    min-height: 52px;
    gap: 26px;
    font-size: 12px;
    padding: 0 20px;
    border-radius: 17px;
  }
  .operation-left {
    gap: 10px;
  }
  .operation-status {
    font-size: 10px;
  }
  .operation-bar .icon-btn {
    width: 44px;
    height: 44px;
  }
  .operation-status .long {
    display: none;
  }
  .material-grid {
    grid-template-columns: repeat(2,1fr);
    gap: 13px;
  }
  .material-card {
    padding: 5px 5px 0;
    border-radius: 17px;
  }
  .material-card img {
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
  }
  .material-copy {
    height: 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 8px;
    gap: 4px;
    line-height: 1.4;
  }
  .material-copy strong {
    font-size: 12px;
  }
  .material-copy small {
    font-size: 9px;
  }
  .chapter-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 26px 28px 43px;
    min-height: calc(100svh - 74px);
  }
  .chapter-content h1 {
    font-size: 40px;
    line-height: 1.4;
    margin: 20px 0 17px;
  }
  .chapter-content p {
    font-size: 12px;
    margin: 0 0 24px;
    line-height: 1.9;
  }
  .chapter-content .primary {
    min-height: 51px;
    font-size: 12px;
    gap: 32px;
  }
  .card-stack {
    height: 310px;
    margin: 26px auto 0;
    width: 260px;
    order: 2;
  }
  .memory-card {
    width: 191px;
    height: 249px;
    border-radius: 15px;
    padding: 9px;
  }
  .memory-card img {
    height: 198px;
    border-radius: 9px;
  }
  .memory-card figcaption {
    font-size: 9px;
    padding: 10px 3px;
  }
  .space-content {
    width: calc(100% - 40px);
    margin: 20px auto 0;
    padding-bottom: 145px;
    text-align: left;
  }
  .space-content h1 {
    font-size: 25px;
    line-height: 1.5;
    margin-top: 12px;
  }
  .space-content .question-sub {
    font-size: 11px;
    margin-bottom: 14px;
  }
  .space-tabs {
    display: flex;
    width: max-content;
    margin: 5px 0 16px;
    padding: 4px;
  }
  .space-tabs button {
    font-size: 10px;
    padding: 0 14px;
    height: 34px;
  }
  .plan-wrap {
    margin: 0 -5px;
    border-radius: 20px;
  }
  .plan-wrap svg {
    height: 330px;
    width: 100%;
    max-height: none;
    object-fit: contain;
  }
  .plan-badge {
    left: 15px;
    top: 12px;
    font-size: 9px;
  }
  .room-photo {
    height: 330px;
    border-radius: 20px;
  }
  .photo-note {
    font-size: 10px;
    bottom: 13px;
    left: 13px;
    right: 13px;
    padding: 9px 12px;
    line-height: 1.7;
  }
  .room-control-panel {
    justify-content: flex-start;
    gap: 10px;
    margin-top: 17px;
  }
  .room-control-panel .icon-btn {
    height: 43px;
    width: 43px;
  }
  .angle-label {
    font-size: 11px;
    min-width: 32px;
  }
  .room-help {
    font-size: 10px;
    margin: 17px 0 0;
    max-width: 320px;
  }
  .room-help .keyboard-help {
    display: none;
  }
  .room-status {
    font-size: 10px;
    line-height: 1.7;
    margin-top: 7px;
  }
  .result-content {
    width: calc(100% - 48px);
    margin: 27px auto 0;
    padding-bottom: 40px;
  }
  .result-top {
    display: flex;
    flex-direction: column;
    gap: 27px;
  }
  .result-title {
    font-size: 32px;
    line-height: 1.5;
    margin: 17px 0 14px;
  }
  .result-lead {
    font-size: 12px;
    line-height: 1.9;
  }
  .result-tags {
    margin: 20px 0 25px;
    gap: 7px;
  }
  .result-tags span {
    font-size: 10px;
    padding: 7px 10px;
  }
  .evidence {
    padding-top: 20px;
  }
  .evidence-row {
    margin: 13px 0;
  }
  .result-note {
    font-size: 9px;
    margin-top: 19px;
  }
  .result-right {
    width: 100%;
  }
  .result-image {
    height: 208px;
    border-radius: 20px;
  }
  .result-direction {
    font-size: 21px;
    margin-top: 19px;
  }
  .feature-grid {
    gap: 0 18px;
  }
  .feature strong {
    font-size: 11px;
    line-height: 1.9;
  }
  .feature small {
    font-size: 9px;
  }
  .result-actions {
    gap: 17px;
    margin-top: 21px;
  }
  .result-actions .primary {
    min-height: 50px;
    font-size: 11px;
    padding: 0 18px;
  }
  .result-actions .text-link {
    font-size: 10px;
  }
  .result-bottom {
    margin-top: 29px;
    align-items: flex-start;
    gap: 18px;
    flex-direction: column;
    font-size: 10px;
  }
  .feedback-controls {
    gap: 8px;
  }
  .feedback-button {
    font-size: 10px;
  }
  .result-wip {
    margin: 8vh auto;
  }
  .result-wip h1 {
    font-size: 29px;
  }
  dialog {
    padding: 21px;
    border-radius: 23px;
    max-height: calc(100svh - 36px);
  }
  .dialog-top {
    margin-bottom: 17px;
  }
  .dialog-top h2 {
    font-size: 14px;
  }
  .dialog-copy {
    font-size: 11px;
  }
  .dialog-actions {
    gap: 10px;
  }
  .dialog-actions .primary {
    font-size: 11px;
    padding: 0 16px;
  }
  .zoom-controls .primary {
    font-size: 11px;
    padding: 0 16px;
    gap: 15px;
  }
  .zoom-dialog>img {
    height: auto;
    max-height: 50svh;
    aspect-ratio: 4/3;
  }
  .zoom-counter {
    font-size: 10px;
  }
  .toast {
    font-size: 11px;
    bottom: 115px;
    width: max-content;
    max-width: calc(100% - 34px);
  }
}

@media (max-width:370px) {
  .home-title {
    font-size: 36px;
  }
  .home-content {
    padding-top: 17px;
  }
  .model-stage {
    height: 270px;
  }
  .question-content h1 {
    font-size: 24px;
  }
  .question-content {
    width: calc(100% - 36px);
  }
  .art-grid {
    gap: 11px;
  }
  .art-card {
    padding: 5px 5px 0;
  }
  .operation-status {
    display: none;
  }
  .operation-bar .primary {
    max-width: 230px;
  }
  .result-title {
    font-size: 29px;
  }
  .room-control-panel {
    gap: 7px;
  }
  .space-content h1 {
    font-size: 23px;
  }
  .space-content {
    width: calc(100% - 34px);
  }
}

@media (prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }
  *,*:before,*:after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
  .model-frame {
    transform: none !important;
  }
  .fly-card {
    display: none !important;
  }
}

body.reduce-motion *,body.reduce-motion *:before,body.reduce-motion *:after {
  animation-duration: .001ms !important;
  transition-duration: .001ms !important;
}

body.reduce-motion .model-frame {
  transform: none !important;
}

body.reduce-motion .fly-card {
  display: none !important;
}

@media print {
  .site-header,.operation-bar,.result-actions,.result-bottom,.toast,dialog,.result-note {
    display: none !important;
  }
  body {
    background: white !important;
  }
  .result-content {
    width: 100%;
    padding: 20px;
    margin: 0;
  }
  .result-top {
    display: block;
  }
  .result-right {
    margin-top: 30px;
  }
  .view {
    min-height: 0;
  }
}
