:root {
  --bg: #f6efe2;
  --ink: #3b3226;
  --soft: #7d6f5c;
  --card: #fffaf1;
  --line: #e4d8c3;
  --accent: #f2a33a;
  --accent-ink: #5a3608;
  --good: #6aa84f;
  --night: #2b3366;
  --radius: 18px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  /* THE CLAY: the UI is made of what the map's renders are (soft-lit clay and wood, lit from the top left, no
     outlines); a gentle pillow, not a bevel */
  --clay-hi: #fffcf4; --clay-mid: #f6ecd7; --clay-lo: #eadbbd;
  --clay-shade: inset 0 -3px 5px rgba(130, 90, 40, 0.16), inset 0 2px 2px rgba(255, 255, 255, 0.7), 0 4px 8px -2px rgba(55, 35, 15, 0.26), 0 1px 2px rgba(55, 35, 15, 0.16);
  --clay-press: inset 0 -1px 3px rgba(130, 90, 40, 0.18), inset 0 1px 2px rgba(255, 255, 255, 0.6), 0 2px 3px rgba(55, 35, 15, 0.22);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, sans-serif;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #d9cdb8; color: var(--ink); overscroll-behavior: none; }
/* the boot cover (index.html): over the page until its first frame */
.boot { display: none; }
/* (the splash: the town of the game's own renders and its title, tools/make-splash.mjs; cream till it has loaded) */
.booting .boot { display: flex; position: fixed; inset: 0; z-index: 99; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 15vh; background: #f7f2e2 url(art/splash.jpg) center / cover no-repeat; color: #5a4a36; font: 600 15px/1.3 system-ui, sans-serif; }
/* (under it, the splash itself in miniature: the first paint already looks like it, sharpening as it loads) */
/* splash:tiny (tools/make-splash.mjs writes this line) */ .booting .boot { background-image: url(art/splash.jpg), url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gHYSUNDX1BST0ZJTEUAAQEAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADb/2wBDAA4KCw0LCQ4NDA0QDw4RFiQXFhQUFiwgIRokNC43NjMuMjI6QVNGOj1OPjIySGJJTlZYXV5dOEVmbWVabFNbXVn/2wBDAQ8QEBYTFioXFypZOzI7WVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVn/wAARCABAACQDASIAAhEBAxEB/8QAGgAAAgMBAQAAAAAAAAAAAAAABAUAAgMBBv/EAC8QAAEDAwIEBAUFAQAAAAAAAAECAxEABCESMRNBUWEFFCKBQnGRobEjMkPB8NH/xAAYAQEBAQEBAAAAAAAAAAAAAAABAAMCBP/EAB4RAAMAAgMAAwAAAAAAAAAAAAABEQISEyExI0FR/9oADAMBAAIRAxEAPwD3szU1RQV9bM39oq2uAS0spKgDEwQY+1CN2ZtPUhLlwhqeG2pwKJKl6lKOoD1A7STt1Jrz0Rot9tDjbanEJccnQgqAKo3gc6tqMTHtSp2zbF1bXLKnXHG1uLVoWkagsTBncelKQJECOlcsPC0Wzjby3FuPAZW5lav3RrMkEgKAkQcHMGKqifQ41VKy1d6lVCivzqwdKUhapIBSZAPfpW6XlAeqJ5xQq9YMiFgnI2P+ihi2suKdbWhKjE6wcJGY3gZ5j7xXn2oDcOYqheg0lt7q68w41cAFIyFpBjJ684H4+hnHSh/gKUQrTqk4G+09aG2gaYbx+5qUMBPepRuzinmkI4bq3fDVLZeUAVtO/GqAc53AJx15iJpsw9cPJXxGEodThBE6VGJ/2TzE1fxDwxq7QVBamnohK0nb2pW9cP22q3vW1vsuDTxE+nAjf/nzrRTPz02TTGuperWEulaiEk6TGJOe2+e9V8QW8W5ZMJSZUuQPYTvtSi1uH7McPwxQfaQRLTkgpTzjvvnvsaaWt6i9UplwcJ5JPomDHXrz3oeMdYtr7RZp5XDAWUhQxKjE99qlXcs21rl1GpXYA/mpXXxlpiF5rmhCgpKkgg4IPOj/ACuNqzSwo/wrTnnH9Gs+NmWrE13YLdcaVbKTbgKlYDYPEHQ1um0Q07xkNt8WImMxG0+wpnwVaT+kvY4kZ+9cTbLWgEpUgn4VRI+lMyHsBDnWZ+RqUf5UipRxv8KH/9k=); background-size: cover, cover; background-position: center, center; } /* /splash:tiny */
.boot .bootline { display: flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 18px; background: rgba(247, 242, 226, 0.82); box-shadow: 0 4px 14px -8px rgba(40, 45, 30, 0.45); }
.boot .bootline i { width: 7px; height: 7px; border-radius: 50%; background: #f2a33a; animation: bootBob 1.2s ease-in-out infinite; }
.boot .bootline i:nth-child(2) { animation-delay: 0.15s; } .boot .bootline i:nth-child(3) { animation-delay: 0.3s; margin-right: 4px; }
.booting #app { visibility: hidden; }
@keyframes bootBob { 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .boot .bootline i { animation: none; } }
body { display: flex; justify-content: center; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }

#app {
  position: relative; width: 100%; max-width: min(100vw, 75dvh); height: 100dvh; background: var(--bg);
  display: flex; flex-direction: column; overflow: hidden; user-select: none; -webkit-user-select: none;
}

/* clay: a lit pillow; honey the picked one, night the night's button; pressed it settles */
.clay { background: radial-gradient(120% 120% at 30% 18%, var(--clay-hi), var(--clay-mid) 50%, var(--clay-lo)); box-shadow: var(--clay-shade); }
button.clay:active:not(:disabled) { transform: translateY(1px) scale(0.98); box-shadow: var(--clay-press); }
.clay.honey { background: radial-gradient(120% 120% at 30% 18%, #fff2cc, #f7cd72 52%, #e3a84d); }
.clay.night { background: radial-gradient(120% 120% at 30% 18%, #7880cc, #3f4792 52%, #2c3270); color: #e8ebff; }
.clay.ok { background: radial-gradient(120% 120% at 30% 18%, #d2efae, #86c25a 52%, #5d9a39); color: #fff; }
.clay.no { color: #a04420; }
img.spr { mix-blend-mode: multiply; object-fit: contain; pointer-events: none; display: block; }
/* a path's icon: a strip of the town's own dirt across its own grass */
.ptile { position: relative; display: block; width: 46px; height: 46px; border-radius: 13px; overflow: hidden; background: url(art/render/grass.jpg) center / 300%; box-shadow: inset 0 2px 4px rgba(30, 50, 10, 0.3); flex: 0 0 auto; }
.ptile::before { content: ''; position: absolute; left: -20%; right: -20%; top: 36%; height: 30%; transform: rotate(-32deg); background: url(art/render/dirt.jpg) center / 120px; box-shadow: 0 0 0 2px rgba(120, 90, 50, 0.45), 0 2px 3px rgba(40, 25, 10, 0.35); }
.ptile.stone::before { background: url(art/render/rock.jpg) center / 220px #b9b2a6; filter: saturate(0.4) brightness(1.1); }

/* the top strip: the town's face, the clock, pause, end the day */
#top { display: flex; align-items: center; gap: 10px; padding: calc(8px + var(--safe-t)) 12px 6px; }
/* the face: a Murmling (the town's own render, in their yellow), its ring the town's mood */
.face { position: relative; width: 50px; height: 50px; flex: 0 0 50px; border-radius: 50%; overflow: hidden; font-size: 30px; display: grid; place-items: center; }
.face img { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; transform: translate(-50%, -34%); filter: sepia(1) saturate(2.6) hue-rotate(8deg) brightness(1.08); }
.face::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 3px var(--ring, transparent); pointer-events: none; transition: box-shadow 0.4s; }
.face[data-mood="good"] { --ring: #8cc46a; } .face[data-mood="ok"] { --ring: #f0c050; } .face[data-mood="low"] { --ring: #e07a50; }
/* the materials after the clock, in its pill: brush, wood, stone, a narrow column; one a site waits for blinks */
.stocks { margin-left: auto; flex: 0 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 0; font-size: 10px; line-height: 13px; }
.stocks:empty { display: none; }
.stocks .mat { display: flex; align-items: center; gap: 2px; justify-content: flex-end; }
.stocks .mat i { font-style: normal; font-size: 11px; line-height: 1; }
.stocks .mat i svg { width: 11px; height: 11px; }
.stocks .mat b { font-weight: 700; min-width: 2ch; text-align: right; }
.stocks .mat.short { color: var(--warm, #c4553f); animation: matBlink 1s ease-in-out infinite; }
@keyframes matBlink { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .stocks .mat.short { animation: none; text-decoration: underline; } }
.daybox { flex: 1; min-width: 0; height: 50px; border-radius: 25px; display: flex; align-items: center; gap: 10px; padding: 0 14px 0 6px; }
.daybox.held .daypie { opacity: 0.55; }
.clock { min-width: 0; line-height: 1.05; }
#day { font-weight: 700; font-size: 13px; color: var(--soft); }
#time { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.round { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%; display: grid; place-items: center; }
.round.on { background: radial-gradient(120% 120% at 30% 18%, #fff2cc, #f7cd72 52%, #e3a84d); }
/* pause: two clay bars; paused, a play triangle */
.pz { display: block; width: 16px; height: 18px; background: linear-gradient(90deg, #4b3a2a 0 6px, transparent 6px 10px, #4b3a2a 10px 16px); border-radius: 2px; }
.round.on .pz { background: #4b3a2a; clip-path: polygon(15% 0, 100% 50%, 15% 100%); border-radius: 0; margin-left: 3px; }
.pill { height: 48px; width: 66px; flex: 0 0 66px; border-radius: 24px; display: flex; align-items: center; justify-content: center; gap: 3px; font-weight: 700; font-size: 19px; }
.pill .moon { display: block; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8d8, #ffd560 60%, #d6a032); -webkit-mask: radial-gradient(circle at 75% 30%, transparent 9px, #000 9.5px); mask: radial-gradient(circle at 75% 30%, transparent 9px, #000 9.5px); }
/* the day hurrying: the night button lit, its arrows running */
.pill.on { background: radial-gradient(120% 120% at 30% 18%, #a2a9ee, #6b74c9 52%, #4a52a0); }
.pill.on .ff { animation: run 0.7s linear infinite; }
@keyframes run { 0% { transform: translateX(-2px); opacity: 0.5; } 100% { transform: translateX(3px); opacity: 1; } }

/* today's wish */
.wish { margin: 2px 12px 8px; padding: 6px 14px 6px 8px; border-radius: 26px; display: flex; gap: 8px; align-items: center; font-size: 13px; line-height: 1.25; color: var(--soft); min-height: 52px; cursor: pointer; }
.wish .pics { display: flex; gap: 2px; flex: 0 0 auto; align-items: center; }
.wish .pics img { width: 42px; height: 42px; }
.wish .pics .ptile { width: 38px; height: 38px; margin: 0 2px; }
.wish .pics .ic { font-size: 26px; }
.wish .pics:empty { display: none; }
/* (its words: two lines, the rest a tap away) */
#wishText { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wish.open #wishText { -webkit-line-clamp: unset; }
.wish.pop { animation: pop 0.5s ease; }
/* a task card: its site's progress along the bar's foot (warm when it stalls) */
.wish.task::before { content: ''; position: absolute; left: 14px; right: 14px; bottom: 9px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--accent) var(--wp, 0%), rgba(0, 0, 0, 0.1) var(--wp, 0%)); pointer-events: none; }
.wish.task.stalled::before { background: linear-gradient(90deg, #d9734f var(--wp, 0%), rgba(0, 0, 0, 0.1) var(--wp, 0%)); }
.wish.task .wdots { bottom: 1px; }
/* a wish done: a happy little bounce of the bar */
.wish.cheer { animation: cheer 0.7s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes cheer { 0% { transform: scale(1); } 30% { transform: scale(1.06) rotate(-1deg); } 60% { transform: scale(0.98) rotate(0.6deg); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .wish.cheer { animation: none; } }
/* the stack: cards peeking under the bar, dots for which of how many; a swipe rolls it */
#wish.stacked { box-shadow: var(--clay-shade), 0 5px 0 -2px rgba(255, 255, 255, 0.55), 0 6px 4px -2px rgba(40, 45, 30, 0.18); }
#wish.stacked3 { box-shadow: var(--clay-shade), 0 5px 0 -2px rgba(255, 255, 255, 0.55), 0 6px 4px -2px rgba(40, 45, 30, 0.18), 0 10px 0 -5px rgba(255, 255, 255, 0.4), 0 11px 4px -5px rgba(40, 45, 30, 0.14); }
.wdots { position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%); display: flex; gap: 4px; pointer-events: none; }
.wdots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.3; }
.wdots i.on { opacity: 0.85; background: var(--accent); }
.wish.roll-l { animation: rollL 0.32s ease; }
.wish.roll-r { animation: rollR 0.32s ease; }
@keyframes rollL { 0% { transform: translateX(26px); opacity: 0.3; } 100% { transform: none; opacity: 1; } }
@keyframes rollR { 0% { transform: translateX(-26px); opacity: 0.3; } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .wish.roll-l, .wish.roll-r { animation: none; } }
/* a site's status, and who built it */
.status { margin: 6px 0 2px; font-size: 13px; }
.status b { font-weight: 700; }
.status.going b { color: #4f9a5a; }
.status.slow b { color: #b98a2e; }
.status.stalled b { color: #c4553f; }
.workers { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 8px; }
.worker { display: grid; grid-template-columns: 26px 1fr auto; grid-template-rows: auto 4px; column-gap: 8px; align-items: center; text-align: left; padding: 4px 8px; border-radius: 10px; background: rgba(0, 0, 0, 0.04); }
.worker .wf { grid-row: 1 / 3; font-size: 20px; line-height: 1; }
.worker .wn { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.worker .wn i { font-style: normal; font-size: 11px; color: var(--accent); margin-left: 4px; }
.worker .wt { font-size: 12px; color: var(--soft); }
/* a stage's checks on the town sheet */
/* a Murmling's good-at chips: the stars in the accent */
.pill2.good b { color: var(--accent); font-weight: 600; letter-spacing: 1px; margin-left: 2px; }
/* the stage card's big icon: a little bounce */
.bigface.party { animation: partyPop 0.9s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes partyPop { 0% { transform: scale(0.4); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .bigface.party { animation: none; } }
.checks { list-style: none; margin: 4px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--soft); }
.checks li.done { color: var(--accent); }
.worker.visit { grid-template-rows: auto; }
.worker.visit .wn b { font-weight: 500; color: var(--soft); margin-left: 4px; }
.worker.visit.now { background: rgba(0, 0, 0, 0.07); }
.worker.visit.now .wt { color: var(--accent); }
.worker .wbar { grid-column: 2 / 4; height: 4px; border-radius: 2px; background: rgba(0, 0, 0, 0.08); overflow: hidden; }
.worker .wbar i { display: block; height: 100%; background: var(--accent); }
/* a NEW wish: drops in like a push note and pulses; its dot stays till it is tapped */
.wish { position: relative; }
.wish.notify { animation: wishIn 0.55s cubic-bezier(.2, 1.4, .4, 1), wishPulse 1.2s ease-in-out 0.55s 3; }
.wish.unread::after { content: ''; position: absolute; top: 5px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7); animation: wishDot 1.6s ease-in-out infinite; }
@keyframes wishIn { 0% { transform: translateY(-120%) scale(0.96); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes wishPulse { 0%, 100% { box-shadow: var(--clay-shade), 0 0 0 0 rgba(242, 163, 58, 0); } 50% { box-shadow: var(--clay-shade), 0 0 0 4px rgba(242, 163, 58, 0.55), 0 0 18px 4px rgba(242, 163, 58, 0.35); } }
@keyframes wishDot { 50% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .wish.notify { animation: wishPulse 1.2s ease-in-out 3; } .wish.unread::after { animation: none; } }
@keyframes pop { 0% { transform: scale(0.96); } 50% { transform: scale(1.03); } 100% { transform: scale(1); } }

/* the map */
#stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
.hold { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; flex-direction: column; gap: 8px; background: radial-gradient(140% 160% at 30% 0%, rgba(255, 252, 244, 0.97), rgba(240, 228, 204, 0.97)); color: var(--ink); border-radius: 26px; padding: 8px; font-size: 14px; box-shadow: var(--clay-shade); }
.hold .hrow { display: flex; align-items: center; gap: 8px; padding-left: 4px; }
.hold .hrow #holdText { flex: 1; line-height: 1.25; color: var(--soft); }
.hold .pcount { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 20px; }
.hold .pcount b { white-space: nowrap; }
.hold .pcount small { font-size: 12px; font-weight: 500; opacity: 0.75; line-height: 1.2; }
.hold .pcount img { width: 44px; height: 44px; }
.hold .pcount .ptile { width: 40px; height: 40px; }
.hold .pcount .ic { font-size: 28px; }
.hold button:disabled { opacity: 0.4; }
/* the plan's family of types (the pack's): one chip a type, the picked one lit, the ones not yet open greyed with their stage */
.htypes { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.hold .htypes { padding: 2px 2px 4px; }
.hold .htypes button { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; padding: 3px 10px 3px 4px; min-height: 44px; border-radius: 16px; color: var(--ink); font-size: 13px; font-weight: 700; }
.hold .htypes button img { width: 38px; height: 38px; }
.hold .htypes button .ptile { width: 34px; height: 34px; margin: 0 2px; }
.hold .htypes button .ic { font-size: 22px; }
.hold .htypes button small { font-weight: 600; opacity: 0.75; font-size: 11px; }
.hold .htypes button:disabled img { filter: grayscale(1); opacity: 0.6; }
.hold .hrow button { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 18px; font-size: 24px; font-weight: 800; color: var(--ink); }
.hold .hrow button.ok { width: 70px; flex-basis: 70px; color: #fff; }
.hold .hrow button.no { color: #a04420; }
.toast { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); max-width: 88%; border-radius: 18px; padding: 9px 14px; font-size: 14px; text-align: center; z-index: 3; cursor: pointer; }
.toast.warn { background: radial-gradient(120% 120% at 30% 18%, #fff6ee, #fde3d2 55%, #f6cdb4); color: #8a3b12; }
.bubble { position: absolute; transform: translate(-50%, 0); background: radial-gradient(120% 140% at 30% 15%, #fff, #f6efe2); border-radius: 16px; padding: 5px 11px; font-size: 13px; box-shadow: 0 3px 8px -1px rgba(55, 35, 15, 0.28); pointer-events: none; white-space: nowrap; max-width: 80vw; overflow: hidden; text-overflow: ellipsis; }
/* (a subtitle at the Murmling's feet: hanging just under them, its point up at them) */
.bubble::after { content: ''; position: absolute; left: 50%; top: -6px; margin-left: -6px; border: 6px solid transparent; border-top: 0; border-bottom-color: #fff; }

/* the build tray */
/* the tray: a shelf of the town's own planks; its tools clay tokens, each the town's render of what it builds; the
   picked one lifted, honey, its name on a tag over it (the others' names are for a screen reader) */
#tray { display: flex; gap: 10px; padding: 28px 12px calc(12px + var(--safe-b)); overflow-x: auto; scrollbar-width: none;
  background: linear-gradient(rgba(120, 70, 30, 0.12), rgba(60, 30, 10, 0.3)), url(art/render/privy.jpg) 24% 62% / 900% #9b6b40;
  box-shadow: inset 0 3px 0 rgba(255, 230, 190, 0.4), inset 0 8px 14px rgba(60, 30, 10, 0.26); }
#tray::-webkit-scrollbar { display: none; }
.tool { flex: 0 0 auto; width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; position: relative; }
.tool img.spr { width: 54px; height: 54px; }
.tool .ic { font-size: 28px; line-height: 1; }
.tool .lb { display: none; }
.tool.on { top: -5px; }
.tool.on .lb { display: block; position: absolute; left: 50%; top: -25px; transform: translateX(-50%); padding: 2px 10px; border-radius: 10px; white-space: nowrap; font-size: 12px; font-weight: 700; color: #fff; background: radial-gradient(120% 120% at 30% 18%, #7a6550, #4b3a2a); box-shadow: 0 2px 5px rgba(40, 25, 10, 0.3); }
/* (a glow: a soft golden halo round the token, breathing) */
.tool.glow { animation: halo 1.4s ease-in-out infinite; }
.tool.nudge { animation-duration: 0.8s; }
@keyframes halo { 0%, 100% { box-shadow: var(--clay-shade), 0 0 0 0 rgba(255, 214, 110, 0); } 50% { box-shadow: var(--clay-shade), 0 0 10px 6px rgba(255, 214, 110, 0.9); } }
.tool .new { position: absolute; top: -4px; right: -4px; background: #e2553f; color: #fff; font-size: 10px; font-weight: 800; border-radius: 8px; padding: 1px 5px; }
.tool:disabled { opacity: 0.4; }
/* (more tools beyond an edge: the plank darkens there, over the tokens) */
.traywrap { position: relative; }
/* the MATERIALS on the bottom bar (no tool bar): each its icon, its count, its name; a needed one blinking */
.matbar { display: flex; justify-content: space-around; align-items: center; gap: 6px; padding: 8px 12px calc(8px + var(--safe-b));
  background: var(--pane, #fffaf1); border-top: 1px solid var(--line, rgba(0, 0, 0, 0.08)); }
.matbar .mat { display: flex; flex-direction: column; align-items: center; min-width: 52px; line-height: 1.1; color: var(--ink); }
.matbar .mat i { font-style: normal; font-size: 20px; line-height: 1; }
.matbar .mat i svg { width: 20px; height: 20px; }
.matbar .mat b { font-size: 15px; font-weight: 800; margin-top: 2px; }
.matbar .mat small { font-size: 11px; color: var(--soft); }
.matbar .sep { align-self: stretch; width: 1px; margin: 4px 2px; background: var(--line, rgba(0, 0, 0, 0.1)); }
.matbar .mat.work b em { font-style: normal; font-weight: 600; font-size: 12px; color: var(--soft); margin-left: 1px; }
.matbar .mat.work.none { opacity: 0.45; }
.matbar .mat.short, .matbar .mat.short small { color: var(--warm, #c4553f); animation: matBlink 1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .matbar .mat.short { animation: none; text-decoration: underline; } }
/* tap to build: the tray folded behind its All tools button */
.traywrap.tapmode:not(.open) #tray { display: none; }
.traywrap.tapmode:not(.open)::before, .traywrap.tapmode:not(.open)::after { display: none; }
.alltools { display: block; margin: 6px 12px; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; min-height: 40px; }
.traywrap.tapmode.open .alltools { margin-bottom: 0; }
/* the build card: the best spot's place big, the others in a grid */
.build-top { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; }
.build-top .ic { font-size: 30px; }
.build-top small, .build-opt small { display: block; font-weight: 400; color: var(--soft); font-size: 12px; margin-top: 2px; }
.build-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.build-opt { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; min-height: 64px; border-radius: 14px; font-size: 13px; }
.build-opt .ic { font-size: 22px; }
.build-opt:disabled { opacity: 0.45; }
/* the build card's one list: a row a choice, the best marked */
.build-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.build-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; min-height: 52px; border-radius: 14px; font-size: 15px; }
.build-row .ic { font-size: 24px; flex: 0 0 30px; text-align: center; }
.build-row .tx { display: flex; flex-direction: column; min-width: 0; }
.build-row small { font-weight: 400; color: var(--soft); font-size: 12px; margin-top: 2px; }
.build-row i { font-style: normal; color: var(--accent, #e0a63a); }
.build-row.best { outline: 2px solid var(--accent, #e0a63a); outline-offset: -2px; }
.build-row:disabled, .build-row.off { opacity: 0.45; }
.build-row.group { cursor: default; background: var(--pane-2, #f1e7d6); }
.build-row .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.build-line { display: flex; flex-direction: column; gap: 4px; padding: 4px 2px; }
.build-line.off { opacity: 0.45; }
.build-line .lbl { font-size: 12px; font-weight: 800; color: var(--soft); text-transform: uppercase; letter-spacing: 0.04em; }
.build-line .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.build-chip { padding: 6px 10px; min-height: 36px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.build-chip.best { outline: 2px solid var(--accent, #e0a63a); outline-offset: -2px; }
.build-chip:disabled { opacity: 0.45; }
/* a choice under the finger sinks a little; tapped, it lights a moment before the card goes */
.build-row:not(.group):not(:disabled), .build-chip:not(:disabled) { transition: transform 0.08s ease; }
.build-row:not(.group):not(:disabled):active, .build-chip:not(:disabled):active { transform: scale(0.96); filter: brightness(0.92); }
.build-row.pressed, .build-chip.pressed, .build-row.picked, .build-chip.picked { background: var(--accent, #e0a63a) !important; color: #fff !important; transform: scale(0.97); }
.build-row.pressed small, .build-chip.pressed i, .build-row.picked small, .build-chip.picked i { color: #fff !important; }
.build-chip i { font-style: normal; color: var(--accent, #e0a63a); }
.traywrap::before, .traywrap::after { content: ''; position: absolute; top: 0; bottom: 0; width: 34px; pointer-events: none; opacity: 0; transition: opacity 0.2s; z-index: 1; }
.traywrap::before { left: 0; background: linear-gradient(90deg, rgba(70, 40, 15, 0.75), rgba(70, 40, 15, 0)); }
.traywrap::after { right: 0; background: linear-gradient(270deg, rgba(70, 40, 15, 0.75), rgba(70, 40, 15, 0)); }
.traywrap.more-l::before, .traywrap.more-r::after { opacity: 1; }
.sep { flex: 0 0 2px; background: rgba(40, 20, 5, 0.3); box-shadow: 1px 0 0 rgba(255, 230, 190, 0.3); margin: 8px 2px; }

/* the bottom sheet (an area, a Murmling, the town) */
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--card); border-radius: 22px 22px 0 0; padding: 6px 18px calc(18px + var(--safe-b)); box-shadow: 0 -6px 24px rgba(0,0,0,0.18); z-index: 5; max-height: 62%; overflow-y: auto; animation: rise 0.22s ease; }
@keyframes rise { from { transform: translateY(40px); opacity: 0.4; } to { transform: none; opacity: 1; } }
.shead { position: sticky; top: -6px; height: 34px; margin: -6px -18px 4px; display: flex; justify-content: center; background: var(--card); z-index: 1; }
.grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin-top: 10px; pointer-events: none; }
.sheet .x { position: absolute; right: 8px; top: 4px; width: 44px; height: 44px; border-radius: 50%; font-size: 18px; color: var(--soft); }
.sheet .x:active { background: #f1e7d6; }
.sheet h2 { margin: 0 0 4px; font-size: 20px; }
/* the rename pencil beside a Murmling's name */
.sheet h2 .rename { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; min-height: 0; margin: 0 0 0 4px; padding: 0; border: 0; border-radius: 999px; background: transparent; font-size: 16px; vertical-align: middle; cursor: pointer; }
.sheet .sub { color: var(--soft); font-size: 14px; margin-bottom: 12px; }
.faces { font-size: 24px; letter-spacing: 2px; margin: 6px 0 10px; }
.bar { height: 12px; border-radius: 6px; background: #efe5d3; overflow: hidden; margin: 6px 0 4px; }
.bar i { display: block; height: 100%; background: var(--good); border-radius: 6px; transition: width 0.4s; }
.why { background: #fff4df; border-radius: 12px; padding: 8px 10px; font-size: 14px; margin: 8px 0; }
.label { font-size: 13px; font-weight: 800; color: var(--soft); margin: 14px 0 6px; text-transform: uppercase; letter-spacing: 0.04em; }
/* a card's three parts, the same on every card: what it is, what you can do, the Murmlings' logs */
.card-is::after { content: ''; display: block; clear: both; }
.card-can, .card-log { border-top: 1px solid var(--line, rgba(0, 0, 0, 0.08)); margin-top: 12px; padding-top: 2px; }
.label.sm { font-size: 12px; margin-top: 8px; text-transform: none; letter-spacing: 0; }
/* the top bar's stage badge: the stage's icon in a ring filling as it is done */
.stagebtn { position: relative; width: 44px; height: 44px; padding: 0; flex: 0 0 auto; }
.stagebtn .sring { position: absolute; inset: 3px; border-radius: 50%;
  background: conic-gradient(var(--accent, #3f8f6b) calc(var(--p, 0) * 1%), var(--line, rgba(0, 0, 0, 0.12)) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); }
.stagebtn .sic { position: relative; font-size: 18px; line-height: 44px; display: block; text-align: center; }
.stagebtn .sic svg { width: 20px; height: 20px; vertical-align: middle; }
.checks.later { opacity: 0.55; }
/* a task's own progress on the stage card: how far, and a thin bar under it */
.checks li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.checks li .ct { flex: 1 1 auto; }
.checks li .cp { flex: 0 0 auto; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.checks li .cbar { flex: 1 0 100%; height: 3px; border-radius: 2px; background: var(--line, rgba(0, 0, 0, 0.1)); overflow: hidden; margin: 1px 0 3px; }
.checks li .cbar i { display: block; height: 100%; background: var(--accent, #3f8f6b); }
.label.nowstep { color: var(--accent, #3f8f6b); }
.logmore { margin-top: 2px; }
.logmore summary { min-height: 32px; font-size: 13px; }
/* a card's actions on one row, side by side */
.acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.acts > button.wide { flex: 1 1 0; min-width: 0; width: auto; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acts > button small { opacity: 0.7; font-weight: 600; }
.card-about { margin-top: 4px; }
.chips { display: flex; gap: 8px; }
.chip { flex: 1; min-height: 48px; border-radius: 14px; background: #f1e7d6; font-weight: 700; font-size: 14px; }
.chip.on { background: var(--accent); color: var(--accent-ink); }
.wide { width: 100%; min-height: 48px; border-radius: 14px; background: #f1e7d6; font-weight: 700; font-size: 15px; margin-top: 10px; }
.wide.on { background: #dfe6f7; }
.wide.danger { background: #fbe3dc; color: #8a3b12; }
.thought { font-size: 17px; background: #f4f0ff; border-radius: 14px; padding: 10px 12px; margin: 8px 0; }
.big { font-size: 46px; line-height: 1; float: right; }

/* the day card */
.scrim { position: absolute; inset: 0; background: rgba(30, 30, 60, 0.45); z-index: 8; }
.card { position: absolute; left: 16px; right: 16px; top: 50%; transform: translateY(-50%); background: var(--card); border-radius: 24px; padding: 22px 20px 18px; z-index: 9; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,0.3); animation: rise 0.3s ease; }
.card h2 { margin: 0; font-size: 24px; }
.card .bigface { font-size: 64px; line-height: 1.1; margin: 6px 0; }
.card .line { font-size: 16px; margin: 6px 0; }
.card .news { text-align: left; background: #f8f1e4; border-radius: 14px; padding: 8px 12px; margin: 12px 0; font-size: 14px; line-height: 1.4; max-height: 30vh; overflow-y: auto; }
.card .news div + div { margin-top: 4px; }
.card .granted { color: var(--good); font-weight: 800; }
.card .hint { font-size: 14px; color: var(--soft); margin: 8px 0; }
.card button { width: 100%; min-height: 52px; border-radius: 16px; background: var(--night); color: #fff; font-weight: 800; font-size: 17px; margin-top: 8px; }
.card .quiet { font-size: 13px; color: var(--soft); margin-top: 10px; }

/* the zoom buttons (the map's corner: for a mouse with no wheel, and to show the map zooms) */
/* the islands: back and forward between them (docs/murmlings-stage-expansion 12) */
.islands { position: absolute; left: 10px; top: 10px; z-index: 2; display: flex; align-items: center; gap: 4px; padding: 2px 4px; font-size: 13px; border-radius: 16px; }
.islands button { width: 30px; height: 30px; border: 0; background: transparent; font-size: 14px; color: inherit; border-radius: 50%; }
.islands button:disabled { opacity: 0.3; }
.zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.zoom button { width: 44px; height: 44px; border-radius: 15px; font-size: 22px; font-weight: 800; }
.card button.ghost { background: #f1e7d6; color: var(--ink); }

/* a Murmling's card: its vitals and needs as bars, the dominant need called out */
.stat { display: grid; grid-template-columns: 7.5em 1fr 3em; align-items: center; gap: 8px; font-size: 14px; margin: 4px 0; }
.stat .bar { margin: 0; height: 10px; }
.stat .v { text-align: right; color: var(--soft); font-variant-numeric: tabular-nums; }
.stat.top .k { font-weight: 800; }
.stat.top .bar i { background: var(--accent); }
.dominant { display: flex; align-items: center; gap: 10px; background: #fff4df; border-radius: 14px; padding: 10px 12px; margin: 8px 0; }
.dominant.pressing { background: #ffe6d6; }
.dominant .ic { font-size: 28px; }
.dominant .k { font-size: 12px; color: var(--soft); text-transform: uppercase; letter-spacing: 0.04em; }
.dominant b { font-size: 17px; }
.dominant .v { margin-left: auto; color: var(--soft); font-size: 14px; }
.doing { display: flex; align-items: center; gap: 10px; background: #eef6e8; border-radius: 14px; padding: 8px 12px; margin: 8px 0; }
.doing .ic { font-size: 26px; }
.doing .k { font-size: 12px; color: var(--soft); text-transform: uppercase; letter-spacing: 0.04em; }
.doing b { font-size: 16px; }

/* the town card */
.trow { display: grid; grid-template-columns: 1.6em 8.5em 1fr; align-items: baseline; gap: 6px; font-size: 14px; margin: 5px 0; }
.trow .ic { font-size: 17px; }
.trow .k { color: var(--soft); }
.soft { color: var(--soft); font-size: 13px; }
.lifts { display: flex; flex-wrap: wrap; gap: 6px; }
.lift { border-radius: 10px; padding: 4px 8px; font-size: 13px; font-weight: 700; }
.lift.up { background: #e7f4dd; color: #3f7a24; }
.lift.down { background: #fde8e1; color: #9a3b1c; }
.daypie { width: 38px; height: 38px; flex: 0 0 38px; }

/* a place coming down: its bar is what still stands */
.bar.down i { background: #b07a4f; }

/* ── SPIKE ?ui=mono: one monochrome line-icon set (pocket-icons.js) on dark glass, a single mint accent, tighter
   type; for an older player (YA, 18+). Everything under .ui-mono: the clay kit is the default ── */
.ui-mono {
  --bg: #0f1115; --card: #191c23; --ink: #eef0f4; --soft: #98a1ad; --line: #2a2f39;
  --accent: #7fe3bf; --accent-ink: #0d2a20; --good: #7fe3bf; --night: #11141a;
  --glass: rgba(22, 25, 32, 0.74); --glass-edge: rgba(255, 255, 255, 0.09);
  font-family: "Inter", "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
}
.ui-mono body { background: #07080b; color: var(--ink); }
.ui-mono #app { background: var(--bg); }
.ui-mono .mi { width: 24px; height: 24px; display: block; flex: 0 0 auto; }
/* (glass: every clay piece becomes a dark pane with a hairline edge; no emboss, a soft shadow under it) */
.ui-mono .clay, .ui-mono .clay.honey, .ui-mono .clay.night, .ui-mono .clay.ok { background: var(--glass); color: var(--ink); box-shadow: inset 0 0 0 1px var(--glass-edge), 0 6px 18px -6px rgba(0, 0, 0, 0.6); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); }
.ui-mono button.clay:active:not(:disabled) { transform: scale(0.96); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); }
.ui-mono .clay.honey, .ui-mono .clay.ok { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 1px rgba(127, 227, 191, 0.4), 0 6px 18px -6px rgba(127, 227, 191, 0.5); }
.ui-mono .clay.no { color: #ff8f7a; }
/* the top */
.ui-mono .face { width: 46px; height: 46px; flex-basis: 46px; color: var(--accent); }
.ui-mono .face .mi { width: 28px; height: 28px; }
.ui-mono .face[data-mood="ok"] { color: #f2c66d; } .ui-mono .face[data-mood="low"] { color: #ff8f7a; }
.ui-mono .face::after { display: none; }
.ui-mono .daybox { height: 46px; border-radius: 14px; }
.ui-mono .round, .ui-mono .pill { height: 46px; border-radius: 14px; }
.ui-mono .round { width: 46px; flex-basis: 46px; }
.ui-mono .pill { width: 62px; flex-basis: 62px; gap: 0; }
.ui-mono .pill .mi.ff { width: 16px; height: 16px; opacity: 0.7; }
.ui-mono .pill.on { background: var(--accent); color: var(--accent-ink); }
.ui-mono .round .i-play, .ui-mono .round.on .i-pause { display: none; }
.ui-mono .round.on .i-play { display: block; }
.ui-mono .round.on { background: var(--accent); color: var(--accent-ink); }
.ui-mono #day { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); }
.ui-mono #time { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
/* the wish */
.ui-mono .wish { border-radius: 14px; min-height: 46px; color: #c6ccd5; font-size: 13px; }
.ui-mono .wish .pics { gap: 6px; color: var(--accent); padding-left: 4px; }
.ui-mono .wish .pics .mi { width: 22px; height: 22px; }
/* the tray: a dark dock, icon-only, the picked one mint, its name in small caps over it */
.ui-mono #tray { background: #0b0d11; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); gap: 8px; padding-top: 26px; }
.ui-mono .tool { width: 56px; height: 56px; border-radius: 16px; color: #dfe3ea; }
.ui-mono .tool .mi { width: 26px; height: 26px; }
.ui-mono .tool .ic { filter: grayscale(1) brightness(1.6); font-size: 24px; }
.ui-mono .tool.on .lb { background: none; box-shadow: none; color: var(--accent); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; top: -21px; }
.ui-mono .tool.glow { animation: monoGlow 1.4s ease-in-out infinite; }
.ui-mono .tool.nudge { animation-duration: 0.8s; }
@keyframes monoGlow { 0%, 100% { box-shadow: inset 0 0 0 1px var(--glass-edge), 0 0 0 0 rgba(127, 227, 191, 0); } 50% { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 14px 2px rgba(127, 227, 191, 0.45); } }
.ui-mono .tool .new { background: var(--accent); color: var(--accent-ink); }
.ui-mono .traywrap::before { background: linear-gradient(90deg, #0b0d11, rgba(11, 13, 17, 0)); }
.ui-mono .traywrap::after { background: linear-gradient(270deg, #0b0d11, rgba(11, 13, 17, 0)); }
.ui-mono .sep { background: rgba(255, 255, 255, 0.08); box-shadow: none; }
/* the plan bar */
.ui-mono .hold { background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge), 0 10px 30px -10px rgba(0, 0, 0, 0.7); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: var(--ink); border-radius: 18px; }
.ui-mono .hold .hrow button { border-radius: 14px; width: 48px; height: 48px; flex-basis: 48px; }
.ui-mono .hold .hrow button.ok { width: 64px; flex-basis: 64px; }
.ui-mono .hold .hrow button .mi, .ui-mono .zoom .mi { width: 22px; height: 22px; margin: auto; }
.ui-mono .hold .pcount { color: var(--accent); font-size: 17px; }
.ui-mono .hold .htypes button { border-radius: 12px; padding: 4px 12px 4px 8px; gap: 8px; color: var(--ink); }
.ui-mono .hold .htypes button.on { color: var(--accent-ink); }
.ui-mono .hold .htypes button .mi { width: 20px; height: 20px; }
/* the zoom, the toast, the murmur */
.ui-mono .zoom button { border-radius: 12px; display: grid; }
.ui-mono .toast { color: var(--ink); border-radius: 12px; }
.ui-mono .toast.warn { background: rgba(60, 24, 18, 0.85); color: #ffb3a3; }
.ui-mono .bubble { background: rgba(22, 25, 32, 0.86); color: var(--ink); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--glass-edge); }
.ui-mono .bubble::after { border-bottom-color: rgba(22, 25, 32, 0.86); }
/* the sheets and the day card: dark */
.ui-mono .sheet { background: #14171d; color: var(--ink); box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.06); }
.ui-mono .shead { background: #14171d; }
.ui-mono .sheet .x { color: var(--soft); }
.ui-mono .sheet .x .mi { width: 20px; height: 20px; margin: auto; }
.ui-mono .bar { background: #242934; }
.ui-mono .stat.top .bar i { background: #f2c66d; }
.ui-mono .why, .ui-mono .dominant { background: #1f232c; }
.ui-mono .dominant.pressing { background: #2c1f1d; }
.ui-mono .doing { background: #18261f; }
.ui-mono .thought { background: #1d1f2b; }
.ui-mono .chip, .ui-mono .wide { background: #222731; color: var(--ink); }
.ui-mono .chip.on { background: var(--accent); color: var(--accent-ink); }
.ui-mono .wide.danger { background: #2c1d1b; color: #ff9a85; }
.ui-mono .lift.up { background: #16281f; color: var(--accent); } .ui-mono .lift.down { background: #2c1d1b; color: #ff9a85; }
.ui-mono .card { background: #14171d; color: var(--ink); box-shadow: inset 0 0 0 1px var(--glass-edge), 0 20px 50px rgba(0,0,0,0.6); }
.ui-mono .card .news { background: #1c2028; }
.ui-mono .card button { background: var(--accent); color: var(--accent-ink); }
.ui-mono .card button.ghost { background: #222731; color: var(--ink); }

/* ── THE MONO LIGHT KIT (the default since 2026-10-12): the mono icons on a mid, earthy light: linen and sage
   panes, deep moss ink, a muted moss accent, ochre and terracotta for the warnings; not white, not bright ── */
.ui-mono.ui-light {
  --bg: #dedcd0; --card: #ecebe1; --ink: #27312a; --soft: #6b7266; --line: #cfcdbf;
  --accent: #557d5b; --accent-ink: #f3f2ea; --good: #557d5b; --warm: #b0623f; --ochre: #b0852e;
  --glass: rgba(234, 233, 222, 0.84); --glass-edge: rgba(48, 56, 40, 0.1);
  --pane: #e7e6db; --pane-2: #dfdecf; --dock: #d6d5c6;
}
.ui-light body { background: #c9c8ba; }
.ui-light .clay, .ui-light .clay.night { box-shadow: inset 0 0 0 1px var(--glass-edge), 0 6px 16px -9px rgba(40, 45, 30, 0.45); }
.ui-light .clay.honey, .ui-light .clay.ok, .ui-light .round.on, .ui-light .pill.on { box-shadow: 0 6px 14px -7px rgba(60, 95, 65, 0.6); }
.ui-light .clay.no { color: var(--warm); }
.ui-light .face { color: var(--accent); }
.ui-light .face[data-mood="ok"] { color: var(--ochre); } .ui-light .face[data-mood="low"] { color: var(--warm); }
.ui-light .wish { color: #4d5549; }
.ui-light .wish .pics { color: var(--accent); }
.ui-light #tray { background: var(--dock); box-shadow: inset 0 1px 0 rgba(48, 56, 40, 0.1); }
.ui-light .tool { color: #303a31; }
.ui-light .tool .ic { filter: grayscale(1) sepia(0.3) brightness(0.55); }
.ui-light .tool.on .lb { color: var(--accent); }
@keyframes monoGlowLight { 0%, 100% { box-shadow: inset 0 0 0 1px var(--glass-edge), 0 0 0 0 rgba(85, 125, 91, 0); } 50% { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 14px 2px rgba(85, 125, 91, 0.4); } }
.ui-light .tool.glow { animation-name: monoGlowLight; }
.ui-light .tool .new { background: var(--warm); color: #fff; }
.ui-light .traywrap::before { background: linear-gradient(90deg, var(--dock), rgba(214, 213, 198, 0)); }
.ui-light .traywrap::after { background: linear-gradient(270deg, var(--dock), rgba(214, 213, 198, 0)); }
.ui-light .sep { background: rgba(48, 56, 40, 0.14); }
.ui-light .hold { box-shadow: inset 0 0 0 1px var(--glass-edge), 0 10px 30px -14px rgba(40, 45, 30, 0.5); }
.ui-light .hold .htypes button.on { color: var(--accent-ink); }
.ui-light .toast.warn { background: rgba(240, 224, 210, 0.94); color: #8f4426; }
.ui-light .bubble { background: rgba(236, 235, 225, 0.94); color: var(--ink); }
.ui-light .bubble::after { border-bottom-color: rgba(236, 235, 225, 0.94); }
.ui-light .sheet, .ui-light .shead, .ui-light .card { background: var(--pane); color: var(--ink); }
.ui-light .sheet { box-shadow: 0 -10px 30px rgba(40, 45, 30, 0.22); }
.ui-light .card { box-shadow: inset 0 0 0 1px var(--glass-edge), 0 20px 50px rgba(40, 45, 30, 0.35); }
.ui-light .scrim { background: rgba(40, 45, 32, 0.4); }
.ui-light .bar { background: #d3d2c3; }
.ui-light .bar i { background: var(--accent); }
.ui-light .stat.top .bar i { background: var(--ochre); }
.ui-light .bar.down i { background: var(--warm); }
.ui-light .why, .ui-light .dominant, .ui-light .card .news { background: var(--pane-2); }
.ui-light .dominant.pressing { background: #e9d9cb; }
.ui-light .doing { background: #d9e0d0; }
.ui-light .thought { background: #e1e0d3; }
.ui-light .chip, .ui-light .wide, .ui-light .card button.ghost { background: var(--pane-2); color: var(--ink); }
.ui-light .chip.on { background: var(--accent); color: var(--accent-ink); }
.ui-light .wide.on { background: #d4dccb; }
.ui-light .wide.danger { background: #ead7c9; color: #8f4426; }
.ui-light .card .granted { color: var(--accent); }
.ui-light .lift.up { background: #d6e0cf; color: #3f6a46; } .ui-light .lift.down { background: #ead7c9; color: #8f4426; }

/* the mono kits' icons in running text: the cards, the toast, the murmur, the wish (monoHtml) */
.ui-mono .mi.em { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.22em; stroke-width: 2; }
.ui-mono .big { color: var(--accent); }
.ui-mono .big .mi.em { width: 40px; height: 40px; }
.ui-mono .bigface { color: var(--accent); }
.ui-mono .bigface .mi.em { width: 60px; height: 60px; display: block; margin: 4px auto; }
.ui-mono .stat .k { color: var(--ink); }
.ui-mono .stat .k .mi.em { color: var(--soft); margin-right: 4px; }
.ui-mono .stat.top .k .mi.em { color: var(--ochre, #f2c66d); }
.ui-mono .dominant .ic, .ui-mono .doing .ic { color: var(--accent); }
.ui-mono .dominant.pressing .ic { color: var(--warm, #ff8f7a); }
.ui-mono .dominant .ic .mi.em, .ui-mono .doing .ic .mi.em { width: 28px; height: 28px; vertical-align: middle; }
.ui-mono .trow .ic { color: var(--soft); }
.ui-mono .trow .ic .mi.em { width: 18px; height: 18px; }
.ui-mono .trow .v .mi.em { color: var(--soft); }
.ui-mono .thought { color: var(--soft); font-size: 15px; }
.ui-mono .thought .mi.em { color: var(--accent); }
.ui-mono .why .mi.em, .ui-mono .card .hint .mi.em { color: var(--ochre, #f2c66d); }
.ui-mono .card .news .mi.em { color: var(--accent); }
.ui-mono .bubble { display: flex; align-items: center; gap: 4px; }
.ui-mono .bubble .mi.em { width: 16px; height: 16px; color: var(--accent); vertical-align: middle; }
.ui-mono .toast .mi.em { color: var(--accent); }
.ui-mono #wishText .mi.em { color: var(--accent); }
/* (hurrying: the arrows lead, the moon steps back) */
.ui-mono .pill.on .mi.ff { width: 20px; height: 20px; opacity: 1; }
.ui-mono .pill.on .mi:first-child { opacity: 0.6; }

/* the town card's folded settings (New town lives behind it) */
.settings { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 6px; }
.settings summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 6px; color: var(--soft); font-size: 14px; font-weight: 600; }
.settings summary::-webkit-details-marker { display: none; }
.settings summary::after { content: '›'; margin-left: auto; font-size: 20px; transition: transform 0.2s; }
.settings[open] summary::after { transform: rotate(90deg); }

/* a player who asked for less motion: no pulses, no running arrows, no pops */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .tool.glow, .ui-mono .tool.glow { box-shadow: inset 0 0 0 2px var(--accent, #f2a33a) !important; }
}

/* ── the Murmling card, calm: a now strip, its one want, four vital rings, its next needs as pills, More ── */
.now { display: flex; align-items: center; gap: 12px; background: var(--pane-2, #f1ead9); border-radius: 16px; padding: 10px 12px; margin: 10px 0 8px; }
.now .ic { font-size: 26px; color: var(--accent); flex: 0 0 auto; }
.now .ic .mi.em { width: 28px; height: 28px; }
.now b { font-size: 16px; }
.now .murmur { color: var(--soft); font-size: 14px; margin-top: 2px; }
.now .murmur .mi.em { color: var(--accent); }
.want { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--pane-2, #f6efe0); margin: 8px 0; }
.want.pressing { background: #ecdccd; }
.want .ic { font-size: 26px; color: var(--ochre, #c98a12); }
.want.pressing .ic { color: var(--warm, #b0623f); }
.want .ic .mi.em { width: 28px; height: 28px; }
.want .w { flex: 1; }
.want .k { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); }
.want b { font-size: 16px; }
.want .meter { height: 6px; border-radius: 3px; background: rgba(0, 0, 0, 0.08); margin-top: 6px; overflow: hidden; }
.want .meter i { display: block; height: 100%; background: var(--ochre, #c98a12); border-radius: 3px; }
.want.pressing .meter i { background: var(--warm, #b0623f); }
/* (a vital: a ring round its icon, filled as far as it stands; its name small under it) */
.rings { display: flex; justify-content: space-between; gap: 8px; margin: 14px 2px 6px; }
.ring { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ring span { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; color: var(--ink);
  background: radial-gradient(closest-side, var(--pane, #fffaf1) 78%, transparent 80% 100%), conic-gradient(var(--accent, #6aa84f) calc(var(--p) * 1%), rgba(0, 0, 0, 0.09) 0); }
.ring span .mi.em { width: 20px; height: 20px; }
.ring small { font-size: 11px; color: var(--soft); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.pill2 { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px; font-size: 13px; color: var(--ink); background: var(--pane-2, #f1e7d6); }
.pill2::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--p) * 1%); background: var(--accent, #6aa84f); opacity: 0.7; }
.pill2.pressing { background: #ecdccd; } .pill2.pressing::after { background: var(--warm, #b0623f); }
.pill2 .mi.em { width: 16px; height: 16px; color: var(--soft); }
.more { margin-top: 12px; }
/* the diary: newest first, a time, what and where, with whom, the feelings */
.diary { list-style: none; margin: 0; padding: 0; text-align: left; }
.diary li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line, rgba(0, 0, 0, 0.06)); font-size: 14px; }
.diary li:last-child { border-bottom: 0; }
.diary .t { flex: 0 0 44px; color: var(--soft); font-variant-numeric: tabular-nums; font-size: 13px; padding-top: 1px; }
.diary.past .t { font-size: 18px; }
.diary .with, .diary .kept { font-size: 13px; color: var(--soft); margin-top: 2px; }
.diary .feels { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.diary .feel { font-size: 12px; padding: 2px 7px; border-radius: 999px; background: var(--pane-2, #f1e7d6); color: var(--ink); }
.diary .feel.strong { font-weight: 700; }
.more summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--soft); font-size: 14px; font-weight: 600; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: '›'; margin-left: auto; font-size: 20px; transition: transform 0.2s; }
.more[open] summary::after { transform: rotate(90deg); }

/* the mono light glow, plain to see on the linen dock: a moss-tinted token lifted a little, its ring breathing */
.ui-light .tool.glow { background: #dfe6d6; top: -3px; animation-name: monoGlowLight2; }
@keyframes monoGlowLight2 { 0%, 100% { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 0 rgba(85, 125, 91, 0.0), 0 6px 14px -8px rgba(40, 45, 30, 0.5); } 50% { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 6px rgba(85, 125, 91, 0.28), 0 8px 16px -8px rgba(40, 45, 30, 0.5); } }
.card .line.built { font-size: 14px; }

/* the town card's sites under way: a row each, its progress, build-first and pause */
.site { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.site .ic { font-size: 20px; color: var(--soft); flex: 0 0 24px; text-align: center; }
.site .ic .mi.em { width: 20px; height: 20px; }
.site .w { flex: 1; min-width: 0; }
.site .n { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site .meter { height: 5px; border-radius: 3px; background: rgba(0, 0, 0, 0.08); margin-top: 5px; overflow: hidden; }
.site .meter i { display: block; height: 100%; background: var(--accent, #6aa84f); }
.site.held .meter i { background: var(--soft); }
.site .sb { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; display: grid; place-items: center; font-size: 16px; color: var(--soft); background: var(--pane-2, #f1e7d6); }
.site .sb.on { background: var(--accent, #6aa84f); color: var(--accent-ink, #fff); }
.site .sb .mi.em { width: 18px; height: 18px; }
.card .tip { font-size: 14px; color: var(--soft); background: var(--pane-2, #f8f1e4); border-radius: 14px; padding: 10px 12px; margin: 8px 0; text-align: left; }
.card .tip button { width: auto; min-height: 40px; padding: 0 14px; margin: 8px 0 0; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
#goingUp { scroll-margin-top: 44px; }

/* the town badge (top left): its mood face, its head count, a thin mood bar under the count */
.face { width: auto; min-width: 50px; padding: 0 12px 0 4px; border-radius: 25px; display: flex; gap: 6px; overflow: visible; flex: 0 0 auto; }
.face .fic { position: relative; width: 42px; height: 42px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; flex: 0 0 42px; }
.face .popn { display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-width: 18px; }
.face .popn b { font-size: 18px; font-weight: 800; line-height: 1; color: var(--ink); text-align: left; font-variant-numeric: tabular-nums; }
.face .mbar { display: block; height: 4px; border-radius: 2px; background: rgba(0, 0, 0, 0.1); overflow: hidden; }
.face .mbar i { display: block; height: 100%; background: var(--ring, var(--accent)); border-radius: 2px; transition: width 0.6s; }
.face.empty { padding: 0 4px; } .face.empty .popn { display: none; }
.face::after { inset: 4px auto 4px 4px; width: 42px; }
.ui-mono .face { width: auto; height: 46px; padding: 0 12px 0 2px; border-radius: 14px; }
.ui-mono .face .fic { width: 40px; height: 40px; flex-basis: 40px; }
.ui-mono .face .popn b { color: var(--ink); }
.ui-mono .face .mbar i { background: currentColor; }
.ui-mono .face { flex: 0 0 auto; min-width: 46px; }
.face .popn { min-width: 28px; }

/* the new town card's two kinds of day: two tiles side by side, each its name and a line on it */
.card .choices { display: flex; gap: 10px; margin: 8px 0 4px; }
.card .choice { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; min-height: 120px; padding: 12px; border-radius: 16px; background: var(--pane-2, #f1e7d6); color: var(--ink); font-size: 16px; margin: 0; }
.card .choice b { display: flex; align-items: center; gap: 6px; font-size: 16px; }
.card .choice small { font-size: 12px; font-weight: 500; line-height: 1.35; color: var(--soft); }
.card .choice:active { background: var(--accent); color: var(--accent-ink); }
.card .choice:active small { color: inherit; }
.card .label { text-align: left; }
.card button.choice, .ui-mono .card button.choice { background: var(--pane-2, #f1e7d6); color: var(--ink); box-shadow: inset 0 0 0 1px var(--glass-edge, rgba(0,0,0,0.08)); }
.card button.choice b .mi.em { color: var(--accent); }
.card button.choice:active, .ui-mono .card button.choice:active { background: var(--accent); color: var(--accent-ink); }

/* the new town's name: a field and a die */
.card .namerow { display: flex; gap: 8px; margin: 4px 0 6px; }
.card .namerow input { flex: 1; min-width: 0; height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--pane, #fffaf1); color: var(--ink); font: inherit; font-size: 17px; font-weight: 600; padding: 0 14px; }
.card .namerow input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.card .namerow button { width: 48px; min-height: 48px; margin: 0; padding: 0; flex: 0 0 48px; font-size: 20px; }
/* the strip's day line may carry the town's name: one line, cut short */
#day { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* a hibernating town: the map dimmed and cooled, a calm band over it with the way to wake it */
#stage.asleep #map { filter: saturate(0.45) brightness(0.82); transition: filter 0.6s; }
.sleep { position: absolute; left: 12px; right: 12px; top: 40%; z-index: 4; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: 20px; background: var(--glass, rgba(255, 250, 241, 0.92)); color: var(--ink); box-shadow: inset 0 0 0 1px var(--glass-edge, rgba(0,0,0,0.08)), 0 10px 30px -12px rgba(30, 35, 25, 0.5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.sleep .zz { font-size: 26px; color: var(--accent); }
.sleep .zz .mi.em { width: 28px; height: 28px; }
.sleep > div { flex: 1; min-width: 0; }
.sleep b { font-size: 15px; }
.sleep .soft { font-size: 13px; }
.sleep button { min-height: 44px; padding: 0 16px; border-radius: 14px; font-weight: 700; font-size: 15px; }
#day { display: flex; min-width: 0; }
#day .tn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#day .dn { flex: 0 0 auto; white-space: pre; }
.version { margin-top: 10px; text-align: center; font-size: 11px; opacity: 0.7; }

/* the town card's foot: a New town link, the version beside it */
.town-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 16px; padding-top: 8px; border-top: 1px solid var(--line, rgba(0, 0, 0, 0.08)); font-size: 13px; }
.linkbtn { background: none; border: 0; box-shadow: none; padding: 6px 0; min-height: 32px; color: var(--accent, #3f8f6b); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* a Murmling's friends: chips that open their card */
button.pill2.friend { border: 0; font: inherit; font-size: 13px; cursor: pointer; }
button.pill2.friend::after { display: none; }
.pill2.friend.best { background: color-mix(in srgb, var(--accent, #6aa84f) 22%, var(--pane-2, #f1e7d6)); }
.pill2.friend.cool { opacity: 0.75; }

/* the town card's population: a row a Murmling, each opening on what moved its mood and health */
.pop-list { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.pop { border-radius: 10px; background: rgba(0, 0, 0, 0.04); }
.pop > summary { display: grid; grid-template-columns: 26px 1fr auto; column-gap: 8px; align-items: center; padding: 6px 8px; min-height: 36px; cursor: pointer; list-style: none; }
.pop > summary::-webkit-details-marker { display: none; }
.pop .wt { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--soft); }
.pop-body { padding: 0 8px 8px 42px; display: flex; flex-direction: column; gap: 4px; }
.pop-body .linkbtn { align-self: flex-start; min-height: 28px; padding: 2px 0; }
