@font-face { font-family: Caprasimo; src: url(fonts/Caprasimo.ttf) format('truetype'); font-display: swap; }
@font-face { font-family: Lilita; src: url(fonts/LilitaOne.ttf) format('truetype'); font-display: swap; }
@font-face { font-family: DM; src: url(fonts/DMSans-400.ttf) format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: DM; src: url(fonts/DMSans-700.ttf) format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --cream: #fff4dc;
  --paper: #f6ecdb;
  --card: rgba(255, 245, 224, .9);
  --ink: #382216;
  --ink-2: #6f5741;
  --muted: #957c60;
  --line: #e2d0b0;
  --red: #b83f29;
  --red-2: #963821;
  --moss: #536247;
  --gold: #e0a832;
  --ball: #cfe03a;
  --shadow: 0 10px 34px rgba(46, 26, 12, .22), 0 2px 6px rgba(46, 26, 12, .12);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --pad: clamp(16px, 2.6vw, 38px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #2a1a10; color: var(--ink); }
body { font-family: DM, ui-rounded, system-ui, sans-serif; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
svg { width: 22px; height: 22px; display: block; flex-shrink: 0; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }
.eyebrow { margin: 0; font-size: 10px; font-weight: 700; letter-spacing: .22em; }

/* ---- the world ------------------------------------------------------------------------ */
#world { position: fixed; inset: 0; overflow: hidden; background: #3a2616; touch-action: none; }
#plate { position: absolute; left: 0; top: 0; width: 1586px; height: 992px; transform-origin: 0 0; user-select: none; -webkit-user-select: none; pointer-events: none;
  transition: filter .9s var(--ease); }
#life-back, #life-front, #stage, #veil { position: absolute; inset: 0; width: 100%; height: 100%; }
#life-back { pointer-events: none; transition: filter .9s var(--ease); }
#life-front { pointer-events: none; }
#stage canvas { display: block; width: 100%; height: 100%; }
#veil { pointer-events: none; opacity: 0; transition: opacity .9s var(--ease);
  background:
    radial-gradient(ellipse 34% 48% at var(--sx, 38%) var(--sy, 54%), rgba(255, 214, 150, .28), rgba(255, 214, 150, 0) 70%),
    radial-gradient(ellipse 80% 80% at var(--sx, 38%) var(--sy, 54%), rgba(20, 10, 4, 0) 35%, rgba(20, 10, 4, .4) 100%); }
body.wardrobe #plate, body.wardrobe #life-back { filter: blur(6px) saturate(.95) brightness(.9); }
body.wardrobe #veil { opacity: 1; }
body.grabbing, body.grabbing * { cursor: grabbing !important; }
body.pointing #world { cursor: pointer; }
body.over-doge #world { cursor: grab; }

/* ---- header --------------------------------------------------------------------------- */
.bar { position: fixed; top: 14px; left: var(--pad); right: var(--pad); height: 58px; z-index: 20; display: flex; align-items: center; gap: 18px;
  padding: 0 10px 0 20px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  transition: transform .7s var(--ease), opacity .7s; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-family: Caprasimo, Georgia, serif; font-size: 25px; letter-spacing: -.02em; white-space: nowrap; }
.brand svg { width: 34px; height: 18px; color: var(--ink); }
.nav { display: flex; gap: 6px; margin: 0 auto; }
.nav button { position: relative; padding: 10px 16px; border-radius: 12px; font-weight: 700; font-size: 14px; color: var(--ink-2); white-space: nowrap; transition: background .2s, color .2s; }
/* narrower screens: drop the "The", then the map link (the map button does that job) */
@media (max-width: 1120px) { .nav .the { display: none; } .nav button { padding: 10px 12px; } .nav button.active::after, body.on-map .nav button[data-go="map"]::after { left: 12px !important; right: 12px !important; } }
@media (max-width: 900px) { .nav button[data-go="map"] { display: none; } }
.nav button:hover { background: rgba(56, 34, 22, .06); color: var(--ink); }
.nav button.active { color: var(--ink); }
.nav a.nav-link { position: relative; padding: 10px 16px; border-radius: 12px; font-weight: 700; font-size: 14px; color: var(--ink-2); white-space: nowrap; text-decoration: none; transition: background .2s, color .2s; }
.nav a.nav-link:hover { background: rgba(56, 34, 22, .06); color: var(--ink); }
.nav button.active::after { content: ''; position: absolute; left: 16px; right: 16px; bottom: 4px; height: 3px; border-radius: 3px; background: var(--red); }
.nav button em { font-style: normal; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-left: 4px; vertical-align: 2px; }
.nav .soon { cursor: default; }
.bar-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--ink); transition: background .2s, transform .2s var(--spring); }
.icon-btn:hover { background: rgba(56, 34, 22, .07); }
.icon-btn:active { transform: scale(.92); }
.pill-btn { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; background: var(--ink); color: var(--cream); font-weight: 700; font-size: 13px; transition: background .2s, transform .2s var(--spring); }
.pill-btn svg { width: 18px; height: 18px; }
.pill-btn:hover { background: #4b3021; }
.pill-btn:active { transform: scale(.96); }

.quest-chip { display: none; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 9px; border-radius: 999px; background: #f1e3c9; font-weight: 700; font-size: 13px; color: var(--ink); }
.quest-chip svg { width: 18px; height: 18px; color: #b9c92a; }
.quest-chip.done { background: var(--red); color: var(--cream); }

/* ---- hangout -------------------------------------------------------------------------- */
.hero { position: fixed; left: var(--pad); top: 104px; z-index: 5; color: var(--cream); pointer-events: none; text-shadow: 0 2px 24px rgba(30, 16, 6, .55);
  transition: opacity .6s var(--ease), transform .8s var(--ease); }
.hero .eyebrow { letter-spacing: .3em; margin-bottom: 12px; }
.hero h1 { margin: 0 0 14px; font-family: Lilita, Caprasimo, sans-serif; font-weight: 400; font-size: clamp(40px, 5vw, 76px); line-height: .92; text-transform: uppercase; letter-spacing: -.01em; }
.hero .lede { margin: 0; max-width: 270px; font-size: 13.5px; line-height: 1.55; font-weight: 700; }

.card { position: fixed; z-index: 12; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); backdrop-filter: blur(14px) saturate(1.15); -webkit-backdrop-filter: blur(14px) saturate(1.15);
  border: 1px solid rgba(255, 250, 238, .7); transition: opacity .6s var(--ease), transform .7s var(--ease); }
.who { left: var(--pad); bottom: var(--pad); width: 300px; padding: 16px 16px 14px; }
.who .eyebrow { color: var(--muted); margin-bottom: 10px; }
.who-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.who-face { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: radial-gradient(circle at 50% 40%, #fdf4e3, #ead6b3); border: 2px solid #fff6e6; box-shadow: 0 2px 8px rgba(56, 34, 22, .15); }
.who-text strong { display: block; font-size: 16px; letter-spacing: -.01em; }
.who-text span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.og-form { display: flex; align-items: center; height: 42px; border-radius: 12px; background: #f1e3c9; padding: 0 4px 0 12px; border: 1px solid transparent; transition: border-color .2s, background .2s; }
.og-form:focus-within { border-color: var(--gold); background: #fff8ea; }
.og-form .hash { font-weight: 700; color: var(--muted); margin-right: 4px; }
.og-form input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-weight: 700; font-size: 14px; }
.og-form input::placeholder { color: #a78d70; font-weight: 400; }
.og-form button { width: 34px; height: 34px; border-radius: 9px; background: var(--ink); color: var(--cream); display: grid; place-items: center; }
.og-form button svg { width: 17px; height: 17px; }
.og-form.shake { animation: shake .4s; }

.quest { right: var(--pad); bottom: var(--pad); width: 300px; padding: 18px; }
.quest-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.quest-top .eyebrow { font-size: 9px; color: var(--muted); }
.balls { display: flex; gap: 5px; }
.balls i { width: 13px; height: 13px; border-radius: 50%; background: #e6d8bd; box-shadow: inset 0 1px 2px rgba(56, 34, 22, .2); transition: background .3s, transform .4s var(--spring); }
.balls i.on { background: radial-gradient(circle at 35% 30%, #f4fb8a, #c5d62e 60%, #8a9a14); transform: scale(1.15); box-shadow: 0 0 0 2px #fff6d6; }
.quest-main { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.quest-main h2 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.02em; }
.quest-main p { margin: 0; font-size: 12px; line-height: 1.5; color: var(--ink-2); }
.patch { width: 62px; height: 72px; flex-shrink: 0; border-radius: 26px 26px 18px 18px; background: #be4b2d; color: #fff1cf; display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 3px 0 #6c2e20, inset 0 0 0 4px #a03b22, inset 0 0 0 5px #efad6b; border: 2px solid #ffe0b4; transform: rotate(-7deg);
  background-image: repeating-linear-gradient(30deg, #ffffff0b 0 1px, transparent 1px 3px); transition: filter .5s; }
.patch svg { width: 34px; height: 18px; }
.patch span { font-size: 6px; letter-spacing: .1em; font-weight: 700; margin-top: 5px; }
.quest:not(.done) .patch { filter: saturate(.35) brightness(1.05); }
.quest.done .patch { animation: patch-in .8s var(--spring); }
.primary { width: 100%; height: 46px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 13px; background: var(--red); color: var(--cream); font-weight: 700; font-size: 14px;
  box-shadow: 0 3px 0 #7d2a1a; transition: background .2s, transform .15s; }
.primary svg { width: 20px; height: 20px; }
.primary:hover { background: var(--red-2); }
.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 #7d2a1a; }

.cta { position: fixed; left: 50%; bottom: calc(var(--pad) + 4px); z-index: 12; transform: translateX(-50%); height: 58px; padding: 0 30px 0 24px; border-radius: 999px;
  display: flex; align-items: center; gap: 12px; background: var(--red); color: var(--cream); font-weight: 700; font-size: 16px; letter-spacing: .01em;
  box-shadow: 0 4px 0 #7d2a1a, 0 14px 40px rgba(60, 20, 8, .35); transition: background .2s, transform .5s var(--ease), opacity .5s; }
.cta svg { width: 24px; height: 24px; }
.cta:hover { background: var(--red-2); }
.cta:active { transform: translate(-50%, 3px); box-shadow: 0 1px 0 #7d2a1a; }

/* Hotspots: a dot that breathes; a label that says one dry thing. */
#hotspots { position: fixed; inset: 0; z-index: 8; pointer-events: none; transition: opacity .5s; }
.spot { position: absolute; left: 0; top: 0; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; pointer-events: auto; display: grid; place-items: center; }
.spot::before { content: ''; width: 11px; height: 11px; border-radius: 50%; background: #fff6e2; box-shadow: 0 1px 6px rgba(40, 20, 6, .45); transition: transform .25s var(--spring); }
.spot::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; border: 2px solid rgba(255, 246, 226, .9); animation: breathe 2.6s ease-out infinite; }
.spot:hover::before, .spot.on::before { transform: scale(1.35); }
.spot.seen::after { animation: none; opacity: 0; }
.label { position: fixed; left: 0; top: 0; z-index: 30; pointer-events: none; padding: 10px 14px 11px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); max-width: 260px; animation: pop .22s var(--spring); }
.label b { display: block; font-size: 13.5px; letter-spacing: -.01em; }
.label span { display: block; font-size: 12px; color: var(--ink-2); line-height: 1.45; margin-top: 2px; }
.label i { display: inline-block; margin-top: 6px; font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }

.bubble { position: fixed; left: 0; top: 0; z-index: 25; pointer-events: none; transform-origin: 20% 100%; padding: 11px 16px 12px; border-radius: 18px; background: #fffaf0; color: var(--ink);
  font-weight: 700; font-size: 15px; line-height: 1.35; letter-spacing: -.005em; max-width: 250px; box-shadow: 0 8px 26px rgba(46, 26, 12, .28); }
.bubble::after { content: ''; position: absolute; left: 22px; bottom: -8px; width: 16px; height: 16px; background: #fffaf0; transform: rotate(45deg); border-radius: 0 0 4px 0; }
.bubble.in { animation: bubble-in .38s var(--spring) both; }
.bubble.out { animation: bubble-out .3s var(--ease) both; }

/* ---- the locker ----------------------------------------------------------------------- */
.locker-title { position: fixed; left: var(--pad); top: 104px; z-index: 6; color: var(--cream); pointer-events: none; opacity: 0; transform: translateY(12px);
  transition: opacity .6s var(--ease), transform .8s var(--ease); text-shadow: 0 2px 20px rgba(20, 10, 4, .6); }
.locker-title .eyebrow { letter-spacing: .3em; margin-bottom: 10px; }
.locker-title h2 { margin: 0; font-family: Lilita, sans-serif; font-weight: 400; text-transform: uppercase; font-size: clamp(34px, 3.6vw, 56px); line-height: .94; }
.locker { position: fixed; top: 86px; right: var(--pad); bottom: var(--pad); width: min(430px, 36vw); z-index: 15; display: flex; flex-direction: column; border-radius: 24px; background: var(--card);
  box-shadow: var(--shadow); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); border: 1px solid rgba(255, 250, 238, .7);
  opacity: 0; transform: translateX(40px); pointer-events: none; transition: opacity .5s var(--ease), transform .7s var(--ease); overflow: hidden; }
.locker-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 18px 8px 22px; }
.locker-head .eyebrow { color: var(--muted); }
.locker-head h2 { margin: 6px 0 0; font-family: Caprasimo, serif; font-weight: 400; font-size: 30px; letter-spacing: -.02em; }
.tabs { display: flex; gap: 2px; overflow-x: auto; padding: 8px 14px 12px 16px; scrollbar-width: none; flex-shrink: 0; justify-content: space-between; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; width: 47px; padding: 6px 0; border-radius: 13px; font-size: 10.5px; font-weight: 700; color: var(--ink-2); transition: background .2s, color .2s, transform .2s var(--spring); position: relative; }
.tab img { width: 38px; height: 38px; object-fit: contain; border-radius: 11px; background: radial-gradient(circle at 50% 40%, #fdf4e3, #ead6b3); transition: transform .25s var(--spring); }
.tab:hover { background: rgba(56, 34, 22, .05); }
.tab:hover img { transform: translateY(-2px) rotate(-3deg); }
.tab[aria-selected=true] { background: #fff9ee; color: var(--ink); box-shadow: 0 2px 10px rgba(56, 34, 22, .12); }
.tab[aria-selected=true] img { box-shadow: 0 0 0 2px var(--red); }
.tab.locked { opacity: .72; }
.tab.locked img { filter: grayscale(.7); }
.tab .soon { position: absolute; top: 2px; right: 0; width: 17px; height: 17px; border-radius: 50%; background: var(--ink); color: var(--cream); display: grid; place-items: center; }
.tab .soon svg { width: 11px; height: 11px; }
.tab-note { margin: 0 22px 8px; font-size: 12px; color: var(--muted); line-height: 1.45; min-height: 17px; }
.grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 4px 18px 18px 22px; align-content: start; scrollbar-width: thin; }
.item { position: relative; display: flex; flex-direction: column; align-items: stretch; text-align: left; border-radius: 16px; background: #fbf3e4; border: 2px solid transparent; padding: 6px 6px 9px;
  transition: transform .25s var(--spring), border-color .2s, box-shadow .2s, background .2s; }
.item:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(56, 34, 22, .14); background: #fffaf1; }
.item:active { transform: scale(.97); }
.item[aria-selected=true] { border-color: var(--red); background: #fffaf1; }
.item[aria-selected=true]::after { content: '✓'; position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--red); color: var(--cream); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.item .pic { aspect-ratio: 1; border-radius: 11px; background: radial-gradient(circle at 50% 40%, #fdf4e3 0%, #f3e3c6 60%, #e8d3ae 100%); overflow: hidden; display: grid; place-items: center; }
.item .pic img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s var(--spring); }
[data-kind=product] .item .pic img { width: 90%; height: 90%; filter: drop-shadow(0 6px 7px rgba(56, 34, 22, .24)); }
[data-kind=product] .item:hover .pic img { transform: translateY(-3px) rotate(-4deg) scale(1.04); }
[data-kind=face] .item:hover .pic img { transform: scale(1.06); }
.item .pic .none { font-family: Caprasimo, serif; font-size: 13px; color: var(--muted); }
.item b { margin: 7px 3px 1px; font-size: 12px; line-height: 1.2; letter-spacing: -.005em; }
.item small { margin: 0 3px; font-size: 10.5px; color: var(--muted); }
.item.loading .pic::before { content: ''; position: absolute; inset: 6px 6px auto; aspect-ratio: 1; border-radius: 11px; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .6) 50%, transparent 70%); background-size: 200% 100%; animation: shimmer 1s linear infinite; }
.item.locked { cursor: help; }
.item.locked .pic img { filter: grayscale(1) brightness(.75) contrast(.8); }
.item.locked .pic::after { content: ''; position: absolute; }
.item .lock { position: absolute; top: 12px; left: 12px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--cream); display: grid; place-items: center; }
.item .lock svg { width: 13px; height: 13px; }
.rare { color: var(--red) !important; font-weight: 700; }
.og-form.wide { margin: 0 18px 18px 22px; flex-shrink: 0; }

.dock { position: fixed; z-index: 14; left: calc((100vw - min(430px, 36vw) - var(--pad)) / 2); bottom: var(--pad); transform: translate(-50%, 16px); display: flex; gap: 8px; padding: 8px;
  border-radius: 20px; background: var(--card); box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); opacity: 0; pointer-events: none;
  transition: opacity .5s var(--ease), transform .7s var(--ease); }
.dock-btn { height: 44px; padding: 0 15px 0 12px; display: flex; align-items: center; gap: 8px; border-radius: 13px; font-weight: 700; font-size: 13px; white-space: nowrap; transition: background .2s, transform .15s var(--spring); }
.dock-btn:hover { background: rgba(56, 34, 22, .07); }
.dock-btn:active { transform: scale(.95); }
.dock-btn svg { width: 20px; height: 20px; }
.dock-btn.strong { background: var(--red); color: var(--cream); box-shadow: 0 2px 0 #7d2a1a; }
.dock-btn.strong:hover { background: var(--red-2); }
.turn-hint { position: fixed; z-index: 13; left: calc((100vw - min(430px, 36vw) - var(--pad)) / 2); bottom: calc(var(--pad) + 76px); transform: translateX(-50%); margin: 0; display: flex; align-items: center; gap: 8px;
  color: var(--cream); font-size: 12px; font-weight: 700; text-shadow: 0 1px 8px rgba(20, 10, 4, .7); opacity: 0; pointer-events: none; transition: opacity .6s .4s; }
.turn-hint svg { width: 22px; height: 22px; }
.fit-card { position: fixed; z-index: 13; left: var(--pad); top: 236px; max-width: 210px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; opacity: 0; pointer-events: none; transition: opacity .5s; }
.fit-card .chip { padding: 6px 10px; border-radius: 999px; background: rgba(255, 245, 224, .88); font-size: 11px; font-weight: 700; color: var(--ink-2); box-shadow: 0 2px 8px rgba(30, 16, 6, .2); animation: pop .3s var(--spring) both; }
.fit-card .chip b { color: var(--ink); }
.fit-card .who-tag { font-family: Caprasimo, serif; font-size: 22px; color: var(--cream); text-shadow: 0 2px 12px rgba(20, 10, 4, .7); margin-bottom: 2px; }
.fit-card .who-tag small { display: block; font-family: DM, sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .2em; opacity: .8; margin-bottom: 4px; }

body.wardrobe .hero, body.wardrobe .who, body.wardrobe .quest, body.wardrobe .cta, body.wardrobe #hotspots { opacity: 0; pointer-events: none; }
body.wardrobe .spot { pointer-events: none; }
body.wardrobe .hero { transform: translateY(-14px); }
body.wardrobe .who { transform: translateX(-20px); }
body.wardrobe .quest { transform: translateX(20px); }
body.wardrobe .cta { transform: translate(-50%, 20px); }
body.wardrobe .locker { opacity: 1; transform: none; pointer-events: auto; }
body.wardrobe .locker-title { opacity: 1; transform: none; }
body.wardrobe .dock { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
body.wardrobe .turn-hint, body.wardrobe .fit-card { opacity: 1; }
body.wardrobe .fit-card { pointer-events: none; }

.toast { position: fixed; z-index: 40; left: 50%; top: 88px; transform: translateX(-50%); padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--cream); font-weight: 700; font-size: 13px;
  box-shadow: var(--shadow); animation: toast-in .35s var(--spring); max-width: calc(100vw - 32px); text-align: center; }

.modal { border: 0; padding: 30px 30px 26px; width: min(420px, calc(100vw - 32px)); border-radius: 26px; background: #fff7e8; color: var(--ink); box-shadow: 0 30px 90px rgba(30, 14, 4, .45); text-align: center; }
.modal::backdrop { background: rgba(30, 16, 6, .45); backdrop-filter: blur(3px); }
.modal[open] { animation: modal-in .45s var(--spring); }
.modal-x { position: absolute; top: 12px; right: 12px; }
.modal h2 { font-family: Caprasimo, serif; font-weight: 400; font-size: 30px; letter-spacing: -.02em; margin: 14px 0 10px; }
.modal p { font-size: 14px; line-height: 1.6; color: var(--ink-2); margin: 0 auto 18px; max-width: 320px; }
.modal .patch { margin: 6px auto 8px; width: 108px; height: 124px; border-radius: 42px 42px 30px 30px; }
.modal .patch svg { width: 58px; height: 30px; }
.modal .patch span { font-size: 10px; }
.modal .primary { margin-top: 6px; text-decoration: none; }
.modal .fine { font-size: 11px; color: var(--muted); margin: 12px 0 0; }
.modal .shot { width: 100%; border-radius: 16px; margin: 4px 0 14px; box-shadow: 0 8px 24px rgba(40, 20, 8, .25); }
.modal .row { display: flex; gap: 10px; }
.modal .row .primary { flex: 1; }
.ghost { height: 46px; flex: 1; border-radius: 13px; background: #efe1c6; font-weight: 700; font-size: 14px; }

/* ---- loader --------------------------------------------------------------------------- */
.loader { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--paper);
  transition: opacity .9s var(--ease), visibility .9s; }
.loader-mark { width: 92px; height: 92px; border-radius: 30px; background: var(--red); color: var(--cream); display: grid; place-items: center; box-shadow: 0 5px 0 #7d2a1a, 0 20px 50px rgba(120, 50, 20, .25); animation: wag 1.1s ease-in-out infinite; }
.loader-mark svg { width: 56px; height: 28px; }
.loader-word { font-family: Caprasimo, serif; font-size: 34px; margin: 10px 0 6px; letter-spacing: -.02em; }
.loader-bar { width: 180px; height: 5px; border-radius: 5px; background: #e8d8ba; overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--red); border-radius: 5px; transition: width .5s var(--ease); }
.loader-line { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); min-height: 20px; }
body:not(.loading) .loader { opacity: 0; visibility: hidden; pointer-events: none; }
body.loading .bar { transform: translateY(-90px); }
body.loading .hero, body.loading .card, body.loading .cta { opacity: 0; }
#fatal { position: fixed; z-index: 200; left: 16px; right: 16px; bottom: 16px; padding: 14px 18px; border-radius: 14px; background: var(--cream); box-shadow: var(--shadow); font-weight: 700; }

/* ---- motion --------------------------------------------------------------------------- */
@keyframes breathe { 0% { transform: scale(.7); opacity: .95; } 80%, 100% { transform: scale(1.9); opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.85) translateY(4px); } }
@keyframes bubble-in { from { opacity: 0; transform: scale(.6) translateY(10px); } }
@keyframes bubble-out { to { opacity: 0; transform: scale(.9) translateY(-6px); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -10px) scale(.95); } }
@keyframes modal-in { from { opacity: 0; transform: scale(.9) translateY(20px); } }
@keyframes wag { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes patch-in { from { transform: rotate(-30deg) scale(.4); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---- small screens -------------------------------------------------------------------- */
@media (max-width: 760px) {
  :root { --pad: 12px; }
  .bar { top: 10px; height: 52px; padding: 0 6px 0 14px; gap: 8px; }
  .brand { font-size: 20px; gap: 8px; }
  .brand svg { width: 28px; height: 15px; }
  .nav { display: none; }
  .bar-actions { margin-left: auto; }
  .pill-btn span { display: none; }
  .pill-btn { width: 40px; padding: 0; justify-content: center; }
  .hero { top: 78px; }
  .hero h1 { font-size: 38px; margin-bottom: 8px; }
  .hero .lede { display: none; }
  .who, .quest { display: none; }
  .quest-chip { display: flex; }
  .hero h1 { font-size: 34px; }
  .cta { left: 12px; right: 12px; transform: none; width: auto; justify-content: center; height: 56px; bottom: 16px; }
  .cta:active { transform: translateY(3px); }
  body.wardrobe .cta { transform: translateY(20px); }
  .locker { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 50svh; border-radius: 24px 24px 0 0; transform: translateY(40px); }
  body.wardrobe .locker { transform: none; }
  .locker-head { padding: 14px 14px 2px 18px; }
  .locker-head h2 { font-size: 24px; }
  .tabs { padding: 6px 14px 8px; }
  .tab { width: 56px; }
  .tab img { width: 36px; height: 36px; }
  .grid { grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 2px 14px 14px; }
  .item b { font-size: 10.5px; }
  .item small { display: none; }
  .og-form.wide { margin: 0 14px 12px; }
  .locker-title { display: none; }
  .dock { left: auto; right: 10px; top: 76px; bottom: auto; flex-direction: column; padding: 6px; border-radius: 18px; transform: translateX(16px); }
  body.wardrobe .dock { transform: none; }
  .dock-btn span { display: none; }
  .dock-btn { padding: 0; width: 42px; justify-content: center; }
  .turn-hint { display: none; }
  .fit-card { display: none; }
  .bubble { font-size: 13.5px; max-width: 200px; }
}

/* ---- the Puppies: Doge Pound's other collection, as their own art ------------------------------ */
.who-switch { display: flex; gap: 4px; margin: -4px 0 10px -4px; }
.who-switch button { padding: 5px 9px; border-radius: 999px; font-size: 9.5px; font-weight: 800; letter-spacing: .14em; color: var(--muted); transition: background .2s, color .2s; }
.who-switch button:hover { background: rgba(56, 34, 22, .06); }
.who-switch button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.char-switch { display: flex; gap: 4px; margin: 2px 18px 8px 22px; padding: 4px; border-radius: 14px; background: #efe0c4; flex-shrink: 0; }
.char-switch button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 11px; font-weight: 800; font-size: 14px; color: var(--ink-2); transition: background .2s, color .2s; }
.char-switch button img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: #fff6e6; }
.char-switch button[aria-pressed="true"] { background: #fff8ec; color: var(--ink); box-shadow: 0 1px 4px rgba(56, 34, 22, .15); }
body.puppy .view-switch, body.puppy .tricks { display: none; }


/* ---- the Art view: the original art as a living card -------------------------------------- */
#art { position: absolute; left: 0; top: 0; width: 0; height: 0; display: grid; place-items: center; z-index: 2;
  opacity: 0; pointer-events: none; transition: opacity .5s var(--ease); --card: 380px; }
body.art-on #art { opacity: 1; }
#stage { transition: opacity .45s var(--ease); }
body.art-on #stage { opacity: 0; }
body.art-on .locker-title { opacity: 0; transform: translateY(-8px); }
body.art-on #art .art-stage { pointer-events: auto; cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.art-on #art .art-stage:active { cursor: grabbing; }
.art-stage { position: relative; width: var(--card); height: var(--card); transform: scale(.92); transition: transform .7s var(--spring); }
body.art-on .art-stage { transform: none; }
.art-card { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; will-change: transform; }
.art-bg, .art-layer, .art-glare, .art-frame { position: absolute; inset: 0; border-radius: calc(var(--card) * .08); }
.art-bg { background: radial-gradient(circle at 50% 36%, #fff6e3 0%, #f1dcb4 55%, #e2bf85 100%); }
/* the background sits deepest and shifts most as the card tilts: keep it tucked inside the mat */
.art-bg.token { inset: 3.5%; border-radius: calc(var(--card) * .05); }
.art-layer { width: 100%; height: 100%; user-select: none; -webkit-user-select: none; pointer-events: none; border-radius: 0; }
.art-extra { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
.art-extra .art-layer { position: absolute; inset: 0; }
.art-glare { mix-blend-mode: soft-light; pointer-events: none; }
.art-frame { inset: -2%; border: calc(var(--card) * .042) solid #fbf3e4; border-radius: calc(var(--card) * .09); pointer-events: none;
  box-shadow: inset 0 0 0 1.5px rgba(56, 34, 22, .12), inset 0 calc(var(--card) * .022) calc(var(--card) * .05) rgba(40, 20, 6, .3), 0 1px 0 rgba(255, 255, 255, .6); }
.art-shadow { position: absolute; left: 8%; right: 8%; bottom: -7%; height: 14%; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(20, 10, 4, .5), rgba(20, 10, 4, 0) 70%); filter: blur(8px); }
.art-note { position: absolute; left: 50%; bottom: 7%; padding: 6px 11px; border-radius: 999px; background: rgba(56, 34, 22, .82); color: var(--cream);
  font-size: 11px; font-weight: 700; white-space: nowrap; pointer-events: none; }

.view-switch { display: flex; margin-left: auto; margin-right: 6px; align-self: center; padding: 3px; border-radius: 11px; background: #efe0c4; }
.view-switch button { height: 30px; padding: 0 12px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--ink-2); transition: background .2s, color .2s; }
.view-switch button[aria-pressed=true] { background: #fffaf1; color: var(--ink); box-shadow: 0 1px 4px rgba(56, 34, 22, .15); }
@media (max-width: 760px) { .view-switch button { height: 28px; padding: 0 10px; } }

/* ---- My Doges ------------------------------------------------------------------------------ */
#modal-body:focus { outline: none; }
.modal.wide { width: min(560px, calc(100vw - 24px)); max-height: min(86svh, 760px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.modal .err { color: var(--red); font-weight: 700; font-size: 13px; margin: -6px auto 8px; }
.wallets { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 4px 0 6px; }
.wallet-btn { display: flex; align-items: center; gap: 9px; height: 46px; padding: 0 16px 0 12px; border-radius: 13px; background: var(--ink); color: var(--cream); font-weight: 700; font-size: 14px; text-decoration: none; transition: transform .2s var(--spring), background .2s; }
.wallet-btn:hover { transform: translateY(-2px); background: #4a2f1f; }
.wallet-btn:disabled { opacity: .6; }
.wallet-btn img, .wallet-btn svg { width: 24px; height: 24px; border-radius: 6px; }
.or { display: flex; align-items: center; gap: 12px; margin: 12px 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: #e7d6b8; }
.modal .og-form.wide { margin: 0 0 14px; }
.addr-form input { font-weight: 600; }
.sniff-wait { padding: 18px 0 10px; }
.sniff-wait .loader-mark { margin: 0 auto; width: 76px; height: 76px; border-radius: 26px; }
.sniff-wait .loader-mark svg { width: 44px; height: 22px; }
.mine-head { display: flex; align-items: center; gap: 12px; text-align: left; margin: 0 34px 14px 0; }
.mine-head > img, .mine-head .patch.mini { width: 52px; height: 52px; border-radius: 16px; flex-shrink: 0; box-shadow: 0 3px 10px rgba(40, 20, 8, .2); }
.mine-head .patch.mini { margin: 0; }
.mine-head .patch.mini svg { width: 30px; height: 16px; }
.mine-head div { flex: 1; min-width: 0; }
.mine-head small { display: block; font-size: 10px; letter-spacing: .2em; font-weight: 700; color: var(--muted); }
.mine-head strong { display: block; font-family: Caprasimo, serif; font-weight: 400; font-size: clamp(18px, 5vw, 24px); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link { color: var(--red); font-weight: 700; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.modal h3 { text-align: left; font-family: Caprasimo, serif; font-weight: 400; font-size: 20px; margin: 16px 0 2px; display: flex; align-items: center; gap: 8px; }
.modal h3 span { font-family: DM, sans-serif; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #efe1c6; color: var(--ink-2); }
.modal .hint { text-align: left; margin: 0 0 10px; font-size: 12.5px; max-width: none; }
.mine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.mine { position: relative; display: flex; flex-direction: column; border-radius: 16px; background: #fbf3e4; border: 2px solid transparent; padding: 5px 5px 7px; text-align: left; transition: transform .2s var(--spring), box-shadow .2s; }
.mine:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(56, 34, 22, .14); }
.mine:active { transform: scale(.97); }
.mine.on { border-color: var(--red); }
.mine img, .mine canvas { width: 100%; aspect-ratio: 1; height: auto; border-radius: 11px; background: #efe1c6; display: block; }
.mine b { margin: 6px 3px 0; font-size: 12px; }
.mine i { position: absolute; top: 9px; right: 9px; font-style: normal; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--red); color: var(--cream); }
.mine.pup { cursor: default; }
.none-yet h2 { font-size: 26px; }
#connect .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 11px; display: grid; place-items: center; }
#connect .count[hidden] { display: none; }
.fit-card .who-tag .yours { display: inline-block; vertical-align: 5px; margin-left: 8px; font-family: DM, sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .12em; padding: 4px 8px; border-radius: 999px; background: var(--gold); color: var(--ink); text-shadow: none; }
@media (max-width: 760px) {
  .modal.wide { padding: 24px 16px 18px; }
  .mine-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  #connect .count { position: absolute; top: -5px; right: -5px; }
}

/* ---- sharing ------------------------------------------------------------------------------- */
.ghost.as-btn { display: grid; place-items: center; text-decoration: none; color: var(--ink); }
.modal.share .fine .link { font-size: 11px; }

/* ---- tricks -------------------------------------------------------------------------------- */
.tricks { position: fixed; z-index: 12; bottom: calc(var(--pad) + 4px); left: calc(50% + 172px); transition: opacity .5s, transform .5s var(--ease); }
.tricks-btn { height: 58px; padding: 0 20px 0 16px; border-radius: 999px; display: flex; align-items: center; gap: 8px; background: rgba(255, 246, 228, .94); color: var(--ink); font-weight: 700; font-size: 15px;
  box-shadow: 0 4px 0 #d9c3a0, 0 14px 30px rgba(40, 20, 6, .25); transition: transform .2s var(--spring), background .2s; }
.tricks-btn:hover { background: #fffaf1; transform: translateY(-2px); }
.tricks-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #d9c3a0; }
.tricks-btn svg { width: 22px; height: 22px; color: var(--red); }
.trick-menu { position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%); width: max-content; max-width: min(92vw, 420px); padding: 12px 12px 12px; border-radius: 18px;
  background: #fff7e8; box-shadow: 0 18px 50px rgba(30, 14, 4, .35); animation: menu-in .3s var(--spring) both; }
@keyframes menu-in { from { opacity: 0; transform: translateX(-50%) translateY(6px) scale(.95); } }
@keyframes menu-in-m { from { opacity: 0; transform: translateY(6px) scale(.95); } }
.trick-menu p { margin: 2px 6px 8px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.trick-list { display: flex; flex-wrap: wrap; gap: 6px; }
.trick-list button { height: 38px; padding: 0 14px; border-radius: 12px; background: #f1e3c9; font-weight: 700; font-size: 13.5px; color: var(--ink); transition: background .2s, transform .2s var(--spring); }
.trick-list button:hover { background: #ffe9c2; transform: translateY(-2px); }
.trick-list button:disabled { opacity: .45; transform: none; }
body.wardrobe .tricks, body.loading .tricks { opacity: 0; pointer-events: none; transform: translateY(20px); }
@media (max-width: 760px) {
  .cta { right: 84px; }
  .tricks { left: auto; right: 12px; bottom: 16px; }
  .tricks-btn { width: 60px; height: 56px; padding: 0; justify-content: center; }
  .tricks-btn span { display: none; }
  .tricks-btn svg { width: 26px; height: 26px; }
  .trick-menu { left: auto; right: 0; transform: none; animation-name: menu-in-m; }
}

/* ---- the Mirror (mirror.js; designed with ChatGPT: assets-src/codex/mirror/) -------------------- */
.modal.mirror { width: min(768px, calc(100vw - 32px)); max-height: calc(100svh - 24px); overflow: auto; padding: 34px 40px 28px; }
.modal.mirror .modal-x { top: 18px; right: 18px; width: 46px; height: 46px; border-radius: 14px; background: #f1e3c9; }
.modal.mirror .eyebrow { margin: 0 auto; letter-spacing: .24em; }
.modal.mirror h2 { font-size: clamp(25px, 3vw, 34px); margin: 8px 0 0; line-height: 1.12; text-wrap: balance; }
.modal.mirror h2 span { display: inline-block; }
.mirror-frame { position: relative; margin: 26px auto 16px; height: clamp(220px, calc(100svh - 420px), 470px); aspect-ratio: 7 / 8; padding: 15px;
  border-radius: 50% 50% 22px 22px / 30% 30% 22px 22px; background: linear-gradient(150deg, #c07c3e 0%, #93552a 38%, #b06d34 62%, #7c4520 100%);
  box-shadow: 0 16px 34px rgba(60, 30, 10, .32), inset 0 2px 0 rgba(255, 222, 170, .45), inset 0 -3px 0 rgba(60, 25, 5, .35); }
.mirror-bone { position: absolute; top: -13px; left: 50%; width: 50px; height: 26px; transform: translateX(-50%); color: #e7bd62; filter: drop-shadow(0 2px 0 #a06f28); z-index: 2; }
.mirror-glass { position: relative; height: 100%; overflow: hidden; border: 3px solid #dcb45e; background: #3f6c86;
  border-radius: 50% 50% 10px 10px / 28% 28% 10px 10px; box-shadow: inset 0 0 30px rgba(10, 30, 45, .45); }
.mirror-glass::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(118deg, rgba(255, 255, 255, .16) 0 16%, transparent 16% 30%, rgba(255, 255, 255, .07) 30% 35%, transparent 35%); }
.mirror-rig, .mirror-clip { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mirror-clip { object-fit: cover; cursor: pointer; }
.mirror-you { position: absolute; right: 5%; bottom: 5%; width: 29%; aspect-ratio: 1; z-index: 3; }
.mirror-you video { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; transform: scaleX(-1); display: block;
  border: 4px solid #fff8ec; box-shadow: 0 8px 18px rgba(10, 20, 30, .35); background: #26414f; }
.mirror-you::after { content: ''; position: absolute; right: 7%; bottom: 7%; width: 14%; height: 14%; border-radius: 50%; background: #3dbb4f; box-shadow: 0 0 0 3px #fff8ec; }
.mirror-play { position: absolute; left: 50%; top: 56%; z-index: 2; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 248, 236, .92); color: var(--ink); box-shadow: 0 8px 20px rgba(10, 20, 30, .3); }
.mirror-play svg { width: 30px; height: 30px; margin-left: 4px; }
.mirror-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: grid; grid-template-columns: 1fr auto; gap: 6px 0; padding: 26px 14px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .45)); color: #fff; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mirror-bar .mirror-track { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .6); }
.mirror-bar .mirror-track i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--red); position: relative; }
.mirror-bar .mirror-track i::after { content: ''; position: absolute; right: -7px; top: -5px; width: 14px; height: 14px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #fff; }
.mirror-rec { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px;
  border-radius: 999px; background: rgba(30, 14, 4, .62); color: #fff6e4; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.mirror-rec i { width: 10px; height: 10px; border-radius: 50%; background: #ef4b3c; animation: rec-blink 1s steps(2) infinite; }
@keyframes rec-blink { 50% { opacity: .25; } }
.mirror-note { position: absolute; left: 9%; right: 9%; bottom: 7%; z-index: 2; margin: 0 !important; max-width: none !important; padding: 9px 12px; border-radius: 12px;
  background: rgba(255, 246, 228, .95); color: var(--ink) !important; font-size: 13px !important; line-height: 1.4 !important; font-weight: 600; }
.mirror-line { margin: 0 auto 16px !important; max-width: 470px !important; font-size: 15px !important; }
.mirror-go { width: min(344px, 100%); height: 58px; margin: 0 auto; border-radius: 999px; font-size: 17px; box-shadow: 0 4px 0 var(--red-2); }
.mirror-go svg, .mirror-row .primary svg, .mirror-again svg { width: 22px; height: 22px; }
.mirror-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 4px 6px; background: none; color: var(--ink); font-weight: 700; font-size: 15px;
  text-decoration: underline; text-underline-offset: 4px; }
.mirror-fine { margin: 8px auto 0 !important; font-size: 13px !important; color: var(--muted) !important; }
.mirror-coats-card { box-sizing: border-box; width: 100%; margin: 0 0 14px; padding: 12px 14px 10px 16px; border-radius: 18px; background: #fffdf8; box-shadow: 0 2px 10px rgba(60, 30, 10, .08); text-align: left; }
.mirror-coats-top { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; letter-spacing: .18em; color: var(--ink); margin-bottom: 8px; }
.mirror-coats-top em { font-style: normal; font-weight: 600; color: var(--muted); }
.mirror-coats-row { display: flex; align-items: center; gap: 8px; }
.mirror-coats { flex: 1; min-width: 0; display: flex; gap: 10px; overflow-x: auto; padding: 5px 4px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.mirror-coats::-webkit-scrollbar { display: none; }
.mirror-coat { position: relative; flex: 0 0 auto; width: 58px; height: 58px; padding: 0; border-radius: 50%; background: #efe3cd; scroll-snap-align: start;
  transition: transform .2s var(--spring), box-shadow .2s; }
.mirror-coat img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.mirror-coat:hover { transform: translateY(-2px); }
.mirror-coat[aria-pressed="true"] { box-shadow: 0 0 0 3px #fffdf8, 0 0 0 5.5px var(--red); }
.mirror-coat[aria-pressed="true"]::after { content: '✓'; position: absolute; top: -5px; right: -5px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--red); color: #fff; font-size: 12px; font-weight: 800; box-shadow: 0 0 0 2px #fffdf8; }
.mirror-more { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #f3e8d6; color: var(--ink); }
.mirror-more svg { width: 18px; height: 18px; }
.mirror-live { position: relative; display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 84px; }
.mirror-recbtn { display: flex; align-items: center; gap: 18px; padding: 4px; background: none; color: var(--ink); }
.mirror-record { position: relative; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: #fffaf1;
  box-shadow: inset 0 0 0 3px var(--red), 0 8px 20px rgba(40, 20, 6, .16); transition: transform .2s var(--spring); }
.mirror-recbtn:hover .mirror-record { transform: scale(1.05); }
.mirror-record i { position: relative; width: 56px; height: 56px; border-radius: 50%; background: var(--red); transition: border-radius .25s, transform .25s; }
.mirror-record-label { font-weight: 700; font-size: 21px; min-width: 124px; text-align: left; }
.modal.mirror.recording .mirror-record { background: conic-gradient(var(--red) calc(var(--p, 0) * 360deg), #eadbc0 0); box-shadow: 0 8px 20px rgba(40, 20, 6, .16); }
.modal.mirror.recording .mirror-record::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #fffaf1; }
.modal.mirror.recording .mirror-record i { border-radius: 9px; transform: scale(.5); }
.mirror-cam { position: absolute; right: 0; top: 50%; margin: 0; transform: translateY(-50%); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.mirror-row { display: flex; gap: 14px; justify-content: center; }
.mirror-row .primary { width: auto; min-width: 230px; height: 58px; padding: 0 28px; border-radius: 999px; font-size: 17px; box-shadow: 0 4px 0 var(--red-2); }
.mirror-again { display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 30px; border-radius: 999px; background: #fffaf1; color: var(--ink); font-weight: 700; font-size: 17px;
  box-shadow: 0 4px 0 #e2cfae, 0 6px 16px rgba(40, 20, 6, .1); }
@media (max-width: 760px) {
  .modal.mirror { width: calc(100vw - 20px); max-width: none; height: calc(100svh - 20px); max-height: none; border-radius: 26px; padding: 20px 16px 16px;
    display: flex; flex-direction: column; }
  .modal.mirror .modal-x { top: 12px; right: 12px; }
  .modal.mirror #modal-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .modal.mirror .eyebrow { margin: 12px auto 0; }
  .modal.mirror h2 { font-size: 27px; padding: 0 18px; }
  .mirror-frame { height: auto; width: min(100%, calc((100svh - 400px) * 7 / 8)); max-width: 440px; margin: 20px auto 12px; padding: 12px; }
  .mirror-ask, .mirror-live, .mirror-done { margin-top: auto; }
  .mirror-coats-card { margin-bottom: 10px; padding: 10px 10px 8px 12px; }
  .mirror-coat { width: 50px; height: 50px; }
  .mirror-live { flex-wrap: wrap; row-gap: 4px; }
  .mirror-cam { position: static; transform: none; flex-basis: 100%; justify-content: center; }
  .mirror-record { width: 68px; height: 68px; } .mirror-record i { width: 50px; height: 50px; }
  .mirror-record-label { font-size: 19px; min-width: 0; }
  .mirror-row { flex-direction: column; gap: 10px; }
  .mirror-row .primary, .mirror-again { width: 100%; min-width: 0; justify-content: center; }
}

/* ---- the mail ------------------------------------------------------------------------------- */
.modal.letter-modal { background: #fbf2e1; padding: 0; width: min(440px, calc(100vw - 28px)); max-height: min(88svh, 760px); overflow-y: auto; text-align: left; transform: rotate(-.6deg); }
.letter { position: relative; padding: 34px 32px 26px; background:
  repeating-linear-gradient(0deg, rgba(120, 80, 40, .035) 0 1px, transparent 1px 28px),
  radial-gradient(circle at 30% 20%, #fffaf0, #f6e9d0 80%); border-radius: 26px; }
.letter .masthead { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--red); max-width: none; }
.letter .masthead em { font-style: normal; color: var(--muted); letter-spacing: .08em; text-transform: none; font-weight: 600; }
.letter .date { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.letter h2 { font-family: Caprasimo, serif; font-weight: 400; font-size: 28px; margin: 14px 0 12px; letter-spacing: -.01em; }
.letter p { font-size: 14.5px; line-height: 1.65; color: var(--ink-2); margin: 0 0 12px; max-width: none; }
.letter .primary { margin: 8px 0 4px; }
.letter .sign { margin: 16px 0 0; font-size: 12px; font-style: italic; color: var(--muted); }
.letter .stamp { position: absolute; top: 58px; right: 28px; width: 64px; height: 74px; transform: rotate(6deg); border-radius: 6px; background: var(--red); color: #fff1cf;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 0 0 4px #fbf2e1, 0 0 0 5.5px rgba(179, 38, 30, .5); }
.letter .stamp svg { width: 36px; height: 18px; }
.letter .stamp span { font-size: 6.5px; font-weight: 700; letter-spacing: .12em; }
.letter .masthead, .letter .date, .letter h2 { padding-right: 78px; }

/* ---- the arcade ------------------------------------------------------------------------------ */
.modal.arcade { width: min(760px, calc(100vw - 20px)); padding: 16px 16px 14px; background: #2a211c; color: #f3e6cf; text-align: left; box-shadow: 0 30px 90px rgba(10, 5, 2, .6), inset 0 1px 0 rgba(255, 255, 255, .08); }
.modal.arcade .modal-x { color: #f3e6cf; top: 8px; right: 8px; }
.arcade-top { display: flex; align-items: baseline; gap: 12px; margin: 2px 44px 12px 6px; flex-wrap: wrap; }
.arcade-top span { font-family: Lilita, sans-serif; font-size: 20px; letter-spacing: .08em; color: #ffd23f; }
.arcade-top em { font-style: normal; font-size: 12.5px; color: #bda88a; }
.arcade-bezel { position: relative; border-radius: 22px; padding: 14px; background: linear-gradient(#1b1512, #120e0c); box-shadow: inset 0 0 0 2px #3a2e27, inset 0 6px 20px rgba(0, 0, 0, .6); }
.arcade-screen { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: 14px / 16px; image-rendering: pixelated; image-rendering: crisp-edges; background: #000; touch-action: manipulation; cursor: pointer; -webkit-user-select: none; user-select: none; }
.arcade-glass { position: absolute; inset: 14px; border-radius: 14px / 16px; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .14) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 50%, transparent 60%, rgba(0, 0, 0, .35) 100%),
    linear-gradient(125deg, rgba(255, 255, 255, .08), transparent 30%); }
.arcade-help { margin: 10px 6px 0; font-size: 12.5px; color: #bda88a; }
@media (max-width: 760px) { .modal.arcade { padding: 12px 10px 10px; } .arcade-bezel { padding: 8px; border-radius: 16px; } .arcade-glass { inset: 8px; } }
.carts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 6px; aspect-ratio: 16 / 9; align-content: center; background: radial-gradient(circle at 50% 30%, #1d2a44, #0b1120); border-radius: 14px / 16px; }
.cart { display: flex; flex-direction: column; text-align: left; border-radius: 12px; padding: 8px 8px 10px; background: #efe1c6; color: var(--ink); box-shadow: 0 4px 0 #b8a07a, 0 10px 24px rgba(0, 0, 0, .4); transition: transform .2s var(--spring); }
.cart:hover { transform: translateY(-3px) rotate(-.5deg); }
.cart:active { transform: translateY(2px); box-shadow: 0 1px 0 #b8a07a; }
.cart img { width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; image-rendering: pixelated; background: #000; }
.cart span { display: flex; flex-direction: column; min-width: 0; }
.cart b { margin: 8px 2px 2px; font-size: 14px; }
.cart small { margin: 0 2px; font-size: 11.5px; color: var(--ink-2); line-height: 1.35; }
.modal.arcade.race { width: min(1180px, calc(100vw - 20px)); }
.arcade-race { display: block; width: 100%; height: min(72svh, 640px); border: 0; border-radius: 14px; background: #0b1a36; }
.arcade-help a { color: #ffd23f; }
@media (max-width: 760px) { .carts { grid-template-columns: 1fr; aspect-ratio: auto; } .cart { flex-direction: row; gap: 10px; align-items: center; } .cart img { width: 44%; } .arcade-race { height: 70svh; } }

/* ---- the Park: the Den's own layers step aside; a fade covers the walk between places ---------- */
#fade { position: fixed; inset: 0; z-index: 40; background: #1f140c; opacity: 0; pointer-events: none; transition: opacity .38s var(--ease); }
#fade.on { opacity: 1; pointer-events: auto; }
body.park #hotspots, body.park .hero, body.park .quest,
body.park .cta:not(#park-act), body.park #quest-chip, body.park .who { opacity: 0; pointer-events: none; visibility: hidden; }
/* today's walk: a card on computers, a chip in the bar on phones (like First Sniff) */
.walk { right: var(--pad); bottom: var(--pad); width: 300px; padding: 18px; }
body:not(.park) .walk, body:not(.park) #walk-chip, body:not(.park) #park-spots, body:not(.park) #park-act { display: none; }
.walk-n { font-weight: 800; font-size: 13px; color: var(--ink); }
.walk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.walk-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--ink); }
.walk-list li::before { content: ''; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink-2); opacity: .5; }
.walk-list li.done { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.walk-list li.done::before { opacity: 1; border-color: var(--red); background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff6e2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.walk-note { margin: 14px 0 0; font-size: 11.5px; color: var(--muted); }
#park-spots { position: fixed; inset: 0; z-index: 8; pointer-events: none; }
#park-act { gap: 10px; }
#park-act[hidden] { display: none; }
body.park.walk-open .walk { display: block; }
@media (max-width: 760px) {
  .walk { display: none; left: 12px; right: 12px; bottom: 84px; width: auto; }
  body.park #walk-chip { display: flex; }
}
body.park #world { cursor: pointer; }

/* scene arrows: plain buttons at the edges, named for where they go */
.scene-arrow { position: fixed; top: 50%; z-index: 12; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px;
  border-radius: 999px; background: var(--card); box-shadow: var(--shadow); color: var(--ink); font-weight: 800; font-size: 14px;
  backdrop-filter: blur(14px) saturate(1.15); -webkit-backdrop-filter: blur(14px) saturate(1.15); transition: transform .25s var(--spring), background .2s; }
.scene-arrow svg { width: 18px; height: 18px; }
.scene-arrow.prev { left: var(--pad); transform: translateY(-50%); }
.scene-arrow.prev svg { transform: scaleX(-1); }
.scene-arrow.next { right: var(--pad); transform: translateY(-50%); }
.scene-arrow:hover { background: #fff8ec; }
.scene-arrow[hidden] { display: none; }
/* between scenes: a soft push-in and crossfade, not a hard cut */
#world { transition: opacity .32s var(--ease), transform .32s var(--ease); transform-origin: 50% 55%; }
#world.scene-out { opacity: 0; transform: scale(1.045); }
#world.scene-in { opacity: 0; transform: scale(.975); transition: none; }
@media (max-width: 760px) {
  .scene-arrow { top: auto; bottom: 86px; height: 42px; padding: 0 12px; font-size: 13px; }
  .scene-arrow.prev, .scene-arrow.next { transform: none; }
  .scene-arrow span { max-width: 28vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { #world { transition: opacity .2s; } #world.scene-out, #world.scene-in { transform: none; } }

/* ---- the neighbourhood map: the front door and the navigation ---------------------------------- */
.map { position: fixed; inset: 0; z-index: 18; overflow: hidden; background: #6f8f4e; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.map[hidden] { display: none; }
.map.dragging { cursor: grabbing; }
.map-canvas { position: absolute; left: 0; top: 0; width: 1536px; height: 1024px; transform-origin: 0 0; will-change: transform; }
.map-canvas img { width: 1536px; height: 1024px; display: block; pointer-events: none; }
.map-canvas .map-life { position: absolute; left: 0; top: 0; width: 1536px; height: 1024px; pointer-events: none; }
.map-canvas:not(.ready) .map-life { display: none; }
.map-overlay { position: absolute; inset: 0; pointer-events: none; }
.place { position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 1px;
  margin: 0; padding: 7px 13px 8px; border-radius: 14px; background: rgba(255, 248, 236, .94); color: var(--ink); box-shadow: 0 6px 18px rgba(40, 20, 8, .28);
  transform: translate(var(--x, 0), var(--y, 0)) translate(-50%, calc(-100% - 8px)) scale(var(--s, 1)); transform-origin: 50% 100%;
  transition: background .2s; white-space: nowrap; text-align: center; }
.place::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; margin-left: -6px; background: inherit; transform: rotate(45deg); border-radius: 0 0 3px 0; }
.place b { font-family: Caprasimo, serif; font-weight: 400; font-size: 15px; letter-spacing: -.01em; line-height: 1.1; }
.place small { font-size: 10.5px; font-weight: 700; line-height: 1.15; color: var(--ink-2); opacity: .85; }
.place em { font-style: normal; font-size: 8.5px; font-weight: 800; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; margin-left: 5px; vertical-align: 2px; font-family: DM, system-ui, sans-serif; }
.place.here small { color: rgba(255, 246, 230, .85); }
.doors .fun { font-family: DM, system-ui, sans-serif; font-size: 12px; font-weight: 700; color: var(--muted); }
.place span { display: none; max-width: 210px; white-space: normal; font-size: 11.5px; line-height: 1.35; color: var(--ink-2); margin-top: 2px; }
.place:hover, .place:focus-visible { --s: 1.06; background: #fff; z-index: 2; }
.place:hover span, .place:focus-visible span { display: block; }
.place em.new { color: var(--red); }
.place.here em.new { color: #ffd9c9; }
.place.soon { opacity: .9; }
.place.soon b { color: var(--ink-2); }
.place.sincere { background: #fff; }
.place.here { background: var(--red); color: var(--cream); }
.place.here span, .place.here em { color: rgba(255, 246, 230, .8); }
body.has-news .place[data-place="post"] b::after { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--red); vertical-align: 3px; }
.map-marker { position: absolute; left: 0; top: 0; width: 54px; height: 54px; transform: translate(var(--x, 0), var(--y, 0)) translate(-50%, calc(-100% - 4px - var(--hop, 0px))); z-index: 3; }
.map-marker .pin { width: 54px; height: 54px; border-radius: 50% 50% 50% 6px; transform: rotate(-45deg); background: var(--red); box-shadow: 0 8px 18px rgba(40, 20, 8, .35); }
.map-marker img { width: 44px; height: 44px; margin: 5px; border-radius: 50%; transform: rotate(45deg); object-fit: cover; background: radial-gradient(circle at 50% 40%, #fdf4e3, #ead6b3); display: block; }
.map-intro { position: absolute; left: var(--pad); bottom: var(--pad); max-width: 300px; padding: 16px 18px; border-radius: 20px; pointer-events: none;
  background: var(--card); box-shadow: var(--shadow); backdrop-filter: blur(14px) saturate(1.15); -webkit-backdrop-filter: blur(14px) saturate(1.15); color: var(--ink); }
.map-intro .eyebrow { font-size: 9px; letter-spacing: .2em; color: var(--muted); margin: 0; }
.map-intro h1 { margin: 4px 0 4px; font-family: Caprasimo, serif; font-weight: 400; font-size: 26px; line-height: 1.05; letter-spacing: -.01em; }
.map-intro p { margin: 0; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.map.travelling .map-intro { opacity: 0; transition: opacity .3s; }
.map-list-btn { position: absolute; right: var(--pad); bottom: var(--pad); display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 20px 0 16px; border-radius: 999px;
  background: var(--card); box-shadow: var(--shadow); color: var(--ink); font-weight: 800; font-size: 14px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.map-list-btn svg { width: 20px; height: 20px; }
.map-btn { position: relative; }
.map-btn .news-dot { display: none; position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 2px solid var(--cream); }
body.has-news .map-btn .news-dot { display: block; }
body.on-map .loader { display: none; }
body.on-map .bar { transform: none !important; }
body.on-map .hero, body.on-map .who, body.on-map .quest, body.on-map .cta, body.on-map #quest-chip, body.on-map #walk-chip, body.on-map .walk,
body.on-map #hotspots, body.on-map #park-spots, body.on-map .scene-arrow, body.on-map .tricks, body.on-map .bubble { visibility: hidden; }
body.on-map .nav button[data-go="map"] { color: var(--ink); }
body.on-map .nav button.active::after { display: none; }
body.on-map .nav button[data-go="map"]::after { content: ''; position: absolute; left: 16px; right: 16px; bottom: 4px; height: 3px; border-radius: 3px; background: var(--red); }
.map-hint { display: none; position: absolute; left: 50%; top: 42%; transform: translateX(-50%); margin: 0; padding: 10px 16px; border-radius: 999px; pointer-events: none;
  background: rgba(40, 24, 14, .78); color: var(--cream); font-weight: 800; font-size: 13px; white-space: nowrap; box-shadow: 0 8px 24px rgba(40, 20, 8, .3); }
.map-hint span { display: inline-block; animation: hint-nudge 1.4s ease-in-out infinite; }
.map-hint span:last-child { animation-direction: reverse; }
.map.hint:not(.travelling) .map-hint { display: block; animation: hint-in .5s .9s both; }
@keyframes hint-nudge { 50% { transform: translateX(-4px); } }
@keyframes hint-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@media (max-width: 760px) {
  /* On a phone the intro is just the latest news, sitting above the list button. */
  .map-intro { left: 12px; right: 12px; bottom: 74px; max-width: none; padding: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .map-intro .eyebrow, .map-intro h1, .map-intro p { display: none; }
  .map-intro .latest { margin: 0; padding: 12px 14px; border-radius: 16px; box-shadow: var(--shadow); }
  .place { padding: 6px 10px 7px; } .place b { font-size: 13px; }
  .map-list-btn { left: 12px; right: 12px; justify-content: center; bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) { .map-hint span { animation: none; } }

/* ---- the Chew Gallery: the art hangs in the painting; the frames are buttons over it ------------- */
body.gallery #hotspots, body.gallery .hero, body.gallery .quest, body.gallery .cta:not(#gal-act), body.gallery #quest-chip,
body.gallery .who, body.gallery .walk, body.gallery #walk-chip, body.gallery #park-spots, body.gallery #park-prev, body.gallery #park-next { opacity: 0; pointer-events: none; visibility: hidden; }
body:not(.gallery) #gal-frames, body:not(.gallery) .gal-desk, body:not(.gallery) #gal-act, body:not(.gallery) #gal-chip,
body:not(.gallery) #gal-prev, body:not(.gallery) #gal-next { display: none; }
body.park #gal-prev, body.park #gal-next { display: none; }
body:not(.park):not(.gallery):not(.desk) .scene-arrow { display: none; }
body.desk #gal-prev, body.desk #gal-next, body.gallery #desk-prev, body.park #desk-prev { display: none; }
#gal-frames { position: fixed; inset: 0; z-index: 8; pointer-events: none; --k: 1; }
.gal-frame { position: absolute; left: 0; top: 0; pointer-events: auto; padding: 0; border-radius: 2px; background: transparent; cursor: zoom-in; }
.gal-frame:focus-visible { outline: 3px solid var(--red); outline-offset: calc(22px * var(--k)); }
.gal-frame.missing { cursor: default; }
/* the engraved plate on the bottom rail of each frame */
.gal-frame .plaque { position: absolute; left: 50%; top: calc(100% + 5px * var(--k)); transform: translateX(-50%); padding: calc(2px * var(--k)) calc(7px * var(--k));
  border-radius: calc(2px * var(--k)); background: linear-gradient(#f6e2a4, #c89d4c); color: #3b240f; box-shadow: 0 1px 2px rgba(40, 20, 6, .45), inset 0 1px 0 rgba(255, 250, 225, .7);
  font-weight: 800; font-size: calc(9.5px * var(--k)); letter-spacing: .06em; line-height: 1.25; white-space: nowrap; pointer-events: none; transition: transform .25s var(--spring); }
.gal-frame:hover .plaque, .gal-frame:focus-visible .plaque { transform: translateX(-50%) scale(1.12); }
.gal-desk { right: var(--pad); bottom: var(--pad); width: 300px; padding: 18px; }
.gal-wings { display: flex; gap: 4px; margin: 8px 0 6px; padding: 3px; border-radius: 12px; background: #efe0c4; }
.gal-wings button { flex: 1; height: 32px; border-radius: 9px; font-weight: 800; font-size: 13px; color: var(--ink-2); transition: background .2s, color .2s; }
.gal-wings button[aria-pressed="true"] { background: #fff8ec; color: var(--ink); box-shadow: 0 1px 4px rgba(56, 34, 22, .15); }
.gal-desk h3 { margin: 4px 0 2px; font-family: Caprasimo, serif; font-weight: 400; font-size: 24px; line-height: 1.1; color: var(--ink); }
.gal-sub { margin: 0 0 14px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.gal-label { display: block; margin: 0 0 6px; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.gal-jump { display: flex; gap: 8px; margin-top: 10px; }
.gal-jump button { flex: 1; height: 36px; border-radius: 10px; background: #f1e3c9; color: var(--ink); font-weight: 700; font-size: 13px; }
.gal-jump button:hover { background: #ead6b3; }
.gal-jump button[hidden] { display: none; }
#gal-act { gap: 10px; }
body.gallery #world { cursor: default; }
body.gallery.pointing #world { cursor: pointer; }
@media (max-width: 760px) {
  .gal-desk { display: none; left: 12px; right: 12px; bottom: 84px; width: auto; }
  body.gallery.desk-open .gal-desk { display: block; }
  body.gallery.desk-open .scene-arrow { visibility: hidden; }
  body.gallery.desk-open #gal-chip { background: var(--ink); color: var(--cream); }
  body.gallery #gal-chip { display: flex; }
}
@media (min-width: 761px) { #gal-chip { display: none; } }
/* the close look: the Den's living art card, in a card */
.look-card .look-art { --card: min(300px, 68vw); display: grid; place-items: center; margin: 4px auto 18px; width: var(--card); height: var(--card); }
.look-card .art-stage { transform: none; pointer-events: auto; cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
.look-card .art-stage:active { cursor: grabbing; }
.traits { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin: 0 0 16px; }
.traits div { min-width: 0; }
.traits dt { font-size: 9.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.traits dd { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- the Pound's front desk (preview) ------------------------------------------------------------ */
body.desk #hotspots, body.desk .hero, body.desk .quest, body.desk .cta:not(#desk-act), body.desk #quest-chip, body.desk .who,
body.desk .walk, body.desk #walk-chip, body.desk #park-spots, body.desk #park-prev, body.desk #park-next { opacity: 0; pointer-events: none; visibility: hidden; }
body:not(.desk) #desk-frames, body:not(.desk) #desk-act, body:not(.desk) #desk-dog, body:not(.desk) #desk-prev { display: none; }
body.desk #desk-prev:not([hidden]) { display: flex; }
#desk-frames { position: fixed; inset: 0; z-index: 8; pointer-events: none; }
.desk-dog { position: fixed; z-index: 12; bottom: calc(var(--pad) + 4px); right: calc(50% + 172px); }
body.desk #world { cursor: default; }
body.desk.pointing #world { cursor: pointer; }
.desk-dog .short { display: none; }
@media (max-width: 760px) {
  .desk-dog { right: 12px; bottom: 86px; width: auto !important; height: 46px !important; padding: 0 16px 0 12px !important; font-size: 13px; }
  .desk-dog .short { display: inline !important; } .desk-dog .long { display: none !important; }
  .desk-dog svg { width: 20px !important; height: 20px !important; }
}

/* ---- place cards ------------------------------------------------------------------------------- */
.modal .fine a { color: var(--red); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.modal.place-card .memory { padding: 10px 12px; border-radius: 12px; background: #f1e3c9; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.modal.place-card .memory b { color: var(--red); }
.modal.place-card { width: min(460px, calc(100vw - 24px)); padding-top: 22px; text-align: left; }
.modal.place-card h2 { margin: 4px 0 6px; }
.modal.place-card p { margin: 0 0 14px; max-width: none; }
.modal.place-card .joke { font-weight: 700; color: var(--ink); }
.modal.place-card .row { justify-content: flex-start; flex-wrap: wrap; }
.modal .eyebrow { font-size: 10px; letter-spacing: .18em; color: var(--muted); margin: 14px 0 0; }
.place-art { height: 190px; margin: 0 -8px 4px; border-radius: 18px; background: #6f8f4e url(img/map/neighbourhood.webp) no-repeat; box-shadow: inset 0 0 0 1px rgba(56, 34, 22, .08); }
.as-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.doors { display: grid; gap: 10px; margin: 6px 0 4px; }
.door { display: grid; gap: 3px; text-align: left; padding: 14px 16px; border-radius: 16px; background: #fff; box-shadow: 0 2px 0 rgba(56, 34, 22, .1), 0 8px 20px rgba(56, 34, 22, .08); transition: transform .2s var(--spring); }
.door:hover { transform: translateY(-2px); }
.door b { font-family: Caprasimo, serif; font-weight: 400; font-size: 20px; color: var(--ink); }
.door span { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.news { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
.news li { padding: 12px 14px; border-radius: 14px; background: #fff; }
.news .tag { display: block; font-size: 10px; font-weight: 800; letter-spacing: .14em; color: var(--muted); margin-bottom: 4px; }
.news .tag.drop { color: var(--red); }
.news b { display: block; font-size: 16px; }
.news p { margin: 3px 0 6px !important; font-size: 13px; }
.news .link { font-weight: 800; font-size: 13px; color: var(--red); text-decoration: none; padding: 0; }
.faq details { border-top: 1px solid rgba(56, 34, 22, .1); padding: 10px 2px; }
.faq summary { cursor: pointer; font-weight: 800; font-size: 14px; list-style: none; }
.faq summary::after { content: '+'; float: right; color: var(--muted); }
.faq details[open] summary::after { content: '–'; }
.faq p { margin: 8px 0 2px !important; font-size: 13.5px; }
.shelter-dogs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 -8px 6px; }
.shelter-dogs figure { margin: 0; }
.shelter-dogs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; display: block; }
.shelter-dogs figcaption { font-weight: 800; font-size: 13px; margin-top: 5px; text-align: center; }
.modal.sincere .eyebrow { color: #6b7d4c; }
.cert-slot { margin: 4px 0 10px; }
.cert-slot .shot { margin: 0; }
.cert-wait { height: 280px; display: grid; place-items: center; border-radius: 16px; background: #f3e6cf; color: var(--muted); font-weight: 700; font-size: 13px; }
.adopt-form, .dog-form { display: grid; gap: 8px; margin: 4px 0 8px; }
.adopt-form label, .dog-form label[for] { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--ink-2); }
.adopt-form input, .dog-form input:not([type=file]) { height: 48px; padding: 0 14px; border-radius: 12px; border: 2px solid #ead9bc; background: #fff; font: inherit; font-size: 16px; color: var(--ink); }
.adopt-form input:focus, .dog-form input:focus { outline: none; border-color: var(--red); }
.err { color: #a3321f !important; font-size: 13px; font-weight: 700; margin: 0 !important; }
.photo-pick { justify-self: center; cursor: pointer; }
.photo-face { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; align-content: center; background: #f3e6cf; border: 3px dashed #d9c19b; overflow: hidden; color: var(--ink-2); }
.photo-face img { width: 100%; height: 100%; object-fit: cover; }
.photo-face b { font-size: 34px; line-height: 1; } .photo-face small { font-size: 11px; font-weight: 700; }
/* the Den's family: his pen pal at the shelter, and your dog */
.family { display: grid; gap: 6px; margin: -2px 0 12px; }
.kin { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; text-align: left; transition: background .2s; }
.kin:hover { background: rgba(56, 34, 22, .06); }
.kin img, .kin i { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }
.kin i { display: grid; place-items: center; font-style: normal; font-weight: 800; background: #f1e3c9; color: var(--ink-2); }
.kin img:not([hidden]) + i { display: none; }
.kin small { display: block; font-size: 9px; font-weight: 800; letter-spacing: .14em; color: var(--muted); }
.kin b { display: block; font-size: 13.5px; }

/* phones: the bar holds the logo, the map, the quest chip, sound and My Doges without spilling over */
@media (max-width: 760px) {
  .bar { gap: 6px; padding: 0 6px 0 12px; }
  .brand { font-size: 17px; gap: 6px; }
  .bar-actions { gap: 4px; }
  .bar-actions .icon-btn, .bar-actions .pill-btn { width: 38px; height: 38px; }
  .quest-chip { padding: 0 10px 0 8px; height: 34px; }
}
@media (max-width: 360px) { .brand span { display: none; } }

/* before the scripts run, the map is simply a picture filling the screen, centred near his house */
body.on-map .map[hidden] { display: block; }
.map-canvas:not(.ready) { width: 100vw; height: 100vh; transform: none !important; }
.map-canvas:not(.ready) img { width: 100%; height: 100%; object-fit: cover; object-position: 14% 22%; }

.map-intro .latest { pointer-events: auto; display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #fff; text-align: left; }
.map-intro .latest small { font-size: 9px; font-weight: 800; letter-spacing: .14em; color: var(--red); }
.map-intro .latest b { flex: 1; font-size: 13.5px; }
.map-intro .latest span { color: var(--red); font-weight: 800; }
.map-intro .latest[hidden] { display: none; }

/* ---- short screens (a phone on its side): the phone's compact controls, not the computer's cards --- */
/* Narrower screens: the Tricks button would land on the sniff card, so the card becomes the chip.
   Tablets held upright: both cards would cover his legs, so they get the phone's chips too. */
@media (min-width: 761px) and (max-width: 1240px) {
  .quest { display: none; }
  .quest-chip { display: flex; }
  .pill-btn span { display: none; }
  .pill-btn { width: 40px; padding: 0; justify-content: center; }
}
@media (min-width: 761px) and (max-width: 1100px) and (orientation: portrait) {
  .who { display: none; }
}
@media (max-height: 520px) and (min-width: 761px) {
  .who, .quest, .hero .lede { display: none; }
  .hero { top: 80px; } .hero h1 { font-size: 30px; }
  .quest-chip { display: flex; }
  body.park #walk-chip, body.gallery #gal-chip { display: flex; }
  .walk, .gal-desk { display: none; left: auto; right: 12px; bottom: 66px; width: 300px; max-height: calc(100svh - 150px); overflow: auto; }
  body.park.walk-open .walk, body.gallery.desk-open .gal-desk { display: block; }
  body.gallery.desk-open .scene-arrow.next, body.park.walk-open .scene-arrow.next { visibility: hidden; }
  .cta { height: 46px; bottom: 10px; font-size: 15px; padding: 0 22px 0 18px; }
  .tricks { bottom: 10px; } .tricks-btn { height: 46px; }
  .scene-arrow { height: 40px; font-size: 13px; }
  .map-intro { max-width: 340px; padding: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; left: 12px; bottom: 12px; }
  .map-intro .eyebrow, .map-intro h1, .map-intro p { display: none; }
  .map-intro .latest { margin: 0; padding: 11px 14px; border-radius: 16px; box-shadow: var(--shadow); }
  .map-list-btn { height: 44px; bottom: 12px; right: 12px; }
  .pill-btn span { display: none; }
  .pill-btn { width: 40px; padding: 0; justify-content: center; }
  /* the locker: the items get the room (no big title, no note, smaller tabs); the fit card steps aside */
  .locker { top: 80px; bottom: 10px; width: min(400px, 46vw); }
  .locker-head { padding: 10px 12px 0 18px; align-items: center; }
  .locker-head .eyebrow, .tab-note { display: none; }
  .char-switch { margin: 0 12px 4px 16px; } .char-switch button { height: 30px; font-size: 12.5px; } .char-switch button img { width: 20px; height: 20px; }
  .locker-head h2 { margin: 0; font-size: 22px; }
  .tabs { padding: 4px 10px 6px 12px; }
  .tab { gap: 2px; font-size: 9.5px; padding: 3px 0; } .tab img { width: 30px; height: 30px; }
  .grid { grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 4px 12px 10px 16px; }
  .og-form.wide { margin: 0 12px 10px 16px; height: 38px; }
  .fit-card { display: none; }
  .dock { left: calc((100vw - min(400px, 46vw) - 12px) / 2); bottom: 10px; }
}

/* a close-up's traits are links to every Doge (or Puppy) with the same one (the Gallery's trait search) */
.trait-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left;
  text-decoration: underline dotted; text-decoration-color: var(--muted); text-underline-offset: 3px; }
.trait-link:hover { color: var(--red); text-decoration-color: var(--red); }

/* the Gallery's trait picker (gallery.js browseTraits): the locker's tabs and item cards, in a card */
.modal.trait-picker { width: min(780px, calc(100vw - 24px)); text-align: left; padding: 26px 26px 16px; }
.modal.trait-picker h2 { margin: 4px 0 4px; }
.modal.trait-picker .picker-note { margin: 0 0 10px; max-width: none; font-size: 14px; }
.trait-picker .tabs { justify-content: flex-start; gap: 6px; padding: 2px 0 12px; }
.trait-picker .tab { width: auto; padding: 8px 14px; font-size: 13.5px; border-radius: 999px; background: #f3e8d6; }
.trait-picker .tab[aria-selected=true] { background: var(--ink); color: var(--cream); box-shadow: none; }
.trait-grid { flex: none; max-height: min(54svh, 500px); grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 4px 4px 8px; margin: 0 -4px; }
.trait-grid .swatch { width: 64%; height: 64%; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(56, 34, 22, .1), 0 4px 10px rgba(56, 34, 22, .12); }
@media (max-width: 760px) {
  .modal.trait-picker { padding: 22px 14px 12px; }
  .trait-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 56svh; }
  .trait-grid .item small { display: block; font-size: 10px; }        /* (the locker hides counts on a phone; here they're the point) */
  .trait-grid .item b { font-size: 11.5px; }
}

/* The site's logo (Sept 29, "Sunny Side": assets-src/codex/brand/) in the header, in place of the bone + word */
.brand img { height: 26px; width: auto; display: block; }
@media (max-width: 760px) { .brand img { height: 21px; } }
@media (max-width: 380px) { .brand img { height: 18px; } }

/* Room Zero's close look: the test Doge's picture (a still — never minted, so no living card) */
.look-art .never-art { width: 100%; height: 100%; object-fit: contain; border-radius: 14px; display: block; }

/* Oct 3: the site's five sections (Clubs · Walks · Your Doge · The Originals · Good deeds). Below 1000px they sit behind
   a menu button (the bar has no room); on phones the kit moves into that menu too. */
.den-menu-btn, .nav .nav-kit { display: none; }
@media (max-width: 1000px) {
  .nav { display: none; }
  .den-menu-btn { display: grid; }
  .bar-actions { margin-left: auto; }
  body.den-menu-open .bar { z-index: 45; }
  body.den-menu-open .nav { display: flex; flex-direction: column; position: absolute; top: calc(100% + 8px); right: 0; margin: 0;
    width: min(270px, calc(100vw - 2 * var(--pad))); padding: 8px; background: var(--cream); border-radius: 16px; box-shadow: var(--shadow); }
  body.den-menu-open .nav a.nav-link, body.den-menu-open .nav button { text-align: left; padding: 13px 14px; font-size: 16px; }
  body.den-menu-open .nav .the { display: inline; }
  body.den-menu-open .nav button.active::after { left: 14px !important; right: auto !important; width: 28px; bottom: 6px; }
}
@media (max-width: 760px) {
  #kit-btn { display: none; }
  body.den-menu-open .nav .nav-kit { display: block; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; margin-top: 4px; }
  .brand img { height: 18px; }
}
@media (max-width: 380px) { .brand img { height: 34px; } }   /* (the square stamp: the bar keeps room for the menu) */
