/* /transformare/aplicatie — the Transformare 30+ web app.
   The same look as the quiz (transformare.css): cream, Georgia in ink, white
   cards, teal as the accent and the button, red only for errors. The tokens are
   repeated here and not imported: that file's global rules (body as a flex row,
   a 480 px frame) belong to the quiz.
   Under 900 px: one column and a bottom tab bar. From 900 px: a left sidebar and
   a content area with up to two columns, and the whole shell stops at 1320 px. */
:root {
  --bg: #FBF7F0;
  --card: #FFFFFF;
  --chip: #F0E9DC;
  --line: #E8E1D5;
  --ink: #2B2B33;
  --ink-soft: #6A6A76;
  --accent: #147E78;
  --accent-dark: #0F625D;
  --accent-soft: #EAF4F3;
  --off: #C9C4B8;
  --danger: #C0392B;
  --danger-soft: #FDF0EE;
  --alert-bg: #FFF4E5;
  --alert-line: #F2C98A;
  --shadow: 0 1px 3px rgba(43, 43, 51, .06);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tabbar: 62px;
  --r: 18px;
  color-scheme: light;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: Georgia, "Times New Roman", serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.45;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--accent-dark); }
ul, ol { list-style: none; }
svg { display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1:focus { outline: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff;
  padding: 12px 16px; border-radius: 10px; font-family: var(--sans); font-size: 15px;
}
.skip-link:focus { top: 12px; }
.noscript { padding: 24px; text-align: center; }

.boot { min-height: 100dvh; display: flex; align-items: center; justify-content: center; }
.spin { display: inline-block; width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--chip); border-top-color: var(--accent); animation: spin .9s linear infinite; }
.spin.small { width: 18px; height: 18px; border-width: 2.5px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- The shell ----------------------------------------------------------- */
.shell { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--bg); border-bottom: 1px solid var(--line);
  padding: max(6px, env(safe-area-inset-top)) 16px 6px;
}
.brand { font-family: var(--sans); font-size: 12px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; white-space: nowrap; }
.brand b { color: var(--accent); }
.who {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 58%; padding: 4px 4px 4px 10px;
  font-family: var(--sans); font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink); border-radius: 999px;
}
.who span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .ava {
  flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
}
.who[aria-current="page"] .ava { background: var(--accent); color: #fff; }
/* The RO/EN switch (/assets/i18n.js draws it and styles its buttons): next to the name, in the sidebar, over a solo page. */
.topr { display: flex; align-items: center; gap: 6px; min-width: 0; justify-content: flex-end; }
.topr .who { max-width: none; min-width: 0; }
.langsw { color: var(--ink-soft); flex: none; }
.sidelang { padding: 0 12px 12px; }
.side { display: none; }

.main {
  flex: 1; width: 100%; max-width: 620px; margin: 0 auto;
  padding: 16px 16px calc(var(--tabbar) + 28px + env(safe-area-inset-bottom));
  min-width: 0; animation: rise .22s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: var(--tabbar);
  font-family: var(--sans); font-size: 11px; font-weight: 600; color: var(--ink-soft); text-decoration: none; min-width: 0;
}
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--accent-dark); }
.tab[aria-current="page"] .ic { background: var(--accent-soft); }
.tab .ic { display: flex; padding: 2px 14px; border-radius: 999px; }
.tab:focus-visible { outline-offset: -3px; }

