/* English · nauka ze słuchu — wspólny arkusz stylów (wszystkie strony). Tryb jasny i ciemny wg ustawień systemu. Bazuje na arkuszu aplikacji chińskiej. */
:root {
  --bg: #f4f6f9; --bg2: #eaeef4; --card: #ffffff; --card2: #f7f9fc; --ink: #17191e; --muted: #6b7079; --faint: #a3a7ae;
  --accent: #1f5fa8; --accent-strong: #174a85; --accent-soft: #e4eefb; --grid: #dfe4ec; --line: #e7ebf1; --bad: #c2321c; --bad-soft: #fbe9e5;
  --ok: #1d7f46; --ok-soft: #e1f4e8; --warn: #b3620c; --warn-soft: #fbefdc; --info: #6d4fc2; --info-soft: #eee9fb;
  --shadow: 0 1px 2px rgba(20, 20, 30, .05), 0 4px 10px -4px rgba(20, 20, 30, .10), 0 18px 36px -18px rgba(20, 20, 30, .20);
  --shadow-up: 0 2px 4px rgba(20, 20, 30, .06), 0 10px 20px -8px rgba(20, 20, 30, .16), 0 28px 48px -20px rgba(20, 20, 30, .24);
  --radius: 20px; --font: "Inter", -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --font-zh: "Fraunces", Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131417; --bg2: #1a1b20; --card: #1e2026; --card2: #24262d; --ink: #ecedf0; --muted: #a2a6b0; --faint: #6b6f78;
    --accent: #7cb0f5; --accent-strong: #96c2ff; --accent-soft: #1a2b45; --grid: #30333b; --line: #2a2d34; --bad: #f0654e; --bad-soft: #3a1f1a;
    --ok: #5fcf8a; --ok-soft: #173525; --warn: #f0a74a; --warn-soft: #3a2a12; --info: #b39cf5; --info-soft: #2a2345;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 14px -6px rgba(0, 0, 0, .5), 0 20px 40px -18px rgba(0, 0, 0, .7);
    --shadow-up: 0 2px 4px rgba(0, 0, 0, .5), 0 12px 24px -8px rgba(0, 0, 0, .6), 0 30px 50px -20px rgba(0, 0, 0, .8);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; }
body { background-image: radial-gradient(900px 400px at 50% -200px, var(--accent-soft), transparent 70%); }
.app { max-width: 720px; margin: 0 auto; padding: 0 14px 100px; }

/* pasek zakładek (wspólny dla wszystkich stron) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; gap: 2px; padding: 6px 6px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--card) 86%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -16px rgba(20, 20, 30, .25); }
.tabbar a, .tabbar button { flex: 1; max-width: 132px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px 5px; border: 0; background: none; color: var(--muted); font-family: var(--font); font-size: 11px; font-weight: 600; text-decoration: none; border-radius: 14px; cursor: pointer; transition: color .15s, transform .1s, background .15s; }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar .on { color: var(--accent); background: var(--accent-soft); }
.tabbar a:active, .tabbar button:active { transform: scale(.92); }
.tabbar[hidden] { display: none !important; }
@media (min-width: 720px) { .tabbar { left: 50%; right: auto; transform: translateX(-50%); width: 720px; border-radius: 22px 22px 0 0; border: 1px solid var(--line); border-bottom: 0; } }

/* karta dnia i skróty na ekranie startowym */
.hero { display: flex; gap: 16px; align-items: center; padding: 20px 18px; }
.ring { position: relative; width: 94px; height: 94px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring .bg { stroke: var(--grid); }
.ring .fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray .9s cubic-bezier(.2, .8, .2, 1); }
.ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.hero-body { flex: 1; min-width: 0; }
.hero-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.hero .kicker { text-align: left; margin-bottom: 2px; }
.hero-line { font-size: 19px; font-weight: 600; line-height: 1.25; }
.hero-next { font-size: 13px; color: var(--muted); margin-top: 5px; }
.hero-next .zh { font-family: var(--font-zh); font-size: 18px; color: var(--ink); }
#stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 14px 0; }
@media (max-width: 480px) { #stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.shortcuts { display: grid; gap: 10px; margin-bottom: 14px; }
.shortcuts .card + .card { margin-top: 0; }
.sc { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: var(--ink); }
.sc .ic { width: 40px; height: 40px; padding: 8px; box-sizing: border-box; border-radius: 12px; background: var(--accent-soft); fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sc > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sc b { font-size: 15px; font-weight: 600; }
.sc small { font-size: 13px; color: var(--muted); }
.sc .chev { width: 20px; height: 20px; fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* karta z nagłówkiem i wierszami (Gramatyka: ogólna / klasyfikatory) */
.sc2 { padding: 14px 16px 4px; }
.sc2-head { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; }
.sc2-head .ic { width: 40px; height: 40px; padding: 8px; box-sizing: border-box; border-radius: 12px; background: var(--accent-soft); fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sc2-head b { font-size: 15px; font-weight: 600; }
.row { display: flex; align-items: center; gap: 12px; margin: 0 -16px; padding: 11px 16px 11px 68px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: background .15s; }
.row:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.row:active { background: var(--card2); }
.row > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.row b { font-size: 15px; font-weight: 600; }
.row small { font-size: 13px; color: var(--muted); }
.row .chev { width: 20px; height: 20px; fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* głębia: karty unoszą się, przyciski i kafelki mają „krawędź” i wciskają się */
.card { transition: transform .18s cubic-bezier(.2, .8, .2, 1), box-shadow .18s; }
@media (hover: hover) { a.card:hover, button.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-up); } }
a.card:active { transform: translateY(0) scale(.99); }
.actions button.primary, .gcard button, .gtile button { box-shadow: 0 3px 0 var(--accent-strong), 0 10px 20px -10px var(--accent); }
.actions button.primary:active, .gcard button:active, .gtile button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-strong); }
.actions button:not(.primary):not(.ghost) { box-shadow: 0 2px 0 var(--grid); }
.actions button:not(.primary):not(.ghost):active { transform: translateY(1px); box-shadow: 0 1px 0 var(--grid); }
.gopt, .tile { box-shadow: 0 3px 0 var(--grid); transition: transform .08s, box-shadow .08s, background .15s; }
.gopt:not(:disabled):active, .tile:not(:disabled):active { transform: translateY(2px); box-shadow: 0 1px 0 var(--grid); }
.gopt.ok, .tile.ok { box-shadow: 0 3px 0 var(--ok); }
.gopt.bad, .tile.bad { box-shadow: 0 3px 0 var(--bad); }
.place.open { box-shadow: 0 3px 0 var(--grid), var(--shadow); transition: transform .1s, box-shadow .1s; }
.place.open:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--grid), var(--shadow); }

