/* Cu fu? — stile comune (TV, telefono, anteprima).
   Notte di campagna (blu profondo) + maiolica di Caltagirone (blu, giallo, verde) + carta delle carte da gioco. */
:root {
  --night: #0e1828;      /* fondo */
  --night-2: #16233a;    /* pannelli */
  --night-3: #203252;    /* pannelli in rilievo */
  --line: #2c4166;
  --paper: #f4ead2;      /* carta delle carte */
  --paper-2: #e6d7b3;
  --ink: #2a1c12;
  --text: #eef0f5;
  --muted: #9fb0cc;
  --maj-blue: #1f5d9e;
  --maj-yellow: #e9b23c;
  --maj-green: #2f7d55;
  --red: #c0262d;
  --good: #3fbf7f;
  --bad: #e0524f;
  --f-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --f-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--night); color: var(--text); font-family: var(--f-body); -webkit-font-smoothing: antialiased; font-variant-ligatures: no-common-ligatures; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--maj-yellow); outline-offset: 2px; }

/* testi della piantina */
.board { display: block; width: 100%; height: auto; }
.board .bd-lbl { font-family: var(--f-display); font-weight: 800; letter-spacing: .08em; }
.board .bd-small { font-family: var(--f-body); font-weight: 800; letter-spacing: .06em; }
.board .token.turn .pulse { animation: cf-pulse 1.4s ease-in-out infinite; transform-origin: center; }
.board .hi-cell { animation: cf-blink 1.6s ease-in-out infinite; cursor: pointer; }
.board .hi-room { cursor: pointer; }
.board .hi-room-fill { animation: cf-blink 1.6s ease-in-out infinite; }
@keyframes cf-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes cf-blink { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .board .token.turn .pulse, .board .hi-cell, .board .hi-room-fill { animation: none; } }

/* pulsanti */
.btn { appearance: none; border: 0; border-radius: 999px; padding: 14px 22px; font-weight: 800; font-size: 1.02rem; letter-spacing: .01em;
  background: var(--night-3); color: var(--text); box-shadow: inset 0 0 0 2px var(--line); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; }
.btn.gold { background: linear-gradient(180deg, #ffd56b, #e2a62a); color: #2a1a00; box-shadow: 0 6px 20px rgba(233, 178, 60, .28), inset 0 -3px 0 rgba(0, 0, 0, .18); }
.btn.blue { background: linear-gradient(180deg, #2d77c4, #1f5d9e); color: #fff; box-shadow: 0 6px 20px rgba(31, 93, 158, .35), inset 0 -3px 0 rgba(0, 0, 0, .2); }
.btn.danger { background: linear-gradient(180deg, #d8433f, #a3262b); color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.btn .ic { width: 22px; height: 22px; }

/* carte da gioco */
.card { position: relative; aspect-ratio: 5 / 7; border-radius: 12px; background: var(--paper); color: var(--ink); overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 6px 16px rgba(0, 0, 0, .35); display: flex; flex-direction: column; border: 2px solid #c7b48a; }
.card .k { font: 800 .58rem/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; padding: 7px 8px 0; color: #7a6646; display: flex; justify-content: space-between; }
.card .art { flex: 1; display: grid; place-items: center; padding: 6px 8px 2px; min-height: 0; }
.card .art svg { width: 100%; height: 100%; max-height: 100%; }
.card .nm { font: 800 .82rem/1.1 var(--f-display); text-align: center; padding: 6px 6px 9px; background: linear-gradient(0deg, rgba(0, 0, 0, .06), transparent); }
.card .band { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; }
.card.suspect .art { padding: 8px 10px 2px; }
.card.suspect .art svg { border-radius: 50%; }
.card.weapon { background: linear-gradient(180deg, var(--paper), #eadcbc); }
.card.room { background: linear-gradient(180deg, #f3ead6, #e5d3ab); }
.card.room::after, .card.weapon::after { content: ''; position: absolute; inset: 4px; border: 1.5px solid rgba(122, 102, 70, .35); border-radius: 8px; pointer-events: none; }
.card.mini { border-radius: 9px; }
.card.mini .k { display: none; }
.card.mini .nm { font-size: .68rem; padding: 4px 3px 6px; }
.card.pick { cursor: pointer; transition: transform .15s ease; }
.card.pick:active { transform: scale(.97); }
.card.sel { outline: 4px solid var(--maj-yellow); outline-offset: 2px; transform: translateY(-4px); }
.card.off { filter: grayscale(.8) brightness(.75); }

/* taccuino */
.notes { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .86rem; }
.notes th { font: 800 .62rem/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--maj-yellow); text-align: left; padding: 14px 6px 6px; }
.notes td { padding: 0; border-bottom: 1px solid var(--line); height: 40px; }
.notes td.nm { padding: 0 6px; font-weight: 700; display: flex; align-items: center; gap: 8px; height: 40px; }
.notes td.nm svg { width: 26px; height: 26px; flex: none; }
.notes .mk { width: 40px; text-align: center; }
.notes .mk button { width: 34px; height: 32px; border-radius: 8px; border: 0; background: var(--night-2); color: var(--text); font-weight: 900; cursor: pointer; }
.notes .mk button.x { background: #3a2026; color: #ff8d88; }
.notes .mk button.o { background: #173a2c; color: #7ff0b4; }
.notes .mk button.q { background: #3a3418; color: #ffd56b; }
.notes tr.known td.nm { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255, 141, 136, .7); text-decoration-thickness: 2px; }
.notes tr.env td.nm { color: #ffd56b; }

/* gettone del giocatore */
.av { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--night-2); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; font-size: .85rem; }
.chip svg { width: 26px; height: 26px; }

/* telefono: niente zoom del browser, niente selezioni accidentali, campi a 16px (iOS non ingrandisce) */
html.phone { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overscroll-behavior: none; }
html.phone body { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
html.phone input, html.phone textarea, html.phone select { font-size: 16px; -webkit-user-select: text; user-select: text; }
html.phone .board-pan { touch-action: pan-x pan-y; }
