/* ==========================================================================
   VoxSchool — Neşeli Keşif Design System
   Google Stitch tasarımından kodlanmıştır (Lexend, mint/apricot/gold).
   Light + Dark tema destekli.
   ========================================================================== */

@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('./fonts/lexend-latin.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: 'Lexend';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('./fonts/lexend-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tasarım tokenları ---------- */
:root {
  --font: 'Lexend', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* renkler (light) */
  --mint: #2ec4b6;
  --mint-ink: #0f7f76;
  --mint-soft: #e0f7f4;
  --mint-ledges: #229489;
  --apricot: #ff9f1c;
  --apricot-ink: #a85f00;
  --apricot-soft: #fff0dd;
  --apricot-ledge: #d47e0b;
  --gold: #ffd166;
  --gold-deep: #f5b734;
  --gold-soft: #fff6e0;
  --coral: #ff6b6b;
  --coral-soft: #ffe9e9;
  --violet: #8b7cf6;
  --violet-soft: #efeaff;

  --bg-1: #f4faf8;
  --bg-2: #fff9f2;
  --surface: #ffffff;
  --surface-2: #f7fbfa;
  --surface-3: #eef3f2;
  --ink: #1b2238;
  --ink-2: #3c4947;
  --ink-3: #6b7a78;
  --line: #e3ebe9;
  --line-2: #cddad7;

  --shadow-card: 0 8px 24px -4px rgba(43, 45, 66, 0.08);
  --shadow-pop: 0 18px 40px -12px rgba(43, 45, 66, 0.24);
  --lip: 6px;

  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 36px;
  --r-full: 999px;

  --sp-1: 0.5rem;
  --sp-2: 0.75rem;
  --sp-3: 1.25rem;
  --sp-4: 2rem;
  --sp-5: 3rem;

  --topbar-h: 60px;
  --tabbar-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

html[data-theme='dark'] {
  --mint: #2ec4b6;
  --mint-ink: #7ff0e3;
  --mint-soft: #0d3b3a;
  --mint-ledges: #1f9c92;
  --apricot: #ffab3d;
  --apricot-ink: #ffc882;
  --apricot-soft: #3a2410;
  --apricot-ledge: #c97510;
  --gold: #ffd166;
  --gold-deep: #e0a82a;
  --gold-soft: #2f2712;
  --coral: #ff8080;
  --coral-soft: #3b1a1c;
  --violet: #a99cff;
  --violet-soft: #241f42;

  --bg-1: #0e1522;
  --bg-2: #131b2a;
  --surface: #1a2434;
  --surface-2: #202c3e;
  --surface-3: #273547;
  --ink: #f2f6ff;
  --ink-2: #c8d3e2;
  --ink-3: #93a3b8;
  --line: #2a3849;
  --line-2: #3a4a5e;

  --shadow-card: 0 8px 24px -4px rgba(0, 0, 0, 0.5);
  --shadow-pop: 0 18px 44px -12px rgba(0, 0, 0, 0.72);
}

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

html, body { height: 100%; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .3s ease, color .3s ease;
}

button { font: inherit; color: inherit; }
input, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }

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

/* ---------- kabuk ---------- */
.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: calc(var(--safe-t) + 16px) 20px calc(var(--safe-b) + 24px);
  animation: pageIn .32s cubic-bezier(.22,1,.36,1);
  gap: var(--sp-3);
}

.page--with-tabs { padding-bottom: calc(var(--safe-b) + var(--tabbar-h) + 20px); }
.page--game { padding-bottom: calc(var(--safe-b) + 16px); overflow-y: auto; }

@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 48px;
}
.topbar__title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  flex: 1;
  text-align: center;
}
.topbar__spacer { width: 44px; flex: none; }

.iconbtn {
  width: 46px; height: 46px;
  flex: none;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  border: 1.5px solid var(--line);
  background: var(--surface);
  box-shadow: 0 2px 0 var(--line);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .2s ease;
}
.iconbtn:active { transform: translateY(2px); box-shadow: none; }
.iconbtn svg { width: 22px; height: 22px; }

