
/* Layout: scheda di collaudo. Il modello con i blocchi del passaggio resta accanto all'indice dei passaggi. */
/* 17/11/2026: stile "Notte" (proposta B scelta dall'utente). Solo tema scuro, scelto apposta: foto grandi e colori per sezione. */
:root {
  --bg: #0b0f14; --surface: #131a22; --sunken: #1b2530; --fg: #f2f5f7; --muted: #95a3b1; --line: #233040;
  --accent: #ff6b5e; --accent-fg: #240503; --warn-bg: #2a2410; --warn-fg: #f6dc9a;
  --farm: #6ee08a; --edi: #ffb547; --arr: #ff7aa8; --mer: #8fd3ff; --glow: #8fd3ff;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
  --r: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--fg); font: 17px/1.55 var(--body); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 0 56px; }
.wrap { max-width: 1240px; margin: 0 auto; display: grid; gap: 32px; }
.wrap > * { min-width: 0; }
main.wrap { width: 100%; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; margin: 0; line-height: 1.12; }
h1, h2 { font-family: var(--display); font-weight: 700; }
h1 { font-size: clamp(2.5rem, 7vw, 4.4rem); }
h2 { font-size: 1.9rem; }
p { margin: 0; }
.mono { font-family: var(--mono); font-size: .82rem; }
.muted { color: var(--muted); }
header.site { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; padding-block: 16px; border-bottom: 2px solid var(--fg); }
.brand { font: 700 1.5rem var(--display); color: var(--fg); text-decoration: none; }
nav { display: flex; gap: 18px; flex-wrap: wrap; }
nav a { color: var(--fg); font-weight: 700; text-underline-offset: 4px; }
.draft { background: var(--warn-bg); color: var(--warn-fg); padding: 10px 14px; font-size: .95rem; }
.hero { display: grid; gap: 14px; max-width: 760px; }
.hero > p { font-size: 1.15rem; }
.sheet { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); border: 2px solid var(--fg); background: var(--surface); }
.sheet > div { padding: 14px; border-right: 1px solid var(--line); display: grid; gap: 4px; align-content: start; min-width: 0; }
.sheet > div:last-child { border-right: 0; }
.sheet b { font: 600 1.7rem var(--mono); font-variant-numeric: tabular-nums; }
.block { display: grid; gap: 16px; }
.subh { font: 700 1.15rem var(--body); margin-top: 10px; }
/* catalogo dei blocchi */
.cattools { position: sticky; top: 0; z-index: 5; display: grid; gap: 10px; padding: 12px 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.cattools input { width: 100%; font: 1.05rem var(--body); padding: 10px 12px; border: 2px solid var(--fg); background: var(--surface); color: var(--fg); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font: 600 .88rem var(--body); padding: 5px 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chips button .bi { width: 20px; height: 20px; }
.chips button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chips small { font: 500 .72rem var(--mono); opacity: .75; }
@media (max-width: 700px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .chips button { flex: none; }
  .btiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
.catbody { display: grid; gap: 44px; }
.catsec { display: grid; gap: 14px; scroll-margin-top: 140px; }
.catsec > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.catsec > header p { flex-basis: 100%; }
.catsec h3 { font: 700 1.05rem var(--body); margin-top: 6px; }
.bi { display: inline-block; width: 32px; height: 32px; background-repeat: no-repeat; flex: none; }
.btiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.btile { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: .88rem/1.2 var(--body); text-align: left; cursor: pointer; min-width: 0; }
.btile span { min-width: 0; overflow-wrap: anywhere; }
.btile:hover, .bcell:hover { border-color: var(--fg); }
.ftable { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
.ftable table { border-collapse: collapse; font-size: .85rem; }
.ftable th { font: 600 .74rem var(--mono); color: var(--muted); text-align: center; padding: 8px 4px; border-bottom: 2px solid var(--fg); min-width: 50px; max-width: 76px; line-height: 1.15; vertical-align: bottom; position: sticky; top: 0; background: var(--surface); }
.ftable th.rowh, .ftable td.rowh { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.ftable td.rowh { font-weight: 700; padding: 4px 12px 4px 10px; white-space: nowrap; border-right: 1px solid var(--line); }
.ftable td { padding: 3px; border-bottom: 1px solid var(--line); text-align: center; }
.ftable tr:last-child td { border-bottom: 0; }
.bcell { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid transparent; background: none; cursor: pointer; padding: 0; }
.swatch { display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border: 1px solid var(--line); }
/* scheda del blocco (12/11): ricette dal gioco, dove si trova, come si prende */
.bscheda { width: min(680px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 2px solid var(--fg); background: var(--surface); color: var(--fg); overflow: auto; }
.bscheda::backdrop { background: rgba(10, 14, 13, .55); }
.bs-head { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; background: var(--surface); border-bottom: 2px solid var(--fg); }
.bs-head h2 { font-size: 1.5rem; overflow-wrap: anywhere; }
.bs-head .bi { width: 64px; height: 64px; }
.bs-id { margin-top: 4px; font: 500 .8rem var(--mono); background: var(--sunken); color: var(--fg); border: 1px solid transparent; padding: 3px 8px; cursor: pointer; overflow-wrap: anywhere; text-align: left; }
.bs-id:hover { border-color: var(--fg); }
.bs-close { align-self: start; font: 700 1.4rem/1 var(--body); width: 40px; height: 40px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); cursor: pointer; }
.bs-back { font: 600 .85rem var(--body); border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; margin-bottom: 4px; text-align: left; }
.bs-body { display: grid; gap: 22px; padding: 18px 16px 22px; }
.bs-body h3 { font: 700 1.05rem var(--body); margin-bottom: 8px; }
.bs-body p { font-size: 1rem; }
.recs { display: grid; gap: 12px; }
.rec { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); background: var(--bg); }
.rec .how { font: 600 .74rem var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.rec .row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cgrid { display: grid; grid-template-columns: repeat(3, 46px); grid-template-rows: repeat(3, 46px); gap: 3px; padding: 4px; background: #8b8b8b; border: 2px solid #373737; }
.slot { display: grid; place-items: center; width: 46px; height: 46px; background: #c6c6c6; border: 2px solid; border-color: #373737 #fff #fff #373737; padding: 0; position: relative; }
.slot.big { width: 58px; height: 58px; }
.slot.big .bi, .slot.big .oi { width: 40px; height: 40px; }
button.slot { cursor: pointer; }
button.slot:hover { outline: 2px solid var(--accent); outline-offset: 1px; }
.slot .n { position: absolute; right: 2px; bottom: 0; font: 700 .85rem var(--mono); color: #fff; text-shadow: 1px 1px 0 #3f3f3f; }
.oi { display: inline-block; width: 32px; height: 32px; background-repeat: no-repeat; image-rendering: pixelated; flex: none; }
.arrow { font: 700 1.6rem var(--body); color: var(--muted); }
.flame { font-size: 1.3rem; }
.rec .ings { font-size: .9rem; color: var(--muted); }
.uses { display: flex; flex-wrap: wrap; gap: 4px; }
.uses button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; padding: 0; }
.uses button:hover { border-color: var(--fg); }
@media (max-width: 520px) {
  .bscheda { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border: 0; }
  .bs-head .bi { width: 48px; height: 48px; }
  .cgrid { grid-template-columns: repeat(3, 40px); grid-template-rows: repeat(3, 40px); }
  .slot { width: 40px; height: 40px; }
}
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 10px 16px; font: 600 .92rem var(--body); opacity: 0; transition: opacity .2s; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; }
/* comandi per il server */
.cmdopts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.cmdopts label { display: flex; align-items: center; gap: 8px; font: 600 .88rem var(--body); }
.cattools .cmdopts input { width: 190px; font-size: .95rem; padding: 6px 10px; }
.seg { display: inline-flex; }
.seg button { font: 600 .85rem var(--body); padding: 6px 10px; border-width: 1px; }
.seg button + button { border-left: 0; }
.cmdlist { display: grid; border: 1px solid var(--line); background: var(--surface); }
.cmd { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 6px 20px; padding: 10px 12px; border-bottom: 1px solid var(--line); align-items: start; }
.cmd:last-child { border-bottom: 0; }
.cmd .code, .cmd .code:hover { font: 500 .88rem/1.45 var(--mono); text-align: left; background: var(--sunken); color: var(--fg); border: 1px solid transparent; padding: 6px 9px; overflow-wrap: anywhere; white-space: pre-wrap; cursor: pointer; }
.cmd .code:hover { border-color: var(--fg); }
.cmd .code .ph { color: var(--accent); font-weight: 700; }
.cmd p { margin: 0; font-size: .95rem; }
.cmd .def { display: inline-block; margin-left: 6px; font: 500 .75rem var(--mono); color: var(--muted); white-space: nowrap; }
.cmdnote { padding: 12px 14px; border-left: 4px solid var(--accent); background: var(--surface); }
@media (max-width: 700px) { .cmd { grid-template-columns: minmax(0, 1fr); } }
.materials { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 0 28px; margin: 0; padding: 0; list-style: none; }
.materials li { border-bottom: 1px solid var(--line); }
.materials label { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.materials input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.materials .qty { font: 600 .9rem var(--mono); min-width: 2.2em; text-align: right; font-variant-numeric: tabular-nums; }
.materials input:checked ~ span { text-decoration: line-through; color: var(--muted); }
canvas.icon { width: 26px; height: 26px; image-rendering: pixelated; flex: none; }
.build { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.viewer { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 10px); background: var(--surface); border: 2px solid var(--fg); display: grid; min-width: 0; }
.scene { background: var(--sunken); min-width: 0; position: relative; }
canvas#model { width: 100%; height: min(60vh, 540px); display: block; cursor: grab; touch-action: pan-y; }
canvas#model.dragging { cursor: grabbing; }
/* cartello del passaggio (15/11, farm d'oro): stendardo rosso al centro della scena, per esempio "LEGGI SOTTO".
   Il testo viene da STEPS[i].banner: quando si traduce il sito va tradotto anche lui. */
.banner { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -58%); display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.banner::before { content: ""; width: 190px; height: 10px; background: #5b3a1e; border-radius: 3px; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.banner span { width: 150px; min-height: 190px; padding: 26px 14px 54px; box-sizing: border-box; background: #b3261e; color: #fff; font: 800 24px/1.15 system-ui, sans-serif; letter-spacing: .04em; text-align: center; text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%); display: flex; align-items: center; justify-content: center; }
.banner span::after { content: "\2193"; position: absolute; bottom: 30px; font-size: 30px; }
#nowBold { margin-top: 0; }
/* 16/11: nel primo passaggio la farm finita, foto vera dal gioco (foto_gioco.py) */
.gamephoto { position: absolute; inset: 0; margin: 0; background: var(--sunken); }
.gamephoto:not([hidden]) ~ .scenehelp { display: none; }
.gamephoto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gamephoto figcaption { position: absolute; left: 10px; bottom: 10px; padding: 4px 9px; background: rgba(0,0,0,.62); color: #fff; font-size: 13px; border-radius: 4px; }
.scenehelp { position: absolute; left: 12px; bottom: 6px; margin: 0; font-size: 12px; color: var(--muted); pointer-events: none; }
.need { display: grid; gap: 6px; padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--line); }
.need ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.need li { display: flex; align-items: center; gap: 8px; font-size: .94rem; line-height: 1.2; }
.need .x { font: 600 .9rem var(--mono); font-variant-numeric: tabular-nums; }
.need .where { font-size: .85rem; color: var(--muted); }
/* 17/11 sera: un colore per tipo di blocco, uguale nel modello e nella lista */
.need .tcol { flex: none; width: 13px; height: 13px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(0,0,0,.45); }
.need .colhint { font-size: .85rem; color: var(--muted); margin: 0; }
.scrub { display: flex; align-items: center; gap: 10px; padding: 8px 12px 0; }
.scrub input[type=range] { flex: 1 1 auto; min-width: 0; accent-color: var(--accent); height: 24px; }
.scrub button { flex: none; padding: 6px 12px; }
#play { min-width: 40px; }
/* 26/11: telecomando dal telefono */
#phoneBtn { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; }
.phoneon { flex: none; display: inline-flex; align-items: center; gap: 6px; font: 600 .8rem var(--mono); color: var(--farm); white-space: nowrap; }
.phoneon::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--farm); box-shadow: 0 0 0 3px rgba(110, 224, 138, .2); }
.phonedlg { width: min(400px, calc(100vw - 32px)); padding: 0; border: 2px solid var(--fg); background: var(--surface); color: var(--fg); }
.phonedlg::backdrop { background: rgba(10, 14, 13, .6); }
.phonedlg .pd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 2px solid var(--fg); }
.phonedlg h2 { font-size: 1.35rem; }
.phonedlg .pd-body { display: grid; gap: 12px; padding: 16px; justify-items: center; text-align: center; }
.phonedlg canvas { width: 240px; height: 240px; image-rendering: pixelated; background: #fff; padding: 0; }
.phonedlg .pd-url { font: 500 .78rem var(--mono); color: var(--muted); overflow-wrap: anywhere; user-select: all; }
.phonedlg .pd-state { font: 600 .9rem var(--body); }
.phonedlg .pd-state.on { color: var(--farm); }
@media (max-width: 700px) { #phoneBtn, .phoneon { display: none !important; } }
/* 26/11: modalità telefono (layout A scelto dall'utente): 3D a sinistra, passaggio e materiali a destra, Indietro/Avanti
   in basso a destra. Sposta solo con il CSS i pezzi del #viewer che già esistono, così go() aggiorna tutto da solo. */
#telBtn { display: none; align-items: center; gap: 6px; }
@media (pointer: coarse) { #telBtn { display: inline-flex; } }
#telExit { display: none; }
html.tm-on, html.tm-on body { overflow: hidden; }
html.tm-on #viewer { position: fixed; inset: 0; z-index: 9000; top: 0; max-height: none; border: 0; border-radius: 0; background: var(--bg);
  grid-template-columns: minmax(0, 62fr) minmax(0, 38fr); grid-template-rows: minmax(0, 1fr) auto;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
html.tm-on #viewer .scene { grid-column: 1; grid-row: 1 / 3; min-height: 0; }
html.tm-on #viewer canvas#model, html.tm-on #viewer #model3d { height: 100%; min-height: 0; }
html.tm-on #viewer .scrub, html.tm-on #viewer .scenehelp, html.tm-on #viewer #stepSel, html.tm-on #viewer #rotate,
html.tm-on #viewer #resetView, html.tm-on #viewer #telBtn { display: none; }
html.tm-on #telExit { display: block; position: absolute; top: 8px; right: 8px; z-index: 3; padding: 6px 12px; }
html.tm-on #viewer .now { grid-column: 2; grid-row: 1; border-top: 0; overflow-y: auto; align-content: start; padding: 12px 14px; gap: 4px; }
html.tm-on #viewer .now h3 { font-size: 1.15rem; }
html.tm-on #viewer .now p { font-size: .9rem; }
html.tm-on #viewer .controls { grid-column: 2; grid-row: 2; padding: 8px 12px; gap: 8px; }
html.tm-on #viewer .controls .count { margin-right: 0; width: 100%; }
html.tm-on #viewer #prev, html.tm-on #viewer #next { flex: 1; min-height: 42px; }
html.tm-on #viewer #next { flex: 1.4; }
@media (orientation: portrait) {   /* telefono dritto: 3D sopra, passaggio sotto */
  html.tm-on #viewer { grid-template-columns: minmax(0, 1fr); grid-template-rows: 52% minmax(0, 1fr) auto; }
  html.tm-on #viewer .scene { grid-row: 1; }
  html.tm-on #viewer .now { grid-column: 1; grid-row: 2; border-top: 1px solid var(--line); }
  html.tm-on #viewer .controls { grid-column: 1; grid-row: 3; }
}
/* telefono come telecomando (RemotePhone): stessa grafica di tools\telecomando.html */
html.rui-on, html.rui-on body { overflow: hidden; }
.rui { position: fixed; inset: 0; z-index: 1000; background: var(--bg); color: var(--fg); font: 16px/1.45 var(--body); display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) 0 env(safe-area-inset-left, 0); -webkit-tap-highlight-color: transparent; }
.rui header { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-bottom: 2px solid var(--fg); }
.rui .brand { font: 800 1.15rem var(--display); }
.rui .farm { flex: 1; min-width: 0; color: var(--muted); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.rui .exit { padding: 5px 10px; font-size: .85rem; }
.rui .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--farm); box-shadow: 0 0 0 4px rgba(110, 224, 138, .18); flex: none; }
.rui .now { padding: 14px 16px 12px; display: grid; gap: 4px; border-bottom: 1px solid var(--line); border-top: 0; }
.rui .now .phase { font: 600 .74rem var(--mono); letter-spacing: .05em; color: var(--muted); text-transform: uppercase; }
.rui .now h1 { margin: 0; font: 800 1.45rem/1.15 var(--display); }
.rui .now .count { font: 600 .85rem var(--mono); color: var(--accent); font-variant-numeric: tabular-nums; }
.rui .bar { display: flex; gap: 2px; height: 22px; margin-top: 8px; touch-action: none; cursor: pointer; }
.rui .bar i { flex: 1; background: var(--sunken); }
.rui .bar i.done { background: #5a3431; }
.rui .bar i.cur { background: var(--accent); }
.rui .mats { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.rui .mats li { display: flex; align-items: center; gap: 6px; font-size: .92rem; }
.rui .mats canvas.icon { width: 22px; height: 22px; }
.rui .mats b { font: 600 .85rem var(--mono); }
.rui .list { overflow-y: auto; padding: 6px 8px 12px; overscroll-behavior: contain; }
.rui .list h2 { font: 600 .72rem var(--mono); letter-spacing: .05em; color: var(--muted); margin: 12px 8px 4px; padding-bottom: 4px; border-bottom: 1px solid var(--line); text-transform: uppercase; }
.rui .list button { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); gap: 6px; width: 100%; text-align: left; font: 400 1rem var(--body); color: var(--fg);
  background: transparent; border: 0; border-left: 4px solid transparent; padding: 10px 8px 10px 4px; }
.rui .list button .n { font: 600 .85rem var(--mono); color: var(--muted); text-align: right; padding-top: 2px; }
.rui .list button[aria-current="step"] { background: var(--surface); border-left-color: var(--accent); font-weight: 700; }
.rui .pad { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0)); border-top: 2px solid var(--fg); }
.rui .pad button { font: 800 1.35rem var(--display); min-height: 84px; touch-action: manipulation; user-select: none; }
@media (orientation: landscape) and (max-height: 560px) {
  .rui { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
  .rui header { grid-column: 1 / -1; padding-block: 6px; }
  .rui .list { grid-column: 1; grid-row: 2 / 4; border-right: 1px solid var(--line); }
  .rui .now { grid-column: 2; grid-row: 2; overflow-y: auto; border-bottom: 0; }
  .rui .pad { grid-column: 2; grid-row: 3; }
  .rui .pad button { min-height: 64px; }
}
.num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); font: 700 .8rem var(--mono); flex: none; }
/* lenti: colonna a destra dentro la scena (su telefono una riga sotto il modello) */
.now { padding: 14px 16px; border-top: 2px solid var(--fg); display: grid; gap: 6px; }
.now .phase { font: 600 .78rem var(--mono); letter-spacing: .04em; color: var(--muted); }
.now h3 { font: 700 1.5rem var(--display); }
.now .tip { font-size: .93rem; color: var(--muted); }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-top: 2px solid var(--fg); }
.controls .count { margin-right: auto; font: 600 .85rem var(--mono); font-variant-numeric: tabular-nums; }
button { font: 700 .95rem var(--body); color: var(--fg); background: var(--bg); border: 2px solid var(--fg); padding: 7px 13px; cursor: pointer; }
button:hover { background: var(--fg); color: var(--bg); }
button.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
button:disabled { opacity: .4; cursor: default; }
.index { display: grid; gap: 14px; max-height: calc(100vh - 24px); overflow-y: auto; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 10px); padding-right: 6px; }
.index h3 { font: 600 .78rem var(--mono); letter-spacing: .04em; color: var(--muted); padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.index ol { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 1px; }
.step { width: 100%; text-align: left; font: 400 .95rem var(--body); display: grid; grid-template-columns: 2em minmax(0, 1fr); gap: 4px; padding: 5px 8px 5px 4px; background: transparent; border: 0; border-left: 4px solid transparent; }
.step .n { font: 600 .82rem var(--mono); color: var(--muted); text-align: right; padding-top: 2px; font-variant-numeric: tabular-nums; }
.step:hover { background: var(--surface); color: var(--fg); }
.step[aria-current="step"] { background: var(--surface); border-left-color: var(--accent); font-weight: 700; }
.step[aria-current="step"] .n { color: var(--accent); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.two ul { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.credits { border-top: 2px solid var(--fg); padding-top: 18px; display: grid; gap: 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.card { display: grid; gap: 8px; padding: 18px; background: var(--surface); border: 2px solid var(--fg); color: var(--fg); text-decoration: none; }
a.card:hover { background: var(--fg); color: var(--bg); }
.card.off { border-style: dashed; border-color: var(--line); color: var(--muted); }
.card h3 { font: 700 1.5rem var(--display); }
img.cover { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; background: #bfe0fb; }
.card { padding-top: 0; overflow: hidden; }
.card img.cover { width: calc(100% + 36px); max-width: none; margin: 0 -18px 6px; border-bottom: 2px solid var(--fg); transition: transform .25s; }
a.card:hover img.cover { transform: scale(1.04); }
.hero.herofarm { max-width: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; gap: 32px; }
.herotext { display: grid; gap: 14px; }
.herotext > p { font-size: 1.15rem; }
.herofarm img.cover { border: 2px solid var(--fg); }
/* abbellimento: anteprima dell'edificio che ingloba la farm, dalla pagina della farm */
.bello { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px; background: var(--surface); border: 2px solid var(--fg); color: var(--fg); text-decoration: none; }
.bello img { width: 132px; height: auto; aspect-ratio: 16 / 10; display: block; border: 2px solid var(--fg); background: #bfe0fb; }
.bello b { font: 700 1.15rem var(--display); display: block; }
.bello span { display: block; font-size: .92rem; color: var(--muted); }
.bello .go { margin-top: 6px; font: 700 .9rem var(--body); color: var(--accent); }
a.bello:hover { background: var(--fg); color: var(--bg); }
a.bello:hover span, a.bello:hover .go { color: var(--bg); }
.back { font: 600 .9rem var(--mono); color: var(--accent); }
/* Jersey 10 ha un solo peso: il grassetto finto impastava le lettere, si usa il normale un po' più grande */
h1, h2, .brand, .now h3, .card h3, .bello b { font-weight: 400; letter-spacing: .01em; }
h1 { font-size: clamp(2.8rem, 8vw, 5rem); }
h2 { font-size: 2.2rem; }
.brand { font-size: 1.8rem; }
.now h3, .card h3 { font-size: 1.75rem; }
.bello b { font-size: 1.35rem; }
/* home (15/11 sera): filtri per tipo di farm e ordinamento */
.homebar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; }
.homebar label { display: flex; align-items: center; gap: 8px; font: 600 .9rem var(--body); }
select { font: 600 .92rem var(--body); color: var(--fg); background: var(--surface); border: 2px solid var(--fg); padding: 6px 8px; max-width: 100%; }
.card .stats { font: 600 .78rem var(--mono); color: var(--muted); letter-spacing: .02em; }
a.card:hover .stats { color: var(--bg); }
.cards .none { color: var(--muted); }
/* materiali in un riquadro apribile, con il tasto per andare alla costruzione */
.matbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.matbox { border: 2px solid var(--fg); background: var(--surface); }
.matbox > summary { cursor: pointer; padding: 12px 14px; font: 700 1rem var(--body); list-style-position: inside; }
.matbox[open] > summary { border-bottom: 1px solid var(--line); }
.matbox > .inner { display: grid; gap: 12px; padding: 12px 14px 4px; }
.materials .raw { font: 500 .78rem var(--mono); color: var(--muted); margin-left: auto; padding-left: 8px; white-space: nowrap; }
/* indice dei passaggi a tendina, accanto a "Passaggio N di M": solo quando l'indice finisce sotto il modello */
#stepSel { display: none; }
.count .short { display: none; }
@media (max-width: 520px) {
  .count .long { display: none; }
  .count .short { display: inline; }
  .controls { gap: 6px; }
  .controls button { padding: 7px 10px; }
}
@media (max-width: 980px) {
  #stepSel { display: block; flex: 1 1 100%; order: -1; }
}
@media (max-width: 700px) {
  /* menu su una riga sola che scorre di lato */
  header.site { display: grid; gap: 6px; padding-block: 10px; }
  header.site nav { flex-wrap: nowrap; overflow-x: auto; gap: 16px; padding-bottom: 6px; scrollbar-width: thin; }
  header.site nav a { flex: none; white-space: nowrap; }
  .draft { font-size: .82rem; padding: 6px 10px; }
}
@media (max-width: 980px) {
  .build, .two, .hero.herofarm { grid-template-columns: minmax(0, 1fr); }
  .viewer, .index { position: static; max-height: none; overflow: visible; }
  canvas#model { height: 46vh; min-height: 280px; }
  .sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet > div:nth-child(2) { border-right: 0; }
  .sheet > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* ===== 17/11/2026: stile "Notte" (proposta B). Sopra resta la struttura, qui l'aspetto. ===== */
body { margin: 0; padding: 0 0 56px; font: 16.5px/1.6 var(--body); }
.wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.page { display: grid; gap: 32px; }
a { color: var(--glow); }
h1, h2, .brand, .now h3, .card h3, .bello b { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1; }
h2 { font-size: clamp(1.6rem, 3vw, 2rem); }
.now h3 { font-size: 1.5rem; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); }
header.site { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 15; background: rgba(11,15,20,.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,.07); padding-block: 0; }
header.site .bar { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; gap: 10px 28px; padding-block: 14px; flex-wrap: wrap; }
.brand { font-size: 1.45rem; color: var(--fg); text-decoration: none; }
.brand span { color: var(--glow); }
/* 28/11/2026: logo BlokWay (proposta 2A), la k nel blocco d'erba */
.brand { display: inline-flex; align-items: center; letter-spacing: -.03em; }
.brand .bk { color: #fff; border-radius: .2em; padding: 0 .13em; margin: 0 .05em; line-height: 1.05; background: linear-gradient(#6ee08a 0 30%, #3fb65b 30% 36%, #8a5a35 36%); text-shadow: 0 .06em 0 rgba(0,0,0,.35); }
.brand .bw { color: var(--muted); font-weight: 500; }
header.site nav { display: flex; gap: 22px; flex-wrap: wrap; }
header.site nav a { color: var(--muted); font-weight: 600; text-decoration: none; padding-block: 4px; border-bottom: 2px solid transparent; }
header.site nav a:hover { color: var(--fg); }
header.site nav a.on { color: var(--fg); border-color: var(--c, var(--glow)); }
[data-c=farm] { --c: var(--farm); } [data-c=edi] { --c: var(--edi); } [data-c=arr] { --c: var(--arr); } [data-c=mer] { --c: var(--mer); } [data-c=info] { --c: var(--glow); }
.draft { max-width: 1320px; margin: 14px auto 0; width: calc(100% - 2 * max(16px, env(safe-area-inset-left, 0px))); border-radius: 10px; border: 1px solid #4a3f17; }
main.wrap { max-width: 1320px; }
/* bottoni e campi */
button, select { border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
button:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
button.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
button.primary:hover { background: #fff; }
button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.cattools input { border: 1px solid var(--line); border-radius: 10px; }
.cattools { background: rgba(11,15,20,.92); top: calc(env(safe-area-inset-top, 0px) + 62px); }
.chips button { border-radius: 99px; padding: 6px 14px; }
.chips button[aria-pressed="true"] { background: var(--c, var(--fg)); border-color: var(--c, var(--fg)); color: #0b0f14; }
/* home: foto grande */
.bhero { position: relative; min-height: 620px; display: flex; align-items: end; overflow: hidden; }
.bhero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; animation: drift 24s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.03); } to { transform: scale(1.11) translateX(-2%); } }
.bhero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,15,20,.93) 0%, rgba(11,15,20,.55) 45%, rgba(11,15,20,0) 75%), linear-gradient(0deg, var(--bg) 0%, rgba(11,15,20,0) 38%); }
.bhero .wrap { position: relative; z-index: 1; width: 100%; padding-block: 60px 70px; display: grid; gap: 0; }
.kicker { display: inline-flex; gap: 10px; align-items: center; font: 600 .8rem var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--c, var(--farm)); }
.kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; }
.bhero h1 { font-size: clamp(2.8rem, 7vw, 5.6rem); line-height: .95; letter-spacing: -.035em; margin: 16px 0 18px; max-width: 13ch; }
.bhero p { font-size: 1.15rem; color: #c9d3dc; max-width: 50ch; margin: 0 0 26px; }
.facts { display: flex; gap: 28px; margin-bottom: 30px; flex-wrap: wrap; }
.facts div { border-left: 2px solid var(--c, var(--farm)); padding-left: 12px; }
.facts b { font: 800 1.6rem var(--display); display: block; font-variant-numeric: tabular-nums; }
.facts span { font-size: .85rem; color: var(--muted); }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { font: 600 1rem var(--body); padding: 13px 24px; border-radius: 99px; background: var(--fg); color: var(--bg); text-decoration: none; transition: transform .15s; }
.btn.ghost { background: rgba(255,255,255,.1); color: var(--fg); backdrop-filter: blur(8px); }
.btn:hover { transform: scale(1.04); }
/* file che scorrono */
.shelf { display: grid; gap: 14px; }
.shelf .head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.shelf h2 i { font-style: normal; color: var(--c); }
.shelf .head a { color: var(--muted); font-weight: 600; margin-left: auto; text-decoration: none; }
.shelf .head a:hover { color: var(--fg); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 23%); gap: 14px; overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.rail > * { scroll-snap-align: start; }
/* schede con la foto (home, elenchi) */
.cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.card, .card.tile { position: relative; display: block; padding: 0; border: 0; border-radius: var(--r); overflow: hidden; background: var(--surface); color: var(--fg); text-decoration: none; transition: transform .25s, box-shadow .25s; }
a.card:hover { background: var(--surface); color: var(--fg); transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.5), 0 0 0 2px var(--c, var(--glow)); }
.card img.cover { width: 100%; margin: 0; border: 0; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .5s; }
a.card:hover img.cover { transform: scale(1.06); }
.card .cap { position: absolute; inset: auto 0 0 0; padding: 48px 14px 12px; background: linear-gradient(0deg, rgba(0,0,0,.9), rgba(0,0,0,0)); display: grid; gap: 2px; }
.card h3 { font-size: 1.2rem; letter-spacing: -.01em; color: #fff; }
.card .y { font-size: .9rem; color: var(--c, var(--farm)); font-weight: 600; font-variant-numeric: tabular-nums; }
.card .stats { font: 500 .7rem var(--mono); color: #b9c4ce; letter-spacing: .02em; }
a.card:hover .stats { color: #b9c4ce; }
.card .badge { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.2); font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 99px; color: #fff; }
.card .desc { display: none; }
/* due riquadri grandi */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.big { position: relative; border-radius: 18px; overflow: hidden; min-height: 340px; display: flex; align-items: end; text-decoration: none; color: var(--fg); }
.big img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.big:hover img { transform: scale(1.05); }
.big::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.85), rgba(0,0,0,0) 60%); }
.big div { position: relative; z-index: 1; padding: 26px; }
.big small { font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: .75rem; color: var(--c); }
.big h3 { font: 800 2.4rem/1 var(--display); letter-spacing: -.03em; margin: 6px 0; }
.big p { color: #c9d3dc; max-width: 40ch; }
/* 22/11: .big dei riquadri della home finiva anche sulla casella del risultato nelle ricette (.slot.big), alta 340 px */
.slot.big { min-height: 0; border-radius: 0; overflow: visible; display: grid; place-items: center; align-items: center; }
.slot.big::after { content: none; }
.tools3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tools3 a { display: grid; gap: 6px; padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--fg); text-decoration: none; transition: border-color .2s; }
.tools3 a:hover { border-color: var(--glow); }
.tools3 b { font: 800 1.3rem var(--display); }
.tools3 span { color: var(--muted); font-size: .95rem; }
/* testata delle pagine di sezione */
.pagehead { position: relative; overflow: hidden; padding-block: 90px 34px; }
.pagehead > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.pagehead::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg), rgba(11,15,20,.35)); }
.pagehead .wrap { position: relative; z-index: 1; gap: 10px; }
.pagehead h1 i { font-style: normal; color: var(--c); }
.pagehead p { color: #c9d3dc; max-width: 60ch; font-size: 1.1rem; }
.listbar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; }
.listbar > .edirow { flex: 1; }   /* 25/11: conteggio a sinistra, ordinamento a destra come nelle altre tab */
.listbar label { display: flex; align-items: center; gap: 8px; font: 600 .9rem var(--body); color: var(--muted); }
.subh { font: 800 1.4rem var(--display); margin-top: 18px; }
/* 21/11: pagina Edifici con i tag (chip combinabili, conteggio, Azzera, Ordina) */
:root { --cover-ar-edi: 1 / 1; }   /* rapporto delle copertine degli edifici (22/11/2026: quadrate, ricetta A) */
.cards-edi img.cover, .card[data-c=edi] img.cover, .card[data-c=mer] img.cover, .card[data-c=arr] img.cover { aspect-ratio: var(--cover-ar-edi); }   /* 24/11: anche l'arredamento quadrato */
.edibar { display: grid; gap: 12px; min-width: 0; }
.edibar .chips { min-width: 0; }
.edibar .chips .sep { flex: none; width: 1px; align-self: stretch; margin: 3px 4px; background: var(--line); }
.edibar .chips button.zero { opacity: .45; }
.edirow { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; }
.edicount { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.edicount p { margin: 0; font: 600 .95rem var(--body); color: var(--muted); }
.edicount p b { color: var(--fg); font-variant-numeric: tabular-nums; }
.edicount button, .edinone button { font: 600 .85rem var(--body); padding: 6px 14px; border-radius: 99px; color: var(--fg); cursor: pointer; }
.edicount button:disabled { opacity: .4; cursor: default; }
.edicount button:disabled:hover { background: var(--surface); color: var(--fg); border-color: var(--line); }
.edirow label { display: flex; align-items: center; gap: 8px; font: 600 .9rem var(--body); color: var(--muted); }
.edinone { display: grid; justify-items: center; gap: 12px; padding: 34px 18px; border: 1px dashed var(--line); border-radius: var(--r); color: var(--muted); text-align: center; }
.edinone b { color: var(--fg); font: 800 1.3rem var(--display); }
.edinone[hidden], .cards-edi[hidden] { display: none; }
/* 22/11: filtri degli edifici nella testata, 4 colonne (tipologia, stile, ambientazione, dimensione) */
.pagehead.hasfilt { padding-block: 70px 24px; }
.edifilt { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr .8fr; gap: 14px 22px; margin-top: 8px; min-width: 0; }
.edicol { display: grid; gap: 8px; align-content: start; min-width: 0; }
.edicol h3 { font: 600 .74rem var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--c, var(--edi)); margin: 0; }
.edifilt .chips button { background: rgba(19,26,34,.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.edifilt .chips button[aria-pressed="true"] { background: var(--c, var(--fg)); }
.edifilt .chips button.zero { opacity: .45; }
/* 25/11 sera: filtri delle farm (versione, cosa produce, automazione) e riquadro "Questa farm produce" */
@media (min-width: 981px) { .edifilt[data-c="farm"] { grid-template-columns: 1.7fr 1.15fr 1fr; } }
.bcell.vno { visibility: hidden; pointer-events: none; }
.cattools .verctl { justify-self: start; }
.prodbox { display: grid; gap: 8px; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.prodbox h2 { font: 600 .74rem var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0; }
.prodbox ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.prodbox li { display: flex; align-items: center; gap: 8px; font: 600 .95rem var(--body); }
.prodbox p { margin: 0; color: var(--muted); font-size: .9rem; }
.prodbox .tipo { display: flex; flex-wrap: wrap; gap: 6px; }
.prodbox .tipo span { font: 600 .78rem var(--body); padding: 2px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
/* 22/11: modello 3D vero (WebGL) per gli edifici in prova */
#model3d { width: 100%; height: min(60vh, 540px); display: block; cursor: grab; touch-action: none; }
#model3d.dragging { cursor: grabbing; }
#model3d[hidden], #compass3d[hidden] { display: none; }
#compass3d { position: absolute; left: 6px; top: 6px; width: 76px; height: 76px; pointer-events: none; }
#label3d { position: absolute; left: 0; top: 0; pointer-events: none; }
#label3d[hidden] { display: none; }
@media (max-width: 980px) { #model3d { height: 46vh; min-height: 280px; } }
/* scheda dell'edificio: tag sotto la riga EDIFICIO · MEDIO, blocchi del passaggio sopra le fasi */
.herotags { display: flex; flex-wrap: wrap; gap: 6px; }
.herotags a { font: 600 .8rem var(--body); padding: 3px 11px; border-radius: 99px; border: 1px solid var(--edi); color: var(--edi); text-decoration: none; }
.herotags a:hover { background: var(--edi); color: #0b0f14; }
.needbox { display: grid; gap: 8px; padding-bottom: 6px; }
.need.side { border-top: 0; padding-top: 0; margin-top: 0; }
.need.side ul { flex-direction: column; gap: 7px; }
/* (i) accanto ai blocchi: al passaggio del mouse una scheda breve come quella della wiki; al clic la scheda intera */
.binfo { flex: none; display: inline-grid; place-items: center; width: 17px; height: 17px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); font: italic 700 .7rem/1 Georgia, serif; cursor: help; }
.binfo:hover, .binfo:focus-visible { background: var(--glow); border-color: var(--glow); color: #06121c; }
.bpop { position: fixed; z-index: 40; width: min(360px, calc(100vw - 24px)); max-height: min(70vh, 520px); overflow: auto; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--fg); box-shadow: 0 18px 40px rgba(0,0,0,.55); display: grid; gap: 8px; font-size: .9rem; }
.bpop[hidden] { display: none; }
.bpop .bp-h { display: flex; align-items: center; gap: 10px; }
.bpop .bp-h b { font: 700 1rem var(--body); display: block; }
.bpop .bp-h small { font: 500 .72rem var(--mono); color: var(--muted); }
.bpop h4 { margin: 4px 0 0; font: 700 .7rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.bpop p { margin: 0; line-height: 1.4; }
.bpop .rec { margin: 0; padding: 10px; }
.bpop .rec .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bpop .slot { display: grid; place-items: center; align-self: center; flex: none; width: 40px; height: 40px; }
.bpop .slot.big { width: 50px; height: 50px; }
.bpop .cgrid { grid-template-columns: repeat(3, 40px); grid-template-rows: repeat(3, 40px); }
.bpop .more { font-size: .8rem; color: var(--muted); }
/* ordinamento: campo + verso (edifici e farm) */
.sortctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sortctl label { display: flex; align-items: center; gap: 8px; font: 600 .9rem var(--body); color: var(--muted); }
/* 25/11: tasto quadrato con l'icona; in decrescente l'icona si ribalta */
.sortdir { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 10px; color: var(--fg); cursor: pointer; }
.sortdir svg { transition: transform .2s; }
.sortdir.giu svg { transform: scaleY(-1); }
.sortdir[hidden] { display: none; }
@media (max-width: 980px) { .edifilt { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .edifilt { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .pagehead.hasfilt { padding-block: 40px 16px; }
}
/* pagina della farm */
.hero.herofarm { padding-top: 26px; }
.herofarm img.cover { border: 0; border-radius: 18px; box-shadow: 0 30px 60px rgba(0,0,0,.45); }
/* 26/11/2026: scheda aperta "scheda tecnica" (mockup 2 scelto dall'utente). La copertina a sinistra resta nelle sue
   proporzioni (quadrata per edifici e arredi, 16:10 per le farm): mai stirata, mai tagliata. A destra un pannello con
   titolo, tag, numeri e pulsanti. Niente overflow:hidden sul pannello: il riquadro delle rese per versione deve uscire. */
.hero.herofarm { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; align-items: stretch; margin-top: 26px; padding-top: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 60px rgba(0,0,0,.35); }
.herofarm #heroCover { order: -1; align-self: center; width: 100%; height: auto; aspect-ratio: auto; object-fit: contain;
  border: 0; border-right: 1px solid var(--line); border-radius: 17px 0 0 17px; box-shadow: none; background: #bfe0fb; }
.herofarm .herotext { padding: 28px; align-content: start; gap: 16px; }
.herofarm .herotext h1 { font-size: clamp(2.2rem, 4vw, 3.6rem); line-height: 1.02; }
.herofarm .sheet { margin: 0; }
.herofarm .sheet > div { padding: 10px 12px; }
.herofarm .sheet b { font-size: 1.3rem; }
.heroact { display: flex; flex-wrap: wrap; gap: 10px; }
/* 27/11: farm da costruire in un posto preciso (chunk di slime, fortezza, monumento...): cartellino sulla copertina,
   stile delle scritte nel 3D (mockup A). Testi in FARMDATA[id].posto, scritti da scritte3d.py. ATTENZIONE traduzioni */
.herofarm .covwrap { order: -1; align-self: center; position: relative; min-width: 0; }
.covwrap .posto { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px);
  display: grid; gap: 3px; padding: 10px 18px; text-align: center; background: rgba(13,18,24,.93); color: #fff;
  border: 2px solid var(--accent); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.5); cursor: pointer; font: inherit; }
.covwrap .posto:hover { background: rgba(13,18,24,.98); color: #fff; border-color: #fff; }
.covwrap .posto b { font: 800 1.2rem/1.2 var(--display); }
.covwrap .posto b::before { content: "📍 "; }
.covwrap .posto span { font: 500 .88rem/1.35 var(--body); color: #c9d3dc; }
@media (max-width: 520px) { .covwrap .posto { top: 10px; padding: 7px 12px; } .covwrap .posto b { font-size: 1rem; } .covwrap .posto span { font-size: .8rem; } }
.heroextra { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.heroextra:not(:has(> :not([hidden]))) { display: none; }
.bello img { aspect-ratio: auto; height: auto; object-fit: contain; }
@media (max-width: 980px) {
  .hero.herofarm { grid-template-columns: minmax(0, 1fr); }
  .herofarm #heroCover { border-right: 0; border-bottom: 1px solid var(--line); border-radius: 17px 17px 0 0; }
  .herofarm .herotext { padding: 20px 16px; }
}
.back { color: var(--glow); text-decoration: none; }
.sheet { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.sheet b { font-family: var(--display); font-weight: 800; color: var(--farm); }
/* 25/11: riquadro "misurato da noi" con il simbolo delle versioni e il riquadro delle rese */
.sheet { overflow: visible; }
.sheet > div.hasv { position: relative; }
.sheet .stop { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vbtn { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 8px; color: var(--muted); cursor: pointer; }
.vbtn, .vbtn:hover, .vbtn[aria-expanded="true"] { background: rgba(255,255,255,.04); }
.vbtn:hover, .vbtn[aria-expanded="true"] { color: var(--farm); border-color: var(--farm); }
.vpop { position: absolute; z-index: 30; left: 8px; top: 46px; width: min(440px, calc(100vw - 32px)); padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 18px 40px rgba(0,0,0,.55); display: grid; gap: 8px; }
.vpop[hidden] { display: none; }
.sheet .vpop b.vtit { font: 700 .95rem var(--body); color: var(--fg); }
.vpop table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.vpop th, .vpop td { text-align: left; padding: 6px 8px 6px 0; border-top: 1px solid var(--line); vertical-align: top; }
.vpop th { font: 600 .8rem var(--mono); color: var(--muted); white-space: nowrap; }
.vpop td.vn { font: 800 1rem var(--display); color: var(--farm); white-space: nowrap; }
.vpop p { margin: 0; font-size: .82rem; }
.bello { border: 1px solid var(--line); border-radius: var(--r); }
.bello img { border: 0; border-radius: 8px; }
a.bello:hover { background: var(--sunken); color: var(--fg); border-color: var(--farm); }
a.bello:hover span { color: var(--muted); } a.bello:hover .go { color: var(--farm); }
.bello .go { color: var(--farm); }
.matbox { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
/* 26/11: il tasto della lista era troppo nascosto (l'utente ha scelto il mockup C): barra grande colorata, lista sempre chiusa all'inizio */
.matbox { border-color: var(--accent); }
.matbox > summary { list-style: none; display: flex; align-items: center; gap: 12px; font-size: 1.15rem; font-weight: 800; padding: 18px 20px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 28%, transparent), color-mix(in srgb, var(--accent) 8%, transparent)); }
.matbox > summary::-webkit-details-marker { display: none; }
.matbox > summary::before { content: '📋'; font-size: 1.4rem; }
.matbox > summary::after { content: 'Apri ▾'; margin-left: auto; flex: none; font-size: .95rem; padding: 8px 14px; border-radius: 999px; background: var(--accent); color: #111; }
.matbox[open] > summary::after { content: 'Chiudi ▴'; }
.matbox > summary:hover::after { filter: brightness(1.1); }
@media (max-width: 560px) { .matbox > summary { font-size: 1rem; padding: 14px; } }
.viewer { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; top: calc(env(safe-area-inset-top, 0px) + 72px); }
.now, .controls { border-top: 1px solid var(--line); }
.index { top: calc(env(safe-area-inset-top, 0px) + 72px); max-height: calc(100vh - 90px); }
.step { border-radius: 0 8px 8px 0; }
.step:hover { background: var(--surface); color: var(--fg); }
.credits { border-top: 1px solid var(--line); }
.cmdlist, .ftable, .btile { border-radius: 10px; }
.bscheda { border: 1px solid var(--line); border-radius: 16px; }
.bs-head { border-bottom: 1px solid var(--line); }
#costruzione, #viewer, #metodo { scroll-margin-top: 80px; }
.homefoot { border-top: 1px solid var(--line); padding-block: 28px 0; color: var(--muted); font-size: .9rem; }
.sitefoot { margin-top: 40px; padding-block: 24px 36px; }
/* 26/11: su telefono il menu sta tutto in una riga (prima "Redstone" restava tagliato) e il testo della home si legge su tutta la foto */
@media (max-width: 440px) {
  header.site nav { gap: 12px; }
  header.site nav a { font-size: .86rem; }
}
@media (max-width: 700px) {
  .bhero::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(11,15,20,.72) 55%, rgba(11,15,20,.45) 100%); }
}
@media (max-width: 980px) {
  .duo, .tools3 { grid-template-columns: 1fr; }
  .rail { grid-auto-columns: 78%; }
  .bhero { min-height: 540px; }
  .viewer, .index { top: auto; }
}
@media (max-width: 700px) {
  header.site .bar { display: grid; gap: 6px; padding-block: 10px; }
  header.site nav { flex-wrap: nowrap; overflow-x: auto; gap: 18px; padding-bottom: 4px; }
  header.site nav a { flex: none; white-space: nowrap; }
  .cattools { top: calc(env(safe-area-inset-top, 0px) + 84px); }
}
/* 21/11/2026: Wiki (Blocchi, Comandi, Mob) con il menu a sinistra, come la guida alla redstone; su telefono a scomparsa */
[data-c=wiki] { --c: var(--glow); }
.wikilay { width: 100%; max-width: 1320px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0 24px; align-items: start; }
.wikilay > main.wrap { grid-column: 2; grid-row: 1; padding-top: 30px; }
.lnav { grid-column: 1; grid-row: 1; position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--hh, 62px) + 24px); margin-top: 34px; display: grid; gap: 10px; }
.lnav-t { font: 600 .74rem var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--glow); padding-left: 12px; }
.tabs { display: grid; gap: 2px; }
.tabs a { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 700; font-size: .97rem; line-height: 1.25; text-decoration: none; padding: 9px 12px; border-radius: 10px; border-left: 3px solid transparent; }
.tabs a b { flex: none; font: 600 .72rem var(--mono); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--sunken); color: var(--muted); }
.tabs a:hover { color: var(--fg); background: var(--surface); }
.tabs a[aria-current="page"] { color: var(--fg); background: var(--surface); border-left-color: var(--glow); }
.tabs a[aria-current="page"] b { background: var(--glow); color: #06121c; }
.lbtn, .lshade { display: none; }
@media (max-width: 900px) {
  .wikilay { grid-template-columns: minmax(0, 1fr); padding-left: 0; }
  .wikilay > main.wrap { grid-column: 1; grid-row: auto; padding-top: 14px; }
  .lbtn { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--hh, 62px)); z-index: 12; display: flex; align-items: center; gap: 10px; width: 100%; margin: 0; padding: 10px max(16px, env(safe-area-inset-left, 0px)); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: rgba(19,26,34,.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--fg); font: 600 1rem var(--body); text-align: left; cursor: pointer; }
  .lbtn:hover { background: var(--surface); color: var(--fg); border-color: var(--line); }
  .lbtn > span:nth-child(2) { color: var(--muted); }
  .lbtn b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .burger, .burger::before, .burger::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--glow); }
  .burger { position: relative; flex: none; }
  .burger::before, .burger::after { content: ""; position: absolute; left: 0; }
  .burger::before { top: -6px; } .burger::after { top: 6px; }
  .wikilay .cattools { top: calc(env(safe-area-inset-top, 0px) + var(--hh, 62px) + var(--lbh, 45px)); }
  .lshade { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.55); }
  .lshade[hidden] { display: none !important; }
  .lnav { position: fixed; z-index: 31; top: 0; bottom: 0; left: 0; width: min(300px, 84vw); margin: 0; padding: calc(env(safe-area-inset-top, 0px) + 18px) 12px 24px max(12px, env(safe-area-inset-left, 0px)); align-content: start; background: var(--bg); border-right: 1px solid var(--line); box-shadow: 20px 0 50px rgba(0,0,0,.5); transform: translateX(-105%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s; }
  .lnav.open { transform: none; visibility: visible; transition: transform .22s ease; }
  .tabs a { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) { .lnav, .lnav.open { transition: none; } }
/* 26/11/2026: Wiki > Stendardi (mockup A: costruttore in cima + guida a schede). Classi tutte con prefisso st- */
#view-stendardi .st-bn { image-rendering: pixelated; display: block; width: 40px; height: 80px; }
#view-stendardi .st-bn.st-big { width: 160px; height: 320px; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
#view-stendardi .st-bn.st-sm { width: 34px; height: 68px; }
#view-stendardi .st-bn.st-xs { width: 18px; height: 36px; flex: none; }
#view-stendardi .st-bn.st-sh { width: 60px; height: 110px; }
#view-stendardi .st-bn.st-shs { width: 30px; height: 55px; }
.st-pole { width: 176px; height: 10px; background: #6b4d2b; border-radius: 3px; box-shadow: inset 0 -3px 0 #4a341c; margin-bottom: -2px; position: relative; z-index: 1; }
.st-stage { display: grid; justify-items: center; padding: 26px 20px 30px; background: radial-gradient(circle at 50% 30%, #1f2b38, #10161d 70%); border-radius: var(--r); border: 1px solid var(--line); }
.st-shield { display: flex; align-items: center; gap: 12px; }
.st-shield small { color: var(--muted); font-size: .85rem; }
.st-bld { display: grid; grid-template-columns: 230px minmax(0, 1fr) 300px; gap: 20px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.st-prev { display: grid; gap: 12px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--hh, 62px) + 16px); }
.st-count { font-size: .95rem; color: var(--muted); } .st-count b { color: var(--fg); font: 700 1.2rem var(--mono); }
.st-warn { color: var(--warn-fg); }
.st-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.st-acts button, .st-cmd button { border: 1px solid var(--line); background: var(--sunken); color: var(--fg); border-radius: 99px; padding: 5px 12px; font: 600 .86rem var(--body); cursor: pointer; }
.st-acts button:hover, .st-cmd button:hover { border-color: var(--glow); }
.st-ctl { display: grid; gap: 10px; min-width: 0; }
.st-step { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.st-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--glow); color: #06121c; font: 700 .85rem var(--mono); }
.st-step b { display: block; } .st-step small { color: var(--muted); font-size: .84rem; }
.st-sw { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 5px; max-width: 560px; }
.st-sw button { aspect-ratio: 1; border-radius: 7px; border: 2px solid rgba(255,255,255,.08); background: var(--sw); cursor: pointer; padding: 0; min-width: 0; }
.st-sw button[aria-pressed="true"] { outline: 3px solid var(--fg); outline-offset: 2px; }
.st-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.st-pgrid.st-off { opacity: .35; pointer-events: none; }
.st-pgrid button { position: relative; display: grid; justify-items: center; gap: 4px; padding: 8px 4px 6px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 10px; cursor: pointer; font: inherit; }
.st-pgrid button:hover { border-color: var(--glow); background: var(--sunken); }
.st-pgrid small { font-size: .7rem; line-height: 1.15; color: var(--muted); text-align: center; }
.st-pi { position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; image-rendering: pixelated; }
.st-rec { display: grid; gap: 10px; min-width: 0; }
.st-rec h3 { font: 700 1.15rem var(--display); }
.st-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.st-steps li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.st-steps li > div { flex: 1; min-width: 0; } .st-steps b { display: block; font-size: .94rem; } .st-steps small { color: var(--muted); font-size: .8rem; line-height: 1.3; display: block; }
.st-lia { display: flex; gap: 4px; } .st-lia button { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--line); background: var(--sunken); color: var(--fg); cursor: pointer; padding: 0; }
.st-lia button:disabled { opacity: .3; cursor: default; }
.st-cmd { display: flex; gap: 8px; align-items: flex-start; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.st-cmd code { flex: 1; font: .76rem/1.4 var(--mono); overflow-wrap: anywhere; color: var(--glow); }
.st-note { color: var(--muted); font-size: .85rem; }
.st-h2 { margin-top: 8px; }
.st-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.st-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 10px; align-content: start; scroll-margin-top: calc(var(--hh, 62px) + 20px); }
.st-card h3 { font: 700 1.2rem var(--display); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.st-k { font: 600 .7rem var(--mono); color: var(--glow); border: 1px solid var(--glow); border-radius: 99px; padding: 1px 8px; }
.st-card p, .st-card li { font-size: .95rem; }
.st-card ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; }
.st-ex { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.st-ex figure { flex: none; margin: 0; display: grid; justify-items: center; gap: 4px; }
.st-ex canvas, .st-pgrid canvas, .st-steps canvas { outline: 1px solid rgba(255,255,255,.12); }
.st-ex figcaption { font-size: .74rem; color: var(--muted); text-align: center; max-width: 84px; }
.st-arrow { color: var(--muted); font-size: 1rem; padding-bottom: 30px; }
.st-grid3 { display: inline-grid; grid-template-columns: repeat(3, 30px); gap: 3px; }
.st-grid3 span { width: 30px; height: 30px; border-radius: 4px; background: var(--sunken); border: 1px solid var(--line); display: grid; place-items: center; font: 600 .6rem var(--mono); color: var(--muted); }
.st-grid3 .st-w { background: #e9ecec; } .st-grid3 .st-s { background: #6b4d2b; }
.st-vtab { width: 100%; border-collapse: collapse; font-size: .92rem; }
.st-vtab th, .st-vtab td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.st-vtab th { font: 600 .72rem var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.st-vtab td:first-child { font: 600 .85rem var(--mono); white-space: nowrap; color: var(--glow); }
.st-items { display: grid; gap: 6px; }
.st-items > div { display: flex; gap: 10px; align-items: center; padding: 6px 8px; background: var(--bg); border-radius: 8px; border: 1px solid var(--line); }
.st-items img { width: 28px; height: 28px; image-rendering: pixelated; flex: none; }
.st-items b { font-size: .9rem; display: block; } .st-items small { font-size: .8rem; color: var(--muted); }
.st-tag { font: 600 .66rem var(--mono); padding: 1px 7px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); margin-left: auto; white-space: nowrap; }
.st-tag.st-ok { color: var(--farm); border-color: var(--farm); }
.st-fonti { font-size: .85rem; color: var(--muted); }
@media (max-width: 1180px) { .st-bld { grid-template-columns: 200px minmax(0, 1fr); } .st-rec { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  .st-bld { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .st-prev { position: static; justify-items: center; }
  #view-stendardi .st-bn.st-big { width: 100px; height: 200px; }
  .st-pole { width: 116px; }
  .st-stage { padding: 16px 40px 20px; }
  .st-sw { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .st-cards { grid-template-columns: minmax(0, 1fr); }
}
/* Wiki > Mob: griglia di schede e scheda del mob */
[data-t=ostile] { --t: #ff6b5e; } [data-t=neutrale] { --t: #ffb547; } [data-t=passivo] { --t: #6ee08a; } [data-t=boss] { --t: #c99bff; }
.mobgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mtile { display: grid; justify-items: center; align-content: start; gap: 3px; padding: 14px 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--fg); font: inherit; text-align: center; cursor: pointer; min-width: 0; }
.mtile:hover { background: var(--sunken); color: var(--fg); border-color: var(--t, var(--glow)); }
.mtile img { width: 72px; height: 72px; image-rendering: pixelated; margin-bottom: 4px; }
.mtile b { font: 700 .98rem/1.2 var(--body); overflow-wrap: anywhere; }
.mtile small { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; line-height: 1.2; }
.mtipo { display: inline-block; margin-top: 4px; font: 600 .68rem var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 99px; color: var(--t); border: 1px solid var(--t); }
.chips button .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--t); }
.mobnone { padding: 30px 18px; border: 1px dashed var(--line); border-radius: var(--r); color: var(--muted); text-align: center; }
.mscheda .bs-head img { width: 64px; height: 64px; image-rendering: pixelated; }
.mscheda .ms-en { color: var(--muted); font-size: .95rem; }
.mscheda .ms-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.mscheda .ms-top .mtipo { margin: 0; }
.mtab { width: 100%; border-collapse: collapse; font-size: .95rem; }
.mtab th, .mtab td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mtab th { font: 600 .74rem var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.mtab tbody th { font: 600 .9rem var(--body); text-transform: none; letter-spacing: 0; color: var(--muted); width: 38%; }
.mtab td.n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mtab tr:last-child > * { border-bottom: 0; }
.mtab .note { display: block; color: var(--muted); font-size: .84rem; }
.mbox { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); overflow-x: auto; }
.mdrop td:first-child { display: flex; align-items: center; gap: 8px; }
.mdrop .oi, .mdrop .bi, .mdrop .noi { width: 24px; height: 24px; flex: none; }
.mscheda section > * + * { margin-top: 10px; }
.mbio { display: grid; gap: 8px; }
.mbio p { font-size: .95rem; }
.mbio p b { font-variant-numeric: tabular-nums; }
.mbio h4 { margin: 6px 0 0; font: 700 .8rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mlist { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.mfarm { display: flex; flex-wrap: wrap; gap: 8px; }
.mfarm a { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--farm); color: var(--farm); text-decoration: none; font-weight: 600; font-size: .92rem; }
.mfarm a:hover { background: var(--farm); color: #0b0f14; }
.mfonti { font-size: .85rem; color: var(--muted); }
.mfonti summary { cursor: pointer; font-weight: 700; color: var(--glow); }
.mfonti dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 8px 0 0; }
.mfonti dt { font-weight: 600; color: var(--fg); }
.mfonti dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .mobgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mtab th, .mtab td { padding: 6px 7px; }
  .mtab { font-size: .88rem; }
}
@media (prefers-reduced-motion: reduce) { .bhero > img { animation: none; } .card, .card img.cover, .big img, .btn { transition: none; } }
/* 28/11/2026: tema "Terra ed erba" (prova B scelta dall'utente). Fondo terra scura, erba come la k del logo.
   I colori delle sezioni (farm, edifici, arredamento, mob) restano. */
:root {
  --bg: #15110d; --surface: #211a14; --sunken: #2b2219; --fg: #f5efe4; --muted: #b5a690; --line: #3a2e22;
  --accent: #6ee08a; --accent-fg: #10240f; --glow: #9be8ad;
  --erba: linear-gradient(#6ee08a 0 32%, #3fb65b 32% 40%, #8a5a35 40%);
}
header.site { background: rgba(28,23,18,.94); border-bottom: 0; }
header.site::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: linear-gradient(#6ee08a 0 60%, #3fb65b 60% 75%, #8a5a35 75%); pointer-events: none; }
header.site nav a.on { border-color: var(--c, #6ee08a); }
.cattools { background: rgba(21,17,13,.94); top: calc(env(safe-area-inset-top, 0px) + 72px); }
.bhero::after { background: linear-gradient(90deg, rgba(21,17,13,.94) 0%, rgba(21,17,13,.55) 45%, rgba(21,17,13,0) 75%), linear-gradient(0deg, var(--bg) 0%, rgba(21,17,13,0) 38%); }
.pagehead::after { background: linear-gradient(0deg, var(--bg), rgba(21,17,13,.35)); }
@media (max-width: 980px) { .bhero::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(21,17,13,.72) 55%, rgba(21,17,13,.45) 100%); } }
.bhero p, .big p, .pagehead p, .covwrap .posto span { color: #e8dcc8; }
.kicker::before { border-radius: 2px; }
.btn { border-radius: 8px; background: var(--erba); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.4); box-shadow: 0 3px 0 #4a2f1b; }
.btn.ghost { background: #2b2219; color: var(--fg); border: 1px solid #4a3a2a; text-shadow: none; box-shadow: none; }
.card, .card.tile { box-shadow: 0 4px 0 #0c0907; }
/* 29/11: tolta la striscia verde sopra le copertine (all'utente non piace) */
.card .badge { border-radius: 6px; }
.card .stats, a.card:hover .stats { color: #d3c6b0; }
.chips button { border-radius: 6px; }
.chips button[aria-pressed="true"] { color: #15110d; }
.edifilt .chips button { background: rgba(33,26,20,.85); }
.edicount button, .edinone button, .herotags a, .mfarm a { border-radius: 6px; }
.herotags a:hover, .mfarm a:hover { color: #15110d; }
.binfo:hover, .binfo:focus-visible, .tabs a[aria-current="page"] b, .st-n { color: #10240f; }
.lbtn { background: rgba(33,26,20,.95) !important; }
.st-stage { background: radial-gradient(circle at 50% 30%, #2e241a, #17120d 70%); }
.tools3 a { box-shadow: 0 4px 0 #0c0907; }
.tools3 a:hover { border-color: #6ee08a; }

/* sito online: il telecomando dal telefono usa la stanza di claude.ai, qui non c'è ancora */
#phoneBtn, #phoneOn { display: none !important; }
/* farm tolte dal sito (sito.json, escludi) */
a.card[data-id="trading"], a.card[data-id="trading_bello"] { display: none !important; }

/* sito online: piè di pagina con i link e pagine di testo (privacy, chi siamo) */
.sitefoot { gap: 10px; }
.sitefoot p { margin: 0; }
.footlinks { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footlinks a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.footlinks a:hover { color: var(--fg); }
main.wrap.testo { max-width: 1240px; gap: 34px; padding-top: 8px; }
.testo > * { max-width: 760px; }
.testo section { display: grid; gap: 12px; }
.testo h2 { font-size: 1.55rem; margin: 0; }
.testo h3 { font: 700 1.05rem var(--body); margin: 6px 0 0; }
.testo p, .testo ul { margin: 0; color: #d4dce3; }
.testo ul { padding-left: 1.2em; display: grid; gap: 8px; }
.testo a { color: var(--glow); }
.testo .agg { color: var(--muted); font-size: .9rem; }
.lingue { display: flex; flex-wrap: wrap; gap: 12px; }
