/* =========================================================
   TuşRitmi — Klavye Hızlı Yazma
   ========================================================= */
:root {
  --bg: #0b0e14;
  --bg-2: #10141c;
  --panel: #141924;
  --panel-2: #1a2030;
  --line: #232a3a;
  --text: #e6e9ef;
  --text-2: #aab2c3;
  --dim: #545e72;
  --ok: #3ef08f;
  --warn: #ff9f1c;
  --bad: #ff3d5a;
  --caret: #ffd166;
  --accent: #7aa2ff;

  --f-pinky: #f783ac;
  --f-ring: #b197fc;
  --f-middle: #74c0fc;
  --f-index: #ffd43b;
  --f-thumb: #ced4da;

  --radius: 14px;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
kbd {
  font-family: var(--mono);
  font-size: .78em;
  padding: .1em .45em;
  border-radius: 5px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  color: var(--text-2);
}
[hidden] { display: none !important; }

.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(62, 240, 143, .07), transparent 60%),
    radial-gradient(800px 500px at 100% 10%, rgba(122, 162, 255, .08), transparent 60%),
    radial-gradient(700px 400px at 50% 110%, rgba(255, 159, 28, .05), transparent 60%);
}

#fx {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 50;
  mix-blend-mode: screen;
}

/* ---------------- Topbar ---------------- */
.topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 18px clamp(16px, 4vw, 48px);
  max-width: 1280px; width: 100%; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-keys { display: flex; gap: 3px; }
.brand-keys i {
  width: 8px; height: 24px; border-radius: 3px; background: var(--text);
  animation: keyPress 2.4s infinite ease-in-out;
}
.brand-keys i:nth-child(1) { background: var(--ok); color: var(--ok); box-shadow: 0 0 9px rgba(62, 240, 143, .55); }
.brand-keys i:nth-child(2) { color: var(--text); box-shadow: 0 0 9px rgba(230, 233, 239, .35); animation-delay: .3s; }
.brand-keys i:nth-child(3) { background: var(--warn); color: var(--warn); box-shadow: 0 0 9px rgba(255, 159, 28, .55); animation-delay: .6s; }
@keyframes keyPress {
  0%, 70%, 100% { transform: translateY(0); filter: none; }
  80% { transform: translateY(3px); filter: drop-shadow(0 0 8px currentColor) brightness(1.3); }
}
.brand-name { font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; }
.brand-name b { color: var(--ok); font-weight: 800; }