/* ---------- butonlar ---------- */
.btn {
  --face: var(--mint);
  --ledge: var(--mint-ledges);
  --fg: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 60px;
  padding: 0 26px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--face);
  color: var(--fg);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--ledge);
  transition: transform .1s ease, box-shadow .1s ease, filter .2s ease;
  user-select: none;
  touch-action: manipulation;
}
.btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--ledge);
}
.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: 48px; padding: 0 18px; font-size: 16px; box-shadow: 0 4px 0 var(--ledge); }
.btn--lg { min-height: 68px; font-size: 21px; }
.btn--secondary { --face: var(--apricot); --ledge: var(--apricot-ledge); }
.btn--gold { --face: var(--gold); --ledge: var(--gold-deep); --fg: #4a3700; }
.btn--ghost {
  background: transparent;
  color: var(--ink-2);
  border: 2px solid var(--line-2);
  box-shadow: none;
  font-weight: 700;
}
.btn--ghost:active { transform: translateY(2px); }
.btn[disabled] { opacity: .48; pointer-events: none; }
.btn svg { width: 22px; height: 22px; flex: none; }

/* ---------- kartlar ---------- */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-card), inset 0 -4px 0 var(--line);
  border: 1.5px solid var(--line);
}
.card--flat { box-shadow: var(--shadow-card); border: 1.5px solid var(--line); }
.card--tint-mint { background: var(--mint-soft); border-color: transparent; box-shadow: inset 0 -4px 0 rgba(46,196,182,.18); }
.card--tint-apricot { background: var(--apricot-soft); border-color: transparent; box-shadow: inset 0 -4px 0 rgba(255,159,28,.18); }
.card--tint-gold { background: var(--gold-soft); border-color: transparent; box-shadow: inset 0 -4px 0 rgba(255,209,102,.24); }

.section-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 6px 2px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title small { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-left: auto; }

/* ---------- giriş sayfası ---------- */
.hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 2px 0;
}
.hero__mascot {
  width: 62px; height: 62px;
  border-radius: var(--r-full);
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff 0%, var(--mint-soft) 70%);
  border: 2px solid var(--line);
  flex: none;
  animation: floaty 4.5s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.brand { line-height: 1.05; }
.brand__name {
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -0.035em;
  background: linear-gradient(100deg, var(--mint-ink), var(--apricot-ink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand__tag { font-size: 13.5px; font-weight: 600; color: var(--ink-3); margin-top: 2px; }

.bubble {
  margin-top: 10px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-2);
  box-shadow: var(--shadow-card);
  position: relative;
}

.game-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 108px;
  padding: 16px 16px;
  border-radius: var(--r-lg);
  border: 2px solid transparent;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: transform .12s ease, box-shadow .12s ease;
  box-shadow: 0 6px 0 rgba(0,0,0,.10), var(--shadow-card);
}
.game-card:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.10), var(--shadow-card); }
.game-card--reading { background: var(--mint-soft); border-color: rgba(46,196,182,.45); }
.game-card--math { background: var(--apricot-soft); border-color: rgba(255,159,28,.42); }

.game-card__icon {
  width: 66px; height: 66px;
  border-radius: 22px;
  display: grid; place-items: center;
  flex: none;
  font-size: 32px;
  background: var(--surface);
  box-shadow: 0 3px 0 rgba(0,0,0,.07);
}
.game-card__body { flex: 1; min-width: 0; display: block; }
.game-card__title, .game-card__sub { display: block; }
.game-card__title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.game-card__sub { font-size: 13.5px; font-weight: 600; color: var(--ink-3); margin-top: 2px; }
.game-card__go {
  width: 48px; height: 48px;
  flex: none;
  border-radius: var(--r-full);
  display: grid; place-items: center;
  background: var(--mint);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 4px 0 var(--mint-ledges);
}
.game-card--math .game-card__go { background: var(--apricot); box-shadow: 0 4px 0 var(--apricot-ledge); }
.game-card--locked { filter: grayscale(.55); opacity: .82; }

