:root {
  --ink: #2E1D45;
  --ink-2: #6B5A86;
  --ink-3: #9C8FB3;
  --paper: #FFFFFF;
  --sky: #C9E9FF;
  --sky-2: #A9DBFF;
  --sun: #FFCA3A;
  --sun-edge: #E7A400;
  --rose: #FF5C93;
  --leaf: #23A866;
  --rain: #5F7BC7;
  --display: 'Bagel Fat One', 'M PLUS Rounded 1c', system-ui, sans-serif;
  --ui: 'M PLUS Rounded 1c', system-ui, -apple-system, sans-serif;
  --lift: 0 6px 0 rgba(46, 29, 69, 0.13), 0 18px 36px -16px rgba(46, 29, 69, 0.45);
  --lift-sm: 0 3px 0 rgba(46, 29, 69, 0.13), 0 10px 20px -12px rgba(46, 29, 69, 0.4);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 500 16px/1.5 var(--ui);
  color: var(--ink);
  background: linear-gradient(180deg, #A8DBFF 0%, #CFEBFF 46%, #FFE9DA 100%) fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 12px; }
[hidden] { display: none !important; }

/* buttons */
.btn {
  --edge: rgba(46, 29, 69, 0.18);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  border: 0; border-radius: 16px;
  font: 800 15px/1 var(--ui); letter-spacing: 0.01em; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: transform 0.12s cubic-bezier(.3, .7, .4, 1.5), box-shadow 0.12s;
}
.btn-sun { background: var(--sun); color: var(--ink); box-shadow: inset 0 -4px 0 rgba(160, 90, 0, 0.18), 0 4px 0 var(--sun-edge); }
.btn-sun:hover { transform: translateY(-2px); box-shadow: inset 0 -4px 0 rgba(160, 90, 0, 0.18), 0 6px 0 var(--sun-edge); }
.btn-sun:active { transform: translateY(3px); box-shadow: inset 0 -2px 0 rgba(160, 90, 0, 0.18), 0 1px 0 var(--sun-edge); }
.btn.is-off { opacity: 0.6; cursor: default; transform: none !important; box-shadow: inset 0 -4px 0 rgba(160, 90, 0, 0.18); }
.hello-note { margin: -10px 0 18px !important; font-size: 13px !important; font-weight: 700; color: var(--ink-3) !important; }
.btn-ghost { background: rgba(255, 255, 255, 0.7); color: var(--ink); box-shadow: inset 0 0 0 2px rgba(46, 29, 69, 0.12); }
.btn-ghost:hover { background: #fff; }
.btn-ghost:active { transform: translateY(2px); }
.btn-ink { background: var(--ink); color: #fff; box-shadow: 0 4px 0 #160b25; }
.btn-ink:active { transform: translateY(3px); box-shadow: 0 1px 0 #160b25; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.82);
  font: 800 14px/1 var(--ui); cursor: pointer; box-shadow: var(--lift-sm);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.chip svg { width: 16px; height: 16px; }
.chip:hover { background: #fff; }
.xlink { width: 40px; padding: 0; justify-content: center; }
.xlink svg { width: 15px; height: 15px; }

/* faces: a portrait on a soft disc of the critter's colour */
.face { --c: #FFC2AA; position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 50% 38%, #fff 0%, color-mix(in srgb, var(--c) 55%, #fff) 70%); overflow: hidden; }
.face img { width: 118%; height: 118%; margin-top: 8%; object-fit: cover; }

/* header */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: max(14px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.brand { justify-self: start; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; filter: drop-shadow(0 3px 0 rgba(46, 29, 69, 0.14)); transition: transform 0.3s cubic-bezier(.3, .7, .4, 1.6); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }
.brand span { font: 400 30px/1 var(--display); letter-spacing: -0.01em; color: var(--ink); }
.nav {
  display: flex; gap: 2px; margin: 0 auto; padding: 5px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.78); box-shadow: var(--lift-sm);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.nav a { padding: 9px 16px; border-radius: 999px; font: 800 14px/1 var(--ui); text-decoration: none; color: var(--ink-2); transition: background 0.15s, color 0.15s; }
.nav a:hover { color: var(--ink); background: rgba(46, 29, 69, 0.06); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.bar-end { justify-self: end; display: flex; align-items: center; gap: 10px; }

/* ----- town page ----- */
.page-town { overflow: hidden; height: 100vh; height: 100dvh; background: #BFE6FF; }
#town { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
#bubbles { position: fixed; inset: 0; pointer-events: none; z-index: 10; overflow: hidden; }

.bubble {
  --c: #FFC2AA;
  position: absolute; left: 0; top: 0;
  max-width: 230px; padding: 7px 12px 9px;
  border-radius: 16px; background: #fff; color: var(--ink);
  font: 700 14px/1.28 var(--ui);
  box-shadow: 0 3px 0 rgba(46, 29, 69, 0.12), 0 8px 18px -10px rgba(46, 29, 69, 0.5);
  transform-origin: 50% 100%;
  will-change: transform;
}
.bubble::after {
  content: ''; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; margin-left: -7px;
  background: #fff; border-radius: 0 0 4px 0; transform: rotate(45deg);
  box-shadow: 3px 3px 0 rgba(46, 29, 69, 0.08);
}
.bubble b { display: block; margin-bottom: 1px; font: 800 11px/1.2 var(--ui); color: color-mix(in srgb, var(--c) 45%, var(--ink)); }
.bubble span { display: block; }
.bubble.in > * { animation: pop 0.38s cubic-bezier(.3, .7, .4, 1.5) both; }
.bubble.out { opacity: 0; transition: opacity 0.25s; }
@keyframes pop { from { opacity: 0; transform: scale(0.6) translateY(6px); } to { opacity: 1; transform: none; } }

.tag {
  position: fixed; left: 0; top: 0; z-index: 11; pointer-events: none;
  padding: 6px 11px; border-radius: 999px; background: var(--ink); color: #fff;
  font: 800 13px/1 var(--ui); white-space: nowrap;
}
.tag span { opacity: 0.6; margin-left: 4px; }

.veil {
  position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 18px;
  background: linear-gradient(180deg, #8FD0FF, #D7F0FF 55%, #FFE6D6);
  transition: opacity 0.9s 0.2s, visibility 0s 1.2s;
}
.drawn .veil { opacity: 0; visibility: hidden; }
.veil p { margin: 0; font: 800 15px/1 var(--ui); color: var(--ink-2); }
.veil-blob {
  position: relative; width: 74px; height: 66px; border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%;
  background: #FFC2AA; box-shadow: inset -6px -8px 0 rgba(0, 0, 0, 0.06);
  animation: hop 0.7s cubic-bezier(.3, .7, .4, 1) infinite alternate;
}
.veil-blob i { position: absolute; top: 26px; width: 8px; height: 10px; border-radius: 50%; background: var(--ink); }
.veil-blob i:first-child { left: 22px; } .veil-blob i:last-child { right: 22px; }
@keyframes hop { from { transform: translateY(0) scale(1.08, 0.9); } 30% { transform: translateY(-6px) scale(0.96, 1.05); } to { transform: translateY(-34px) scale(1, 1); } }

[data-phase="night"] .brand span, [data-phase="dusk"] .brand span { color: #fff; text-shadow: 0 2px 0 rgba(20, 10, 40, 0.35); }

/* hello: the first-visit intro, set straight on the sky */
.hello {
  position: fixed; z-index: 20; left: max(24px, env(safe-area-inset-left)); top: 130px;
  width: min(440px, calc(100vw - 48px));
  padding: 26px 26px 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: var(--lift);
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.6s, transform 0.7s cubic-bezier(.3, .7, .4, 1.2);
}
.ready .hello { opacity: 1; transform: none; }
.hello.gone, .ready .hello.gone { opacity: 0; transform: translateY(-10px) scale(0.97); }
.hello.tucked { opacity: 0 !important; pointer-events: none; }
.hello h1 { margin: 0 0 12px; font: 400 clamp(34px, 3.6vw, 46px)/1.02 var(--display); letter-spacing: -0.01em; text-wrap: balance; }
.hello p { margin: 0 0 20px; color: var(--ink-2); font-size: 16px; line-height: 1.55; max-width: 38ch; }
.hello-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* town bar: era, stock and plans */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.townbar { position: fixed; z-index: 22; top: 74px; left: max(20px, env(safe-area-inset-left)); display: grid; justify-items: start; gap: 8px; opacity: 0; transition: opacity 0.6s 0.4s; }
.ready .townbar { opacity: 1; }
.town-chip {
  display: inline-flex; align-items: center; gap: 12px; height: 42px; padding: 0 6px 0 14px;
  border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.86); cursor: pointer;
  box-shadow: var(--lift-sm); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.town-chip:hover { background: #fff; }
.era { font: 400 18px/1 var(--display); }
.res { display: inline-flex; align-items: center; gap: 4px; font: 800 14px/1 var(--ui); font-variant-numeric: tabular-nums; }
.res svg { width: 20px; height: 20px; }
.res.bump b { animation: bump 0.5s cubic-bezier(.3, .7, .4, 1.6); }
@keyframes bump { 40% { transform: translateY(-4px) scale(1.25); color: #137A47; } }
.res b { display: inline-block; }
.plans-label { height: 30px; padding: 0 12px; border-radius: 999px; background: var(--ink); color: #fff; font: 800 13px/30px var(--ui); }
.town-chip[aria-expanded="true"] .plans-label { background: var(--sun); color: var(--ink); }
.plans {
  width: 360px; max-height: calc(100vh - 200px); max-height: calc(100dvh - 200px); overflow: auto; padding: 18px 18px 16px;
  border-radius: 26px; background: #fff; box-shadow: var(--lift); animation: slidein 0.35s cubic-bezier(.3, .7, .4, 1.3);
}
.plans-head h2 { margin: 0; font: 400 26px/1 var(--display); }
.plans-head p { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.plans h3 { margin: 18px 0 8px; font: 800 12px/1 var(--ui); color: var(--ink-3); }
.proj, .ideas { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.proj button { display: grid; gap: 8px; width: 100%; padding: 10px 12px; border: 0; border-radius: 18px; background: #F7F3FC; text-align: left; cursor: pointer; }
.proj button:hover { background: #F0E9FA; }
.proj-top { display: flex; align-items: center; gap: 10px; }
.proj-top .face { width: 38px; height: 38px; }
.proj b, .ideas b { display: block; font: 400 17px/1.1 var(--display); }
.proj small, .ideas small { display: block; margin-top: 2px; font: 700 12px/1.3 var(--ui); color: var(--ink-2); }
.meter { height: 10px; border-radius: 999px; background: #E8E0F3; overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: inherit; background: repeating-linear-gradient(-45deg, #FFCA3A 0 8px, #FFD966 8px 16px); transition: width 0.5s; }
.needs { display: flex; align-items: center; gap: 12px; font: 700 12px/1 var(--ui); color: var(--ink-2); }
.need { display: inline-flex; align-items: center; gap: 3px; }
.need svg { width: 18px; height: 18px; }
.need b { font: 800 13px/1 var(--ui); color: var(--ink); display: inline; }
.needs em { margin-left: auto; font-style: normal; font-weight: 800; color: var(--ink); }
.ideas li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 14px; }
.ideas .face { width: 34px; height: 34px; }
.plans-note { margin: 8px 0 0; font-size: 12px; color: var(--ink-3); }
.done-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.done-list button { padding: 7px 11px; border: 0; border-radius: 999px; background: #FFF3C7; font: 800 12px/1 var(--ui); cursor: pointer; }
.has-plans .hello, .has-plans .news { opacity: 0 !important; pointer-events: none; }
.doing { display: flex; align-items: baseline; gap: 8px; margin: -4px 20px 14px; padding: 10px 12px; border-radius: 14px; background: #FFF6D6; font-size: 14px; }
.doing span { flex: none; font: 800 12px/1 var(--ui); color: var(--ink-3); }
.doing b { font-weight: 800; }
.built { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 20px 0; }
.built span { font: 800 12px/1 var(--ui); color: var(--ink-3); margin-right: 2px; }
.built em { padding: 5px 9px; border-radius: 999px; background: #F2ECFA; font: 800 12px/1 var(--ui); font-style: normal; }

/* roles */
.role-chip { display: inline-flex; margin: 8px 0 0; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.75); font: 800 12px/1 var(--ui); color: var(--ink); }
.role-chip.is-mayor { background: #E2384F; color: #fff; box-shadow: 0 2px 0 #A81F33; }
.role-about { margin: -6px 20px 14px; font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.tag-mayor { display: inline-block; margin-right: 2px; padding: 2px 6px; border-radius: 999px; background: #E2384F; font: 800 10px/1.2 var(--ui); font-style: normal; color: #fff; vertical-align: 1px; }
.mayor-row { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 8px 12px 8px 8px; border-radius: 18px; background: #FFE9EC; }
.mayor-row .face { width: 40px; height: 40px; box-shadow: 0 0 0 3px #E2384F; }
.mayor-row small { display: block; font: 800 11px/1 var(--ui); color: #C2264E; }
.mayor-row b { display: block; margin-top: 2px; font: 400 18px/1 var(--display); }
.mayor-row em { margin-left: auto; font: 800 12px/1 var(--ui); font-style: normal; color: var(--ink-2); }
.note-mayor .note-text::before, .note-job .note-text::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #E2384F; vertical-align: 1px; }
.note-job .note-text::before { background: var(--leaf); }
.rc-role { display: inline-block; margin-top: 6px; padding: 4px 9px; border-radius: 999px; background: #F2ECFA; font: 800 11px/1 var(--ui); }
.rc-role.is-mayor { background: #E2384F; color: #fff; }
.res-role { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 7px 13px; border-radius: 999px; background: rgba(255, 255, 255, 0.8); font: 800 14px/1 var(--ui); }
.res-role.is-mayor { background: #E2384F; color: #fff; }
.res-role-about { margin: 10px 0 0; font-size: 15px; color: var(--ink-2); max-width: 40ch; }
.jobs { margin-top: 18px; padding: 32px 36px 36px; }
.jobs h2 { margin: 0; font: 400 38px/1 var(--display); }
.jobs > p { margin: 10px 0 0; color: var(--ink-2); max-width: 60ch; }
.job-grid { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.job-grid li { --c: #FFC2AA; display: grid; justify-items: center; gap: 2px; padding: 10px 10px 14px; border-radius: 22px; background: color-mix(in srgb, var(--c) 22%, #fff); text-align: center; }
.job-grid li.is-mayor { box-shadow: inset 0 0 0 3px #E2384F; }
.job-grid img { width: 110px; height: 110px; }
.job-grid b { font: 400 17px/1.1 var(--display); }
.job-grid span { font: 700 12px/1.35 var(--ui); color: var(--ink-2); }

/* news */
.news {
  position: fixed; z-index: 20; left: max(20px, env(safe-area-inset-left)); bottom: max(20px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column-reverse; gap: 8px; width: min(360px, calc(100vw - 40px));
  pointer-events: none;
  opacity: 0; transition: opacity 0.6s 0.3s;
}
.ready .news { opacity: 1; }
.note {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px 8px 8px;
  border: 0; border-radius: 18px; background: rgba(255, 255, 255, 0.9); text-align: left; cursor: pointer;
  box-shadow: var(--lift-sm);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: slidein 0.5s cubic-bezier(.3, .7, .4, 1.3) both;
}
.note:nth-child(n+3) { opacity: 0.82; }
.note:nth-child(n+4) { opacity: 0.6; }
.note:hover { background: #fff; }
.note .face { width: 40px; height: 40px; }
.note-text { flex: 1; font: 700 14px/1.3 var(--ui); }
.note time { flex: none; font: 700 12px/1 var(--ui); color: var(--ink-3); }
.note-party .note-text::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--leaf); vertical-align: 1px; }
.note-build .note-text::before, .note-plan .note-text::before, .note-era .note-text::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--sun-edge); vertical-align: 1px; }
.note-plan .note-text::before { background: #3D8BFF; }
.note-era .note-text::before { background: var(--rose); }
.note-rain .note-text::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--rain); vertical-align: 1px; }
@keyframes slidein { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: none; } }

/* festival */
.fest {
  position: fixed; z-index: 20; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
  width: 312px; padding: 18px 18px 16px; border-radius: 26px;
  background: #fff; box-shadow: var(--lift);
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.6s 0.4s, transform 0.7s 0.4s cubic-bezier(.3, .7, .4, 1.2);
}
.ready .fest { opacity: 1; transform: none; }
.has-card .fest { opacity: 0; pointer-events: none; transform: translateY(16px); transition-delay: 0s; }
.fest-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fest h2 { margin: 0; font: 400 22px/1 var(--display); }
.fest-when { display: flex; gap: 6px; margin: 0; font: 800 18px/1 var(--ui); font-variant-numeric: tabular-nums; }
.fest-when small { font-size: 11px; color: var(--ink-3); margin-left: 1px; }
.fest-rule { margin: 8px 0 12px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.fest-top { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; }
.fest-top button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 5px 8px 5px 5px; border: 0; border-radius: 14px; background: transparent; cursor: pointer; text-align: left; }
.fest-top button:hover { background: #F5F0FB; }
.fest-top li:first-child button { background: #FFF6D6; }
.fest-top .face { width: 36px; height: 36px; }
.fest-name { flex: 1; font: 800 14px/1 var(--ui); }
.fest-gain { font: 800 14px/1 var(--ui); color: var(--leaf); font-variant-numeric: tabular-nums; }
.lead { margin-left: 2px; padding: 4px 7px; border-radius: 999px; background: var(--sun); font: 800 10px/1 var(--ui); }
.fest-pot { display: flex; align-items: baseline; gap: 6px; margin: 0; padding-top: 12px; border-top: 2px dashed #EFE8F7; font-size: 13px; color: var(--ink-2); }
.fest-pot strong { font: 800 16px/1 var(--ui); color: var(--ink); }
.fest-pot a { margin-left: auto; font-weight: 800; color: var(--ink); text-underline-offset: 3px; }

/* resident card */
.card {
  --c: #FFC2AA;
  position: fixed; z-index: 25; top: 84px; right: max(20px, env(safe-area-inset-right));
  width: 372px; max-height: calc(100vh - 104px); max-height: calc(100dvh - 104px); overflow: auto; padding: 0 0 18px;
  border-radius: 30px; background: #fff; box-shadow: var(--lift);
  opacity: 0; transform: translateX(30px) scale(0.98);
  transition: opacity 0.3s, transform 0.45s cubic-bezier(.3, .7, .4, 1.2);
  scrollbar-width: thin;
}
.card.open { opacity: 1; transform: none; }
.card .x { position: absolute; top: 14px; right: 14px; z-index: 2; }
.x {
  width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.85);
  font: 700 24px/1 var(--ui); cursor: pointer; box-shadow: var(--lift-sm);
}
.x:hover { background: #fff; }
.card-top {
  display: flex; align-items: flex-end; gap: 14px; padding: 22px 20px 18px;
  background: radial-gradient(120% 90% at 20% 0%, #fff 0%, color-mix(in srgb, var(--c) 60%, #fff) 60%, color-mix(in srgb, var(--c) 85%, #fff) 100%);
  border-radius: 30px 30px 0 0;
}
.card-face { flex: none; width: 116px; height: 116px; margin: -4px 0 -10px -6px; }
.card-face img { width: 100%; height: 100%; filter: drop-shadow(0 10px 10px rgba(46, 29, 69, 0.18)); }
.card h2 { margin: 0; font: 400 36px/0.95 var(--display); }
.tick { margin: 6px 0 4px; font: 800 14px/1 var(--ui); color: color-mix(in srgb, var(--c) 35%, var(--ink)); }
.bio { margin: 16px 20px 14px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 16px; }
.stats div { padding: 12px 12px 11px; border-radius: 18px; background: #F7F3FC; }
.stats dt { font: 800 12px/1 var(--ui); color: var(--ink-3); }
.stats dd { margin: 6px 0 0; font: 800 17px/1.15 var(--ui); }
.stats small { display: block; margin-top: 4px; font: 700 12px/1.2 var(--ui); color: var(--ink-2); }
.mood-party { background: #E3F8EC !important; } .mood-party small { color: var(--leaf); }
.mood-rain { background: #E6ECFA !important; } .mood-rain small { color: var(--rain); }
.heard { margin: 16px 20px 0; }
.heard h3 { margin: 0 0 8px; font: 400 18px/1 var(--display); }
.heard ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.heard li { padding: 9px 12px; border-radius: 14px 14px 14px 4px; background: #F7F3FC; font: 700 14px/1.35 var(--ui); }
.quiet { margin: 0; font-size: 14px; color: var(--ink-3); }
.card-actions { display: grid; gap: 8px; margin: 18px 16px 0; }

/* clock */
.clock { position: fixed; z-index: 21; top: 76px; right: max(20px, env(safe-area-inset-right)); display: grid; grid-template-columns: auto auto; justify-items: end; align-items: start; gap: 8px; opacity: 0; transition: opacity 0.6s 0.5s; }
.ready .clock { opacity: 1; }
.has-card .clock { opacity: 0; pointer-events: none; transition-delay: 0s; }
.clock-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 13px 0 9px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.82); font: 800 13px/1 var(--ui); font-variant-numeric: tabular-nums; cursor: pointer; box-shadow: var(--lift-sm); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.clock-icon { width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle, #FFE07A 0 45%, #FFC93C 46% 60%, transparent 62%); }
.clock[data-phase="dusk"] .clock-icon { background: radial-gradient(circle at 50% 70%, #FF9B6B 0 45%, transparent 47%), linear-gradient(transparent 62%, #FFB38D 62% 70%, transparent 70%); }
.clock[data-phase="night"] .clock-icon { background: radial-gradient(circle at 65% 38%, transparent 0 34%, #E8EBFF 35% 52%, transparent 54%); box-shadow: inset 0 0 0 10px transparent; }
.wide-btn { padding: 0 13px; }
.clock-pop { grid-column: 1 / -1; display: none; width: 240px; padding: 14px; border-radius: 20px; background: #fff; box-shadow: var(--lift); }
.clock.open .clock-pop { display: grid; gap: 10px; }
.clock-pop label { font: 800 13px/1 var(--ui); color: var(--ink-2); }
.clock-pop input { width: 100%; accent-color: var(--ink); }
.clock-now { justify-self: start; padding: 7px 12px; border: 0; border-radius: 999px; background: #F2ECFA; font: 800 13px/1 var(--ui); cursor: pointer; }

.hint {
  position: fixed; z-index: 15; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  margin: 0; padding: 8px 14px; border-radius: 999px; background: rgba(46, 29, 69, 0.72); color: #fff;
  font: 700 13px/1 var(--ui); white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.6s 1.2s;
}
.ready .hint { opacity: 1; animation: hintout 0.6s 9s forwards; }
@keyframes hintout { to { opacity: 0; } }

.finder {
  width: min(460px, calc(100vw - 32px)); max-height: min(620px, calc(100vh - 80px)); padding: 0;
  border: 0; border-radius: 26px; background: #fff; color: var(--ink); box-shadow: var(--lift);
}
.finder::backdrop { background: rgba(46, 29, 69, 0.28); backdrop-filter: blur(3px); }
.finder-head { position: sticky; top: 0; display: flex; gap: 10px; padding: 14px; background: #fff; }
.finder-head input { flex: 1; height: 46px; padding: 0 16px; border: 0; border-radius: 14px; background: #F4EFFA; font: 700 16px/1 var(--ui); color: var(--ink); }
.finder-head input:focus { outline: 3px solid var(--sun); }
.finder ul { list-style: none; margin: 0; padding: 0 8px 10px; }
.finder li button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 7px 10px 7px 7px; border: 0; border-radius: 16px; background: transparent; text-align: left; cursor: pointer; }
.finder li button:hover, .finder li button:focus-visible { background: #F7F3FC; }
.finder li span { flex: 1; font-size: 14px; color: var(--ink-2); }
.finder li b { font-weight: 800; color: var(--ink); margin-right: 4px; }
.finder li em { font: 700 12px/1 var(--ui); font-style: normal; color: var(--ink-3); }
.finder .quiet { padding: 14px; }

/* ----- small screens ----- */
@media (max-width: 900px) {
  .nav { display: none; }
  .bar { display: flex; gap: 10px; }
  .brand span { font-size: 26px; }
  .bar-end { margin-left: auto; }
  .chip { width: 40px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
  .hello { top: auto; bottom: 18px; left: 16px; width: calc(100vw - 32px); padding: 20px; }
  .hello h1 { font-size: 30px; }
  .hello p { font-size: 15px; margin-bottom: 14px; }
  .news { left: 12px; bottom: 12px; width: calc(100vw - 24px); }
  .note:nth-child(n+2) { display: none; }
  .fest { display: none; }
  .clock { top: 68px; right: 12px; }
  .townbar { top: 68px; left: 12px; }
  .wide-btn { display: none; }
  .town-chip { gap: 8px; padding-left: 10px; }
  .town-chip .era { display: none; }
  .plans { width: calc(100vw - 24px); }
  .hint { display: none; }
  .card { top: auto; left: 10px; right: 10px; bottom: 10px; width: auto; max-height: 72vh; transform: translateY(40px); }
  .card.open { transform: none; }
  .ready .hello ~ .news { opacity: 0; }
  .hello[hidden] ~ .news, .hello.tucked ~ .news, .hello.gone ~ .news { opacity: 1 !important; }
}

/* ----- inner pages ----- */
.page { min-height: 100vh; overflow-x: hidden; }
.page .bar { position: absolute; }
.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.page-head { padding: 136px 0 40px; }
.page-head h1 { margin: 0; font: 400 clamp(56px, 9vw, 112px)/0.9 var(--display); letter-spacing: -0.02em; text-wrap: balance; }
.page-head p { max-width: 50ch; margin: 20px 0 0; font-size: 19px; line-height: 1.55; color: var(--ink-2); }
.panel { border-radius: 36px; background: #fff; box-shadow: var(--lift); }
.foot { margin-top: 96px; padding: 40px 0 56px; color: var(--ink-2); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.foot .brand span { font-size: 24px; }
.foot .brand-mark { width: 32px; height: 32px; }
.foot p { margin: 0; max-width: 56ch; }
.foot nav { display: flex; gap: 18px; margin-left: auto; }
.foot nav a { font-weight: 800; text-decoration: none; }
.foot nav a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* residents: festival */
.festival { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px; padding: 40px; }
.festival h2 { margin: 0; font: 400 46px/0.95 var(--display); }
.festival .fest-when { margin: 18px 0 0; font-size: 34px; gap: 12px; }
.festival .fest-when small { font-size: 15px; }
.festival .when-local { margin: 8px 0 0; font-size: 14px; color: var(--ink-3); font-weight: 700; }
.festival .rule { margin: 22px 0 0; font-size: 17px; line-height: 1.55; color: var(--ink-2); max-width: 40ch; }
.festival .pot { display: inline-flex; align-items: baseline; gap: 8px; margin: 24px 0 0; padding: 12px 18px; border-radius: 18px; background: #FFF6D6; font-weight: 700; color: var(--ink-2); }
.festival .pot strong { font: 800 26px/1 var(--ui); color: var(--ink); }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 12px; min-height: 330px; }
.podium a { display: grid; justify-items: center; text-decoration: none; }
.podium img { width: 82%; max-width: 170px; margin-bottom: -16px; position: relative; z-index: 1; filter: drop-shadow(0 12px 10px rgba(46, 29, 69, 0.18)); transition: transform 0.35s cubic-bezier(.3, .7, .4, 1.6); }
.podium a:hover img { transform: translateY(-8px) rotate(-4deg); }
.step { width: 100%; display: grid; justify-items: center; align-content: start; gap: 4px; padding: 26px 8px 16px; border-radius: 22px 22px 14px 14px; box-shadow: inset 0 -6px 0 rgba(46, 29, 69, 0.08); }
.step b { font: 400 34px/1 var(--display); }
.step span { font: 800 15px/1.1 var(--ui); }
.step em { font: 800 14px/1 var(--ui); font-style: normal; color: #137A47; }
.podium .p1 .step { height: 190px; background: #FFE07A; }
.podium .p2 .step { height: 150px; background: #E3D8FF; }
.podium .p3 .step { height: 120px; background: #FFD3C2; }
.podium .p1 { order: 2; } .podium .p2 { order: 1; } .podium .p3 { order: 3; }
.runners { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.runners a { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: 16px; background: #F7F3FC; text-decoration: none; font-weight: 800; font-size: 14px; }
.runners a:hover { background: #F0E9FA; }
.runners .rank { width: 22px; font: 400 16px/1 var(--display); color: var(--ink-3); text-align: center; }
.runners .face { width: 34px; height: 34px; }
.runners .gain { margin-left: auto; color: var(--leaf); font-variant-numeric: tabular-nums; }

/* residents: directory */
.dir-head { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; margin: 88px 0 22px; }
.dir-head h2 { margin: 0 auto 0 0; font: 400 46px/1 var(--display); }
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.seg { display: flex; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.7); box-shadow: var(--lift-sm); }
.seg button { height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; font: 800 13px/1 var(--ui); color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.search { height: 44px; width: 220px; padding: 0 16px; border: 0; border-radius: 999px; background: #fff; box-shadow: var(--lift-sm); font: 700 15px/1 var(--ui); color: var(--ink); }
.search:focus { outline: 3px solid var(--sun); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 18px; }
.rc { --c: #FFC2AA; position: relative; display: flex; flex-direction: column; border-radius: 30px; background: #fff; box-shadow: var(--lift-sm); text-decoration: none; overflow: hidden; transition: transform 0.25s cubic-bezier(.3, .7, .4, 1.4), box-shadow 0.25s; }
.rc:hover { transform: translateY(-5px) rotate(-0.6deg); box-shadow: var(--lift); }
.rc-art { position: relative; display: grid; place-items: end center; height: 190px; background: radial-gradient(90% 80% at 50% 30%, #fff 0%, color-mix(in srgb, var(--c) 55%, #fff) 62%, color-mix(in srgb, var(--c) 80%, #fff) 100%); }
.rc-art::after { content: ''; position: absolute; left: 50%; bottom: 18px; width: 120px; height: 18px; margin-left: -60px; border-radius: 50%; background: rgba(46, 29, 69, 0.12); filter: blur(2px); }
.rc-art img { position: relative; z-index: 1; width: 168px; height: 168px; margin-bottom: 6px; transition: transform 0.35s cubic-bezier(.3, .7, .4, 1.6); }
.rc:hover .rc-art img { transform: translateY(-10px) scale(1.04); }
.rc-body { padding: 16px 18px 18px; }
.rc h3 { margin: 0; font: 400 26px/1 var(--display); }
.rc-tick { margin: 4px 0 0; font: 800 13px/1 var(--ui); color: color-mix(in srgb, var(--c) 35%, var(--ink)); }
.rc-bio { margin: 10px 0 14px; font-size: 14px; line-height: 1.45; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.rc-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 8px; margin: 0; padding-top: 12px; border-top: 2px dashed #EFE8F7; }
.rc-stats dt { font: 800 11px/1 var(--ui); color: var(--ink-3); }
.rc-stats dd { margin: 5px 0 0; font: 800 15px/1 var(--ui); font-variant-numeric: tabular-nums; }
.rc-stats .up { color: var(--leaf); }
.rc-mood { position: absolute; top: 14px; left: 14px; z-index: 2; padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.85); font: 800 12px/1 var(--ui); }
.rc-mood.party { background: #DDF6E8; color: #137A47; }
.rc-mood.rain { background: #E1E8FA; color: #3D58A6; }
.empty { grid-column: 1 / -1; padding: 48px; border-radius: 30px; background: rgba(255, 255, 255, 0.7); text-align: center; font-weight: 700; color: var(--ink-2); }

/* resident page */
.res-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-top: 104px; }
.res-stage {
  position: relative; aspect-ratio: 1 / 0.92; border-radius: 40px; overflow: hidden;
  background: radial-gradient(80% 70% at 50% 40%, #fff 0%, color-mix(in srgb, var(--c, #FFC2AA) 38%, #DDF1FF) 55%, color-mix(in srgb, var(--c, #FFC2AA) 30%, #A9DBFF) 100%);
  box-shadow: var(--lift);
}
.res-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.res-stage canvas:active { cursor: grabbing; }
.stage-hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); margin: 0; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.75); font: 800 12px/1 var(--ui); color: var(--ink-2); pointer-events: none; }
.back { display: inline-flex; align-items: center; gap: 6px; font: 800 14px/1 var(--ui); color: var(--ink-2); text-decoration: none; }
.back::before { content: ''; width: 8px; height: 8px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); }
.back:hover { color: var(--ink); }
.res-info h1 { margin: 18px 0 0; font: 400 clamp(60px, 7.5vw, 104px)/0.88 var(--display); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.res-tick { margin: 10px 0 0; font: 800 18px/1 var(--ui); color: color-mix(in srgb, var(--c, #FFC2AA) 30%, var(--ink)); }
.res-bio { margin: 18px 0 24px; font-size: 19px; line-height: 1.5; color: var(--ink-2); max-width: 36ch; }
.res-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.res-actions .btn:disabled { opacity: 0.55; cursor: default; }
.res-stats { margin: 24px 0 0; gap: 10px; }
.res-stats div { background: rgba(255, 255, 255, 0.72); }
.res-stats dd { font-size: 22px; }

.ladder { margin-top: 56px; padding: 32px 36px 36px; }
.ladder-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; }
.ladder-head h2, .diary h2, .pals h2 { margin: 0; font: 400 34px/1 var(--display); }
.ladder-head p { margin: 0; color: var(--ink-2); font-size: 16px; }
.ladder-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 24px 0 18px; padding: 0; list-style: none; }
.ladder-row li { display: grid; justify-items: center; gap: 2px; padding: 10px 6px 14px; border-radius: 22px; background: #F7F3FC; text-align: center; opacity: 0.55; filter: saturate(0.4); transition: opacity 0.3s; }
.ladder-row li.done { opacity: 0.85; filter: none; }
.ladder-row li.now { opacity: 1; filter: none; background: #FFF3C7; box-shadow: inset 0 0 0 3px var(--sun); }
.ladder-row img { width: 100%; max-width: 120px; aspect-ratio: 1; object-fit: contain; }
.ladder-row b { font: 800 15px/1.1 var(--ui); }
.ladder-row span { font: 700 12px/1.2 var(--ui); color: var(--ink-3); }
.ladder-bar { height: 12px; border-radius: 999px; background: #EFE8F7; overflow: hidden; }
.ladder-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #FFE07A, var(--sun)); }

.res-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.diary, .pals { padding: 30px 32px; }
.diary ol { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 4px; }
.diary li { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 12px 0; border-top: 2px dashed #EFE8F7; }
.diary li:first-child { border-top: 0; }
.diary time { font: 800 13px/1.6 var(--ui); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.diary p { margin: 0; font-size: 16px; line-height: 1.5; }
.pals ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.pals a { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border-radius: 18px; background: #F7F3FC; text-decoration: none; color: var(--ink-2); font-size: 13px; font-weight: 700; }
.pals a:hover { background: #F0E9FA; }
.pals .face { width: 52px; height: 52px; }
.pals b { display: block; font: 400 20px/1.1 var(--display); color: var(--ink); }

/* how it works */
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.how-step { display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
.how-wide { grid-column: 1 / -1; grid-template-rows: none; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); align-items: center; }
.how-copy { padding: 26px 32px 32px; }
.how-n { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; font: 400 20px/1 var(--display); }
.how-step h2 { margin: 14px 0 10px; font: 400 32px/1 var(--display); text-wrap: balance; }
.how-step p { margin: 0 0 20px; font-size: 16px; line-height: 1.55; color: var(--ink-2); max-width: 44ch; }
.how-art { position: relative; height: 270px; background: radial-gradient(90% 90% at 50% 30%, #fff, #E4F3FF 70%, #CFEAFF); overflow: hidden; }
.how-art img { position: absolute; }
#art-launch .float { width: 150px; left: 50%; top: 58px; margin-left: -110px; animation: drift 4s ease-in-out infinite alternate; }
#art-launch .tent { width: 170px; right: 13%; bottom: 8px; }
#art-launch .balloon { position: absolute; left: 50%; top: 2px; margin-left: -60px; width: 56px; height: 64px; border-radius: 50% 50% 46% 46%; background: #FF6F9C; box-shadow: inset -8px -8px 0 rgba(0, 0, 0, 0.08); animation: drift 4s ease-in-out infinite alternate; }
#art-launch .balloon::after { content: ''; position: absolute; left: 50%; top: 64px; width: 2px; height: 34px; background: #fff; }
@keyframes drift { from { transform: translateY(-6px) rotate(-3deg); } to { transform: translateY(8px) rotate(3deg); } }
.how-chat .pair { position: absolute; left: 50%; bottom: 0; display: flex; transform: translateX(-50%); }
.how-chat .pair img { position: static; width: 170px; margin: 0 -14px; }
.say { position: absolute; margin: 0; padding: 8px 13px 9px; border-radius: 16px; background: #fff; font: 700 15px/1.2 var(--ui); box-shadow: 0 3px 0 rgba(46, 29, 69, 0.12); }
.say::after { content: ''; position: absolute; bottom: -6px; width: 12px; height: 12px; background: #fff; transform: rotate(45deg); border-radius: 0 0 3px 0; }
.say-a { left: 18%; top: 34px; } .say-a::after { left: 26px; }
.say-b { right: 20%; top: 64px; } .say-b::after { right: 26px; }
.how-art-fest { height: 100%; min-height: 280px; margin: 0; }
.how-houses { list-style: none; margin: 0; padding: 24px 28px 24px 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; }
.how-houses li { display: grid; justify-items: center; gap: 2px; text-align: center; }
.how-houses img { width: 100%; max-width: 130px; aspect-ratio: 1; object-fit: contain; }
.how-houses b { font: 800 14px/1.1 var(--ui); }
.how-houses span { font: 700 12px/1 var(--ui); color: var(--ink-3); }
.mini-podium { position: absolute; inset: auto 0 0; display: flex; justify-content: center; align-items: end; gap: 8px; }
.mp { display: grid; justify-items: center; }
.mp img { position: static; width: 120px; margin-bottom: -12px; }
.mp span { display: grid; place-items: center; width: 120px; border-radius: 16px 16px 0 0; font: 400 26px/1 var(--display); }
.mp1 { order: 2; } .mp1 span { height: 100px; background: #FFE07A; }
.mp2 { order: 1; } .mp2 span { height: 74px; background: #E3D8FF; }
.mp3 { order: 3; } .mp3 span { height: 56px; background: #FFD3C2; }
.moods { margin-top: 18px; padding: 32px 36px 36px; }
.moods h2, .tiny h2, .faq h2 { margin: 0; font: 400 38px/1 var(--display); }
.mood-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
.mood-card { --c: #FFC2AA; padding: 14px 22px 22px; border-radius: 26px; background: color-mix(in srgb, var(--c) 22%, #fff); text-align: center; }
.mood-card img { width: 180px; margin: 0 auto; }
.mood-card h3 { margin: 0 0 6px; font: 400 22px/1.1 var(--display); }
.mood-card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.tiny { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: center; margin-top: 18px; padding: 40px; background: linear-gradient(135deg, #FFF6D6, #fff 60%); scroll-margin-top: 24px; }
.tiny h2 { font-size: 64px; }
.tiny-copy > p { margin: 12px 0 0; font-size: 18px; color: var(--ink-2); }
.tiny-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.tiny-list li { padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.8); box-shadow: inset 0 0 0 2px #F3EAD0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.tiny-list b { display: block; color: var(--ink); font-size: 16px; }
.tiny-ca { margin: 18px 0 0; font-weight: 800; font-size: 14px; }
.tiny-ca span { color: var(--ink-3); }
.tiny-art { position: relative; height: 300px; }
.tiny-art img { position: absolute; width: 130px; }
.tiny-art .t0 { left: 2%; top: 40%; } .tiny-art .t1 { left: 18%; top: 8%; } .tiny-art .t2 { left: 34%; top: 46%; width: 150px; }
.tiny-art .t3 { left: 50%; top: 4%; width: 160px; } .tiny-art .t4 { left: 64%; top: 44%; } .tiny-art .t5 { left: 78%; top: 12%; } .tiny-art .t6 { left: 84%; top: 52%; width: 110px; }
.faq { margin-top: 64px; max-width: 760px; }
.faq h2 { margin-bottom: 18px; }
.faq details { margin-bottom: 10px; border-radius: 20px; background: rgba(255, 255, 255, 0.8); box-shadow: var(--lift-sm); }
.faq summary { padding: 18px 22px; font: 800 17px/1.3 var(--ui); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 400 24px/1 var(--display); color: var(--ink-3); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 22px 20px; font-size: 16px; line-height: 1.6; color: var(--ink-2); }

@media (max-width: 900px) {
  .how-steps { grid-template-columns: 1fr; }
  .how-wide { grid-template-columns: 1fr; }
  .how-houses { grid-template-columns: repeat(3, 1fr); padding: 0 20px 24px; }
  .how-copy { padding: 22px 22px 26px; }
  .mood-row { grid-template-columns: 1fr; }
  .tiny { grid-template-columns: 1fr; padding: 26px; }
  .tiny h2 { font-size: 48px; }
  .tiny-art { height: 220px; }
  .tiny-art img { width: 90px !important; }
}

/* move in */
.mv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: 32px; align-items: start; padding-top: 104px; }
.mv-stage-col { position: sticky; top: 24px; }
.mv-stage { aspect-ratio: 1 / 1.02; }
.roll { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); }
.roll:active { transform: translateX(-50%) translateY(3px); }
.mv-form { padding: 36px 34px 30px; }
.mv-form h1 { margin: 0; font: 400 clamp(44px, 5vw, 62px)/0.95 var(--display); letter-spacing: -0.01em; }
.lede { margin: 14px 0 26px; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.pick { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.pick legend, .field { font: 800 14px/1 var(--ui); color: var(--ink); }
.pick legend { margin-bottom: 10px; padding: 0; }
.opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.opts[data-gene="shape"] { grid-template-columns: repeat(6, 1fr); }
.opts.swatches { grid-template-columns: repeat(12, 1fr); gap: 6px; }
.th { display: grid; justify-items: center; gap: 2px; min-width: 0; padding: 6px 4px 8px; border: 0; border-radius: 18px; background: #F7F3FC; cursor: pointer; transition: transform 0.15s cubic-bezier(.3, .7, .4, 1.6), background 0.15s; }
.th img { width: 100%; max-width: 76px; aspect-ratio: 1; }
.th span { font: 700 11px/1.1 var(--ui); color: var(--ink-2); }
.th:hover { background: #F0E9FA; transform: translateY(-2px); }
.th[aria-pressed="true"] { background: #FFF3C7; box-shadow: inset 0 0 0 2.5px var(--sun); }
.th[aria-pressed="true"] span { color: var(--ink); }
.sw { --c: #FFC2AA; width: 100%; aspect-ratio: 1; border: 0; border-radius: 50%; background: var(--c); cursor: pointer; box-shadow: inset 0 -4px 0 rgba(46, 29, 69, 0.1), 0 0 0 2px #fff, 0 0 0 4px transparent; transition: transform 0.15s cubic-bezier(.3, .7, .4, 1.6); }
.sw:hover { transform: scale(1.1); }
.sw[aria-pressed="true"] { box-shadow: inset 0 -4px 0 rgba(46, 29, 69, 0.1), 0 0 0 3px #fff, 0 0 0 6px var(--ink); }
.row2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; margin-top: 26px; }
.field { position: relative; display: grid; gap: 8px; margin-top: 14px; }
.row2 .field { margin-top: 0; }
.field input, .field textarea { width: 100%; padding: 13px 16px; border: 0; border-radius: 16px; background: #F4EFFA; font: 700 16px/1.35 var(--ui); color: var(--ink); resize: none; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--sun); background: #fff; }
.field ::placeholder { color: #B3A8C6; }
.count { position: absolute; right: 12px; bottom: 10px; font: 700 12px/1 var(--ui); color: var(--ink-3); }
.help { margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.logo-prev { display: flex; align-items: center; gap: 14px; margin: 22px 0; padding: 12px; border-radius: 20px; background: #F7F3FC; }
.logo-prev .face { width: 64px; height: 64px; }
.logo-prev p { margin: 0; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.logo-prev b { display: block; margin-bottom: 2px; font-size: 15px; color: var(--ink); }
.mv-go { width: 100%; min-height: 58px; font-size: 18px; }
.mv-status { margin: 12px 0 0; min-height: 1.4em; font-weight: 800; font-size: 14px; }
.mv-status.ok { color: #137A47; }
.mv-status.bad { color: #C2264E; }
.fine { margin: 10px 0 0; font-size: 13px; line-height: 1.45; color: var(--ink-3); }

@media (max-width: 900px) {
  .mv { grid-template-columns: 1fr; gap: 18px; }
  .mv-stage-col { position: relative; top: 0; }
  .mv-form { padding: 26px 20px; }
  .opts.swatches { grid-template-columns: repeat(6, 1fr); }
  .opts[data-gene="shape"] { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .res-hero { grid-template-columns: 1fr; gap: 24px; }
  .ladder { padding: 24px 20px; }
  .ladder-row { grid-template-columns: repeat(3, 1fr); }
  .res-cols { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .page-head { padding-top: 110px; }
  .festival { grid-template-columns: 1fr; padding: 26px; }
  .podium { min-height: 260px; }
  .dir-head { margin-top: 56px; }
  .search { width: 100%; }
  .tools { width: 100%; }
  .foot nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* $TINY address row (hello panel + how page), shown once TINY_CA is set */
.ca-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hello .ca-row { margin: -8px 0 18px; max-width: none; }
.ca-row .ca { font: 800 13px/1.3 var(--ui); color: var(--ink); background: rgba(46, 29, 69, 0.07); border: 0; border-radius: 999px; padding: 8px 12px; cursor: pointer; word-break: break-all; text-align: left; }
.ca-row .ca:hover { background: rgba(46, 29, 69, 0.12); }
.ca-row .btn { padding: 8px 14px; font-size: 13px; }

/* live town: optional first buy, a disabled button while a move-in runs, a townsfolk card */
.field .opt { font-style: normal; font-weight: 700; color: var(--ink-3); margin-left: 6px; }
.mv-go:disabled { opacity: 0.6; cursor: progress; }
.card .folk { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: #F4EFFA; font-weight: 700; font-size: 14px; color: var(--ink-2); }
