/* Angolóra – az angol szöveg mindig szedett betűvel (Literata) és sárga kiemelővel,
   a magyar mindig groteszkkel (Figtree) jelenik meg: ránézésre látszik, melyik nyelv melyik. */
@font-face { font-family: Literata; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(/fonts/literata-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: Literata; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(/fonts/literata-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Literata; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url(/fonts/literata-latin-ext-wght-italic.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: Literata; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url(/fonts/literata-latin-wght-italic.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Figtree; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(/fonts/figtree-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: Figtree; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(/fonts/figtree-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --paper: #f2f5fa; --surface: #ffffff; --ink: #14213d; --muted: #586380; --line: #d7deeb;
  --accent: #1f4fd8; --on-accent: #ffffff; --marker: #ffe066; --marker-ink: #14213d;
  --good: #17805a; --good-bg: #e2f4ec; --bad: #bf3a22; --bad-bg: #fbe7e2;
  --hu: Figtree, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --en: Literata, 'Iowan Old Style', Georgia, serif;
  --r: 14px; --tabs-h: 58px;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --paper: #0e1526; --surface: #172038; --ink: #e8edf8; --muted: #9aa6c4; --line: #2a3555;
  --accent: #8eabff; --on-accent: #0e1526; --marker: #6b5a12; --marker-ink: #fff3c4;
  --good: #5fd09c; --good-bg: #143629; --bad: #ff9a86; --bad-bg: #40201b;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0e1526; --surface: #172038; --ink: #e8edf8; --muted: #9aa6c4; --line: #2a3555;
    --accent: #8eabff; --on-accent: #0e1526; --marker: #6b5a12; --marker-ink: #fff3c4;
    --good: #5fd09c; --good-bg: #143629; --bad: #ff9a86; --bad-bg: #40201b;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.5 var(--hu); -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

#view { max-width: 600px; margin: 0 auto; padding: calc(20px + env(safe-area-inset-top)) 20px calc(var(--tabs-h) + 36px + env(safe-area-inset-bottom)); outline: none; }
#view.full { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }

/* az angol szöveg */
.en { font-family: var(--en); font-weight: 500; letter-spacing: -0.005em; }
.mark { background: linear-gradient(transparent 58%, var(--marker) 58%, var(--marker) 94%, transparent 94%); color: inherit; padding: 0 .12em; margin: 0 -.12em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
:root[data-theme='dark'] .mark { color: var(--marker-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .mark { color: var(--marker-ink); } }
.pron { font-family: var(--en); font-style: italic; color: var(--muted); font-size: .92em; }
.pron::before, .pron::after { content: '/'; opacity: .55; margin: 0 .08em; }
.hu-small { color: var(--muted); font-size: .94em; }

/* gombok */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--accent); background: var(--accent); color: var(--on-accent); font-weight: 650; font-size: 1rem; text-decoration: none; }
.btn.block { width: 100%; }
.btn.quiet { background: transparent; color: var(--accent); }
.btn.plain { background: transparent; border-color: var(--line); color: var(--ink); font-weight: 550; }
.btn:disabled { opacity: .45; cursor: default; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.say { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); display: inline-grid; place-items: center; padding: 0; }
.say svg, .icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.say.big { width: 76px; height: 76px; border-color: var(--accent); color: var(--accent); }
.say.big svg { width: 32px; height: 32px; }
.say.live { background: var(--bad); border-color: var(--bad); color: #fff; }
.linkish { background: none; border: 0; padding: 8px 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* bejelentkezés */
.login { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.login h1 { font: 600 2.6rem/1.1 var(--en); }
.login form { display: grid; gap: 12px; }
.field { width: 100%; min-height: 52px; padding: 0 16px; border-radius: var(--r); border: 1.5px solid var(--line); background: var(--surface); font-size: 1.05rem; }
.field:focus { border-color: var(--accent); outline: none; }
.error { color: var(--bad); font-weight: 550; }

/* főoldal */
.hello { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 22px; }
.hello h1 { font-size: 1.15rem; font-weight: 650; }
.streak { color: var(--muted); font-size: .95rem; white-space: nowrap; }
.streak b { color: var(--ink); }
.next { border-top: 3px solid var(--ink); padding: 18px 0 26px; }
.next .num { font: italic 500 1.05rem var(--en); color: var(--muted); }
.next h2 { font-size: 2rem; line-height: 1.12; font-weight: 750; letter-spacing: -0.02em; margin: 4px 0 6px; text-wrap: balance; }
.next p { color: var(--muted); margin-bottom: 18px; }
.review { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; margin-bottom: 26px; border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--line); text-decoration: none; color: inherit; }
.review b { font-weight: 650; }
.review span:last-child { color: var(--accent); font-weight: 650; white-space: nowrap; }
.unit { margin-top: 26px; }
.unit > h3 { font-size: 1.05rem; font-weight: 750; }
.unit > p { color: var(--muted); font-size: .94rem; margin-bottom: 8px; }
.toc { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--line); }
.toc li { border-bottom: 1.5px solid var(--line); }
.toc a, .toc .locked { display: grid; grid-template-columns: 2.2em 1fr auto; gap: 6px; align-items: baseline; padding: 12px 2px; text-decoration: none; color: inherit; }
.toc .n { font: italic 500 .98rem var(--en); color: var(--muted); }
.toc .locked { color: var(--muted); opacity: .62; }
.toc .st { font-size: .86rem; color: var(--muted); white-space: nowrap; }
.toc .st.done { color: var(--good); font-weight: 650; }
.toc .st.now { color: var(--accent); font-weight: 650; }

/* lecke */
.bar { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.close { flex: none; width: 40px; height: 40px; margin-left: -8px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.track { flex: 1; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.track i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .3s ease; }
.lesson-head .num { font: italic 500 1rem var(--en); color: var(--muted); }
.lesson-head h1 { font-size: 1.9rem; line-height: 1.12; font-weight: 750; letter-spacing: -0.02em; margin: 2px 0 24px; text-wrap: balance; }
.sec { margin-bottom: 30px; }
.sec h2 { font-size: 1.15rem; font-weight: 750; margin-bottom: 6px; }
.sec > p { max-width: 62ch; }
.entries { list-style: none; margin: 14px 0 0; padding: 0; }
.entry { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1.5px solid var(--line); }
.entry:last-child { border-bottom: 1.5px solid var(--line); }
.entry .txt { flex: 1; min-width: 0; }
.entry .en { font-size: 1.22rem; line-height: 1.3; }
.entry .sub { display: block; margin-top: 2px; font-size: .95rem; color: var(--muted); }
.entry .sub .hu { color: var(--ink); }
.sticky { position: sticky; bottom: calc(14px + env(safe-area-inset-bottom)); margin-top: 26px; }
.loading { min-height: 60vh; display: grid; place-content: center; text-align: center; gap: 10px; color: var(--muted); }
.loading strong { color: var(--ink); font-size: 1.15rem; }
.dots::after { content: ''; animation: dots 1.4s steps(4, end) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

/* feladatok */
.task { min-height: 62vh; display: flex; flex-direction: column; }
.task .what { color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.task .prompt { font-size: 1.5rem; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 22px; text-wrap: balance; }
.task .prompt.en { font-weight: 500; font-size: 1.7rem; }
.task .center { display: grid; justify-items: center; gap: 14px; margin: 10px 0 24px; text-align: center; }
.opts { display: grid; gap: 10px; }
.opt { text-align: left; min-height: 54px; padding: 12px 16px; border-radius: var(--r); border: 1.5px solid var(--line); background: var(--surface); font-size: 1.08rem; }
.opt[aria-pressed='true'] { border-color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.opt.right { border-color: var(--good); background: var(--good-bg); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.line { min-height: 62px; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; padding: 10px 0 14px; border-bottom: 2px solid var(--ink); margin-bottom: 18px; }
.bank { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 6px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); font: 500 1.12rem var(--en); }
.chip.used { visibility: hidden; }
.heard { min-height: 1.6em; font-size: 1.15rem; }
.spacer { flex: 1; min-height: 20px; }
.verdict { margin: 20px -20px 0; padding: 16px 20px 6px; border-top: 2px solid; }
.verdict.ok { border-color: var(--good); background: var(--good-bg); }
.verdict.no { border-color: var(--bad); background: var(--bad-bg); }
.verdict h3 { font-size: 1.1rem; font-weight: 750; }
.verdict.ok h3 { color: var(--good); }
.verdict.no h3 { color: var(--bad); }
.verdict .en { font-size: 1.2rem; display: block; margin-top: 4px; }
.verdict p { margin-top: 4px; }
.actions { display: grid; gap: 10px; margin-top: 16px; }
.finish { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.finish h1 { font: 600 2.6rem/1.1 var(--en); }
.finish ul { margin: 0 0 12px; padding-left: 1.2em; }

/* szókártyák */
.flash { min-height: 46vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 12px; padding: 28px 18px; border-radius: 20px; background: var(--surface); border: 1.5px solid var(--line); }
.flash .q { font-size: 1.7rem; font-weight: 700; line-height: 1.2; }
.flash .a { font-size: 2.1rem; line-height: 1.2; }
.grades { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.grades .btn { padding: 0 6px; font-size: .96rem; }
.count { color: var(--muted); margin-bottom: 14px; }
.empty { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.empty h1 { font-size: 1.7rem; line-height: 1.15; font-weight: 750; letter-spacing: -0.02em; }
.empty p { color: var(--muted); max-width: 46ch; }

/* tanár */
.page-title { font-size: 1.7rem; font-weight: 750; letter-spacing: -0.02em; margin-bottom: 4px; }
.page-sub { color: var(--muted); margin-bottom: 18px; }
.scenes { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--line); }
.scenes a { display: block; padding: 14px 2px; border-bottom: 1.5px solid var(--line); text-decoration: none; color: inherit; }
.scenes b { display: block; font-weight: 650; }
.scenes span { color: var(--muted); font-size: .94rem; }
.chat-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.chat-top h1 { flex: 1; font-size: 1.1rem; font-weight: 700; }
.msgs { display: flex; flex-direction: column; gap: 14px; padding-bottom: 96px; }
.msg { max-width: 88%; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 18px 18px 4px 18px; }
.msg.t { align-self: flex-start; }
.msg.t .bubble { background: var(--surface); border: 1.5px solid var(--line); padding: 12px 14px; border-radius: 18px 18px 18px 4px; display: flex; gap: 10px; align-items: flex-start; }
.msg.t .en { font-size: 1.15rem; line-height: 1.4; display: block; }
.msg.t .hu-small { display: block; margin-top: 4px; }
.fix { margin-bottom: 6px; padding: 8px 12px; border-left: 3px solid var(--marker); font-size: .95rem; }
.fix .en { display: block; font-size: 1.05rem; }
.composer { position: fixed; left: 0; right: 0; bottom: 0; background: var(--paper); border-top: 1.5px solid var(--line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
.composer form { max-width: 572px; margin: 0 auto; display: flex; gap: 8px; align-items: center; }
.composer .field { flex: 1; min-width: 0; border-radius: 999px; min-height: 46px; }
.send { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; padding: 0; }
.send:disabled { opacity: .45; }

/* beállítások */
.set { border-top: 1.5px solid var(--line); padding: 16px 0; }
.set h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.set p { color: var(--muted); font-size: .95rem; margin-bottom: 10px; max-width: 52ch; }
.row + .row { margin-top: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row label { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.row input[type='checkbox'] { width: 22px; height: 22px; accent-color: var(--accent); }
.row input[type='time'] { min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; min-height: 42px; padding: 0 16px; }
.seg button[aria-pressed='true'] { background: var(--ink); color: var(--paper); font-weight: 650; }

/* alsó menü */
#tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--paper); border-top: 1.5px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
#tabs a { position: relative; display: grid; place-items: center; height: var(--tabs-h); color: var(--muted); text-decoration: none; font-size: .93rem; font-weight: 600; }
#tabs a[aria-current='page'] { color: var(--ink); }
#tabs a[aria-current='page']::before { content: ''; position: absolute; top: -1.5px; left: 22%; right: 22%; height: 3px; background: var(--ink); }
#due-badge { position: absolute; top: 7px; left: calc(50% + 30px); min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--marker); color: #14213d; font-size: .74rem; font-weight: 750; display: grid; place-items: center; }
#toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + 22px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 10; max-width: min(92vw, 520px); padding: 12px 18px; border-radius: 12px; background: var(--ink); color: var(--paper); font-weight: 550; opacity: 0; pointer-events: none; transition: opacity .2s; }
#toast.show { opacity: 1; }

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