@media (min-width: 900px) {
  .shell { flex-direction: row; max-width: 1320px; margin: 0 auto; align-items: flex-start; }
  .topbar, .tabs { display: none; }
  .side {
    display: flex; flex-direction: column; flex: none; width: 240px; position: sticky; top: 0; height: 100dvh;
    padding: 28px 16px 20px 24px; border-right: 1px solid var(--line);
  }
  .side .brand { padding: 0 12px 26px; }
  .side nav { display: flex; flex-direction: column; gap: 4px; }
  .sidelink {
    display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: 12px;
    font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--ink-soft); text-decoration: none;
  }
  .sidelink svg { width: 22px; height: 22px; flex: none; }
  .sidelink:hover { background: var(--chip); color: var(--ink); }
  .sidelink[aria-current="page"] { background: var(--accent-soft); color: var(--accent-dark); }
  .side .grow { flex: 1; }
  .sidestatus { font-family: var(--sans); font-size: 12.5px; line-height: 1.4; color: var(--ink-soft); padding: 0 12px 10px; }
  .side .who { max-width: 100%; width: 100%; justify-content: space-between; flex-direction: row-reverse; padding: 6px 12px 6px 8px; border-radius: 12px; }
  .side .who:hover { background: var(--chip); }
  .side .who span:first-child { flex: 1; }
  .main { max-width: none; padding: 36px 40px 56px; }
}

