
/* Layout: app da telefono a una colonna, numeri grandi da leggere sotto sforzo, barra in basso. Look scuro scelto apposta: si usa in palestra. */
:root {
  --bg: #16181b; --surface: #202328; --raised: #2a2e34; --line: #363b42; --ink: #eef0f2; --soft: #a3a9b1;
  --accent: #f2a93b; --on-accent: #1b1408; --ok: #6fcf97; --danger: #f08a8a;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif; --body: "Barlow", system-ui, sans-serif;
  --skin: #4a4f57; --muscle: #9a5a50; --shorts: #2f5d8a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.45 var(--body); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.shell { max-width: 480px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 14px 190px; display: grid; gap: 16px; }
.shell > * { min-width: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: .04em; text-transform: uppercase; margin: 0; }
.brand span { color: var(--accent); }
.who { min-height: 40px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.who b { color: var(--accent); font-weight: 600; }
.note { margin: 0; font-size: 13px; color: var(--soft); }
h2 { font-family: var(--display); font-weight: 600; font-size: 30px; line-height: 1; margin: 0; text-transform: uppercase; letter-spacing: .02em; }
h3 { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); margin: 0; }
.month { display: grid; gap: 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 10px; }
.sheet { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; }
.sheet b { font-weight: 600; font-size: 17px; }
.sheet small { color: var(--soft); font-size: 13px; }
.sheet .go { color: var(--accent); font-weight: 600; align-self: center; grid-row: 1 / span 2; grid-column: 2; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); background: var(--surface); border-radius: 20px; font-size: 15px; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.primary { min-height: 54px; width: 100%; border: 0; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-family: var(--display); font-size: 20px; letter-spacing: .06em; text-transform: uppercase; }
.ghost { min-height: 42px; padding: 0 14px; background: none; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.ghost.warn { border-color: var(--danger); color: var(--danger); }
.back { justify-self: start; background: none; border: 0; padding: 0; min-height: 40px; color: var(--accent); font-weight: 600; }
.field { display: grid; gap: 4px; font-size: 13px; color: var(--soft); }
.field input, .field select { min-height: 46px; padding: 0 12px; background: var(--raised); border: 1px solid var(--line); border-radius: 8px; font-size: 16px; color: var(--ink); width: 100%; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lib { display: grid; gap: 6px; }
.pick { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; background: var(--raised); border: 1px solid var(--line); border-radius: 8px; width: 100%; text-align: left; }
.pick[aria-pressed="true"] { border-color: var(--accent); }
.pick i { font-style: normal; width: 22px; height: 22px; border-radius: 5px; border: 2px solid var(--soft); display: grid; place-content: center; font-size: 14px; flex: none; }
.pick[aria-pressed="true"] i { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pick small { margin-left: auto; color: var(--soft); font-size: 12px; }
.ex { display: grid; gap: 8px; }
.ex-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.ex-head b { font-weight: 600; font-size: 17px; }
.ex-head small { color: var(--soft); font-size: 13px; white-space: nowrap; }
.tag { font-size: 12px; padding: 1px 8px; border-radius: 10px; background: var(--raised); color: var(--soft); white-space: nowrap; }
.tag.acc { color: var(--accent); }

.clock { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 4; background: var(--bg); padding-block: 8px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.clock .t { font-family: var(--display); font-weight: 700; font-size: 36px; font-variant-numeric: tabular-nums; line-height: 1; }
.clock small { display: block; color: var(--soft); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.sets { display: grid; gap: 6px; }
.set { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) 52px; gap: 8px; align-items: center; }
.set.hdr { font-size: 12px; color: var(--soft); text-transform: uppercase; letter-spacing: .08em; }
.set .n { font-family: var(--display); font-weight: 600; font-size: 20px; text-align: center; color: var(--soft); }
.set input { min-height: 48px; width: 100%; padding: 0 8px; background: var(--raised); border: 1px solid var(--line); border-radius: 8px; font-size: 20px; font-family: var(--display); font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.set input::placeholder { color: #6b727b; }
.done { min-height: 48px; border-radius: 8px; border: 1px solid var(--line); background: var(--raised); font-size: 20px; }
.set.ok .done { background: var(--ok); border-color: var(--ok); color: #0f2a1b; }
.set.ok input { border-color: transparent; }
.last { font-size: 13px; color: var(--soft); }
.last b { color: var(--ink); font-weight: 500; }

.rest { position: fixed; left: 0; right: 0; bottom: calc(62px + env(safe-area-inset-bottom, 0px)); z-index: 8; background: var(--raised); border-top: 2px solid var(--accent); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-bottom: 12px; padding-top: 12px; box-shadow: 0 -6px 18px rgba(0,0,0,.35); }
.rest div { max-width: 448px; margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.rest .t { font-family: var(--display); font-weight: 700; font-size: 48px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--accent); }
.rest small { display: block; font-size: 12px; color: var(--soft); text-transform: uppercase; letter-spacing: .1em; }
.rest.over .t { color: var(--ok); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; }
.stat b { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--soft); }
.chart { width: 100%; height: auto; display: block; }
.friend { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; }
.friend small { color: var(--soft); font-size: 13px; }

.body { width: 100%; max-width: 380px; height: auto; display: block; margin-inline: auto; }
.body .zone, .body .lab { cursor: pointer; }
.body .zone:hover { filter: brightness(1.2); }
.restbtn { min-height: 50px; width: 100%; border-radius: 8px; border: 1px solid var(--accent); background: none; color: var(--accent); font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: .05em; text-transform: uppercase; }
.daytabs { display: flex; gap: 6px; overflow-x: auto; }
.daytabs button { flex: none; min-height: 40px; padding: 0 14px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--ink); font-size: 16px; font-weight: 600; }
.daytabs button[aria-pressed="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.slide { scroll-snap-align: start; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 12px; align-content: start; }
.exn { display: block; font-size: 19px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.grp { color: var(--soft); font-size: 14px; }
.info.round { width: 44px; border-radius: 50%; font-family: Georgia, serif; font-style: italic; font-size: 20px; flex: none; }
.figbig { aspect-ratio: 4 / 3; max-width: 100%; width: 100%; background: var(--raised); border-radius: 10px; display: grid; place-content: center; color: var(--soft); font-size: 13px; }
.box { background: var(--raised); border-radius: 10px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.box div { display: grid; gap: 2px; font-size: 15px; color: var(--soft); }
.box b { color: var(--ink); font-family: var(--display); font-size: 24px; font-weight: 700; margin-left: 4px; }
.timer { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--accent); background: none; color: var(--accent); font-size: 26px; flex: none; }
.primary.isdone { background: var(--ok); color: #0f2a1b; }
.pickrow { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 6px; }
.info { min-height: 44px; border-radius: 8px; border: 1px solid var(--line); background: var(--raised); font-weight: 700; color: var(--accent); }
.exname { background: none; border: 0; padding: 0; text-align: left; font-weight: 600; font-size: 17px; }
.exname span { display: inline-grid; place-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--raised); color: var(--accent); font-size: 12px; margin-left: 4px; vertical-align: 2px; }
.sheetx { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.6); display: grid; align-items: end; }
.sheetx-in { background: var(--surface); border-top: 2px solid var(--accent); border-radius: 14px 14px 0 0; max-width: 480px; width: 100%; margin-inline: auto; padding: 16px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 12px; }
.figs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fig { aspect-ratio: 1; max-width: 100%; background: var(--raised); border: 1px dashed var(--line); border-radius: 8px; display: grid; place-content: center; color: var(--soft); font-size: 13px; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--surface); border-top: 1px solid var(--line); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); }
.nav div { max-width: 448px; margin-inline: auto; display: flex; }
.nav button { flex: 1; min-width: 0; min-height: 62px; background: none; border: 0; border-top: 3px solid transparent; color: var(--soft); font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; }
.nav button[aria-current="page"] { color: var(--accent); border-top-color: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .rest { animation: up .2s ease-out; } @keyframes up { from { transform: translateY(30%); opacity: .5; } } }
/* app vera */
.login { max-width: 360px; margin: 12vh auto 0; display: grid; gap: 14px; }
.err { color: var(--danger); font-size: 14px; margin: 0; }
.okmsg { color: var(--ok); font-size: 14px; margin: 0; }
.banner { background: var(--raised); border-left: 3px solid var(--accent); padding: 10px 12px; border-radius: 6px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.banner button { background: none; border: 0; color: var(--accent); font-weight: 600; min-height: 36px; }
.figs img, .figbig img { width: 100%; height: 100%; object-fit: contain; background: #fff; border-radius: 8px; }
.figbig { overflow: hidden; }
.figbig.has { background: #fff; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 15px; }
.video { position: relative; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sheetx-in { max-height: 92vh; overflow-y: auto; }
.dsgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.dsgrid button { background: #fff; border: 2px solid transparent; border-radius: 8px; padding: 4px; display: grid; gap: 4px; color: #222; font-size: 12px; text-align: left; }
.dsgrid button:hover, .dsgrid button:focus-visible { border-color: var(--accent); }
.dsgrid img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.field textarea { min-height: 110px; padding: 10px 12px; background: var(--raised); border: 1px solid var(--line); border-radius: 8px; font-size: 15px; color: var(--ink); width: 100%; font-family: inherit; line-height: 1.45; }
.check { display: flex; gap: 10px; align-items: center; min-height: 40px; font-size: 15px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(150px + env(safe-area-inset-bottom, 0px)); z-index: 30; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 20px; font-weight: 600; font-size: 14px; max-width: calc(100% - 32px); }
.toast.bad { background: var(--danger); color: #2a0b0b; }
.loading { color: var(--soft); text-align: center; padding: 40px 0; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
