/* Dalang: il teatro delle ombre. Notte indaco, lampada calda, oro delle marionette. */

@font-face { font-family: 'Alegreya'; font-weight: 700; font-style: normal; font-display: swap;
  src: url('/assets/fonts/alegreya-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Alegreya'; font-weight: 800; font-style: normal; font-display: swap;
  src: url('/assets/fonts/alegreya-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Alegreya'; font-weight: 400; font-style: italic; font-display: swap;
  src: url('/assets/fonts/alegreya-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Alegreya Sans'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('/assets/fonts/alegreya-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Alegreya Sans'; font-weight: 500; font-style: normal; font-display: swap;
  src: url('/assets/fonts/alegreya-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Alegreya Sans'; font-weight: 700; font-style: normal; font-display: swap;
  src: url('/assets/fonts/alegreya-sans-latin-700-normal.woff2') format('woff2'); }

:root {
  --night: #1e1b3a;
  --night-2: #28244d;
  --night-3: #37316a;
  --line: rgba(239, 231, 210, 0.16);
  --lamp: #efe7d2;
  --lamp-dim: #bdb39b;
  --gold: #d9a441;
  --gold-hi: #ecc46c;
  --gold-deep: #9c7024;
  --kelir: #eeddb0;
  --ink: #2a2340;
  --sud: #9a86f2;
  --nord: #ec6a7d;
  --warn: #f0a85a;
  --font-display: 'Alegreya', Georgia, 'Times New Roman', serif;
  --font-ui: 'Alegreya Sans', 'Segoe UI', system-ui, sans-serif;
  --r-btn: 10px;
  --r-sheet: 20px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--night);
  color: var(--lamp);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
#app { min-height: 100dvh; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: 0.005em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5625rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 0.75em; }
a { color: var(--gold-hi); }
button, input, select { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.muted { color: var(--lamp-dim); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 2px; border-radius: 6px; }

/* ------------------------------------------------------------ pulsanti */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0 1.1em;
  border-radius: var(--r-btn); border: 1px solid var(--line);
  background: transparent; color: var(--lamp);
  font-weight: 500; font-size: 1rem; cursor: pointer; text-decoration: none;
  transition: background-color 120ms, border-color 120ms, transform 80ms;
}
.btn:hover { background: rgba(239, 231, 210, 0.06); border-color: rgba(239, 231, 210, 0.3); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 700; }
.btn-primary:hover { background: var(--gold-hi); border-color: var(--gold-hi); }
.btn-wide { width: 100%; }
.btn-quiet { border-color: transparent; color: var(--lamp-dim); min-height: 40px; padding: 0 0.6em; }
.btn-quiet:hover { color: var(--lamp); background: transparent; }
.btn svg, .icon-btn svg { width: 20px; height: 20px; flex: none; }
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center;
  border: 0; border-radius: 12px; background: transparent; color: var(--lamp); cursor: pointer;
}
.icon-btn:hover { background: rgba(239, 231, 210, 0.08); }
.icon-btn[aria-pressed="true"] { background: rgba(217, 164, 65, 0.18); color: var(--gold-hi); }

.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  flex: 1 1 0; min-height: 44px; padding: 0 0.8em; border-radius: var(--r-btn);
  border: 1px solid var(--line); background: transparent; cursor: pointer; font-weight: 500;
}
.seg button[aria-pressed="true"] { border-color: var(--gold); background: rgba(217, 164, 65, 0.16); color: var(--gold-hi); }
.seg small { display: block; font-weight: 400; color: var(--lamp-dim); font-size: 0.8rem; line-height: 1.2; }

.switch { display: inline-flex; align-items: center; gap: 0.6em; cursor: pointer; min-height: 44px; user-select: none; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 12px; background: var(--night-3);
  position: relative; margin: 0; cursor: pointer; transition: background 140ms; flex: none; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--lamp-dim); transition: transform 140ms, background 140ms; }
.switch input:checked { background: var(--gold-deep); }
.switch input:checked::after { transform: translateX(18px); background: var(--gold-hi); }
.switch input:disabled { opacity: 0.4; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-btn); height: 40px; }
.stepper .ico { display: inline-flex; padding-left: 7px; color: var(--lamp-dim); }
.stepper .ico svg { width: 16px; height: 16px; }
@media (max-width: 399px) { .stepper .ico { display: none; } .toolrow .confirm { padding: 0 10px; } }
.stepper button { width: 30px; height: 38px; border: 0; background: transparent; cursor: pointer; font-size: 1.2rem; }
.stepper button:disabled { opacity: 0.35; }
.stepper output { min-width: 1.9em; text-align: center; font-variant-numeric: tabular-nums; }

input.code {
  width: 100%; min-height: 52px; padding: 0 0.8em; border-radius: var(--r-btn);
  border: 1px solid var(--line); background: var(--night-2); font-size: 1.5rem; letter-spacing: 0.2em;
  text-transform: uppercase; font-variant-numeric: tabular-nums;
}
input.seed { width: 7.5em; min-height: 44px; padding: 0 0.6em; border-radius: var(--r-btn);
  border: 1px solid var(--line); background: var(--night-2); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ home: lo schermo illuminato */
.home { min-height: 100dvh; display: flex; flex-direction: column; }
.kelir {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 50% 38%, #fbf0cc 0%, var(--kelir) 45%, #d8c28c 100%);
  color: var(--ink);
  padding: calc(20px + var(--safe-t)) 24px 26px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  justify-content: center;
}
.kelir::after { /* il bordo dello schermo di cotone */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: linear-gradient(to bottom, rgba(42, 35, 64, 0), rgba(42, 35, 64, 0.35));
}
.kelir .shadow-puppet {
  height: clamp(110px, 24dvh, 250px); margin-bottom: -6px;
  color: var(--ink); opacity: 0.86; filter: blur(1.2px);
}
.kelir .shadow-puppet svg { height: 100%; width: auto; display: block; }
.title-ink {
  position: relative; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(3.6rem, 19vw, 6.2rem); line-height: 0.9; letter-spacing: 0.02em; margin: 0;
  color: var(--ink); text-shadow: 0 0 18px rgba(42, 35, 64, 0.25);
}
.tagline { position: relative; font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: 1.15rem; margin: 0.5em 0 0; max-width: 24em; }
.home-actions { flex: 1; width: 100%; max-width: 520px; margin: 0 auto; padding: 24px 20px calc(20px + var(--safe-b));
  display: flex; flex-direction: column; gap: 10px; }
.home-actions .btn { justify-content: flex-start; min-height: 56px; font-size: 1.06rem; }
.home-actions .btn .sub { display: block; font-size: 0.85rem; font-weight: 400; color: inherit; opacity: 0.8; }
.home-actions .btn > span { text-align: left; line-height: 1.2; }
.home-links { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: center; margin-top: 8px; }
.connect-card { margin-top: 10px; padding: 14px; border: 1px dashed var(--line); border-radius: 14px; display: flex; gap: 14px; align-items: center; }
.connect-card .qr { width: 112px; height: 112px; background: #fff; border-radius: 8px; padding: 6px; flex: none; }
.connect-card .qr svg { width: 100%; height: 100%; display: block; }
.connect-card p { margin: 0; font-size: 0.92rem; }
.connect-card a { word-break: break-all; }

/* ------------------------------------------------------------ pagine semplici */
.page { max-width: 720px; margin: 0 auto; padding: calc(12px + var(--safe-t)) 18px calc(28px + var(--safe-b)); }
.page-head { display: flex; align-items: center; gap: 6px; min-height: 56px; margin-bottom: 8px; }
.page-head h1 { font-size: 1.6rem; }
.field { margin: 18px 0; }
.field > .label { display: block; font-weight: 700; margin-bottom: 8px; }
.field .hint { font-size: 0.9rem; color: var(--lamp-dim); margin-top: 6px; }
.map-preview { position: relative; width: 100%; max-width: 360px; margin: 6px auto 0; aspect-ratio: 544 / 744; }
.map-preview > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.map-name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.sticky-actions { position: sticky; bottom: 0; padding: 12px 0 calc(8px + var(--safe-b));
  background: linear-gradient(to bottom, rgba(30, 27, 58, 0), var(--night) 30%); display: grid; gap: 8px; }

.rules h2 { margin: 28px 0 10px; font-size: 1.35rem; }
.end-actions { display: grid; gap: 8px; margin-top: 18px; }
.rules p, .rules li { max-width: 66ch; }
.rules ul { padding-left: 1.2em; }
.rules li { margin: 0.3em 0; }
.table-wrap { overflow-x: auto; }
table.grid { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; margin: 8px 0 4px; }
table.grid th, table.grid td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
table.grid th { font-weight: 700; color: var(--lamp-dim); font-size: 0.92rem; }
table.grid td.n, table.grid th.n { text-align: center; }

.code-big { font-family: var(--font-display); font-weight: 800; font-size: 3.2rem; letter-spacing: 0.14em; text-align: center; margin: 10px 0 4px; font-variant-numeric: lining-nums; }
.lobby-card { text-align: center; padding: 18px; border: 1px solid var(--line); border-radius: 16px; margin: 14px 0; }
.lobby-card .qr { width: 168px; height: 168px; margin: 12px auto; background: #fff; border-radius: 10px; padding: 8px; }
.lobby-card .qr svg { width: 100%; height: 100%; display: block; }

/* ------------------------------------------------------------ partita */
.game {
  height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: radial-gradient(ellipse 80% 55% at 50% 42%, rgba(243, 217, 160, 0.11), rgba(243, 217, 160, 0) 70%), var(--night);
}
.game-head { display: flex; align-items: center; gap: 2px; padding: calc(2px + var(--safe-t)) 6px 0; min-height: 48px; }
.game-head .title { flex: 1; min-width: 0; }
.game-head .title strong { font-family: var(--font-display); font-size: 1.08rem; display: block; line-height: 1.1; }
.game-head .title span { font-size: 0.86rem; color: var(--lamp-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.side-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 999px;
  border: 1px solid var(--line); font-weight: 700; font-size: 0.9rem; }
.side-tag::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.side-S { color: var(--sud); }
.side-N { color: var(--nord); }

.board-wrap { position: relative; min-height: 0; margin: 0 4px; touch-action: manipulation; }
.board-wrap > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.board-wrap .overlay { cursor: pointer; }

.sheet {
  background: var(--night-2); border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  padding: 10px 12px calc(10px + var(--safe-b)); box-shadow: 0 -10px 30px rgba(10, 8, 25, 0.45);
  max-height: 50dvh; overflow-y: auto;
}
.sheet-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sheet-row + .sheet-row { margin-top: 10px; }
.sheet h2 { font-size: 1.2rem; }
.sheet .lead { margin: 2px 0 10px; color: var(--lamp-dim); font-size: 0.95rem; }
.sheet .actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
.sheet .actions.two { grid-template-columns: 1fr 1fr; }

/* chip delle pedine */
.pchips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pchip { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 4px 5px;
  border-radius: 12px; border: 1px solid var(--line); background: transparent; cursor: pointer; min-height: 44px; }
.pchip img { width: 30px; height: 30px; object-fit: contain; }
.pchip .nm { font-size: 0.78rem; line-height: 1.1; text-align: center; display: none; }
@media (min-width: 430px) { .pchip .nm { display: block; } }
.pchip .bar { width: 82%; height: 4px; border-radius: 2px; background: rgba(239, 231, 210, 0.14); overflow: hidden; }
.pchip .bar i { display: block; height: 100%; background: var(--lamp-dim); }
.pchip[aria-pressed="true"] { border-color: var(--gold); background: rgba(217, 164, 65, 0.13); }
.pchip[aria-pressed="true"] .bar i { background: var(--gold-hi); }
.pchip.dead { opacity: 0.35; cursor: default; }
.pchip .flag { position: absolute; top: 4px; right: 6px; font-size: 0.7rem; color: var(--gold-hi); }

/* linea del tempo del turno */
.tl { position: relative; height: 24px; margin: 4px 0 0; }
.tl .track { position: absolute; left: 0; right: 0; top: 3px; height: 10px; border-radius: 5px; background: rgba(239, 231, 210, 0.08); overflow: hidden; }
.tl .seg-move { position: absolute; top: 0; bottom: 0; border-right: 1px solid var(--night-2); }
.tl .seg-wait { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(239,231,210,.35) 0 3px, transparent 3px 6px); }
.tl .seg-debt { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(240,168,90,.6) 0 3px, transparent 3px 6px); }
.tl .seg-sel { box-shadow: inset 0 0 0 2px var(--gold-hi); }
.tl .ticks { position: absolute; left: 0; right: 0; top: 13px; height: 10px; font-size: 0.66rem; line-height: 1; color: var(--lamp-dim); }
.tl .ticks span:first-child { transform: none; }
.tl .ticks span:last-child { transform: translateX(-100%); }
.tl .ticks span { position: absolute; transform: translateX(-50%); }
.tl .over { position: absolute; top: 4px; bottom: 4px; width: 2px; background: var(--warn); }
.t-P { background: #8db255; } .t-F { background: #3f8a46; } .t-M { background: #b39a72; } .t-R { background: #4b7fe0; }

.wp-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px; }
.wp-line .where { font-weight: 700; }
.wp-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; }
.note { font-size: 0.9rem; color: var(--lamp-dim); }
.note.warn { color: var(--warn); }

.live { margin-top: 8px; }
.live .info { margin: 0; font-size: 0.93rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live .note { margin: 2px 0 0; font-size: 0.86rem; }
.toolrow { display: flex; align-items: center; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.toolrow .grow { flex: 1; min-width: 0; }
.toolrow .icon-btn { width: 38px; height: 40px; }
.toolrow .confirm { min-height: 44px; padding: 0 12px; }
.confirm .long { display: none; }
@media (min-width: 440px) { .confirm .long { display: inline; } .confirm .short { display: none; } }
.tool { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 8px; border-radius: var(--r-btn);
  border: 1px solid var(--line); background: transparent; cursor: pointer; font-weight: 500; }
.tool .lbl2 { display: none; }
@media (min-width: 440px) { .tool .lbl2 { display: inline; } }
.tool svg { width: 18px; height: 18px; }
.tool[aria-pressed="true"] { border-color: var(--gold); background: rgba(217, 164, 65, 0.16); color: var(--gold-hi); }
.tool:disabled, .icon-btn:disabled { opacity: 0.35; cursor: default; }
.stepper button { touch-action: none; user-select: none; -webkit-user-select: none; }

/* schieramento */
.tray { display: flex; gap: 8px; justify-content: center; min-height: 64px; align-items: center; flex-wrap: wrap; }
.tray button { width: 58px; height: 58px; border-radius: 12px; border: 2px solid transparent; background: rgba(239, 231, 210, 0.06); padding: 3px; cursor: pointer; }
.tray button img { width: 100%; height: 100%; object-fit: contain; }
.tray button[aria-pressed="true"] { border-color: var(--gold-hi); }

/* replay */
.clock { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.replay-row { flex-wrap: nowrap; }
.progress { height: 6px; border-radius: 3px; background: rgba(239, 231, 210, 0.12); overflow: hidden; flex: 1; min-width: 80px; }
.progress i { display: block; height: 100%; background: var(--gold); width: 0; }
.events { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; max-height: 22dvh; overflow-y: auto; }
.events li { font-size: 0.93rem; padding: 7px 10px; border-radius: 10px; background: rgba(239, 231, 210, 0.05); border-left: 3px solid var(--line); }
.events li.S { border-left-color: var(--sud); }
.events li.N { border-left-color: var(--nord); }
.events li.both { border-left-color: var(--gold); }
.events time { color: var(--lamp-dim); font-variant-numeric: tabular-nums; margin-right: 0.4em; }

/* coperture a tutto schermo */
.cover { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(24px + var(--safe-t)) 24px calc(24px + var(--safe-b)); text-align: center; }
.cover.kelir-cover { background: radial-gradient(ellipse 70% 55% at 50% 40%, #fbf0cc 0%, var(--kelir) 50%, #cdb57d 100%); color: var(--ink); }
.cover .puppet { height: min(42dvh, 340px); color: var(--ink); opacity: 0.9; filter: blur(1.4px); margin-bottom: 18px; }
.cover .puppet svg { height: 100%; width: auto; }
.cover h1 { font-size: clamp(2.2rem, 9vw, 3.2rem); font-weight: 800; }
.cover p { max-width: 26em; margin: 10px auto 22px; font-size: 1.05rem; }
.cover .btn-ink { background: var(--ink); color: var(--kelir); border-color: var(--ink); font-weight: 700; min-width: 240px; }
.cover .btn-ink:hover { background: #3a3158; }
.cover .cover-exit { margin-top: 14px; color: rgba(42, 35, 64, 0.75); }
.cover .cover-exit:hover { color: var(--ink); }
.cover.dim { background: rgba(14, 12, 30, 0.82); backdrop-filter: blur(3px); color: var(--lamp); }

.result-card { background: var(--night-2); border: 1px solid var(--line); border-radius: 20px; padding: 22px 20px; width: min(440px, 100%); }
.result-card .medal { width: 70px; margin: 0 auto 8px; color: var(--gold); }
.result-card h1 { font-size: 2.3rem; }
.result-card .actions { display: grid; gap: 8px; margin-top: 18px; }

.reveal { animation: reveal 900ms cubic-bezier(.2, .7, .2, 1) both; }
@keyframes reveal {
  0% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  55% { opacity: 0.95; transform: translate(-50%, -4%) scale(1.06) rotate(-2deg); }
  100% { opacity: 0; transform: translate(-50%, -14%) scale(1.5) rotate(4deg); }
}
.reveal-layer { position: fixed; inset: 0; z-index: 30; pointer-events: none; background: rgba(238, 221, 176, 0.0); }
.reveal-layer .puppet { position: absolute; left: 50%; top: 12%; height: 70%; color: #110e22; filter: blur(2px); }
.reveal-layer .puppet svg { height: 100%; width: auto; }

/* menu */
.menu-sheet { position: fixed; inset: 0; z-index: 50; background: rgba(10, 8, 24, 0.6); display: flex; align-items: flex-end; justify-content: center; }
.menu-sheet .panel { width: min(520px, 100%); background: var(--night-2); border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  padding: 14px 14px calc(14px + var(--safe-b)); display: grid; gap: 8px; }
.menu-sheet .btn { justify-content: flex-start; }

#toasts { position: fixed; left: 0; right: 0; top: calc(10px + var(--safe-t)); z-index: 60; display: grid; justify-items: center; gap: 6px; pointer-events: none; }
.toast { pointer-events: auto; max-width: min(92vw, 460px); background: var(--lamp); color: var(--ink); border-radius: 12px;
  padding: 10px 14px; font-weight: 500; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35); }
.toast.error { background: #f6c2a8; }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(239, 231, 210, 0.2); border-top-color: var(--gold); animation: spin 0.9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.waiting { display: flex; align-items: center; gap: 12px; }
.dot-ok { color: #9fd49a; }
.dot-off { color: var(--lamp-dim); }

/* ------------------------------------------------------------ elementi SVG della plancia */
.ov-veil { fill: rgba(14, 11, 32, 0.55); }
.ov-reach-pill { fill: rgba(20, 16, 42, 0.78); stroke: rgba(236, 196, 108, 0.7); stroke-width: 1.5; }
.ov-reach-label { font: 700 20px var(--font-ui); fill: #ffe3a6; }
.ov-deploy { fill: rgba(217, 164, 65, 0.12); stroke: var(--gold-hi); stroke-width: 2; stroke-dasharray: 6 5; }
.ov-threat { fill: rgba(236, 106, 125, 0.0); }
.ov-threat-label { font: 700 17px var(--font-ui); fill: #ffd2d8; paint-order: stroke; stroke: rgba(40, 10, 20, 0.85); stroke-width: 3px; }
.ov-path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ov-wp { stroke-width: 2.5; }
.ov-wp-label { font: 700 17px var(--font-ui); fill: #1b1630; }
.ov-badge { font: 700 19px var(--font-ui); fill: #fff; }
.ov-sel { fill: none; stroke: var(--gold-hi); stroke-width: 4; }
.ov-burst { fill: rgba(255, 214, 120, 0.25); stroke: #ffd678; stroke-width: 3; }
.ov-cardtext { font: 700 20px var(--font-ui); fill: var(--ink); }

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

/* ------------------------------------------------------------ schermi larghi: plancia a sinistra, pannello a destra */
@media (min-width: 760px) and (min-aspect-ratio: 1/1) {
  .game { grid-template-columns: minmax(0, 1fr) 400px; grid-template-rows: auto minmax(0, 1fr); }
  .game-head { grid-column: 1 / -1; }
  .board-wrap { margin: 6px 10px 14px; }
  .sheet { border-radius: var(--r-sheet); margin: 6px 14px 14px 0; max-height: none; align-self: stretch; overflow-y: auto; box-shadow: none; }
  .events { max-height: 40dvh; }
  .home { flex-direction: row; }
  .kelir { flex: 1.1; min-height: 100dvh; }
  .kelir .shadow-puppet { height: 38dvh; }
  .home-actions { flex: 1; justify-content: center; max-width: 480px; }
}