/* animacje */
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.92); opacity: 0; } 60% { transform: scale(1.03); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes starpop { 0% { transform: scale(0) rotate(-40deg); } 70% { transform: scale(1.35) rotate(8deg); } 100% { transform: none; } }
.anim { animation: rise .38s cubic-bezier(.2, .8, .2, 1) both; }
section:not([hidden]) { animation: rise .32s cubic-bezier(.2, .8, .2, 1) both; }
.gfb { animation: pop .3s cubic-bezier(.2, .8, .2, 1) both; }
.gopt.bad, .tile.bad { animation: shake .35s; }
.pstars .on { display: inline-block; animation: starpop .55s cubic-bezier(.2, .8, .2, 1) both; }
.box.done { animation: pop .35s cubic-bezier(.2, .8, .2, 1); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* gry: siatka kart */
.gtiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 480px) { .gtiles { grid-template-columns: minmax(0, 1fr); } }
.gtiles .card + .card { margin-top: 0; }
.gtile { display: flex; flex-direction: column; gap: 6px; padding: 18px 16px 16px; }
.gtile .gicw { width: 44px; height: 44px; border-radius: 13px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; }
.gtile .gicw svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gtile h3 { margin: 6px 0 0; font-size: 17px; font-weight: 600; }
.gtile p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.45; flex: 1; }
.gtile button { margin-top: 10px; width: 100%; border: 1px solid var(--accent); border-radius: 999px; padding: 11px 18px; font-size: 15px; font-weight: 600; cursor: pointer; background: var(--accent); color: #fff; font-family: var(--font); transition: transform .08s, box-shadow .08s; }
.gtile button:disabled { opacity: .35; cursor: default; box-shadow: none; }
.gtile.wide { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 14px; }
.gtile.wide > div { flex: 1; min-width: 0; }
.gtile.wide h3 { margin-top: 0; }
.gtile.wide button { width: auto; margin-top: 0; flex: none; }
@media (max-width: 480px) { .gtile.wide { flex-wrap: wrap; } .gtile.wide button { width: 100%; margin-top: 4px; } }

/* nagłówek */
header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 -14px 14px; padding: 12px 14px; position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
header h1 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: .01em; display: flex; align-items: center; gap: 10px; text-transform: none; }
header h1::before { content: "En"; font-family: var(--font-zh); font-weight: 600; font-size: 14px; color: #fff; background: var(--accent); width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; }
header .hb { display: flex; gap: 6px; }
header button, header a { border: 1px solid var(--grid); background: var(--card); color: var(--ink); border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; font-family: var(--font); }
header button:active, header a:active { transform: scale(.97); }
.progress { height: 5px; background: var(--grid); border-radius: 3px; overflow: hidden; margin: -6px 0 14px; }
.progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .3s; border-radius: 3px; }

/* karty */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; font-weight: 600; }
.kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); text-align: center; margin-bottom: 8px; font-weight: 600; }
.kicker.new { color: var(--info); } .kicker.review { color: var(--warn); } .kicker.write { color: var(--ok); }

