/* PocketScore — stile teen: colori pieni e vivaci con inchiostro scuro, bordi neri spessi,
   raggi grandi, titoli in Bricolage Grotesque. Nessuna ombra sulle cose ferme, nessun gradiente. */
:root {
  --ground: #f2f2f2;
  --surface: #ffffff;
  --active: #e7e7e7;
  --ink: #111111;
  --rule: #e4e4e4;
  --control: #111111;
  --text: #111111;
  --muted: #4d4d4d;
  --accent: #1557e0;
  --accent-hover: #0f45b5;
  --lime: #c6f25e;
  --pink: #ff9cc6;
  --positive: #1d6b35;
  --negative: #b3141f;
  --negative-soft: #ffd9e8;
  --negative-ink: #6e0a14;

  /* Tinte delle materie e delle persone: colore pieno con inchiostro scuro della stessa famiglia */
  --sky-bg: #8fd0ff;   --sky-ink: #06223d;
  --mint-bg: #6fe3b0;  --mint-ink: #04301c;
  --peach-bg: #ffb27a; --peach-ink: #3d1600;
  --lemon-bg: #ffe45c; --lemon-ink: #332a00;
  --teal-bg: #5fd6d6;  --teal-ink: #032e2e;
  --rose-bg: #ff9cc6;  --rose-ink: #3d0a20;
  --lime-bg: #c6f25e;  --lime-ink: #1f2e00;
  --sand-bg: #ecd5aa;  --sand-ink: #33240a;

  --line: 2px solid var(--ink);
  --radius-card: 24px;
  --radius-inner: 14px;
  --radius-tile: 20px;
  --radius-chip: 8px;
  --gap: 24px;
  --pad: 24px;
  --control-height: 44px;
  --fs-title: 32px;
  --fs-section: 22px;
  --fs-kpi: 40px;
  --fs-body: 16px;
  --fs-small: 14px;
  --font: "Manrope", Inter, system-ui, -apple-system, sans-serif;
  --display: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 500 var(--fs-body)/1.5 var(--font);
}
a { color: var(--accent); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: var(--fs-title); line-height: 1.1; margin: 0; }
h2 { font-size: var(--fs-section); line-height: 1.2; margin: 0 0 16px; }
h3 { font-size: 18px; margin: 24px 0 8px; }
p { margin: 0 0 12px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); }
.pos { color: var(--positive); }
.neg { color: var(--negative); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Colonna centrata: 1100px di contenuto con 24px di margine */
.wrap { max-width: 1148px; margin: 0 auto; padding: 0 24px; }
main.wrap { padding-bottom: 64px; min-height: 60vh; }

/* Barra superiore */
.site-header .header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font: 800 22px/1 var(--display); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; transition: transform .2s ease; }
.brand:hover svg { transform: rotate(-12deg); }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a, .nav .link {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px;
  color: var(--ink); font-size: var(--fs-small); font-weight: 700; border: 2px solid transparent;
}
.nav a:hover, .nav .link:hover { border-color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--lime); border-color: var(--ink); }
.nav .btn { color: #fff; margin-left: 6px; }

/* Riga del titolo */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 24px 0 var(--gap); }
.page-head .subline { margin: 8px 0 0; color: var(--muted); }
.crumb { display: inline-block; font-size: var(--fs-small); margin-bottom: 6px; }

/* Bottoni: pillole con bordo nero; il principale è nero */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--control-height); padding: 0 22px; border-radius: 999px;
  background: var(--ink); color: #fff; border: var(--line);
  font: 700 15px/1 var(--font); cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, color .15s ease, transform .1s ease;
}
.btn:hover { background: var(--accent); text-decoration: none; }
.btn:active { transform: scale(.96); }
.btn-small { height: 36px; padding: 0 16px; font-size: var(--fs-small); }
.btn-ghost { background: var(--surface); color: var(--ink); }
.btn-ghost:hover { background: var(--lime); color: var(--ink); }
.btn-danger { background: var(--negative); }
.btn-danger:hover { background: var(--negative-ink); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; font-weight: 700; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--negative); }
.inline { display: inline; margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Superfici: carta bianca con bordo nero */
.card { background: var(--surface); border: var(--line); border-radius: var(--radius-card); padding: var(--pad); margin: 0 0 var(--gap); }
.card.narrow { max-width: 480px; margin: 40px auto; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: start; }
.two-col > .card { margin: 0; }

/* Cambio mese */
.month-nav { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: var(--line); border-radius: 999px; padding: 2px; }
.month-nav a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; color: var(--ink); font-size: 22px; line-height: 1; }
.month-nav a:hover { background: var(--lime); text-decoration: none; }
.month-nav strong { min-width: 150px; text-align: center; font-weight: 800; font-size: var(--fs-small); }

