/* The home page: its sections and demos, and the ?opt= performance modes. Needs site.css. */
@property --o { syntax: '<number>'; inherits: true; initial-value: 0; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center;
  gap: clamp(28px, 5vw, 72px); padding-block: clamp(28px, 5vw, 72px) clamp(56px, 7vw, 110px);
}
.hero-copy { display: grid; gap: 26px; align-content: center; }
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-art { max-width: 580px; width: 100%; margin-inline: auto; }
}

/* ---------- scaled stage ---------- */
.stage { position: relative; width: 100%; max-width: 100%; aspect-ratio: var(--w) / var(--h); }
.stage-inner { position: absolute; left: 0; top: 0; width: calc(var(--w) * 1px); height: calc(var(--h) * 1px); transform-origin: 0 0; transform: scale(var(--k, 1)); }

/* ---------- hero room ---------- */
#hero-stage { border-radius: 30px; overflow: hidden; box-shadow: var(--shadow-lg); isolation: isolate; }
.room { position: absolute; inset: 0; background:
  radial-gradient(120% 80% at 70% 10%, color-mix(in srgb, var(--wall-a) 70%, #fff 30%) 0%, var(--wall-a) 45%, var(--wall-b) 100%); }
.room-floor { position: absolute; left: 0; right: 0; top: 500px; bottom: 0;
  background: repeating-linear-gradient(90deg, transparent 0 118px, rgba(0,0,0,.08) 118px 120px), linear-gradient(180deg, color-mix(in srgb, var(--floorwood) 85%, #000), var(--floorwood)); }
.baseboard { position: absolute; left: 0; right: 0; top: 488px; height: 12px; background: color-mix(in srgb, var(--wall-a) 60%, #fff 40%); box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.painting { position: absolute; left: 64px; top: 104px; width: 150px; height: 116px; background: #F4F1EA; padding: 11px; border: 5px solid #2A2724; box-shadow: 0 10px 18px -8px rgba(0,0,0,.4); }
.canvas-art { position: relative; width: 100%; height: 100%; background: #E7DCC8; overflow: hidden; }
.canvas-art i { position: absolute; display: block; }
.canvas-art i:nth-child(1) { width: 60px; height: 60px; border-radius: 50%; background: #D86A3C; left: 12px; top: 14px; }
.canvas-art i:nth-child(2) { width: 70px; height: 34px; background: #2F5D6B; right: -6px; bottom: 8px; }
.canvas-art i:nth-child(3) { width: 6px; height: 90px; background: #1E2328; left: 72px; top: -6px; }
.canvas-art i:nth-child(4) { width: 22px; height: 22px; border-radius: 50%; background: #E9B949; right: 16px; top: 10px; }
.lamp { position: absolute; left: 350px; top: 96px; width: 110px; height: 142px; }
.lamp-shade { position: absolute; left: 8px; top: 8px; width: 94px; height: 58px; background: linear-gradient(90deg, #E9DFC9, #F7F0E0 40%, #DCCFB2); clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%); }
.lamp-stem { position: absolute; left: 53px; top: 64px; width: 4px; height: 64px; background: #2B2A28; }
.lamp-base { position: absolute; left: 33px; top: 124px; width: 44px; height: 16px; border-radius: 50% 50% 4px 4px; background: #2B2A28; }
.lamp-glow { position: absolute; left: -150px; top: -60px; width: 410px; height: 460px; background: radial-gradient(closest-side, rgba(255, 200, 110, .38), rgba(255, 190, 90, .12) 55%, transparent); opacity: var(--lamp); pointer-events: none; mix-blend-mode: screen; }
.books { position: absolute; left: 104px; top: 205px; width: 100px; height: 32px; }
.books i { position: absolute; display: block; height: 10px; border-radius: 2px; }
.books i:nth-child(1) { left: 4px; bottom: 0; width: 94px; height: 11px; background: #3C5A74; }
.books i:nth-child(2) { left: 10px; bottom: 11px; width: 80px; height: 10px; background: #C9A15A; }
.books i:nth-child(3) { left: 0; bottom: 21px; width: 88px; height: 10px; background: #A14B37; }
.vase { position: absolute; left: 228px; top: 180px; width: 28px; height: 56px; }
.vase::before { content: ""; position: absolute; left: 0; bottom: 0; width: 28px; height: 36px; border-radius: 12px 12px 8px 8px; background: linear-gradient(90deg, #5E7F6E, #7FA08D 45%, #54725F); }
.vase i { position: absolute; left: 12px; bottom: 30px; width: 2px; height: 34px; background: #4F6B45; transform: rotate(-8deg); transform-origin: bottom; }
.vase i::after { content: ""; position: absolute; left: -9px; top: 2px; width: 14px; height: 8px; border-radius: 50% 0; background: #6E9460; transform: rotate(-24deg); }
.dresser-top { position: absolute; left: 76px; top: 236px; width: 408px; height: 16px; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, color-mix(in srgb, var(--oak) 88%, #fff), var(--oak-2)); box-shadow: 0 3px 4px -2px rgba(0,0,0,.35); z-index: 1; }
.dresser-body { position: absolute; left: 88px; top: 250px; width: 384px; height: 212px; background: linear-gradient(180deg, var(--walnut), color-mix(in srgb, var(--walnut) 80%, #000)); border-radius: 0 0 4px 4px; box-shadow: 0 24px 30px -18px rgba(0,0,0,.55); }
.leg { position: absolute; top: 460px; width: 12px; height: 42px; background: var(--walnut); border-radius: 0 0 3px 3px; }
.leg.l1 { left: 104px; transform: skewX(8deg); } .leg.l2 { left: 444px; transform: skewX(-8deg); }

/* drawer: front plus perspective interior */
.dr { position: absolute; z-index: 2; transition: --o .9s cubic-bezier(.25, .8, .25, 1); }
.dr.open { --o: 1; z-index: 6; }
.dr .front {
  position: absolute; inset: 0; border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(0,0,0,.08)),
    repeating-linear-gradient(91deg, transparent 0 11px, rgba(90,50,20,.07) 11px 13px, transparent 13px 29px, rgba(255,255,255,.05) 29px 31px),
    var(--oak);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -2px 0 rgba(0,0,0,.14),
    0 calc(2px + var(--o) * 12px) calc(3px + var(--o) * 16px) rgba(30, 14, 4, calc(.22 + var(--o) * .25));
  transform: translateY(calc(var(--o) * 9px)) scale(calc(1 + var(--o) * .065));
}
.dr .pull { position: absolute; left: 50%; top: 50%; width: 46px; height: 7px; margin: -3.5px 0 0 -23px; border-radius: 4px; background: linear-gradient(180deg, #F0D48A, var(--brass) 55%, #8C6A22); box-shadow: 0 2px 2px rgba(0,0,0,.3); }
.dr .inside {
  position: absolute; left: 3%; right: 3%; bottom: 100%; overflow: hidden;
  height: calc(var(--o) * var(--dh) * 1px);
  transform-origin: 50% 100%; transform: perspective(560px) rotateX(50deg);
  background: var(--oak-2); padding-inline: 6px;
}
.dr .inside::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 36px; background: linear-gradient(rgba(10, 5, 0, .5), transparent); pointer-events: none; }
.dr .inside .floor { position: absolute; left: 6px; right: 6px; bottom: 0; border-radius: 0; }

/* ---------- trays & items ---------- */
.tray {
  position: relative; padding: 7px; border-radius: 7px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--oak) 90%, #fff), var(--oak-2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 14px 26px -14px rgba(30, 14, 4, .55);
}
.floor {
  position: relative; container-type: inline-size; overflow: hidden; border-radius: 3px;
  background:
    repeating-linear-gradient(90deg, transparent 0 17px, rgba(120, 80, 40, .05) 17px 19px, transparent 19px 41px),
    linear-gradient(180deg, color-mix(in srgb, var(--birch) 90%, #000), var(--birch) 30%);
  box-shadow: inset 0 3px 9px rgba(60, 30, 10, .35), inset 0 0 0 1px rgba(0,0,0,.06);
}
.tray.tin { background: linear-gradient(180deg, #3B7A5E, #245038); }
.tray.tin .floor { background: linear-gradient(180deg, #CDD3D6, #E9ECEE 30%); }
.tray.bin { background: linear-gradient(180deg, #BFD2DC, #9FB7C4); }
.tray.bin .floor { background: linear-gradient(180deg, #C9DAE3, #DCE8EE 30%); }
.tray.shelf { background: linear-gradient(180deg, #F2F2EE, #D8D8D2); }
.tray.shelf .floor { background: linear-gradient(180deg, #E1E1DC, #F3F3EF 30%); }
.item { position: absolute; transform: translate(-50%, -50%) rotate(var(--r, 0deg)); filter: brightness(var(--item-dim)) drop-shadow(0 .5cqw .35cqw rgba(30, 14, 4, .35)); transition: opacity .45s, filter .45s; }
.item svg { display: block; width: 100%; height: 100%; overflow: visible; }
.floor.dim .item { opacity: .32; filter: saturate(.25) brightness(var(--item-dim)); }
.floor .item.lit, .floor.dim .item.lit { opacity: 1; filter: drop-shadow(0 0 .7cqw #FFF4CC) drop-shadow(0 0 2.6cqw var(--hl)) drop-shadow(0 0 1.2cqw var(--hl)); animation: litpulse 1.8s ease-in-out infinite; }
@keyframes litpulse { 50% { transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(1.07); } }

.tape {
  display: inline-block; font-family: var(--f-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .09em;
  font-variation-settings: "wdth" 88; text-transform: uppercase; white-space: nowrap;
  background: var(--tape); color: var(--tape-ink); padding: 6px 9px 5px; border-radius: 2px;
  text-shadow: 0 1px 0 rgba(0,0,0,.35); box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.tape:empty { display: none; }

/* ---------- search bar ---------- */
.searchbar {
  display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 9px 0 20px;
  border-radius: 999px; background: var(--card); box-shadow: var(--shadow); border: 1px solid var(--line);
  font-size: 18px; color: var(--ink); transition: box-shadow .3s, transform .3s;
}
.searchbar .sb-icon { width: 20px; height: 20px; flex: none; color: var(--ink-3); }
.sb-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; }
.sb-text .typed:empty::before { content: attr(data-ph); color: var(--ink-3); }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 1px; vertical-align: -.18em; background: var(--ink); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.sb-mic { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; flex: none; }
.sb-mic svg { width: 19px; height: 19px; }
.searchbar.go { box-shadow: 0 0 0 4px var(--hl-mark), var(--shadow); }
.hero-search { position: absolute; left: 50px; top: 24px; width: 460px; z-index: 10; }
.answer { position: absolute; left: 0; right: 0; top: 92px; display: flex; justify-content: center; z-index: 10; opacity: 0; transform: translateY(-6px); transition: opacity .4s, transform .4s; }
.answer.show { opacity: 1; transform: none; }
.answer .tape { font-size: max(11.5px, calc(10px / var(--k, 1))); padding: 8px 11px 7px; transform: rotate(-1deg); }

/* ---------- settle band ---------- */
.settle { overflow: hidden; overflow: clip; padding-block: clamp(40px, 6vw, 80px) clamp(64px, 8vw, 120px); }
.settle-head { display: grid; gap: 14px; margin-bottom: clamp(20px, 3vw, 36px); }
.settle-stage { position: relative; width: 100%; }
.st { position: absolute; }
.st .tray-label { margin-bottom: 8px; }
.si { position: absolute; left: 0; top: 0; will-change: transform; filter: brightness(var(--item-dim)) drop-shadow(0 3px 3px rgba(30, 14, 4, .3)); }
.si svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* ---------- sections ---------- */
.section { padding-block: clamp(72px, 10vw, 140px); }
.section.alt { background: var(--bg-2); }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(28px, 4vw, 52px); max-width: 720px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); align-items: center; }
.split.flip .split-copy { order: 2; }
.split-copy { display: grid; gap: 20px; }
@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split.flip .split-copy { order: 0; }
}
.points { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 14px; max-width: 34em; }
.points li { position: relative; padding-left: 26px; color: var(--ink-2); }
.points li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: var(--hl); box-shadow: 0 0 0 4px var(--hl-mark); }
.points strong { color: var(--ink); font-weight: 600; }

/* ---------- search demo ---------- */
.search-demo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.searchbar.big { max-width: 640px; height: 62px; font-size: 19px; }
.search-summary { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 0; min-height: 1.6em; }
.search-summary b { color: var(--ink); font-weight: 600; }
.tray-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 26px); min-height: 200px; }
@media (max-width: 980px) { .tray-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rtray { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; }
.rtray .tape { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 520px) { .rtray .tape { font-size: 9px; padding: 5px 7px 4px; } .rtray .tray { padding: 5px; } }
.found-chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 36px; }
.chip { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; padding: 6px 12px 6px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--hl); box-shadow: 0 0 6px var(--hl); }

/* ---------- phone ---------- */
.phone-wrap { max-width: 340px; margin-inline: auto; width: 100%; }
.phone { position: absolute; inset: 0; border-radius: 54px; background: #0D1014; padding: 12px; box-shadow: var(--shadow-lg), inset 0 0 0 1.5px #2A3038, inset 0 0 0 4px #0D1014, inset 0 0 0 5px #3A424C; }
.phone-screen { position: relative; height: 100%; border-radius: 42px; overflow: hidden; background: var(--app-bg); }
.status { display: flex; justify-content: space-between; align-items: center; padding: 16px 30px 0; height: 46px; font-weight: 600; font-size: 14px; }
.status-icons { display: flex; gap: 5px; align-items: center; }
.status-icons i { display: block; background: var(--ink); border-radius: 2px; }
.status-icons i:nth-child(1) { width: 16px; height: 9px; clip-path: polygon(0 100%, 25% 100%, 25% 70%, 37% 70%, 37% 100%, 62% 100%, 62% 40%, 75% 40%, 75% 100%, 100% 100%, 100% 0, 88% 0, 88% 100%, 12% 100%, 12% 100%); }
.status-icons i:nth-child(2) { width: 14px; height: 10px; border-radius: 50% 50% 0 0 / 100% 100% 0 0; clip-path: polygon(50% 100%, 0 0, 100% 0); }
.status-icons i:nth-child(3) { width: 24px; height: 11px; border-radius: 3px; }
.app-head { padding: 12px 24px 12px; }
.crumb { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; color: var(--ink-3); font-variation-settings: "wdth" 90; }
.app-title { font-family: var(--f-display); font-weight: 700; font-size: 28px; letter-spacing: -.02em; line-height: 1.1; }
.phone-trays { display: grid; gap: 16px; padding: 0 20px; }
.ptray { display: grid; gap: 8px; transition: opacity .4s; }
.ptray .tape { font-size: 9.5px; }
.transcript, .reply {
  position: absolute; left: 16px; right: 16px; bottom: 124px; z-index: 12;
  background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; font-size: 16px; line-height: 1.4;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .35s;
}
.transcript.show, .reply.show { opacity: 1; transform: none; }
.transcript .w { display: inline-block; opacity: 0; filter: blur(4px); transform: translateY(4px); transition: opacity .25s, filter .25s, transform .25s; margin-right: .26em; }
.transcript .w.in { opacity: 1; filter: none; transform: none; }
.reply { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.reply::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: #2F9E6A url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100%; }
.mic-dock { position: absolute; left: 0; right: 0; bottom: 30px; height: 110px; display: grid; place-items: center; }
.mic-ring { position: absolute; width: 110px; height: 110px; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.mic-btn { position: relative; width: 66px; height: 66px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; box-shadow: 0 8px 20px -6px rgba(0,0,0,.45); transition: background .3s, transform .3s; }
.mic-btn svg { width: 28px; height: 28px; }
.mic-btn.live { background: var(--red); color: #fff; transform: scale(1.06); }
.fly-layer { position: absolute; inset: 0; pointer-events: none; z-index: 15; }
.flyer { position: absolute; left: 0; top: 0; filter: brightness(var(--item-dim)) drop-shadow(0 8px 8px rgba(30, 14, 4, .35)); }
.flyer svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* ---------- setup / kitchen ---------- */
#setup-stage { border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-lg); isolation: isolate; }
.kitchen { position: absolute; inset: 0; background: linear-gradient(180deg, var(--wall-a), var(--wall-b)); }
.kitchen > div { position: absolute; }
.k-window { background: radial-gradient(circle at 72% 26%, rgba(255,250,225,calc(var(--lamp)*.9)) 0 7px, transparent 8px), linear-gradient(160deg, var(--sky-a), var(--sky-b) 60%, var(--sky-c)); filter: brightness(var(--kdim)); border: 8px solid #F4F4F0; box-shadow: inset 0 0 0 2px rgba(0,0,0,.08); }
.k-window::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 49%, #F4F4F0 49% 51%, transparent 51%); }
.k-tile { background-color: color-mix(in srgb, var(--wall-a) 60%, #fff 40%); background-image: linear-gradient(90deg, rgba(0,0,0,.06) 1px, transparent 1px), linear-gradient(rgba(0,0,0,.06) 1px, transparent 1px); background-size: 34px 17px; }
.k-under { background: linear-gradient(180deg, rgba(255, 214, 140, .55), transparent); opacity: var(--lamp); }
.k-cab, .k-door { filter: brightness(var(--kdim)); }
.k-cab { background: linear-gradient(180deg, #F5F3EE, #E4E1D9); border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.07), 0 6px 10px -6px rgba(0,0,0,.25); }
.k-door { background: linear-gradient(180deg, #FBFAF7, #ECE9E2); border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), inset 0 0 0 7px #F3F1EB, inset 0 0 0 8px rgba(0,0,0,.06); }
.k-knob { width: 5px; height: 26px; border-radius: 3px; background: linear-gradient(90deg, #3A3F45, #6B727A); }
.k-knob.h { width: 34px; height: 5px; }
.k-counter { background: linear-gradient(180deg, #5B6167, #3E4449); border-radius: 3px; box-shadow: 0 4px 6px -3px rgba(0,0,0,.4); }
.k-floor { background: linear-gradient(180deg, color-mix(in srgb, var(--floorwood) 80%, #000), var(--floorwood)); }
.k-kettle { width: 46px; height: 40px; background: linear-gradient(90deg, #B9C1C8, #E6EAED 40%, #98A1A9); border-radius: 18px 18px 6px 6px; }
.k-kettle::after { content: ""; position: absolute; left: 14px; top: -8px; width: 18px; height: 8px; border-radius: 8px 8px 0 0; background: #2B2F33; }
.k-bowl { width: 70px; height: 22px; border-radius: 0 0 35px 35px; background: linear-gradient(90deg, #2F5D6B, #4C8090); }
.k-bowl::before { content: ""; position: absolute; left: 10px; top: -16px; width: 20px; height: 20px; border-radius: 50%; background: #F08A2E; box-shadow: 18px 2px 0 #F29A3E, 34px -2px 0 #E77E26, 12px -10px 0 #EFA548; }
.k-board { width: 60px; height: 84px; border-radius: 10px 10px 4px 4px; background: linear-gradient(90deg, #B98A58, #D4A673 50%, #B08050); transform: rotate(-6deg); }
.k-board::before { content: ""; position: absolute; left: 24px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--wall-a); }
.k-plant { width: 34px; height: 30px; background: #C46A45; border-radius: 3px 3px 8px 8px; }
.k-plant::before { content: ""; position: absolute; left: -10px; top: -34px; width: 54px; height: 40px; background: radial-gradient(circle at 30% 60%, #5E8F55 0 12px, transparent 13px), radial-gradient(circle at 60% 35%, #6FA163 0 13px, transparent 14px), radial-gradient(circle at 78% 70%, #4E7F47 0 11px, transparent 12px); }
.viewfinder i { position: absolute; width: 34px; height: 34px; border: 3px solid rgba(255,255,255,.95); filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.viewfinder i:nth-child(1) { left: 16px; top: 16px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.viewfinder i:nth-child(2) { right: 16px; top: 16px; border-left: 0; border-bottom: 0; border-top-right-radius: 8px; }
.viewfinder i:nth-child(3) { left: 16px; bottom: 16px; border-right: 0; border-top: 0; border-bottom-left-radius: 8px; }
.viewfinder i:nth-child(4) { right: 16px; bottom: 16px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
.photo-chip { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); font-family: var(--f-mono); font-size: max(11px, calc(9.5px / var(--k, 1))); letter-spacing: .1em; color: #fff; background: rgba(15, 20, 26, .62); padding: 7px 12px; border-radius: 999px; white-space: nowrap; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.zone { position: absolute; border: 2.5px solid #fff; border-radius: 6px; box-shadow: 0 0 0 1px rgba(0,0,0,.18), inset 0 0 0 1px rgba(0,0,0,.08); opacity: 0; transition: opacity .5s, left .6s, width .6s; }
.zone.show { opacity: 1; }
.dot { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3.5px rgba(21, 32, 43, .78), 0 3px 8px rgba(0,0,0,.35); transform: scale(0); transition: transform .45s cubic-bezier(.3, 1.6, .5, 1), left .7s cubic-bezier(.6, 0, .2, 1), box-shadow .4s, opacity .3s; }
.dot.show { transform: scale(1); }
.dot.unread { box-shadow: 0 0 0 3.5px var(--red), 0 0 16px 5px rgba(229, 72, 77, .55); }
.dlabel { position: absolute; transform: translate(-50%, 16px); font-family: var(--f-mono); font-size: max(10.5px, calc(10px / var(--k, 1))); letter-spacing: .06em; white-space: nowrap; color: #fff; background: rgba(15, 20, 26, .78); padding: 4px 8px; border-radius: 4px; opacity: 0; transition: opacity .4s, transform .4s; }
.dlabel.show { opacity: 1; transform: translate(-50%, 20px); }
.setup-demo { position: relative; display: grid; justify-items: center; gap: 14px; }
.setup-demo .stage { justify-self: stretch; }
.setup-say { display: flex; gap: 10px; align-items: center; max-width: 100%; background: var(--glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px 8px 8px; font-size: 16px; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s; }
.setup-say.show { opacity: 1; transform: none; }
@media (min-width: 700px) { .setup-say { position: absolute; left: 50%; bottom: 22px; white-space: nowrap; transform: translate(-50%, 10px); } .setup-say.show { transform: translate(-50%, 0); } }
.setup-say .m { width: 32px; height: 32px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; flex: none; }
.setup-say .m svg { width: 16px; height: 16px; }

/* ---------- time cards ---------- */
.cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
@media (max-width: 900px) { .cards3 { grid-template-columns: minmax(0, 1fr); max-width: 520px; } }
.tcard { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px; display: grid; gap: 10px; align-content: start; box-shadow: var(--shadow); }
.tcard-top { display: flex; justify-content: space-between; gap: 10px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.tcard-top .kind { color: var(--ink); }
.tcard-art { position: relative; height: 150px; display: grid; place-items: center; margin-block: 4px 6px; }
.ico { width: 104px; filter: brightness(var(--item-dim)) drop-shadow(0 6px 6px rgba(30, 14, 4, .25)); }
.ico svg { display: block; width: 100%; height: auto; }
.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin-top: 8px; }
.months span { display: grid; gap: 5px; justify-items: center; font-family: var(--f-mono); font-size: 9px; color: var(--ink-3); }
.months span i { width: 100%; height: 6px; border-radius: 3px; background: var(--line); transition: background .4s, box-shadow .4s; }
.months span.on i { background: var(--hl); box-shadow: 0 0 8px var(--hl); }
.months span.on { color: var(--ink); }
.cal-art { grid-template-columns: auto auto; gap: 22px; }
.cal-art .ico { width: 78px; transform: rotate(-8deg); }
.cal { width: 118px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; position: relative; }
.cal-head { background: var(--red); color: #fff; text-align: center; font-family: var(--f-mono); font-size: 11px; font-weight: 600; letter-spacing: .08em; padding: 6px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; padding: 8px; }
.cal-grid i { aspect-ratio: 1; border-radius: 2px; background: var(--line); }
.cal-stamp { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%) rotate(-12deg) scale(1.6); font-family: var(--f-mono); font-size: 10px; font-weight: 600; letter-spacing: .12em; color: var(--red); border: 2px solid var(--red); padding: 3px 6px; border-radius: 3px; background: var(--card); opacity: 0; transition: opacity .3s, transform .35s cubic-bezier(.3, 1.5, .5, 1); }
.cal-stamp.show { opacity: 1; transform: translate(-50%, -50%) rotate(-12deg) scale(1); }
.bags { position: relative; width: 190px; height: 130px; }
.bag { position: absolute; top: 12px; width: 76px; transition: transform .6s cubic-bezier(.5, 0, .2, 1), opacity .5s; filter: brightness(var(--item-dim)) drop-shadow(0 6px 6px rgba(30, 14, 4, .25)); }
.bag svg { display: block; width: 100%; height: auto; }
.bag.gone { opacity: 0; transform: translateY(26px) rotate(12deg) scale(.8); }
.bag-count { position: absolute; right: -4px; top: -2px; font-family: var(--f-mono); font-size: 11px; font-weight: 600; background: var(--ink); color: var(--bg); padding: 5px 9px; border-radius: 999px; transition: background .3s; }
.bag-count.low { background: var(--red); color: #fff; }
.list-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font-size: 15px; opacity: .35; transition: opacity .4s; }
.list-row.on { opacity: 1; }
.list-row .check { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--ink-3); flex: none; transition: background .3s, border-color .3s; }
.list-row.on .check { background: #2F9E6A; border-color: #2F9E6A; }
.list-row .added { margin-left: auto; font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #2F9E6A; opacity: 0; transition: opacity .4s; }
.list-row.on .added { opacity: 1; }

/* ---------- household ---------- */
.lockline { display: flex; gap: 14px; align-items: flex-start; margin-top: 10px; padding: 18px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); max-width: 34em; }
.lockline svg { width: 26px; height: 26px; flex: none; color: var(--ink); margin-top: 2px; }
.lockline p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.lockline strong { color: var(--ink); }
.feed-card { background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 22px; box-shadow: var(--shadow-lg); max-width: 520px; margin-inline: auto; width: 100%; }
.feed-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.feed-title { font-family: var(--f-display); font-weight: 700; font-size: 24px; letter-spacing: -.02em; }
.avatars { display: flex; }
.avatars span, .av { width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; box-shadow: 0 0 0 3px var(--card); flex: none; }
.avatars span + span { margin-left: -8px; }
.feed { list-style: none; margin: 0; padding: 0; height: 340px; overflow: hidden; position: relative; }
.feed::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(transparent, var(--card)); pointer-events: none; }
.feed li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 16px 0 14px; border-bottom: 1px solid var(--line); }
.feed li .av { width: 30px; height: 30px; font-size: 13px; box-shadow: none; }
.feed li p { margin: 0 0 6px; font-size: 15px; line-height: 1.4; }
.feed li .tape { font-size: 9.5px; white-space: normal; }
.feed li time { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }

/* ---------- marquee ---------- */
.says { padding-bottom: clamp(56px, 8vw, 110px); }
.marquee { display: grid; gap: 14px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.mrow { display: flex; gap: 14px; width: max-content; animation: slide var(--dur, 80s) linear infinite; }
.mrow.rev { animation-direction: reverse; }
.marquee:hover .mrow { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.say { font-size: clamp(15px, 1.4vw, 18px); padding: 14px 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); white-space: nowrap; color: var(--ink); }
.say::before { content: "“"; color: var(--ink-3); } .say::after { content: "”"; color: var(--ink-3); }

/* ---------- final ---------- */
.final { padding-block: clamp(64px, 9vw, 130px); background: var(--bg-2); border-top: 1px solid var(--line); }
.final-inner { display: grid; gap: 24px; justify-items: center; text-align: center; }
.final .lede { margin-inline: auto; }
.wall { display: grid; grid-template-columns: repeat(var(--cols, 10), 1fr); gap: 6px; width: min(100%, 620px); padding: 10px; border-radius: 10px; background: linear-gradient(180deg, var(--walnut), color-mix(in srgb, var(--walnut) 80%, #000)); box-shadow: 0 22px 34px -20px rgba(0,0,0,.55); margin-bottom: 12px; }
.wall b { position: relative; aspect-ratio: 2 / 1; border-radius: 3px; background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(0,0,0,.08)), var(--oak); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 -1px 0 rgba(0,0,0,.15); transition: transform .6s cubic-bezier(.25, .8, .25, 1), box-shadow .6s; }
.wall b::after { content: ""; position: absolute; left: 36%; right: 36%; top: 45%; height: 12%; border-radius: 2px; background: var(--brass); transition: background .4s, box-shadow .4s; }
.wall b.on { transform: scale(1.08) translateY(2px); box-shadow: 0 8px 14px -4px rgba(0,0,0,.45), 0 0 0 2px var(--hl), 0 0 18px var(--hl); z-index: 1; }
.wall b.on::after { background: #FFE9A8; box-shadow: 0 0 8px var(--hl); }
.final-h { font-size: clamp(44px, 7vw, 92px); }

/* ---------- performance modes (?opt=…) ---------- */
.bk-wrap { display: block; position: relative; width: 100%; height: 100%; }
.bk-wrap > svg { display: block; width: 100%; height: 100%; overflow: visible; }
.bk-wrap :is(img, canvas) { position: absolute; max-width: none; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.bk-g { opacity: 0; transition: opacity .45s; }
/* once an item's bitmap is in, drop every live filter on it */
.opt-bake :is(.item, .si, .flyer, .ico, .bag):has(> .bk-wrap.baked) { filter: none !important; }
.opt-bake .item.lit:has(> .bk-wrap.baked) { will-change: transform; }
.opt-bake .item.lit > .bk-wrap.baked .bk-g { opacity: 1; animation: glowpulse 1.8s ease-in-out infinite; }
@keyframes glowpulse { 50% { opacity: .55; } }

.opt-glass .nav { -webkit-backdrop-filter: none; backdrop-filter: none; background: color-mix(in srgb, var(--bg) 96%, transparent); }
.opt-glass .transcript, .opt-glass .reply, .opt-glass .setup-say { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--card); }
.opt-glass .photo-chip { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(15, 20, 26, .78); }
.opt-glass .lamp-glow { mix-blend-mode: normal; }

/* drawer opening as pure compositor transforms: the floor slides out from
   under the front instead of a custom property re-laying-out every frame */
.opt-fx .dr, .opt-fx .dr.open { --o: 0; }
.opt-fx .dr { transition: z-index 0s .9s; }
.opt-fx .dr.open { transition-delay: 0s; }
.opt-fx .dr .front {
  transform: none; will-change: transform; transition: transform .9s cubic-bezier(.25, .8, .25, 1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -2px 0 rgba(0,0,0,.14), 0 2px 3px rgba(30, 14, 4, .22);
}
.opt-fx .dr.open .front { transform: translateY(9px) scale(1.065); }
.opt-fx .dr .front::before { content: ""; position: absolute; inset: 0; border-radius: 4px; box-shadow: 0 14px 19px rgba(30, 14, 4, .47); opacity: 0; transition: opacity .9s; pointer-events: none; }
.opt-fx .dr.open .front::before { opacity: 1; }
.opt-fx .dr .inside { height: calc(var(--dh) * 1px); background: none; padding: 0; }
.opt-fx .dr .inside::after { opacity: 0; transition: opacity .4s; }
.opt-fx .dr.open .inside::after { opacity: 1; transition-delay: .25s; }
.opt-fx .dr .inside .floor { left: 0; right: 0; border-inline: 6px solid var(--oak-2); transform: translateY(100%); will-change: transform; transition: transform .9s cubic-bezier(.25, .8, .25, 1); }
.opt-fx .dr.open .inside .floor { transform: none; }

/* final wall: glow fades on a pseudo-element instead of repainting box-shadow */
.opt-fx .wall b { transition: transform .6s cubic-bezier(.25, .8, .25, 1); }
.opt-fx .wall b.on { box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 -1px 0 rgba(0,0,0,.15); }
.opt-fx .wall b::before { content: ""; position: absolute; inset: 0; border-radius: 3px; box-shadow: 0 8px 14px -4px rgba(0,0,0,.45), 0 0 0 2px var(--hl), 0 0 18px var(--hl); opacity: 0; transition: opacity .6s; }
.opt-fx .wall b.on::before { opacity: 1; }