/* --- Common pieces --------------------------------------------------------- */
h1 { font-size: 27px; line-height: 1.18; letter-spacing: -.3px; text-wrap: balance; }
h2 { font-size: 19px; line-height: 1.25; }
h3 { font-size: 16.5px; line-height: 1.3; }
.head { margin-bottom: 16px; }
.head .sub { color: var(--ink-soft); font-size: 15.5px; margin-top: 6px; max-width: 62ch; }
.eyebrow { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-dark); margin-bottom: 6px; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; min-width: 0; }
.card > h2 { margin-bottom: 10px; }
.soft { color: var(--ink-soft); font-size: 14.5px; }
.num { font-family: var(--sans); font-variant-numeric: tabular-nums; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; background: var(--chip); border-radius: 999px; padding: 4px 11px;
  font-family: var(--sans); font-size: 12.5px; font-weight: 600; color: var(--ink);
}
.pill.teal { background: var(--accent-soft); color: var(--accent-dark); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 22px; border-radius: 999px;
  font-family: var(--sans); font-size: 16px; font-weight: 600; text-decoration: none; text-align: center;
  background: var(--accent); color: #fff; transition: background .15s ease;
}
.btn:hover { background: var(--accent-dark); }
.btn:disabled { background: #D9D3C6; color: #76716A; cursor: default; }
.btn.wide { width: 100%; }
.btn.line { background: none; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--off); }
.btn.line:hover { background: var(--chip); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:disabled { background: #D9D3C6; color: #76716A; }
.btn.small { min-height: 44px; padding: 8px 18px; font-size: 14.5px; }
.link {
  display: inline-flex; align-items: center; min-height: 44px; font-family: var(--sans); font-size: 14.5px; font-weight: 600;
  color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px;
}
.link.quiet { color: var(--ink-soft); font-weight: 500; }
.lbl { display: block; font-family: var(--sans); font-size: 13.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 7px; }
.input {
  width: 100%; min-height: 50px; background: var(--card); border: 1.5px solid var(--off); border-radius: 14px;
  padding: 12px 14px; font-size: 16.5px; outline: none;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.note { background: var(--alert-bg); border: 1.5px solid var(--alert-line); border-radius: 14px; padding: 12px 14px; font-size: 14.5px; margin-bottom: 14px; }
.flash { background: var(--accent-soft); border-radius: 14px; padding: 13px 15px; font-size: 15px; margin-bottom: 14px; color: var(--accent-dark); }
.err { color: var(--danger); font-family: var(--sans); font-size: 14px; margin-top: 10px; }
.err:empty { display: none; }
.ok { color: var(--accent-dark); font-family: var(--sans); font-size: 14px; margin-top: 10px; }
.ok:empty { display: none; }

/* A failed load: a message and a retry, never an empty screen. */
.failed { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 28px 20px; text-align: center; margin-bottom: 14px; }
.failed h2 { margin-bottom: 6px; }
.failed p { color: var(--ink-soft); font-size: 15px; margin-bottom: 16px; }

/* Skeleton while a screen loads */
.sk { background: linear-gradient(90deg, var(--chip) 25%, #F7F2E8 50%, var(--chip) 75%); background-size: 200% 100%; animation: sk 1.3s linear infinite; border-radius: 10px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sk.t { height: 28px; width: 55%; margin-bottom: 10px; }
.sk.s { height: 15px; width: 80%; margin-bottom: 18px; }
.sk.b { height: 160px; border-radius: var(--r); margin-bottom: 14px; }

/* Two columns from 1100 px (the sidebar takes 240 of the monitor's width) */
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
@media (min-width: 1100px) {
  .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; align-items: start; }
  .cols.wide-left { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .cols .stick { position: sticky; top: 24px; }
}
.narrow { max-width: 640px; }

/* --- Day header and the strip of days ---------------------------------------- */
.daybar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.daybar .wk { font-family: var(--sans); font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.chev { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--ink); }
.chev:hover { background: var(--chip); }
.chev:disabled { visibility: hidden; }
.strip { display: flex; gap: 2px; overflow-x: auto; margin-bottom: 16px; scrollbar-width: none; padding: 3px; }
.strip::-webkit-scrollbar { display: none; }
.dayb {
  flex: 1 0 44px; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border-radius: 14px; font-family: var(--sans); font-size: 15.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink);
}
.dayb:hover:not(:disabled) { background: var(--chip); }
.dayb:disabled { color: var(--off); cursor: default; }
.dayb.sel { background: var(--ink); color: #fff; }
.dayb.sel:hover { background: var(--ink); }
.dayb .dot { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--off); display: flex; align-items: center; justify-content: center; }
.dayb.today:not(.sel) .dot { box-shadow: inset 0 0 0 2px var(--accent); }
.dayb.done .dot { background: var(--accent); box-shadow: none; color: #fff; }
.dayb .dot svg { width: 10px; height: 10px; }
@media (min-width: 900px) { .strip { max-width: 560px; } }

/* The trial's seven steps */
.trial { display: flex; gap: 4px; margin-top: 10px; max-width: 320px; }
.trial i { flex: 1; height: 6px; border-radius: 6px; background: var(--chip); }
.trial i.on { background: var(--accent); }
.trial i.now { background: var(--accent); opacity: .55; }

/* --- Azi ------------------------------------------------------------------- */
.wcard h2 { font-size: 22px; margin: 2px 0 4px; }
.wcard .soft { margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.exlist { margin-top: 12px; }
.exlist li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.exlist li:last-child { border-bottom: 0; padding-bottom: 0; }
.phasegoal { display: none; }
@media (min-width: 900px) { .phasegoal { display: block; } }
.exlist .rx { flex: none; font-family: var(--sans); font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.doneb {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 66px; padding: 12px 16px; text-align: left;
  background: var(--card); border-radius: var(--r); box-shadow: inset 0 0 0 2px var(--accent); margin-bottom: 14px;
  font-family: var(--sans); font-size: 16px; font-weight: 600; color: var(--accent-dark); transition: background .15s ease;
}
.doneb:hover { background: var(--accent-soft); }
.doneb small { display: block; font-weight: 400; font-size: 13px; color: var(--ink-soft); margin-top: 1px; }
.doneb .box { flex: none; width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--accent); display: flex; align-items: center; justify-content: center; color: transparent; }
.doneb[aria-pressed="true"] { background: var(--accent); color: #fff; box-shadow: none; }
.doneb[aria-pressed="true"] small { color: #E3F2F0; }
.doneb[aria-pressed="true"] .box { background: #fff; color: var(--accent); box-shadow: none; }
.mealrow {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; padding: 11px 0; min-height: 56px;
  border-top: 1px solid var(--line); color: var(--ink);
}
.mealrow:first-of-type { border-top: 0; }
.mealrow .slot { display: block; font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .03em; color: var(--accent-dark); }
.mealrow .nm { display: block; font-size: 15.5px; line-height: 1.3; margin-top: 1px; }
.mealrow .mc { flex: none; text-align: right; font-family: var(--sans); font-size: 12.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; line-height: 1.35; }
.mealrow:hover .nm { text-decoration: underline; text-underline-offset: 3px; }
.macro { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.macro div { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 6px; text-align: center; min-width: 0; }
.macro b { display: block; font-family: var(--sans); font-size: 19px; font-variant-numeric: tabular-nums; }
.macro small { display: block; font-family: var(--sans); font-size: 11.5px; color: var(--ink-soft); line-height: 1.25; margin-top: 2px; }

/* --- Antrenament ------------------------------------------------------------ */
.excard { padding: 0; overflow: hidden; }
.excard .top { padding: 16px 18px 10px; display: flex; gap: 12px; align-items: flex-start; }
.excard .n {
  flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--chip); font-family: var(--sans); font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.excard.full .n { background: var(--accent); color: #fff; }
.excard h2 { font-size: 18px; }
.excard .rxl { font-family: var(--sans); font-size: 13.5px; color: var(--ink-soft); margin-top: 3px; font-variant-numeric: tabular-nums; }
.excard .rxn { font-family: var(--sans); font-size: 13px; color: var(--accent-dark); margin-top: 3px; }
.figs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 2px 18px 8px; }
.figs figure { background: var(--bg); border-radius: 12px; padding: 6px; min-width: 0; }
.figs svg { width: 100%; height: auto; }
.figs figcaption { text-align: center; font-family: var(--sans); font-size: 11.5px; color: var(--ink-soft); }
.exbody { padding: 4px 18px 16px; min-width: 0; }
.last { font-family: var(--sans); font-size: 13.5px; color: var(--ink-soft); background: var(--bg); border-radius: 10px; padding: 8px 11px; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.last b { color: var(--ink); font-weight: 600; }
.sets { width: 100%; }
.setrow { display: grid; grid-template-columns: 54px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; margin-bottom: 8px; }
.setrow.h { font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px; text-align: center; }
.setrow.h span:first-child { text-align: left; }
.setrow .sn { font-family: var(--sans); font-size: 13.5px; color: var(--ink-soft); white-space: nowrap; }
.setrow input {
  width: 100%; min-height: 48px; text-align: center; background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px;
  font-family: var(--sans); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; outline: none; padding: 4px;
}
.setrow input::placeholder { color: #A9A498; font-weight: 400; }
.setrow input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--card); }
.setrow input[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-soft); }
.more { border-top: 1px solid var(--line); }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.sum {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 4px 18px;
  font-family: var(--sans); font-size: 14.5px; font-weight: 600; color: var(--accent-dark);
}
.sum:focus-visible { outline-offset: -3px; }
.sum::after {
  content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s ease;
}
details[open] > .sum::after { transform: rotate(-135deg) translate(-2px, -2px); }
.prose { padding: 2px 18px 16px; font-size: 15px; }
.prose h3 { font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .03em; margin: 12px 0 5px; color: var(--ink-soft); }
.prose h3:first-child { margin-top: 2px; }
.prose ol { list-style: decimal; padding-left: 21px; }
.prose ul.dots li { padding-left: 16px; position: relative; }
.prose ul.dots li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.prose li { margin-bottom: 6px; }
.prose ol li::marker { color: var(--accent-dark); font-family: var(--sans); font-weight: 700; }
.stopline { background: var(--alert-bg); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-top: 8px; }
.card.fold { padding: 0; overflow: hidden; }
.card.fold .sum { min-height: 54px; }
@media (min-width: 1100px) {
  /* A wide exercise: the drawings on the left, the sets on the right */
  .exgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr); gap: 8px 0; align-items: start; }
  .figs { padding-bottom: 14px; }
}
.exwrap { max-width: 980px; }

/* --- Mese ------------------------------------------------------------------- */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--chip); border-radius: 14px; padding: 3px; gap: 3px; margin-bottom: 14px; }
.seg button { min-height: 44px; border-radius: 11px; font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.mealcard { padding: 0; overflow: hidden; scroll-margin-top: 72px; }
@media (min-width: 900px) { .mealcard { scroll-margin-top: 24px; } }
.mealcard .sum { display: flex; padding: 12px 18px; min-height: 68px; color: var(--ink); font-weight: 400; }
.mealcard .sum .slot { display: block; font-family: var(--sans); font-size: 12px; font-weight: 700; color: var(--accent-dark); }
.mealcard .sum .nm { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 16.5px; line-height: 1.28; margin: 1px 0 3px; font-weight: bold; }
.mealcard .sum .mc { display: block; font-size: 12.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.mealcard .sum::after { color: var(--accent-dark); }
.ings { font-family: var(--sans); font-size: 14.5px; }
.ings li { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; border-bottom: 1px solid var(--line); margin: 0; }
.ings li span:last-child { flex: none; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.shop { display: block; }
.shopi {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 0; cursor: pointer; border-bottom: 1px solid var(--line);
  font-family: var(--sans); font-size: 14.5px;
}
.shopi:last-child { border-bottom: 0; }
.shopi input { flex: none; width: 22px; height: 22px; accent-color: var(--accent); }
.shopi .nm { flex: 1; min-width: 0; }
.shopi .g { flex: none; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.shopi input:checked ~ .nm { text-decoration: line-through; color: var(--ink-soft); }
.pane-hidden { display: none; }
@media (min-width: 1100px) {
  .seg { display: none; }
  .pane-hidden { display: block; }
}

/* --- Progres ----------------------------------------------------------------- */
.weightform { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.weightform .f { flex: 1 1 130px; min-width: 0; }
.weightform input { font-family: var(--sans); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: center; }
.chartbox { position: relative; margin-top: 14px; touch-action: pan-y; }
.chartbox text { font-family: var(--sans); font-size: 12px; fill: var(--ink-soft); font-variant-numeric: tabular-nums; }
.tip {
  position: absolute; pointer-events: none; transform: translate(-50%, -100%); background: var(--ink); color: #fff; border-radius: 8px;
  padding: 5px 9px; font-family: var(--sans); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.emptychart { margin-top: 14px; background: var(--bg); border-radius: 12px; padding: 22px 16px; text-align: center; color: var(--ink-soft); font-size: 14.5px; }
.wtable { font-family: var(--sans); font-size: 14px; padding: 0 18px 14px; }
.wtable li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.bigstat { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.bigstat b { font-family: var(--sans); font-size: 34px; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal span {
  aspect-ratio: 1; max-height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--bg);
  font-family: var(--sans); font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums;
}
.cal span.done { background: var(--accent); color: #fff; font-weight: 600; }
.cal span.today { box-shadow: inset 0 0 0 2px var(--accent); color: var(--ink); font-weight: 600; }
.cal span.done.today { color: #fff; box-shadow: inset 0 0 0 2px var(--accent-dark); }
.cal span.later { background: none; color: var(--off); box-shadow: inset 0 0 0 1px var(--line); }
.sketchbox { width: 100%; }

/* --- Setări ------------------------------------------------------------------ */
.opts { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.opts label {
  position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 52px; padding: 8px 12px; border-radius: 14px; cursor: pointer;
  box-shadow: inset 0 0 0 1.5px var(--line); font-family: var(--sans); font-size: 14.5px; font-weight: 600;
}
.opts input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.opts label:has(input:checked) { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.opts label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.opts label.sel { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.opts small { font-weight: 400; font-size: 12px; color: var(--ink-soft); line-height: 1.3; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row .f { flex: 1 1 180px; min-width: 0; }
.grp { margin-top: 18px; }
.grp:first-of-type { margin-top: 0; }
form.grp { margin-top: 0; }
.subline { font-size: 15px; margin-bottom: 12px; }
.confirm { background: var(--bg); border-radius: 14px; padding: 14px; margin-top: 12px; font-size: 14.5px; }
.confirm p { margin-bottom: 10px; }
.confirm .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.card.dangerzone h2 { color: var(--danger); }
.linkrow { display: flex; flex-wrap: wrap; gap: 4px 20px; }

/* Invite a friend */
.refrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.refrow .input { flex: 1 1 220px; min-width: 0; font-size: 16px; color: var(--ink-soft); }
.refrow .btn { flex: 0 0 auto; }
.reftally { font-family: var(--sans); font-size: 14.5px; margin-top: 12px; }
.refnote { font-size: 13.5px; margin-top: 8px; }

/* --- Abonament ---------------------------------------------------------------- */
.keep { margin-bottom: 4px; }
.keep li { padding: 7px 0 7px 28px; position: relative; font-size: 15.5px; }
.keep li::before {
  content: ""; position: absolute; left: 5px; top: 13px; width: 12px; height: 6px;
  border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg);
}
.plan {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 72px; cursor: pointer;
  background: var(--card); border-radius: var(--r); padding: 14px; margin-bottom: 12px; box-shadow: inset 0 0 0 2px var(--line);
}
.plan input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.plan.sel { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.plan:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.plan .radio { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--off); background: var(--card); }
.plan.sel .radio { box-shadow: inset 0 0 0 7px var(--accent); }
.plan .t b { display: block; font-size: 17px; }
.plan .t small { display: block; font-family: var(--sans); font-size: 12.5px; color: var(--ink-soft); line-height: 1.35; margin-top: 1px; }
.plan .t .save { color: var(--accent-dark); font-weight: 600; }
.plan .p { text-align: right; }
.plan .p b { display: block; font-family: var(--sans); font-size: 19px; white-space: nowrap; }
.plan .p small { display: block; font-family: var(--sans); font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.badge {
  position: absolute; top: -10px; right: 14px; background: var(--accent); color: #fff; border-radius: 999px; padding: 3px 10px;
  font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .03em;
}
.check { display: flex; gap: 11px; align-items: flex-start; font-family: var(--sans); font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); cursor: pointer; padding: 10px 0; }
.check input { flex: none; width: 22px; height: 22px; accent-color: var(--accent); margin-top: 1px; }
.legal { font-family: var(--sans); color: var(--ink-soft); font-size: 12.5px; line-height: 1.5; margin-top: 10px; text-align: center; }
.legal a { color: inherit; display: inline-block; padding: 14px 6px; margin: -14px -6px; }

/* --- Login, link, welcome, confirmations: a page on its own ---------------------- */
.solo {
  min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}
.solo .brand { text-align: center; }
.solotop { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.solocard { width: 100%; max-width: 440px; background: var(--card); border-radius: 22px; box-shadow: 0 2px 14px rgba(43, 43, 51, .07); padding: 26px 22px; animation: rise .22s ease; }
.solocard.big { max-width: 620px; }
.solocard h1 { margin-bottom: 8px; }
.solocard .sub { color: var(--ink-soft); font-size: 15.5px; margin-bottom: 18px; }
.solocard .btn { margin-top: 14px; }
.center { text-align: center; }
.tick { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.tick svg { width: 26px; height: 26px; }

/* --- The save line: a failed save stays on screen until it goes through ------------ */
.savebar {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar) + 10px + env(safe-area-inset-bottom)); z-index: 40;
  display: none; align-items: center; gap: 10px; margin: 0 auto; max-width: 460px; min-height: 44px; padding: 8px 14px; border-radius: 14px;
  background: var(--ink); color: #fff; font-family: var(--sans); font-size: 14px; box-shadow: 0 4px 18px rgba(43, 43, 51, .22);
}
.savebar.on { display: flex; }
.savebar .tx { flex: 1; min-width: 0; }
.savebar.fail { background: var(--danger); }
.savebar button { flex: none; min-height: 44px; margin: -4px -6px -4px 0; padding: 0 12px; color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.savebar button:focus-visible { outline-color: #fff; }
@media (min-width: 900px) { .savebar { left: auto; right: 24px; bottom: 24px; width: 380px; } }

@media (max-width: 359px) {
  h1 { font-size: 24px; }
  .card { padding: 15px; }
  .plan { grid-template-columns: auto minmax(0, 1fr); }
  .plan .p { grid-column: 2; text-align: left; }
  .setrow { grid-template-columns: 46px minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
  .macro b { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .sk { background: var(--chip); }
}
