
/* Atlante da consultazione: carta fredda, inchiostro blu notte, blu atlante e giallo mappa dal logo. Titoli in Archivo largo come le scritte delle carte; poche cornici, gerarchia data da filetti e spazio. Ogni gruppo FCI ha il suo colore. */
:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --sunk: #e8ecf2;
  --ink: #13213a;
  --muted: #576379;
  --line: #d8dee7;
  --accent: #0f4fb0;
  --accent-ink: #ffffff;
  --accent-soft: #e3ebf8;
  --map: #f5c14b;
  --map-soft: #fdf1d3;
  --logo-dog: #0f4fb0;
  --logo-atlas: #13213a;
  --board: #13213a;
  --board-ink: #f3f5f8;
  --board-muted: #9fb0c8;
  --gold: #f5c14b;
  --good: #1d7a4a;
  --good-soft: #def2e6;
  --bad: #b3372a;
  --bad-soft: #f8e2de;
  --g-bg-l: 92%;
  --g-ink-l: 30%;
  --g-solid-l: 42%;
  --shadow: 0 1px 0 rgb(19 33 58 / 0.04);
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Archivo", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1424; --surface: #111d31; --sunk: #182740; --ink: #e6edf7; --muted: #9ba9be; --line: #22324c;
    --accent: #8ab0ff; --accent-ink: #0b1424; --accent-soft: #1a2c4d; --map: #f5c14b; --map-soft: #3a2f12; --logo-dog: #ffffff; --logo-atlas: #f5c14b;
    --board: #182740; --board-ink: #e6edf7; --board-muted: #8fa0ba; --gold: #f5c14b;
    --good: #5fcf8f; --good-soft: #12301f; --bad: #f2826d; --bad-soft: #3a1c18;
    --g-bg-l: 20%; --g-ink-l: 78%; --g-solid-l: 62%;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1424; --surface: #111d31; --sunk: #182740; --ink: #e6edf7; --muted: #9ba9be; --line: #22324c;
  --accent: #8ab0ff; --accent-ink: #0b1424; --accent-soft: #1a2c4d; --map: #f5c14b; --map-soft: #3a2f12; --logo-dog: #ffffff; --logo-atlas: #f5c14b;
  --board: #182740; --board-ink: #e6edf7; --board-muted: #8fa0ba; --gold: #f5c14b;
  --good: #5fcf8f; --good-soft: #12301f; --bad: #f2826d; --bad-soft: #3a1c18;
  --g-bg-l: 20%; --g-ink-l: 78%; --g-solid-l: 62%;
  --shadow: none; color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.45;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 18px 36px;
}
button { font-family: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 580px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.view { display: flex; flex-direction: column; gap: 14px; }

/* testata */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; }

