/* pentruseniori.ro – stiluri
   Principii: text mare, contrast ridicat (minimum 7:1 pentru text), ținte de atingere de cel puțin 56px,
   un singur lucru important pe ecran, fără elemente care dispar singure sau cer gesturi fine. */

:root {
  --bg: #FAF6EF;
  --surface: #FFFFFF;
  --surface-2: #F3ECE0;
  --ink: #1C2B33;
  --ink-2: #43525A;
  --line: #D6CCBB;
  --primary: #0E5A5F;
  --primary-dark: #093F43;
  --primary-soft: #DDEEEE;
  --accent: #F3B24A;
  --accent-ink: #7A4300;
  --accent-soft: #FDF0D7;
  --ok: #1E6B3A;
  --ok-soft: #DFF1E3;
  --bad: #A3261B;
  --bad-soft: #FBE3DF;
  --focus: #C2410C;
  --radius: 18px;
  --radius-s: 12px;
  --shadow: 0 2px 6px rgba(28, 43, 51, .08), 0 10px 28px rgba(28, 43, 51, .07);
  --tap: 60px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

html { font-size: 125%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.ts-1 { font-size: 112.5%; }
html.ts-2 { font-size: 125%; }
html.ts-3 { font-size: 143.75%; }
html.ts-4 { font-size: 162.5%; }

html.contrast {
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F1F1F1; --ink: #000000; --ink-2: #1A1A1A; --line: #000000;
  --primary: #003F44; --primary-dark: #002A2E; --primary-soft: #E3F1F1; --accent-ink: #4A2800;
  --ok: #0B4D24; --bad: #7E0F06; --shadow: none;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-underline-offset: .2em; text-decoration-thickness: .08em; }
a:hover { color: var(--primary-dark); }
strong { font-weight: 700; }
img, svg { max-width: 100%; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: .4em; }

:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -100px; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 100; }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- antet și meniu ---------- */

.site-header { background: var(--surface); border-bottom: 2px solid var(--line); }
.header-inner { max-width: 1080px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-size: 1.2rem; white-space: nowrap; }
.brand img { border-radius: 11px; display: block; }
.brand strong { color: var(--primary); }
.text-size-btn { margin-left: auto; min-height: 52px; padding: 0 16px; font-size: .9rem; white-space: nowrap; }
.text-size-btn .aa { font-size: 1.25rem; font-weight: 700; }

.main-nav { display: flex; gap: 4px; margin-left: 12px; }
.main-nav a {
  display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 14px; border-radius: 12px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; white-space: nowrap;
}
.main-nav a svg { width: 26px; height: 26px; flex: none; }
.main-nav a:hover { background: var(--surface-2); }
.main-nav a[aria-current="page"] { background: var(--primary); color: #fff; }

main { flex: 1; width: 100%; max-width: 1000px; margin: 0 auto; padding: 28px 20px 56px; }

.site-footer { background: var(--surface-2); border-top: 2px solid var(--line); font-size: .85rem; color: var(--ink-2); }
.footer-inner { max-width: 1000px; margin: 0 auto; padding: 24px 20px; }
.footer-inner p { margin-bottom: .6em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.footer-links a { padding: 8px 0; display: inline-block; }

/* Pe ecran mare, meniul stă pe rândul lui, sub siglă: are loc la orice mărime de text.
   Doar pe ecrane late și cu text obișnuit urcă lângă siglă. */
@media (min-width: 900px) {
  .header-inner { flex-wrap: wrap; row-gap: 6px; }
  .brand { flex: none; }
  .text-size-btn { order: 2; }
  .main-nav { order: 3; flex-basis: 100%; margin-left: 0; flex-wrap: wrap; }
}
@media (min-width: 1400px) {
  .header-inner { max-width: 1340px; }
  html:not(.ts-3):not(.ts-4) .main-nav { order: 0; flex-basis: auto; margin-left: 12px; flex-wrap: nowrap; }
}

.nav-short { display: none; }

@media (max-width: 899px) {
  .nav-short { display: inline; }
  .main-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; margin: 0; gap: 0;
    background: var(--surface); border-top: 2px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(28, 43, 51, .08);
  }
  .main-nav a { flex: 1; min-width: 0; flex-direction: column; gap: 2px; padding: 6px 1px; min-height: 64px; font-size: 14px; justify-content: center; text-align: center; }
  .nav-long { display: none; }
  .main-nav a svg { width: 28px; height: 28px; }
  body { padding-bottom: 84px; }
  .text-size-btn span:not(.aa) { display: none; }
  .header-inner { padding: 8px 16px; }
  main { padding: 20px 16px 40px; }
  h1 { font-size: 1.5rem; }
  .card { padding: 20px 18px; }
  .stage { padding: 18px 14px; }
  .choice { font-size: 1.05rem; gap: 8px; }
  .choices { gap: 10px; }
}

body.playing .main-nav, body.playing .site-footer, body.playing .text-size-btn { display: none; }
body.playing { padding-bottom: 0; }
body.playing main { padding-top: 14px; padding-bottom: 20px; }

/* ---------- butoane ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--tap); padding: 10px 28px; border-radius: 14px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: 1.05rem; line-height: 1.2; text-decoration: none; text-align: center;
  cursor: pointer; background: var(--surface-2); color: var(--ink); -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; user-select: none;
}
.btn svg { width: 1.4em; height: 1.4em; flex: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 3px 0 var(--primary-dark); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--primary-dark); }
.btn-accent { background: var(--accent); color: #2B1900; box-shadow: 0 3px 0 #B97A14; }
.btn-accent:hover { background: #F7BF64; color: #2B1900; }
.btn-secondary { background: var(--surface); color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--primary-soft); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { background: var(--surface-2); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: var(--bad); }
.btn-big { min-height: 72px; font-size: 1.2rem; padding: 12px 36px; border-radius: 18px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 20px; }
.btn-row.center { justify-content: center; }
.link-btn { background: none; border: 0; padding: 12px 4px; font: inherit; color: var(--primary); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; min-height: 48px; }

/* ---------- carduri și structură ---------- */

.card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 22px; box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
.card-primary { background: var(--primary); color: #fff; border-color: var(--primary-dark); }
.card-primary h2, .card-primary h1 { color: #fff; }
.card-primary a:not(.btn) { color: #fff; }
.card-accent { background: var(--accent-soft); border-color: #E3C48C; }
.card-ok { background: var(--ok-soft); border-color: #9CCBA8; }
.card-soft { background: var(--surface-2); box-shadow: none; }
.lead { font-size: 1.1rem; color: var(--ink-2); max-width: 46em; }
.card-primary .lead { color: #E4F2F2; }
.muted { color: var(--ink-2); }
.small { font-size: .88rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 14px; }
.page-head { margin-bottom: 22px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; font-weight: 600; text-decoration: none; margin-bottom: 6px; }
.back-link svg { width: 24px; height: 24px; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.cols-2 > .card { margin-bottom: 0; }
@media (max-width: 760px) { .cols-2 { grid-template-columns: 1fr; } }
.section-title { margin: 34px 0 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.big-emoji { font-size: 3rem; line-height: 1; }
.eyebrow { font-size: .85rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 6px; }
.card-primary .eyebrow { color: var(--accent); }
hr { border: 0; border-top: 2px solid var(--line); margin: 24px 0; }

/* ---------- etichete pe domenii ---------- */

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface-2); color: var(--ink); border: 1.5px solid transparent; }
.tag[data-d="viteza"] { background: #FCE9CF; color: #7A3A00; }
.tag[data-d="memorie"] { background: #D8ECEC; color: #0A4448; }
.tag[data-d="memorie-lucru"] { background: #E8E0F5; color: #45297A; }
.tag[data-d="atentie"] { background: #F9DEDA; color: #86190F; }
.tag[data-d="limbaj"] { background: #DCEFE0; color: #14522B; }
.tag[data-d="calcul"] { background: #DCE8F7; color: #153D6E; }
html.contrast .tag { border-color: currentColor; }

/* ---------- lista de exerciții ---------- */

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.tile {
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start; text-align: left; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.tile:hover { border-color: var(--primary); color: var(--ink); }
.tile .tile-emoji { font-size: 2.4rem; line-height: 1; }
.tile h3 { margin: 0; font-size: 1.15rem; color: var(--primary); }
.tile p { margin: 0; color: var(--ink-2); font-size: .92rem; }
.tile .tile-foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 8px; flex-wrap: wrap; }
.level-pill { font-size: .85rem; font-weight: 700; color: var(--ink-2); }

/* ---------- obiectiv săptămânal ---------- */

.goal { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.goal-dots { display: flex; gap: 10px; }
.goal-dot { width: 2.4rem; height: 2.4rem; flex: none; border-radius: 50%; border: 3px solid var(--line); background: var(--surface); display: grid; place-items: center; font-size: 1.2rem; line-height: 1; font-weight: 700; color: var(--ink-2); }
.goal-dot.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.week-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 14px; max-width: 520px; }
.week-day { text-align: center; font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.week-day .wd-mark { display: grid; place-items: center; height: 2.2rem; line-height: 1; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); margin-top: 4px; font-size: 1.1rem; color: var(--ink-2); }
.week-day.done .wd-mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.week-day.today .wd-mark { border-color: var(--ink); border-width: 3px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-s); padding: 16px 18px; }
.stat b { display: block; font-size: 1.9rem; line-height: 1.1; color: var(--primary); }
.stat span { color: var(--ink-2); font-size: .9rem; }

.steps { list-style: none; padding: 0; counter-reset: pas; }
.steps li { counter-increment: pas; position: relative; padding: .2rem 0 .2rem 2.9rem; margin-bottom: 14px; min-height: 2.1rem; }
.steps li::before { content: counter(pas); position: absolute; left: 0; top: 0; width: 2.1rem; height: 2.1rem; line-height: 1; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; display: grid; place-items: center; }
.plan-list { list-style: none; padding: 0; margin: 0; }
.plan-list li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 2px solid var(--line); margin: 0; }
.plan-list li:last-child { border-bottom: 0; }
.plan-list .plan-emoji { font-size: 2rem; width: 2.6rem; line-height: 1; text-align: center; flex: none; }
.plan-list .plan-state { margin-left: auto; font-weight: 700; white-space: nowrap; }
.plan-list .plan-state.done { color: var(--ok); }
.card-primary .plan-list li { border-color: rgba(255, 255, 255, .25); }
.card-primary .plan-list .plan-state.done { color: #B9F0C8; }

/* ---------- formulare ---------- */

.field { margin-bottom: 20px; }
.field label, .field .label { display: block; font-weight: 700; margin-bottom: 6px; }
.field .hint { display: block; color: var(--ink-2); font-size: .88rem; margin-bottom: 8px; font-weight: 400; }
.input, textarea.input {
  width: 100%; min-height: var(--tap); padding: 12px 16px; border: 2px solid #6B7A82; border-radius: 12px;
  font: inherit; font-size: 1.05rem; color: var(--ink); background: #fff;
}
textarea.input { min-height: 160px; resize: vertical; }
.input:focus { outline: 4px solid var(--focus); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 52px; cursor: pointer; font-weight: 400; }
.check input { width: 30px; height: 30px; accent-color: var(--primary); flex: none; }
.msg { border-radius: 12px; padding: 14px 18px; margin-bottom: 18px; font-weight: 600; border: 2px solid; }
.msg-bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.msg-ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.form-narrow { max-width: 560px; }
.code-box { font-size: 2rem; font-weight: 700; letter-spacing: .08em; text-align: center; background: var(--accent-soft); border: 3px dashed var(--accent-ink); border-radius: var(--radius); padding: 22px 12px; margin: 18px 0; font-variant-numeric: tabular-nums; }
.options { display: grid; gap: 12px; }
.options-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 620px) { .options-4 { grid-template-columns: repeat(2, 1fr); } }
.option { min-height: 64px; min-width: 0; padding-left: 8px; padding-right: 8px; }
.option[aria-pressed="true"] { background: var(--primary); color: #fff; border-color: var(--primary-dark); }

.dialog { border: 3px solid var(--ink); border-radius: var(--radius); padding: 26px; width: min(560px, calc(100vw - 32px)); color: var(--ink); background: var(--surface); }
.dialog::backdrop { background: rgba(28, 43, 51, .6); }
.dialog h2 { margin-bottom: 14px; }

/* ---------- articole ---------- */

.prose { max-width: 42em; }
.prose h2 { margin-top: 1.5em; }
.prose h3 { margin-top: 1.3em; }
.prose li { margin-bottom: .55em; }
.prose .source { font-size: .85rem; color: var(--ink-2); border-left: 4px solid var(--line); padding-left: 14px; margin-top: 28px; }
.prose .source li { margin-bottom: .7em; }
.callout { background: var(--accent-soft); border-left: 6px solid var(--accent); border-radius: 0 var(--radius-s) var(--radius-s) 0; padding: 16px 20px; margin: 20px 0; }
.callout > :last-child { margin-bottom: 0; }
.article-list { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.proverb { font-size: 1.15rem; font-style: italic; margin-bottom: .4em; }

/* ---------- exerciții: cadru comun ---------- */

.stage-wrap { max-width: 760px; margin: 0 auto; }
.stage-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.stage-bar h1 { font-size: 1.1rem; margin: 0; flex: 1; }
.stage-bar .btn { min-height: 52px; padding: 6px 18px; font-size: .9rem; }
.progress { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.progress-track { flex: 1; height: 14px; background: var(--surface-2); border: 2px solid var(--line); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 999px; transition: width .3s; }
.stage { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 22px; min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; position: relative; box-shadow: var(--shadow); }
.stage .prompt { font-size: 1.2rem; font-weight: 700; margin: 0; max-width: 28em; }
.stage .sub { color: var(--ink-2); margin: 0; }
.feedback { min-height: 64px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 22px; border-radius: 14px; font-weight: 700; font-size: 1.1rem; border: 2px solid; width: 100%; max-width: 520px; }
.feedback.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.feedback.bad { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-ink); }

.choices { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; width: 100%; max-width: 560px; }
.choices.one-col { grid-template-columns: minmax(0, 1fr); }
.choice { min-height: 72px; min-width: 0; padding: 10px 12px; font-size: 1.15rem; overflow-wrap: anywhere; background: var(--surface); border: 3px solid var(--primary); color: var(--ink); border-radius: 16px; }
.choice:hover { background: var(--primary-soft); }
.choice .choice-emoji { font-size: 1.9rem; line-height: 1; }
.choice.is-right { background: var(--ok); border-color: var(--ok); color: #fff; }
.choice.is-wrong { background: var(--accent-soft); border-color: var(--accent-ink); border-style: dashed; color: var(--accent-ink); }

.keypad { display: grid; grid-template-columns: repeat(3, 76px); gap: 10px; justify-content: center; }
.keypad .btn { min-height: 68px; padding: 0; font-size: 1.5rem; background: var(--surface); border: 3px solid var(--primary); }
.keypad .btn.key-wide { font-size: .95rem; }
.keypad .btn.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary-dark); }
.keypad .btn.btn-primary[disabled] { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); opacity: 1; }
.entry { min-height: 68px; min-width: 240px; padding: 8px 20px; border: 3px solid var(--ink); border-radius: 14px; font-size: 2rem; font-weight: 700; letter-spacing: .25em; display: flex; align-items: center; justify-content: center; background: #fff; font-variant-numeric: tabular-nums; }
.big-digit { font-size: 6rem; font-weight: 700; line-height: 1; height: 1.2em; color: var(--primary); font-variant-numeric: tabular-nums; }

/* privire rapidă */
.ufov { position: relative; width: min(100%, 440px); aspect-ratio: 1; background: #F7F3EA; border: 3px solid var(--ink); border-radius: 50%; flex: none; }
.ufov .spot { position: absolute; width: 17%; aspect-ratio: 1; transform: translate(-50%, -50%); display: grid; place-items: center; font-size: clamp(1.6rem, 9vw, 3rem); line-height: 1; }
.ufov .center { left: 50%; top: 50%; width: 24%; font-size: clamp(2.2rem, 12vw, 4rem); }
.ufov .cross { font-size: 2.4rem; font-weight: 700; color: var(--ink); }
.ufov button.spot { border: 3px solid var(--primary); background: var(--surface); border-radius: 50%; cursor: pointer; font: inherit; font-weight: 700; font-size: 1.1rem; color: var(--primary); padding: 0; }
.ufov button.spot:hover { background: var(--primary-soft); }
.ufov button.spot.is-right { background: var(--ok); border-color: var(--ok); color: #fff; }
.ufov button.spot.is-wrong { background: var(--accent-soft); border-color: var(--accent-ink); border-style: dashed; }
.ufov.masked { background: repeating-conic-gradient(#1C2B33 0 9deg, #F7F3EA 9deg 18deg); }

/* liste / grile de ales */
.item-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; width: 100%; }
.item-list li { display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 16px; border: 2px solid var(--line); border-radius: 12px; font-size: 1.15rem; font-weight: 600; text-align: left; background: var(--surface); }
.item-list .em { font-size: 1.8rem; line-height: 1; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; width: 100%; }
.pick { min-height: 64px; padding: 8px 12px; justify-content: flex-start; gap: 10px; background: var(--surface); border: 3px solid var(--line); font-size: 1rem; font-weight: 600; text-align: left; }
.pick .em { font-size: 1.6rem; line-height: 1; }
.pick[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 2px var(--primary); }
.pick.is-right { border-color: var(--ok); background: var(--ok-soft); }
.pick.is-wrong { border-color: var(--accent-ink); background: var(--accent-soft); }
.pick.is-missed { border-color: var(--primary); background: var(--primary-soft); border-style: dashed; }

/* chipuri */
.face { width: 190px; height: 190px; border-radius: 24px; border: 3px solid var(--line); background: #EEF3F5; overflow: hidden; flex: none; }
.face svg { display: block; width: 100%; height: 100%; }
.face-name { font-size: 1.6rem; font-weight: 700; color: var(--primary); margin: 0; }

/* calea luminată */
.corsi { display: grid; gap: 12px; width: min(100%, 400px); }
.corsi button { aspect-ratio: 1; border-radius: 16px; border: 3px solid var(--primary); background: var(--primary-soft); cursor: pointer; padding: 0; font: inherit; font-size: 1.4rem; font-weight: 700; color: #fff; }
.corsi button.lit { background: var(--accent); border-color: #B97A14; transform: scale(1.04); }
.corsi button.tapped { background: var(--primary); }
.corsi button.is-wrong { background: var(--accent); border-color: var(--accent-ink); border-style: dashed; }
.corsi.locked button { cursor: default; }

/* culoarea cuvântului */
.stroop { background: #16232B; border-radius: 20px; width: 100%; max-width: 520px; min-height: 150px; display: grid; place-items: center; padding: 20px; border: 6px solid #16232B; }
.stroop.framed { border-color: #fff; outline: 4px dashed #16232B; outline-offset: -14px; background: #2E3F49; }
.stroop-word { font-size: clamp(2.6rem, 11vw, 4rem); font-weight: 800; letter-spacing: .04em; line-height: 1.1; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .35); flex: none; }
.timer-track { width: 100%; max-width: 520px; height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 2px solid var(--line); }
.timer-fill { height: 100%; background: var(--accent); width: 100%; transform-origin: left; }

/* numere și litere */
.trail { position: relative; width: 100%; height: min(56vh, 520px); min-height: 340px; background: #F7F3EA; border: 3px solid var(--line); border-radius: 16px; touch-action: manipulation; }
.trail button { position: absolute; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; border: 3px solid var(--primary); background: var(--surface); font: inherit; font-size: 1.25rem; font-weight: 700; color: var(--ink); cursor: pointer; padding: 0; }
.trail button.done { background: var(--primary); color: #fff; }
.trail button.oops { background: var(--accent-soft); border-color: var(--accent-ink); animation: shake .35s; }
.trail svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* cuvântul ascuns */
.slots, .letters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.slot { width: 56px; height: 64px; border-bottom: 5px solid var(--ink); font-size: 1.9rem; font-weight: 700; display: grid; place-items: center; text-transform: uppercase; }
.slot.filled { border-color: var(--primary); color: var(--primary); }
.letter { width: 62px; min-height: 66px; padding: 0; font-size: 1.7rem; text-transform: uppercase; background: var(--surface); border: 3px solid var(--primary); border-radius: 14px; }
.letter.used { visibility: hidden; }
.slots.oops { animation: shake .35s; }
.slots.oops .slot { border-color: var(--accent-ink); color: var(--accent-ink); }
.definition { font-size: 1.2rem; font-weight: 600; max-width: 26em; margin: 0; }

/* socoteli */
.sum { font-size: clamp(1.9rem, 8vw, 2.8rem); font-weight: 800; font-variant-numeric: tabular-nums; margin: 0; }
.story { font-size: 1.2rem; font-weight: 600; max-width: 26em; margin: 0; }

/* perechi */
.pairs { display: grid; gap: 10px; width: 100%; max-width: 620px; }
.pair-card { aspect-ratio: 1; min-height: 60px; border-radius: 14px; border: 3px solid var(--primary-dark); background: var(--primary); cursor: pointer; font-size: clamp(1.6rem, 7vw, 2.6rem); line-height: 1; padding: 0; display: grid; place-items: center; color: transparent; }
.pair-card::after { content: "?"; color: rgba(255, 255, 255, .55); font-size: 1.6rem; font-weight: 700; font-family: var(--font); }
.pair-card.open, .pair-card.found { background: var(--surface); color: inherit; }
.pair-card.open::after, .pair-card.found::after { content: none; }
.pair-card.found { border-color: var(--ok); background: var(--ok-soft); cursor: default; }

/* rezultat */
.result-hero { text-align: center; }
.result-hero .big-emoji { font-size: 4rem; }
.result-score { font-size: 1.25rem; font-weight: 700; }
.level-change { display: inline-flex; align-items: center; gap: 10px; padding: 10px 20px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }

/* ---------- grafice ---------- */

.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--font); fill: var(--ink-2); }
.bar-row { display: grid; grid-template-columns: minmax(130px, 1.1fr) 3fr auto; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 2px solid var(--surface-2); }
.bar-row:last-child { border-bottom: 0; }
.bar-row .bar-name { font-weight: 700; }
.bar-row .bar-name small { display: block; font-weight: 400; color: var(--ink-2); font-size: .8rem; }
/* coloane pe săptămâni (HTML, nu SVG, ca literele să rămână mari pe orice ecran) */
.wc { padding-left: 30px; }
.wc-plot { position: relative; height: 200px; }
.wc-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid #E7DFD1; }
.wc-grid.goal { border-top: 2px solid #9A8F7C; }
.wc-tick { position: absolute; left: -30px; top: -.75em; width: 22px; text-align: right; font-size: .75rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.wc-goal-label { position: absolute; left: 4px; top: -1.6em; font-size: .75rem; color: var(--ink-2); background: var(--surface); padding: 0 4px; }
.wc-cols { position: absolute; inset: 0; display: flex; align-items: flex-end; }
.wc-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.wc-bar { width: 24px; background: var(--primary); border-radius: 4px 4px 0 0; }
.wc-value { font-weight: 700; font-size: .95rem; color: var(--ink); margin-bottom: 4px; }
.wc-axis { display: flex; border-top: 1px solid #9A8F7C; padding-top: 6px; }
.wc-label { flex: 1; text-align: center; font-size: .72rem; color: var(--ink-2); line-height: 1.3; }
@media (max-width: 560px) { .wc-label { font-size: .62rem; } .wc-bar { width: 18px; } }

.bar-track { height: 22px; background: var(--primary-soft); border-radius: 6px; overflow: hidden; position: relative; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 6px 4px 4px 6px; min-width: 4px; }
.bar-value { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 620px) { .bar-row { grid-template-columns: 1fr auto; } .bar-row .bar-track { grid-column: 1 / -1; order: 3; } }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.badge { border: 2px solid var(--line); border-radius: var(--radius-s); padding: 16px; background: var(--surface); text-align: center; }
.badge .badge-emoji { font-size: 2.4rem; line-height: 1.1; }
.badge b { display: block; margin-top: 6px; }
.badge span { font-size: .85rem; color: var(--ink-2); }
.badge.locked { background: var(--surface-2); border-style: dashed; }
.badge.locked .badge-emoji { filter: grayscale(1); opacity: .45; }
.badge.earned { border-color: var(--ok); background: var(--ok-soft); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { text-align: left; padding: 10px 8px; border-bottom: 2px solid var(--surface-2); }
table.data th { color: var(--ink-2); font-weight: 600; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .main-nav, .btn, .no-print { display: none !important; }
  body { background: #fff; padding: 0; }
  .card { box-shadow: none; }
}

/* ---------- jocuri: rebus, sudoku, cuvinte ascunse ---------- */

.puzzle { display: flex; flex-direction: column; align-items: center; gap: 14px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); text-align: center; }
.puzzle .prompt { font-size: 1.2rem; font-weight: 700; margin: 0; }
.puzzle .sub { margin: 0; color: var(--ink-2); min-height: 1.6em; }
.puzzle h3 { margin: 0 0 8px; }
.puzzle .btn-row { margin-top: 0; }
@media (max-width: 899px) { .puzzle { padding: 14px 12px; } }

/* rebus */
.rb-clue { width: 100%; max-width: 560px; background: var(--accent-soft); border: 2px solid #E3C48C; border-radius: 12px; padding: 12px 16px; font-size: 1.05rem; text-align: left; min-height: 3.6em; }
.rb-grid { display: grid; gap: 3px; width: min(100%, 468px); }
.rb-block { aspect-ratio: 1; }
.rb-cell { aspect-ratio: 1; min-width: 0; position: relative; border: 2px solid #6B7A82; border-radius: 6px; background: #fff; padding: 0; font: inherit; cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.rb-letter { font-size: clamp(1rem, 4.6vw, 1.5rem); font-weight: 700; line-height: 1; }
.rb-num { position: absolute; left: 3px; top: 1px; font-size: clamp(11px, 2.4vw, 14px); font-weight: 700; color: var(--ink-2); line-height: 1.2; }
.rb-cell.solved { background: var(--ok-soft); border-color: var(--ok); }
.rb-cell.in-word { background: var(--primary-soft); border-color: var(--primary); }
.rb-cell.retry { background: var(--accent-soft); border-color: var(--accent-ink); border-style: dashed; }
.rb-cell.current { background: var(--accent); border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); z-index: 1; }
.kb { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; width: min(100%, 560px); }
.kb-key { min-height: 52px; min-width: 0; padding: 0; font-size: 1.2rem; background: #fff; border: 2px solid var(--primary); border-radius: 10px; }
.kb-key:hover { background: var(--primary-soft); }
.kb-wide { grid-column: span 2; font-size: .95rem; }
.rb-details { width: 100%; text-align: left; }
.rb-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px; }
@media (max-width: 700px) { .rb-lists { grid-template-columns: 1fr; } }
.rb-list { list-style: none; padding: 0; margin: 0; }
.rb-list li { margin: 0; }
.rb-item { text-align: left; text-decoration: none; color: var(--ink); padding: 8px 4px; }
.rb-item.active { font-weight: 700; color: var(--primary); }
.rb-item.done { color: var(--ok); }

/* sudoku */
.sd-grid { display: grid; gap: 1px; width: min(100%, 468px); background: var(--ink); border: 3px solid var(--ink); border-radius: 8px; overflow: hidden; }
.sd-6 { width: min(100%, 380px); }
.sd-4 { width: min(100%, 15rem); }
.sd-cell { aspect-ratio: 1; align-self: stretch; justify-self: stretch; min-width: 0; border: 0; background: #fff; font: inherit; font-size: clamp(1.1rem, 5vw, 1.7rem); font-weight: 500; color: var(--primary); padding: 0; cursor: pointer; }
.sd-cell.bl { margin-left: 2px; }
.sd-cell.bt { margin-top: 2px; }
.sd-cell.given { color: var(--ink); font-weight: 800; background: #F4EFE6; }
.sd-cell.peer { background: #E8F2F2; }
.sd-cell.given.peer { background: #E3E8E0; }
.sd-cell.same { background: #FCE9C4; }
.sd-cell.retry { color: var(--accent-ink); background: var(--accent-soft); text-decoration: underline dashed; text-underline-offset: 4px; }
.sd-cell.selected { background: var(--accent); color: var(--ink); }
.sd-pad { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; width: min(100%, 468px); }
.sd-key { min-height: 60px; min-width: 0; padding: 0; font-size: 1.5rem; background: #fff; border: 3px solid var(--primary); }
.sd-key:hover { background: var(--primary-soft); }
.sd-key.complete { opacity: .35; }
.sd-wide { font-size: .8rem; }

/* cuvinte ascunse */
.ws-grid { display: grid; gap: 3px; width: min(100%, 468px); }
.ws-cell { aspect-ratio: 1; min-width: 0; border: 2px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: clamp(1rem, 4.6vw, 1.5rem); font-weight: 700; padding: 0; cursor: pointer; color: var(--ink); }
.ws-cell.found { background: var(--ok-soft); border-color: var(--ok); }
.ws-cell.hint { background: var(--accent-soft); border-color: var(--accent-ink); border-width: 3px; animation: blink 1s 4; }
.ws-cell.start { background: var(--accent); border-color: var(--ink); }
@keyframes blink { 50% { background: var(--accent); } }
.ws-words { width: 100%; }
.ws-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; justify-content: center; }
.ws-list li { margin: 0; padding: 6px 14px; border: 2px solid var(--line); border-radius: 999px; font-weight: 600; }
.ws-list li.found { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }

/* ---------- îndrumarul jocurilor: pași cu figuri ---------- */

.guide-invite { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; }
.guide-invite > div { flex: 1 1 18rem; }
.guide-invite h2 { color: #fff; }
.guide-invite p { margin: 0; color: #E4F2F2; }
.play-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; margin: 0 0 8px; }

.guide { scroll-margin-top: 16px; }
.guide-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 12px; }
.guide-count { margin: 0; font-size: .85rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); }
.guide-dots { display: flex; gap: .45rem; }
.guide-dots span { width: .8rem; height: .8rem; border-radius: 50%; border: 2px solid var(--primary); }
.guide-dots .done { background: var(--primary); }
.guide-dots .now { background: var(--accent); border-color: var(--ink); transform: scale(1.3); }
.guide-title { margin: 0 0 18px; font-size: 1.45rem; }
.guide-title:focus { outline: none; }
.guide-body { display: grid; gap: 20px 30px; align-items: start; }
@media (min-width: 900px) { .guide-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
/* pe telefon, cele două butoane stau pe un singur rând: „Înapoi” scurt, „Mai departe” cât restul */
@media (max-width: 899px) {
  .guide-nav { flex-wrap: nowrap; }
  .guide-nav .btn { padding-left: 16px; padding-right: 16px; }
  .guide-nav .btn-quiet svg { display: none; }
  .guide-nav .btn-big { flex: 1 1 auto; min-height: 64px; font-size: 1.1rem; }
}
.guide-text > :last-child { margin-bottom: 0; }
.guide-list { padding-left: 1.2em; }
.guide-list li { margin-bottom: 10px; }
.guide-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 2px solid var(--surface-2); }

.guide-fig { margin: 0; background: var(--surface-2); border: 2px solid var(--line); border-radius: var(--radius-s); padding: 18px 14px 14px; text-align: center; }
.guide-fig figcaption { margin-top: 14px; font-size: .9rem; color: var(--ink-2); }
.guide-fig-art { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.guide-fig * { cursor: default; }
.gd-panels { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 16px 14px; width: 100%; }
.gd-panel, .gd-solo { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(100%, var(--gd-w, 10rem)); }
.gd-label { margin: 0; font-size: .85rem; font-weight: 700; line-height: 1.3; }
.guide-fig .sd-grid, .guide-fig .rb-grid, .guide-fig .ws-grid { width: 100%; }
.guide-fig .sd-cell, .guide-fig .ws-cell { display: grid; place-items: center; position: relative; line-height: 1; }
.guide-fig .sd-cell { font-size: 1.15rem; }
.guide-fig .ws-cell, .guide-fig .rb-letter { font-size: 1.05rem; }
.guide-fig .rb-clue { font-size: .9rem; min-height: 0; padding: 8px 12px; }
.guide-fig .rb-num { font-size: .68rem; }
.guide-fig .ws-list { font-size: .85rem; }
.guide-fig .ws-list li { padding: 3px 10px; background: var(--surface); }
.guide-fig .ws-list li.found { background: var(--ok-soft); }

/* semnele de pe figuri: zonă colorată, căsuța întrebată, cifră încercuită, ordinea atingerilor */
.guide-fig .gd-dim { color: #8B979D; font-weight: 500; }
.guide-fig .gd-hi { background: var(--primary-soft); }
.guide-fig .gd-ask { background: var(--accent); color: var(--ink); font-weight: 800; }
.guide-fig .ws-cell.gd-ask, .guide-fig .ws-cell.gd-hi { border-color: var(--ink); }
.guide-fig .gd-ring::after { content: ""; position: absolute; inset: 7%; border: 3px solid var(--accent-ink); border-radius: 50%; }
.gd-tap { position: relative; }
.gd-tap::before { content: attr(data-tap); position: absolute; right: -.5rem; top: -.5rem; z-index: 2; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--ink); color: #fff; font-size: .75rem; font-weight: 700; line-height: 1; display: grid; place-items: center; }
.guide-fig .sd-cell.gd-tap::before { right: 2px; top: 2px; }
.gd-keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.gd-key { min-width: 2.2rem; height: 2.4rem; padding: 0 .45rem; display: grid; place-items: center; background: #fff; border: 3px solid var(--primary); border-radius: 10px; font-weight: 700; }
.gd-key.wide { font-size: .8rem; }
.gd-clues { width: 100%; margin: 0; text-align: left; font-size: .9rem; }
.gd-clues dt { font-weight: 700; margin-top: 6px; }
.gd-clues dd { margin: 0; }

.guide-dialog { width: min(900px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); overflow-y: auto; padding-bottom: 0; }
/* butoanele „Înapoi” și „Mai departe” rămân mereu la vedere, oricât de lung ar fi pasul */
.guide-dialog .guide-nav { position: sticky; bottom: 0; background: var(--surface); padding-bottom: 18px; margin-top: 18px; }
.guide-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.guide-dialog-head h2 { margin: 0; font-size: 1.2rem; }
.guide-dialog-head .btn { min-height: 52px; padding: 6px 16px; font-size: .9rem; }
.guide-dialog .guide-title { font-size: 1.3rem; }
@media (max-width: 899px) { .guide-dialog { padding: 18px 14px 0; } }