/* słowo */
.word { text-align: center; }
.word .hanzi { font-family: var(--font-zh); font-size: 72px; line-height: 1.15; font-weight: 500; letter-spacing: .06em; }
.word .hanzi.en { font-size: 44px; letter-spacing: 0; font-weight: 600; overflow-wrap: anywhere; }
.can-blur { transition: filter .35s; } .can-blur.blur, .hanzi.blur { filter: blur(10px); user-select: none; }
.word .pinyin { font-size: 20px; color: var(--accent); margin-top: 4px; font-weight: 500; }
.pos { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 6px; }
.word .meaning { font-size: 18px; margin-top: 6px; }
.word .meaning-en { font-size: 15px; color: var(--muted); margin-top: 4px; }
.meaning .sep { color: var(--faint); padding: 0 4px; }
.meaning .en { color: var(--muted); }
.ml { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--info); background: var(--info-soft); border-radius: 5px; padding: 1px 5px; margin-right: 5px; vertical-align: 2px; }
.en .ml { color: var(--muted); background: var(--bg2); }
.word .hidden-answer { color: var(--muted); font-size: 15px; margin: 12px 0 4px; }
button.audio { margin-top: 10px; border: 1px solid var(--grid); background: var(--card); color: var(--ink); border-radius: 999px; padding: 7px 16px; font-size: 14px; font-weight: 500; cursor: pointer; font-family: var(--font); }
button.audio:active { background: var(--accent-soft); }

/* chipy znaków i plakietki */
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.chip { display: flex; align-items: center; gap: 8px; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 11px; font-size: 14px; }
.chip b { font-family: var(--font-zh); font-size: 24px; font-weight: 500; }
.chip .py { color: var(--accent); font-weight: 500; }
.tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); white-space: nowrap; }
.tag.l1 { background: var(--info-soft); color: var(--info); } .tag.l2 { background: var(--ok-soft); color: var(--ok); }
.tag.new { background: var(--accent-soft); color: var(--accent); }

/* budowa znaku */
.parts { background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-top: 14px; text-align: left; font-size: 15px; line-height: 1.7; }
.parts .prow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
.parts .prow + .prow { margin-top: 6px; }
.parts .pch { font-family: var(--font-zh); font-size: 24px; font-weight: 500; }
.parts .eq, .parts .plus { color: var(--faint); padding: 0 3px; }
.parts .part b { font-family: var(--font-zh); font-size: 20px; font-weight: 500; }
.parts .part .tag { margin-left: 5px; vertical-align: middle; }
.parts .pt { font-size: 11px; font-weight: 600; color: var(--info); background: var(--info-soft); padding: 1px 7px; border-radius: 999px; vertical-align: middle; }
.parts .hint { flex-basis: 100%; font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: -2px; }