.home-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.home-stat {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 11px 8px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.home-stat__v {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.home-stat__k {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-3);
  margin-top: 2px;
}
.home-last {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
  line-height: 1.45;
}
.home-last b { color: var(--ink-2); }

.home-foot {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
}
.chip-btn {
  flex: 1;
  min-height: 52px;
  border-radius: var(--r-full);
  border: 2px solid var(--line-2);
  background: var(--surface);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: transform .12s ease, background .2s ease;
}
.chip-btn:active { transform: scale(.97); }
.chip-btn svg { width: 18px; height: 18px; }

/* ---------- oyun ekranı ---------- */
.play-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.seg-bar {
  flex: 1;
  display: flex;
  gap: 5px;
  align-items: center;
}
.seg-bar__dot {
  flex: 1;
  height: 12px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  transition: background .3s ease, transform .3s cubic-bezier(.34,1.56,.64,1);
}
.seg-bar__dot.is-done { background: var(--gold); }
.seg-bar__dot.is-now { background: var(--apricot); transform: scaleY(1.35); }
.seg-bar__dot.is-wrong { background: var(--coral); }

.play-audio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 6px 0 2px;
}
.audio-btn {
  width: 118px; height: 118px;
  border-radius: var(--r-full);
  border: 0;
  background: radial-gradient(circle at 34% 28%, #63e3d5 0%, var(--mint) 55%, #21a99d 100%);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 0 var(--mint-ledges), 0 18px 32px -14px rgba(46,196,182,.65);
  position: relative;
  transition: transform .1s ease, box-shadow .1s ease;
  touch-action: manipulation;
}
.audio-btn:active { transform: translateY(5px); box-shadow: 0 3px 0 var(--mint-ledges); }
.audio-btn svg { width: 54px; height: 54px; }
.audio-btn::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: var(--r-full);
  border: 3px solid rgba(46,196,182,.40);
  animation: ring 2.4s ease-out infinite;
}
.audio-btn.is-playing::after { border-color: rgba(255,159,28,.75); animation-duration: 1.1s; }
.audio-btn.is-calling {
  animation: callPulse 1.5s ease-in-out infinite;
  box-shadow: 0 8px 0 var(--mint-ledges), 0 0 0 0 rgba(46,196,182,.7);
}
@keyframes callPulse {
  0%, 100% { box-shadow: 0 8px 0 var(--mint-ledges), 0 0 0 0 rgba(46,196,182,.65); }
  50% { box-shadow: 0 8px 0 var(--mint-ledges), 0 0 0 18px rgba(46,196,182,0); }
}
.audio-btn.is-playing { background: radial-gradient(circle at 34% 28%, #ffd39a 0%, var(--apricot) 60%, #e07f00 100%); box-shadow: 0 8px 0 var(--apricot-ledge), 0 18px 34px -14px rgba(255,159,28,.7); }
@keyframes ring {
  0% { transform: scale(1); opacity: .85; }
  100% { transform: scale(1.22); opacity: 0; }
}
.play-audio__label {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink-2);
  letter-spacing: .01em;
}

.kind-chip {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink-2);
  letter-spacing: .01em;
}
.kind-chip span { font-size: 15px; }

