@font-face {
  font-family: Poppins;
  src: url("../assets/fonts/poppins-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Poppins;
  src: url("../assets/fonts/poppins-700.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #0b1a12;
  --forest: #174b2a;
  --paper: #fff;
  --cream: #fffdf8;
  --gold: #dca84b;
  --muted: #5b655c;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 Poppins, system-ui, sans-serif;
}

a { color: inherit; }

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

[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  transform: translateY(-150%);
  background: var(--cream);
  border-radius: 8px;
}

.skip-link:focus { transform: translateY(0); }

.skip-supplies-link { top: 8px; }

.site-header {
  width: calc(100% - 32px);
  min-height: 58px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img { width: 30px; height: 30px; object-fit: contain; }

.brand span { display: grid; line-height: 1.05; }

.brand strong { font-size: .95rem; letter-spacing: .18em; }

.brand small { margin-top: 3px; font-size: .45rem; font-weight: 800; letter-spacing: .2em; }

.quiz-link {
  padding: 6px 11px;
  border: 1px solid #bfc9bd;
  border-radius: 999px;
  color: var(--forest);
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
}

.quiz-link:hover { background: #e9eee7; }

.page-shell { width: 100%; margin: 0 auto 24px; }

.intro { width: calc(100% - 32px); margin: 0 auto 8px; display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 4px 16px; text-align: center; }

.eyebrow {
  margin: 0;
  color: var(--forest);
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .19em;
}

h1, h2, p { margin-top: 0; }

h1 { margin-bottom: 0; font-size: clamp(1.2rem, 1.6vw, 1.5rem); line-height: 1.2; letter-spacing: -.025em; }

.intro-copy { display: none; }

.plan-summary { margin-bottom: 0; color: var(--forest); font-size: .72rem; font-weight: 750; }

.room-scene {
  overflow: hidden;
  position: relative;
  min-height: 380px;
  background: #fff;
}

.room-floor {
  position: relative;
  min-height: 380px;
  padding: 3px 5px 40px;
  background: #fff;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(17, minmax(0, 1fr));
  grid-auto-rows: clamp(48px, 4.5vw, 86px);
  grid-auto-flow: dense;
  align-items: stretch;
  gap: 0;
  width: 100%;
  margin: auto;
}

.room-object {
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: help;
  -webkit-tap-highlight-color: transparent;
}

.room-object.is-featured { grid-column: span 2; grid-row: span 2; }

.room-grid > .room-object .room-photo-sprite { scale: .84; }

.room-object.is-photo { isolation: auto; }

.room-object:hover, .room-object:focus-visible { z-index: 10; }

.room-object.is-needed .room-photo-sprite,
.room-object.is-needed .room-miniature {
  filter: drop-shadow(0 0 3px rgba(36, 83, 54, .22));
}

.room-object.is-covered:not(:hover):not(:focus-visible) { opacity: .78; }
.room-object.is-not-in-plan:not(:hover):not(:focus-visible) { opacity: .62; }

.room-miniature {
  position: absolute;
  z-index: var(--layer, 1);
  top: 50%;
  left: 50%;
  width: min(114%, 118px);
  aspect-ratio: 1;
  object-fit: contain;
  transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px))) rotate(var(--rot, 0deg)) scale(var(--scale, 1));
  filter: drop-shadow(1px 2px 2px rgba(25, 35, 25, .15)) drop-shadow(0 0 1px rgba(25, 35, 25, .14));
  pointer-events: none;
  user-select: none;
}

.room-object.is-featured .room-miniature { width: min(107%, 188px); }

.room-object.is-photo .room-miniature { display: none; }

.room-photo-sprite {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  display: block;
  overflow: hidden;
  mix-blend-mode: normal;
  transform-origin: center;
  pointer-events: none;
  user-select: none;
}

.room-photo-sprite img {
  position: absolute;
  max-width: none;
  pointer-events: none;
  user-select: none;
}

.empty-state {
  position: relative;
  max-width: 500px;
  min-height: 300px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.empty-mark { margin-bottom: 10px; color: var(--forest); font-size: 2.8rem; }

.empty-state h2 { margin-bottom: 6px; font-size: 1.6rem; }

.empty-state p { max-width: 340px; margin-bottom: 18px; color: var(--muted); }

.empty-state a {
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--forest);
  color: white;
  font-size: .9rem;
  font-weight: 750;
  text-decoration: none;
}

.empty-state a:hover { background: #0e351d; }

.scene-note { margin: 8px 0 0; color: var(--muted); font-size: .73rem; text-align: center; }

.touch-note { display: none; }

.room-tooltip {
  position: fixed;
  z-index: 50;
  width: max-content;
  max-width: min(240px, calc(100vw - 24px));
  padding: 11px 13px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px;
  background: #102a1a;
  box-shadow: 0 12px 35px rgba(0,0,0,.23);
  color: white;
  pointer-events: none;
  text-align: left;
}

.room-tooltip strong { display: block; font-size: .88rem; line-height: 1.3; }

.room-tooltip span { display: block; margin-top: 4px; color: #e7d4a6; font-size: .77rem; }

@media (max-width: 680px) {
  .site-header { width: calc(100% - 20px); min-height: 52px; }
  .brand img { width: 28px; height: 28px; }
  .brand strong { font-size: .88rem; }
  .brand small { font-size: .41rem; }
  .quiz-link { padding: 6px 9px; font-size: .74rem; }
  .intro { width: calc(100% - 20px); margin: 2px auto 7px; gap: 2px 8px; }
  .eyebrow { display: none; }
  h1 { font-size: 1.07rem; }
  .plan-summary { font-size: .65rem; }
  .room-floor { padding: 3px 5px 25px; }
  .room-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: clamp(70px, 21vw, 90px);
  }
  .room-grid > .room-object .room-photo-sprite { scale: .8; }
  .room-miniature { width: min(111%, 104px); }
  .room-object.is-featured .room-miniature { width: min(104%, 175px); }
  .scene-note { padding: 0 10px; }
}

@media (max-width: 350px) {
  .room-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 681px) and (max-width: 1100px) {
  .room-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: clamp(56px, 6vw, 70px);
  }
}

@media (hover: none) {
  .mouse-note { display: none; }
  .touch-note { display: inline; }
  .room-object { cursor: pointer; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.room-embedded body { background: #fff; }
.room-embedded .site-header,
.room-embedded .intro,
.room-embedded .skip-link:not(.skip-supplies-link) { display: none; }
.room-embedded .scene-note {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.room-embedded .page-shell { width: 100%; margin: 0; }
.room-embedded .room-scene,
.room-embedded .room-floor { min-height: 0; }
.room-embedded .room-floor { padding: 0 0 35px; }
.room-embedded .room-grid {
  grid-template-columns: repeat(17, minmax(0, 1fr));
  grid-auto-rows: clamp(42px, 4.5vw, 70px);
}
.room-embedded .room-grid > .room-object .room-photo-sprite { scale: .56; }
