:root {
  --bg: #07060F; --bgTop: #140F33; --card: #15132A; --cardHi: #1D1A3A;
  --label: #fff; --sec: rgba(235,235,245,.6); --ter: rgba(235,235,245,.3); --sep: rgba(255,255,255,.08);
  --violet: #8B5CF6; --lilac: #A78BFA; --cyan: #22D3EE; --coral: #FB7185;
  --green: #34C46A; --red: #FB7185; --orange: #FF9F0A; --fill: rgba(118,118,128,.24);
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, sans-serif;
  color: var(--label); -webkit-font-smoothing: antialiased; min-height: 100vh;
  font-variant-numeric: tabular-nums; overscroll-behavior-y: none;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(420px 420px at 85% 0%, rgba(139,92,246,.35), transparent),
              radial-gradient(380px 380px at 0% 100%, rgba(34,211,238,.10), transparent), var(--bg);
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
.ic { display: block; flex: none; }
.hidden { display: none !important; }

/* ---------- Struttura ---------- */
.screen { max-width: 640px; margin: 0 auto; padding: calc(var(--safe-t) + 6px) 0 calc(var(--safe-b) + 96px); }
.nav { display: flex; justify-content: space-between; align-items: center; height: 44px; padding: 0 16px; color: var(--lilac); }
.nav button { height: 44px; min-width: 44px; display: flex; align-items: center; justify-content: center; color: var(--lilac); font-size: 17px; }
.nav .l { justify-content: flex-start; } .nav .r { justify-content: flex-end; }
h1.large { font-size: 34px; font-weight: 700; letter-spacing: -.5px; padding: 2px 16px 12px; }
.content { padding: 0 16px; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-around;
  padding: 7px 0 calc(var(--safe-b) + 4px); background: rgba(12,10,24,.86);
  backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); border-top: .5px solid rgba(255,255,255,.1);
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; font-weight: 500; color: #8E8E93; width: 70px; }
.tab.on { color: var(--lilac); }

/* ---------- Schede ---------- */
.card { background: linear-gradient(var(--cardHi), var(--card)); border: 1px solid rgba(255,255,255,.07); border-radius: 22px; padding: 16px; margin-bottom: 16px; }
.card > h3 { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.card > h3 .ic { color: var(--lilac); }
.card > h3 .more { margin-left: auto; font-weight: 400; font-size: 15px; color: var(--lilac); }
.empty { color: var(--sec); font-size: 15px; padding: 4px 0; }
.green { color: var(--green); } .red { color: var(--red); } .sec { color: var(--sec); } .ter { color: var(--ter); }

/* ---------- Hero / onda ---------- */
.hero { padding: 20px; border-radius: 28px; }
.hero .hl { font-size: 15px; font-weight: 500; color: rgba(255,255,255,.6); min-height: 20px; }
.hero .hv { font-size: 40px; font-weight: 700; letter-spacing: -1px; margin: 4px 0 8px; font-family: ui-rounded, -apple-system, Inter, sans-serif; }
.hero .hd { display: flex; gap: 10px; align-items: center; height: 24px; font-size: 12px; font-weight: 500; }
.dpill { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 12px; display: inline-flex; gap: 3px; align-items: center; }
.hero svg.wave { display: block; margin-top: 14px; touch-action: pan-y; overflow: visible; user-select: none; -webkit-user-select: none; }
.axis { display: flex; justify-content: space-between; font-size: 11px; color: rgba(255,255,255,.4); margin-top: 8px; }
.legend { display: flex; gap: 14px; margin-top: 14px; font-size: 12px; font-weight: 500; flex-wrap: wrap; }
.lg { display: inline-flex; gap: 6px; align-items: center; color: rgba(255,255,255,.55); }
.lg i { width: 7px; height: 7px; border-radius: 4px; display: inline-block; }
.lg b { color: #fff; font-weight: 500; }
.ranges { display: flex; gap: 6px; padding: 4px; background: rgba(255,255,255,.05); border-radius: 22px; margin-top: 16px; }
.ranges button { flex: 1; padding: 8px 0; border-radius: 18px; font-size: 15px; font-weight: 600; color: rgba(255,255,255,.5); transition: all .25s; }
.ranges button.on { background: rgba(139,92,246,.35); box-shadow: inset 0 0 0 1px rgba(167,139,250,.5); color: #fff; }

/* ---------- Barre ---------- */
.delta { margin-bottom: 16px; } .delta:last-child { margin-bottom: 0; }
.delta .top { display: flex; justify-content: space-between; align-items: baseline; }
.delta .ttl { font-size: 15px; color: var(--sec); }
.delta .pct { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 2px; }
.delta .amt { font-size: 20px; font-weight: 600; margin: 4px 0 6px; letter-spacing: -.3px; }
.dbar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.1); position: relative; }
.dbar .f { position: absolute; top: 0; bottom: 0; border-radius: 4px; transition: width .5s; }
.dbar .mid { position: absolute; left: 50%; top: -1px; bottom: -1px; width: 1.5px; background: rgba(255,255,255,.35); transform: translateX(-50%); }
.delta .vs { font-size: 11px; color: var(--ter); margin-top: 6px; }
.pbar { margin-bottom: 14px; } .pbar:last-child { margin-bottom: 0; }
.pbar .top { display: flex; justify-content: space-between; font-size: 15px; font-weight: 500; margin-bottom: 5px; gap: 8px; }
.pbar .top span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbar .top span:last-child { font-size: 12px; font-weight: 600; color: var(--sec); }
.pbar .track { height: 8px; border-radius: 4px; position: relative; overflow: hidden; }
.pbar .track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; transition: width .5s; }
.pbar .sub { font-size: 11px; color: var(--sec); margin-top: 5px; }
.pbar.c .top { font-size: 12px; font-weight: 400; margin-bottom: 3px; } .pbar.c .track { height: 5px; }

/* ---------- Righe ---------- */
.trow { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.trow .main { flex: 1; min-width: 0; }
.trow .ttl { font-size: 16px; }
.trow.done .ttl { text-decoration: line-through; color: var(--sec); }
.meta { font-size: 12px; color: var(--sec); display: flex; align-items: center; gap: 6px; margin-top: 2px; white-space: nowrap; overflow: hidden; }
.dot { width: 6px; height: 6px; border-radius: 3px; display: inline-block; flex: none; }
.chk { width: 26px; height: 26px; border-radius: 13px; border: 1.8px solid #636366; flex: none; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.chk.on { background: var(--green); border-color: var(--green); color: #fff; }
.erow { display: flex; gap: 12px; padding: 6px 0; align-items: stretch; }
.erow .time { width: 52px; text-align: center; font-size: 15px; font-weight: 600; flex: none; }
.erow .time small { display: block; font-size: 12px; font-weight: 400; color: var(--sec); margin-top: 2px; }
.erow .stripe { width: 3px; border-radius: 2px; background: var(--violet); flex: none; }
.erow .tt { font-size: 16px; }
.erow .loc { font-size: 12px; color: var(--sec); margin-top: 3px; display: flex; gap: 4px; align-items: center; }

/* ---------- Liste ---------- */
.list { background: var(--card); border-radius: 14px; overflow: hidden; margin-bottom: 22px; }
.sechead { font-size: 13px; color: var(--sec); text-transform: uppercase; padding: 0 16px 7px; letter-spacing: .1px; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 16px; position: relative; min-height: 48px; width: 100%; text-align: left; }
.li + .li::before { content: ""; position: absolute; top: 0; left: 62px; right: 0; height: .5px; background: var(--sep); }
.list.plain .li + .li::before { left: 16px; }
.li .main { flex: 1; min-width: 0; }
.li .n { font-size: 17px; }
.li .s { font-size: 12px; color: var(--sec); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .amt { font-size: 15px; font-weight: 600; white-space: nowrap; }
.li .chev { color: #5a5a60; }
.ico { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.seg { display: flex; background: var(--fill); border-radius: 9px; padding: 2px; margin-bottom: 18px; }
.seg button { flex: 1; text-align: center; font-size: 13px; font-weight: 500; padding: 7px 0; border-radius: 7px; transition: background .2s; }
.seg button.on { background: #636366; font-weight: 600; box-shadow: 0 3px 8px rgba(0,0,0,.25); }
.search { margin: 0 16px 14px; background: var(--fill); border-radius: 10px; height: 36px; display: flex; align-items: center; gap: 6px; padding: 0 8px; color: #8E8E93; }
.search input { background: none; border: 0; outline: 0; flex: 1; font-size: 17px; color: #fff; }
.monthhead { display: flex; justify-content: space-between; align-items: center; font-size: 17px; font-weight: 600; margin-bottom: 14px; }
.monthhead button { color: var(--lilac); padding: 4px; } .monthhead button:disabled { opacity: .3; }
.totals { display: flex; margin-bottom: 14px; }
.totals div { flex: 1; text-align: center; }
.totals small { display: block; font-size: 12px; color: var(--sec); }
.totals b { font-size: 15px; }

/* ---------- Calendario ---------- */
.cal { padding: 14px 12px 10px; }
.calhead { display: flex; justify-content: space-between; align-items: center; padding: 0 6px 12px; font-size: 17px; font-weight: 600; }
.calhead .arrows { display: flex; gap: 18px; color: var(--lilac); }
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; text-align: center; }
.calgrid .wd { font-size: 13px; font-weight: 600; color: var(--ter); padding-bottom: 4px; }
.calgrid .d { height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; font-size: 20px; }
.calgrid .d span { width: 42px; height: 42px; border-radius: 21px; display: flex; align-items: center; justify-content: center; }
.calgrid .d.today span { color: var(--lilac); font-weight: 600; }
.calgrid .d.sel span { background: var(--violet); color: #fff; font-weight: 600; }
.calgrid .d i { position: absolute; bottom: 1px; width: 5px; height: 5px; border-radius: 3px; background: var(--lilac); }

/* ---------- Progetti ---------- */
.prow { padding: 12px 16px; width: 100%; text-align: left; display: block; }
.prow + .prow { border-top: .5px solid var(--sep); }
.prow .hd { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.prow .hd .chev { margin-left: auto; color: #5a5a60; }
.prow .meta { margin-top: 8px; gap: 14px; }
.prow .meta span { display: flex; gap: 4px; align-items: center; }

/* ---------- Sheet ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.55); animation: fade .2s; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: calc(100vh - var(--safe-t) - 24px); overflow-y: auto;
  max-width: 640px; margin: 0 auto; border-radius: 14px 14px 0 0; padding-bottom: calc(var(--safe-b) + 24px);
  background: radial-gradient(420px 300px at 85% 0%, rgba(139,92,246,.25), transparent), #0B0A16;
  animation: up .32s cubic-bezier(.2,.9,.25,1); -webkit-overflow-scrolling: touch;
}
.sheet.full { top: calc(var(--safe-t) + 12px); }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } }
.sheetnav { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 10px; font-size: 17px; color: var(--lilac); background: rgba(11,10,22,.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.sheetnav b { color: #fff; font-weight: 600; }
.sheetnav button { color: var(--lilac); font-size: 17px; } .sheetnav button.save { font-weight: 600; } .sheetnav button:disabled { opacity: .35; }
.sheetbody { padding: 8px 16px 0; }
.big { font-size: 38px; font-weight: 700; letter-spacing: -.5px; padding: 12px 16px; background: none; border: 0; outline: 0; width: 100%; font-family: ui-rounded, -apple-system, Inter, sans-serif; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; }
.chip { height: 66px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 0 4px; text-align: center; transition: transform .1s; }
.chip:active { transform: scale(.96); }
.row { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; font-size: 17px; min-height: 48px; gap: 12px; }
.list .row + .row { border-top: .5px solid var(--sep); }
.row input:not([type=checkbox]):not([type=range]), .row select, .row textarea { background: var(--fill); border: 0; border-radius: 8px; padding: 7px 10px; outline: 0; max-width: 62%; text-align: right; color-scheme: dark; }
.row input.full.full, .row textarea.full.full { max-width: none; flex: 1; text-align: left; background: none; padding: 4px 0; border-radius: 0; }
.row input[type=range] { flex: 1; accent-color: var(--violet); }
.switch { appearance: none; -webkit-appearance: none; width: 51px; height: 31px; border-radius: 16px; background: var(--fill); position: relative; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 14px; background: #fff; transition: transform .2s; box-shadow: 0 2px 4px rgba(0,0,0,.3); }
.switch:checked { background: var(--green); } .switch:checked::after { transform: translateX(20px); }
.btn { width: 100%; height: 52px; border-radius: 26px; font-size: 17px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn.primary { background: linear-gradient(135deg, var(--violet), #6D28D9); box-shadow: 0 8px 24px rgba(139,92,246,.45), inset 0 0 0 1px rgba(255,255,255,.15); color: #fff; }
.btn.primary:disabled { opacity: .45; box-shadow: none; }
.btn.ghost { background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.btn.danger { color: var(--red); background: rgba(251,113,133,.1); }
.linkbtn { color: var(--lilac); font-size: 17px; padding: 12px 16px; width: 100%; text-align: left; display: flex; gap: 10px; align-items: center; }
.linkbtn.danger { color: var(--red); }
.colors { display: flex; gap: 10px; flex-wrap: wrap; padding: 12px 16px; }
.colors button { width: 28px; height: 28px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; }
.icons { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; padding: 12px; }
.icons button { height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.note { font-size: 13px; color: var(--sec); padding: 6px 16px 18px; line-height: 1.4; }
.steps { padding: 6px 16px 14px; counter-reset: s; }
.steps li { list-style: none; position: relative; padding: 6px 0 6px 32px; font-size: 15px; line-height: 1.4; counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 7px; width: 22px; height: 22px; border-radius: 11px; background: var(--violet); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.steps code, .codebox { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; background: rgba(255,255,255,.07); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.codebox { display: block; padding: 10px 12px; margin: 4px 16px 10px; line-height: 1.45; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: calc(var(--safe-t) + 60px) 24px 40px; max-width: 460px; margin: 0 auto; }
.logo-tile { width: 144px; height: 144px; border-radius: 34px; background: linear-gradient(135deg, var(--bgTop), var(--bg)); box-shadow: 0 10px 40px rgba(139,92,246,.55), inset 0 0 0 1px rgba(167,139,250,.25); display: flex; align-items: center; justify-content: center; }
.logo-tile img { width: 96px; }
.brand { font-size: 38px; font-weight: 700; letter-spacing: -.5px; margin-top: 22px; background: linear-gradient(#fff, var(--lilac)); -webkit-background-clip: text; background-clip: text; color: transparent; font-family: ui-rounded, -apple-system, Inter, sans-serif; }
.tagline { font-size: 15px; color: rgba(255,255,255,.6); margin-top: 6px; text-align: center; }
.pillseg { display: flex; gap: 4px; padding: 4px; background: rgba(255,255,255,.06); border-radius: 24px; width: 100%; margin-top: 30px; }
.pillseg button { flex: 1; padding: 10px; border-radius: 20px; font-size: 15px; font-weight: 600; color: rgba(255,255,255,.5); transition: all .2s; }
.pillseg button.on { background: rgba(139,92,246,.35); color: #fff; }
.field { width: 100%; height: 54px; border-radius: 16px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); margin-top: 12px; display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.field .ic { color: var(--lilac); }
.field input { flex: 1; background: none; border: 0; outline: 0; font-size: 17px; color: #fff; min-width: 0; }
.field input::placeholder { color: rgba(255,255,255,.35); }
.field button { color: rgba(255,255,255,.45); }
.msg { width: 100%; font-size: 13px; padding: 12px; border-radius: 14px; margin-top: 14px; display: flex; gap: 8px; align-items: flex-start; line-height: 1.35; }
.msg.err { color: var(--coral); background: rgba(251,113,133,.12); }
.msg.info { color: var(--cyan); background: rgba(34,211,238,.1); }

/* ---------- Varie ---------- */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 96px); z-index: 80; background: rgba(40,36,64,.95); backdrop-filter: blur(12px); padding: 12px 18px; border-radius: 22px; font-size: 14px; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: fade .2s; max-width: 90vw; text-align: center; }
.spinner { width: 28px; height: 28px; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--lilac); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center { min-height: 80vh; display: flex; align-items: center; justify-content: center; }
.action-list .li { justify-content: flex-start; font-size: 17px; }
.banner { margin: 0 16px 16px; padding: 12px 14px; border-radius: 16px; background: rgba(139,92,246,.14); box-shadow: inset 0 0 0 1px rgba(167,139,250,.3); font-size: 14px; display: flex; gap: 10px; align-items: center; }
.banner b { font-weight: 600; }
.banner button { margin-left: auto; color: var(--lilac); font-weight: 600; white-space: nowrap; }

/* =====================================================================
   PC / schermi larghi
   ===================================================================== */
.desk-only { display: none !important; }
.g-side { display: contents; }
button, a, .chip, .li, .prow { cursor: pointer; }
@media (hover: hover) {
  .li:hover, .prow:hover, .erow:hover { background: rgba(255,255,255,.035); }
  .chip:hover { filter: brightness(1.15); }
  .btn.primary:hover:not(:disabled) { filter: brightness(1.1); }
  .ranges button:hover:not(.on), .seg button:hover:not(.on) { color: #fff; }
}

@media (min-width: 900px) {
  :root { --side: 236px; }
  .desk-only { display: flex !important; }

  /* barra laterale al posto della tab bar */
  .tabbar {
    top: 0; bottom: 0; right: auto; width: var(--side); flex-direction: column; justify-content: flex-start; gap: 2px;
    padding: 26px 14px 20px; border-top: 0; border-right: .5px solid rgba(255,255,255,.08);
    background: rgba(10,9,20,.55);
  }
  .tab { flex-direction: row; width: 100%; gap: 12px; font-size: 15px; font-weight: 500; padding: 10px 12px; border-radius: 12px; color: rgba(255,255,255,.7); }
  .tab .ic { width: 21px; height: 21px; }
  .tab:hover { background: rgba(255,255,255,.05); color: #fff; }
  .tab.on { background: rgba(139,92,246,.22); color: #fff; box-shadow: inset 0 0 0 1px rgba(167,139,250,.25); }
  .side-brand { align-items: center; gap: 10px; padding: 0 8px 22px; font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
  .side-brand img { width: 34px; height: 34px; border-radius: 9px; }
  .side-new { align-items: center; justify-content: center; gap: 6px; margin: 0 0 16px; height: 42px; border-radius: 12px; font-weight: 600; font-size: 15px;
    background: linear-gradient(135deg, var(--violet), #6D28D9); box-shadow: 0 6px 18px rgba(139,92,246,.35); }
  .side-foot { margin-top: auto; flex-direction: column; gap: 6px; width: 100%; }
  .side-user { font-size: 12px; color: var(--ter); padding: 4px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* area contenuti */
  .screen { margin: 0 0 0 var(--side); max-width: 1320px; padding: 22px 40px 60px; }
  .nav { padding: 0; }
  h1.large { font-size: 40px; padding: 0 0 18px; }
  .content { padding: 0; }
  .search { margin: 0 0 18px; max-width: 420px; }

  /* Home: griglia */
  .home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
  .home-grid > .card, .home-grid > .banner { margin: 0 !important; }
  .g-full { grid-column: 1 / -1; }
  .g-hero { grid-column: span 2; }
  .g-side { display: flex; flex-direction: column; gap: 20px; grid-row: span 2; min-width: 0; }
  .g-side > .card { margin: 0; }
  .hero .hv { font-size: 48px; }

  /* Movimenti e Agenda: due colonne */
  .split { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: 28px; align-items: start; }
  .split .side { position: sticky; top: 22px; }

  /* Task: gruppi su due colonne */
  .groups { columns: 2; column-gap: 24px; }
  .group { break-inside: avoid; }
  .content > .seg { max-width: 420px; }

  /* Progetti: griglia di schede */
  .pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; background: none; overflow: visible; }
  .pgrid .prow { background: linear-gradient(var(--cardHi), var(--card)); border: 1px solid rgba(255,255,255,.07); border-radius: 18px; padding: 16px; }
  .pgrid .prow + .prow { border-top: 1px solid rgba(255,255,255,.07); }

  /* Pannelli come finestre al centro */
  .sheet {
    left: 50%; right: auto; top: 50%; bottom: auto; width: min(580px, 92vw); max-height: 86vh;
    transform: translate(-50%, -50%); border-radius: 22px; padding-bottom: 24px;
    box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.08); animation: pop .22s ease-out;
  }
  .sheet.full { top: 50%; width: min(720px, 92vw); }
  .sheetnav { border-radius: 22px 22px 0 0; }
  @keyframes pop { from { opacity: 0; transform: translate(-50%, -47%) scale(.97); } to { opacity: 1; transform: translate(-50%, -50%); } }
  .overlay { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

  .toast { bottom: 32px; left: calc(50% + var(--side) / 2); }
  .calgrid .d { height: 50px; }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-hero { grid-column: 1 / -1; }
  .g-side { display: contents; }
  .groups { columns: 1; }
}
@media (min-width: 1600px) {
  .screen { max-width: 1480px; }
}