.tabs {
  display: flex; gap: 4px; padding: 4px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.tab {
  display: flex; align-items: center; gap: 8px;
  border: 0; background: transparent; color: var(--text-2);
  padding: 8px 16px; border-radius: 9px; font-weight: 600; font-size: .92rem;
  transition: background .2s, color .2s;
}
.tab svg, .icon-btn svg, .ghost-btn svg, .focus-overlay svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.tab.active svg { stroke: var(--ok); }

.toggles { margin-left: auto; display: flex; gap: 6px; }
.icon-btn {
  display: flex; align-items: center; gap: 7px;
  border: 1px solid transparent; background: transparent; color: var(--dim);
  padding: 7px 10px; border-radius: 9px; font-size: .82rem; font-weight: 500;
  transition: color .2s, background .2s;
}
.icon-btn:hover { color: var(--text); background: var(--panel); }
.icon-btn.on { color: var(--text-2); }
.icon-btn.on svg { stroke: var(--ok); }

main {
  flex: 1;
  width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 8px clamp(16px, 4vw, 48px) 32px;
}
.view { animation: fadeIn .35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------- Config bar ---------------- */
.config {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px;
  margin: 10px auto 0; padding: 6px 10px; width: fit-content; max-width: 100%;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  transition: opacity .3s;
}
.group { display: flex; flex-wrap: wrap; gap: 2px; }
.group button {
  border: 0; background: transparent; color: var(--dim);
  padding: 6px 10px; border-radius: 7px; font-size: .85rem; font-weight: 500;
  transition: color .15s, background .15s;
}
.group button b { font-family: var(--mono); font-weight: 700; margin-right: 2px; }
.group button:hover { color: var(--text); }
.group button.active { color: var(--ok); }
.group button.disabled { opacity: .35; pointer-events: none; }
.sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
body.typing .config, body.typing .topbar, body.typing .hints, body.typing .foot { opacity: .12; transition: opacity .4s; }
body.typing .config:hover, body.typing .topbar:hover { opacity: 1; }

/* ---------------- Test area ---------------- */
.test-area { margin-top: 48px; }
.live {
  display: flex; align-items: baseline; gap: 22px;
  font-family: var(--mono); color: var(--dim); min-height: 2.4rem; padding: 0 6px;
}
.live-main { font-size: 1.9rem; font-weight: 700; color: var(--caret); min-width: 3ch; }
.live-sub { font-size: .95rem; }
.live-sub span { color: var(--text-2); font-weight: 700; }
.live-pb { margin-left: auto; font-size: .85rem; }
.live .live-sub, .live .live-main { opacity: 0; transition: opacity .3s; }
body.typing .live .live-sub, body.typing .live .live-main, .live .live-main.show { opacity: 1; }

.typing-wrap {
  --fs: clamp(1.25rem, 2.2vw, 1.7rem);
  position: relative;
  font-family: var(--mono);
  font-size: var(--fs);
  height: 6em;               /* 3 satır */
  overflow: hidden;
  outline: none;
  cursor: text;
  margin-top: 8px;
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent);
          mask-image: linear-gradient(to bottom, #000 82%, transparent);
}
.words {
  position: relative;
  display: flex; flex-wrap: wrap; align-content: flex-start;
  user-select: none;
  transition: transform .18s ease-out, filter .3s;
}
.word {
  height: 1.5em; line-height: 1.5em;
  margin: .25em .3em;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: border-color .2s;
}
.l { color: var(--dim); transition: color .08s, text-shadow .25s; }
.l.ok { color: var(--text); }
.l.bad { color: var(--warn); text-shadow: 0 0 12px rgba(255, 159, 28, .35); }
.l.extra { color: #b8630a; }
.word.err { border-bottom-color: var(--bad); }
.word.err .l.ok { color: #ff9aa8; }
.word.shake { animation: shake .38s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

.caret {
  position: absolute; top: 0; left: 0;
  width: 3px; border-radius: 3px;
  background: var(--caret);
  box-shadow: 0 0 10px rgba(255, 209, 102, .6);
  transition: transform .09s ease-out, height .1s;
  pointer-events: none;
}
.caret.blink { animation: blink 1s infinite; }
@keyframes blink { 0%, 45% { opacity: 1; } 50%, 95% { opacity: 0; } 100% { opacity: 1; } }

.focus-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-size: 1rem; color: var(--text-2);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.typing-wrap.blurred .words { filter: blur(5px); opacity: .5; }
.typing-wrap.blurred .focus-overlay { opacity: 1; }
.hidden-input {
  position: absolute; left: 0; top: 0; width: 1px; height: 1px;
  opacity: 0; border: 0; padding: 0; pointer-events: none;
}

.test-actions { display: flex; justify-content: center; margin-top: 18px; }
.ghost-btn {
  border: 0; background: transparent; color: var(--dim);
  padding: 12px 22px; border-radius: 10px; transition: color .2s, background .2s;
}
.ghost-btn:hover, .ghost-btn:focus-visible { color: var(--text); background: var(--panel); outline: none; }
.ghost-btn svg { width: 22px; height: 22px; }

.kb-mini-wrap { display: flex; justify-content: center; margin-top: 26px; transition: opacity .3s; }
body.no-kb .kb-mini-wrap { display: none; }

.hints { text-align: center; color: var(--dim); font-size: .82rem; margin-top: 30px; }

/* ---------------- Keyboard ---------------- */
.keyboard {
  container-type: inline-size;
  width: 100%;
  display: flex; flex-direction: column;
  gap: .7cqw;
  user-select: none;
}
.keyboard.mini { max-width: 640px; opacity: .85; }
.keyboard.big { max-width: 920px; margin: 0 auto; }
.kb-row { display: flex; gap: .7cqw; }
.key {
  --fc: #8a94a8;
  position: relative;
  flex: var(--w) 1 0;
  height: 6cqw;
  min-width: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: .9cqw;
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom-width: .35cqw;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 1.9cqw;
  font-weight: 500;
  transition: transform .08s, background .25s, border-color .25s, box-shadow .25s, color .2s;
}
.key .sh { position: absolute; top: .45cqw; left: .7cqw; font-size: 1.35cqw; color: var(--dim); }
.key.special { font-family: var(--sans); font-size: 1.45cqw; color: var(--dim); }
.key.home::after {
  content: ""; position: absolute; bottom: 1cqw; left: 50%; transform: translateX(-50%);
  width: 1.4cqw; height: .3cqw; border-radius: 2px; background: currentColor; opacity: .7;
}
.key[data-f="lp"], .key[data-f="rp"] { --fc: var(--f-pinky); }
.key[data-f="lr"], .key[data-f="rr"] { --fc: var(--f-ring); }
.key[data-f="lm"], .key[data-f="rm"] { --fc: var(--f-middle); }
.key[data-f="li"], .key[data-f="ri"] { --fc: var(--f-index); }
.key[data-f="th"] { --fc: var(--f-thumb); }

.keyboard.fingers .key {
  background: color-mix(in srgb, var(--fc) 13%, var(--panel));
  border-color: color-mix(in srgb, var(--fc) 35%, var(--line));
  border-bottom-color: color-mix(in srgb, var(--fc) 70%, transparent);
  color: color-mix(in srgb, var(--fc) 55%, var(--text));
}
.keyboard.fingers .key.special { color: color-mix(in srgb, var(--fc) 45%, var(--text-2)); }
.keyboard.fingers.dim-others .key:not(.target):not(.hl) { opacity: .45; }
.keyboard.fingers .key.hl {
  background: color-mix(in srgb, var(--fc) 30%, var(--panel));
  box-shadow: 0 0 0 1px var(--fc);
}
.key.target {
  background: color-mix(in srgb, var(--fc) 45%, var(--panel)) !important;
  color: #0b0e14 !important;
  border-color: var(--fc) !important;
  box-shadow: 0 0 0 2px var(--fc), 0 0 24px color-mix(in srgb, var(--fc) 60%, transparent);
  animation: targetPulse 1.1s ease-in-out infinite;
  font-weight: 700;
  opacity: 1 !important;
}
.key.target .sh { color: rgba(0, 0, 0, .5); }
@keyframes targetPulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--fc), 0 0 14px color-mix(in srgb, var(--fc) 45%, transparent); }
  50% { box-shadow: 0 0 0 2px var(--fc), 0 0 32px color-mix(in srgb, var(--fc) 80%, transparent); }
}
.key.k-ok, .key.k-warn, .key.k-bad { transform: translateY(2px); border-bottom-width: .15cqw; }
.key.k-ok { background: color-mix(in srgb, var(--ok) 35%, var(--panel)) !important; border-color: var(--ok) !important; color: #fff !important; box-shadow: 0 0 18px rgba(62, 240, 143, .55); }
.key.k-warn { background: color-mix(in srgb, var(--warn) 35%, var(--panel)) !important; border-color: var(--warn) !important; color: #fff !important; box-shadow: 0 0 18px rgba(255, 159, 28, .55); }
.key.k-bad { background: color-mix(in srgb, var(--bad) 35%, var(--panel)) !important; border-color: var(--bad) !important; color: #fff !important; box-shadow: 0 0 18px rgba(255, 61, 90, .55); }

/* ---------------- Results ---------------- */
.results { margin-top: 40px; animation: fadeIn .45s ease; }
.res-top { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: stretch; }
.res-big { display: flex; flex-direction: column; gap: 14px; min-width: 170px; }
.stat-big .lbl, .res-grid .lbl { display: block; color: var(--dim); font-size: .85rem; font-weight: 600; letter-spacing: .02em; }
.stat-big .val { display: block; font-family: var(--mono); font-size: 3.8rem; line-height: 1; font-weight: 700; color: var(--ok); text-shadow: 0 0 28px rgba(62, 240, 143, .35); }
.stat-big + .stat-big .val { color: var(--caret); text-shadow: 0 0 28px rgba(255, 209, 102, .25); }
.pb-badge {
  width: fit-content; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: .85rem;
  background: rgba(255, 209, 102, .12); color: var(--caret); border: 1px solid rgba(255, 209, 102, .35);
  animation: pop .5s cubic-bezier(.2, 1.6, .4, 1);
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.chart-wrap {
  position: relative; min-height: 220px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 14px 30px;
}
#chart { width: 100%; height: 100%; display: block; min-height: 180px; }
.chart-legend { position: absolute; bottom: 8px; right: 16px; display: flex; gap: 14px; font-size: .75rem; color: var(--dim); }
.chart-legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.lg-wpm { background: var(--ok); } .lg-raw { background: var(--dim); } .lg-err { background: var(--bad); height: 8px !important; width: 8px !important; border-radius: 50% !important; }
.res-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 22px;
}
.res-grid > div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.res-grid .v { display: block; margin-top: 4px; font-family: var(--mono); font-size: 1.3rem; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-actions { display: flex; justify-content: center; gap: 10px; margin-top: 26px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: .92rem;
  transition: background .2s, border-color .2s, transform .1s;
}
.btn:hover { background: var(--panel-2); border-color: #33405a; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ok); color: #06210f; border-color: var(--ok); }
.btn.primary:hover { background: #5cf7a2; }
.btn.primary kbd { background: rgba(0, 0, 0, .15); border-color: rgba(0, 0, 0, .2); color: #06210f; }
.btn.small { padding: 7px 12px; font-size: .85rem; }

/* ---------------- Dialog ---------------- */
.dialog {
  width: min(680px, 92vw); padding: 26px;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.dialog::backdrop { background: rgba(5, 7, 12, .7); backdrop-filter: blur(4px); }
.dialog h2 { margin: 0 0 4px; font-size: 1.3rem; }
.muted { color: var(--dim); font-size: .88rem; margin: 0; }
.drop { position: relative; margin: 16px 0 12px; }
.drop textarea {
  width: 100%; height: 220px; resize: vertical;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  font-family: var(--mono); font-size: .92rem; line-height: 1.6; outline: none;
  transition: border-color .2s;
}
.drop textarea:focus { border-color: var(--accent); }
.drop-hint {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  border: 2px dashed var(--ok); border-radius: 12px; background: rgba(62, 240, 143, .08);
  color: var(--ok); font-weight: 700; pointer-events: none;
}
.drop.over .drop-hint { display: flex; }
.dlg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.file-btn input { display: none; }
.file-btn { cursor: pointer; }
.check { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--text-2); cursor: pointer; }
.check input { accent-color: var(--ok); }
#customCount { margin-left: auto; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ---------------- Guide ---------------- */
.guide-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-top: 18px; }
.guide-head h1 { margin: 0 0 6px; font-size: 1.8rem; letter-spacing: -.02em; }
.guide-head p { margin: 0; max-width: 560px; color: var(--text-2); line-height: 1.55; font-size: .95rem; }
.lessons { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }

.drill-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  margin-top: 22px; padding: 18px 22px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.drill-target { display: flex; align-items: center; gap: 16px; min-width: 250px; }
.drill-key {
  --fc: var(--f-index);
  width: 64px; height: 64px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 1.9rem; font-weight: 700;
  background: color-mix(in srgb, var(--fc) 22%, var(--panel-2));
  border: 2px solid var(--fc); color: var(--fc);
  box-shadow: 0 0 24px color-mix(in srgb, var(--fc) 40%, transparent);
  transition: all .2s;
}
.drill-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 700; }
.drill-finger { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-weight: 700; font-size: 1.05rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--f-index); box-shadow: 0 0 10px currentColor; }

.drill-strip-wrap { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.drill-strip { display: flex; gap: 6px; transition: transform .2s ease-out; padding: 6px 0 6px 40px; }
.drill-strip span {
  flex: 0 0 auto; min-width: 34px; height: 42px; padding: 0 6px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 1.25rem; font-weight: 600;
  border-radius: 8px; color: var(--dim); background: var(--bg-2); border: 1px solid var(--line);
  transition: all .15s;
}
.drill-strip span.sp { color: var(--line); min-width: 22px; background: transparent; border-color: transparent; }
.drill-strip span.done { color: var(--ok); border-color: rgba(62, 240, 143, .25); }
.drill-strip span.missed { color: var(--warn); border-color: rgba(255, 159, 28, .35); }
.drill-strip span.cur { color: var(--text); border-color: var(--caret); background: var(--panel-2); transform: scale(1.12); box-shadow: 0 0 16px rgba(255, 209, 102, .25); }
.drill-stats { display: flex; gap: 18px; }
.drill-stats div { display: flex; flex-direction: column; align-items: center; }
.drill-stats b { font-family: var(--mono); font-size: 1.3rem; }
.drill-stats span { font-size: .72rem; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.drill-card.explore .drill-strip-wrap { visibility: hidden; }
.drill-card.explore .drill-stats { visibility: hidden; }

.guide-board {
  margin-top: 18px; padding: 26px clamp(14px, 3vw, 34px) 22px;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: 20px;
}
.keyboard.big .key { cursor: pointer; }
.hands { display: block; width: min(520px, 100%); margin: 22px auto 0; overflow: visible; }
.hands .palm { fill: var(--panel-2); stroke: var(--line); stroke-width: 2; }
.hands .finger {
  --fc: var(--f-thumb);
  fill: color-mix(in srgb, var(--fc) 18%, var(--panel));
  stroke: color-mix(in srgb, var(--fc) 60%, transparent);
  stroke-width: 2;
  transition: fill .2s, stroke .2s;
  cursor: pointer;
}
.hands .finger[data-f$="p"] { --fc: var(--f-pinky); }
.hands .finger[data-f$="r"] { --fc: var(--f-ring); }
.hands .finger[data-f$="m"] { --fc: var(--f-middle); }
.hands .finger[data-f$="i"] { --fc: var(--f-index); }
.hands .finger[data-f="th"] { --fc: var(--f-thumb); }
.hands .finger.active { fill: var(--fc); stroke: #fff; filter: url(#fglow); animation: fingerTap 1.1s ease-in-out infinite; }
.hands .finger.hl { fill: color-mix(in srgb, var(--fc) 55%, var(--panel)); }
@keyframes fingerTap { 0%, 100% { opacity: 1; } 50% { opacity: .75; } }
.hand-label { fill: var(--dim); font-family: var(--sans); font-weight: 800; font-size: 14px; letter-spacing: .2em; text-anchor: middle; }

.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-top: 14px; font-size: .85rem; color: var(--text-2); }
.legend span { display: flex; align-items: center; gap: 7px; cursor: default; }
.legend i { width: 12px; height: 12px; border-radius: 4px; }

.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.tips article { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.tips h3 { margin: 0 0 6px; font-size: 1rem; }
.tips p { margin: 0; color: var(--text-2); font-size: .88rem; line-height: 1.55; }

.foot {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center; color: var(--dim); font-size: .78rem;
  padding: 28px 18px 22px; margin-top: 12px;
  border-top: 1px solid var(--line);
}
.foot p { margin: 0; }
.studio { display: inline-block; opacity: .55; transition: opacity .25s, transform .25s, filter .25s; }
.studio:hover, .studio:focus-visible { opacity: 1; transform: translateY(-2px); filter: drop-shadow(0 0 12px rgba(255, 255, 255, .25)); outline: none; }
.studio img { display: block; width: 170px; height: auto; }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; gap: 12px; }
  .toggles { margin-left: 0; width: 100%; justify-content: center; }
  .res-top { grid-template-columns: 1fr; }
  .res-big { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
  .res-grid { grid-template-columns: repeat(3, 1fr); }
  .drill-card { grid-template-columns: 1fr; }
  .tips { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .icon-btn span { display: none; }
  .tab { padding: 8px 10px; }
  .res-grid { grid-template-columns: repeat(2, 1fr); }
  .test-area { margin-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