/* pisanie */
.boxes { display: flex; justify-content: center; gap: 14px; margin: 20px 0 8px; flex-wrap: wrap; }
.box { position: relative; border: 2px solid var(--grid); border-radius: 16px; background: #fff; touch-action: none; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.box.active { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.box.done { border-color: var(--ok); }
.box svg.grid { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.box .writer { position: relative; }
.box .lvl { position: absolute; top: 8px; right: 10px; font-size: 11px; font-weight: 600; color: #6b7079; background: rgba(255, 255, 255, .9); padding: 2px 8px; border-radius: 999px; }
.status { text-align: center; min-height: 24px; font-size: 15px; color: var(--muted); }
.status.ok { color: var(--ok); } .status.warn { color: var(--warn); }

/* przyciski */
.actions { display: flex; justify-content: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.actions button { border: 1px solid var(--grid); border-radius: 999px; padding: 12px 20px; font-size: 15px; font-weight: 600; cursor: pointer; background: var(--card); color: var(--ink); font-family: var(--font); transition: transform .08s, background .15s; }
.actions button:active { transform: scale(.97); }
.actions button.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 18px -8px var(--accent); }
.actions button.primary:hover { background: var(--accent-strong); }
.actions button.good { background: var(--ok); border-color: var(--ok); color: #fff; }
.actions button.hard { background: var(--warn); border-color: var(--warn); color: #fff; }
.actions button.bad { background: #7f1d1d; border-color: #7f1d1d; color: #fff; }
.actions button.ghost { background: transparent; border-color: transparent; color: var(--muted); text-decoration: underline; padding: 8px 10px; font-size: 14px; font-weight: 500; }
.actions button:disabled { opacity: .4; cursor: default; }

/* statystyki */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 2px 0 6px; }
@media (max-width: 420px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.stat b { display: block; font-size: 28px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.stat span { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat.hot b { color: var(--accent); }

/* ustawienia */
.settings { display: grid; gap: 12px; }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; }
.setting small { color: var(--muted); font-size: 13px; }
.setting select, .setting input[type=number] { font-size: 15px; font-family: var(--font); color: var(--ink); background: var(--card2); border: 1px solid var(--grid); border-radius: 10px; padding: 7px 9px; }
.setting input[type=number] { width: 74px; }
.setting .mini { border: 1px solid var(--grid); border-radius: 999px; padding: 7px 13px; background: var(--card2); color: var(--ink); cursor: pointer; font-size: 13px; font-weight: 600; font-family: var(--font); }
.settings textarea { width: 100%; height: 80px; font-size: 12px; border: 1px solid var(--grid); border-radius: 10px; padding: 8px; background: var(--card2); color: var(--ink); font-family: var(--font); }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: var(--grid); border-radius: 28px; transition: .2s; }
.switch i::before { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::before { transform: translateX(20px); }

/* lista słów */
table.list { width: 100%; border-collapse: collapse; font-size: 15px; }
table.list td { padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list td.h { font-family: var(--font-zh); font-size: 25px; white-space: nowrap; }
table.list td.py { color: var(--accent); white-space: nowrap; font-weight: 500; }
table.list td.m { color: var(--ink); }
table.list td.m .en { font-size: 14px; }
table.list tr.seen td.h { color: var(--ok); }
#list-filter button { padding: 8px 13px; font-size: 13px; }
#list-filter button small { opacity: .7; font-size: 12px; font-weight: 500; }

/* instrukcja, o programie */
.help { padding-top: 8px; padding-bottom: 8px; }
.help details { border-top: 1px solid var(--line); }
.help details:first-child { border-top: 0; }
.help summary { cursor: pointer; padding: 12px 0; font-size: 16px; font-weight: 600; list-style: none; }
.help summary::-webkit-details-marker { display: none; }
.help summary::after { content: "▾"; float: right; color: var(--faint); }
.help details[open] summary::after { content: "▴"; }
.help ol { margin: 0 0 12px; padding-left: 20px; font-size: 15px; line-height: 1.55; }
.help li { margin-bottom: 7px; }
.help .about { font-size: 15px; line-height: 1.6; padding-bottom: 8px; }
.help .about p { margin: 0 0 10px; }
.foot { margin-top: 22px; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.7; }
.foot a { color: var(--muted); }
.foot button { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 12px; font-family: var(--font); }
[hidden] { display: none !important; }

/* gramatyka */
.lang { display: flex; gap: 8px; margin: 4px 0 14px; }
.lang button { border: 1px solid var(--grid); border-radius: 999px; padding: 9px 16px; font-size: 14px; font-weight: 600; cursor: pointer; background: var(--card); color: var(--ink); font-family: var(--font); }
.lang button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.intro { font-size: 15px; color: var(--muted); margin: 0 0 12px; line-height: 1.55; }
.gram details { border-top: 1px solid var(--line); }
.gram details:first-child { border-top: 0; }
.gram summary { cursor: pointer; padding: 13px 0; font-size: 17px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.gram summary::-webkit-details-marker { display: none; }
.gram summary::after { content: "▾"; color: var(--faint); font-weight: 400; }
.gram details[open] summary::after { content: "▴"; }
.gram summary small { font-weight: 500; color: var(--muted); font-size: 12px; margin-left: auto; }
.gram .body { padding: 0 0 14px; font-size: 15px; line-height: 1.6; }
.gram .body p { margin: 0 0 8px; }
.ex { background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 6px 0 10px; }
.ex div { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: baseline; padding: 4px 0; }
.ex .zh { font-family: var(--font-zh); font-size: 21px; white-space: nowrap; }
.ex .py { color: var(--accent); font-size: 14px; font-weight: 500; }
.ex .tr { color: var(--muted); font-size: 14px; grid-column: 2; }
.note { background: var(--info-soft); color: var(--info); border-radius: 10px; padding: 7px 11px; font-size: 14px; margin: 6px 0 8px; }
b.k { color: var(--accent); font-weight: 600; }

/* klasyfikatory: wiersz = znak + pinyin | opis + przykłady */
.mw { background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 2px 12px; margin: 6px 0 10px; }
.mw .mwr { display: grid; grid-template-columns: 56px 1fr; gap: 0 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.mw .mwr:first-child { border-top: 0; }
.mw .mwc b { display: block; font-family: var(--font-zh); font-size: 32px; font-weight: 500; line-height: 1.1; }
.mw .mwc span { display: block; color: var(--accent); font-size: 13px; font-weight: 500; margin-top: 2px; }
.mw .mwl { font-size: 15px; line-height: 1.4; }
.mw .mwl i { display: block; font-style: normal; color: var(--muted); font-size: 13px; }
.mw .mwe { display: flex; flex-wrap: wrap; gap: 3px 14px; margin-top: 5px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.mw .mwe b { font-family: var(--font-zh); font-size: 17px; font-weight: 500; color: var(--ink); }
.mw .mwe em { font-style: normal; color: var(--accent); }

/* gry */
.gcard { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.gcard:first-child { border-top: 0; }
.gcard > div { flex: 1; min-width: 0; }
.gcard h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.gcard p { margin: 0 0 4px; font-size: 14px; color: var(--muted); line-height: 1.45; }
.gcard button { border: 1px solid var(--accent); border-radius: 999px; padding: 10px 18px; font-size: 15px; font-weight: 600; cursor: pointer; background: var(--accent); color: #fff; font-family: var(--font); flex: none; }
.gcard button:disabled { opacity: .35; cursor: default; }
.m2 { color: var(--muted); font-size: 13px; }
.ghead { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin: -4px 0 6px; }
.ghead span:nth-child(2) { font-weight: 600; color: var(--ink); }
.ghead #q-no { margin-left: auto; }
.ghead .ghost { background: none; border: 0; color: var(--muted); cursor: pointer; font-family: var(--font); font-size: 13px; padding: 4px 0; }
.gscore { display: flex; justify-content: flex-end; align-items: baseline; gap: 10px; margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.gscore #q-score { font-size: 22px; font-weight: 700; color: var(--accent); }
.gprompt { text-align: center; margin: 4px 0 14px; }
.gprompt .big { font-family: var(--font-zh); font-size: 46px; line-height: 1.2; font-weight: 500; }
.gprompt .big .gap, .gprompt .py .gap { color: var(--accent); letter-spacing: -.05em; }
.gprompt .py { color: var(--accent); font-size: 22px; font-weight: 500; margin-top: 2px; }
.gprompt .py.big2 { font-size: 34px; }
.gprompt .mean { font-size: 17px; margin-top: 4px; }
.gprompt .mean .m2 { font-size: 14px; }
.gex { margin-top: 8px; font-size: 15px; color: var(--muted); }
.gex .py { color: var(--accent); }
.gopts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0 4px; }
.gopt { border: 2px solid var(--grid); border-radius: 16px; background: var(--card2); color: var(--ink); padding: 12px 8px; cursor: pointer; font-family: var(--font); display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform .08s; }
.gopt:active { transform: scale(.97); }
.gopt b { font-family: var(--font-zh); font-size: 44px; line-height: 1.15; font-weight: 500; }
.gopt small { color: var(--accent); font-size: 14px; font-weight: 500; }
.gopt.ok { border-color: var(--ok); background: var(--ok-soft); }
.gopt.bad { border-color: var(--bad); background: var(--bad-soft); }
.gopt:disabled { cursor: default; }
.gopt:disabled:not(.ok):not(.bad) { opacity: .45; }
.slots { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 8px 0 12px; flex-wrap: wrap; }
.slot { width: 56px; height: 56px; border: 2px dashed var(--grid); border-radius: 14px; font-family: var(--font-zh); font-size: 32px; display: inline-flex; align-items: center; justify-content: center; background: var(--card2); }
.slot.filled { border-style: solid; border-color: var(--info); color: var(--ink); }
.slot.ok { border-color: var(--ok); background: var(--ok-soft); }
.slot.bad { border-color: var(--bad); background: var(--bad-soft); }
.slots .plus { color: var(--faint); font-size: 20px; }
.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 4px 0 8px; }
.tile { border: 2px solid var(--grid); border-radius: 14px; background: var(--card); color: var(--ink); padding: 8px 12px; min-width: 76px; cursor: pointer; font-family: var(--font); display: flex; flex-direction: column; align-items: center; gap: 1px; }
.tile b { font-family: var(--font-zh); font-size: 32px; line-height: 1.15; font-weight: 500; }
.tile small { color: var(--muted); font-size: 12px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.used { border-color: var(--info); background: var(--info-soft); }
.tile.ok { border-color: var(--ok); background: var(--ok-soft); }
.tile.bad { border-color: var(--bad); background: var(--bad-soft); }
.tile:disabled { cursor: default; }
.tile.pt { min-width: 0; padding: 6px 12px; border-radius: 12px; }
.tile.pt b { font-size: 26px; }
.tile.pt.on { border-color: var(--info); background: var(--info-soft); }
.tile.used:not(.on) { opacity: .3; }
.arow { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; min-height: 58px; margin: 6px 0 10px; padding: 6px; border: 2px dashed var(--grid); border-radius: 14px; background: var(--card2); }
.arow .ph { color: var(--faint); }

/* dopasuj pary */
.mcols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; margin: 8px 0 4px; }
.mcol { display: grid; gap: 8px; align-content: start; }
.mitem { border: 2px solid var(--grid); border-radius: 14px; background: var(--card2); color: var(--ink); padding: 12px 10px; cursor: pointer; font-family: var(--font); font-size: 14px; line-height: 1.3; text-align: center; box-shadow: 0 3px 0 var(--grid); transition: transform .08s, box-shadow .08s, background .15s, opacity .3s; min-height: 54px; }
.mitem.zh { font-family: var(--font-zh); font-size: 24px; font-weight: 500; }
.mitem.py { color: var(--accent); font-weight: 500; font-size: 15px; }
.mitem:not(:disabled):active { transform: translateY(2px); box-shadow: 0 1px 0 var(--grid); }
.mitem.sel { border-color: var(--info); background: var(--info-soft); }
.mitem.bad { border-color: var(--bad); background: var(--bad-soft); animation: shake .35s; }
.mitem.done { border-color: var(--ok); background: var(--ok-soft); opacity: .45; box-shadow: none; cursor: default; }

/* memory: karty z obrotem 3D */
.mem { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 8px 0 4px; }
.mcard { perspective: 700px; border: 0; background: none; padding: 0; cursor: pointer; width: 100%; aspect-ratio: 3 / 4; justify-self: stretch; font-family: var(--font); }
.mcard .inner { display: block; position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.mcard.flip .inner { transform: rotateY(180deg); }
.mcard .face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; padding: 6px; }
.mcard .back { background: var(--accent); color: #fff; font-family: var(--font-zh); font-size: 26px; font-weight: 700; box-shadow: 0 3px 0 var(--accent-strong); }
.mcard .front { transform: rotateY(180deg); background: var(--card2); border: 2px solid var(--grid); color: var(--ink); font-size: 12px; line-height: 1.25; text-align: center; overflow: hidden; }
.mcard .front.zh { font-family: var(--font-zh); font-size: 22px; font-weight: 500; }
.mcard.done .front { border-color: var(--ok); background: var(--ok-soft); }
.mcard.done { opacity: .55; cursor: default; }
@media (max-width: 380px) { .mcard .front { font-size: 11px; } .mcard .front.zh { font-size: 19px; } }

/* miasto */
.mapgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 380px) { .mapgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.place { border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); padding: 14px 8px 12px; cursor: pointer; font-family: var(--font); display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: var(--shadow); text-align: center; }
.place:active { transform: scale(.98); }
.place .picon { font-size: 30px; line-height: 1.1; }
.place b { font-family: var(--font-zh); font-size: 20px; font-weight: 500; margin-top: 4px; }
.place .pname { font-size: 13px; color: var(--muted); }
.place.locked { background: var(--bg2); box-shadow: none; border-style: dashed; cursor: default; }
.place.locked .picon { opacity: .6; }
.place.pav { border-color: var(--warn); }
.pstars { margin-top: 4px; font-size: 16px; letter-spacing: 2px; color: var(--grid); }
.pstars .on { color: var(--warn); }
.pbar { width: 80%; height: 4px; background: var(--grid); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--info); }
.phead { display: flex; align-items: center; gap: 12px; }
.phead .picon { font-size: 34px; }
.phead b { font-size: 18px; font-weight: 600; }
.star { color: var(--grid); font-size: 15px; } .star.on { color: var(--warn); }
.poemcard { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.poemcard b { font-size: 16px; font-weight: 600; }
.poemcard.locked b { color: var(--muted); }
.ptitle { text-align: center; margin-bottom: 10px; }
.ptitle b { display: block; font-family: var(--font-zh); font-size: 34px; font-weight: 500; line-height: 1.2; }
.ptitle > div { font-size: 16px; }
.plines { display: grid; gap: 12px; margin: 6px 0 8px; }
.pline { padding: 10px 12px; border-radius: 14px; background: var(--card2); border: 1px solid var(--line); cursor: pointer; }
.pline .pzh { font-family: var(--font-zh); font-size: 30px; letter-spacing: .22em; line-height: 1.3; }
.pline .ppy { color: var(--accent); font-size: 15px; font-weight: 500; }
.pline .ptr { color: var(--muted); font-size: 14px; margin-top: 2px; }
.pline.hid .pzh span { color: transparent; border-bottom: 2px solid var(--grid); }
.pline.hid .ptr { visibility: hidden; }
.gloss { margin-top: 12px; }
.gloss summary { cursor: pointer; font-weight: 600; font-size: 15px; padding: 6px 0; }
#poem-quiz .gprompt .big { font-size: 34px; letter-spacing: .15em; }
.gfb { border-radius: 14px; padding: 10px 14px; margin: 10px 0 4px; font-size: 15px; line-height: 1.55; text-align: center; }
.gfb.ok { background: var(--ok-soft); color: var(--ink); }
.gfb.bad { background: var(--bad-soft); color: var(--ink); }
.gfb > b { display: block; margin-bottom: 2px; }
.gfb.ok > b { color: var(--ok); } .gfb.bad > b { color: var(--bad); }
.gfb .zh { font-family: var(--font-zh); font-size: 24px; }
.gfb .py { color: var(--accent); font-weight: 500; }
.gfb .parts { margin-top: 8px; }
.gfb .hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.parts .part.diff b { color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 0 4px; }
#write { margin-top: 6px; }

/* ===== angielski: przykład, dyktando ===== */
/* zdanie przykładowe = przycisk do odsłuchu: ikona głośnika w kółku, wciśnięcie, krótkie „granie” po dotknięciu */
.example { margin-top: 12px; display: flex; gap: 12px; align-items: flex-start; background: var(--card2); border: 1px solid var(--grid); border-radius: 14px; padding: 10px 14px 10px 10px; text-align: left; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 0 var(--grid); transition: transform .08s, box-shadow .08s, border-color .15s, background .15s; }
.example:hover { border-color: var(--accent); }
.example:active { transform: translateY(2px); box-shadow: 0 0 0 var(--grid); background: var(--accent-soft); }
.example:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ex-body { flex: 1; min-width: 0; }
.say-ic { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 0 var(--accent-strong); transition: transform .1s; }
.say-ic .spk { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.say-ic .spk path:first-child { fill: currentColor; }
.playing .say-ic { animation: say-pulse 1.4s ease-out; }
.playing .say-ic .spk path:nth-child(2) { animation: say-wave .7s ease-in-out 2; }
.playing .say-ic .spk path:nth-child(3) { animation: say-wave .7s ease-in-out .15s 2; }
@keyframes say-pulse { 0% { box-shadow: 0 2px 0 var(--accent-strong), 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: 0 2px 0 var(--accent-strong), 0 0 0 14px transparent; } }
@keyframes say-wave { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.ex-en { font-family: var(--font-zh); font-size: 19px; line-height: 1.4; }
.ex-en .gap { color: var(--accent); letter-spacing: -.08em; }
.ex-pl { color: var(--muted); font-size: 14px; margin-top: 3px; line-height: 1.4; }
/* wybór poziomów nowych słów (Więcej → Ustawienia) */
.setting-col { flex-direction: column; align-items: stretch; gap: 8px; }
.levels { display: flex; flex-wrap: wrap; gap: 6px; }
.levels .lvl { border: 1.5px solid var(--grid); border-radius: 999px; padding: 6px 12px; background: var(--card2); color: var(--muted); font-family: var(--font); font-size: 13px; font-weight: 700; cursor: pointer; min-width: 46px; transition: background .15s, color .15s, border-color .15s, transform .08s; }
.levels .lvl.on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 0 var(--accent-strong); }
.levels .lvl:active { transform: scale(.94); }
.dict { margin-top: 10px; }
.blanks { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; margin: 8px 0 4px; font-family: var(--font-zh); font-size: 22px; min-height: 30px; color: var(--muted); }
.blanks i { display: inline-flex; width: 20px; height: 30px; border-bottom: 2px solid var(--grid); align-items: center; justify-content: center; font-style: normal; }
.blanks i.on { border-color: var(--accent); color: var(--accent); }
.blanks i.sp { width: 12px; border: 0; }
.blanks i.pu { border: 0; }
.dict-row { display: flex; gap: 8px; margin: 8px 0; }
.dict-in { flex: 1; min-width: 0; font-size: 20px; padding: 10px 14px; border: 2px solid var(--grid); border-radius: 14px; background: var(--card2); color: var(--ink); font-family: var(--font-zh); }
.dict-in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.dict-in:disabled { opacity: .6; }
.dict-check { border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 14px; padding: 0 18px; font-weight: 600; font-size: 15px; cursor: pointer; font-family: var(--font); box-shadow: 0 3px 0 var(--accent-strong); }
.dict-check:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-strong); }
.dict-check:disabled { opacity: .4; box-shadow: none; }
.dict-result { border-radius: 14px; padding: 10px 14px; margin: 6px 0; font-size: 16px; text-align: left; animation: pop .3s cubic-bezier(.2, .8, .2, 1) both; }
.dict-result.ok { background: var(--ok-soft); } .dict-result.bad { background: var(--warn-soft); }
.dr-head { font-weight: 600; margin-bottom: 4px; }
.dict-result.ok .dr-head { color: var(--ok); } .dict-result.bad .dr-head { color: var(--warn); }
.dr-line { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.dr-line .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; min-width: 130px; }
.dr-ans, .dr-target { font-family: var(--font-zh); font-size: 20px; line-height: 1.4; }
.c-ok { color: var(--ok); } .c-bad { color: var(--bad); text-decoration: line-through; } .c-miss { color: var(--bad); border-bottom: 2px solid var(--bad); }
.status.show { color: var(--accent); font-family: var(--font-zh); font-size: 22px; }
.chips .chip { padding: 4px 8px; }

/* ===== angielski: gry ===== */
.gsent { font-family: var(--font-zh); font-size: 22px; line-height: 1.4; }
.gsent .gap { color: var(--accent); letter-spacing: -.08em; }
.gopt b.en, .tile b.en, .mitem.en, .place b.en, .mcard .front.en { font-family: var(--font-zh); }
.gopt b.en { font-size: 24px; font-weight: 600; overflow-wrap: anywhere; }
.tile b.en { font-size: 20px; font-weight: 600; }
.mitem.en { font-size: 19px; font-weight: 600; }
.mitem.py { font-size: 14px; }
.mcard .front.en { font-size: 15px; font-weight: 600; }
.mcard .back { font-family: var(--font-zh); }
.place b.en { font-size: 17px; font-weight: 600; }
.gprompt .big.en { font-family: var(--font-zh); font-weight: 600; }
.gex { font-family: var(--font-zh); font-size: 18px; color: var(--ink); line-height: 1.4; display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 8px 10px; border: 1px solid var(--grid); border-radius: 12px; background: var(--card); box-shadow: 0 2px 0 var(--grid); user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; transition: transform .08s, box-shadow .08s; }
.gex:active { transform: translateY(2px); box-shadow: 0 0 0 var(--grid); }
.gex .say-ic { width: 30px; height: 30px; }
.gex .say-ic .spk { width: 18px; height: 18px; }
.gex-body { flex: 1; min-width: 0; }
.gex .m2 { font-family: var(--font); }
.gfb .zh { font-size: 20px; font-weight: 600; }
.vlbl { display: flex; align-items: center; flex: none; width: 118px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.dict-in.vok { border-color: var(--ok); background: var(--ok-soft); } .dict-in.vbad { border-color: var(--bad); background: var(--bad-soft); }
.pline .pen { font-family: var(--font-zh); font-size: 20px; line-height: 1.35; }
.pline.hid .pen { color: transparent; background: repeating-linear-gradient(90deg, var(--grid) 0 6px, transparent 6px 10px) bottom / 100% 2px no-repeat; }
.ptitle b.en { font-family: var(--font-zh); font-size: 26px; }
.mw .mwc b.en { font-family: var(--font-zh); }

/* ===== Lektor (czytanie tekstu głosem) ===== */
.rtxt { width: 100%; min-height: 150px; font-size: 16px; line-height: 1.5; border: 1px solid var(--grid); border-radius: 12px; padding: 10px 12px; background: var(--card2); color: var(--ink); font-family: var(--font); resize: vertical; }
.rtxt:focus { outline: none; border-color: var(--accent); }
.rbar { position: sticky; top: 54px; z-index: 4; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 4px 0 8px; margin: -8px 0 4px; border-bottom: 1px solid var(--line); }
.rrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rrow .rtitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.rrow .ghost { background: none; border: 0; color: var(--muted); cursor: pointer; font-family: var(--font); font-size: 13px; padding: 4px 0; }
.rrow.ctl { justify-content: center; margin: 8px 0 6px; flex-wrap: nowrap; }
.rrow.ctl button { border: 1px solid var(--grid); border-radius: 999px; padding: 10px 14px; font-size: 15px; font-weight: 600; background: var(--card); color: var(--ink); font-family: var(--font); cursor: pointer; box-shadow: 0 2px 0 var(--grid); }
.rrow.ctl button:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--grid); }
.rrow.ctl button.primary { background: var(--accent); border-color: var(--accent); color: #fff; padding: 10px 30px; box-shadow: 0 3px 0 var(--accent-strong); }
.rrow.opts { font-size: 13px; color: var(--muted); gap: 6px 12px; }
.rrow.opts label { display: inline-flex; align-items: center; gap: 5px; }
.rrow.opts select { font-size: 13px; padding: 5px 7px; border: 1px solid var(--grid); border-radius: 8px; background: var(--card2); color: var(--ink); font-family: var(--font); max-width: 44vw; }
.rrow .mini, .gcard .mini { border: 1px solid var(--grid); border-radius: 999px; padding: 6px 12px; background: var(--card2); color: var(--ink); cursor: pointer; font-size: 13px; font-weight: 600; font-family: var(--font); }
.rrow .mini.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.keep input { width: 16px; height: 16px; accent-color: var(--accent); }
.rbody { font-family: var(--font-zh); font-size: 19px; line-height: 1.75; padding: 18px; }
.rpara { margin: 0 0 14px; } .rpara:last-child { margin-bottom: 0; }
.sent { border-radius: 6px; padding: 1px 2px; cursor: pointer; transition: background .2s, box-shadow .2s; }
.sent.cur { background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.sent .c.kn { text-decoration: underline; text-decoration-color: var(--ok); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.wpop { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; width: min(680px, calc(100% - 28px)); background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-up); padding: 12px 42px 12px 16px; z-index: 30; font-size: 15px; line-height: 1.45; animation: pop .25s cubic-bezier(.2, .8, .2, 1) both; }
.wpop b.en { font-family: var(--font-zh); font-size: 22px; } .wpop b.zh { font-family: var(--font-zh); font-size: 28px; }
.wpop .py { color: var(--accent); font-weight: 500; }
.wpop .tag { vertical-align: middle; margin-left: 4px; }
.wclose { position: absolute; top: 4px; right: 8px; border: 0; background: none; font-size: 24px; color: var(--muted); cursor: pointer; font-family: var(--font); }
.wrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 15px; }
.wrow:first-of-type { border-top: 0; }
.wrow b.en { font-family: var(--font-zh); font-size: 18px; } .wrow b.zh { font-family: var(--font-zh); font-size: 22px; }
.wrow .py { color: var(--accent); font-size: 13px; } .wrow .wm { color: var(--muted); font-size: 14px; flex: 1; min-width: 140px; }
.gcard h3.en, .gcard h3.zh { font-family: var(--font-zh); }
.gcard .pbar { width: 100%; margin-top: 6px; }

/* dymek nad słowem w Lektorze */
.sent .w, .sent .c { position: relative; border-radius: 4px; }
.sent .w.hit, .sent .c.hit { background: var(--warn-soft); }
.tip { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); z-index: 25; background: var(--ink); color: var(--bg); font-family: var(--font); font-size: 14px; font-weight: 500; line-height: 1.3; padding: 6px 10px; border-radius: 10px; white-space: nowrap; max-width: 80vw; overflow: hidden; text-overflow: ellipsis; box-shadow: var(--shadow-up); animation: pop .2s cubic-bezier(.2, .8, .2, 1) both; pointer-events: none; }
.tip::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--ink); }
.tip b { font-family: var(--font-zh); font-size: 16px; margin-right: 2px; } .tip .py { color: var(--warn); margin-right: 4px; } .tip .m2 { color: var(--faint); font-size: 12px; }