/* La paghetta del mese: un campo di colore pieno */
.pay { display: grid; gap: 20px; background: var(--accent); color: #fff; }
.pay-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.pay-label { margin: 0 0 6px; font-size: var(--fs-small); font-weight: 700; }
.pay-total { margin: 0; font: 800 56px/1 var(--display); letter-spacing: -0.03em; }
.pay-finding { margin: 0; max-width: 500px; font-size: 17px; font-weight: 600; }
.paybar { display: flex; height: 28px; border-radius: 999px; overflow: hidden; background: var(--active); border: var(--line); gap: 2px; }
.paybar .seg { display: block; min-width: 0; }
.seg.kept, .sw.kept { background: var(--accent); }
.seg.bonus, .sw.bonus { background: var(--lime); }
.seg.lost, .sw.lost { background: var(--pink); }
.pay .paybar { background: rgba(255, 255, 255, .25); border-color: #fff; }
.pay .seg.kept, .pay .sw.kept { background: #fff; }
.pay-legend { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; }
.pay-legend div { display: flex; align-items: center; gap: 8px; }
.pay-legend dt { display: flex; align-items: center; gap: 8px; font-size: var(--fs-small); font-weight: 600; }
.pay-legend dd { margin: 0; font-weight: 800; font-size: var(--fs-small); }
.pay .pos, .pay .neg { color: #fff; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 5px; flex: none; border: 2px solid currentColor; }
.pay-note { margin: 0; font-size: var(--fs-small); }

/* La pagella del mese: una tessera colorata per voto */
.grades { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.grade {
  position: relative; border-radius: var(--radius-tile); padding: 16px 18px; display: grid; gap: 2px;
  background: var(--tone-bg); color: var(--tone-ink); border: var(--line);
  transition: transform .18s ease;
}
.grade:hover { transform: translateY(-3px) rotate(-1.5deg); }
.grade:nth-child(even):hover { transform: translateY(-3px) rotate(1.5deg); }
.g-num { font: 800 48px/1 var(--display); letter-spacing: -0.03em; }
.g-sub { font-weight: 800; font-size: 15px; margin-top: 4px; }
.g-meta { font-size: 13px; font-weight: 600; }
.g-eff { margin-top: 10px; justify-self: start; font-weight: 800; font-size: var(--fs-small); background: var(--surface); color: var(--ink); border: var(--line); border-radius: 999px; padding: 2px 10px; }
.g-eff.neg { background: var(--ink); color: #fff; }
.empty { border: 2px dashed var(--ink); border-radius: var(--radius-inner); padding: 14px 16px; color: var(--muted); margin: 0; }

.tone-sky   { --tone-bg: var(--sky-bg);   --tone-ink: var(--sky-ink); }
.tone-mint  { --tone-bg: var(--mint-bg);  --tone-ink: var(--mint-ink); }
.tone-peach { --tone-bg: var(--peach-bg); --tone-ink: var(--peach-ink); }
.tone-lemon { --tone-bg: var(--lemon-bg); --tone-ink: var(--lemon-ink); }
.tone-teal  { --tone-bg: var(--teal-bg);  --tone-ink: var(--teal-ink); }
.tone-rose  { --tone-bg: var(--rose-bg);  --tone-ink: var(--rose-ink); }
.tone-lime  { --tone-bg: var(--lime-bg);  --tone-ink: var(--lime-ink); }
.tone-sand  { --tone-bg: var(--sand-bg);  --tone-ink: var(--sand-ink); }

/* Etichette materia e persone */
.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--tone-bg, var(--active)); color: var(--tone-ink, var(--ink)); border: var(--line); font-size: 13px; font-weight: 800; white-space: nowrap; flex: none; }
.half { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: var(--radius-chip); background: var(--surface); color: var(--ink); border: 1.5px solid var(--ink); font-size: 12px; font-weight: 800; margin-left: 6px; }
.avatar { width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center; font: 800 20px/1 var(--display); background: var(--tone-bg); color: var(--tone-ink); border: var(--line); flex: none; }

/* Figli nella home del genitore */
.kids { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.kid { background: var(--surface); border: var(--line); border-radius: var(--radius-card); padding: var(--pad); display: grid; gap: 16px; transition: transform .18s ease; }
.kid:hover { transform: translateY(-3px); }
.kid-head { display: flex; align-items: center; gap: 12px; }
.kid-head a { color: var(--ink); font: 800 22px/1.1 var(--display); }
.kid-head .muted { display: block; font-size: var(--fs-small); }
.kid-total { font: 800 var(--fs-kpi)/1 var(--display); letter-spacing: -0.03em; margin: 0; }
.kid-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.kid .paybar { height: 18px; }

/* Tabelle */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-body); }
.table th, .table td { text-align: left; padding: 14px 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 700; font-size: var(--fs-small); padding-top: 4px; }
.table tr:last-child td { border-bottom: 0; }
.table th.num, .table td.num { text-align: right; }
.table .note { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions > * + * { margin-left: 14px; }
.grade-cell { font: 800 22px/1 var(--display); }

/* Regole: verde lime per i premi, rosa per le penalità */
.rules-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.rules-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: var(--radius-inner); background: var(--ground); border: var(--line); font-size: var(--fs-small); font-weight: 700; }
.rules-list li.r-pos { background: var(--lime); }
.rules-list li.r-neg { background: var(--pink); }
.rules-list b { font-weight: 800; color: var(--ink); }

/* Liste */
.history, .activity { list-style: none; margin: 0; padding: 0; }
.history li { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.history li:last-child, .activity li:last-child { border-bottom: 0; }
.history a { color: var(--ink); font-weight: 700; }
.history .num { min-width: 92px; text-align: right; font-weight: 800; }
.history li.best .num { background: var(--lime); border: var(--line); border-radius: 999px; padding: 0 10px; }
.record { font-size: var(--fs-small); font-weight: 700; }
.activity li { display: grid; grid-template-columns: 92px 1fr auto; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.activity time { color: var(--muted); font-size: 13px; white-space: nowrap; }
.tag { display: inline-flex; justify-content: center; height: 26px; align-items: center; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--surface); color: var(--ink); border: var(--line); }
.tag-child { background: var(--lime); }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 16px 0; }
.kid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.kid-stats .card { margin: 0; display: flex; gap: 12px; align-items: center; }
.kid-stats p { margin: 0; }

/* Moduli */
.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 8px; font-weight: 700; font-size: var(--fs-small); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.form-grid .form-actions { grid-column: 1 / -1; }
.form-inline { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
.form-inline label { flex: 1 1 220px; }
.filter { margin-bottom: var(--gap); max-width: 320px; }
input, select {
  font: 500 var(--fs-body) var(--font); color: var(--ink); background: var(--surface);
  border: var(--line); border-radius: var(--radius-inner); height: var(--control-height); padding: 0 14px; width: 100%;
}
input::placeholder { color: #6b6b6b; }
input:focus, select:focus { outline: 3px solid var(--accent); outline-offset: 1px; }
input:disabled { background: var(--ground); color: var(--muted); }
.form label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--ink); }
.rules-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.rule span { color: var(--muted); }
.danger-zone { border-color: var(--negative); }
.danger-zone h2 { color: var(--negative-ink); }

/* Messaggi */
.flash { border-radius: var(--radius-inner); padding: 12px 16px; margin: 16px 0; font-size: var(--fs-small); font-weight: 700; border: var(--line); }
.flash ul { margin: 0; padding-left: 18px; }
.flash-ok { background: var(--lime); color: var(--ink); }
.flash-error { background: var(--pink); color: var(--ink); }
.flash-info { background: var(--lemon-bg); color: var(--ink); }

/* Home pubblica */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding: 40px 0 56px; }
.hero h1 { font-size: 64px; line-height: .98; letter-spacing: -0.04em; }
.lead { font-size: 19px; margin: 24px 0 28px; max-width: 520px; }
.how { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 12px; max-width: 540px; }
.how li { display: flex; gap: 12px; align-items: baseline; }
.how .chip { min-width: 108px; justify-content: center; }
.demo { background: var(--surface); border: var(--line); border-radius: var(--radius-card); padding: var(--pad); display: grid; gap: 20px; }
.demo h2 { margin: 0; font-size: 22px; }
.demo-rows { display: grid; gap: 10px; }
.demo-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; }
.demo-row .chip { justify-content: center; }
.demo-out { background: var(--accent); color: #fff; border: var(--line); border-radius: var(--radius-tile); padding: 18px 20px; display: grid; gap: 16px; }
.demo-out .paybar { background: rgba(255, 255, 255, .25); border-color: #fff; }
.demo-out .seg.kept, .demo-out .sw.kept { background: #fff; }
.demo-out .pos, .demo-out .neg { color: #fff; }
.picks { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; max-width: 320px; }
.picks button {
  width: 100%; height: 38px; border-radius: 999px; border: 2px solid transparent; background: var(--ground); color: var(--ink);
  font: 800 var(--fs-small) var(--font); cursor: pointer; transition: background-color .15s ease, transform .1s ease;
}
.picks button:hover { border-color: var(--ink); }
.picks button:active { transform: scale(.9); }
.picks button[aria-pressed="true"] { background: var(--tone-bg); border-color: var(--ink); color: var(--ink); transform: scale(1.08); }

/* Spazi pubblicitari */
.ad { margin: 0 auto var(--gap); text-align: center; overflow: hidden; }
.ad-placeholder {
  display: grid; place-items: center; min-height: 90px;
  border: 2px dashed #b5b5b5; border-radius: var(--radius-card);
  color: var(--muted); font-size: var(--fs-small);
}
.ad-inline.ad-placeholder { min-height: 110px; }

/* Piè di pagina */
.site-footer { padding: 32px 0 40px; color: var(--muted); font-size: var(--fs-small); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer-links a, .footer-links .link { color: var(--muted); font-size: inherit; font-weight: 600; }

/* Banner cookie: galleggia */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50;
  max-width: 720px; margin: 0 auto; padding: 16px 20px;
  background: var(--surface); color: var(--ink); border: var(--line); border-radius: var(--radius-card);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .16); /* taste-skill-ignore: il banner galleggia */
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}
.consent[hidden] { display: none; }
.consent p { margin: 0; flex: 1 1 320px; font-size: var(--fs-small); }

/* Testi lunghi */
.prose h2 { margin-top: 32px; }
.prose p, .prose li { max-width: 72ch; }
.prose .table { margin: 8px 0 12px; font-size: var(--fs-small); }
.prose code { font-size: .9em; background: var(--ground); padding: 1px 6px; border-radius: var(--radius-chip); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Voti da confermare e non confermati */
.grade.is-pending { background: var(--surface); border-style: dashed; padding-left: 26px; }
.grade.is-pending::before { content: ""; position: absolute; top: 10px; bottom: 10px; left: 10px; width: 6px; border-radius: 999px; background: var(--tone-bg); }
.grade.is-rejected { background: var(--ground); color: var(--muted); border-color: #9a9a9a; }
.grade.is-rejected .g-num { text-decoration: line-through; }
.grade .g-actions { margin-top: 8px; display: flex; gap: 14px; flex-wrap: wrap; }
.status { justify-self: start; display: inline-flex; align-items: center; height: 24px; padding: 0 10px; margin-bottom: 6px; border-radius: 999px; font-size: 12px; font-weight: 800; border: var(--line); }
.status-pending { background: var(--lemon-bg); color: var(--ink); }
.status-rejected { background: var(--surface); color: var(--muted); border-color: #9a9a9a; }
tr.is-pending td:first-child { box-shadow: inset 4px 0 0 var(--lemon-bg); }
tr.is-rejected td { color: var(--muted); }
tr.is-rejected .grade-cell { text-decoration: line-through; }
.pending-box { border-style: dashed; }
.pending-box .card-head { margin-bottom: 8px; align-items: center; }
.pending-box .card-head .btn { white-space: nowrap; }
.pending-box .row-actions { white-space: normal; }
.pending-box td.row-actions { white-space: nowrap; }
.pending-box .row-actions > * + * { margin-left: 16px; }
.badge-pending { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--lemon-bg); color: var(--ink); border: var(--line); font-size: 12px; font-weight: 800; }

/* Pesi per materia */
.weights { display: grid; gap: 10px; max-width: 520px; }
.weight-row { display: grid; grid-template-columns: 1fr 120px; gap: 10px; align-items: center; }
.weight-row .pct { position: relative; }
.weight-row .pct input { padding-right: 30px; text-align: right; }
.weight-row .pct::after { content: "%"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* Tablet e telefono */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 16px; }
  .hero h1 { font-size: 52px; }
  .two-col { grid-template-columns: 1fr; }
  .rules-list { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  :root { --pad: 20px; --gap: 16px; --fs-title: 26px; --fs-kpi: 34px; }
  .wrap { padding: 0 16px; }
  .hero h1 { font-size: 42px; }
  .pay-total { font-size: 46px; }
  .site-header .header-inner { min-height: 60px; }
  .brand { font-size: 19px; }
  .nav a, .nav .link { padding: 0 12px; height: 40px; }
  .nav .btn { margin-left: 0; }
  .rules-grid { grid-template-columns: repeat(2, 1fr); }
  .rules-list { grid-template-columns: 1fr 1fr; }
  .kids { grid-template-columns: 1fr; }
  .grades { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .g-num { font-size: 40px; }
  .grade { padding: 14px; }
  .grade.is-pending { padding-left: 24px; }
  .demo-row { grid-template-columns: 1fr; gap: 6px; }
  .demo-row .chip { justify-self: start; }
  .activity li { grid-template-columns: auto 1fr; }
  .activity li time { grid-column: 2; }
  .pending-box td.row-actions { white-space: normal; }
  .pending-box .row-actions > * { margin: 4px 16px 4px 0 !important; }
  /* Sotto i 640px la tabella dei voti diventa un elenco di righe a due linee */
  .table.stackable thead { display: none; }
  .table.stackable tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .table.stackable tr:last-child { border-bottom: 0; }
  .table.stackable td { border: 0; padding: 0; }
  .table.stackable td.c-date { grid-column: 1; grid-row: 2; color: var(--muted); font-size: 13px; text-align: left; }
  .table.stackable td.c-sub { grid-column: 1; grid-row: 1; }
  .table.stackable td.c-grade { grid-column: 2; grid-row: 1; }
  .table.stackable td.c-eff { grid-column: 2; grid-row: 2; font-size: var(--fs-small); }
  .table.stackable td.row-actions { grid-column: 1 / -1; grid-row: 3; text-align: left; padding-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .grade:hover, .grade:nth-child(even):hover, .kid:hover, .brand:hover svg { transform: none; }
}

/* Stampa / PDF */
@media print {
  .site-header, .site-footer, .ad, .no-print, .month-nav a, .consent { display: none !important; }
  body { background: #fff; }
  .card, .kid { break-inside: avoid; }
  .pay, .grade, .paybar .seg, .rules-list li { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.kid .badge-pending, .kid-head + .badge-pending { justify-self: start; }

/* Emoji dei voti */
.g-emoji { position: absolute; top: 12px; right: 14px; font-size: 34px; line-height: 1; transition: transform .2s ease; }
.grade:hover .g-emoji { transform: scale(1.25) rotate(12deg); }
.grade.is-pending .g-emoji { top: 10px; font-size: 28px; opacity: .85; }
.t-emoji { font-size: 18px; vertical-align: 2px; }
@media (max-width: 640px) { .g-emoji { font-size: 28px; top: 10px; right: 10px; } }
@media (prefers-reduced-motion: reduce) { .grade:hover .g-emoji { transform: none; } }
.status, .g-eff { white-space: nowrap; }
@media (max-width: 640px) {
  .grade.is-pending .g-emoji { top: auto; bottom: 12px; right: 10px; }
  .status { font-size: 11px; padding: 0 8px; }
}