.brand { text-decoration: none; color: var(--ink); }
.logo-name { font-family: var(--display); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.02em; line-height: 1; color: var(--logo-dog); }
.logo-name span { color: var(--logo-atlas); }
.brand .mark { width: 46px; height: auto; flex: none; }
.foot-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--muted); font-size: 0.85rem; }
.foot-brand .mark { width: 34px; height: auto; }
.foot-brand .logo-name { font-size: 1.15rem; }
.tabs { display: flex; gap: 4px; background: var(--surface); border-radius: 999px; padding: 4px; box-shadow: var(--shadow); }
.tab { border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 0.9rem; padding: 8px 14px; border-radius: 999px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.tab svg { width: 17px; height: 17px; }
.top .tabs { margin-left: auto; }
.langsel { position: relative; }
.lang { display: flex; align-items: center; gap: 5px; font: inherit; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.04em; color: var(--muted); background: transparent; border: 1.5px solid var(--line); border-radius: 999px; padding: 5px 8px 5px 9px; line-height: 1; cursor: pointer; }
.lang svg { width: 15px; height: 15px; }
.lang .caret { width: 12px; height: 12px; }
.lang:hover, .lang[aria-expanded="true"] { color: var(--ink); border-color: var(--ink); }
.langmenu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 5px; min-width: 140px; box-shadow: 0 8px 24px rgb(19 33 58 / 0.14); display: flex; flex-direction: column; }
.langmenu[hidden] { display: none; }
.langmenu a { padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.langmenu a:hover, .langmenu a:focus-visible { background: var(--sunk); }
.langmenu a[aria-current="true"] { color: var(--accent); }
.langmenu a[aria-current="true"]::after { content: " ✓"; }
.tab[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.pcredit { position: absolute; left: 10px; bottom: 10px; z-index: 2; background: rgb(0 0 0 / 0.55); color: #fff; font: 600 0.66rem var(--body); padding: 3px 8px; border-radius: 999px; max-width: calc(100% - 80px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* segnalazioni e info */
.report { font-size: 0.8rem; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; align-self: flex-start; }
.report:hover { color: var(--accent); }
.verdict .report { margin-top: 6px; }
.verdict .vlink { margin-top: 6px; font-weight: 700; font-size: 0.9rem; color: inherit; text-decoration: underline; text-underline-offset: 2px; align-self: flex-start; }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.plist { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; }
.plist li { line-height: 1.5; }
.foot-links a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.info { max-width: 680px; gap: 22px; }
.info p { margin: 0; color: var(--muted); max-width: 64ch; }
.mailbox { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; }
.mailaddr { font-weight: 700; user-select: all; }
.mailbox .btn { text-decoration: none; }
/* home */
.wrap.wide { max-width: 1040px; }
.home { gap: 30px; padding-top: 6px; }
.hero { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.1fr 1fr; } }
.hero-txt { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.eyebrow { font: 700 0.74rem var(--body); text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); }
.hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 7vw, 3.2rem); line-height: 1.02; letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
.lead { font-size: 1.08rem; color: var(--muted); margin: 0; max-width: 46ch; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.btn.big { padding: 14px 20px; font-size: 1rem; border-radius: 14px; text-decoration: none; display: inline-flex; align-items: center; }
.mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 100%; }
.tile { --h: 210; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; background: hsl(var(--h) 45% var(--g-bg-l)); position: relative; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile:nth-child(2) { border-radius: 16px 16px 60px 16px; }
.tile:nth-child(4) { border-radius: 60px 16px 16px 16px; }
.tile span { position: absolute; left: 6px; bottom: 6px; z-index: 1; font: 700 0.66rem var(--body); background: rgb(0 0 0 / 0.55); color: #fff; padding: 2px 7px; border-radius: 999px; max-width: calc(100% - 12px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.facts li { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.facts b { font: 800 1.9rem var(--display); line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.facts span { font-size: 0.8rem; color: var(--muted); line-height: 1.3; }
.block { display: flex; flex-direction: column; gap: 12px; }
.block h2 { font-family: var(--display); font-weight: 700; font-size: 1.4rem; margin: 0; letter-spacing: -0.01em; }
.block .sub { margin: 0; color: var(--muted); max-width: 62ch; }
.ways { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .ways { grid-template-columns: repeat(3, 1fr); } }
.way { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); border: 1.5px solid transparent; }
.way:hover { border-color: var(--accent); }
.way svg { width: 26px; height: 26px; color: var(--accent); }
.way b { font-size: 1.02rem; }
.way span { font-size: 0.88rem; color: var(--muted); }
.glist { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 560px) { .glist { grid-template-columns: 1fr 1fr; } }
.gitem { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 12px; border: 0; cursor: pointer; text-align: left; color: var(--ink); font: inherit; }
.gitem:hover { outline: 1.5px solid var(--accent); }
.gitem .grp-num { width: 38px; height: 38px; font-size: 1.05rem; border-radius: 11px; }
.gitem b { font-size: 0.92rem; display: block; line-height: 1.25; }
.gitem small { font-size: 0.76rem; color: var(--muted); }
.how ol { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; max-width: 64ch; }
.how li { color: var(--muted); }
.how li b { color: var(--ink); }

.levels { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .levels { grid-template-columns: repeat(3, 1fr); } }
.lvcard { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); border: 1.5px solid transparent; }
.lvcard:hover { border-color: var(--accent); }
.lvcard b { font-size: 1.02rem; display: flex; align-items: baseline; gap: 8px; }
.lvcard b small { font-size: 0.78rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.lvcard > span:last-child { font-size: 0.88rem; color: var(--muted); }
.mini-meter { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.mini-meter i { width: 10px; border-radius: 3px; background: var(--sunk); }
.mini-meter i:nth-child(1) { height: 8px; } .mini-meter i:nth-child(2) { height: 14px; } .mini-meter i:nth-child(3) { height: 20px; }
.mini-meter i.on { background: var(--accent); }

/* barra impostazioni */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.tool { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 8px 12px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.tool-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.level { flex: 1 1 100%; padding: 4px; gap: 4px; display: grid; grid-template-columns: repeat(3, 1fr); }
@media (min-width: 620px) { .level { flex: 1.4 1 340px; } }
.lvbtn { border: 0; background: transparent; color: var(--muted); border-radius: 11px; padding: 8px 6px; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; min-width: 0; }
.lvbtn:hover { background: var(--sunk); }
.lvbtn .mini-meter { height: 18px; gap: 2px; flex: none; }
.lvbtn .mini-meter i { width: 6px; }
.lvbtn .mini-meter i:nth-child(1) { height: 7px; } .lvbtn .mini-meter i:nth-child(2) { height: 12px; } .lvbtn .mini-meter i:nth-child(3) { height: 17px; }
.lvbtn .mini-meter i.on { background: color-mix(in srgb, var(--muted) 55%, transparent); }
.lvt { display: flex; flex-direction: column; line-height: 1.15; text-align: left; min-width: 0; }
.lvt b { font-size: 0.9rem; }
.lvt small { font-size: 0.7rem; font-variant-numeric: tabular-nums; }
.lvbtn[aria-pressed="true"] { background: var(--accent-soft); color: var(--ink); }
.lvbtn[aria-pressed="true"] .mini-meter i.on { background: var(--accent); }
.lvbtn[aria-pressed="true"] small { color: var(--muted); }
.gsel { flex: 1 1 220px; min-width: 0; position: relative; padding: 0; }
.gbtn { width: 100%; border: 0; background: transparent; color: var(--ink); display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; text-align: left; border-radius: 14px; min-height: 44px; }
.gbtn .gtext { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; flex: 1; }
.gbtn .gtext b { font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gbtn .gtext small { font-size: 0.72rem; color: var(--muted); }
.caret { width: 16px; height: 16px; color: var(--muted); flex: none; transition: transform 0.15s; }
.gbtn[aria-expanded="true"] .caret { transform: rotate(180deg); }
.gbadge { --h: 210; width: 28px; height: 28px; border-radius: 9px; flex: none; display: grid; place-items: center; font: 800 0.85rem var(--display); background: hsl(var(--h) 55% var(--g-bg-l)); color: hsl(var(--h) 60% var(--g-ink-l)); font-variant-numeric: tabular-nums; }
.gbadge.all { background: var(--sunk); color: var(--muted); }
.gpanel { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgb(0 0 0 / 0.18); padding: 6px; max-height: min(60vh, 460px); overflow-y: auto; }
.gopt { width: 100%; border: 0; background: transparent; color: var(--ink); display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; text-align: left; font-size: 0.9rem; }
.gopt:hover:not(:disabled), .gopt[aria-selected="true"] { background: var(--sunk); }
.gopt:disabled { opacity: 0.4; cursor: default; }
.gopt span.n { margin-left: auto; font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.gopt .gname { min-width: 0; }

/* tabellone */
.board { background: var(--board); color: var(--board-ink); border-radius: 16px; padding: 12px 16px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; align-items: center; gap: 10px; }
.cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cell small { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--board-muted); }
.cell b { font: 800 1.45rem var(--display); line-height: 1; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 5px; }
.cell b em { font-style: normal; font-size: 0.85rem; font-weight: 600; color: var(--board-muted); }
.cell svg { width: 18px; height: 18px; }
.cell.streak b { color: var(--gold); }
.bar { height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--board-ink) 18%, transparent); overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; width: 0; background: var(--good); transition: width 0.3s; }

/* carta del cane */
.card { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.mode { border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 0.86rem; padding: 12px 6px 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.mode svg { width: 17px; height: 17px; flex: none; }
.mode[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.photo { position: relative; width: 100%; aspect-ratio: 4 / 3; max-width: 100%; max-height: 44vh; max-height: 44svh; overflow: hidden; background: var(--sunk); display: grid; place-items: center; flex: none; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.photo .loading { color: var(--muted); font-size: 0.9rem; }
.photo.tap { cursor: pointer; }
.tag { position: absolute; left: 10px; top: 10px; z-index: 1; background: var(--surface); color: var(--bad); font: 700 0.7rem var(--body); letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; }
.body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.options { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 460px) { .options { grid-template-columns: 1fr 1fr; } }
.opt { text-align: left; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 0.97rem; padding: 12px; border-radius: 12px; cursor: pointer; display: flex; gap: 10px; align-items: center; min-height: 52px; }
.opt kbd { font: 700 0.72rem var(--body); color: var(--muted); background: var(--sunk); border-radius: 6px; padding: 2px 7px; flex: none; }
.opt:hover:not(:disabled) { border-color: var(--accent); }
.opt:disabled { cursor: default; }
.opt.right { border-color: var(--good); background: var(--good-soft); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt.dim { opacity: 0.45; }
.typebox { display: flex; gap: 8px; }
.typebox input { flex: 1; min-width: 0; font: 500 1rem var(--body); padding: 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); }
.typebox input:focus { outline: none; border-color: var(--accent); }
.btn { border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 0.95rem; padding: 12px 16px; border-radius: 12px; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--muted); border: 1.5px solid var(--line); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.small { padding: 7px 12px; font-size: 0.84rem; flex: none; }
.btn.marked { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row .btn { flex: 1; }
.verdict { border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.verdict.ok { background: var(--good-soft); }
.verdict.ko { background: var(--bad-soft); }
.verdict.info { background: var(--sunk); }
.verdict .head { font: 700 0.74rem var(--body); text-transform: uppercase; letter-spacing: 0.08em; display: flex; align-items: center; gap: 8px; }
.verdict.ok .head { color: var(--good); }
.verdict.ko .head { color: var(--bad); }
.verdict.info .head { color: var(--muted); }
.verdict .name { font-family: var(--display); font-weight: 700; font-size: 1.4rem; line-height: 1.15; text-wrap: balance; }
.verdict .meta { font-size: 0.84rem; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.verdict .desc { font-size: 0.92rem; line-height: 1.5; margin-top: 4px; }
.gpill { --h: 210; font: 700 0.72rem var(--body); padding: 2px 8px; border-radius: 999px; background: hsl(var(--h) 55% var(--g-bg-l)); color: hsl(var(--h) 60% var(--g-ink-l)); white-space: nowrap; }
.hint { font-size: 0.88rem; color: var(--muted); background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; }
.hint b { color: var(--ink); }

/* ripasso */
.review { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.review-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.review h2 { font-family: var(--display); font-size: 1.05rem; margin: 0; display: flex; align-items: center; gap: 8px; }
.review h2 .cnt { font: 700 0.75rem var(--body); background: var(--bad-soft); color: var(--bad); border-radius: 999px; padding: 1px 8px; }
.misslist { display: flex; flex-wrap: wrap; gap: 6px; }
.miss { font-size: 0.82rem; background: var(--sunk); border-radius: 999px; padding: 4px 10px; }
.miss b { color: var(--bad); font-variant-numeric: tabular-nums; }
.empty { font-size: 0.88rem; color: var(--muted); margin: 0; }
.btn.small.on { background: var(--bad); color: var(--surface); }

/* studio */
.study-list { display: flex; flex-direction: column; gap: 26px; }
.grp { --h: 210; display: flex; flex-direction: column; gap: 12px; }
.grp-head { display: flex; gap: 12px; align-items: flex-start; }
.grp-num { width: 44px; height: 44px; border-radius: 13px; flex: none; display: grid; place-items: center; font: 800 1.25rem var(--display); background: hsl(var(--h) 52% var(--g-solid-l)); color: #fff; font-variant-numeric: tabular-nums; }
.grp-txt { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.grp-txt h2 { font-family: var(--display); font-weight: 700; font-size: 1.2rem; line-height: 1.2; margin: 0; text-wrap: balance; }
.grp-count { font-size: 0.78rem; color: var(--muted); }
.grp-desc { font-size: 0.88rem; color: var(--muted); margin: 2px 0 0; max-width: 62ch; }
.grp-actions { display: flex; }
.bgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 520px) { .bgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bcard { background: var(--surface); border: 0; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.bcard:hover .bimg img { transform: scale(1.03); }
a.bcard, a.gcard, a.gpill { text-decoration: none; }
.bimg { position: relative; aspect-ratio: 1 / 1; max-width: 100%; background: var(--sunk); overflow: hidden; display: grid; place-items: center; color: var(--muted); font-size: 0.8rem; border-bottom: 3px solid hsl(var(--h) 52% var(--g-solid-l)); }
.bimg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s; }
.btxt { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bname { font-weight: 700; font-size: 0.92rem; line-height: 1.25; }
.bdesc { font-size: 0.74rem; color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bflags { display: flex; gap: 6px; flex-wrap: wrap; }
.bflag { font-size: 0.68rem; font-weight: 700; }
.bflag.nofci { color: var(--muted); }
.bflag.miss { color: var(--bad); }

/* scheda razza */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgb(8 12 10 / 0.55); display: flex; align-items: flex-end; justify-content: center; padding-top: env(safe-area-inset-top, 0px); }
@media (min-width: 640px) { .sheet { align-items: center; padding: 24px; } }
.sheet-card { --h: 210; background: var(--surface); color: var(--ink); width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom, 0px); }
@media (min-width: 640px) { .sheet-card { border-radius: 20px; } }
.sheet .photo { max-height: 46vh; max-height: 46svh; }
.pnav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; border-radius: 999px; border: 0; background: rgb(0 0 0 / 0.5); color: #fff; font: 700 1.2rem var(--body); cursor: pointer; display: grid; place-items: center; }
.pnav.prev { left: 10px; } .pnav.next { right: 10px; }
.pcount { position: absolute; right: 10px; bottom: 10px; z-index: 2; background: rgb(0 0 0 / 0.55); color: #fff; font: 700 0.72rem var(--body); padding: 3px 9px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.sclose { position: absolute; right: 10px; top: 10px; z-index: 3; width: 36px; height: 36px; border-radius: 999px; border: 0; background: var(--surface); color: var(--ink); font: 700 1.05rem var(--body); cursor: pointer; }
.sbody { padding-block: 16px 18px; padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 10px; border-top: 4px solid hsl(var(--h) 52% var(--g-solid-l)); }
.sname { font-family: var(--display); font-weight: 700; font-size: 1.6rem; line-height: 1.1; margin: 0; text-wrap: balance; }
.salias { font-size: 0.85rem; color: var(--muted); margin: 0; }
.sdesc { font-size: 1rem; line-height: 1.55; margin: 0; }
/* pagina della razza */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 0.82rem; color: var(--muted); }
.crumbs a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.crumbs a:hover { color: var(--accent); }
.crumbs #cName { color: var(--ink); font-weight: 600; }
.breed { display: flex; flex-direction: column; gap: 22px; }
.blay { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "pho" "head" "card" "main"; }
.bpho { grid-area: pho; min-width: 0; }
.bhead { grid-area: head; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.bid { grid-area: card; min-width: 0; }
.bid:empty { display: none; }
.bmain { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.breed .photo { border-radius: 18px; max-height: 62vh; max-height: 62svh; }
.breed .photo:has(#sImg[hidden])::after { content: "Foto in arrivo"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-weight: 600; }
.breed .sname { font-size: clamp(1.9rem, 4.5vw, 2.7rem); line-height: 1.05; }
.breed .sdesc { font-size: 1.08rem; line-height: 1.55; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 4px; scroll-snap-type: x mandatory; }
.thumbs button { flex: none; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; padding: 0; border: 2.5px solid transparent; background: var(--sunk); cursor: pointer; scroll-snap-align: start; }
.thumbs button[aria-current="true"] { border-color: hsl(var(--h) 52% var(--g-solid-l)); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bcta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; }
.bcta .report { align-self: center; }
.bsim h2 { font: 700 1.3rem/1.2 var(--display); margin: 0 0 12px; }
@media (min-width: 760px) { .bsim .bgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.snav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.snl { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; min-height: 44px; }
.snl:hover { border-color: hsl(var(--h) 52% var(--g-solid-l)); }
.snl small { font-size: 0.75rem; color: var(--muted); }
.snl b { font: 700 0.98rem var(--display); }
.snl.next { text-align: right; grid-column: 2; }
.snl[hidden] { display: flex; visibility: hidden; }
@media (min-width: 900px) {
  .blay { grid-template-columns: 420px minmax(0, 1fr); column-gap: 40px; row-gap: 20px; grid-template-rows: auto auto 1fr; align-items: start;
    grid-template-areas: "pho head" "pho main" "card main"; }
  .bid { position: sticky; top: 16px; }
}

/* scheda non ancora scritta */
.bwip { border: 2px dashed hsl(var(--h) 45% 50% / 0.45); background: hsl(var(--h) 55% var(--g-bg-l) / 0.5); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.bwip h2 { font: 700 1.15rem/1.2 var(--display); margin: 0; display: flex; align-items: center; gap: 8px; }
.bwip h2 svg { width: 22px; height: 22px; color: hsl(var(--h) 52% var(--g-solid-l)); flex: none; }
.bwip p { margin: 0; font-size: 0.95rem; line-height: 1.55; }
.bwip ul { margin: 0; padding-left: 1.2em; font-size: 0.95rem; line-height: 1.7; }
.bwip a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.bwip .small { font-size: 0.84rem; color: var(--muted); }
.bwip.short { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 12px 16px; }
.bwip.short p { font-size: 0.9rem; }

/* scheda completa: carta d'identità, sezioni, fonti */
.sfull { display: flex; flex-direction: column; gap: 16px; margin-top: 4px; }
.sfull .ico, .bid .ico { width: 1.15em; height: 1.15em; flex: none; }
.sfull a, .bid a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.idcard { border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1.5px hsl(var(--h) 45% 50% / 0.28); }
.idhead { display: flex; align-items: center; gap: 8px; padding: 10px 14px; color: #fff; font: 700 0.95rem var(--display);
  background-color: hsl(var(--h) 48% 34%); background-image: radial-gradient(rgb(255 255 255 / 0.13) 1.2px, transparent 1.4px); background-size: 11px 11px; }
.idhead .ico { width: 1.3em; height: 1.3em; }
.idcard .idstd { margin-left: auto; font: 600 0.72rem var(--body); color: #fff; background: rgb(255 255 255 / 0.18); padding: 4px 10px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.idcard a.idstd:hover { background: rgb(255 255 255 / 0.3); }
.idsize { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: hsl(var(--h) 45% 50% / 0.2); }
.idm { background: hsl(var(--h) 55% var(--g-bg-l)); padding: 11px 14px; display: flex; flex-direction: column; gap: 6px; }
.idml { display: flex; align-items: center; gap: 6px; font: 700 0.76rem var(--body); color: hsl(var(--h) 60% var(--g-ink-l)); }
.idsx { display: flex; align-items: center; gap: 9px; }
.idsy { width: 28px; text-align: center; font: 700 1.15rem var(--body); color: hsl(var(--h) 52% var(--g-solid-l)); letter-spacing: -0.15em; }
.idsv { display: flex; flex-direction: column; line-height: 1.2; }
.idsv b { font: 700 1.12rem var(--display); font-variant-numeric: tabular-nums; }
.idsv b.lungo { font-size: 0.92rem; line-height: 1.3; }
.idsv small { font-size: 0.72rem; color: var(--muted); }
.idtab { width: 100%; border-collapse: collapse; font-size: 0.88rem; line-height: 1.45; }
.idtab tr + tr { border-top: 1px dashed var(--line); }
.idtab tr:nth-child(even) { background: color-mix(in srgb, var(--sunk) 55%, transparent); }
.idtab th { text-align: left; vertical-align: top; width: 38%; padding: 9px 10px 9px 14px; font: 700 0.8rem var(--body); color: var(--muted); }
.idtab th .ico, .idml .ico { color: hsl(var(--h) 52% var(--g-solid-l)); margin-right: 6px; vertical-align: -0.22em; }
.idml .ico { margin-right: 0; }
.idtab td { padding: 9px 14px 9px 0; }
.idtab td::first-letter { text-transform: uppercase; }
.idsim { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 11px 14px 13px; border-top: 1px dashed var(--line); }
.idsiml { width: 100%; display: flex; align-items: center; gap: 6px; font: 700 0.8rem var(--body); color: var(--muted); margin-bottom: 2px; }
.idsiml .ico { color: hsl(var(--h) 52% var(--g-solid-l)); }
.idsim .chip { font: 600 0.82rem var(--body); padding: 7px 12px; border-radius: 999px; text-decoration: none; background: hsl(var(--h) 55% var(--g-bg-l)); color: hsl(var(--h) 60% var(--g-ink-l)); }
.idsim a.chip:hover { box-shadow: inset 0 0 0 1.5px currentColor; }
.ssec h2 { display: flex; align-items: center; gap: 10px; font: 700 1.22rem/1.2 var(--display); margin: 0 0 10px; }
.sico { width: 36px; height: 36px; border-radius: 12px; flex: none; display: grid; place-items: center; background: hsl(var(--h) 55% var(--g-bg-l)); color: hsl(var(--h) 52% var(--g-solid-l)); transform: rotate(-4deg); }
.sico .ico { width: 20px; height: 20px; transform: rotate(4deg); }
.ssec p { font-size: 0.98rem; line-height: 1.62; margin: 0 0 10px; }
.ssec strong { font-weight: 700; }
.sdiv { display: flex; justify-content: center; gap: 12px; color: hsl(var(--h) 52% var(--g-solid-l)); opacity: 0.5; }
.sdiv .ico { width: 15px; height: 15px; }
.sdiv .ico:nth-child(1) { transform: rotate(-12deg); } .sdiv .ico:nth-child(2) { transform: translateY(-5px); } .sdiv .ico:nth-child(3) { transform: rotate(12deg); }
.cmp { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.cmp li { padding: 10px 13px; border-radius: 12px; background: var(--sunk); border-left: 4px solid hsl(var(--h) 52% var(--g-solid-l)); font-size: 0.93rem; line-height: 1.5; }
.cmp li > strong:first-child { display: block; font: 700 1rem var(--display); margin-bottom: 2px; }
.ssum { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: hsl(var(--h) 55% var(--g-bg-l)); }
.ssum .ico { width: 22px; height: 22px; color: hsl(var(--h) 52% var(--g-solid-l)); margin-top: 1px; }
.ssum p { margin: 0; font-size: 0.95rem; line-height: 1.55; }
.sfonti { display: flex; gap: 8px; align-items: flex-start; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); }
.sfonti p { margin: 0; font-size: 0.76rem; line-height: 1.5; }
.sfonti .ico { width: 16px; height: 16px; margin-top: 1px; }
.stags { display: flex; gap: 6px; flex-wrap: wrap; }
.stag { font: 600 0.75rem var(--body); padding: 3px 9px; border-radius: 999px; background: var(--sunk); color: var(--muted); }
.stag.miss { background: var(--bad-soft); color: var(--bad); }

footer { font-size: 0.75rem; color: var(--muted); line-height: 1.5; }
@media (prefers-reduced-motion: no-preference) {
  .verdict { animation: pop 0.18s ease-out; }
  @keyframes pop { from { transform: translateY(4px); opacity: 0.4; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) { .bimg img, .caret, .bar i { transition: none; } }
/* ricerca */
.search { position: relative; }
.search-box { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 0 12px; border: 1.5px solid transparent; }
.search-box:focus-within { border-color: var(--accent); }
.search-box svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search-box input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 500 1rem var(--body); padding: 13px 0; outline: none; }
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; }
.qclear { border: 0; background: var(--sunk); color: var(--muted); width: 26px; height: 26px; border-radius: 999px; cursor: pointer; font-size: 0.8rem; flex: none; }
.qlist { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgb(0 0 0 / 0.18); max-height: min(62vh, 480px); overflow-y: auto; }
.qitem { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; cursor: pointer; }
.qitem[aria-selected="true"], .qitem:hover { background: var(--sunk); }
.qthumb { --h: 210; width: 44px; height: 44px; border-radius: 10px; background: var(--sunk); flex: none; overflow: hidden; border-bottom: 3px solid hsl(var(--h) 52% var(--g-solid-l)); }
.qthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qtxt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.qtxt b { font-size: 0.95rem; font-weight: 700; }
.qtxt b mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 1px; }
.qtxt small { font-size: 0.75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qempty { padding: 10px; font-size: 0.88rem; color: var(--muted); }

/* ===== restyling: atlante ===== */
body { font-family: var(--body); font-stretch: 100%; -webkit-font-smoothing: antialiased; }
h1, .block h2, .grp-txt h2, .sname, .verdict .name, .logo-name, .review h2, .facts b {
  font-family: var(--display); font-stretch: 118%; font-weight: 800; letter-spacing: -0.015em;
}
.tool-label, .cell small, .verdict .head, .eyebrow, .tag, .lvt small, .gbtn .gtext small {
  text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 0.78rem;
}
.tool-label { color: var(--muted); }
/* meno cornici, niente ombre "da kit" */
.tabs, .tool, .card, .review, .way, .lvcard, .gitem, .bcard, .mailbox, .search-box, .gpanel, .qlist { box-shadow: none; }
.tool, .card, .review, .bcard, .mailbox, .search-box { border: 1px solid var(--line); }
.card { border-radius: 16px; }
.tool { border-radius: 12px; }
.btn { border-radius: 10px; }
.btn.ghost { border-width: 1px; color: var(--ink); }
.opt { border-radius: 10px; border-width: 1px; }
.opt kbd { background: transparent; border: 1px solid var(--line); }
/* schede in alto: testo con sottolineatura gialla "da mappa" */
.tabs { background: transparent; padding: 0; gap: 20px; border-radius: 0; }
.tab { padding: 8px 0; border-radius: 0; border-bottom: 3px solid transparent; color: var(--muted); }
.tab[aria-pressed="true"] { background: transparent; color: var(--ink); border-bottom-color: var(--map); }
.tab:hover { color: var(--ink); }
.brand .mark { width: 50px; }
/* tabellone */
.board { border-radius: 14px; padding: 12px 18px; }
.cell b { font-family: var(--display); font-stretch: 112%; }
.bar i { background: var(--map); }
/* scelta livello e gruppo */
.lvbtn[aria-pressed="true"] { background: var(--accent-soft); }
.gbadge.all { background: transparent; border: 1px dashed var(--line); }
/* home */
.home { gap: 40px; }
.hero { gap: 28px; align-items: end; }
.hero h1 { font-size: clamp(2.5rem, 8.5vw, 4.6rem); font-stretch: 125%; line-height: 0.94; letter-spacing: -0.03em; max-width: 12ch; }
.lead { font-size: 1.1rem; line-height: 1.55; max-width: 44ch; }
.cta { gap: 14px; align-items: center; margin-top: 6px; }
.cta .btn.ghost { border: 0; background: transparent; padding-inline: 4px; text-decoration: underline; text-decoration-color: var(--map); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.mosaic { gap: 10px; }
.tile, .tile:nth-child(2), .tile:nth-child(4) { border-radius: 8px; border: 1px solid var(--line); }
.tile span { left: 0; bottom: 0; border-radius: 0 8px 0 0; background: var(--surface); color: var(--ink); font-weight: 600; padding: 4px 8px; max-width: calc(100% - 8px); }
.block { gap: 14px; }
.block h2 { font-size: clamp(1.35rem, 3.6vw, 1.75rem); }
.ways, .levels { gap: 28px; }
.way, .lvcard { background: transparent; border: 0; border-top: 2px solid var(--ink); border-radius: 0; padding: 14px 0 0; }
.way:hover, .lvcard:hover { border-color: var(--accent); }
.way:hover b, .lvcard:hover b { color: var(--accent); }
.way svg { color: var(--ink); }
.glist { gap: 0 32px; }
.gitem { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 0; }
.gitem:hover { outline: 0; }
.gitem:hover b { color: var(--accent); }
.how ol { padding-left: 1.2em; }
/* studio */
.study-list { gap: 34px; }
.grp-head { padding-bottom: 4px; }
.bcard { border-radius: 12px; }
.bcard:hover { border-color: var(--accent); }
.bcard:hover .bimg img { transform: none; }
.bimg { border-bottom-width: 4px; }
.search-box { border-radius: 12px; }
/* scheda razza */
.sheet-card { border-radius: 18px 18px 0 0; }
@media (min-width: 640px) { .sheet-card { border-radius: 18px; } }
.sname { font-size: 1.8rem; }
.gpill { border-radius: 6px; }
/* risposte */
.verdict { border-radius: 12px; }
.verdict .head { font-size: 0.85rem; }
.hint { border-radius: 10px; }
/* ripasso e piè di pagina */
.review { border-radius: 14px; }
.miss { background: transparent; border: 1px solid var(--line); }
footer { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 10px; }
.foot-links a { text-decoration-color: var(--map); text-decoration-thickness: 2px; }

/* ===== home v2: fasce alternate, foto protagoniste ===== */
:root { --tint: #e6edf8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tint: #0f1c33; } }
:root[data-theme="dark"] { --tint: #0f1c33; }
.home { gap: 0; padding-top: 0; }
.band { position: relative; box-shadow: 0 0 0 100vmax var(--band-bg); clip-path: inset(0 -100vmax); background: var(--band-bg); }
.band-tint { --band-bg: var(--tint); }
.band-white { --band-bg: var(--surface); }
.band-ink { --band-bg: var(--board); color: var(--board-ink); }
.home > section { padding-block: 56px; }
.home h2 { font-family: var(--display); font-stretch: 118%; font-weight: 800; letter-spacing: -0.015em; font-size: clamp(1.5rem, 3.6vw, 2.05rem); line-height: 1.1; margin: 0; text-wrap: balance; }
.lv-head { display: grid; gap: 8px; max-width: 640px; margin-bottom: 28px; }
.lv-head .sub { margin: 0; color: var(--muted); }

/* hero */
.h-hero { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; margin-top: 8px; }
@media (min-width: 860px) { .h-hero { grid-template-columns: 1.05fr 0.95fr; gap: 56px; padding-block: 72px !important; } }
.h-hero h1 { font-size: clamp(2.4rem, 6.6vw, 4.3rem); font-stretch: 122%; line-height: 0.96; letter-spacing: -0.03em; max-width: 11ch; margin: 0; }
.h-hero .lead { margin: 18px 0 0; }
.h-hero .cta { margin-top: 26px; }
.hero-art { position: relative; justify-self: center; width: min(100%, 420px); cursor: pointer; }
.feature { margin: 0; border-radius: 20px; overflow: hidden; background: var(--surface); box-shadow: 0 30px 60px -24px rgb(19 33 58 / 0.45), 0 0 0 1px rgb(19 33 58 / 0.06); }
.feature img { display: block; width: 100%; aspect-ratio: 4 / 4.2; object-fit: cover; max-width: 100%; background: var(--sunk); }
.feature figcaption { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; }
.feature figcaption b { font-size: 1.05rem; }
.q-chip { position: absolute; left: -22px; bottom: 78px; width: 200px; display: grid; gap: 6px; padding: 12px; border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 18px 40px -16px rgb(19 33 58 / 0.45), 0 0 0 1px rgb(19 33 58 / 0.06); }
@media (max-width: 520px) { .q-chip { left: 10px; bottom: 70px; width: 180px; } }
.q-title { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.q-opt { font-size: 0.86rem; font-weight: 600; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-opt.ok { border-color: var(--good); background: var(--good-soft); position: relative; padding-right: 26px; }
.q-opt.ok::after { content: ""; position: absolute; right: 10px; top: 50%; width: 6px; height: 11px; border: solid var(--good); border-width: 0 2.5px 2.5px 0; transform: translateY(-65%) rotate(45deg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .feature, :root:not([data-theme="light"]) .q-chip { box-shadow: 0 0 0 1px var(--line); } }
:root[data-theme="dark"] .feature, :root[data-theme="dark"] .q-chip { box-shadow: 0 0 0 1px var(--line); }

/* modi */
.h-modes .ways { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 28px; }
@media (min-width: 700px) { .h-modes .ways { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.h-modes .way { display: grid; gap: 8px; background: none; border: 0; padding: 0; border-radius: 0; color: var(--ink); text-decoration: none; }
.way-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.way-ic svg { width: 22px; height: 22px; }
.h-modes .way b { font-size: 1.08rem; }
.h-modes .way > span:last-child { color: var(--muted); font-size: 0.95rem; }
.h-modes .way:hover b { color: var(--accent); }

/* livelli: una scala che sale */
.h-levels .levels { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 0; position: relative; }
.h-levels .levels li { position: relative; }
.h-levels .lvcard { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 6px; align-items: baseline; padding: 0 0 28px 38px; background: none; border: 0; border-radius: 0; color: var(--ink); text-decoration: none; }
.h-levels .lvcard b { font-size: 1.25rem; font-family: var(--display); font-stretch: 112%; }
.h-levels .lvcard small { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.h-levels .lvcard > span:last-child { grid-column: 1 / -1; color: var(--muted); max-width: 34ch; }
.lv-dot { position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--accent); background: var(--surface); z-index: 1; }
.levels li:nth-child(2) .lv-dot { background: color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.levels li:nth-child(3) .lv-dot { background: var(--accent); }
.h-levels .levels li:not(:last-child)::before { content: ""; position: absolute; left: 9px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
@media (min-width: 760px) {
  .h-levels .levels { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .h-levels .lvcard { padding: 38px 0 0; }
  .h-levels .levels li:not(:last-child)::before { left: 22px; right: -10px; top: 13px; bottom: auto; width: auto; height: 2px; }
}
.h-levels .lvcard:hover b { color: var(--accent); }

/* gruppi con foto */
.gcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .gcards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .gcards { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.gcard { --h: 210; display: flex; flex-direction: column; padding: 0; text-align: left; font: inherit; color: var(--ink); cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.gcard:hover { border-color: var(--accent); }
.gc-img { display: block; aspect-ratio: 4 / 3; max-width: 100%; background: hsl(var(--h) 45% var(--g-bg-l)); border-bottom: 4px solid hsl(var(--h) 52% var(--g-solid-l)); overflow: hidden; }
.gc-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gc-txt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px 12px; min-width: 0; }
.gc-num { flex: none; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font: 800 0.8rem var(--display); color: #fff; background: hsl(var(--h) 52% var(--g-solid-l)); font-variant-numeric: tabular-nums; }
.gc-txt b { display: block; font-size: 0.9rem; line-height: 1.25; }
.gc-txt small { color: var(--muted); font-size: 0.78rem; }

/* chiusura */
.h-cta { display: grid; gap: 12px; justify-items: start; }
.h-cta h2 { color: var(--board-ink); font-size: clamp(1.7rem, 4.4vw, 2.6rem); }
.h-cta p { margin: 0; color: var(--board-muted); max-width: 52ch; }
.h-cta .cta { margin-top: 10px; }
.btn.light { background: var(--map); color: #13213a; }
.h-cta .btn.ghost { color: var(--board-ink); text-decoration-color: var(--map); }
.home + footer, #viewHome ~ footer { margin-top: 0; }

/* filtri "cosa studiare": due selettori compatti sulla stessa riga, sotto le schede e sopra il gioco */
.toolbar { display: flex; gap: 8px; flex-wrap: nowrap; align-items: stretch; }
.chip { position: relative; min-width: 0; }
.lvsel { flex: none; }
.gsel { flex: 1 1 auto; min-width: 0; }
.chipbtn { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.chipbtn:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.chipbtn[aria-expanded="true"] { border-color: var(--accent); }
.chipbtn[aria-expanded="true"] .caret { transform: rotate(180deg); }
.chipbtn b { font-size: 0.9rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.chipbtn small { font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chipbtn .caret { margin-left: auto; }
.chipbtn .mini-meter { height: 16px; gap: 2px; flex: none; }
.chipbtn .mini-meter i { width: 5px; }
.chipbtn .mini-meter i:nth-child(1) { height: 6px; } .chipbtn .mini-meter i:nth-child(2) { height: 11px; } .chipbtn .mini-meter i:nth-child(3) { height: 16px; }
.chipbtn .gbadge { width: 24px; height: 24px; border-radius: 7px; font-size: 0.78rem; }
.chip .gpanel { top: calc(100% + 6px); }
.lvpanel { left: 0; right: auto; width: max-content; min-width: 220px; display: grid; gap: 2px; }
.gsel .gpanel { left: auto; right: 0; width: min(380px, calc(100vw - 32px)); }
.lvpanel .lvbtn { justify-content: flex-start; padding: 10px 12px; gap: 12px; width: 100%; }
.lvpanel .lvt { flex-direction: row; align-items: baseline; gap: 10px; flex: 1; justify-content: space-between; }
.lvpanel .lvt b { font-size: 0.95rem; }
.lvpanel .lvt small { font-size: 0.8rem; }
.lvpanel .lvbtn[aria-pressed="true"] { background: var(--accent-soft); }
@media (max-width: 480px) { .chipbtn small { display: none; } }
/* telefono: logo, sezioni e selettore della lingua su una riga */
@media (max-width: 480px) { .top { gap: 8px; flex-wrap: nowrap; } .top .tab svg { display: none; } .top .tabs { gap: 12px; } .brand { gap: 7px; } .brand .mark { width: 38px; } .logo-name { font-size: 1.35rem; } .lang { padding: 4px 6px 4px 7px; } .lang svg:first-child { display: none; } }

/* ===== v3 – nuova grafica (dicembre 2026): blu, giallo e blu scuro; i colori dei gruppi solo nel numero; telefono prima di tutto ===== */
:root { --brand: #0f4fb0; --brand-soft: #dbe6fb; --gc: #0f4fb0; --gt: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --brand: #163e7d; --brand-soft: #c9d8f5; } }
:root[data-theme="dark"] { --brand: #163e7d; --brand-soft: #c9d8f5; }
.wrap, .wrap.wide { max-width: 1200px; }
/* quiz in una colonna centrata; la testata resta larga come nelle altre pagine */
#viewQuiz, .wrap:has(#viewQuiz:not([hidden])) #toolbar { width: 100%; max-width: 760px; margin-inline: auto; }
.band-brand { --band-bg: var(--brand); color: #fff; }
h1, h2 { font-stretch: 122%; }

/* testata bianca a tutta larghezza */
.top { position: relative; margin-top: -18px; padding: 12px 0; background: var(--surface); box-shadow: 0 0 0 100vmax var(--surface), 0 1px 0 100vmax var(--line); clip-path: inset(0 -100vmax -1px); gap: 16px; flex-wrap: nowrap; }
.tabs { gap: 4px; }
.tab { padding: 9px 15px; border: 0; border-radius: 10px; color: var(--ink); font-size: 0.98rem; font-weight: 700; }
.tab svg { display: none; }
.tab:hover { background: var(--sunk); }
.tab[aria-pressed="true"] { background: var(--brand); color: #fff; border: 0; }
.lang { border-radius: 999px; padding: 7px 12px; color: var(--ink); }
@media (max-width: 640px) {
  .top { flex-wrap: wrap; gap: 10px; padding: 10px 0; }
  .brand { order: 1; } .langsel { order: 2; margin-left: auto; }
  .top .tabs { order: 3; width: 100%; margin-left: 0; gap: 4px; }
  .top .tab { flex: 1; justify-content: center; padding: 9px 4px; }
}

/* foto intera nel riquadro 4:3, ai lati la stessa foto sfocata */
.photo { background: var(--board); max-height: min(52vh, 470px); max-height: min(52svh, 470px); }
.photo::before { content: ""; position: absolute; inset: -24px; background: var(--pbg, none) center / cover no-repeat; filter: blur(22px) brightness(0.7); }
.photo img { z-index: 1; }
.photo .loading { position: relative; z-index: 1; color: #c9d3e6; }
.qask { position: absolute; left: 10px; top: 10px; z-index: 2; background: #13213a; color: #fff; font: 800 1rem var(--display); font-stretch: 118%; padding: 6px 12px; border-radius: 10px; }
.photo .tag { z-index: 3; top: 48px; }
.pnav, .pcount, .pcredit { z-index: 2; }

/* pulsanti */
.btn { border-radius: 12px; font-weight: 800; }
.btn.big { border-radius: 14px; font-weight: 800; }
.opt { border: 2px solid var(--line); border-radius: 14px; font-weight: 800; font-size: 1.02rem; line-height: 1.2; min-height: 60px; padding: 12px 14px; }
.opt kbd { border: 0; background: var(--sunk); border-radius: 8px; padding: 4px 8px; }
.opt.right { background: var(--good); border-color: var(--good); color: var(--bg); }
.opt.wrong { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.opt.dim { opacity: 0.5; }
@media (hover: none), (max-width: 640px) { .opt kbd { display: none; } }

/* ---------- home ---------- */
.home > section { padding-block: 56px; }
.home h2 { font-size: clamp(1.6rem, 4vw, 2.6rem); font-stretch: 122%; }
.lv-head { max-width: none; margin-bottom: 24px; }
.lv-head .sub { font-size: 1.05rem; }
.h-hero { margin-top: -14px; }
@media (min-width: 860px) { .h-hero { padding-block: 64px 80px !important; } }
.h-hero h1 { color: #fff; font-size: clamp(2.5rem, 7vw, 4.4rem); max-width: 14ch; margin-top: 18px; }
.h-hero .lead { color: var(--brand-soft); font-size: 1.15rem; max-width: 42ch; }
.hbadge { display: inline-block; align-self: flex-start; background: var(--map); color: #13213a; font-weight: 800; font-size: 0.9rem; padding: 6px 12px; border-radius: 8px; transform: rotate(-2deg); }
.h-hero .cta .btn { text-decoration: none; }
.h-hero .cta .btn:not(.ghost) { background: var(--map); color: #13213a; box-shadow: 0 5px 0 #b98a1f; }
.h-hero .cta .btn.ghost { color: #fff; border: 2px solid #8ab0ff; padding-inline: 20px; }
.hero-art { cursor: auto; width: min(100%, 450px); }
.hq { background: var(--surface); color: var(--ink); border-radius: 26px; padding: 14px; box-shadow: 0 18px 0 rgb(0 0 0 / 0.22); transform: rotate(1.5deg); display: grid; gap: 10px; }
.hq-photo { border-radius: 16px; max-height: none; }
.hq-try { position: absolute; right: 10px; top: 10px; z-index: 2; background: var(--surface); color: var(--ink); font-weight: 800; font-size: 0.8rem; padding: 5px 9px; border-radius: 9px; }
.hq-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hq-opts .opt { min-height: 50px; font-size: 0.92rem; padding: 10px 12px; }
.hq-fb { margin: 2px 4px 0; font-size: 0.95rem; line-height: 1.5; }
.hq-fb a { color: var(--accent); font-weight: 800; }
.h-modes .ways { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 0; }
.h-modes .way { background: var(--surface); border: 2px solid var(--line); border-radius: 22px; padding: 22px; gap: 8px; }
.h-modes .way:hover { border-color: var(--accent); }
.way-ic { width: 50px; height: 50px; border-radius: 14px; background: var(--brand); color: #fff; }
.h-modes .way b { font-size: 1.25rem; font-family: var(--display); font-stretch: 118%; }
.h-levels .levels { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.h-levels .levels li::before { display: none !important; }
.h-levels .lvcard { display: flex; flex-direction: column; gap: 6px; padding: 22px !important; border-radius: 22px; min-height: 170px; }
.h-levels li:nth-child(1) .lvcard { background: var(--accent-soft); color: var(--ink); }
.h-levels li:nth-child(2) .lvcard { background: var(--brand); color: #fff; }
.h-levels li:nth-child(3) .lvcard { background: #13213a; color: #fff; }
.h-levels .lvcard b { font-size: 1.9rem; }
.h-levels .lvcard:hover b { color: inherit; }
.h-levels .lvcard small { color: inherit; font-weight: 800; font-size: 0.95rem; }
.h-levels li:nth-child(n+2) .lvcard small { color: var(--map); }
.h-levels .lvcard > span:last-child { color: inherit; opacity: 0.85; max-width: none; }
.lvcard .mini-meter { height: auto; gap: 4px; align-items: center; }
.lvcard .mini-meter i { width: 24px; height: 7px !important; border-radius: 4px; background: rgb(255 255 255 / 0.35); }
.h-levels li:nth-child(1) .mini-meter i { background: var(--surface); }
.h-levels li:nth-child(1) .mini-meter i.on { background: var(--brand); }
.h-levels li:nth-child(n+2) .mini-meter i.on { background: var(--map); }
.row-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.btn.pill { border-radius: 999px; border: 2px solid var(--ink); color: var(--ink); background: transparent; text-decoration: none; padding: 10px 18px; }
.gcards { gap: 12px; }
@media (min-width: 640px) { .gcards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .gcards { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.gcard { padding: 16px; gap: 6px; border: 2px solid var(--line); border-radius: 20px; min-height: 140px; }
.gc-num { width: 44px; height: 44px; border-radius: 12px; font-size: 1.3rem; background: var(--gc); color: var(--gt); margin-bottom: 4px; }
.gcard b { font-size: 1rem; line-height: 1.25; }
.gcard small { color: var(--muted); font-weight: 700; font-size: 0.85rem; }
.h-cta { grid-template-columns: 1fr; }
@media (min-width: 760px) { .h-cta { grid-template-columns: 1fr auto; align-items: center; } .h-cta h2, .h-cta p { grid-column: 1; } .h-cta .cta { grid-column: 2; grid-row: 1 / span 2; margin: 0; } }
@media (max-width: 640px) {
  .home > section { padding-block: 34px; }
  .h-hero { gap: 28px; padding-top: 26px !important; }
  .lv-head .sub { display: none; }
  .row-head .sub { display: block; }
  .lv-head { margin-bottom: 14px; }
  .h-modes .ways, .h-levels .levels { gap: 8px; }
  .h-modes .way { padding: 12px 6px; border-radius: 16px; justify-items: center; text-align: center; gap: 6px; }
  .way-ic { width: 40px; height: 40px; border-radius: 12px; margin: 0; }
  .h-modes .way b { font-size: 0.9rem; font-stretch: 100%; }
  .h-modes .way > span:last-child, .h-levels .lvcard > span:last-child { display: none; }
  .h-levels .lvcard { padding: 12px 10px !important; min-height: 0; border-radius: 16px; gap: 3px; }
  .h-levels .lvcard b { font-size: 1.1rem; }
  .h-levels .lvcard small { font-size: 0.8rem; }
  .lvcard .mini-meter i { width: 16px; height: 6px !important; }
  .gcard { min-height: 0; padding: 14px; }
}

/* ---------- quiz ---------- */
#viewQuiz > .modes { display: flex; gap: 4px; padding: 4px; border: 0; border-radius: 14px; background: var(--accent-soft); }
#viewQuiz > .modes .mode { flex: 1; margin: 0; border: 0; border-radius: 10px; padding: 10px 6px; color: var(--muted); }
#viewQuiz > .modes .mode[aria-pressed="true"] { background: var(--surface); color: var(--accent); }
.qbar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin: -6px -4px; padding: 6px 4px; background: var(--bg); }
.board { flex: 1 1 380px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 0; border-radius: 16px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.cell { padding: 9px 14px; }
.cell + .cell { border-left: 1px solid var(--line); }
.cell small { color: var(--muted); font-size: 0.74rem; }
.cell b { font-size: 1.35rem; }
.cell b em { color: var(--muted); }
.cell.streak b { color: var(--ink); }
.cell.streak svg { color: #e07a1f; }
.cell.cmiss b { color: var(--bad); }
.btn.next { flex: 0 1 auto; background: var(--map); color: #13213a; font: 800 1.12rem var(--display); font-stretch: 118%; border-radius: 16px; padding: 12px 22px; min-height: 54px; box-shadow: 0 4px 0 #b98a1f; margin-bottom: 4px; }
.card { border: 0; border-radius: 24px; padding: 10px; overflow: visible; }
.card .photo { border-radius: 16px; }
.card .body { padding: 12px 2px 4px; }
.options { grid-template-columns: 1fr 1fr; gap: 10px; }
.verdict { border-radius: 18px; padding: 14px 16px; }
.verdict.ok { border: 2px solid var(--good); }
.verdict.ko { border: 2px solid var(--bad); }
.verdict.info { border: 2px solid var(--accent); background: var(--surface); }
#cardRow .btn { color: var(--ink); }
#cardRow .btn.yes { background: var(--good-soft); border: 2px solid var(--good); }
#cardRow .btn.no { background: var(--bad-soft); border: 2px solid var(--bad); }
.review { border: 0; border-radius: 20px; }
@media (max-width: 640px) {
  .qbar { gap: 8px; }
  .cell { padding: 7px 9px; }
  .cell small { font-size: 0.66rem; }
  .cell b { font-size: 1.05rem; }
  .cell b em { font-size: 0.7rem; }
  .btn.next { flex: 1 1 100%; min-height: 50px; }
  .card { padding: 8px; border-radius: 20px; }
  .options { gap: 8px; }
  .opt { font-size: 0.95rem; min-height: 56px; padding: 10px 12px; }
}

/* ---------- studia ---------- */
.wrap[data-view="study"] .gsel { display: none; }
.gsq { display: flex; gap: 8px; flex-wrap: wrap; }
.gsqb { width: 44px; height: 44px; flex: none; border: 0; border-radius: 12px; background: var(--gc); color: var(--gt); font: 800 1.05rem var(--display); cursor: pointer; }
.gsqb.all { width: auto; padding: 0 16px; background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.gsqb.all[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.gsqb:not(.all)[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--gc); }
.gsq:has(.gsqb:not(.all)[aria-pressed="true"]) .gsqb:not(.all):not([aria-pressed="true"]) { opacity: 0.4; }
.gsqb:disabled { opacity: 0.15 !important; cursor: default; }
@media (max-width: 640px) { .gsq { flex-wrap: nowrap; overflow-x: auto; padding: 6px 2px; margin: -6px -2px; } .gsqb { width: 40px; height: 40px; } }
.grp-num { background: var(--gc); color: var(--gt); }
.grp-txt h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); }
.bgrid { gap: 12px; }
@media (min-width: 900px) { .bgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .wrap[data-view="study"] .bgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.bcard { border-radius: 16px; }
.bimg { border-bottom: 4px solid var(--gc); }
.qthumb { border-bottom-color: var(--gc); }
.gbadge { background: var(--gc); color: var(--gt); }
.gpill { background: var(--sunk); color: var(--ink); }

/* ---------- pagina della razza ---------- */
.breed { gap: 22px; }
.bband { margin-top: -14px; padding: 18px 0 26px; display: flex; flex-direction: column; gap: 14px; }
.bband .crumbs { color: #b9cdf2; }
.bband .crumbs a { color: var(--brand-soft); }
.bband .crumbs #cName { color: #fff; }
.bhead { gap: 8px; }
.bband .gpill { background: rgb(255 255 255 / 0.14); color: #fff; display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 8px; }
.bband .gpill::before { content: ""; width: 12px; height: 12px; border-radius: 4px; background: var(--gc); box-shadow: 0 0 0 1.5px rgb(255 255 255 / 0.5); }
.breed .bband .sname { color: #fff; font-size: clamp(2rem, 5.5vw, 3.4rem); font-stretch: 125%; line-height: 1; }
.bband .salias { color: var(--brand-soft); font-size: 1rem; }
.bhead-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; width: 100%; margin-top: 4px; }
.bband .stag { background: var(--surface); color: var(--ink); font-weight: 800; padding: 6px 12px; border-radius: 10px; font-size: 0.85rem; }
.bband .stag.miss { background: var(--bad-soft); color: var(--bad); }
#sTrain { background: var(--map); color: #13213a; }
.blay { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: none; gap: 18px; }
.bleft { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.bright { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.bpho, .bhead, .bid, .bmain { grid-area: auto; }
.bid { position: static !important; }
.bpho { background: var(--surface); border-radius: 22px; padding: 10px; }
.breed .photo { border-radius: 14px; max-height: none; }
.thumbs { padding: 10px 2px 2px; }
.thumbs button[aria-current="true"] { border-color: var(--accent); }
.inbreve { background: var(--map); color: #13213a; border-radius: 20px; padding: 18px 22px; }
.inbreve > b { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.breed .inbreve .sdesc { font-size: 1.06rem; font-weight: 600; line-height: 1.5; margin: 6px 0 0; }
.bright > .salias { background: var(--surface); border-radius: 16px; padding: 12px 16px; }
.idcard { box-shadow: none; border: 1px solid var(--line); border-radius: 20px; }
.idhead { background: none; color: var(--ink); font: 800 1.15rem var(--display); font-stretch: 118%; padding: 16px 18px 8px; }
.idhead .ico { color: var(--accent); }
.idcard .idstd { color: var(--accent); background: var(--accent-soft); }
.idcard a.idstd:hover { background: var(--accent-soft); text-decoration: underline; }
.idsize { background: none; gap: 8px; padding: 6px 14px 12px; }
.idm { background: var(--sunk); border-radius: 12px; }
.idml { color: var(--muted); }
.idsy { color: var(--accent); }
.idtab th .ico, .idml .ico, .idsiml .ico, .ssum .ico, .sfonti .ico { color: var(--accent); }
.idtab tr:nth-child(even) { background: none; }
.idsim .chip { background: var(--accent-soft); color: var(--accent); }
.sfull { gap: 16px; margin-top: 0; }
.sdiv { display: none; }
.ssec { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; }
.ssec h2 { font-size: 1.4rem; font-stretch: 118%; }
.ssec p { font-size: 1.02rem; line-height: 1.65; }
.sico { background: var(--accent-soft); color: var(--accent); }
.cmp li { border-left: 0; background: var(--sunk); }
.ssum { background: var(--map-soft); }
.sfonti { border-top: 0; padding: 0 4px; }
.bwip { border: 2px dashed var(--line); background: var(--surface); }
.bwip h2 svg { color: var(--accent); }
.bsim h2 { font-size: 1.4rem; font-stretch: 118%; }
.snl { border-radius: 16px; }
.snl:hover { border-color: var(--accent); }
@media (min-width: 900px) {
  .blay { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); align-items: start; gap: 24px; }
  .bright { position: sticky; top: 16px; }
  .bsim .bgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .bleft { display: contents; }
  .bpho { order: 1; margin: 0 -16px; border-radius: 0; padding: 0 0 6px; }
  .breed .photo { border-radius: 0; }
  .thumbs { padding: 10px 12px 2px; }
  .bright { order: 2; }
  .bmain { order: 3; }
  .bsim { order: 4; }
  .ssec { padding: 18px; }
  .breed { gap: 16px; }
  .blay { gap: 14px; }
  .bband { padding-bottom: 22px; }
}

/* ---------- info ---------- */
.info { max-width: 860px; width: 100%; margin: 0 auto; gap: 16px; }
.ihero { display: flex; flex-direction: column; gap: 12px; padding: 18px 0 8px; }
.ihero h1 { margin: 0; font-size: clamp(2.1rem, 6vw, 3.4rem); line-height: 1; font-stretch: 125%; letter-spacing: -0.02em; max-width: 16ch; }
.ihero .lead { max-width: 60ch; }
.inum { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .inum { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.inum li { border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.inum b { font: 800 2rem var(--display); font-stretch: 118%; line-height: 1.05; }
.inum span { font-weight: 700; font-size: 0.9rem; }
.inum .n1 { background: var(--brand); color: #fff; }
.inum .n2 { background: var(--map); color: #13213a; }
.inum .n3 { background: var(--surface); }
.inum .n4 { background: #13213a; color: #fff; }
.info .block { background: var(--surface); border-radius: 20px; padding: 22px 24px; }
.info .block h2 { font-size: 1.45rem; font-stretch: 118%; }
.info .block.contact { background: var(--board); color: var(--board-ink); }
.info .block.contact p { color: var(--board-muted); }
.contact .mailbox { background: rgb(255 255 255 / 0.08); border: 0; }
.contact .btn.ghost { color: var(--board-ink); border-color: rgb(255 255 255 / 0.35); }
.contact .btn:not(.ghost) { background: var(--map); color: #13213a; }
@media (max-width: 640px) { .info .block { padding: 18px; } }

/* ---------- interattività: i riquadri e i pulsanti si muovono un po' al passaggio ---------- */
.btn, .opt, .way, .lvcard, .gcard, .bcard, .gsqb, .snl, .tab, .chipbtn, .mode { transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease; }
@media (hover: hover) {
  .btn:not(:disabled):hover, .gsqb:not(:disabled):hover, .chipbtn:hover { transform: translateY(-2px); }
  .h-hero .cta .btn:not(.ghost):hover, .h-cta .btn.light:hover, .btn.next:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #b98a1f; }
  .h-hero .cta .btn.ghost:hover { background: rgb(255 255 255 / 0.1); }
  .opt:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 4px 0 var(--line); }
  .way:hover, .gcard:hover, .snl:hover { transform: translateY(-4px); box-shadow: 0 10px 22px -12px rgb(19 33 58 / 0.35); }
  .lvcard:hover { transform: translateY(-4px) rotate(-0.6deg); box-shadow: 0 12px 24px -12px rgb(19 33 58 / 0.45); }
  .way:hover .way-ic { transform: rotate(-6deg) scale(1.06); }
  .gcard:hover .gc-num { transform: rotate(-8deg) scale(1.08); }
  .bcard:hover { transform: translateY(-4px) rotate(-0.4deg); box-shadow: 0 12px 24px -14px rgb(19 33 58 / 0.45); border-color: var(--gc); }
  .bcard:hover .bimg img { transform: scale(1.05); }
}
.btn:not(:disabled):active, .opt:not(:disabled):active, .way:active, .lvcard:active, .gcard:active, .bcard:active, .gsqb:active, .snl:active { transform: translateY(1px) scale(0.98); box-shadow: none; }
.way-ic, .gc-num { transition: transform 0.2s ease; }
.bimg img { transition: transform 0.3s ease; }
@media (prefers-reduced-motion: reduce) { .btn, .opt, .way, .lvcard, .gcard, .bcard, .gsqb, .snl, .way-ic, .gc-num, .bimg img { transition: none; transform: none !important; } }

/* icone dei tre modi: piccole illustrazioni su fondo blu */
.way-ic { width: 64px; height: 54px; border-radius: 16px; background: var(--brand); color: #fff; }
.way-ic svg { width: 46px; height: 38px; color: inherit; }
@media (prefers-reduced-motion: no-preference) { .caret-blink { animation: blink 1.1s steps(1) infinite; } @keyframes blink { 50% { opacity: 0; } } }
@media (max-width: 640px) { .way-ic { width: 52px; height: 44px; border-radius: 13px; } .way-ic svg { width: 38px; height: 32px; } }

/* schede in Studia e razze simili: solo foto e nome (niente righe di descrizione tagliate) */
.bcard .bdesc { display: none; }
.bcard { border: 2px solid var(--line); }
.btxt { padding: 10px 12px 12px; }
.bname { font-size: 0.98rem; }

/* suggerimento: piccolo, non occupa una riga intera */
#actions { justify-content: flex-start; }
#actions .btn { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 0.85rem; font-weight: 700; border-radius: 999px; color: var(--muted); }
#actions .btn svg { width: 15px; height: 15px; }

/* carta d'identità sul telefono: misure su una riga, titolo senza a capo */
@media (max-width: 640px) {
  .idhead { flex-wrap: wrap; row-gap: 6px; font-size: 1.05rem; padding: 14px 16px 6px; }
  .idhead > span:not(.idstd) { white-space: nowrap; }
  .idcard .idstd { margin-left: 0; font-size: 0.7rem; }
  .idsize { grid-template-columns: 1fr; padding: 6px 12px 12px; }
  .idm { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px 12px; padding: 12px 14px; }
  .idml { grid-column: 1 / -1; }
  .idm > .idml + .idsx:last-child { grid-column: 1 / -1; }
  .idsv { min-width: 0; flex: 1; }
  .idsv b:not(.lungo) { white-space: nowrap; }
  .idsy { width: auto; min-width: 36px; letter-spacing: 0; text-align: center; }
  .idsx { gap: 10px; }
  .idtab th { width: 34%; padding-left: 12px; }
  .idtab td { padding-right: 12px; }
}
