:root {
  --ink: #f3e6cf;
  --ink-dim: #cdb995;
  --ink-faint: #9c8a6c;
  --amber: #f0b35a;
  --ember: #e0743c;
  --moss: #9fbf7a;
  --rose: #e08a8a;
  --panel: rgba(22, 15, 10, 0.52);
  --panel-edge: rgba(240, 190, 120, 0.16);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0c0806; color: var(--ink); overflow: hidden; }
body { font-family: var(--serif); -webkit-font-smoothing: antialiased; }
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; outline: none; }

.hud { position: fixed; inset: 0; pointer-events: none; font-size: 13px; line-height: 1.35; }
.panel[hidden] { display: none !important; }
.panel {
  position: absolute; pointer-events: auto;
  background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 10px;
  padding: 10px 12px; backdrop-filter: blur(6px) saturate(1.1); -webkit-backdrop-filter: blur(6px) saturate(1.1);
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}
.small { font-size: 12px; color: var(--ink-dim); }
.label { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.dot { color: var(--ink-faint); margin: 0 4px; }

.top-left { top: 14px; left: 14px; min-width: 190px; }
.shop-name { font-size: 17px; font-style: italic; color: var(--amber); letter-spacing: 0.02em; margin-bottom: 2px; }
.sign {
  display: inline-block; margin-top: 6px; padding: 1px 8px; border-radius: 4px; font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase; border: 1px solid currentColor;
}
.sign.open { color: #ff6f8a; text-shadow: 0 0 6px rgba(255, 80, 120, 0.8); box-shadow: 0 0 8px rgba(255, 80, 120, 0.25) inset; }
.sign.closed { color: var(--ink-faint); }

.top-right { top: 14px; right: 14px; min-width: 200px; }
.moonfund { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.moonfund .value { font-size: 15px; color: var(--ink); }
.moon-empty { fill: #2a2420; }
.moon-fill { fill: #f2e6c4; transition: y 1.2s ease, height 1.2s ease; }
.moon-ring { fill: none; stroke: rgba(242, 230, 196, 0.55); stroke-width: 1; }
#hud-moon { filter: drop-shadow(0 0 6px rgba(242, 230, 196, 0.35)); }
.econ { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.mode { text-transform: lowercase; }
.mode.thriving { color: var(--moss); } .mode.steady { color: var(--amber); }
.mode.frugal { color: var(--ember); } .mode.hibernating { color: #8fa4c9; }

.bottom-left { left: 14px; bottom: 44px; width: min(360px, calc(100vw - 28px)); }
.thought-wrap { display: flex; align-items: baseline; gap: 8px; }
.emotion {
  font-size: 11px; letter-spacing: 0.1em; text-transform: lowercase; color: #1b120c; background: var(--amber);
  padding: 0 7px; border-radius: 9px;
}
.activity { font-size: 11px; color: var(--ink-faint); font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thought { margin: 6px 0 8px; font-size: 15px; font-style: italic; color: var(--ink); min-height: 2.6em; text-transform: lowercase; }
.thought .caret { display: inline-block; width: 0.5ch; color: var(--amber); animation: blink 1s steps(1) infinite; }
.thought.fade { animation: thoughtIn 0.6s ease; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes thoughtIn { from { opacity: 0.0; filter: blur(2px); } to { opacity: 1; filter: none; } }
.needs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 10px; }
.need { font-size: 10px; color: var(--ink-faint); text-transform: lowercase; }
.need .bar { height: 3px; border-radius: 2px; background: rgba(255,255,255,0.08); margin-top: 2px; overflow: hidden; }
.need .bar i { display: block; height: 100%; background: var(--amber); border-radius: 2px; transition: width 0.8s ease, background 0.8s; }

.bottom-right { right: 14px; bottom: 44px; width: min(300px, calc(100vw - 28px)); }
.moves { list-style: none; margin: 4px 0 0; padding: 0; }
.moves li { font-size: 12px; color: var(--ink-dim); margin: 3px 0; display: grid; grid-template-columns: 14px 1fr; gap: 4px; }
.moves li .ok { color: var(--moss); } .moves li .no { color: var(--rose); }
.moves li b { font-weight: normal; color: var(--ink); font-family: var(--mono); font-size: 11px; }
.moves li span.reason { display: block; color: var(--ink-faint); font-style: italic; }

.ticker-wrap {
  position: absolute; left: 0; right: 0; bottom: 18px; height: 20px; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker { white-space: nowrap; font-size: 12px; color: var(--ink-dim); display: inline-block; padding-left: 100%; animation: tick 70s linear infinite; }
.ticker span { margin-right: 36px; }
.ticker span em { color: var(--amber); font-style: normal; margin-right: 6px; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-100%); } }

.controls { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; pointer-events: auto; }
.btn {
  font: inherit; font-size: 11px; letter-spacing: 0.08em; color: var(--ink-dim); background: var(--panel);
  border: 1px solid var(--panel-edge); border-radius: 12px; padding: 3px 10px; cursor: pointer; backdrop-filter: blur(6px);
}
.btn.on { color: #1b120c; background: var(--amber); border-color: var(--amber); }
.badge { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #1b120c; background: #c9a7e8; border-radius: 10px; padding: 2px 8px; }
.badge.subtle { background: transparent; color: var(--ink-faint); border: 1px solid var(--panel-edge); }
.badge:empty { display: none; }

.footer { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; font-size: 10px; color: var(--ink-faint); letter-spacing: 0.04em; }
.footer a { color: inherit; pointer-events: auto; text-decoration: underline dotted; text-underline-offset: 2px; }
.footer a:hover { color: var(--ink, #eadcc4); }

.loading {
  position: fixed; inset: 0; display: grid; place-items: center; font-style: italic; color: var(--ink-dim);
  background: #0c0806; transition: opacity 1s ease; z-index: 5;
}
.loading.gone { opacity: 0; pointer-events: none; }

@media (max-width: 760px) {
  .bottom-right { display: none; }
  .top-right { min-width: 0; }
  .econ { grid-template-columns: 1fr; }
  .controls { top: auto; bottom: 230px; }
}

.book { margin-top: 6px; font-size: 10px; font-style: italic; color: var(--ink-faint); letter-spacing: 0.03em; }

/* ---- connection state */
.badge.conn { background: transparent; color: var(--ink-dim); border: 1px solid var(--panel-edge); animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.45; } }
body[data-feed="reconnecting"] #hud .panel { opacity: 0.78; transition: opacity 1s; }

/* ---- sale toast */
.toast {
  position: absolute; top: 50px; left: 50%; transform: translate(-50%, -6px); opacity: 0; pointer-events: none;
  background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 14px; padding: 4px 14px;
  font-size: 13px; font-style: italic; color: var(--amber); backdrop-filter: blur(6px);
}
.toast:empty { display: none; }
.toast.show { animation: toast 6s ease forwards; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -6px); } 8%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 0); } }

/* ---- Wick's work drawer */
.gallery {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 100vw); pointer-events: auto; z-index: 3;
  background: rgba(20, 13, 9, 0.86); border-left: 1px solid var(--panel-edge); backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1); box-shadow: -10px 0 40px rgba(0,0,0,0.35);
  transform: translateX(102%); transition: transform 0.45s cubic-bezier(.2,.7,.2,1), visibility 0s linear 0.45s; visibility: hidden;
  display: flex; flex-direction: column; padding: 18px 16px 12px;
}
.gallery.open { transform: none; visibility: visible; transition: transform 0.45s cubic-bezier(.2,.7,.2,1); }
.gallery header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.gallery-title { font-size: 20px; font-style: italic; color: var(--amber); }
.gallery-sub { font-size: 12px; color: var(--ink-dim); margin-top: 2px; font-style: italic; }
.gallery .close { font: inherit; font-size: 20px; line-height: 1; color: var(--ink-faint); background: none; border: 0; cursor: pointer; padding: 0 4px; }
.gallery .close:hover { color: var(--ink); }
.gallery-note { font-size: 11px; color: var(--ink-faint); margin: 10px 0 6px; padding: 6px 8px; border: 1px dashed var(--panel-edge); border-radius: 6px; }
.gallery-note:empty { display: none; }
.gallery-note b { color: var(--ink-dim); font-weight: normal; letter-spacing: 0.06em; }
.gallery-list { list-style: none; margin: 4px 0 0; padding: 0 2px 0 0; overflow-y: auto; flex: 1; }
.gallery-list .empty { font-size: 13px; font-style: italic; color: var(--ink-faint); padding: 18px 4px; }
.gallery-list .sub { margin: 14px 0 4px; }
.piece a { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px 6px; border-radius: 8px; color: inherit; text-decoration: none; border-bottom: 1px solid rgba(240,190,120,0.07); }
.piece a:hover, .piece a:focus-visible { background: rgba(240, 179, 90, 0.07); outline: none; }
.piece img { width: 96px; height: 96px; border-radius: 3px; background: #1a120c; box-shadow: 0 0 0 3px #3a2616, 0 0 0 4px #b08a4a55, 0 4px 14px rgba(0,0,0,0.5); }
.piece-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.piece-title { font-size: 14px; color: var(--ink); font-style: italic; }
.piece-price { font-family: var(--mono); font-size: 12px; color: var(--amber); white-space: nowrap; }
.piece-meta { font-size: 10px; color: var(--ink-faint); text-transform: lowercase; letter-spacing: 0.04em; margin: 1px 0 4px; }
.piece-story { font-size: 12px; color: var(--ink-dim); font-style: italic; line-height: 1.4; }
.piece-story span { display: block; }
/* round 6: series chips, gone pieces as a record, sketchbook studies (not for sale) */
.gallery-list .chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 6px; }
.gallery-list .chip { font: inherit; font-size: 11px; color: var(--ink-dim); background: transparent; border: 1px solid rgba(240,190,120,0.22); border-radius: 999px; padding: 2px 10px; cursor: pointer; text-transform: lowercase; }
.gallery-list .chip.on { color: #1a120c; background: var(--amber); border-color: var(--amber); }
.piece.sold img { opacity: 0.6; filter: saturate(0.6); }
.piece.study { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px 6px; border-bottom: 1px dashed rgba(240,190,120,0.12); }
.piece.study img { filter: grayscale(0.75) sepia(0.35); background: #efe6d4; box-shadow: 0 0 0 1px #6a5a44; }
.study-tag { font-style: italic; }
.piece-cta { display: inline-block; margin-top: 5px; font-size: 11px; color: var(--amber); letter-spacing: 0.04em; }
.piece.sold img { filter: saturate(0.6) brightness(0.8); }
.piece.sold .piece-price, .piece.sold .piece-cta { color: var(--ink-faint); }
.gallery-foot { font-size: 10px; color: var(--ink-faint); margin-top: 8px; line-height: 1.45; }
.gallery-foot a { color: var(--ink-dim); }
@media (max-width: 760px) { .gallery { width: 100vw; } }

/* ---- speech bubbles, captions, hover label (anchored to 3D points) ---- */
.bubbles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.bubble { position: absolute; left: 0; top: 0; max-width: min(280px, 72vw); padding: 7px 11px 8px; border-radius: 12px;
  background: rgba(28, 20, 14, 0.9); border: 1px solid rgba(240, 179, 90, 0.35); color: var(--ink); font-size: 13px; line-height: 1.4;
  font-style: italic; box-shadow: 0 6px 22px rgba(0,0,0,0.45); opacity: 0; transition: opacity 0.35s ease; pointer-events: auto; will-change: transform; }
.bubble.in { opacity: 1; }
.bubble.out { opacity: 0; }
.bubble::after { content: ''; position: absolute; left: calc(50% - 6px); bottom: -6px; width: 10px; height: 10px; background: inherit;
  border-right: 1px solid rgba(240, 179, 90, 0.35); border-bottom: 1px solid rgba(240, 179, 90, 0.35); transform: rotate(45deg); }
.bubble b { display: block; font-style: normal; font-size: 11px; letter-spacing: 0.04em; color: var(--amber); margin-bottom: 2px; }
.bubble a { color: var(--amber); }
.bubble.caption { background: rgba(18, 12, 8, 0.82); font-size: 12.5px; border-color: rgba(240, 179, 90, 0.25); }
.hover-label { position: absolute; left: 0; top: 0; padding: 3px 8px; border-radius: 8px; background: rgba(12, 8, 6, 0.75); color: var(--ink-dim);
  font-size: 11px; white-space: nowrap; pointer-events: none; }
.hover-label[hidden] { display: none; }

/* ---- Wick's posts panel ---- */
.tweet { padding: 12px 4px; border-bottom: 1px solid var(--panel-edge); }
.tweet p { margin: 0 0 6px; font-size: 14px; line-height: 1.45; color: var(--ink); white-space: pre-wrap; }
.tweet p a { color: var(--amber); }
.tweet .meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-faint); }
.tweet .meta a { color: var(--amber); text-decoration: none; }

@media (max-width: 760px) {
  .bubble { font-size: 12px; max-width: 66vw; }
  .bottom-left { bottom: 38px; }
  .bottom-left .needs { display: none; }
  .controls { flex-wrap: wrap; justify-content: center; width: calc(100vw - 24px); }
  .btn { padding: 7px 10px; }
}
.gallery-sub a { color: var(--amber); }

/* ---- the shop door (first visit of a session) ---- */
.door { display: none; }
html[data-door="1"] .door {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 20; cursor: pointer;
  background: radial-gradient(ellipse at 50% 38%, #2a1a0f 0%, #140c07 55%, #0a0604 100%);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
html[data-door="1"] #loading { opacity: 0; }
.door.open { opacity: 0; transform: scale(1.04); pointer-events: none; }
.door-frame {
  position: relative; width: min(340px, calc(100vw - 48px)); padding: 54px 26px 26px; text-align: center;
  border: 2px solid #4a2f1a; border-radius: 120px 120px 10px 10px; background: linear-gradient(#1c120b, #120b07);
  box-shadow: inset 0 0 0 6px #23160d, inset 0 0 0 7px #5a3a1f66, 0 30px 80px rgba(0,0,0,0.6);
}
.door-bell { position: absolute; top: -22px; left: calc(50% - 18px); width: 36px; height: 42px; overflow: visible; }
.door-bell path, .door-bell circle { fill: #c9a25a; stroke: #7a5a2a; stroke-width: 1.2; }
.door-bell .bell-arm { fill: none; stroke: #8a6a3a; stroke-width: 2; }
.door-bell .bell-body { transform-origin: 20px 10px; }
.door.ring .bell-body { animation: bell 0.9s ease-out; }
@keyframes bell { 0% { transform: rotate(0); } 15% { transform: rotate(18deg); } 35% { transform: rotate(-14deg); } 55% { transform: rotate(9deg); } 75% { transform: rotate(-4deg); } 100% { transform: rotate(0); } }
.door-frame::before { content: ''; position: absolute; left: 22px; right: 22px; top: 22px; height: 112px; border-radius: 100px 100px 4px 4px;
  border: 1px solid #5a3a1f88; background: radial-gradient(ellipse at 50% 70%, rgba(255,190,110,0.0), rgba(255,190,110,0) 70%); transition: background 1.4s ease 0.3s; pointer-events: none; }
.door.ring .door-frame::before { background: radial-gradient(ellipse at 50% 70%, rgba(255,190,110,0.22), rgba(255,170,90,0.05) 70%); }
.door-frame::after { content: ''; position: absolute; right: 30px; top: 74%; width: 8px; height: 8px; border-radius: 50%; background: #c9a25a; box-shadow: 0 0 6px rgba(240,180,90,0.5); }
.door-bulbs { position: relative; display: flex; justify-content: center; gap: 16px; margin: 4px 0 18px; }
.door-bulbs i { width: 12px; height: 12px; border-radius: 50%; background: #3a2a1e; box-shadow: none; }
.door.ring .door-bulbs i { animation: bulbOn 0.5s ease forwards; }
.door.ring .door-bulbs i:nth-child(1) { animation-delay: 0.25s; } .door.ring .door-bulbs i:nth-child(2) { animation-delay: 0.45s; }
.door.ring .door-bulbs i:nth-child(3) { animation-delay: 0.65s; } .door.ring .door-bulbs i:nth-child(4) { animation-delay: 0.85s; }
.door.ring .door-bulbs i:nth-child(5) { animation-delay: 1.05s; }
@keyframes bulbOn { 0% { background: #3a2a1e; } 30% { background: #ffd58a; box-shadow: 0 0 14px 4px rgba(255,190,100,0.7); } 45% { background: #6a4a2a; box-shadow: none; } 100% { background: #ffcf80; box-shadow: 0 0 16px 5px rgba(255,180,90,0.55); } }
.door-name { position: relative; font-size: 24px; font-style: italic; color: var(--amber); letter-spacing: 0.02em; }
.door-status { min-height: 2.8em; margin: 12px 0 16px; font-size: 15px; font-style: italic; color: var(--ink); opacity: 0; transition: opacity 0.3s ease; }
.door-status.in { opacity: 1; }
.door-in {
  font: inherit; font-size: 14px; letter-spacing: 0.08em; color: #1b120c; background: var(--amber); border: 0; border-radius: 16px;
  padding: 7px 20px; cursor: pointer; box-shadow: 0 0 18px rgba(240,179,90,0.35);
}
.door-in:focus-visible { outline: 2px solid #ffe2a8; outline-offset: 3px; }
.door-foot { margin-top: 16px; font-size: 11px; color: var(--ink-faint); }

/* ---- right now ---- */
.rightnow { top: 106px; left: 14px; width: min(300px, calc(100vw - 28px)); padding: 7px 12px 8px; }
.rn-head { all: unset; display: flex; justify-content: space-between; align-items: center; width: 100%; cursor: pointer; }
.rn-head:focus-visible { outline: 1px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
.rn-chev { color: var(--ink-faint); font-size: 11px; transition: transform 0.25s; }
.rightnow.collapsed .rn-chev { transform: rotate(-90deg); }
.rn-doing { font-size: 14px; font-style: italic; color: var(--ink); margin-top: 2px; text-transform: lowercase; }
.rn-place { display: inline-block; font-style: normal; font-size: 10px; letter-spacing: 0.06em; color: var(--amber); border: 1px solid var(--panel-edge); border-radius: 8px; padding: 0 6px; margin-left: 2px; vertical-align: 1px; }
.rn-dim { color: var(--ink-faint); font-style: normal; font-size: 11px; }
.rn-body { margin-top: 5px; display: grid; gap: 2px; font-size: 12px; color: var(--ink-dim); }
.rn-row { display: grid; grid-template-columns: 76px 1fr; gap: 6px; align-items: baseline; }
.rn-row .label { white-space: nowrap; }
.rn-row .label { padding-top: 1px; }
.rn-body a { color: var(--amber); text-decoration: none; }
.rn-body a:hover { text-decoration: underline; }
.rightnow.collapsed .rn-body { display: none; }

/* ---- diary drawer ---- */
.diary .moodarc { margin: 12px 0 4px; }
.moodarc svg { width: 100%; height: 40px; display: block; }
.moodarc .line { fill: none; stroke: var(--amber); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.moodarc .area { fill: rgba(240,179,90,0.12); }
.moodarc circle { fill: #ffd58a; }
.moodarc .flat { stroke: var(--ink-faint); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.moodarc figcaption { display: flex; justify-content: space-between; margin-top: 2px; }
.moodnow { font-size: 11px; font-style: italic; color: var(--ink-dim); }
.tabs { display: flex; gap: 4px; margin: 8px 0 6px; border-bottom: 1px solid var(--panel-edge); }
.tabs button { font: inherit; font-size: 12px; color: var(--ink-faint); background: none; border: 0; border-bottom: 2px solid transparent; padding: 6px 8px; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--amber); border-bottom-color: var(--amber); }
.tabs button:hover { color: var(--ink); }
.diary-list { list-style: none; margin: 0; padding: 0 2px 0 0; overflow-y: auto; flex: 1; }
.diary-list .empty { font-size: 13px; font-style: italic; color: var(--ink-faint); padding: 18px 4px; }
.entry { position: relative; padding: 9px 40px 9px 4px; border-bottom: 1px solid rgba(240,190,120,0.07); }
.entry p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.45; font-style: italic; color: var(--ink); }
.entry-meta { display: flex; gap: 8px; align-items: baseline; font-size: 10px; letter-spacing: 0.05em; color: var(--ink-faint); }
.entry-meta .place { color: var(--amber); text-transform: lowercase; }
.heart { position: absolute; right: 2px; top: 10px; font: inherit; font-size: 13px; color: var(--ink-faint); background: none; border: 0; cursor: pointer; padding: 2px 4px; }
.heart b { font-weight: normal; font-size: 11px; }
.heart:hover, .heart.on { color: #ff9a8a; }
.heart.pop span { display: inline-block; animation: pop 0.45s ease; }
@keyframes pop { 40% { transform: scale(1.5); } 100% { transform: scale(1); } }
.more { font: inherit; font-size: 12px; color: var(--ink-dim); background: none; border: 1px dashed var(--panel-edge); border-radius: 8px; padding: 6px; margin-top: 8px; cursor: pointer; }
.more[hidden] { display: none; }

/* ---- wants as cards ---- */
.wants { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 8px; }
.wants[hidden] { display: none; }
.want { background: rgba(255, 220, 160, 0.04); border: 1px solid var(--panel-edge); border-radius: 9px; padding: 8px 9px 7px; }
.want.goal { grid-column: 1 / -1; }
.want-head { display: flex; justify-content: space-between; gap: 6px; }
.want-title { font-size: 13px; color: var(--ink); font-style: italic; }
.want .tick { color: var(--moss); }
.want-line { font-size: 11px; color: var(--ink-dim); margin: 3px 0 6px; line-height: 1.35; }
.want-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.07); overflow: hidden; }
.want-bar i { display: block; height: 100%; background: linear-gradient(90deg, #c98a3a, var(--amber)); border-radius: 2px; }
.want.achieved { opacity: 0.75; }
.want.achieved .want-bar i { background: var(--moss); }
.want-label { margin-top: 3px; font-size: 10px; color: var(--ink-faint); letter-spacing: 0.04em; }

/* ---- a want ticked off ---- */
.tickoff { position: absolute; top: 34%; left: 50%; transform: translate(-50%, 8px); display: flex; gap: 10px; align-items: center; opacity: 0;
  background: rgba(24, 16, 10, 0.92); border: 1px solid rgba(159, 191, 122, 0.45); border-radius: 14px; padding: 10px 16px; pointer-events: none; z-index: 4; }
.tickoff[hidden] { display: none; }
.tickoff.show { animation: tickoff 5s ease forwards; }
.tickoff svg path { fill: none; stroke: var(--moss); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; }
.tickoff.show svg path { animation: draw 0.7s 0.35s ease forwards; }
.tickoff-title { font-size: 15px; font-style: italic; color: var(--ink); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes tickoff { 0% { opacity: 0; transform: translate(-50%, 8px); } 8%, 82% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -6px); } }

@media (max-width: 760px) {
  .rightnow { top: 108px; width: calc(100vw - 28px); }
  .ticker-wrap { bottom: 28px; }
  .bottom-left { bottom: 52px !important; }
  .footer { font-size: 9px; }
  .wants { grid-template-columns: 1fr; }
  .door-status { font-size: 14px; }
}

/* ---- round 2: little lights, found things, tap the glass, first-visit hint ---- */
.btn { white-space: nowrap; }
.sign-row { display: flex; align-items: center; gap: 10px; }
.lights { font-size: 11.5px; font-style: italic; color: var(--ink-dim); white-space: nowrap; }
.lights[hidden] { display: none; }
.lights::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; vertical-align: 1px;
  background: #ffd38a; box-shadow: 0 0 6px 2px rgba(255,190,100,0.55); animation: breathe 3s ease-in-out infinite; }
.btn.tapped { opacity: 0.55; cursor: default; }
.tray { top: 48px; left: 50%; transform: translateX(-50%); width: min(380px, calc(100vw - 24px)); padding: 10px 12px 8px; z-index: 6; }
.tray header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tray .close { all: unset; cursor: pointer; font-size: 18px; line-height: 1; color: var(--ink-faint); padding: 0 4px; }
.tray .close:focus-visible { outline: 1px solid var(--amber); }
.gift-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.gift { font: inherit; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 5px; cursor: pointer;
  background: rgba(255,220,170,0.04); border: 1px solid var(--panel-edge); border-radius: 9px; color: var(--ink-dim); font-size: 11px; }
.gift:hover:not(:disabled), .gift:focus-visible { background: rgba(255,200,120,0.12); border-color: rgba(240,179,90,0.5); color: var(--ink); outline: none; }
.gift:disabled { opacity: 0.45; cursor: default; }
.gift span { text-align: center; line-height: 1.15; }
.gift-status { margin: 8px 2px 2px; font-size: 12px; font-style: italic; color: var(--ink-dim); min-height: 1.3em; }
.hint { position: absolute; top: 48px; left: 50%; transform: translate(-50%, -4px); display: flex; gap: 8px; align-items: center; pointer-events: auto;
  max-width: min(520px, calc(100vw - 28px)); padding: 5px 8px 5px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--panel-edge);
  font-size: 12.5px; font-style: italic; color: var(--ink); backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.4s ease, transform 0.4s ease; }
.hint.in { opacity: 1; transform: translate(-50%, 0); }
.hint button { all: unset; cursor: pointer; color: var(--ink-faint); font-size: 16px; line-height: 1; padding: 0 4px; font-style: normal; }
.hint button:focus-visible { outline: 1px solid var(--amber); }
.tray:not([hidden]) ~ .hint { display: none; }
@media (max-width: 760px) {
  .tray { top: 50%; transform: translate(-50%, -50%); }
  .hint { top: auto; bottom: 330px; }
  .gift { padding: 8px 2px 6px; }
}
.sign-row .lights { margin-top: 6px; }

/* round 3: since you were last here · small things found */
.since { position: absolute; left: 50%; bottom: 74px; transform: translate(-50%, 6px); width: min(460px, calc(100vw - 32px)); pointer-events: auto;
  padding: 8px 12px 10px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--panel-edge); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.6s ease, transform 0.6s ease; }
.since.in { opacity: 1; transform: translate(-50%, 0); }
.since-head { display: flex; align-items: baseline; gap: 8px; }
.since-when { font-size: 11px; color: var(--ink-faint); font-style: italic; flex: 1; }
.since-head button { all: unset; cursor: pointer; color: var(--ink-faint); font-size: 16px; line-height: 1; padding: 0 2px; }
.since-head button:focus-visible { outline: 1px solid var(--amber); }
.since-text { margin: 4px 0 0; font-size: 13px; line-height: 1.45; font-style: italic; color: var(--ink); }
.found-count { position: absolute; top: 18px; right: 18px; pointer-events: none; font-size: 10.5px; font-style: italic; color: var(--ink-faint); letter-spacing: 0.03em; transition: color 1.2s ease; }
.found-count.fresh { color: var(--amber); }
@media (max-width: 760px) {
  .since { bottom: auto; top: 172px; }
  .found-count { top: 20px; right: 10px; max-width: 96px; text-align: right; font-size: 9.5px; line-height: 1.3; }
}

/* ?clip=1 (recorded clips): only the 3D scene, no HUD or overlays */
html[data-clip] body > *:not(#scene):not(#clip-lens) { display: none !important; }
/* a cheap shallow-depth feel for clips: the edges of the frame soften and darken (Wick stays sharp in the middle) */
#clip-lens { display: none; }
html[data-clip] #clip-lens { display: block; position: fixed; inset: 0; pointer-events: none;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 50%, transparent 55%, #000 100%); mask-image: radial-gradient(ellipse 62% 58% at 50% 50%, transparent 55%, #000 100%);
  box-shadow: inset 0 0 160px 40px rgba(8, 4, 2, 0.55); }

/* ---- phones: a compact HUD that keeps Wick visible. Small chips at the top, the thought as a one-line chip
   (tap to open), the buttons in a scrollable bar along the bottom, no ticker (it's all in the diary). ---- */
@media (max-width: 760px) {
  .top-left { top: 8px; left: 8px; min-width: 0; padding: 5px 9px 6px; border-radius: 9px; }
  .top-left .shop-name { font-size: 13px; margin-bottom: 0; }
  .top-left .row.small { font-size: 10.5px; }
  .sign-row { gap: 6px; }
  .sign-row .sign { font-size: 9px; padding: 0 5px; letter-spacing: 0.12em; }
  .sign-row .lights { font-size: 10px; margin-top: 3px; }
  .rightnow { top: auto; bottom: 112px; left: 8px; width: auto; max-width: calc(100vw - 16px); padding: 4px 10px 5px; border-radius: 14px; }
  .rightnow .rn-head .label { font-size: 8.5px; }
  .rightnow .rn-doing { font-size: 12px; margin-top: 0; }
  .rightnow:not(.collapsed) { max-width: calc(100vw - 16px); }
  .bottom-left { left: 8px; right: auto; bottom: 66px !important; width: auto; max-width: calc(100vw - 16px); padding: 4px 10px; border-radius: 14px; cursor: pointer; }
  .bottom-left .thought-wrap { gap: 6px; }
  .bottom-left .emotion { font-size: 10px; }
  .bottom-left .activity { display: none; }
  .bottom-left .thought { font-size: 12px; margin: 2px 0 0; min-height: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100vw - 40px); }
  .bottom-left .needs { display: none; }
  .bottom-left.open .thought { white-space: normal; }
  .bottom-left.open .needs { display: grid; margin-top: 6px; }
  .bottom-left.open .activity { display: block; }
  .ticker-wrap { display: none; }
  .controls { top: auto; bottom: 28px; left: 0; right: 0; transform: none; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; gap: 6px;
    padding: 4px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .controls::-webkit-scrollbar { display: none; }
  .controls .btn { font-size: 11px; padding: 4px 10px; flex: 0 0 auto; }
  .footer { bottom: 2px; font-size: 8.5px; }
  .hint { top: 84px; bottom: auto; font-size: 11.5px; }
  .since { top: 84px; bottom: auto; }
  .since-text { font-size: 12px; }
  .found-count { top: 12px; }
}

/* round 4: a small-life moment, one quiet line (bottom centre, above the AI footer) */
.small-toast { position: fixed; left: 50%; bottom: 58px; transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px)); padding: 6px 14px; border-radius: 14px;
  background: rgba(20, 14, 10, 0.62); color: var(--ink, #f1e4cc); font-style: italic; font-size: 13px; line-height: 1.35; text-align: center; pointer-events: none;
  opacity: 0; animation: smallIn 0.6s ease forwards; backdrop-filter: blur(3px); }
.small-toast .dot { color: #f0b860; font-style: normal; }
.small-toast.out { animation: smallOut 0.6s ease forwards; }
@keyframes smallIn { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes smallOut { from { opacity: 1; } to { opacity: 0; } }
.sign.closed.up { color: #f3c98a; text-shadow: 0 0 5px rgba(255, 190, 110, 0.45); }
@media (max-width: 760px) { .small-toast { top: 84px; bottom: auto; font-size: 12px; padding: 5px 10px; } }

/* ---- round 5: stories (diary tab), the street noticeboard, a want that came true ---- */
.diary-list.stories { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.story { background: rgba(255, 220, 160, 0.04); border: 1px solid var(--panel-edge); border-radius: 9px; padding: 9px 10px 8px; }
.story.ended { opacity: 0.86; }
.story-head { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; letter-spacing: 0.05em; color: var(--ink-faint); text-transform: lowercase; }
.story-kind { color: var(--amber); }
.story.ongoing .story-status { color: var(--moss); }
.story-title { font-size: 14.5px; font-style: italic; margin: 3px 0 5px; color: var(--ink); }
.story-steps { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 1px solid rgba(240, 179, 90, 0.28); }
.story-steps li { position: relative; padding: 2px 0 5px 4px; font-size: 12.5px; line-height: 1.4; color: var(--ink-dim); }
.story-steps li::before { content: ''; position: absolute; left: -16px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: #5a4630; }
.story-steps li.last::before { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.story.ended .story-steps li.last::before { background: var(--ink-faint); box-shadow: none; }
.story-steps .when { display: block; font-size: 9.5px; color: var(--ink-faint); letter-spacing: 0.04em; }
.story-link { display: inline-block; margin-top: 3px; font-size: 11px; color: var(--amber); text-decoration: none; }
.story-link:hover { text-decoration: underline; }
.board-panel { position: absolute; top: 52px; right: 16px; width: min(400px, calc(100vw - 24px)); max-height: calc(100vh - 130px); overflow-y: auto;
  background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--panel-edge); border-radius: 12px; padding: 12px 14px 10px; z-index: 7; pointer-events: auto; }
.board-panel[hidden] { display: none; }
.board-panel header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.board-panel .close { font: inherit; font-size: 20px; line-height: 1; color: var(--ink-faint); background: none; border: 0; cursor: pointer; padding: 0 4px; }
.board-sec { border-top: 1px solid rgba(240,190,120,0.08); padding: 7px 0 4px; }
.board-sec h4 { margin: 0 0 2px; font-size: 10px; font-weight: normal; letter-spacing: 0.08em; text-transform: lowercase; color: var(--amber); }
.board-sec p { margin: 2px 0; font-size: 13px; line-height: 1.42; color: var(--ink); font-style: italic; }
.board-sub, .board-note { font-size: 11.5px !important; color: var(--ink-faint) !important; }
.vote-q { font-size: 14.5px !important; }
.vote-list { list-style: none; margin: 6px 0 4px; padding: 0; display: grid; gap: 6px; }
.vote-opt { width: 100%; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 3px 8px; text-align: left; font: inherit; font-size: 13px; color: var(--ink);
  background: rgba(255, 220, 160, 0.05); border: 1px solid var(--panel-edge); border-radius: 8px; padding: 7px 9px; cursor: pointer; }
.vote-opt:hover:not([disabled]) { background: rgba(240, 179, 90, 0.12); border-color: var(--amber); }
.vote-opt[disabled] { cursor: default; }
.vote-opt.mine { border-color: var(--amber); }
.vote-bar { grid-column: 1; height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.vote-bar i { display: block; height: 100%; background: var(--amber); }
.vote-n { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
.want-moment { position: fixed; left: 50%; top: 22%; transform: translate(-50%, 0); max-width: min(460px, calc(100vw - 32px)); text-align: center; pointer-events: none; z-index: 8;
  background: var(--panel); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--amber); border-radius: 12px; padding: 10px 16px; opacity: 0; transition: opacity 0.8s; }
.want-moment.show { opacity: 1; }
.want-moment .wm-title { font-size: 11px; letter-spacing: 0.08em; color: var(--amber); }
.want-moment .wm-line { font-size: 14px; font-style: italic; margin-top: 3px; }
@media (max-width: 760px) { .board-panel { top: 76px; right: 12px; max-height: calc(100vh - 170px); } .want-moment { top: 16%; } }

/* ---- round 7: the minimap (shop + street) ---- */
.minimap { position: absolute; top: 40px; right: 14px; margin: 0; width: 150px; pointer-events: auto; background: rgba(14, 10, 8, 0.62); border: 1px solid rgba(232, 200, 140, 0.18); border-radius: 10px; padding: 6px 6px 4px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); transition: border-color 0.8s ease; }
.minimap canvas { display: block; width: 100%; height: 96px; border-radius: 6px; cursor: pointer; }
.minimap .mm-where { font-size: 10.5px; font-style: italic; color: var(--ink-faint); margin-top: 3px; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.minimap.out { border-color: rgba(255, 170, 90, 0.5); }
.minimap.out .mm-where { color: var(--amber); }
body[data-clip] .minimap { display: none; }
@media (max-width: 760px) {
  .minimap { top: 132px; right: 10px; width: 96px; padding: 4px 4px 3px; border-radius: 8px; }
  .minimap canvas { height: 60px; }
  .minimap .mm-where { font-size: 9px; }
}

/* ---- round 8: a first-time visitor's view. Fewer, grouped controls; quieter panels; one type scale ----
   type scale: 10px labels (caps, tracked) · 11.5px controls/meta · 13px body · 15px thought/lead (serif italic) */
:root { --panel: rgba(20, 14, 9, 0.46); --gap: 14px; }
.panel { border-radius: 10px; }
.label { font-size: 10px; letter-spacing: 0.12em; }
.controls { gap: 8px; z-index: 8; }
.btn { font-size: 11.5px; letter-spacing: 0.05em; padding: 4px 11px; border-radius: 13px; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.btn:hover:not(.on) { color: var(--ink); border-color: rgba(240, 179, 90, 0.42); }
.btn:focus-visible { outline: 1px solid var(--amber); outline-offset: 2px; }
/* the three camera views as one segmented control */
.seg { display: inline-flex; border: 1px solid var(--panel-edge); border-radius: 13px; background: var(--panel); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); padding: 1px; }
.seg .btn { border: 0; background: transparent; backdrop-filter: none; border-radius: 12px; padding: 3px 11px; }
.seg .btn.on { background: var(--amber); color: #1b120c; }
/* "more" menu */
.more-wrap { position: relative; }
.btn.open { color: var(--ink); border-color: rgba(240, 179, 90, 0.5); }
.more-menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 236px; padding: 5px; display: grid; gap: 2px; z-index: 9; }
.more-menu .btn { display: grid; text-align: left; border: 0; background: transparent; backdrop-filter: none; border-radius: 7px; padding: 6px 9px; color: var(--ink); font-size: 12.5px; letter-spacing: 0.02em; white-space: normal; }
.more-menu .btn small { font-size: 10.5px; color: var(--ink-faint); font-style: italic; letter-spacing: 0; margin-top: 1px; }
.more-menu .btn:hover:not(.tapped), .more-menu .btn:focus-visible { background: rgba(240, 179, 90, 0.12); outline: none; }
.more-menu .btn.on { background: rgba(240, 179, 90, 0.18); color: var(--amber); }
/* "what he just did": folded to the latest move, plain serif (no monospace ids) */
.bottom-right { width: min(290px, calc(100vw - 28px)); padding: 8px 12px; }
.moves-head { all: unset; display: flex; justify-content: space-between; align-items: center; width: 100%; cursor: pointer; }
.moves-head:focus-visible { outline: 1px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
#moves-panel.collapsed .rn-chev { transform: rotate(-90deg); }
.moves li { display: block; font-size: 12px; line-height: 1.4; margin: 4px 0 0; color: var(--ink-dim); }
.moves li .what { color: var(--amber); font-style: italic; }
.moves li.no .what { color: var(--rose); }
.moves li span.reason { display: block; font-size: 11.5px; color: var(--ink-faint); font-style: italic; margin-top: 1px; }
#moves-panel.collapsed .moves li:not(:first-child) { display: none; }
#moves-panel.collapsed .moves li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#moves-panel.collapsed .moves li div { overflow: hidden; text-overflow: ellipsis; }
#moves-panel.collapsed .moves li .reason { display: none; }
/* the needs bars and the thought: one rhythm with the rest */
.bottom-left { padding: 9px 12px 10px; }
.thought { font-size: 15px; line-height: 1.38; }
.needs { gap: 5px 12px; }
.need { font-size: 10px; letter-spacing: 0.02em; }
/* asleep: when he'll be up again, under what he's doing */
.rn-wake { display: block; margin-top: 2px; font-size: 11.5px; font-style: italic; color: #b9b2d8; letter-spacing: 0.01em; }
.rn-wake::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; vertical-align: 1px; background: #a9a2c8; animation: breathe 4.2s ease-in-out infinite; }
/* the first ten seconds: what this is, why stay */
.hint.welcome { top: 50px; align-items: flex-start; gap: 14px; max-width: min(470px, calc(100vw - 28px)); padding: 11px 12px 11px 16px; border-radius: 12px; font-style: normal; }
.welcome-text p { margin: 0 0 5px; font-size: 13px; line-height: 1.42; color: var(--ink-dim); font-style: italic; }
.welcome-text p:last-child { margin-bottom: 0; }
.welcome-text .welcome-lead { font-size: 15px; color: var(--ink); }
.welcome-text .welcome-you { color: var(--amber); }
.hint.welcome button { font: inherit; font-size: 11.5px; letter-spacing: 0.05em; color: #1b120c; background: var(--amber); border-radius: 12px; padding: 3px 11px; flex: 0 0 auto; margin-top: 1px; white-space: nowrap; }
.door-foot { max-width: 260px; margin-left: auto; margin-right: auto; }
@media (max-width: 760px) {
  .controls { justify-content: center; gap: 5px; overflow: visible; padding: 4px 6px; }
  .controls .btn { font-size: 11px; padding: 5px 9px; }
  .seg .btn { padding: 4px 8px; }
  .more-menu { top: auto; bottom: calc(100% + 8px); right: 0; min-width: 228px; }
  .more-menu .btn { font-size: 12.5px; padding: 8px 10px; }
  .hint.welcome { top: 76px; bottom: auto; padding: 9px 10px 9px 12px; gap: 10px; }
  .welcome-text p { font-size: 12px; }
  .welcome-text .welcome-lead { font-size: 13.5px; }
  .rn-wake { font-size: 10.5px; }
}
.more-menu { background: rgba(20, 14, 9, 0.9); }
@media (max-width: 760px) {
  .hint.welcome { flex-direction: column; align-items: stretch; width: calc(100vw - 24px); }
  .hint.welcome button { align-self: flex-end; }
}
.hint.welcome { z-index: 12; background: rgba(20, 14, 9, 0.82); }
/* round 9: the welcome card sits above everything in the HUD, and the minimap steps aside while it is open */
body.welcome-open .minimap { opacity: 0; visibility: hidden; pointer-events: none; }
.minimap { transition: border-color 0.8s ease, opacity 0.4s ease; }
@media (max-width: 760px) { .hint.welcome { background: rgba(20, 14, 9, 0.95); } }

/* ---- round 11: sound toggle, the "more" dot, today in the shop, phone tap targets ---- */
.btn.icon { display: inline-flex; align-items: center; justify-content: center; padding: 4px 9px; }
.btn.icon svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.btn.icon svg .spk { fill: currentColor; stroke: none; opacity: 0.85; }
.btn.icon .wave { display: none; }
.btn.icon.on .wave { display: inline; }
.btn.icon.on .mute { display: none; }
.btn.icon.on { color: #1b120c; }
#btn-more { position: relative; }
#btn-more .new-dot { display: none; position: absolute; top: 2px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 6px rgba(240, 179, 90, 0.8); animation: breathe 3.2s ease-in-out infinite; }
#btn-more.fresh .new-dot { display: block; }
.welcome-text .welcome-more { font-size: 12px; color: var(--ink-faint); }
.welcome-text .welcome-more b { color: var(--ink-dim); font-weight: 600; font-style: normal; }
.rn-today { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--panel-edge); }
.rn-today ol { list-style: none; margin: 3px 0 0; padding: 0; display: grid; gap: 3px; }
.rn-today li { font-size: 12px; line-height: 1.35; color: var(--ink-dim); font-style: italic; }
.rn-today li .rn-dim { font-size: 10.5px; margin-right: 3px; }
@media (max-width: 760px) {
  /* tap targets: every control at least 44 px tall (the hit area; the pill itself stays slim) */
  .controls { gap: 4px; padding: 0 6px; }
  .controls .btn, .seg .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; font-size: 11.5px; }
  .seg { padding: 0; }
  .controls .btn.icon { min-width: 44px; padding: 0; }
  .more-menu .btn { min-height: 44px; }
  .rn-head, .moves-head { min-height: 32px; }
  .rn-today li { font-size: 11.5px; }
  .close { min-width: 44px; min-height: 44px; }
}
@media (max-width: 760px) {
  .ph-hide { display: none; }
  /* the sound toggle sits top-right on phones, clear of the bar */
  #btn-sound { position: fixed; top: 10px; right: 8px; z-index: 8; }
  .controls { bottom: 30px; }
  .bottom-left { bottom: 80px !important; }
  .rightnow { bottom: 140px; }
  .rightnow .rn-head { min-height: 44px; margin: -10px 0 -8px; }
  /* readable type: nothing under 10 px */
  .sign-row .sign, .rightnow .rn-head .label, .minimap .mm-where, .mm-where { font-size: 10px; }
  .footer { font-size: 9.5px; line-height: 1.3; }
  .footer a { font-size: inherit; }
}
@media (max-width: 760px) { .seg .btn { min-width: 44px; } }
@media (max-width: 380px) {
  /* narrow Android phones: the AI footer takes three lines */
  .controls { bottom: 40px; }
  .bottom-left { bottom: 90px !important; }
  .rightnow { bottom: 150px; }
}

/* round 12: when the shop opens, beside the sign */
.sign-row .hours { margin-top: 6px; font-size: 11.5px; font-style: italic; color: var(--ink-dim); white-space: nowrap; }
.sign-row .hours[hidden] { display: none; }
@media (max-width: 760px) { .sign-row .hours { font-size: 11px; margin-top: 3px; } }
