/* Unboxando — Taccuino. Un solo foglio di stile, nessuna dipendenza esterna. */
@font-face { font-family: Nunito; src: url('../fonts/nunito-latin-400-normal.woff2') format('woff2'); font-weight: 400 600; font-display: swap; }
@font-face { font-family: Nunito; src: url('../fonts/nunito-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: Nunito; src: url('../fonts/nunito-latin-800-normal.woff2') format('woff2'); font-weight: 800 900; font-display: swap; }
:root {
  --bg: #f3f0e7; --bg2: #eae7da; --card: #fcfaf4; --ink: #283e33; --muted: #697365;
  --line: #d0d2c2; --line-soft: #e4e4d7; --accent: #345743; --accent-2: #45694e;
  --accent-ink: #fffdf4; --accent-soft: #e2e9db; --rust: #a04f36; --gold: #876829;
  --ok: #3c704d; --bad: #a63f35; --glass: var(--bg); --sh-1: none;
  --sh-2: 0 2px 0 #283e3306; --sh-3: 0 12px 44px #152a2630; --glow: none;
  --r-C: #6b7065; --r-N: #417148; --r-R: #3b7191; --r-S: #79618f;
  --r-M: #986527; --r-G: #aa4640; --r-X: #8b701f; --r-L: #435648;
  --radius: 9px; --r-sm: 6px; --r-lg: 10px; --r-xl: 12px;
  --nav-h: 70px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --display: Georgia, 'Times New Roman', serif; --body: Nunito, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #1c2722; --bg2: #29362d; --card: #243129; --ink: #ececdb; --muted: #b3bfaa;
  --line: #4d604f; --line-soft: #394d3d; --accent: #b5c9a1; --accent-2: #c4d6b3;
  --accent-ink: #1d3125; --accent-soft: #354b39; --rust: #e1a081; --gold: #e5c787;
  --ok: #a9ce9e; --bad: #e39b88; --r-L: #526e58; --sh-3: 0 12px 44px #0005;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #1c2722; --bg2: #29362d; --card: #243129; --ink: #ececdb; --muted: #b3bfaa;
    --line: #4d604f; --line-soft: #394d3d; --accent: #b5c9a1; --accent-2: #c4d6b3;
    --accent-ink: #1d3125; --accent-soft: #354b39; --rust: #e1a081; --gold: #e5c787;
    --ok: #a9ce9e; --bad: #e39b88; --r-L: #526e58; --sh-3: 0 12px 44px #0005;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { min-height: 100%; scroll-padding-top: 90px; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; font-family: var(--display); line-height: 1.12; font-weight: 400; overflow-wrap: anywhere; }
h1 { font-size: 2.6rem; letter-spacing: -.04em; }
h2 { font-size: 1.7rem; letter-spacing: -.025em; }
h3 { font-size: 1.2rem; }
p { overflow-wrap: anywhere; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--rust); outline-offset: 4px; }
::selection { background: var(--accent-soft); }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.hidden { display: none !important; }
.ink-icon { flex: none; display: inline-block; vertical-align: middle; }
#app { max-width: 720px; min-height: 100dvh; margin: auto; }
.skip-link { position: fixed; left: 12px; top: -80px; padding: 10px 16px; background: var(--card); z-index: 200; }
.skip-link:focus { top: 8px; }
/* Un'intestazione semplice, con il marchio e le cose utili. */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: calc(16px + var(--safe-t)) 24px 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
.brand { display: inline-flex; align-items: center; gap: 9px; border: 0; padding: 0; background: none; color: var(--ink); text-align: left; flex-shrink: 0; }
.brand > .ink-icon { color: var(--rust); }
.wordmark { font-family: var(--display); font-size: 1.7rem; font-weight: 700; letter-spacing: -.06em; }
.where { margin-left: auto; min-width: 0; text-align: right; }
.where b { display: block; font-weight: 800; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.where .small { font-size: .69rem; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--card); font-size: .8rem; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.coin-purse { color: var(--gold); border: 0; background: transparent; padding: 5px 0; }
.menu-button { position: relative; display: grid; place-items: center; background: none; border: 1px solid var(--line); border-radius: 6px; min-width: 40px; height: 40px; }
.dot { position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--rust); box-shadow: 0 0 0 3px var(--bg); }
main { min-width: 0; padding: 28px 24px calc(var(--nav-h) + var(--safe-b) + 32px); }
main:focus { outline: none; }
nav.tabs { position: fixed; z-index: 30; bottom: 0; left: 0; right: 0; background: var(--card); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
nav.tabs .inner { max-width: 720px; height: var(--nav-h); margin: auto; display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); padding: 5px 8px; gap: 3px; }
nav.tabs button { display: flex; flex-direction: column; gap: 4px; justify-content: center; align-items: center; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: .66rem; font-weight: 800; }
nav.tabs button.on { background: var(--accent-soft); color: var(--accent); }
nav.tabs .ic { display: flex; }
.nav-caption, .nav-note { display: none; }
/* Ritmo tipografico da taccuino, niente titoli dentro card ripetute. */
.page-heading { margin-bottom: 24px; }
.eyebrow { font: 800 .63rem/1.5 var(--body); letter-spacing: .18em; color: var(--muted); text-transform: uppercase; }
.chapter-no { color: var(--rust); }
.heading-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.heading-line .ink-icon { color: var(--rust); }
.page-heading p { margin: 9px 0 0; font-size: .9rem; }
.page-heading .heading-count { font-family: var(--display); color: var(--rust); font-size: 2.5rem; letter-spacing: -.04em; }
.card { padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 26px 0 12px; }
.section-title h3 { font-size: 1.25rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid var(--line); border-radius: 6px; min-height: 46px; padding: 11px 16px; background: var(--bg2); color: var(--ink); font-weight: 800; font-size: .88rem; line-height: 1.3; transition: background .12s, transform .12s; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.ghost { background: transparent; }
.btn.danger { background: #a63f35; border-color: #a63f35; color: #fff; }
.btn.block { width: 100%; }
.btn.sm { min-height: 38px; padding: 8px 12px; font-size: .8rem; border-radius: 5px; }
.btn:active:not(:disabled), .menu-button:active { transform: translateY(1px); }
.btn:disabled { background: var(--bg2); color: var(--muted); border-color: var(--line); opacity: .72; }
input.field, select.field, textarea.field { display: block; width: 100%; min-width: 0; min-height: 46px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); outline-offset: 2px; font-size: 1rem; }
.field::placeholder { color: var(--muted); opacity: 1; }
input.field:focus, select.field:focus, textarea.field:focus { border-color: var(--accent); }
label.lbl { display: block; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; margin: 14px 0 6px; }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-weight: 700; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 8px; }
.chip { min-height: 36px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--muted); font-size: .78rem; font-weight: 800; white-space: nowrap; }
.chip.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); font-size: .9rem; }
.empty .big { display: block; font-size: 2.2rem; margin-bottom: 10px; }
.segmented { display: flex; border-bottom: 1px solid var(--line); gap: 14px; }
.segmented button { flex: 1; background: none; color: var(--muted); border: 0; border-bottom: 2px solid transparent; padding: 12px 8px; font-size: .88rem; font-weight: 800; }
.segmented button.on { color: var(--accent); border-bottom-color: var(--accent); }
/* Oggetti: una lista leggibile, con codici di rarità sempre riconoscibili. */
.badge { display: inline-block; flex: none; min-width: 28px; padding: 3px 7px; border-radius: 4px; background: var(--r-C); color: #fff; font: 800 .7rem/1.4 var(--body); text-align: center; letter-spacing: .03em; }
.badge.r-C { background: var(--r-C); } .badge.r-N { background: var(--r-N); }
.badge.r-R { background: var(--r-R); } .badge.r-S { background: var(--r-S); }
.badge.r-M { background: var(--r-M); } .badge.r-G { background: var(--r-G); }
.badge.r-X { background: var(--r-X); } .badge.r-L { background: var(--r-L); }
.badge.r-U { background: #785875; outline: 1px solid var(--gold); outline-offset: 2px; }
.badge.sm { min-width: 22px; font-size: .65rem; padding: 2px 5px; }
.ing { display: inline-flex; align-items: center; gap: 5px; margin-right: 10px; font-size: .78rem; overflow-wrap: anywhere; }
.list { background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.item-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 13px 14px; background: none; border: 0; border-bottom: 1px solid var(--line-soft); text-align: left; }
.item-row:last-child { border-bottom: 0; }
.item-row .badge { min-width: 32px; }
.item-row:has(button) { cursor: pointer; }
button.item-row:active { background: var(--bg2); }
.item-name { font-size: .94rem; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-name.wrap { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
.unknown-name { color: var(--muted); letter-spacing: .08em; }
.item-ic { display: grid; place-items: center; flex: none; width: 44px; height: 44px; background: var(--bg2); border: 1px solid var(--line-soft); border-radius: 8px; font-size: 1.5rem; }
.qty { font: 400 1.15rem/1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tag { color: var(--muted); font-size: .72rem; font-weight: 700; overflow-wrap: anywhere; }
.num { min-width: 38px; font-size: .85rem; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.more-btn { display: block; width: 100%; margin-top: 12px; }
.fold { border-bottom: 1px solid var(--line-soft); }
.fold:last-child { border: 0; }
.fold > .head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px; background: none; border: 0; text-align: left; }
.fold > .body { padding: 0 14px 14px; }
.fold.open { background: var(--bg2); }
.fold .caret { color: var(--muted); font-weight: 800; }
.fold.open .caret { transform: rotate(90deg); }
.alert-bar { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 0 10px 12px; margin-bottom: 8px; background: var(--accent-soft); border: 0; border-left: 3px solid var(--accent); border-radius: 0 5px 5px 0; font-size: .8rem; }
.alert-bar.urgent { border-left-color: var(--rust); }
.alert-bar .caret { padding: 0 12px; font-size: 1.3rem; }
/* La cartolina del luogo. Tutta l'illustrazione è un SVG statico di pochi KB. */
.adventure-layout { display: grid; gap: 20px; }
.adv-hero { position: relative; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--card); }
.landscape { overflow: hidden; line-height: 0; background: #e6e9dc; }
.landscape svg { display: block; width: 100%; height: auto; }
.postcard-art { position: relative; }
.place-stamp { position: absolute; top: 14px; left: 16px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; background: #f8f5e9; border: 1px solid #7d8d76; color: #36503e; font-size: .59rem; font-weight: 800; letter-spacing: .1em; }
.postcard-number { position: absolute; right: 16px; bottom: 10px; font: italic .85rem var(--display); color: #283e33; }
.place-body { padding: 20px 22px 22px; }
.place-title { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.place-title h2 { font-size: 2rem; }
.place-change { display: flex; align-items: center; gap: 6px; background: none; border: 0; padding: 10px 0 10px 8px; color: var(--muted); font-size: .76rem; font-weight: 800; white-space: nowrap; }
.place-description { margin: 8px 0 18px; font-size: .86rem; color: var(--muted); }
.adv-btn { display: flex; justify-content: center; align-items: center; gap: 10px; position: relative; width: 100%; min-height: 55px; padding: 14px 16px; border: 1px solid var(--accent); border-radius: 6px; background: var(--accent); color: var(--accent-ink); font: 800 .95rem/1.4 var(--body); transition: transform .1s, background .12s; }
.adv-btn > .ink-icon:last-child { margin-left: auto; }
.adv-btn > .em { display: flex; align-items: center; }
.adv-btn > .adv-label { flex: 1; text-align: left; }
.adv-btn:active:not(:disabled) { transform: translateY(1px); }
.adv-btn:disabled { background: var(--bg2); color: var(--muted); border-color: var(--line); }
.adv-btn.busy { opacity: .8; }
.adv-status { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 10px 0 0; color: var(--muted); font-size: .68rem; }
.adv-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }
.adv-status.waiting::before { background: var(--rust); }
.adv-cooldown { height: 3px; margin-top: 12px; background: var(--line-soft); border-radius: 4px; overflow: hidden; }
.adv-cooldown i { display: block; height: 100%; background: var(--accent); }
.luck-note:empty { display: none; }
.luck-note { margin: 12px 0 0; font-size: .78rem; font-weight: 800; color: var(--ok); }
.trail-summary { display: flex; gap: 24px; border-bottom: 1px solid var(--line); padding: 2px 0 16px; margin-bottom: 20px; }
.trail-summary span { color: var(--muted); font-size: .76rem; }
.trail-summary b { font-weight: 800; color: var(--ink); }
.quick-paths { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.quick-path { display: flex; align-items: center; gap: 12px; padding: 16px 0; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; }
.quick-path > .ink-icon { color: var(--rust); }
.quick-path b { display: block; font-size: .85rem; }
.quick-path .tag { font-size: .69rem; font-weight: 400; }
.journal-welcome { padding: 22px 0 8px; display: flex; gap: 14px; align-items: flex-start; }
.journal-welcome > .ink-icon { color: var(--rust); }
.journal-welcome h3 { margin: 0 0 7px; font-size: 1.3rem; }
.journal-welcome p { color: var(--muted); font-size: .85rem; margin: 0; max-width: 42ch; }
.result { animation: reveal .16s ease-out; border: 1px solid var(--line); border-left: 3px solid var(--rust); border-radius: 0 8px 8px 0; background: var(--card); }
.result-heading { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; color: var(--rust); }
@keyframes reveal { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.result .found { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px; background: var(--bg2); border-radius: 5px; }
.result .found .item-ic { width: 56px; height: 56px; font-size: 2rem; }
.result .got { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.story { font-size: 1rem; line-height: 1.65; overflow-wrap: anywhere; }
.story b, .story strong { font-weight: 800; }
.inline-item .badge { margin-right: 4px; vertical-align: 1px; }
.new-flag, .usable-flag, .first-flag { display: inline-block; padding: 3px 7px; border: 1px solid var(--line); border-radius: 3px; font-size: .64rem; line-height: 1.4; font-weight: 800; letter-spacing: .02em; }
.new-flag { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.usable-flag { color: var(--accent); background: var(--accent-soft); }
.first-flag { color: var(--rust); border-color: var(--rust); margin-left: 4px; }
.item-row.never-done { border-left: 2px solid var(--rust); padding-left: 12px; }
/* Mappa: destinazioni vere e accessi, senza inventare distanze o progressi. */
.map-current { padding: 0; overflow: hidden; }
.map-current .landscape { height: 170px; }
.map-current .landscape svg { height: 100%; }
.map-current .place-body { padding: 18px 20px; }
.map-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.map-actions .btn { flex: 1; }
.map-destinations { position: relative; display: grid; gap: 10px; padding-left: 21px; margin-left: 6px; border-left: 1px dashed var(--line); }
.destination { position: relative; display: flex; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); }
.destination::before { content: ''; position: absolute; left: -27px; width: 9px; height: 9px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 4px var(--bg); }
.destination.locked::before { background: var(--line); }
.destination .item-name { white-space: normal; }
.destination .small { font-size: .77rem; }
.destination .btn { flex-shrink: 0; }
.destination .item-ic { border: 0; background: var(--bg2); }
/* Raccolta, banco di lavoro, voci secondarie. */
.area-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; width: 100%; min-height: 44px; background: none; border: 0; border-bottom: 1px solid var(--line-soft); text-align: left; }
.area-row:last-child { border-bottom: 0; }
.area-row.on { background: var(--accent-soft); box-shadow: inset 3px 0 var(--accent); }
.area-row .mini { width: 65px; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.area-row .mini i, .progress i, .xpbar i { display: block; height: 100%; background: var(--accent); }
.progress, .xpbar { height: 5px; border-radius: 4px; background: var(--line); overflow: hidden; }
.dex { display: grid; grid-template-columns: repeat(auto-fill,minmax(96px,1fr)); gap: 8px; }
.dex .tile { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 6px; min-height: 104px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); text-align: center; }
.dex .tile .em { font-size: 1.8rem; }
.dex .tile .nm { font-size: .73rem; font-weight: 800; }
.dex .tile.unknown { opacity: .6; }
.bench { border: 1px dashed var(--line); border-radius: 7px; padding: 12px; min-height: 94px; background: var(--card); }
.bench .empty { display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: .84rem; }
.bench .empty .ink-icon { color: var(--rust); }
.workbench-note { border-top: 1px solid var(--line); padding-top: 12px; }
.stepper { display: inline-flex; align-items: center; gap: 5px; }
.stepper button { width: 38px; height: 38px; background: var(--card); border: 1px solid var(--line); border-radius: 5px; font-size: 1.05rem; font-weight: 800; }
.stepper span { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; }
.rank { min-width: 26px; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 1rem; }
.lb-row.me { background: var(--accent-soft); }
.lb-num { min-width: 38px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.feed-row { padding: 16px; border-bottom: 1px solid var(--line-soft); font-size: .9rem; }
.feed-row:last-child { border-bottom: 0; }
.feed-row .when { color: var(--muted); font-size: .71rem; }
.chat { max-height: 46vh; min-height: 180px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 6px 4px; }
.chat-msg { max-width: 85%; align-self: flex-start; background: var(--bg2); border-radius: 9px 9px 9px 2px; padding: 9px 12px; }
.chat-msg.me { align-self: flex-end; border-radius: 9px 9px 2px 9px; color: var(--accent-ink); background: var(--accent); }
.chat-msg .who { font-weight: 800; font-size: .74rem; color: var(--accent); margin-bottom: 2px; }
.chat-msg.me .who { color: inherit; }
.chat-msg .txt { font-size: .91rem; line-height: 1.4; overflow-wrap: anywhere; }
.chat-msg .when { font-size: .67rem; opacity: .8; text-align: right; margin-top: 3px; }
.chat-sys { align-self: center; text-align: center; font-size: .73rem; color: var(--muted); }
/* Pannelli accessibili: chiusura visibile, tastiera, nessun effetto di sfocatura. */
.backdrop { position: fixed; inset: 0; background: #15221ab3; z-index: 50; }
.sheet { position: fixed; z-index: 51; left: 0; right: 0; bottom: 0; max-width: 640px; max-height: 88dvh; overflow-y: auto; margin: auto; padding: 48px 20px calc(24px + var(--safe-b)); background: var(--card); border: 1px solid var(--line); border-radius: 13px 13px 0 0; box-shadow: var(--sh-3); animation: reveal .16s ease-out; }
.sheet .grab { width: 36px; height: 3px; position: absolute; top: 16px; left: calc(50% - 18px); background: var(--line); border-radius: 3px; }
.sheet-close { position: absolute; right: 12px; top: 6px; display: grid; place-items: center; width: 36px; height: 36px; background: none; border: 0; border-radius: 5px; color: var(--muted); font-size: 1.6rem; line-height: 1; }
.sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.sheet-head .item-ic { width: 56px; height: 56px; font-size: 2rem; }
#toasts { position: fixed; z-index: 100; top: calc(12px + var(--safe-t)); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 16px; pointer-events: none; }
.toast { max-width: 540px; padding: 12px 18px; background: var(--ink); color: var(--bg); border-radius: 6px; font-size: .88rem; font-weight: 700; box-shadow: var(--sh-3); pointer-events: auto; animation: reveal .15s ease-out; }
.toast.bad { background: #a63f35; color: #fff; }
.toast.ok { background: #345743; color: #fff; }
.admin-list .item-row { cursor: pointer; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
.pct { min-width: 52px; font-size: .82rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.stat-grid .card { padding: 14px 8px; text-align: center; }
.stat-grid b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.7rem; }
.linkish { padding: 4px 0; background: none; border: 0; color: var(--accent); font-weight: 800; font-size: .85rem; }
/* La prima pagina. */
body.is-login #app { max-width: 1120px; display: block; }
.login { min-height: 100dvh; max-width: 500px; margin: auto; padding: 30px 24px; display: flex; flex-direction: column; justify-content: center; }
.login .brand { margin-bottom: 40px; }
.login h1 { margin-top: 16px; font-size: clamp(2.5rem,7vw,3.7rem); line-height: 1.05; }
.login h1 em { color: var(--rust); font-weight: 400; }
.login-intro { font-size: .93rem; color: var(--muted); max-width: 36ch; margin: 18px 0 24px; }
.login .landscape { border-radius: 60% 60% 7px 7px / 26% 26% 7px 7px; }
.login-caption { display: flex; align-items: center; gap: 8px; font-size: .68rem; color: var(--muted); margin-top: 12px; }
.login-form { padding: 28px 0 0; }
.login-form h2 { margin: 10px 0 24px; font-size: 1.7rem; }
.login-label { display: block; font-size: .75rem; font-weight: 800; margin-bottom: -6px; }
.login-form .btn { margin-top: 24px; min-height: 50px; }
.login-form .btn .ink-icon { margin-left: auto; }
.login-footnote { font-family: var(--display); font-style: italic; color: var(--muted); font-size: .85rem; text-align: center; margin-top: 26px; }
@media (hover: hover) {
  .btn.primary:hover:not(:disabled), .adv-btn:hover:not(:disabled) { background: var(--accent-2); }
  .chip:hover, button.item-row:hover, .area-row:hover, .menu-button:hover { background: var(--accent-soft); }
  .quick-path:hover b, .place-change:hover { color: var(--rust); }
  .brand:hover .wordmark { color: var(--accent); }
}
@media (min-width: 980px) {
  #app { max-width: 1100px; display: grid; grid-template-columns: 205px minmax(0,1fr); grid-template-rows: auto 1fr; align-items: start; }
  .topbar { grid-column: 1 / -1; padding: 23px 24px; gap: 25px; }
  .wordmark { font-size: 1.9rem; }
  .where b { font-size: .85rem; } .where .small { font-size: .73rem; }
  main { grid-column: 2; grid-row: 2; padding: 36px 40px 64px; border-left: 1px solid var(--line); min-height: calc(100dvh - 88px); }
  nav.tabs { grid-column: 1; grid-row: 2; position: sticky; top: 115px; border: 0; background: none; padding: 35px 20px 20px 10px; }
  nav.tabs .inner { display: flex; flex-direction: column; height: auto; padding: 0; gap: 6px; }
  nav.tabs button { flex-direction: row; justify-content: flex-start; gap: 13px; min-height: 49px; padding: 12px; font-size: .84rem; }
  nav.tabs button .ic { margin: 0; }
  .nav-caption { display: block; padding: 0 12px; font-size: .58rem; letter-spacing: .16em; color: var(--muted); font-weight: 800; margin-bottom: 18px; }
  .nav-note { display: block; margin: 65px 12px 0; color: var(--muted); }
  .nav-note .ink-icon { color: var(--rust); }
  .nav-note p { font: italic 1.05rem/1.6 var(--display); }
  .page-heading { margin-bottom: 26px; }
  .place-body { padding: 23px 27px; }
  .adventure-layout { gap: 24px; }
  .adv-hero .landscape { height: 250px; }
  .adv-hero .landscape svg { height: 100%; }
  .sheet { bottom: 24px; border-radius: 12px; }
  .login { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 95px; max-width: 1100px; padding: 48px 40px; border: 0; }
  .login-form { padding: 30px 0 30px 42px; border-left: 1px solid var(--line); }
  .login-story .brand { margin-bottom: 60px; }
}
@media (max-width: 480px) {
  .topbar { padding: calc(12px + var(--safe-t)) 18px 12px; gap: 16px; }
  .topbar .where { display: none; }
  .topbar .brand { margin-right: auto; }
  .wordmark { font-size: 1.6rem; }
  .topbar .brand .ink-icon { width: 24px; }
  main { padding: 24px 18px calc(var(--nav-h) + var(--safe-b) + 24px); }
  h1 { font-size: 2.1rem; }
  .page-heading { margin-bottom: 20px; }
  .page-heading p { font-size: .84rem; }
  .heading-line { margin-top: 9px; }
  .place-body { padding: 18px; }
  .place-title h2 { font-size: 1.85rem; }
  .trail-summary { gap: 18px; margin-bottom: 18px; }
  .quick-paths { gap: 14px; }
  .quick-path { gap: 8px; }
  .quick-path > .ink-icon { width: 22px; }
  .quick-path .tag { font-size: .64rem; }
  .quick-path b { font-size: .8rem; }
  .destination { gap: 9px; padding: 12px; }
  .destination .item-ic { width: 32px; height: 36px; font-size: 1.3rem; }
  .destination .btn { padding: 8px 10px; }
  .item-row { gap: 9px; padding: 12px; }
  .item-row .row { flex-wrap: wrap; }
  .first-flag { font-size: .58rem; }
  .login { padding: 24px; }
  .login .brand { margin-bottom: 28px; }
  .login h1 { font-size: 2.55rem; }
  .login .landscape { max-height: 150px; }
  .login-form { padding-top: 30px; }
}
@media (max-width: 359px) {
  main { padding-left: 12px; padding-right: 12px; }
  .topbar { padding-left: 12px; padding-right: 12px; gap: 10px; }
  .wordmark { font-size: 1.4rem; }
  nav.tabs button { font-size: .59rem; }
  .place-title { align-items: flex-start; }
  .place-change { font-size: .69rem; }
  .trail-summary { gap: 12px; }
  .map-actions .btn { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