.options {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  margin-top: 4px;
  flex: 1;
  padding-bottom: 6px;
}
.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 96px;
  padding: 14px 18px;
  border-radius: var(--r-lg);
  border: 2.5px solid var(--line-2);
  background: var(--surface);
  box-shadow: 0 5px 0 var(--line);
  cursor: pointer;
  text-align: left;
  transition: transform .1s ease, border-color .2s ease, box-shadow .1s ease, background .2s ease;
  touch-action: manipulation;
}
.option:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--line); }
.option__badge {
  width: 46px; height: 46px;
  flex: none;
  border-radius: var(--r-full);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
  background: var(--mint-soft);
  color: var(--mint-ink);
}
.option:nth-child(2) .option__badge { background: var(--apricot-soft); color: var(--apricot-ink); }
.option--short { justify-content: center; }
.option--short .option__badge { position: absolute; left: 16px; }
.option--short { position: relative; }
.option--short .option__text {
  font-size: clamp(44px, 13vw, 62px);
  letter-spacing: .02em;
  line-height: 1.1;
}
.option__text {
  font-size: clamp(24px, 7.2vw, 32px);
  font-weight: 700;
  letter-spacing: .005em;
  line-height: 1.28;
  color: var(--ink);
  word-break: break-word;
}
.option.is-correct,
.option.is-correct.is-dim {
  opacity: 1;
  border-color: var(--mint);
  background: var(--mint-soft);
  animation: popRight .5s cubic-bezier(.34,1.56,.64,1);
}
.option.is-wrong {
  border-color: var(--coral);
  background: var(--coral-soft);
  animation: wobble .5s ease;
}
.option.is-dim { opacity: .45; }
@keyframes popRight {
  0% { transform: scale(1); }
  45% { transform: scale(1.045); }
  100% { transform: scale(1); }
}
@keyframes wobble {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

.play-foot {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 0 2px;
}
.play-hint { font-size: 15px; font-weight: 600; color: var(--ink-3); }
.textbtn {
  white-space: nowrap;
  border: 0;
  background: transparent;
  color: var(--mint-ink);
  font-weight: 700;
  font-size: 15px;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: var(--r-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.textbtn:active { background: var(--mint-soft); }
.textbtn svg { width: 19px; height: 19px; flex: none; }

/* ---------- sonuç ---------- */
.result-hero {
  text-align: center;
  padding: 8px 0 0;
  position: relative;
}
.medal {
  width: 132px; height: 132px;
  margin: 0 auto 6px;
  border-radius: var(--r-full);
  display: grid; place-items: center;
  font-size: 64px;
  background: radial-gradient(circle at 34% 26%, #fff6d8 0%, var(--gold) 52%, var(--gold-deep) 100%);
  box-shadow: 0 10px 0 rgba(224,168,42,.85), 0 26px 44px -18px rgba(255,180,60,.85);
  animation: medalIn .8s cubic-bezier(.34,1.56,.64,1);
}
@keyframes medalIn {
  0% { transform: scale(.3) rotate(-22deg); opacity: 0; }
  65% { transform: scale(1.12) rotate(6deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}
.result-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.result-sub { font-size: 16px; font-weight: 600; color: var(--ink-3); margin-top: 4px; }

.stars-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 40px;
  margin: 6px 0 0;
  line-height: 1;
}
.stars-row span { opacity: .22; filter: grayscale(1); transform: scale(.86); transition: none; }
.stars-row span.on {
  opacity: 1;
  filter: none;
  animation: starPop .5s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes starPop {
  0% { transform: scale(0) rotate(-40deg); }
  70% { transform: scale(1.25) rotate(8deg); }
  100% { transform: scale(1) rotate(0); }
}

.score-big {
  font-size: 58px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--mint-ink);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.score-label {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .1em;
}
.stat-row { display: flex; gap: 10px; margin-top: 14px; }
.stat-chip {
  flex: 1;
  border-radius: var(--r-md);
  padding: 12px 10px;
  text-align: center;
  background: var(--surface-2);
  border: 1.5px solid var(--line);
}
.stat-chip__v { font-size: 20px; font-weight: 800; }
.stat-chip__k { font-size: 12px; font-weight: 700; color: var(--ink-3); margin-top: 2px; }

.newbadge {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--r-md);
  padding: 14px 16px;
  background: linear-gradient(100deg, var(--gold) 0%, #ffe8a8 100%);
  color: #4a3700;
  border: 2px solid rgba(255,255,255,.6);
  box-shadow: 0 6px 18px -8px rgba(245,183,52,.9);
  animation: badgeGlow 2s ease-in-out infinite;
}
@keyframes badgeGlow {
  0%, 100% { box-shadow: 0 6px 18px -8px rgba(245,183,52,.9); }
  50% { box-shadow: 0 10px 28px -6px rgba(245,183,52,1); }
}
.newbadge__ico { font-size: 32px; }
.newbadge__t { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; opacity: .78; }
.newbadge__n { font-size: 18px; font-weight: 800; }

.result-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; padding-bottom: 4px; }

/* ---------- ebeveyn / rapor ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.kpi {
  border-radius: var(--r-md);
  padding: 14px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-card);
}
.kpi__ico { font-size: 20px; }
.kpi__v { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; }
.kpi__k { font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.kpi__d { font-size: 11.5px; font-weight: 700; margin-top: 5px; color: var(--mint-ink); }
.kpi__d.is-neg { color: var(--coral); }

.chart-wrap { position: relative; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  margin-top: 8px;
}
.chart-legend i {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 3px;
  margin-right: 5px;
}

.weak-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.weak-row:last-child { border-bottom: 0; }
.weak-chip--long {
  font-size: 13px !important;
  line-height: 1.25;
  max-width: 108px;
  word-break: break-word;
  min-width: 0 !important;
}
.weak-chip {
  min-width: 62px;
  max-width: 108px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: var(--coral-soft);
  color: var(--ink);
  font-size: 19px;
  font-weight: 800;
  text-align: center;
  flex: none;
}
.weak-body { flex: 1; min-width: 0; }
.weak-name { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.weak-bar {
  height: 10px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  margin-top: 6px;
  overflow: hidden;
}
.weak-bar > i {
  display: block;
  height: 100%;
  border-radius: var(--r-full);
  background: var(--coral);
  transition: width .6s cubic-bezier(.22,1,.36,1);
}
.weak-pct { font-size: 14px; font-weight: 800; flex: none; font-variant-numeric: tabular-nums; }

.note-card {
  border-radius: var(--r-md);
  padding: 16px;
  background: var(--apricot-soft);
  border: 1.5px dashed rgba(255,159,28,.5);
}
.note-card h3 { font-size: 16px; font-weight: 800; display: flex; gap: 8px; align-items: center; }
.note-card p { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); margin-top: 6px; font-weight: 500; }

/* ---------- rozetler ---------- */
.level-card {
  border-radius: var(--r-lg);
  padding: 18px;
  color: #05322f;
  background: linear-gradient(115deg, #7ff0e3 0%, var(--mint) 55%, #1fb2a6 100%);
  box-shadow: 0 8px 0 rgba(21,140,130,.55), var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.level-ring {
  width: 78px; height: 78px;
  flex: none;
  border-radius: var(--r-full);
  display: grid; place-items: center;
  background: rgba(255,255,255,.32);
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.65);
  text-align: center;
  line-height: 1;
}
.level-ring b { font-size: 26px; font-weight: 800; display: block; }
.level-ring small { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.level-body { flex: 1; min-width: 0; }
.level-body h3 { font-size: 19px; font-weight: 800; }
.level-progress {
  height: 13px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,.42);
  margin-top: 8px;
  overflow: hidden;
}
.level-progress > i {
  display: block;
  height: 100%;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, #ffe08a, var(--gold));
  transition: width .7s cubic-bezier(.22,1,.36,1);
}
.level-caption { font-size: 12.5px; font-weight: 700; margin-top: 6px; opacity: .82; }
.level-mascot { font-size: 34px; flex: none; animation: floaty 3.6s ease-in-out infinite; }

.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.trio-card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 8px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.trio-card__ico { font-size: 19px; }
.trio-card__v { font-size: 17px; font-weight: 800; margin-top: 3px; font-variant-numeric: tabular-nums; }
.trio-card__k { font-size: 10.5px; font-weight: 700; color: var(--ink-3); line-height: 1.25; margin-top: 2px; }

.badge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 10px;
}
.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.badge-coin {
  width: 74px; height: 74px;
  border-radius: var(--r-full);
  display: grid;
  place-items: center;
  font-size: 32px;
  background: var(--surface-3);
  color: var(--ink-3);
  border: 2.5px solid var(--line-2);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1);
}
.badge-item:active .badge-coin { transform: scale(.93); }
.badge-item.is-earned .badge-coin {
  background: radial-gradient(circle at 34% 26%, #fff8de 0%, var(--gold) 55%, var(--gold-deep) 100%);
  border-color: rgba(255,255,255,.7);
  box-shadow: 0 5px 0 rgba(224,168,42,.7), 0 12px 22px -12px rgba(245,183,52,.9);
  color: #4a3700;
}
.badge-item.is-earned[data-tone='mint'] .badge-coin {
  background: radial-gradient(circle at 34% 26%, #d8fff9 0%, #4fdbcc 55%, #1ea79b 100%);
  box-shadow: 0 5px 0 rgba(21,140,130,.6), 0 12px 22px -12px rgba(46,196,182,.9);
  color: #05322f;
}
.badge-item.is-earned[data-tone='apricot'] .badge-coin {
  background: radial-gradient(circle at 34% 26%, #fff2dc 0%, var(--apricot) 55%, #dd8300 100%);
  box-shadow: 0 5px 0 rgba(199,117,16,.6), 0 12px 22px -12px rgba(255,159,28,.9);
  color: #402200;
}
.badge-item.is-earned[data-tone='violet'] .badge-coin {
  background: radial-gradient(circle at 34% 26%, #efeaff 0%, #a99cff 55%, #6d5ce0 100%);
  box-shadow: 0 5px 0 rgba(90,74,190,.6), 0 12px 22px -12px rgba(139,124,246,.9);
  color: #fff;
}
.badge-item.is-earned[data-tone='coral'] .badge-coin {
  background: radial-gradient(circle at 34% 26%, #ffeaea 0%, #ff8a8a 55%, #e04b4b 100%);
  box-shadow: 0 5px 0 rgba(180,50,50,.5), 0 12px 22px -12px rgba(255,107,107,.9);
  color: #fff;
}
.badge-item__name {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink-2);
  text-align: center;
  line-height: 1.2;
}
.badge-item:not(.is-earned) .badge-item__name { color: var(--ink-3); opacity: .75; }

.recent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.recent-row:last-child { border-bottom: 0; }
.recent-row__ico {
  width: 42px; height: 42px;
  border-radius: var(--r-full);
  display: grid; place-items: center;
  background: var(--gold-soft);
  font-size: 20px;
  flex: none;
}
.recent-row__t { font-size: 15px; font-weight: 700; }
.recent-row__s { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.recent-row__r { margin-left: auto; font-size: 13px; font-weight: 800; color: var(--gold-deep); }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 560px;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1.5px solid var(--line);
  display: flex;
  align-items: center;
  z-index: 40;
}
.tabbtn {
  flex: 1;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: var(--tabbar-h);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-3);
  cursor: pointer;
  transition: color .2s ease;
}
.tabbtn svg { width: 23px; height: 23px; }
.tabbtn.is-active { color: var(--mint-ink); }
.tabbtn.is-active svg { transform: translateY(-1px) scale(1.06); }

/* ---------- ayarlar ---------- */
.setting-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.setting-row:last-child { border-bottom: 0; }
.setting-row__body { flex: 1; min-width: 0; }
.setting-row__t { font-size: 16px; font-weight: 700; }
.setting-row__s { font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-top: 2px; line-height: 1.4; }

.switch {
  position: relative;
  width: 56px; height: 32px;
  margin: 6px 0;
  border-radius: var(--r-full);
  background: var(--surface-3);
  border: 2px solid var(--line-2);
  position: relative;
  cursor: pointer;
  flex: none;
  transition: background .22s ease, border-color .22s ease;
  padding: 0;
}
.switch::before {
  content: '';
  position: absolute;
  inset: -7px -2px;
  border-radius: var(--r-full);
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: var(--r-full);
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,.22);
  transition: transform .22s cubic-bezier(.34,1.56,.64,1);
}
.switch[aria-checked='true'] { background: var(--mint); border-color: var(--mint); }
.switch[aria-checked='true']::after { transform: translateX(24px); }

.segmented {
  display: flex;
  background: var(--surface-3);
  border-radius: var(--r-full);
  padding: 4px;
  gap: 3px;
}
.segmented button {
  flex: 1;
  min-height: 44px;
  border: 0;
  border-radius: var(--r-full);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-3);
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.segmented button.is-on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(0,0,0,.14);
}

.namefield {
  width: 100%;
  min-height: 52px;
  border-radius: var(--r-md);
  border: 2px solid var(--line-2);
  background: var(--surface-2);
  padding: 0 16px;
  font-size: 17px;
  font-weight: 700;
  outline: none;
}
.namefield:focus { border-color: var(--mint); }

/* ---------- boş durum ---------- */
.empty {
  text-align: center;
  padding: 28px 18px;
  color: var(--ink-3);
}
.empty__ico { font-size: 46px; }
.empty__t { font-size: 17px; font-weight: 800; color: var(--ink-2); margin-top: 8px; }
.empty__s { font-size: 14px; font-weight: 600; margin-top: 4px; line-height: 1.5; }

/* ---------- FX katmanı ---------- */
.fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  overflow: hidden;
}
.confetti {
  position: absolute;
  width: 11px; height: 11px;
  border-radius: 2px;
  will-change: transform, opacity;
  animation: confettiFall var(--dur, 1.4s) cubic-bezier(.3,.1,.6,1) forwards;
}
@keyframes confettiFall {
  0% { transform: translate3d(0,0,0) rotate(0) scale(1); opacity: 1; }
  100% { transform: translate3d(var(--dx, 0px), var(--dy, 520px), 0) rotate(var(--rot, 540deg)) scale(.5); opacity: 0; }
}
.spark {
  position: absolute;
  font-size: 20px;
  animation: sparkOut .9s ease-out forwards;
}
@keyframes sparkOut {
  0% { transform: translate(-50%, -50%) scale(.4); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}

.badge-pop {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  background: rgba(16, 22, 34, .55);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: fadeIn .28s ease;
  padding: 24px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.badge-pop__card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 30px 24px 24px;
  text-align: center;
  max-width: 340px;
  width: 100%;
  box-shadow: var(--shadow-pop);
  animation: modalIn .5s cubic-bezier(.34,1.56,.64,1);
  border: 2px solid var(--line);
}
@keyframes modalIn {
  0% { transform: scale(.8) translateY(20px); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
.badge-pop__coin {
  width: 126px; height: 126px;
  margin: 0 auto 16px;
  border-radius: var(--r-full);
  display: grid; place-items: center;
  font-size: 58px;
  background: radial-gradient(circle at 34% 26%, #fff8de 0%, var(--gold) 55%, var(--gold-deep) 100%);
  box-shadow: 0 8px 0 rgba(224,168,42,.8), 0 22px 40px -14px rgba(245,183,52,.9);
  animation: coinSpin 1.1s cubic-bezier(.34,1.56,.64,1);
  color: #4a3700;
}
@keyframes coinSpin {
  0% { transform: scale(0) rotate(-180deg); }
  70% { transform: scale(1.14) rotate(12deg); }
  100% { transform: scale(1) rotate(0); }
}
.badge-pop__kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.badge-pop__name { font-size: 25px; font-weight: 800; margin-top: 6px; letter-spacing: -0.02em; }
.badge-pop__desc { font-size: 14.5px; font-weight: 600; color: var(--ink-3); margin-top: 8px; line-height: 1.5; }
.badge-pop__card .btn { margin-top: 20px; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-b) + 132px);
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--bg-1);
  padding: 12px 20px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s cubic-bezier(.22,1,.36,1);
  z-index: 100;
  max-width: 88vw;
  text-align: center;
  box-shadow: var(--shadow-pop);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- erişilebilirlik / hareket azaltma ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* küçük ekranlar (360x640 vb.) — sonuç ekranı sığsın */
@media (max-height: 700px) {
  .medal { width: 104px; height: 104px; font-size: 50px; margin-bottom: 2px; }
  .result-title { font-size: 27px; }
  .result-sub { font-size: 14px; }
  .stars-row { font-size: 30px; margin-top: 2px; }
  .score-big { font-size: 44px; }
  .page { gap: 10px; }
  .stat-row { margin-top: 10px; }
  .stat-chip { padding: 9px 8px; }
  .stat-chip__v { font-size: 17px; }
  .result-actions { gap: 9px; }
  .btn--lg { min-height: 58px; font-size: 19px; }
  .audio-btn { width: 98px; height: 98px; }
  .audio-btn svg { width: 44px; height: 44px; }
  .option { min-height: 82px; }
}

/* tablet / geniş ekran */
@media (min-width: 620px) and (min-height: 700px) {
  .app-shell { max-width: 520px; }
  .page { padding-left: 26px; padding-right: 26px; }
}

/* ==========================================================================
   Ebeveyn İçerik Paneli
   ========================================================================== */
.addbox {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
}
.addbox__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 800;
}
.addbox__hint {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
  line-height: 1.5;
  margin-bottom: 10px;
}
.addbox__hint code {
  background: var(--surface-3);
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 12px;
}
.bulkfield {
  width: 100%;
  border-radius: var(--r-md);
  border: 2px solid var(--line-2);
  background: var(--surface-2);
  padding: 12px 14px;
  font: 600 15px/1.6 var(--font);
  color: var(--ink);
  outline: none;
  resize: vertical;
  min-height: 120px;
}
.bulkfield:focus { border-color: var(--mint); }

.crow {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.crow:last-child { border-bottom: 0; }
.crow__idx {
  width: 24px;
  flex: none;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink-3);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.crow__body { flex: 1; min-width: 0; }
.crow__t {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  word-break: break-word;
  line-height: 1.3;
}
.crow__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
  align-items: center;
}
.crow__dist {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
}
.tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--ink-3);
  letter-spacing: .02em;
}
.tag--mine { background: var(--mint-soft); color: var(--mint-ink); }
.tag--pron { background: var(--apricot-soft); color: var(--apricot-ink); }
.tag--warn { background: var(--coral-soft); color: var(--coral); }
.iconbtn--sm {
  width: 38px; height: 38px;
  border-radius: var(--r-full);
  min-height: 38px;
  padding: 0;
}
.iconbtn--sm svg { width: 17px; height: 17px; }
.tag--dur { background: var(--surface-3); color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Liderlik Tablosu
   ========================================================================== */
.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 8px 0 0;
}
.podium__item {
  flex: 1;
  max-width: 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.podium__medal { font-size: 30px; line-height: 1; }
.podium__name {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink);
  text-align: center;
  line-height: 1.25;
  word-break: break-word;
}
.podium__score {
  font-size: 15px;
  font-weight: 800;
  color: var(--mint-ink);
  font-variant-numeric: tabular-nums;
}
.podium__base {
  width: 100%;
  border-radius: 14px 14px 0 0;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-top: 4px;
}
.podium__item--1 .podium__base {
  height: 92px;
  background: linear-gradient(180deg, #ffd166, #f5b734);
  color: #4a3700;
  box-shadow: 0 6px 0 rgba(224,168,42,.75);
}
.podium__item--2 .podium__base {
  height: 68px;
  background: linear-gradient(180deg, #d7e1ea, #b3c2d0);
  color: #2a3644;
  box-shadow: 0 6px 0 rgba(150,165,180,.6);
}
.podium__item--3 .podium__base {
  height: 54px;
  background: linear-gradient(180deg, #f0b98a, #d9975f);
  color: #402200;
  box-shadow: 0 6px 0 rgba(200,130,80,.6);
}

/* ==========================================================================
   Öneriler
   ========================================================================== */
.sug-auto { display: flex; flex-direction: column; gap: 9px; }
.sug-card {
  display: flex;
  gap: 11px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 13px 14px;
  box-shadow: var(--shadow-card);
}
.sug-card__ico { font-size: 21px; flex: none; line-height: 1.3; }
.sug-card__body { flex: 1; min-width: 0; }
.sug-card__t {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
}
.sug-card__d {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-3);
  line-height: 1.5;
  margin-top: 4px;
}
.sug-card__act {
  display: inline-block;
  margin-top: 7px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--mint-ink);
  text-decoration: none;
}

.kindrow { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.kindbtn {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--line-2);
  background: var(--surface-2);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  padding: 0 6px;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.kindbtn.is-on {
  background: var(--mint);
  border-color: var(--mint);
  color: #fff;
}

.note-item {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 9px;
  box-shadow: var(--shadow-card);
}
.note-item.is-resolved { opacity: .62; }
.note-item.is-resolved .note-item__body { text-decoration: line-through; }
.note-item__head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.note-item__kind {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--r-full);
  background: var(--mint-soft);
  color: var(--mint-ink);
}
.note-item__who {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-3);
  margin-left: auto;
}
.note-item__body {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.note-item__foot {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  margin-left: -10px;
}

/* podyum: az katılımcıda boş yer tutmasın */
.podium__item--empty { visibility: hidden; }
.podium__medal { min-height: 30px; }
@media (max-width: 380px) {
  .podium__item { max-width: 100px; }
  .podium__name { font-size: 11.5px; }
}
