/* Four drafts of the interface over the town, one per html[data-ui]:
   a  the map app      quiet: a search pill on top, round buttons at the side, sheets from the bottom
   b  one button       quietest: the town alone, one round button that fans the menu out
   c  the city builder chunky: outlined tiles with a pressed edge, counters as chips
   d  the street sign  a tab bar on the bottom edge, the town and the house card as blue street signs */
:root { --ink: #0A0F2C; --yel: #7FD3F7; --paper: #fffdf7; --sign: #1b4b9b; --soft: #0a0f2ca8; --face: Heebo;
  --top: max(12px, env(safe-area-inset-top)); --bot: env(safe-area-inset-bottom, 0px); --out: cubic-bezier(.16, 1, .3, 1); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #c6e3f5; overflow: hidden; font-family: var(--face), system-ui, sans-serif; color: var(--ink); -webkit-tap-highlight-color: transparent; }
canvas { display: block; touch-action: none; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
h2, p { margin: 0; }
::selection { background: var(--yel); color: var(--ink); }
:focus-visible { outline: 3px solid var(--yel); outline-offset: 2px; }
.i { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
#hud, #sheet, #dock, #menu, #panel { position: fixed; z-index: 2; }
#hud, #sheet { pointer-events: none; } #sheet > *, #hud > * { pointer-events: auto; }
#count i { font-style: normal; } #daily { display: none; }
#menu { display: none; }
#card { display: none; position: relative; } #card.on { display: grid; animation: rise .45s var(--out); }
/* the x that closes the card (main.js) */
#cardx { position: absolute; z-index: 1; top: 3px; inset-inline-end: 6px; width: 36px; height: 36px; display: grid; place-items: center; } #cardx .i { width: 20px; height: 20px; stroke: var(--ink); stroke-width: 2.6; fill: none; stroke-linecap: round; }
#card .who { direction: ltr; text-align: right; } #card .more:empty { display: none; }
#card.miss #share, #card.place #share { display: none; }
/* under "no house yet": ask to be told by DM when it is built (ui.js) */
#notify { display: none; } #card.miss #notify:not([hidden]) { display: block; grid-column: 1 / -1; grid-row: 5; justify-self: stretch; margin-top: 10px; padding-block: 11px; font-size: 17px; text-align: center; }
.acts a.cta { text-align: center; text-decoration: none; color: var(--ink); }
@keyframes rise { from { transform: translateY(18px) scale(.97); opacity: 0; } }
input { flex: 1; min-width: 0; border: 0; background: transparent; font: 600 17px var(--face), system-ui; padding: 8px 12px; direction: ltr; text-align: left; color: var(--ink); caret-color: var(--ink); outline: none; }
input::placeholder { color: var(--soft); } input:focus-visible { outline: none; } #find:focus-within { outline: 3px solid var(--yel); outline-offset: 2px; }
#credit { position: fixed; z-index: 1; top: var(--top); left: 10px; font: 10px system-ui; opacity: .55; direction: ltr; display: none !important; }
#loading { position: fixed; z-index: 9; inset: 0; display: grid; place-items: center; background: #c6e3f5; font-weight: 800; font-size: 20px; transition: opacity .4s; }
#loading.off { opacity: 0; pointer-events: none; } #loading > div { text-align: center; }
/* the bar fills by itself towards nine tenths over a quarter of a minute, quickly at first, and is full when the town is ready; under it eight lines take turns.
   Only transform and opacity move, so the browser keeps them going while the page's own thread is busy building the town. */
#loading .bar { width: min(280px, 70vw); height: 14px; margin: 18px auto 12px; border: 2.5px solid #0A0F2C; border-radius: 9px; background: #fffdf7; overflow: hidden; }
#loading .bar i { display: block; height: 100%; background: #7FD3F7; transform-origin: right center; transform: scaleX(0); animation: load-fill 16s cubic-bezier(.08, .6, .25, 1) forwards; }
#loading.off .bar i { animation: none; transform: scaleX(1); }
#loading .steps { position: relative; height: 1.7em; font-size: 15px; font-weight: 600; color: #0a0f2cb3; }
#loading .steps span { position: absolute; inset: 0; opacity: 0; animation: load-step 12.8s linear infinite; }
#loading .steps span:nth-child(2) { animation-delay: 1.6s; } #loading .steps span:nth-child(3) { animation-delay: 3.2s; } #loading .steps span:nth-child(4) { animation-delay: 4.8s; } #loading .steps span:nth-child(5) { animation-delay: 6.4s; }
#loading .steps span:nth-child(6) { animation-delay: 8s; } #loading .steps span:nth-child(7) { animation-delay: 9.6s; } #loading .steps span:nth-child(8) { animation-delay: 11.2s; }
@keyframes load-fill { to { transform: scaleX(.92); } }
@keyframes load-step { 0% { opacity: 0; transform: translateY(6px); } 1.5%, 11% { opacity: 1; transform: none; } 12.5%, 100% { opacity: 0; transform: translateY(-6px); } }
.spark { font-size: 72px; line-height: 1; margin-bottom: 14px; animation: hop .9s ease-in-out infinite; }
@keyframes hop { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-14px) rotate(6deg); } }

/* the panel (residents, upgrade, more): the same parts everywhere, dressed by each draft */
#panel { z-index: 4; inset-inline: var(--px, 0px); bottom: var(--pb, 0px); max-width: 480px; margin-inline: auto; max-height: min(62vh, 520px); display: flex; flex-direction: column; background: var(--paper); animation: rise .4s var(--out); }
#panel[hidden] { display: none; }
#panel > header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 8px; }
#panel h2 { font-size: 20px; font-weight: 800; line-height: 1.2; }
#pclose { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; margin-inline-end: -8px; }
#pbody { overflow-y: auto; padding: 4px 18px calc(18px + var(--bot)); display: grid; gap: 12px; }
#pbody p { font-size: 16px; line-height: 1.5; font-weight: 500; } #pbody .fine { font-size: 12px; color: var(--soft); direction: ltr; text-align: right; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: #0a0f2c12; }
.seg button { padding: 8px; border-radius: 10px; font-weight: 700; font-size: 15px; } .seg.three { grid-template-columns: 1fr 1fr 1fr; }
.seg [aria-pressed=true] { background: var(--ink); color: #fff; }
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 12px; padding: 9px 4px; text-align: start; border-bottom: 1px solid #0a0f2c14; }
.row .n { min-width: 52px; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.row .u { direction: ltr; font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; }
.cta { justify-self: start; padding: 10px 22px; border-radius: 999px; background: var(--yel); font-weight: 800; } .cta:disabled { opacity: .5; cursor: default; }
body.paneled #sheet { display: none; }

/* ---- a: the map app ------------------------------------------------------------------------------------------------ */
[data-ui=a] #sheet { inset: 0; }
[data-ui=a] #find { position: absolute; top: var(--top); inset-inline: 12px; max-width: 440px; margin-inline: auto; display: flex; align-items: center; padding: 5px; border-radius: 28px; background: var(--paper); box-shadow: 0 1px 3px #0a0f2c26, 0 10px 28px #0a0f2c2e; }
[data-ui=a] #find button { width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; transition: transform .15s var(--out); }
[data-ui=a] #find button:active { transform: scale(.92); }
[data-ui=a] #find button span { position: absolute; clip-path: inset(50%); }
[data-ui=a] #name::placeholder { font-size: 15px; }
[data-ui=a] #hud { top: calc(var(--top) + 68px); inset-inline: 12px; max-width: 440px; margin-inline: auto; display: flex; }
[data-ui=a] #count { padding: 5px 12px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: 13px; }
[data-ui=a] #count b { color: var(--yel); }
[data-ui=a] #dock { right: 12px; bottom: calc(28px + var(--bot)); display: grid; gap: 10px; transition: bottom .45s var(--out); }
[data-ui=a] body:has(#card.on) #dock { bottom: calc(176px + var(--bot)); }
[data-ui=a] #dock [data-act=find] { display: none; }
[data-ui=a] #dock button { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); box-shadow: 0 1px 3px #0a0f2c26, 0 8px 20px #0a0f2c2e; transition: transform .15s var(--out), background .2s; }
[data-ui=a] #dock button:active { transform: scale(.92); }
[data-ui=a] #dock button.on { background: var(--ink); color: var(--yel); }
[data-ui=a] #dock span { position: absolute; clip-path: inset(50%); }
[data-ui=a] #card, [data-ui=a] #panel { border-radius: 26px 26px 0 0; box-shadow: 0 -10px 34px #0a0f2c33; }
[data-ui=a] #card { position: absolute; bottom: 0; inset-inline: 0; max-width: 480px; margin-inline: auto; grid-template-columns: 1fr auto; align-items: center; gap: 2px 14px; padding: 26px 22px calc(22px + var(--bot)); background: var(--paper); }
[data-ui=a] #card::before, [data-ui=a] #panel::before { content: ''; position: absolute; top: 9px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: #0a0f2c2e; }
[data-ui=a] #card .who { grid-column: 1 / -1; font-weight: 700; font-size: 14px; color: var(--soft); }
[data-ui=a] #card .more { grid-column: 1 / -1; font-size: 13px; font-weight: 600; color: var(--soft); }
[data-ui=a] #card .no { font-weight: 900; font-size: 30px; line-height: 1.15; }
[data-ui=a] #card .street { font-weight: 600; font-size: 17px; }
[data-ui=a] #share { grid-row: 3 / span 2; grid-column: 2; padding: 12px 20px; border-radius: 999px; background: var(--yel); font-weight: 800; font-size: 15px; }
[data-ui=a] #card.miss, [data-ui=a] #card.place { grid-template-columns: 1fr; } [data-ui=a] #card.miss .no { font-size: 21px; } [data-ui=a] #card.miss .street { font-size: 14px; }
[data-ui=a] #panel > header { padding-top: 24px; }
[data-ui=a] body.paneled #sheet { display: block; } [data-ui=a] body.paneled #card { display: none; } [data-ui=a] body.paneled #dock { display: none; }

/* ---- b: one button ------------------------------------------------------------------------------------------------- */
[data-ui=b] { --face: Rubik; --lift: calc(108px + var(--bot)); }
[data-ui=b] #hud { top: var(--top); inset-inline: 0; display: grid; justify-items: center; }
[data-ui=b] #count { padding: 6px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; font-size: 13px; }
[data-ui=b] #count b { color: var(--yel); font-weight: 700; }
[data-ui=b] #menu { display: grid; place-items: center; left: 50%; bottom: calc(22px + var(--bot)); width: 68px; height: 68px; margin-left: -34px; z-index: 5; border-radius: 50%; background: var(--yel); box-shadow: 0 2px 4px #0a0f2c33, 0 12px 26px #0a0f2c40; transition: transform .2s var(--out), background .25s; }
[data-ui=b] #menu:active { transform: scale(.92); }
[data-ui=b] #menu .i { grid-area: 1 / 1; width: 30px; height: 30px; transition: transform .35s var(--out), opacity .2s; }
[data-ui=b] #menu .shut, [data-ui=b] body.open #menu .open { opacity: 0; transform: rotate(-90deg) scale(.5); }
[data-ui=b] body.open #menu .shut { opacity: 1; transform: none; }
[data-ui=b] body.open #menu { background: var(--paper); }
[data-ui=b] #dock { left: 50%; bottom: calc(56px + var(--bot)); width: 0; height: 0; z-index: 4; }
[data-ui=b] #dock button { position: absolute; left: -28px; top: -28px; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; box-shadow: 0 8px 20px #0a0f2c47; opacity: 0; pointer-events: none; transform: scale(.3); transition: transform .5s var(--out), opacity .2s; }
[data-ui=b] #dock button:nth-child(1) { --a: 24deg; } [data-ui=b] #dock button:nth-child(2) { --a: 68deg; transition-delay: .03s; }
[data-ui=b] #dock button:nth-child(3) { --a: 112deg; transition-delay: .06s; } [data-ui=b] #dock button:nth-child(4) { --a: 156deg; transition-delay: .09s; }
[data-ui=b] body.open #dock button { opacity: 1; pointer-events: auto; transform: translate(calc(cos(var(--a)) * 118px), calc(sin(var(--a)) * -118px)); }
[data-ui=b] #dock button:active { background: #24306b; }
[data-ui=b] #dock span { position: absolute; top: 60px; padding: 2px 9px; border-radius: 999px; background: var(--paper); color: var(--ink); font-weight: 600; font-size: 12px; white-space: nowrap; box-shadow: 0 2px 8px #0a0f2c2e; }
[data-ui=b] #sheet { inset-inline: 12px; bottom: var(--lift); display: grid; gap: 10px; justify-items: center; }
[data-ui=b] #sheet > * { width: min(100%, 420px); }
[data-ui=b] #find { display: none; gap: 8px; padding: 6px; border-radius: 999px; background: var(--paper); box-shadow: 0 8px 26px #0a0f2c3d; }
[data-ui=b] body.finding #find { display: flex; animation: rise .4s var(--out); } [data-ui=b] body.finding #card, [data-ui=b] body.open #card { display: none; }
[data-ui=b] #find button { padding: 10px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap; } [data-ui=b] #find .i { display: none; }
[data-ui=b] #card { grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 14px 18px; border-radius: 24px; background: var(--ink); color: #fff; box-shadow: 0 12px 30px #0a0f2c4d; }
[data-ui=b] #card .who { grid-column: 1 / -1; color: var(--yel); font-weight: 600; font-size: 14px; } [data-ui=b] #card .more { grid-column: 1 / -1; font-size: 13px; color: #ffffffc7; }
[data-ui=b] #card .no { font-weight: 800; font-size: 26px; line-height: 1.15; } [data-ui=b] #card .street { font-weight: 500; font-size: 16px; color: #ffffffd9; }
[data-ui=b] #share { grid-row: 3 / span 2; grid-column: 2; padding: 10px 18px; border-radius: 999px; background: var(--yel); color: var(--ink); font-weight: 700; }
[data-ui=b] #card.miss, [data-ui=b] #card.place { grid-template-columns: 1fr; } [data-ui=b] #card.miss .no { font-size: 20px; } [data-ui=b] #card.miss .street { font-size: 14px; }
[data-ui=b] #panel { --px: 12px; --pb: var(--lift); border-radius: 24px; box-shadow: 0 12px 34px #0a0f2c4d; } [data-ui=b] #pbody { padding-bottom: 18px; }

/* ---- c: the city builder -------------------------------------------------------------------------------------------- */
[data-ui=c] { --face: Fredoka; --line: 3px solid var(--ink); --dock: calc(90px + var(--bot)); }
[data-ui=c] #hud { top: var(--top); inset-inline: 10px; }
[data-ui=c] #count { display: flex; flex-wrap: wrap; gap: 8px; font-weight: 600; font-size: 16px; } [data-ui=c] #count i { display: none; }
[data-ui=c] #count span { display: flex; align-items: center; gap: 6px; padding: 3px 11px 4px; border: var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 3px 0 var(--ink); }
[data-ui=c] #count .town { background: var(--yel); font-weight: 700; }
[data-ui=c] #count .pop::before, [data-ui=c] #count .day::before { content: ''; width: 18px; height: 18px; background: var(--ink); -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
[data-ui=c] #count .pop { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.500 1.500 12H5v9h5v-6h4v6h5v-9h3.500z'/%3E%3C/svg%3E"); }
[data-ui=c] #count .day { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cpath d='M12 1v4M12 19v4M1 12h4M19 12h4M4.200 4.200 7 7M17 17l2.800 2.800M19.800 4.200 17 7M7 17l-2.800 2.800' stroke='%23000' stroke-width='2.400' stroke-linecap='round'/%3E%3C/svg%3E"); }
[data-ui=c] #dock { inset-inline: 10px; bottom: calc(12px + var(--bot)); max-width: 460px; margin-inline: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
[data-ui=c] #dock button { display: grid; justify-items: center; gap: 1px; padding: 8px 2px 6px; border: var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 5px 0 var(--ink); font-weight: 600; font-size: 14px; transition: transform .08s, box-shadow .08s; }
[data-ui=c] #dock .i { width: 28px; height: 28px; stroke-width: 2.500; }
[data-ui=c] #dock [data-act=find], [data-ui=c] #dock button.on { background: var(--yel); }
[data-ui=c] #dock button:active, [data-ui=c] #dock button.on, [data-ui=c] #find button:active, [data-ui=c] #share:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
[data-ui=c] #sheet { inset-inline: 10px; bottom: var(--dock); display: grid; gap: 10px; justify-items: center; } [data-ui=c] #sheet > * { width: min(100%, 460px); }
[data-ui=c] #find { display: none; gap: 6px; padding: 6px; border: var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 5px 0 var(--ink); }
[data-ui=c] body.finding #find { display: flex; animation: rise .35s var(--out); } [data-ui=c] body.finding #card { display: none; }
[data-ui=c] #find button { padding: 8px 14px; border: 2.500px solid var(--ink); border-radius: 12px; background: var(--yel); box-shadow: 0 3px 0 var(--ink); font-weight: 600; font-size: 16px; white-space: nowrap; margin-bottom: 3px; } [data-ui=c] #find .i { display: none; }
[data-ui=c] #card, [data-ui=c] #panel { border: var(--line); border-radius: 22px; box-shadow: 0 6px 0 var(--ink); overflow: hidden; }
[data-ui=c] #card { grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 0 16px 14px; background: var(--paper); }
[data-ui=c] #card .no { grid-row: 1; grid-column: 1 / -1; margin: 0 -16px 10px; padding: 7px 16px 8px; background: var(--yel); border-bottom: var(--line); font-weight: 700; font-size: 20px; }
[data-ui=c] #card .street { grid-row: 2; grid-column: 1 / -1; font-weight: 600; font-size: 22px; line-height: 1.25; }
[data-ui=c] #card .who { grid-row: 3; grid-column: 1; font-weight: 500; font-size: 15px; color: var(--soft); } [data-ui=c] #card .more { grid-row: 4; grid-column: 1; font-size: 14px; color: var(--soft); }
[data-ui=c] #share { grid-row: 3 / span 2; grid-column: 2; padding: 7px 16px 8px; border: 2.500px solid var(--ink); border-radius: 12px; background: var(--yel); box-shadow: 0 3px 0 var(--ink); font-weight: 600; font-size: 16px; margin-bottom: 3px; }
[data-ui=c] #card.miss .street { font-size: 15px; font-weight: 500; }
[data-ui=c] #panel { --px: 10px; --pb: var(--dock); max-width: 460px; } [data-ui=c] #panel > header { background: var(--yel); border-bottom: var(--line); padding: 8px 16px; } [data-ui=c] #panel h2 { font-weight: 700; }
[data-ui=c] #pbody { padding: 12px 16px 16px; } [data-ui=c] .seg { border: 2.500px solid var(--ink); background: none; } [data-ui=c] .seg button { font-weight: 600; }
[data-ui=c] .cta { border: 2.500px solid var(--ink); border-radius: 12px; box-shadow: 0 3px 0 var(--ink); font-weight: 600; }
/* without the bottom menu (data-dock=off): only the search bar, always there */
[data-ui=c][data-dock=off] { --dock: calc(14px + var(--bot)); }
[data-ui=c][data-dock=off] #dock { display: none; }
[data-ui=c][data-dock=off] #find { display: flex; animation: none; }
/* while a house card is open the search bar goes down out of sight and the card takes its place (not the "no such resident" card: they will want to type again); closing the card brings it
   back. Only transform and opacity move. --find: the bar's height and the gap above it (ui.js measures it). */
[data-ui=c][data-dock=off] #find { transition: transform .45s var(--out), opacity .25s, visibility 0s; }
[data-ui=c][data-dock=off] #sheet:has(#card.on:not(.miss)) #find, [data-ui=c][data-dock=off] body.known:not(.seeking) #find, [data-ui=c][data-dock=off] body.seeking #seek, [data-ui=c][data-dock=off] #sheet:has(#card.on:not(.miss)) #seek { transform: translateY(calc(100% + 30px + var(--bot))); opacity: 0; visibility: hidden; pointer-events: none; transition: transform .45s var(--out), opacity .25s, visibility 0s .45s; }
[data-ui=c][data-dock=off] #card.on:not(.miss) { transform: translateY(var(--find, 72px)); animation-name: rise-low; }
/* a verified visitor: the bar waits below the screen (it keeps its place in the sheet, unseen) and a small button stands on it */
#seek { display: none; }
[data-ui=c][data-dock=off] body.known #seek { position: absolute; bottom: 0; inset-inline: 0; width: fit-content; margin-inline: auto; display: flex; align-items: center; gap: 7px; padding: 8px 18px 9px; border: var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 5px 0 var(--ink); font-weight: 600; font-size: 16px; transition: transform .45s var(--out), opacity .25s, visibility 0s; }
[data-ui=c][data-dock=off] body.known #seek .i { width: 20px; height: 20px; stroke-width: 2.6; }
[data-ui=c][data-dock=off] body.known #seek:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
@keyframes rise-low { from { transform: translateY(calc(var(--find, 72px) + 18px)) scale(.97); opacity: 0; } }

/* ---- d: the street sign --------------------------------------------------------------------------------------------- */
[data-ui=d] { --bar: calc(64px + var(--bot)); --plate: 0 0 0 2px var(--sign), 0 8px 22px #0a0f2c40; }
[data-ui=d] #hud { top: var(--top); inset-inline: 12px; display: flex; }
[data-ui=d] #count { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 5px; max-width: 190px; padding: 5px 13px 7px; border: 2px solid #fff; border-radius: 10px; background: var(--sign); color: #fff; box-shadow: var(--plate); font-weight: 600; font-size: 13px; }
[data-ui=d] #count .town { flex-basis: 100%; font-weight: 900; font-size: 22px; line-height: 1.15; } [data-ui=d] #count i:first-of-type { display: none; }
[data-ui=d] #dock { inset-inline: 0; bottom: 0; z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 6px calc(6px + var(--bot)); background: var(--ink); color: #ffffffb8; }
[data-ui=d] #dock button { display: grid; justify-items: center; gap: 2px; padding: 6px 0 5px; border-radius: 14px; font-weight: 700; font-size: 12px; transition: background .2s, color .2s; }
[data-ui=d] #dock button.on { background: #ffffff1a; color: var(--yel); } [data-ui=d] #dock button:active { background: #ffffff26; }
[data-ui=d] #sheet { inset-inline: 12px; bottom: calc(var(--bar) + 12px); display: grid; gap: 10px; justify-items: center; } [data-ui=d] #sheet > * { width: min(100%, 440px); }
[data-ui=d] #find { display: none; gap: 8px; padding: 6px; border-radius: 16px; background: var(--paper); box-shadow: 0 8px 26px #0a0f2c3d; }
[data-ui=d] body.finding #find { display: flex; animation: rise .4s var(--out); } [data-ui=d] body.finding #card { display: none; }
[data-ui=d] #find button { padding: 10px 16px; border-radius: 11px; background: var(--sign); color: #fff; font-weight: 800; font-size: 15px; white-space: nowrap; } [data-ui=d] #find .i { display: none; }
[data-ui=d] #card { grid-template-columns: 1fr auto; align-items: center; gap: 0 14px; padding: 12px 14px 12px 12px; border: 2px solid #fff; border-radius: 12px; background: var(--sign); color: #fff; box-shadow: var(--plate); }
[data-ui=d] #card .street { grid-row: 1; grid-column: 1; font-weight: 900; font-size: 25px; line-height: 1.2; text-wrap: balance; }
[data-ui=d] #card .who { grid-row: 2; grid-column: 1; margin-top: 2px; font-weight: 600; font-size: 14px; color: #ffffffd6; }
[data-ui=d] #card .more { grid-row: 3; grid-column: 1; font-size: 13px; color: #ffffffc2; }
[data-ui=d] #card .no { grid-row: 1 / span 2; grid-column: 2; width: 76px; padding: 7px 4px 8px; border-radius: 8px; background: #fff; color: var(--sign); font-weight: 900; font-size: 13px; line-height: 1.15; text-align: center; }
[data-ui=d] #share { grid-row: 3 / span 2; grid-column: 2; margin-top: 8px; padding: 6px 0; border: 2px solid #fff; border-radius: 8px; font-weight: 800; font-size: 14px; }
[data-ui=d] #card.miss, [data-ui=d] #card.place { grid-template-columns: 1fr; } [data-ui=d] #card.miss .no, [data-ui=d] #card.place .no { grid-row: 1; grid-column: 1; width: auto; margin-bottom: 8px; font-size: 16px; } [data-ui=d] #card.miss .street { grid-row: 2; font-size: 14px; font-weight: 600; }
[data-ui=d] #panel { --pb: var(--bar); border-radius: 18px 18px 0 0; box-shadow: 0 -10px 30px #0a0f2c38; } [data-ui=d] #panel > header { margin: 10px 10px 0; padding: 6px 14px; border: 2px solid #fff; border-radius: 10px; background: var(--sign); color: #fff; box-shadow: 0 0 0 2px var(--sign); }
[data-ui=d] #panel h2 { font-weight: 900; } [data-ui=d] #pbody { padding-top: 12px; padding-bottom: 16px; } [data-ui=d] .seg [aria-pressed=true] { background: var(--sign); }

@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* the land office panel: its two choices, one under the other, full width */
#panel[data-kind=office] .cta { justify-self: stretch; padding-block: 12px; font-size: 17px; }
/* a landmark's address, beside its name in the panel's title: lighter and smaller, after a thin divider */
#ptitle small { display: inline-block; font-size: 15px; font-weight: 500; opacity: .72; margin-inline-start: 8px; padding-inline-start: 10px; border-inline-start: 2px solid #0a0f2c40; white-space: nowrap; }

/* the land office's forms: a label over each field, a quiet note, an error line, and the two actions side by side */
#mates, #lotto { display: grid; gap: 12px; }
.field { display: grid; gap: 5px; } .field > span { font-size: 14px; font-weight: 700; color: var(--soft); }
.field input { width: 100%; box-sizing: border-box; padding: 10px 14px; border-radius: 12px; border: 2.5px solid var(--ink); background: #fff; font: 600 17px var(--face), system-ui; color: var(--ink); direction: ltr; text-align: left; }
.field input:focus-visible { outline: 3px solid var(--yel); outline-offset: 2px; }
#pbody .note { font-size: 14px; line-height: 1.45; color: var(--soft); padding: 9px 12px; border-radius: 12px; background: #0a0f2c0d; }
#pbody .err { font-size: 15px; font-weight: 700; color: #b3261e; }
.acts { display: flex; align-items: center; gap: 14px; } .acts .cta { flex: 1; padding-block: 12px; font-size: 17px; } .back { padding: 10px 6px; font-weight: 700; color: var(--soft); text-decoration: underline; text-underline-offset: 3px; }
#pbody .pair { text-align: center; font-size: 20px; direction: ltr; } #pbody .pair small { display: block; direction: rtl; font-size: 15px; font-weight: 600; color: var(--soft); }
#panel[data-kind=partners], #panel[data-kind=send] { max-height: min(86vh, 640px); }

/* sending a request: three numbered steps; the message stands in its own box with a copy button beside it */
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 6px 10px; align-items: start; font-size: 16px; line-height: 1.45; font-weight: 500; }
.steps li::before { content: counter(step); grid-row: 1 / span 2; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--yel); font-weight: 800; font-size: 15px; }
.steps li > * { grid-column: 2; } .steps a.cta { justify-self: stretch; text-align: center; text-decoration: none; color: var(--ink); padding-block: 11px; font-size: 16px; }
.msg { display: flex; align-items: stretch; gap: 8px; } .msg code { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 2.5px dashed var(--ink); background: #fff; font: 700 17px var(--face), system-ui; direction: rtl; unicode-bidi: plaintext; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.copy { padding: 0 14px; border-radius: 12px; border: 2.5px solid var(--ink); background: var(--yel); box-shadow: 0 3px 0 var(--ink); font-weight: 700; white-space: nowrap; } .copy:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.cta.quiet { background: var(--paper); }
/* the step people miss: the other side has to send a request too. Red, with a loud label */
.steps li.warn { padding: 10px 12px; border: 2.5px solid #c8281e; border-radius: 14px; background: #c8281e12; }
.steps li.warn::before { background: #c8281e; color: #fff; }
.steps li.warn b { display: inline-block; margin-inline-end: 4px; padding: 0 8px 1px; border-radius: 8px; background: #c8281e; color: #fff; font-weight: 800; }

/* the homes catalogue in the land office's panel: pictures in a grid, a heading over each section */
#panel[data-kind=catalog] { max-height: min(86vh, 720px); max-width: 560px; }
#homes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#homes h3 { grid-column: 1 / -1; margin: 6px 0 0; font-size: 17px; font-weight: 800; } #homes .wait { grid-column: 1 / -1; text-align: center; color: var(--soft); padding: 30px 0; }
#homes figure { position: relative; margin: 0; border: 2.5px solid var(--ink); border-radius: 14px; overflow: hidden; background: #fff; }
#homes canvas { display: block; width: 100%; height: auto; } #homes i { position: absolute; top: 6px; right: 6px; font-style: normal; font-size: 12px; font-weight: 800; background: var(--ink); color: var(--yel); border-radius: 999px; padding: 1px 8px; }
#homes figcaption { padding: 5px 8px 7px; font-size: 13px; font-weight: 700; line-height: 1.25; border-top: 2.5px solid var(--ink); } #homes small { display: block; font-size: 11px; font-weight: 500; color: var(--soft); }
@media (max-width: 420px) { #homes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
#homes.rare { grid-template-columns: repeat(2, minmax(0, 1fr)); } #homes.rare small { margin-top: 3px; line-height: 1.35; font-size: 12px; color: var(--ink); opacity: .75; }

/* the back arrow at the start of a panel's header (the land office's inner panels) */
#pback { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; margin-inline-start: -8px; margin-inline-end: 4px; flex: none; } #pback[hidden] { display: none; }
#panel > header h2 { flex: 1; }
#homes .sub { grid-column: 1 / -1; margin: 2px 0 -2px; font-size: 14px; font-weight: 600; color: var(--soft); }

/* a field no person sees or fills in (the lottery form): what fills it in is not a person */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
#panel[data-kind=lottery] { max-height: min(86vh, 640px); }

/* choosing a new house: the regular homes as buttons, then the one that was chosen beside the message to send */
#panel[data-kind=pick], #panel[data-kind=swap] { max-height: min(86vh, 720px); } #panel[data-kind=pick] { max-width: 560px; }
#homes .home { position: relative; display: block; padding: 0; border: 2.5px solid var(--ink); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 3px 0 var(--ink); text-align: start; transition: transform .12s; }
#homes .home:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); } #homes .home span { display: block; padding: 5px 8px 7px; font-size: 13px; font-weight: 700; line-height: 1.25; border-top: 2.5px solid var(--ink); background: var(--yel); }
.chosen { display: flex; align-items: center; gap: 12px; } #chosen { width: 96px; flex: none; border: 2.5px solid var(--ink); border-radius: 14px; overflow: hidden; } #chosen canvas { display: block; width: 100%; height: auto; }
#pbody .chosen p { font-size: 19px; line-height: 1.25; } .chosen small { display: block; font-size: 14px; font-weight: 500; color: var(--soft); }

/* small phones: the search box and the house card are never wider than the screen (a grid column is as wide as its
   content unless told otherwise, and a text field has a width of its own) */
[data-ui=c] #sheet { grid-template-columns: minmax(0, 1fr); }
#find input { min-width: 0; }
@media (max-width: 340px) { [data-ui=c] #find button { padding-inline: 10px; font-size: 15px; } }

/* who this browser belongs to: the line at the top of the office, invitations, the state of what was asked, and the wait for the code */
#pbody .whoami { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--soft); padding-bottom: 8px; border-bottom: 2px dashed #0a0f2c2e; } #pbody .whoami b { color: var(--ink); } .whoami .back { padding: 0; font-size: 13px; }
.invite { padding: 10px 12px; border: 2.5px solid var(--ink); border-radius: 14px; background: var(--yel); display: grid; gap: 8px; } .invite .cta { background: #fff; padding-block: 8px; }
#pbody .status { font-size: 14px; line-height: 1.45; padding: 9px 12px; border-radius: 12px; background: #0a0f2c0d; } #pbody .status.ok { background: #1f8f4522; font-weight: 600; } .status .back { padding: 0 4px; font-size: 13px; }
#pbody .waiting { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--soft); } .waiting i { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 3px solid #0a0f2c2e; border-top-color: var(--ink); animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
#pbody .verified { font-size: 20px; font-weight: 800; text-align: center; padding: 10px; border-radius: 14px; background: #1f8f4522; }
#panel[data-kind=verify], #panel[data-kind=asked], #panel[data-kind=office] { max-height: min(88vh, 700px); }

/* the menu's button, first among the badges at the top, and the menu itself: a list of things to do and places to go */
#nav { display: none; }
/* the header is two lines: the town, its residents, the day (and whoever is verified) on the first, the information centre on the second */
[data-ui=c] #hud { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; font-weight: 600; font-size: 16px; } [data-ui=c] #count { display: contents; } [data-ui=c] #hud::before { content: ''; flex-basis: 100%; height: 0; margin-block: -4px; order: 1; } [data-ui=c] #nav { order: 2; } [data-ui=c] #enlist { order: 3; }
[data-ui=c] #nav { display: flex; flex: none; align-items: center; gap: 6px; padding: 3px 12px 4px; border: var(--line); border-radius: 14px; background: var(--ink); color: #fff; box-shadow: 0 3px 0 #0a0f2c66; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
#nav:active { transform: translateY(3px); box-shadow: none; }
#pbody .navhead { margin: 6px 2px -2px; font-size: 13px; font-weight: 700; color: var(--soft); } #pbody .navhead:first-child { margin-top: 0; }
#pbody .nav { display: grid; gap: 8px; } #pbody .nav.places { grid-template-columns: 1fr 1fr; }
#pbody .nav button, #pbody .nav a { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border: 2.5px solid var(--ink); border-radius: 14px; background: #fff; color: var(--ink); box-shadow: 0 3px 0 var(--ink); font: inherit; font-weight: 700; font-size: 16px; text-align: start; text-decoration: none; cursor: pointer; }
#pbody .nav button:active, #pbody .nav a:active { transform: translateY(3px); box-shadow: none; } #pbody .nav .main { background: var(--yel); }
#pbody .nav em { font-style: normal; font-size: 24px; line-height: 1; flex: none; } #pbody .nav span { display: grid; min-width: 0; } #pbody .nav small { font-weight: 500; font-size: 13px; color: var(--soft); }
#pbody .hows { margin: 0; padding-inline-start: 24px; display: grid; gap: 10px; line-height: 1.5; } #panel[data-kind=nav] { max-height: min(88vh, 760px); }

/* whoever this browser is verified as, among the badges at the top: blue, like the mark over their house */
#count .me { direction: ltr; cursor: pointer; } [data-ui=c] #count .me { background: #2f7fe6; color: #fff; font-weight: 700; } #count .me:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
/* the first-visit hint on a phone: two fingers move, a pinch zooms. A see-through grey sheet over the whole town, as map sites do; touches pass through it */
#hint { position: fixed; z-index: 6; inset: 0; display: grid; align-content: center; justify-items: center; gap: 44px; background: #00000073; color: #fff; font-weight: 600; font-size: 23px; text-align: center; text-shadow: 0 1px 6px #000000a0; pointer-events: none; animation: hint-on .5s; transition: opacity .45s; }
#hint.off { opacity: 0; }
#hint > div { display: grid; justify-items: center; gap: 12px; }
#hint svg { width: 150px; height: 110px; overflow: visible; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 5px #00000080); }
#hint circle { fill: #ffffff59; }
#hint .pan g { animation: hint-pan 1.7s ease-in-out infinite alternate; }
#hint .pinch .a { animation: hint-in 1.7s ease-in-out infinite alternate; } #hint .pinch .b { animation: hint-out 1.7s ease-in-out infinite alternate; }
@keyframes hint-pan { from { transform: translateX(-22px); } to { transform: translateX(22px); } }
@keyframes hint-in { from { transform: translate(8px, -6px); } to { transform: translate(-14px, 10px); } }
@keyframes hint-out { from { transform: translate(-8px, 6px); } to { transform: translate(14px, -10px); } }
@keyframes hint-on { from { opacity: 0; } }
#who { appearance: none; -webkit-appearance: none; } #who::-webkit-search-cancel-button, #who::-webkit-search-decoration { display: none; }

/* inside a place (app/inside.js): only the picture and the walker's own controls are on screen */
body::after { content: ''; position: fixed; inset: 0; z-index: 50; background: #0a0f2c; opacity: 0; pointer-events: none; transition: opacity .3s; }
body.entering::after { opacity: 1; }
body.inside > :not(canvas):not(#inside):not(#home):not(#army):not(#range) { display: none !important; }
#inside { position: fixed; inset: 0; z-index: 20; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: grab; }
#inside #leave { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 14px); left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 11px 18px; border: 0; border-radius: 999px; background: #0a0f2c; color: #fff; font: 800 16px Heebo, system-ui, sans-serif; box-shadow: 0 6px 20px #0a0f2c55; cursor: pointer; }
#inside #walkhint { position: absolute; bottom: calc(env(safe-area-inset-bottom, 0px) + 26px); inset-inline: 16px; margin: 0 auto; width: fit-content; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 16px; background: #0a0f2cd9; color: #fff; font: 700 15px/1.4 Heebo, system-ui, sans-serif; text-align: center; pointer-events: none; }
#inside #stick { display: none; position: absolute; width: 104px; height: 104px; margin: -52px 0 0 -52px; border-radius: 50%; background: #ffffff38; border: 2px solid #ffffffb0; pointer-events: none; }
#inside #stick i { position: absolute; inset: 28px; border-radius: 50%; background: #fffffff0; box-shadow: 0 3px 10px #0a0f2c55; }

/* ---- the resident's ID card (idcard.js): one look in every draft of the interface ---- */
#idcard { position: fixed; z-index: 8; inset: 0; display: grid; place-items: center; padding: max(14px, var(--top)) 14px calc(14px + var(--bot)); background: #0a0f2c73; overflow: auto; animation: idfade .2s; } #idcard[hidden] { display: none; }
.idc { --main: #2F8FD0; --tint: #EAF6FD; position: relative; width: min(100%, 380px); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 6px 0 var(--ink); background: var(--tint); overflow: hidden; animation: rise .4s var(--out); }
.idc::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: var(--main); opacity: .08; -webkit-mask: var(--map) center / cover; mask: var(--map) center / cover; }
.idc > :not(.tip) { position: relative; }
.idc > header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--main); color: #fff; } .idc > header > svg { width: 40px; height: 40px; flex: none; } .idc > header b { display: block; font-size: 18px; line-height: 1.1; } .idc > header small { font-size: 12px; opacity: .85; }
.idc .x { margin-inline-start: auto; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: #fff; } .idc .x .i { width: 22px; height: 22px; stroke-width: 2.8; }
.idc .body { display: grid; grid-template-columns: 104px 1fr; gap: 12px; padding: 14px; } .idc .face { display: block; width: 104px; height: 110px; border: 2.500px solid var(--ink); border-radius: 8px; }
.idc dl { margin: 0; display: grid; gap: 5px; align-content: start; min-width: 0; } .idc dl div { border-bottom: 1.500px dotted color-mix(in srgb, var(--main) 53%, transparent); padding-bottom: 2px; }
.idc dt { font-size: 11px; line-height: 1.2; color: var(--main); font-weight: 700; } .idc dd { margin: 0; font-weight: 700; font-size: 14px; line-height: 1.3; text-align: right; overflow-wrap: anywhere; }      /* the label above its value, both from the right */ .idc dd.ltr { direction: ltr; } .idc dd.num { font-family: ui-monospace, Menlo, monospace; letter-spacing: 2px; font-size: 17px; }
.idc section { padding: 0 14px 16px; } .idc h4 { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .5px; color: var(--main); display: flex; justify-content: space-between; } .idc h4 small { font-weight: 600; opacity: .8; }
.idc .sq { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 8px; } .idc .sq > div { border: 2.500px solid var(--ink); border-radius: 14px; background: #fff; box-shadow: 0 4px 0 var(--ink); padding: 12px 2px 9px; min-height: 100px; margin-bottom: 4px; text-align: center; font-size: 10.500px; font-weight: 700; line-height: 1.15; cursor: pointer; outline: none; }
.idc .sq svg { width: 46px; height: 46px; display: block; margin: 0 auto 8px; } .idc .sq > .none { border: 2px dashed #0a0f2c55; background: #ffffff55; color: #0a0f2c77; box-shadow: none; } .idc .sq > .none svg { opacity: .2; filter: grayscale(1); }
.idc .tip { position: absolute; z-index: 2; width: max-content; max-width: calc(100% - 20px); background: var(--ink); color: #fff; border-radius: 10px; padding: 6px 12px 7px; box-shadow: 0 4px 12px #0a0f2c44; text-align: center; line-height: 1.25; pointer-events: none; animation: idpop .16s ease-out; } .idc .tip p { font-size: 13px; font-weight: 600; } .idc .tip i { position: absolute; bottom: -5px; width: 14px; height: 14px; background: var(--ink); transform: rotate(45deg); border-radius: 2px; }
@keyframes idfade { from { opacity: 0; } } @keyframes idpop { from { opacity: 0; transform: translateY(6px); } }
/* on the house card each resident's name is a button that opens their ID card (main.js) */
#card .who { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; max-height: 126px; overflow-y: auto; padding-block: 2px; }      /* a tower's names scroll inside three rows */ #card .who:empty { display: none; }
.idb { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 2.500px solid var(--ink); border-radius: 12px; background: #fff; box-shadow: 0 3px 0 var(--ink); margin-bottom: 3px; font-weight: 600; font-size: 15px; color: var(--ink); direction: ltr; } .idb svg { width: 22px; height: 16px; flex: none; } .idb:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }

/* who a landmark was built for, in its panel (ui.js) */
.donor { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; font-weight: 600; color: var(--soft); } .donor .idb { margin-bottom: 3px; }
/* the share button sits at the foot of the house card, level with its last line, however tall the list of names beside it is */
#card #share { align-self: end; }
/* the site's own scrollbar, wherever something scrolls: a thin black bar with round ends on nothing. Chrome and Safari draw it from the ::-webkit parts;
   a browser without them (Firefox) is given the two standard properties, which make the same bar without the round ends */
::-webkit-scrollbar { width: 12px; height: 12px; } ::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink, #0A0F2C); border-radius: 99px; border: 4px solid transparent; background-clip: content-box; min-height: 36px; } ::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active { border-width: 3px; }
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: var(--ink, #0A0F2C) transparent; } }
/* the day's news, offered once to each visitor (news.js): a small card over the town with one button; then a tour of the homes, steered from a bar at the screen's foot */
#news { position: fixed; z-index: 9; inset: 0; display: grid; place-items: center; padding: max(14px, var(--top)) 14px calc(14px + var(--bot)); background: #0a0f2c73; animation: idfade .2s; }
.newsc { width: min(100%, 360px); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 var(--ink); background: var(--paper); overflow: hidden; animation: rise .4s var(--out); }
.newsc > header { display: flex; align-items: center; padding: 12px 18px; background: var(--yel); border-bottom: 3px solid var(--ink); } .newsc > header b { font-size: 24px; font-weight: 900; } .newsc .x { margin-inline-start: auto; width: 36px; height: 36px; display: grid; place-items: center; } .newsc .x .i { width: 22px; height: 22px; stroke: var(--ink); stroke-width: 2.8; fill: none; stroke-linecap: round; }
.newsc > p { margin: 16px 18px 4px; font-size: 17px; font-weight: 600; line-height: 1.45; } .newsc .acts { padding: 12px 18px 18px; }
#tour { position: fixed; z-index: 7; bottom: calc(14px + var(--bot)); left: 50%; transform: translateX(-50%); width: min(calc(100% - 20px), 430px); display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 3px solid var(--ink); border-radius: 20px; box-shadow: 0 5px 0 var(--ink); background: var(--paper); animation: rise .4s var(--out); }
#tour .arrow { direction: ltr; unicode-bidi: bidi-override; flex: none; width: 44px; height: 44px; border: 2.5px solid var(--ink); border-radius: 50%; background: var(--yel); box-shadow: 0 3px 0 var(--ink); font-size: 28px; font-weight: 900; line-height: 1; padding-bottom: 4px; } #tour .arrow:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
#tour .what { flex: 1; min-width: 0; text-align: center; line-height: 1.2; } #tour .what b { display: block; font-size: 18px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #tour .what small { font-size: 12.5px; font-weight: 600; color: var(--soft); direction: rtl; unicode-bidi: plaintext; }
#tour .end { flex: none; padding: 9px 12px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 800; font-size: 14px; }
/* while touring, the house's card stays at the screen's foot and the bar sits just over it (news.js sets how high) */


/* ---- going into a house (interior.js): the button on the house card, and the bar and buttons over the room ---- */
#card.miss #enter, #card.place #enter { display: none; }
#enter { grid-row: 5; grid-column: 1 / -1; margin-top: 10px; padding: 9px 16px 10px; border: 2.5px solid var(--ink); border-radius: 12px; background: #7FD3F7; box-shadow: 0 3px 0 var(--ink); font-weight: 700; font-size: 17px; color: var(--ink); }
#enter:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
body.inside #hud, body.inside #sheet, body.inside #dock, body.inside #panel, body.inside #news, body.inside #tour { display: none !important; }
#home { position: fixed; inset: 0; z-index: 20; pointer-events: none; font-family: Heebo, sans-serif; direction: rtl; }
#home header { position: absolute; top: max(12px, var(--top, 0px)); inset-inline: 12px; display: flex; align-items: center; gap: 10px; }
#home header > div { padding: 7px 14px 8px; border: 2.5px solid #0A0F2C; border-radius: 14px; background: #fffdf7; box-shadow: 0 3px 0 #0A0F2C; line-height: 1.2; }
#home header b { display: block; font-size: 16px; } #home header small { font-size: 13px; color: #4a5068; }
#home .out { pointer-events: auto; flex: none; white-space: nowrap; padding: 9px 14px 10px; border: 2.5px solid #0A0F2C; border-radius: 14px; background: #7FD3F7; box-shadow: 0 3px 0 #0A0F2C; font: 700 16px Heebo, sans-serif; color: #0A0F2C; cursor: pointer; }
#home .hint { position: absolute; bottom: calc(110px + var(--bot, 0px)); left: 50%; transform: translateX(-50%); margin: 0; padding: 8px 14px; border-radius: 12px; background: #0A0F2Cd0; color: #fff; font-size: 14px; white-space: nowrap; transition: opacity .6s; }
#home.used .hint { opacity: 0; }
#home .walk { position: absolute; bottom: calc(22px + var(--bot, 0px)); left: 50%; transform: translateX(-50%); display: flex; gap: 14px; }
#home .walk button { pointer-events: auto; width: 64px; height: 64px; border: 2.5px solid #0A0F2C; border-radius: 18px; background: #fffdf7e6; box-shadow: 0 3px 0 #0A0F2C; font-size: 24px; color: #0A0F2C; touch-action: none; user-select: none; -webkit-user-select: none; }
#home .walk button:active { transform: translateY(3px); box-shadow: none; background: #7FD3F7; }

/* ---- צבא האור (army.js): the button at the top, its menu, the base's sticks and the range ---- */
#enlist { display: none; }
[data-ui=c] #enlist { display: flex; flex: none; align-items: center; gap: 6px; padding: 3px 12px 4px; border: var(--line); border-radius: 14px; background: #5d6b3c; color: #fff; box-shadow: 0 3px 0 #0a0f2c66; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
#enlist:active { transform: translateY(3px); box-shadow: none; }
.cta.army { display: flex; flex-direction: column; align-items: center; width: 100%; margin: 10px 0 0; padding: 10px 14px; font-size: 18px; font-weight: 700; background: #e9efd9; }
.cta.army small { font-size: 13px; font-weight: 500; color: #4a5068; }
#army, #range { position: fixed; inset: 0; z-index: 20; pointer-events: none; font-family: Heebo, sans-serif; direction: rtl; user-select: none; -webkit-user-select: none; }
#army header, #range header { position: absolute; top: max(12px, var(--top, 0px)); inset-inline: 12px; display: flex; align-items: center; gap: 10px; }
#army header > div, #range header > div { padding: 7px 14px 8px; border: 2.5px solid #0A0F2C; border-radius: 14px; background: #fffdf7; box-shadow: 0 3px 0 #0A0F2C; line-height: 1.2; }
#army header b, #range header b { display: block; font-size: 16px; } #army header small, #range header small { font-size: 13px; color: #4a5068; }
#army .out, #range .out { pointer-events: auto; flex: none; white-space: nowrap; padding: 9px 14px 10px; border: 2.5px solid #0A0F2C; border-radius: 14px; background: #c9d6a3; box-shadow: 0 3px 0 #0A0F2C; font: 700 16px Heebo, sans-serif; color: #0A0F2C; cursor: pointer; }
#army .hint, #range .hint { position: absolute; bottom: calc(190px + var(--bot, 0px)); left: 50%; transform: translateX(-50%); margin: 0; padding: 8px 14px; border-radius: 12px; background: #0A0F2Cd0; color: #fff; font-size: 14px; white-space: nowrap; transition: opacity .6s; }
#army.used .hint, #range.used .hint { opacity: 0; }
#army .stick { position: absolute; bottom: calc(26px + var(--bot, 0px)); width: 132px; height: 132px; border: 3px solid #0A0F2C; border-radius: 50%; background: #fffdf766; pointer-events: auto; touch-action: none; }
#army .stick.left { left: 22px; } #army .stick.right { right: 22px; }
#army .stick i { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px; border: 3px solid #0A0F2C; border-radius: 50%; background: #c9d6a3; box-shadow: 0 3px 0 #0A0F2C; }
#army .stick.on i { background: #7FD3F7; }
#army .stick span { position: absolute; top: -26px; left: 0; right: 0; text-align: center; font-weight: 700; font-size: 14px; color: #fff; text-shadow: 0 1px 3px #000; }
#range .cross { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px; border: 2.5px solid #ff4d4d; border-radius: 50%; box-shadow: 0 0 0 1px #fff; }
#range .cross::before, #range .cross::after { content: ''; position: absolute; background: #ff4d4d; } #range .cross::before { left: 50%; top: -9px; bottom: -9px; width: 2px; margin-left: -1px; } #range .cross::after { top: 50%; left: -9px; right: -9px; height: 2px; margin-top: -1px; }
#range .score { position: absolute; top: calc(max(12px, var(--top, 0px)) + 66px); inset-inline-start: 12px; margin: 0; padding: 8px 14px; border: 2.5px solid #0A0F2C; border-radius: 14px; background: #0A0F2C; color: #fff; line-height: 1.15; }
#range .score b { font-size: 26px; color: #7FD3F7; margin-inline-end: 6px; } #range .score span { display: block; font-size: 13px; color: #ffffffcc; }
#range .pop { position: absolute; left: 50%; top: 38%; margin: 0; transform: translateX(-50%); font-size: 40px; font-weight: 900; color: #fff; -webkit-text-stroke: 2px #0A0F2C; opacity: 0; }
#range .pop.go { animation: pop .9s ease-out; } #range .pop.great { color: #7FD3F7; } #range .pop.miss { color: #ff9a9a; } #range .pop.pro { color: #FFD45E; font-size: 52px; } #range .pop.pro.go { animation: pop 1.5s ease-out; }
#range .confetti { position: absolute; left: 50%; top: 42%; } #range .confetti i { position: absolute; width: 10px; height: 16px; border-radius: 2px; animation: confetti var(--d) cubic-bezier(.2,.7,.4,1) forwards; }
@keyframes confetti { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 55% { transform: translate(var(--x), var(--y)) rotate(calc(var(--r) / 2)); opacity: 1; } 100% { transform: translate(var(--x), calc(var(--y) + 60vh)) rotate(var(--r)); opacity: 0; } }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.7); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -30px) scale(1); } }
#range .fire { position: absolute; bottom: calc(28px + var(--bot, 0px)); inset-inline-end: 22px; pointer-events: auto; width: 96px; height: 96px; border: 3px solid #0A0F2C; border-radius: 50%; background: #ffd9d9; box-shadow: 0 4px 0 #0A0F2C; font: 800 18px Heebo, sans-serif; color: #0A0F2C; touch-action: manipulation; }
#range .fire:active { transform: translateY(4px); box-shadow: none; background: #ff9a9a; }
#range .end { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(86vw, 340px); padding: 18px; border: 3px solid #0A0F2C; border-radius: 20px; background: #fffdf7; box-shadow: 0 6px 0 #0A0F2C; text-align: center; pointer-events: auto; }
#range .end[hidden] { display: none; } #range .end h3 { margin: 0 0 4px; font-size: 20px; } #range .end p { margin: 4px 0; } #range .end .big { font-size: 34px; font-weight: 900; color: #2F8FD0; } #range .end .grade { font-weight: 800; font-size: 18px; }
#range .end div { display: flex; gap: 10px; margin-top: 12px; } #range .end button { flex: 1; padding: 10px; border: 2.5px solid #0A0F2C; border-radius: 12px; background: #7FD3F7; box-shadow: 0 3px 0 #0A0F2C; font: 700 16px Heebo, sans-serif; color: #0A0F2C; } #range .end .bye { background: #fff; }
