:root {
  --bg: #f7f3ff;
  --card: #ffffff;
  --ink: #2b2140;
  --muted: #7a6f93;
  --line: #ece6f7;
  --violet: #8b5cf6;
  --pink: #ff5fa2;
  --lime: #b6f25b;
  --sky: #5cc8ff;
  --sun: #ffd23f;
  --ok: #19b97a;
  --bad: #ff5470;
  /* Zielony/czerwony dla TEKSTU (kontrast ≥ 4.5:1 na białej karcie); tła i obramowania zostają przy --ok/--bad */
  --ok-ink: #0c7d52; --bad-ink: #cc2d4a;
  --radius: 22px;
  --stack-gap: 16px;   /* wspólny odstęp pionowy między elementami strony głównej (.home) */
  --shadow: 0 10px 30px -12px rgba(76, 40, 150, .25), 0 2px 6px rgba(76, 40, 150, .06);
  --soft: #fbf9ff; --soft-2: #f3edff; --soft-3: #f8f5ff; --accent-soft: #efe7ff; --pink-soft: #ffe3f0; --track: #f1ecfa;
  --tabs-bg: rgba(255,255,255,.6); --nav-bg: rgba(255,255,255,.92); --ghost-shadow: #ddd0fb; --btn-shadow: #6a3fd1;
  --blob-1: #d9c8ff; --blob-2: #c6f6e3; --blob-3: #ffd6e8; --blob-opacity: .55;
  --win-bg: #e5fbf1; --lose-bg: #fff0f3; --me-bg: #fff1f7; --overlay: rgba(43,33,64,.4);
  --toast-bg: #2b2140; --toast-ink: #fff; --tag-base: white; --tag-ink: black; --on-accent: #fff;
  --font-head: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--violet); }

.blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blobs span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: var(--blob-opacity); }
.blobs span:nth-child(1) { width: 420px; height: 420px; background: var(--blob-1); top: -120px; left: -100px; }
.blobs span:nth-child(2) { width: 360px; height: 360px; background: var(--blob-2); bottom: -80px; right: -80px; }
.blobs span:nth-child(3) { width: 260px; height: 260px; background: var(--blob-3); top: 40%; left: 60%; }

/* ---------- Header & nav ---------- */
.top {
  max-width: 880px; margin: 0 auto; padding: 18px 16px 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.logo { font-family: var(--font-head); font-size: 28px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.logo b { font-weight: 700; background: linear-gradient(90deg, var(--violet), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo i { font-style: normal; color: var(--muted); font-weight: 500; }

.top-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lang-pick select {
  width: auto; padding: 7px 8px; border-radius: 999px; border: 2px solid transparent; background: var(--card);
  box-shadow: var(--shadow); font-weight: 800; font-size: 14px; cursor: pointer;
}

.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px;
  background: var(--card); border-radius: 999px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
  font-weight: 800; max-width: 60vw;
}
.chip .av { font-size: 22px; width: 34px; height: 34px; display: grid; place-items: center; background: var(--soft-2); border-radius: 50%; }
.chip .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .pts { color: var(--violet); white-space: nowrap; }

.tabs {
  max-width: 880px; margin: 8px auto 0; padding: 0 16px;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px;
}
.tabs a {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 6px; border-radius: 16px; text-decoration: none; color: var(--muted); font-weight: 800;
  background: var(--tabs-bg); border: 2px solid transparent; transition: .15s; white-space: nowrap; min-width: 0;
}
.tabs a:hover { background: var(--card); }
.tabs a span { overflow: hidden; text-overflow: ellipsis; }
.tabs a.on { background: var(--card); color: var(--ink); border-color: var(--violet); box-shadow: var(--shadow); }
.tabs em {
  position: absolute; top: -6px; right: -4px; font-style: normal; background: var(--pink); color: var(--on-accent);
  font-size: 12px; min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; padding: 0 6px;
  animation: pop .4s;
}
@media (max-width: 640px) {
  .tabs { position: fixed; bottom: 0; left: 0; right: 0; margin: 0; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); gap: 4px;
    background: var(--nav-bg); backdrop-filter: blur(10px); z-index: 20; box-shadow: 0 -6px 20px rgba(76,40,150,.08); }
  .tabs a { flex-direction: column; gap: 2px; padding: 6px 0; font-size: 20px; }
  .tabs a span { font-size: 11px; max-width: 100%; }
  .tabs .cnt { display: none; }   /* 6 zakładek: liczniki graczy/grup nie mieszczą się pod ikoną */
  main { padding-bottom: 96px !important; }
  .logo { font-size: 22px; }
}

main { max-width: 880px; margin: 0 auto; padding: 16px; }

/* ---------- Building blocks ---------- */
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; margin: 0 0 12px; line-height: 1.15; }
h1 { font-size: clamp(28px, 6vw, 40px); }
h2 { font-size: 22px; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.card {
  background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  margin-bottom: 16px; animation: rise .35s ease both;
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .grid2 { grid-template-columns: 1fr; } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.section-title { margin: 22px 4px 10px; font-family: var(--font-head); font-size: 18px; color: var(--muted); display: flex; gap: 8px; align-items: center; }

.btn {
  border: 0; cursor: pointer; border-radius: 16px; padding: 12px 18px; font-weight: 800;
  background: linear-gradient(135deg, var(--violet), var(--pink)); color: var(--on-accent);
  box-shadow: 0 6px 0 var(--btn-shadow), 0 10px 20px -6px rgba(139,92,246,.6); transition: transform .08s, box-shadow .08s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--btn-shadow); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.big { font-size: 18px; padding: 16px 24px; width: 100%; }
.btn.ghost { background: var(--soft-2); color: var(--violet); box-shadow: 0 4px 0 var(--ghost-shadow); }
.btn.ghost:active { box-shadow: 0 1px 0 var(--ghost-shadow); }
.btn.lime { background: var(--lime); color: #24390a; box-shadow: 0 6px 0 #8cc537; }
.btn.small { padding: 8px 12px; font-size: 14px; border-radius: 12px; }

label { display: block; font-weight: 800; margin: 14px 0 6px; }
input[type=text], input[type=search], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--soft); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139,92,246,.15); }
textarea { resize: vertical; min-height: 80px; font-family: ui-monospace, monospace; font-size: 13px; }

/* ---------- Emoji picker ---------- */
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.emoji-grid button {
  font-size: 26px; height: 46px; border-radius: 14px; border: 2px solid transparent; background: var(--soft-3); cursor: pointer; transition: .1s;
}
.emoji-grid button:hover { transform: scale(1.1) rotate(-6deg); }
.emoji-grid button.on { border-color: var(--violet); background: var(--accent-soft); transform: scale(1.08); }
.emoji-preview { font-size: 64px; width: 96px; height: 96px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent-soft), var(--pink-soft)); border-radius: 30px; margin: 0 auto 8px; animation: wobble 3s ease-in-out infinite; }

/* ---------- Pills (grade / category) ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  border: 2px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 800;
  display: inline-flex; align-items: center; gap: 6px; transition: .12s;
}
.pill:hover { transform: translateY(-2px); }
.pill.on { color: var(--on-accent); border-color: transparent; background: var(--c, var(--violet)); box-shadow: 0 6px 16px -6px var(--c, var(--violet)); }
.grade-pills .pill { width: 48px; height: 48px; padding: 0; justify-content: center; font-size: 18px; border-radius: 16px; }
/* Wybór poziomu: grupy (szkoła podstawowa / szkoła średnia) z nagłówkiem nad rzędem pigułek */
.grade-picker { display: grid; gap: 10px; }
.grade-group { display: grid; gap: 6px; }
.grade-group > p { margin: 0; }
.grade-group-title { font-size: 13px; font-weight: 800; color: var(--muted); }

.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 800;
  background: color-mix(in srgb, var(--c, var(--violet)) 14%, var(--tag-base)); color: color-mix(in srgb, var(--c, var(--violet)) 80%, var(--tag-ink));
}

/* ---------- User list ---------- */
.users { display: grid; gap: 8px; }
.user {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--soft); border: 2px solid transparent;
  cursor: pointer; text-align: left; width: 100%;
}
.user:hover { background: var(--soft-2); }
.user.on { border-color: var(--violet); background: var(--soft-2); }
.user .av { font-size: 26px; width: 44px; height: 44px; display: grid; place-items: center; background: var(--card); border-radius: 14px; flex: none; }
.user .nm { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user .sub { font-size: 13px; color: var(--muted); }
.user .pts { margin-left: auto; font-weight: 800; color: var(--violet); white-space: nowrap; }
.user .meta { min-width: 0; }

/* ---------- Challenge card ---------- */
.ch { position: relative; overflow: hidden; }
.ch::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--c, var(--violet)); }
.ch-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ch-head .who { font-weight: 800; }
.ch-q { font-size: 20px; font-family: var(--font-head); font-weight: 500; line-height: 1.35; margin: 6px 0 14px; overflow-wrap: anywhere; }
.ch-answer { display: flex; gap: 8px; }
.ch-answer input { font-size: 20px; font-weight: 800; }
.ch-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 14px; color: var(--muted); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); display: inline-block; }
.dots i.used { background: var(--line); }

.ring { width: 64px; height: 64px; flex: none; position: relative; }
.ring svg { transform: rotate(-90deg); }
.ring .t { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 800; text-align: center; line-height: 1.05; }

.result { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: var(--soft-3); font-size: 15px; }
.result.win { background: var(--win-bg); }
.result.lose { background: var(--lose-bg); }
.verdict { font-weight: 800; font-family: var(--font-head); font-size: 18px; }

.empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.empty .big { font-size: 54px; display: block; margin-bottom: 8px; animation: wobble 3s ease-in-out infinite; }

/* ---------- Ranking ---------- */
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: 10px; margin: 10px 0 20px; }
.podium .p { text-align: center; text-decoration: none; color: var(--ink); min-width: 0; }
.podium .p .av { font-size: 40px; display: block; animation: wobble 3s ease-in-out infinite; }
.podium .p .nm { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.podium .bar { margin-top: 6px; border-radius: 16px 16px 6px 6px; display: grid; place-items: center; font-family: var(--font-head); font-size: 26px; color: #fff; font-weight: 700; }
.podium .p1 .bar { height: 120px; background: linear-gradient(180deg, #ffd23f, #ffad0d); }
.podium .p2 .bar { height: 90px; background: linear-gradient(180deg, #c7d2fe, #8b9cf6); }
.podium .p3 .bar { height: 70px; background: linear-gradient(180deg, #ffc2a8, #ff8a5c); }
.rank-row .rk { width: 34px; font-weight: 800; color: var(--muted); text-align: center; flex: none; }
.rank-row.me { border-color: var(--pink); background: var(--me-bg); }
.seg { display: inline-flex; background: var(--soft-2); padding: 4px; border-radius: 14px; gap: 4px; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 10px; font-weight: 800; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px rgba(76,40,150,.12); }

/* ---------- Profile ---------- */
.hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero .emoji-preview { margin: 0; }
.hero .nick { font-family: var(--font-head); font-size: 30px; font-weight: 700; overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat { background: var(--soft); border-radius: 16px; padding: 12px; text-align: center; }
.stat b { display: block; font-family: var(--font-head); font-size: 28px; color: var(--violet); }
.stat span { font-size: 13px; color: var(--muted); font-weight: 600; }

.viz { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: center; }
@media (max-width: 560px) { .viz { grid-template-columns: 1fr; justify-items: center; } .viz .bars { width: 100%; } }
.donut { position: relative; width: 180px; height: 180px; }
.donut .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-family: var(--font-head); }
.donut .c b { font-size: 38px; display: block; line-height: 1; }
.donut .c span { font-size: 13px; color: var(--muted); }
.donut path { transition: opacity .15s; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 36px; gap: 10px; align-items: center; font-size: 14px; font-weight: 700; }
@media (max-width: 420px) { .bar-row { grid-template-columns: 110px 1fr 30px; } }
.bar-track { height: 14px; background: var(--track); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--c); width: 0; transition: width .8s cubic-bezier(.2,.9,.3,1.2); }
.bar-row .v { text-align: right; font-family: var(--font-head); }

.keybox { font-family: ui-monospace, monospace; font-size: 13px; background: #1f1733; color: #c9f7a6; padding: 12px 14px; border-radius: 14px; word-break: break-all; user-select: all; }
.keybox.blur { filter: blur(5px); user-select: none; cursor: pointer; }

/* ---------- Modal / toast / loader ---------- */
.modal-bg { position: fixed; inset: 0; background: var(--overlay); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .2s; }
.modal { max-width: 480px; width: 100%; max-height: 90dvh; overflow: auto; }
#toasts { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; width: min(92vw, 420px); }
.toast { background: var(--toast-bg); color: var(--toast-ink); padding: 12px 16px; border-radius: 16px; font-weight: 700; box-shadow: var(--shadow); animation: drop .3s; }
.toast.ok { background: var(--ok); }
.toast.bad { background: var(--bad); }

.loader { display: flex; align-items: center; gap: 12px; justify-content: center; padding: 26px; color: var(--muted); font-weight: 700; }
.loader .d { display: inline-flex; gap: 5px; }
.loader .d i { width: 10px; height: 10px; border-radius: 50%; background: var(--violet); animation: bounce 1s infinite; }
.loader .d i:nth-child(2) { animation-delay: .15s; background: var(--pink); }
.loader .d i:nth-child(3) { animation-delay: .3s; background: var(--sky); }

.confetti { position: fixed; top: -20px; width: 10px; height: 14px; z-index: 70; pointer-events: none; border-radius: 3px; animation: fall linear forwards; }

.welcome-hero { text-align: center; padding: 10px 0 6px; }

/* ---------- Strona powitalna dla gości (prefiks wh-, review/spec-welcome.md) ---------- */
/* Telefon: hero → korzyści → formularz → kroki → linia dla rodziców; od 900 px: hero+korzyści | formularz (sticky). */
.wh-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.wh-left, .wh-right { min-width: 0; }
.welcome-hero.card { padding: 22px 18px 16px; }
.wh-eyebrow { cursor: default; background: var(--accent-soft); border-color: transparent; font-size: 13px; font-weight: 800; padding: 6px 12px;
  margin: 0 0 12px; max-width: 100%; white-space: normal; text-align: left; line-height: 1.3; }
.wh-eyebrow:hover { transform: none; }
.wh-eyebrow.hot { background: var(--pink-soft); border-color: var(--pink); font-size: 14px; }
.welcome-hero h1 { font-size: 28px; line-height: 1.15; margin-bottom: 10px; overflow-wrap: break-word; }
.wh-accent { color: var(--pink); }
.wh-lead { font-size: 16px; max-width: 34em; margin: 0 auto 16px; line-height: 1.45; }
.wh-cta { min-height: 52px; }
.wh-sub { margin: 8px 0 0; }
.btn-link { background: none; border: 0; padding: 8px 6px; min-height: 44px; color: var(--violet); text-decoration: underline;
  text-underline-offset: 3px; font-weight: 800; cursor: pointer; }
.btn-link:hover { text-decoration-thickness: 2px; }
.wh-havekey { margin-top: 2px; }

.wh-benefits { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.wh-b { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: start; background: var(--soft); border: 2px solid var(--line);
  border-radius: 16px; padding: 12px; font-size: 14px; line-height: 1.35; }
.wh-b b { display: block; font-size: 15px; margin-bottom: 2px; }
.wh-ico { font-size: 28px; line-height: 1; }

.wh-form h2 { margin-bottom: 4px; }
.wh-label { font-weight: 800; margin: 12px 0 6px; }
.wh-hint { margin: 6px 0 0; }
.wh-go { margin-top: 18px; }
.wh-keyinfo { margin: 10px 0 0; }
.wh-pulse { animation: wh-pulse .6s ease; }
@keyframes wh-pulse { 0% { box-shadow: var(--shadow), 0 0 0 0 var(--violet); } 40% { box-shadow: var(--shadow), 0 0 0 6px var(--violet); } 100% { box-shadow: var(--shadow); } }

.wh-key > summary { font-family: var(--font-head); font-size: 20px; font-weight: 600; cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; list-style: none; }
.wh-key > summary::-webkit-details-marker { display: none; }
.wh-key > summary::after { content: '▾'; color: var(--muted); margin-left: auto; transition: transform .15s; }
.wh-key[open] > summary::after { transform: rotate(180deg); }

.wh-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.wh-steps li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 14px; line-height: 1.35; }
.wh-steps b { display: block; font-size: 15px; margin-bottom: 2px; }
.wh-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--on-accent);
  background: linear-gradient(135deg, var(--violet), var(--pink)); }
.wh-trust { background: var(--soft-2); font-size: 14px; line-height: 1.5; }

@media (min-width: 640px) {
  .wh-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .wh-grid { grid-template-columns: 1.15fr 1fr; gap: 20px; align-items: start; }
  .wh-right { position: sticky; top: 16px; }
  .welcome-hero.card { text-align: left; padding: 26px 24px 18px; }
  .welcome-hero h1 { font-size: 40px; }
  .wh-lead { margin-left: 0; }
  .welcome-hero .wh-cta { width: auto; padding-left: 32px; padding-right: 32px; }
  .wh-havekey { margin-left: -6px; }
  .wh-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes drop { from { opacity: 0; transform: translateY(-14px); } }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.25); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes wobble { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg) translateY(-3px); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
.shake { animation: shake .4s; }

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

/* Baloo 2 nie ma cyrylicy — dla ukraińskiego nagłówki w Nunito (ma cyrylicę), pogrubione. */
html[lang="uk"] { --font-head: 'Nunito', system-ui, sans-serif; }
html[lang="uk"] h1, html[lang="uk"] h2, html[lang="uk"] h3, html[lang="uk"] .nick, html[lang="uk"] .verdict { font-weight: 800; }

/* ---------- Tryb nocny: automatycznie wg systemu albo z przełącznika (data-theme na <html>) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141021; --card: #1f1830; --ink: #f1ecff; --muted: #a99ec6; --line: #352b4d; --violet: #a78bfa;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .3);
    --soft: #261d3a; --soft-2: #2e2445; --soft-3: #2a2140; --accent-soft: #3b2d60; --pink-soft: #4a2340; --track: #352b4d;
    --tabs-bg: rgba(31, 24, 48, .7); --nav-bg: rgba(25, 19, 40, .94); --ghost-shadow: #1a1429; --btn-shadow: #4c2a9e;
    --blob-1: #3b2a7a; --blob-2: #11433a; --blob-3: #4d1d3a; --blob-opacity: .45;
    --win-bg: #123528; --lose-bg: #3d1a25; --me-bg: #3a1a30; --overlay: rgba(0, 0, 0, .6);
    --toast-bg: #f1ecff; --toast-ink: #1f1830; --tag-base: #1f1830; --tag-ink: white;
    --ok-ink: #19b97a; --bad-ink: #ff5470;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141021; --card: #1f1830; --ink: #f1ecff; --muted: #a99ec6; --line: #352b4d; --violet: #a78bfa;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .3);
  --soft: #261d3a; --soft-2: #2e2445; --soft-3: #2a2140; --accent-soft: #3b2d60; --pink-soft: #4a2340; --track: #352b4d;
  --tabs-bg: rgba(31, 24, 48, .7); --nav-bg: rgba(25, 19, 40, .94); --ghost-shadow: #1a1429; --btn-shadow: #4c2a9e;
  --blob-1: #3b2a7a; --blob-2: #11433a; --blob-3: #4d1d3a; --blob-opacity: .45;
  --win-bg: #123528; --lose-bg: #3d1a25; --me-bg: #3a1a30; --overlay: rgba(0, 0, 0, .6);
  --toast-bg: #f1ecff; --toast-ink: #1f1830; --tag-base: #1f1830; --tag-ink: white;
  --ok-ink: #19b97a; --bad-ink: #ff5470;
  color-scheme: dark;
}
.ring .track, .donut .track { stroke: var(--track); }
.theme-btn {
  border: 0; cursor: pointer; width: 38px; height: 38px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow);
  font-size: 18px; display: grid; place-items: center; flex: none;
}

/* ---------- Historia: zwijane wiersze ---------- */
.hist-group-title { margin: 18px 6px 8px; font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.hist-row { background: var(--card); border-radius: 14px; margin-bottom: 6px; box-shadow: var(--shadow); border-left: 5px solid var(--c, var(--violet)); overflow: hidden; }
.hist-row > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; font-size: 14px; min-width: 0; }
.hist-row > summary::-webkit-details-marker { display: none; }
.hist-row > summary::after { content: '▾'; color: var(--muted); transition: transform .15s; flex: none; }
.hist-row[open] > summary::after { transform: rotate(180deg); }
.hist-row .res { font-weight: 800; width: 24px; text-align: center; flex: none; color: var(--muted); }
.hist-row .res.win { color: var(--ok-ink); }
.hist-row .res.lose { color: var(--bad-ink); }
.hist-row .who { font-weight: 800; white-space: nowrap; flex: none; max-width: 30%; overflow: hidden; text-overflow: ellipsis; }
.hist-row .meta { color: var(--muted); white-space: nowrap; flex: none; }
.hist-row .ans { font-weight: 700; color: var(--ok-ink); white-space: nowrap; }
.rm-answer { margin: 8px 0 4px; }
.hist-row .q { flex: 1; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-row .when { color: var(--muted); font-size: 12px; white-space: nowrap; flex: none; min-width: 3.6em; text-align: right; margin-left: auto; font-variant-numeric: tabular-nums; }
/* Rozwinięta karta wtapia się w wiersz: jeden pasek koloru, bez drugiej ramki i cienia */
.hist-row > .card { margin: 0; padding-top: 4px; box-shadow: none; animation: none; border: 0; border-radius: 0; background: transparent; }
.hist-row > .card.ch::before { display: none; }
.hist-row .fold { display: none; color: var(--muted); font-size: 12px; font-weight: 800; margin-left: auto; }
.hist-row[open] > summary { padding-bottom: 4px; }
.hist-row[open] > summary .q, .hist-row[open] > summary .meta, .hist-row[open] > summary .when, .hist-row[open] > summary .who { display: none; }
.hist-row[open] > summary .fold { display: inline; }
@media (max-width: 520px) { .hist-row .q { display: none; } .hist-row .who { max-width: none; flex: 1; } }

/* Zegar: kropka-wskazówka krąży po pierścieniu (pełne okrążenie = 60 s); w ostatniej godzinie pierścień pulsuje. */
.ring .sweep { transform-box: view-box; transform-origin: 32px 32px; animation: sweep 60s linear infinite; }
.ring .dot { fill: var(--card); stroke: var(--c, var(--violet)); stroke-width: 3; filter: drop-shadow(0 0 3px var(--c, var(--violet))); }
.ring.urgent svg { animation: pulse 1s ease-in-out infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .55; } }

.push-banner { display: flex; flex-direction: column; gap: 6px; border: 2px dashed var(--violet); }
.push-banner p { margin: 0; }

/* Szybkie akcje: pytanie dnia, trening, losowy rywal */
/* Strona główna: jeden kontener, jeden odstęp - dzieci nie mają własnych marginesów pionowych */
.home { display: flex; flex-direction: column; gap: var(--stack-gap); }
.home > * { margin-top: 0; margin-bottom: 0; }
.home > .section-title { margin: 0 4px; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; gap: 10px; }
.quick .tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 14px 8px; margin: 0;
  text-decoration: none; color: var(--ink); transition: transform .15s; min-width: 0; }
.quick .tile:hover { transform: translateY(-3px); }
.quick .tile b { font-size: 30px; line-height: 1.1; }
.quick .tile span { font-weight: 800; font-size: 15px; }
.quick .tile small { color: var(--muted); font-size: 12px; min-height: 1em; }
.quick .tile.hot { border: 2px solid var(--pink); }
.quick .tile.hot small { color: var(--pink); font-weight: 800; }

/* Poziom i odznaki */
.lv { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.lv-badge { background: linear-gradient(90deg, var(--violet), var(--pink)); color: #fff; font-weight: 800; border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.lv-track { flex: 1; min-width: 120px; height: 10px; background: var(--track); border-radius: 999px; overflow: hidden; }
.lv-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--violet), var(--pink)); border-radius: 999px; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.badge { background: var(--soft); border-radius: 14px; padding: 10px 8px; text-align: center; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.badge .be { font-size: 30px; }
.badge b { font-size: 13px; line-height: 1.2; }
.badge small { font-size: 11px; color: var(--muted); }
.badge.got { background: var(--win-bg); }
.badge.locked .be { filter: grayscale(1); opacity: .45; }
.badge.locked b { color: var(--muted); }
.chip .streak { color: #ff7a1a; }

/* Przeniesienie konta (QR) */
.transfer { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.qr { width: 200px; height: 200px; border-radius: 12px; background: #fff; padding: 4px; flex: none; }
.keybox.code { font-size: 26px; letter-spacing: 3px; text-align: center; font-weight: 800; }
.consent { margin-top: 12px; }

/* Stopka i strony dokumentów */
.foot { max-width: 880px; margin: 10px auto 30px; padding: 0 16px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.foot a { color: var(--muted); }
.foot-partners { flex-basis: 100%; display: flex; gap: 10px 22px; justify-content: center; flex-wrap: wrap; font-size: 13px; margin-top: 4px; }
.foot-partners a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.foot-partners a:hover b { text-decoration: underline; }
.foot-partners img { width: 28px; height: 28px; border-radius: 6px; flex: none; }
.legal { max-width: 760px; margin: 0 auto; padding: 16px; line-height: 1.6; }
.legal h1 { font-size: 32px; }
.legal h2 { font-size: 21px; margin-top: 26px; }
.legal li { margin: 4px 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; }
.legal td, .legal th { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }
@media (max-width: 520px) { .quick { gap: 8px; grid-template-columns: repeat(2, 1fr); } .quick .tile { padding: 12px 4px; } .quick .tile span { font-size: 13px; } .quick .tile small { font-size: 11px; } }

/* Gracz online: zielona kropka w prawym dolnym rogu awatara */
.av, .emoji-preview { position: relative; }
.av.online::after, .emoji-preview.online::after {
  content: ''; position: absolute; right: 0; bottom: 0; width: 28%; height: 28%; min-width: 9px; min-height: 9px; max-width: 18px; max-height: 18px;
  border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 2px var(--card); }
.emoji-preview.online::after { right: 6%; bottom: 6%; }
.podium .p .av { display: inline-block; }

/* 📖 Doczytaj */
.rm-box { margin: 4px 0 10px; }
.rm-btn { display: inline-flex; align-items: center; gap: 8px; border: 2px dashed var(--violet); background: var(--soft-2); color: var(--violet);
  font-weight: 800; border-radius: 14px; padding: 8px 14px; cursor: pointer; font-size: 14px; }
.rm-btn:disabled { opacity: .6; cursor: wait; }
.book { display: inline-block; font-size: 20px; animation: book-wiggle 2.4s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes book-wiggle { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-14deg) scale(1.1); } 80% { transform: rotate(12deg) scale(1.1); } 90% { transform: rotate(-6deg); } }
.readmore { background: var(--soft); border-radius: 14px; padding: 10px 14px; margin-top: 6px; font-size: 15px; }
.readmore p { margin: 4px 0; }
.fcard { background: var(--card); border-radius: 12px; padding: 10px 12px; margin: 6px 0; font-size: 14px; }
.fcard .ft { font-weight: 800; }
.fcard .ff { font-size: 18px; font-weight: 800; margin: 4px 0; color: var(--violet); }
.fcard .fe { color: var(--muted); }
.rm-after { margin-top: 10px; }
.rm-after summary { cursor: pointer; font-weight: 800; color: var(--violet); display: inline-flex; align-items: center; gap: 6px; list-style: none; }
.rm-after summary::-webkit-details-marker { display: none; }
@media (prefers-reduced-motion: reduce) { .book { animation: none; } }

/* Opis gry dla gości i wyszukiwarek (gotowy w HTML) */
.about { max-width: 880px; margin: 8px auto 0; padding: 0 16px; }
.about h1 { font-size: 26px; } .about h2 { font-size: 20px; margin-top: 18px; }
.about ul { padding-left: 0; list-style: none; display: grid; gap: 6px; }
.about details { background: var(--card); border-radius: 12px; padding: 10px 14px; margin: 6px 0; }
.about summary { font-weight: 800; cursor: pointer; }

/* 🏔️ Wyprawa */
.mountain { width: 100%; height: auto; display: block; }
.mt-body { fill: #d3d1c7; stroke: #a8a69c; }
.mt-snow { fill: #eef5fd; stroke: #b5d4f4; stroke-width: .5; }
.mt-trail { stroke: #8a887f; stroke-dasharray: 3 4; fill: none; }
.mt-label { font-size: 12px; fill: var(--muted); font-weight: 700; }
.mt-label.today { fill: var(--pink); }
.climber circle { fill: var(--card); stroke: var(--violet); stroke-width: 2; }
.climber.me circle { stroke: var(--pink); stroke-width: 3; }
.ex-teaser { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); border: 2px solid var(--violet); }
.ex-teaser .ex-info { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.ex-mini .mountain { max-height: 110px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mt-body { fill: #4a4762; stroke: #6b6886; } :root:not([data-theme="light"]) .mt-snow { fill: #c9d6ea; } }
:root[data-theme="dark"] .mt-body { fill: #4a4762; stroke: #6b6886; }
:root[data-theme="dark"] .mt-snow { fill: #c9d6ea; }
.card > .mountain { max-height: 440px; }
.tag.ex-in { --c: #10b981; }

/* Uczestnik wyprawy - osobne pole w wierszu gracza */
.user .ex-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding-left: 12px; border-left: 2px solid var(--line);
  font-size: 12px; font-weight: 800; color: var(--violet); white-space: nowrap; }
.user .ex-badge b { font-size: 24px; line-height: 1; }
.user .ex-badge + .pts { margin-left: 12px; }
@media (max-width: 520px) { .user .ex-badge span { display: none; } }

/* Telefon: nic nie może poszerzyć strony (inaczej Safari oddala cały widok) */
html, body { overflow-x: clip; }
#me-chip { min-width: 0; }
.chip { min-width: 0; }
@media (max-width: 640px) {
  .top { padding: 12px 12px 6px; gap: 8px; }
  .top-right { gap: 6px; }
  .chip { gap: 6px; padding: 4px 10px 4px 4px; }
  .chip .nm { display: none; }
  .chip .av { width: 30px; height: 30px; font-size: 19px; }
  .theme-btn { width: 36px; height: 36px; }
  .lang-pick select { padding: 6px 6px; font-size: 13px; }
  main { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 380px) { .logo { font-size: 19px; } .logo i { display: none; }
  /* 6 zakładek na 360 px: węższe odstępy, żeby „Classement”/„Challenges” mieściły się bez wielokropka */
  .tabs { gap: 2px; padding-left: 4px; padding-right: 4px; } .tabs a span { font-size: 10px; letter-spacing: -.02em; } }

.ex-profile { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 8px 12px; border-radius: 14px; background: var(--soft-2);
  border: 2px solid var(--violet); text-decoration: none; color: var(--ink); font-size: 14px; }
.ex-profile b { font-size: 28px; line-height: 1; }
.ex-profile small { display: block; color: var(--muted); font-size: 12px; }
.tabs .cnt { font-size: .85em; font-weight: 700; opacity: .75; }

/* Naszywka wyprawy (styl sprawności harcerskiej) */
.ex-profile .patch { width: 64px; height: 64px; flex: none; }
.patch-track { fill: none; stroke: var(--line); stroke-width: 6; }
.patch-seg { fill: none; stroke: transparent; stroke-width: 6; stroke-linecap: round; }
.patch-seg.on { stroke: var(--pink); }
.patch-face { fill: var(--soft-2); stroke: var(--violet); stroke-width: 2; }
.patch-stitch { fill: none; stroke: var(--violet); stroke-width: 1.2; stroke-dasharray: 2.5 2.5; opacity: .7; }
.patch-icon { font-size: 22px; filter: grayscale(1); opacity: .55; }
.patch.earned .patch-icon { filter: none; opacity: 1; }
.patch.earned .patch-face { fill: color-mix(in srgb, var(--lime) 35%, var(--card)); }
.ex-profile .earn { color: var(--violet); font-weight: 800; }

/* Odznaki w profilu jako okrągłe naszywki z przeszyciem */
.badge .be { width: 56px; height: 56px; margin: 0 auto 4px; border-radius: 50%; display: grid; place-items: center; font-size: 26px;
  background: var(--card); border: 2px dashed var(--violet); box-shadow: 0 0 0 4px var(--soft-2), 0 0 0 6px var(--violet); }
.badge.got .be { box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 45%, var(--card)), 0 0 0 6px var(--ok); border-color: var(--ok); }
.badge.locked .be { border-color: var(--line); box-shadow: 0 0 0 4px var(--soft), 0 0 0 6px var(--line); }
.badge { padding-top: 14px; }

.ex-invite { border: 2px solid var(--pink); background: color-mix(in srgb, var(--pink) 8%, var(--card)); animation: pop .4s; }
.ex-invite-head { display: flex; gap: 12px; align-items: flex-start; }
.ex-invite-head .big { font-size: 40px; line-height: 1; animation: wobble 3s ease-in-out infinite; }


/* ⭕ Kółko i krzyżyk */
.ttt-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 360px; margin: 14px auto; aspect-ratio: 1; }
.ttt-cell { border: 0; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; font-size: 56px; cursor: default; padding: 0; }
.ttt-board.playable .ttt-cell:not(:disabled) { cursor: pointer; outline: 2px dashed var(--violet); outline-offset: -6px; }
.ttt-board.playable .ttt-cell:not(:disabled):hover { transform: translateY(-2px); }
.ttt-cell:disabled { opacity: 1; }
.ttt-cell.pending { outline: 3px solid var(--pink); outline-offset: -6px; }
.ttt-cell.win { background: color-mix(in srgb, var(--lime) 40%, var(--card)); }
.ttt-cat { font-size: 30px; opacity: .45; }
.ttt-mark { font-weight: 900; line-height: 1; font-family: var(--font-head); }
.ttt-mark.x { color: var(--violet); }
.ttt-mark.o { color: var(--pink); }
.ttt-cell .ttt-mark { font-size: 64px; animation: pop .3s; }
.ttt-vs { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.ttt-side { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 14px; border: 2px solid transparent; }
.ttt-side.turn { border-color: var(--pink); background: var(--soft-2); }
.ttt-side .av { font-size: 26px; }
.ttt-side .ttt-mark { font-size: 24px; }
.ttt-status { text-align: center; font-weight: 800; margin: 10px 0 0; }
.ttt-status.win { color: var(--ok-ink); } .ttt-status.lose { color: var(--bad-ink); }
.ttt-log { margin-top: 6px; }
.ttt-row .tag.hot { animation: wobble 2.5s ease-in-out infinite; }

/* ⭕ Gra na stronie głównej */
.ttt-home { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); border: 2px solid var(--violet); }
.ttt-home.turn { border-color: var(--pink); background: color-mix(in srgb, var(--pink) 6%, var(--card)); }
.ttt-home-info { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.ttt-mini { display: grid; grid-template-columns: repeat(3, 22px); gap: 3px; flex: none; }
.ttt-mini span { width: 22px; height: 22px; border-radius: 5px; background: var(--soft-2); display: grid; place-items: center; font-size: 14px; }
.ttt-mini .ttt-mark { font-size: 14px; }
.pill.pill-ttt { border-style: dashed; }
.hist-row.ttt-line { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 14px; text-decoration: none; color: var(--ink); min-width: 0; }
/* Niewidoczny odpowiednik strzałki ▾ z wierszy <details> - prawa krawędź kolumny .when równa we wszystkich wierszach */
.hist-row.ttt-line::after { content: '▾'; visibility: hidden; flex: none; }

/* ⚡ Pojedynek */
.du-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.du-player { display: flex; align-items: center; gap: 8px; min-width: 0; }
.du-player:last-of-type { justify-content: flex-end; }
.du-player b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.du-player .av { font-size: 26px; }
.du-pts { font-family: var(--font-head); font-size: 30px; font-weight: 800; color: var(--violet); }
.du-dots { grid-column: 1 / -1; display: flex; justify-content: center; gap: 8px; }
.du-dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.du-dots i.ok { background: var(--ok); } .du-dots i.bad { background: var(--bad); }
.du-center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.du-big { font-family: var(--font-head); font-size: 64px; font-weight: 800; color: var(--pink); }
.du-clock { font-weight: 800; font-variant-numeric: tabular-nums; }
.du-bar { height: 8px; background: var(--track); border-radius: 999px; overflow: hidden; margin: 6px 0 10px; }
.du-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--pink), var(--violet)); transition: width .1s linear; }
.du-summary { width: 100%; display: grid; gap: 6px; text-align: left; }
.du-sum-row { display: grid; grid-template-columns: 24px 1fr auto; gap: 6px 10px; align-items: center; font-size: 14px; background: var(--soft); border-radius: 12px; padding: 8px 10px; }
.du-sum-row .q { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.du-sum-row .ok, .du-sum-row .bad { grid-column: 2 / -1; font-size: 12px; font-weight: 800; }
.du-sum-row .ok { color: var(--ok-ink); } .du-sum-row .bad { color: var(--bad-ink); }

/* 🐍 Wąż */
.sn-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; }
.sn-hearts { font-size: 24px; letter-spacing: 2px; }
.sn-task { display: flex; flex-direction: column; align-items: center; }
.sn-task b { font-family: var(--font-head); font-size: 30px; color: var(--pink); }
.sn-wrap { position: relative; display: flex; justify-content: center; margin: 10px 0; }
.sn-canvas { border-radius: 16px; box-shadow: var(--shadow); touch-action: none; }
.sn-canvas.sn-ok { animation: pop .3s; }
.sn-overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; }
.sn-overlay[hidden] { display: none; }
.sn-overlay .card { max-width: 320px; }
.sn-pad { display: grid; grid-template-columns: repeat(3, 64px); gap: 8px; justify-content: center; margin-bottom: 10px; }
.sn-btn { font-size: 24px; padding: 10px 0; }
.sn-emoji { font-size: 40px; flex: none; }
@media (min-width: 900px) { .sn-pad { display: none; } }
@media (max-width: 640px) {
  .sn-banner { flex-wrap: nowrap; padding: 8px 12px; gap: 8px; margin-bottom: 0; }
  .sn-hearts { font-size: 18px; letter-spacing: 0; }
  .sn-task b { font-size: 22px; }
  .sn-task .muted { display: none; }
  .sn-banner > .small { font-size: 11px; max-width: 70px; text-align: right; }
  .sn-wrap { margin: 6px 0; }
  .sn-pad { grid-template-columns: repeat(3, 56px); gap: 6px; }
  .sn-btn { padding: 6px 0; font-size: 20px; }
}
.ch-change { margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: var(--soft-2); border: 2px dashed var(--violet); display: grid; gap: 8px; }

/* Kreska oddzielająca kategorie zabawowe (jak ich przerywane obramowanie) */
.pill-sep { flex-basis: 100%; height: 0; border-top: 2px dashed var(--line); margin: 4px 0; }
/* 🔠 ABCD */
.abcd { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; }
.abcd-btn { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--card);
  font: inherit; font-size: 17px; font-weight: 800; color: var(--ink); cursor: pointer; text-align: left; transition: transform .1s; }
.abcd-btn:not(:disabled):hover { border-color: var(--violet); transform: translateY(-2px); }
.abcd-btn b { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--soft-2); color: var(--violet); }
.abcd.done .abcd-btn { cursor: default; font-size: 15px; padding: 8px 10px; }
.abcd-btn.right { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--card)); }
.abcd-btn.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--card)); }
@media (max-width: 420px) { .abcd { grid-template-columns: 1fr; } }

/* Własne okienka potwierdzeń */
.dlg-emoji { font-size: 44px; text-align: center; line-height: 1; margin-bottom: 8px; }
.dlg-text { text-align: center; font-weight: 700; font-size: 17px; margin: 0 0 14px; white-space: pre-line; }
.dlg-actions { justify-content: center; }
.btn.danger { background: linear-gradient(90deg, #ef4444, #f97316); box-shadow: 0 6px 0 #b91c1c; }
.limit-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 8px 10px; border-radius: 12px; background: var(--soft-2); font-size: 13px; }

/* Zasady wyprawy: link w prawym dolnym rogu obrazka z górą */
.ex-mt-wrap { position: relative; }
.ex-rules-link { position: absolute; right: 8px; bottom: 8px; border: 1px solid var(--line); background: var(--card); color: var(--violet);
  font: inherit; font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 999px; cursor: pointer; }
.ex-rules-link:hover { text-decoration: underline; }
.ex-rules { padding-left: 20px; margin: 0 0 14px; text-align: left; line-height: 1.5; }
.ex-rules li { margin-bottom: 6px; }

/* 🎰 Maszyna losująca */
.mc-wrap { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 12px; }
@media (max-width: 620px) { .mc-wrap { grid-template-columns: minmax(0, 1fr); } }
.mc-drum { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.mc-svg { width: 100%; max-width: 260px; height: auto; }
.mc-stand { fill: var(--line); stroke: var(--muted); stroke-width: 1.2; }
.mc-chute { fill: var(--line); stroke: var(--muted); stroke-width: 1.2; }
.mc-glass { fill: color-mix(in srgb, var(--violet) 7%, var(--card)); }
.mc-rim { fill: none; stroke: var(--violet); stroke-width: 4; opacity: .55; }
.mc-reflex { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; opacity: .45; }
.mc-hub { fill: var(--violet); opacity: .35; }
.mc-ball circle { fill: var(--c); stroke: color-mix(in srgb, var(--c) 70%, #000); stroke-width: 1; }
.mc-ball.used circle { fill: none; stroke: var(--muted); stroke-dasharray: 3 2.5; opacity: .6; }
.mc-ball .mc-shine { fill: #fff; stroke: none; opacity: .7; }
.mc-ball.fresh > circle:first-child { stroke: #facc15; stroke-width: 2.5; }
.mc-balls { transform-origin: 130px 108px; }
.mc-svg.spin .mc-balls { animation: mc-spin .9s ease-out; }
@keyframes mc-spin { 0% { transform: rotate(0); } 60% { transform: rotate(200deg); } 100% { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mc-svg.spin .mc-balls { animation: none; } }
.mc-label { display: flex; flex-direction: column; gap: 2px; }
.mc-label b { color: var(--c); }
.mc-rows { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "name new num" "bar bar bar"; gap: 4px 8px; align-items: center;
  text-align: left; font: inherit; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; cursor: pointer; }
.mc-row:hover { border-color: var(--c); }
.mc-row.on { border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 8%, var(--card)); }
.mc-name { grid-area: name; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-num { grid-area: num; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.mc-new { grid-area: new; font-size: 11px; font-weight: 800; color: #a16207; background: #fef3c7; border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.mc-bar { grid-area: bar; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.mc-bar i { display: block; height: 100%; background: var(--c); border-radius: 3px; }
.mc-next { display: flex; gap: 8px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--muted); }
.mc-next b { color: var(--ink); }

/* 🎮 Gry matematyczne */
.ar-head h2 { font-size: 20px; }
.ar-hearts { font-size: 18px; letter-spacing: 2px; }
.ar-board { border-top: 4px solid var(--c); }
.ar-dots { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 10px; }
.ar-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.ar-dots i.ok { background: var(--ok); }
.ar-dots i.bad { background: var(--bad); }

/* 💣 Saper */
.mn-grid { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; max-width: 460px; margin: 0 auto; }
.mn-cell { aspect-ratio: 1; border: none; border-radius: 6px; background: color-mix(in srgb, var(--violet) 45%, var(--card)); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); color: var(--ink);
  font: inherit; font-weight: 800; font-size: clamp(9px, 2.6vw, 13px); line-height: 1.05; padding: 1px; cursor: pointer; overflow: hidden; }
.mn-cell:hover:not(:disabled) { background: color-mix(in srgb, var(--violet) 60%, var(--card)); }
.mn-cell.open { background: var(--card); border: 1px solid var(--line); box-shadow: none; cursor: default; }
.mn-cell.open.zero { background: transparent; border-color: transparent; }
.mn-cell.boom { background: color-mix(in srgb, var(--bad) 35%, var(--card)); font-size: 16px; }
.mn-cell.flag, .mn-cell.mine { font-size: 15px; }
.mn-cell:disabled { cursor: default; }

/* 🚢 Statki */
.sh-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 220px); gap: 14px; align-items: start; }
@media (max-width: 680px) { .sh-wrap { grid-template-columns: minmax(0, 1fr); } .sh-wrap > div:last-child { order: -1; } }
.sh-grid { display: grid; grid-template-columns: 22px repeat(10, minmax(0, 1fr)); gap: 2px; max-width: 440px; }
.sh-lab { font-size: 11px; color: var(--muted); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.sh-cell { aspect-ratio: 1; border: none; border-radius: 4px; background: color-mix(in srgb, var(--sky, #5cc8ff) 22%, var(--card)); font-size: 13px; padding: 0; cursor: pointer; color: var(--ink); }
.sh-cell:hover:not(:disabled) { outline: 2px solid var(--c); }
.sh-cell.miss { background: color-mix(in srgb, var(--sky, #5cc8ff) 10%, var(--card)); color: var(--muted); }
.sh-cell.hit { background: color-mix(in srgb, var(--bad) 30%, var(--card)); }
.sh-cell.sunk { background: color-mix(in srgb, var(--bad) 55%, var(--card)); }
.sh-cell.ship { background: color-mix(in srgb, var(--muted) 45%, var(--card)); }
.sh-cell.flash { outline: 3px solid var(--sun, #facc15); animation: sh-flash .4s 3; }
@keyframes sh-flash { 50% { transform: scale(1.25); } }
.sh-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.sh-card { display: flex; flex-direction: column; gap: 4px; text-align: left; font: inherit; font-size: 14px; color: var(--ink); background: var(--card);
  border: 2px dashed var(--line); border-radius: 12px; padding: 10px; cursor: pointer; }
.sh-card.on { border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 12%, var(--card)); }

/* 🐺 Złap wynik */
.ct-wrap { position: relative; }
.ct-field { position: relative; height: min(50vh, 400px); border-radius: 14px; overflow: hidden; touch-action: manipulation;
  background: color-mix(in srgb, var(--c) 8%, var(--card)); border: 1px solid var(--line); }
.ct-drop { position: absolute; top: 0; width: 22%; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 800;
  font-size: 14px; border-radius: 12px; padding: 8px 4px; cursor: pointer; will-change: transform; }
.ct-drop.good { background: var(--ok); color: #fff; border-color: var(--ok); }
.ct-drop.bad { background: var(--bad); color: #fff; border-color: var(--bad); }
.ct-basket { position: absolute; left: 0; right: 0; bottom: 6px; display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 30px; pointer-events: none; }
.ct-goal { color: var(--c); font-size: 16px; }
.ct-basket b { font-size: 30px; color: var(--c); }

/* 🃏 Memory */
.mm-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 8px; max-width: 520px; margin: 0 auto; }
.mm-card { aspect-ratio: 4 / 3; border: none; border-radius: 12px; font: inherit; font-weight: 800; font-size: clamp(12px, 3.4vw, 17px); cursor: pointer;
  background: var(--violet); color: #fff; transition: transform .2s; padding: 4px; }
.mm-card:hover:not(:disabled) { transform: translateY(-2px); }
.mm-card.up { background: var(--card); color: var(--ink); border: 2px solid var(--c); }
.mm-card.ok { background: color-mix(in srgb, var(--ok) 18%, var(--card)); border-color: var(--ok); }

/* ⚖️ Waga */
.bl-svg { width: 100%; max-width: 420px; height: auto; display: block; margin: 0 auto; }
.bl-stand { fill: var(--muted); }
.bl-bar { fill: var(--c); }
.bl-pin { fill: var(--ink); }
.bl-rope { stroke: var(--muted); stroke-width: 1.5; }
.bl-pan { fill: color-mix(in srgb, var(--c) 25%, var(--card)); stroke: var(--c); stroke-width: 2; }
.bl-beam { transition: transform .6s cubic-bezier(.3, 1.6, .5, 1); }
.bl-text { font-size: 17px; font-weight: 800; fill: var(--ink); }
.bl-text.q { fill: var(--c); }
.bl-controls { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.bl-input { width: 90px; text-align: center; font-size: 20px; font-weight: 800; }

/* 🍕 Pizza */
.pz-task { text-align: center; font-size: 22px; margin: 4px 0 8px; }
.pz-task b { color: var(--c); font-size: 28px; }
.pz-row { display: flex; justify-content: center; }
.pz-svg { width: min(78vw, 260px); height: auto; }
.pz-crust { fill: #d97706; }
.pz-slice { fill: #fde68a; stroke: #b45309; stroke-width: 2; cursor: pointer; transition: fill .15s; }
.pz-slice.on { fill: #f87171; }
.pz-slice:hover { fill: #fcd34d; }
.pz-slice.on:hover { fill: #ef4444; }
.pz-top { font-size: 16px; pointer-events: none; }

/* 📖 Słówka */
.wd-word { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 6px 0 4px; }
.wd-word span { font-size: clamp(28px, 7vw, 40px); font-weight: 800; color: var(--c); }
.wd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 520px; margin: 0 auto; }
@media (min-width: 700px) { .wd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.wd-opt { display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; font-size: 16px; font-weight: 700; color: var(--ink);
  background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; min-height: 52px; }
.wd-opt:hover:not(:disabled) { border-color: var(--c); }
.wd-opt b { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px;
  background: color-mix(in srgb, var(--c) 18%, var(--card)); color: var(--c); }
.wd-opt.right { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, var(--card)); }
.wd-opt.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 15%, var(--card)); }
.wd-opt.dim { opacity: .5; }
.wd-opt:disabled { cursor: default; }

/* Wybór kategorii: zakładki grup + kafelki */
.cp-tabs { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.cp-tab { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; font-size: 12px; font-weight: 800;
  color: var(--muted); background: transparent; border: 2px solid var(--line); border-radius: 14px; padding: 8px 4px; cursor: pointer; position: relative; text-align: center; line-height: 1.15; }
.cp-tab-emoji { font-size: 22px; line-height: 1; }
.cp-tab span:not(.cp-tab-emoji) { max-width: 100%; overflow-wrap: anywhere; }
.cp-short { display: none; }
.cp-tab.on { color: var(--ink); border-color: var(--violet); background: color-mix(in srgb, var(--violet) 12%, var(--card)); }
.cp-tab.has:not(.on)::after { content: ''; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--violet); }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.cp-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; font: inherit; color: var(--ink);
  background: color-mix(in srgb, var(--c) 8%, var(--card)); border: 2px solid color-mix(in srgb, var(--c) 30%, var(--line));
  border-radius: 14px; padding: 10px; cursor: pointer; min-height: 84px; transition: transform .12s, box-shadow .12s; }
.cp-tile:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 18px -10px var(--c); }
.cp-tile.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 22%, var(--card)); box-shadow: 0 8px 20px -10px var(--c); }
.cp-tile:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.6); }
.cp-emoji { font-size: 24px; line-height: 1; }
.cp-label { font-weight: 800; font-size: 14px; line-height: 1.2; }
.cp-tile small { color: var(--muted); font-size: 11px; }
@media (max-width: 520px) { .cp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cp-tab { font-size: 11px; padding: 6px 1px; } .cp-tabs { gap: 4px; }
  .cp-long { display: none; } .cp-short { display: inline; } }

/* ✅ Prawda czy fałsz */
.tf-text { text-align: center; font-size: clamp(20px, 5vw, 28px); font-weight: 800; margin: 14px 0 18px; padding: 14px; border-radius: 16px;
  border: 2px dashed var(--line); }
.tf-text.ok { border: 2px solid var(--ok); }
.tf-text.bad { border: 2px solid var(--bad); }
.tf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 460px; margin: 0 auto; }
.tf-btn { font: inherit; font-size: 20px; font-weight: 800; padding: 16px 10px; border-radius: 16px; border: none; cursor: pointer; color: #fff; }
.tf-btn.yes { background: #16a34a; }
.tf-btn.no { background: #dc2626; }
.tf-btn.dim { opacity: .35; }
.tf-btn.right { outline: 4px solid var(--sun, #facc15); }
.tf-btn.wrong { opacity: .5; text-decoration: line-through; }
.tf-why { text-align: center; margin-top: 12px; }

/* 🔍 Równania */
.eq-text { text-align: center; font-size: clamp(24px, 6vw, 34px); font-weight: 800; margin: 14px 0; color: var(--c); letter-spacing: .5px; }
.eq-x { font-size: 22px; }
.eq-steps { max-width: 360px; margin: 0 auto; padding: 12px 16px; border-radius: 14px; font-size: 17px; line-height: 1.7;
  font-variant-numeric: tabular-nums; }
.eq-steps.ok { background: color-mix(in srgb, var(--ok) 14%, var(--card)); }
.eq-steps.bad { background: color-mix(in srgb, var(--bad) 14%, var(--card)); }
.eq-steps b { display: block; margin-bottom: 4px; }

/* 📐 Twierdzenia */
.th-q { text-align: center; font-size: clamp(18px, 4.4vw, 22px); font-weight: 800; margin: 10px auto 14px; max-width: 560px; line-height: 1.35; }
.th-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .th-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.th-grid .wd-opt { font-size: 15px; font-weight: 600; }

/* Ranking: ostatnio widziany */
.user .seen { font-size: 11px; color: var(--muted); margin-top: 1px; }
.user .seen.on { color: var(--ok-ink); font-weight: 700; }

/* Ogłoszenia na stronie głównej */
.news-card { position: relative; border: 2px solid #f5b301; background: color-mix(in srgb, #f5b301 10%, var(--card)); }
.news-x { position: absolute; top: 8px; right: 10px; border: none; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }
.news-podium { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 4px; }
.news-w { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.news-w.me { border-color: var(--violet); }
.news-medal { font-size: 22px; }

/* ⛏️💰 Skarb wiedzy */
.tr-teaser { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); border: 2px solid #c8962a; }
.tr-chest { font-size: 46px; }
.tr-game { position: relative; margin-top: 10px; border: 4px solid #111827; box-shadow: 0 0 0 2px #67738b; border-radius: 6px; overflow: hidden; background: #25273b; }
.tr-canvas { width: 100%; height: auto; display: block; image-rendering: pixelated; }
.tr-hud { position: absolute; top: 1.2%; left: 50%; transform: translateX(-50%); padding: 4px 14px; background: #172036ed; border: 3px solid #8b9bb7;
  box-shadow: 0 4px 0 #111727; color: #ffdf83; text-shadow: 2px 2px #473116; font-weight: 900; white-space: nowrap; font-size: clamp(11px, 2.2vw, 22px); letter-spacing: 1px; }
.tr-players { position: absolute; top: 5.5%; left: 0; right: 0; height: 9%; pointer-events: none; }
.tr-player { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: #1b2440e0; border: 2px solid #0b0e19; border-radius: 8px; padding: 3px 6px; color: #fff; font-size: clamp(9px, 1.3vw, 13px); max-width: 15%; }
.tr-player.me { border-color: #ffdf83; }
.tr-player .av { font-size: clamp(14px, 2.6vw, 26px); width: auto; height: auto; background: none; }
.tr-player b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-bar { width: 100%; min-width: 36px; height: 5px; background: #0b0e19; border-radius: 3px; overflow: hidden; }
.tr-bar i { display: block; height: 100%; background: #5be35b; }
.tr-days { position: absolute; left: 1.5%; top: 0; bottom: 0; width: 16%; pointer-events: none; }
.tr-day { position: absolute; transform: translateY(-50%); color: #fff; font-weight: 900; font-size: clamp(8px, 1.5vw, 16px); background: #202c3b;
  border: 2px solid #0b0e19; padding: 3px 8px; box-shadow: 2px 3px 0 #101722; text-shadow: 1px 2px #000; white-space: nowrap; }
.tr-day.d1 { background: #246b2d; } .tr-day.d2 { background: #79502c; } .tr-day.d6 { background: #47336d; } .tr-day.d7 { background: #9a252a; }
.tr-day.now { outline: 3px solid #ffdf83; }
.tr-label { position: absolute; bottom: 3%; left: 2%; color: #fff3bc; background: #9c2922; border: 2px solid #2e1014; font-weight: 900; padding: 4px 10px;
  box-shadow: 3px 3px #120e16; font-size: clamp(9px, 1.8vw, 20px); text-shadow: 2px 2px #4b1716; }
.tr-rules ul { margin: 8px 0 0; padding-left: 20px; line-height: 1.55; }
@media (max-width: 520px) { .tr-hud { display: none; } .tr-player b { display: none; } .tr-player { padding: 2px 3px; } .tr-day { padding: 1px 4px; border-width: 1px; } }

/* 🧠 Tabliczka mistrza */
.tm-teaser { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); border: 2px solid #f5b301; }
.tm-owl.big { font-size: 44px; }
.tm-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.tm-step { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px; border: 1px dashed var(--line); }
@media (max-width: 520px) { .tm-steps { grid-template-columns: 1fr; } }
.tm-grid { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 3px; max-width: 480px; margin: 8px auto; }
.tm-h { display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; color: var(--muted); aspect-ratio: 1; }
.tm-cell { aspect-ratio: 1; border-radius: 6px; border: 1px solid var(--line); font: inherit; font-weight: 800; font-size: clamp(9px, 2.6vw, 13px); cursor: pointer;
  color: var(--ink); background: color-mix(in srgb, var(--muted) 12%, var(--card)); padding: 0; }
.tm-cell.known { background: #22c55e; color: #052e14; border-color: #15803d; box-shadow: inset 0 -3px 0 #16a34a; }
.tm-cell.diag { outline: 2px dashed color-mix(in srgb, var(--violet) 50%, transparent); outline-offset: -3px; }
.tm-cell.due { position: relative; }
.tm-cell.due::after { content: ''; position: absolute; top: 2px; right: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--pink); }
.tm-legend { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.tm-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; background: color-mix(in srgb, var(--muted) 25%, var(--card)); }
.tm-dot.known { background: #22c55e; } .tm-dot.due { background: var(--pink); border-radius: 50%; }
.tm-bubble { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; }
.tm-owl { font-size: 34px; line-height: 1; }
.tm-bubble-body { position: relative; flex: 1; background: color-mix(in srgb, #f5c842 14%, var(--card)); border: 2px solid #f5c842; border-radius: 16px; padding: 10px 12px; }
.tm-bubble-body::before { content: ''; position: absolute; left: -10px; top: 14px; border: 8px solid transparent; border-right-color: #f5c842; }
.tm-bubble-body p { margin: 4px 0 8px; }
.tm-play { text-align: center; }
.tm-q { font-size: clamp(30px, 9vw, 48px); font-weight: 900; margin: 14px 0; display: flex; justify-content: center; align-items: center; gap: 10px; }
.tm-q.bad { color: var(--bad-ink); }
.tm-display { min-width: 2.5em; padding: 2px 10px; border-radius: 12px; border: 3px solid var(--violet); color: var(--violet); }
.tm-keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 320px; margin: 0 auto 12px; }
.tm-key { font: inherit; font-size: 24px; font-weight: 800; padding: 12px 0; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.tm-key:active { transform: scale(.96); }
.tm-key.ok { background: var(--violet); color: #fff; border-color: var(--violet); }
.ar-board.flash-ok { box-shadow: 0 0 0 3px var(--ok); } .ar-board.flash-bad { box-shadow: 0 0 0 3px var(--bad); }
.ar-times60 { text-align: center; }
.tm-combo { color: #ff7a1a; }
.tm-changes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 8px 0; }
.tm-chg { padding: 4px 10px; border-radius: 999px; font-weight: 800; font-size: 13px; }
.tm-chg.known { background: #22c55e; color: #052e14; }
.tm-break { text-align: left; }
.tm-tip { padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--violet) 10%, var(--card)); margin-bottom: 10px; }
.tm-area { width: 100%; max-width: 320px; display: block; margin: 0 auto 8px; }
.tm-sq.a { fill: #8b5cf6; } .tm-sq.b { fill: #f472b6; }
.tm-cut { stroke: var(--ink); stroke-width: 3; stroke-dasharray: 6 4; }
.tm-cutrow { justify-content: center; align-items: center; gap: 8px; margin-bottom: 8px; }
.tm-eq { display: flex; align-items: center; gap: 8px; justify-content: center; margin: 6px 0; font-weight: 800; font-size: 18px; }
.tm-eq .a { color: #8b5cf6; } .tm-eq .b { color: #f472b6; }
.tm-in { width: 90px; text-align: center; font-size: 18px; font-weight: 800; }
.tm-in.big { width: 110px; } .tm-in.bad { border-color: var(--bad); }

/* ✨ Nowości */
.wn-card { position: relative; border: 2px solid var(--violet); background: color-mix(in srgb, var(--violet) 8%, var(--card)); }
.wn-title { font-size: 17px; }
.wn-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.wn-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); transition: transform .12s; }
.wn-item:hover { transform: translateX(3px); border-color: var(--violet); }
.wn-emoji { font-size: 30px; }
.wn-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.wn-text small { color: var(--muted); }
.wn-go { font-size: 20px; color: var(--violet); font-weight: 800; }
.wn-badge { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: #ff3d7f; color: #fff; font-size: 10px; font-weight: 900;
  letter-spacing: .5px; vertical-align: 2px; animation: wn-pulse 2s infinite; }
@keyframes wn-pulse { 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .wn-badge { animation: none; } }
.cp-tile { position: relative; }
.cp-new { position: absolute; top: 6px; right: 6px; margin: 0; }

/* 🇬🇧 Angielski krok po kroku */
.en-teaser { border-color: #2563eb; }
.en-pick { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.en-pick select { font: inherit; padding: 10px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--ink); max-width: 100%; }
.en-unit-emoji { font-size: 34px; }
.en-secs { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.en-sec { display: flex; align-items: center; gap: 10px; padding: 10px; border: 2px solid var(--line); border-radius: 14px; }
.en-sec.test { border-color: #2563eb; background: color-mix(in srgb, #2563eb 6%, var(--card)); }
.en-num { flex: none; min-width: 30px; font-weight: 900; color: #2563eb; }
.en-sec-emoji { flex: none; font-size: 22px; }
.en-sec-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.en-sec-info b { overflow-wrap: anywhere; }
.en-stars { flex: none; color: #f5b301; letter-spacing: 1px; font-size: 15px; }
@media (max-width: 520px) { .en-sec { flex-wrap: wrap; } .en-sec-info { flex-basis: calc(100% - 80px); } .en-stars { margin-left: 40px; } .en-sec .btn.small:first-of-type { margin-left: auto; } }
.en-ask { text-align: center; font-weight: 800; color: var(--muted); margin: 0 0 10px; }
.en-q { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; text-align: center; font-size: clamp(19px, 4.6vw, 24px); font-weight: 800; margin: 4px auto 14px; max-width: 620px; }
.en-q.reply { background: color-mix(in srgb, var(--c) 10%, var(--card)); border-radius: 16px; padding: 10px 14px; }
.en-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 360px; }
.en-grid.long { grid-template-columns: 1fr; max-width: 560px; }
.en-text { max-width: 560px; margin: 0 auto 12px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--c) 8%, var(--card));
  border: 2px dashed color-mix(in srgb, var(--c) 40%, var(--line)); line-height: 1.5; display: flex; gap: 8px; align-items: flex-start; }
.en-text span { flex: 1; }
.en-flagbox { display: flex; justify-content: center; margin: 4px 0 12px; }
.en-flag { width: 150px; height: 100px; border-radius: 8px; box-shadow: 0 0 0 1px var(--line), 0 6px 18px rgba(0, 0, 0, .12); }
.en-pic { text-align: center; font-size: 56px; line-height: 1.1; margin: 0 0 8px; }
.en-tree { max-width: 560px; margin: 0 auto 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.en-fams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.en-fam { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 4px; border-top: 2px solid var(--line); }
.en-couple, .en-kids { display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; }
.en-ring { color: #ec4899; font-size: 12px; }
.en-person { display: inline-flex; flex-direction: column; align-items: center; padding: 4px 8px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); min-width: 58px; }
.en-person i { font-style: normal; font-size: 22px; line-height: 1.1; }
.en-person b { font-size: 13px; }
.en-person.focus { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--card)); }
.en-spellbox { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.en-hint { font-weight: 800; color: var(--muted); }
.en-spell { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.en-l { min-width: 26px; height: 38px; display: grid; place-items: center; font-size: 26px; font-weight: 900; }
.en-l.gap { border-bottom: 3px solid var(--c); color: var(--c); min-width: 26px; margin: 0 3px; }
.en-l.gap.ok { color: var(--ok-ink); border-color: var(--ok); }
.en-l.gap.fix { color: var(--bad-ink); border-color: var(--bad); }
.en-tiles { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 420px; }
.en-tile { font: inherit; font-size: 22px; font-weight: 900; width: 46px; height: 46px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.en-tile:hover:not(:disabled) { border-color: var(--c); }
.en-tile:disabled { opacity: .35; cursor: default; }
.en-tile.back { width: 58px; }
.en-caps { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 620px; margin: 0 auto; }
.en-word { font: inherit; font-size: 19px; font-weight: 700; padding: 6px 10px; border-radius: 10px; border: 2px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.en-word.on { border-color: var(--c); color: var(--c); }
.en-word.ok { border-color: var(--ok); color: var(--ok-ink); }
.en-word.missed { border-color: #f5b301; color: #b45309; }
.en-word.wrong { border-color: var(--bad); color: var(--bad-ink); text-decoration: line-through; }
.en-word:disabled { cursor: default; }
.en-reveal { max-width: 560px; margin: 14px auto 0; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--card)); }
.en-reveal.bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, var(--card)); }
.en-full { font-size: 18px; font-weight: 800; white-space: pre-line; margin: 4px 0; }
.en-tip { color: var(--muted); }

/* ---------- 📜 Historia ---------- */
#hbadge { background: var(--violet); }
.hs-link { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; min-height: 44px;
  padding: 12px 16px; border: 2px solid transparent; text-decoration: none; color: var(--ink); }
.hs-link b { font-weight: 800; }
.hs-link small { color: var(--muted); font-weight: 700; }
.hs-link:hover { border-color: var(--violet); }
.hs-see { display: inline-block; margin-top: 10px; font-weight: 800; }
.hs-title { margin: 4px 4px 12px; }
.hs-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; padding: 14px 8px; }
.hs-stat b { display: block; font-family: var(--font-head); font-size: 24px; white-space: nowrap; }
.hs-stat small { color: var(--muted); font-weight: 700; }
.hs-filters { margin: 12px 0 8px; }
.hs-kinds { gap: 6px; margin-bottom: 4px; }
.hs-kinds .pill { padding: 5px 11px; font-size: 13px; }
.hs-more { text-align: center; margin: 14px 0; }
@media (max-width: 420px) {
  .hs-filters { gap: 5px; } .hs-filters .pill { padding: 7px 6px; font-size: 12px; gap: 3px; }
  .hs-kinds { gap: 4px; } .hs-kinds .pill { padding: 5px 8px; font-size: 12px; gap: 3px; }
}
@media (max-width: 380px) { .hs-filters { gap: 4px; } .hs-filters .pill { padding: 7px 5px; } .hs-stat b { font-size: 20px; } }
/* 🇬🇧 Dział 2-3: blisko / daleko, pokój z rzeczami, scena z przyimkiem, kwestia osoby B */
.en-dist { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0 0 10px; }
.en-dist-row { display: flex; align-items: flex-end; justify-content: center; gap: 6px; line-height: 1.1; }
.en-me { font-size: 44px; }
.en-hand { font-size: 30px; }
.en-dots { font-size: 22px; letter-spacing: 2px; color: var(--muted); padding-bottom: 6px; }
.en-obj { font-size: 54px; }
.en-nearbox { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.en-nearbox .en-hand { font-size: 26px; margin-bottom: -4px; }
.en-dist.far .en-obj { font-size: 28px; opacity: .9; padding-bottom: 4px; }
.en-room { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 560px; margin: 0 auto 12px; padding: 10px;
  border-radius: 16px; border: 2px dashed var(--line); background: color-mix(in srgb, var(--c) 5%, var(--card)); }
.en-thing { display: inline-flex; flex-direction: column; align-items: center; padding: 4px 8px; border-radius: 12px; background: var(--card); border: 2px solid var(--line); }
.en-thing i { font-style: normal; font-size: 30px; line-height: 1.15; }
.en-thing small { font-weight: 700; color: var(--muted); }
.en-scenebox { display: flex; justify-content: center; margin: 0 0 10px; }
.en-scene { width: min(300px, 86vw); height: auto; border-radius: 14px; box-shadow: 0 0 0 1px var(--line); background: #fbf8f2; }
.en-q.en-b { margin-top: -6px; font-size: clamp(17px, 4.2vw, 21px); font-weight: 700; }
.en-retry { display: flex; justify-content: center; margin: -4px 0 6px; }
.en-full-row { display: flex; align-items: center; gap: 8px; }
.en-full-row .en-full { flex: 1; }
.en-mem { margin-top: 4px; font-weight: 700; color: var(--ink); }

/* ---------- 📚 Nauka na dziś · 🔁 Powtórka dnia · 🌟 Co już umiem (nd- / rv- / sk-) ---------- */
.nd-card { display: flex; flex-direction: column; gap: 12px; }
.nd-title { margin: 0; font-size: 20px; }
.nd-body { display: flex; flex-direction: column; gap: 10px; }
.rv-hero { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--soft); }
.rv-hero .btn { margin-top: 6px; }
.rv-hero .btn.small { align-self: flex-start; }
.rv-hero.wait { border-color: var(--pink); background: color-mix(in srgb, var(--pink) 6%, var(--card)); }
.rv-hero.done { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--card)); }
.rv-hero.empty { border-style: dashed; }
.sk-skel { min-height: 72px; background: color-mix(in srgb, var(--muted) 14%, var(--card)); animation: sk-pulse 1.2s ease-in-out infinite; }
@keyframes sk-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .sk-skel { animation: none; } }
.nd-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nd-link { min-width: 0; min-height: 44px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; }
.nd-link:hover { border-color: var(--violet); }
.nd-link b { font-size: 13px; font-weight: 800; max-width: 100%; overflow-wrap: anywhere; }
.nd-link small { color: var(--muted); font-size: 11px; font-weight: 700; }
.nd-emoji { font-size: 22px; line-height: 1; }
@media (min-width: 700px) {
  .nd-body { display: grid; grid-template-columns: 1.4fr 1fr; align-items: stretch; }
  .nd-body > .nd-links:only-child { grid-column: 1 / -1; }
  .nd-links { grid-template-columns: 1fr; }
  .nd-link { flex-direction: row; align-items: center; gap: 8px; }
  .nd-link small { margin-left: auto; }
}

.rv-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.rv-src, .rv-lvl { font-size: 12px; }
.rv-center { justify-content: center; margin-top: 10px; }
.wd-ask { text-align: center; margin: 0 0 12px; }
.rv-prompt { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 6px 0 12px; text-align: center; }
.rv-prompt b { font-size: clamp(24px, 6vw, 34px); font-weight: 800; color: var(--c); overflow-wrap: anywhere; }
.rv-type { font: inherit; font-size: 24px; font-weight: 800; text-align: center; width: 100%; max-width: 360px; padding: 10px 12px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--card); color: var(--ink); }
.rv-type:focus { outline: none; border-color: var(--c); }
.rv-accents { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.rv-accents .en-tile { width: 40px; height: 40px; font-size: 20px; }
.rv-hint { margin: 0; color: var(--muted); text-align: center; }
.en-l.hint { color: var(--muted); }
.rv-answer-row { justify-content: center; }
.rv-answer.ok .en-l, .rv-answer.accent .en-l, .rv-answer.almost .en-l { color: var(--ok-ink); }
.rv-answer.bad .en-l { color: var(--ink); }
.rv-answer .en-l.gap.fix { color: var(--bad-ink); border-color: var(--bad); }   /* brak akcentu / miejsce literówki */
.ar-board.rv-gone { display: none; }                                             /* powtórka po końcu: zostaje samo podsumowanie */
.rv-sum { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rv-sum-big { font-size: 40px; font-weight: 900; }
.rv-sum p { margin: 0; }
.rv-up { font-size: 13px; }

.en-star-next { display: inline-block; border: 1.5px dotted #f5b301; border-radius: 6px; padding: 0 2px; line-height: 1.1; margin-left: 2px;
  animation: en-star-pulse 1s ease-in-out 1; }
@keyframes en-star-pulse { 50% { transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { .en-star-next { animation: none; } }
.en-sec { flex-wrap: wrap; }
.en-star3 { flex-basis: 100%; color: var(--muted); padding-left: 40px; margin-top: -4px; }

.sk-h3 { margin: 0; }
.sk-link { text-decoration: none; }
.sk-row { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 10px; margin-top: 8px;
  font: inherit; color: var(--ink); text-align: left; background: var(--card); border: 2px solid var(--line); border-radius: 14px; cursor: pointer; }
.sk-row:hover:not(:disabled) { border-color: #2563eb; }
.sk-row .sk-name { font-weight: 700; overflow-wrap: anywhere; }
.sk-row .sk-bar { grid-column: 1 / -1; }
.sk-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line); }
.sk-bar i { flex: none; width: var(--w, 0%); }
.sk-ok, .tm-dot.sk-ok { background: #22c55e; }
.sk-mid, .tm-dot.sk-mid { background: #f5b301; }
.sk-due, .tm-dot.sk-due { background: var(--pink); }
.sk-counts { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.sk-count { padding: 4px 10px; border-radius: 999px; background: var(--soft-2); font-weight: 800; }
.sk-words { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 2px; }
.sk-word { display: flex; flex-direction: column; padding: 4px 10px; border-radius: 12px; border: 2px solid var(--line); }
.sk-word small { color: var(--muted); font-size: 11px; }
.sk-word.known { border-color: #22c55e; } .sk-word.solid { border-color: #f5b301; }

/* 🔒 Działy angielskiego po kolei */
.en-unit.locked { background: color-mix(in srgb, var(--muted) 6%, var(--card)); }
.en-unit.locked h3, .en-unit.locked .en-unit-emoji { opacity: .7; }
.en-lock { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 4px; padding: 10px 12px; border-radius: 12px; border: 2px dashed var(--line); }
.en-sec.shut { opacity: .5; filter: grayscale(.6); }

/* 🧠 Trening: Trening | Poziom, pod spodem Kategoria na pełną szerokość (odstępy 16 px z gap) */
.pr-grid { align-items: stretch; margin-bottom: 16px; }
.pr-grid > .card { margin-bottom: 0; }
.pr-grid > .pr-cats { grid-column: 1 / -1; }
@media (min-width: 701px) { .pr-cats .cp-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
@media (min-width: 701px) { .pr-grid .users { max-height: 340px; overflow-y: auto; padding-right: 4px; } }

/* 🥉 Ligi tygodnia, 🎒 Moja klasa, 📈 Moje postępy, 🤝 drużyny w grupach */
.lg-tabs { display: flex; justify-content: center; margin-bottom: 14px; }
.lg-seg { flex-wrap: wrap; justify-content: center; max-width: 100%; }
.lg-seg button { min-height: 44px; padding: 8px 10px; font-size: 14px; }
.lg-head { gap: 14px; flex-wrap: nowrap; }
.lg-badge { font-size: 46px; line-height: 1; }
.lg-title h2 { margin: 0; }
.lg-me { margin: 12px 0 4px; padding: 12px 14px; border-radius: 16px; background: var(--soft-2); }
.lg-me .small { margin-top: 4px; }
.lg-podium .p.me .nm { color: var(--pink); }
.lg-row .av { font-size: 22px; width: 38px; height: 38px; }
.lg-row.lg-up { border-left: 4px solid var(--ok); }
.lg-upl { color: var(--ok-ink); font-weight: 700; }
.lg-gap { text-align: center; color: var(--muted); font-weight: 800; letter-spacing: 4px; }
.lg-more { text-align: center; }
.lg-how summary { cursor: pointer; font-weight: 700; color: var(--violet); min-height: 44px; display: flex; align-items: center; }
.gc-card { border: 2px solid var(--sky); }
.gc-pills .pill { min-height: 44px; min-width: 44px; }
.gc-save { margin-top: 12px; }
.gc-btn { min-height: 44px; }
.lg-alone { padding: 20px 10px; }
.mp-rec { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mp-rec .stat b { font-size: 24px; }
.mp-card h3, .card .mp-cmp + h3 { margin-top: 16px; }
/* długie nicki nie wychodzą poza kartę (telefon 375 px) */
.users { grid-template-columns: minmax(0, 1fr); }
.users > .user { min-width: 0; }
.user .meta { flex: 1 1 auto; overflow: hidden; }
.user .nm, .podium .p .nm, .gt-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-cmp { font-weight: 700; margin: 12px 0 4px; }
.mp-miles { display: flex; flex-direction: column; gap: 10px; }
.mp-mile { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--soft); }
.mp-mile.got { background: var(--win-bg); }
.mp-me { font-size: 26px; }
.mp-mt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mp-fill { background: var(--violet); }
.mp-mile.got .mp-fill { background: var(--ok); }
.mp-group + .mp-group { margin-top: 16px; }
.mp-gname { display: flex; gap: 8px; align-items: center; color: inherit; text-decoration: none; margin-bottom: 6px; font-size: 17px; }
.mp-medal { width: 26px; text-align: center; font-size: 20px; flex: none; }
.gt-goal { padding: 12px 14px; border-radius: 16px; background: var(--soft-2); margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.gt-goal.done { background: var(--win-bg); }
.gt-track, .gt-bar { display: block; height: 12px; border-radius: 999px; background: var(--track); overflow: hidden; }
.gt-fill { display: block; height: 100%; width: var(--w, 0%); background: linear-gradient(90deg, var(--violet), var(--pink)); border-radius: 999px; }
.gt-goal.done .gt-fill { background: var(--ok); }
.gt-level { gap: 8px; }
.gt-level .seg button { min-height: 40px; padding: 8px 10px; }
.gt-team { border: 2px solid var(--line); border-radius: 16px; padding: 4px 12px; margin-bottom: 8px; }
.gt-team.mine { border-color: var(--pink); background: var(--me-bg); }
.gt-team summary { display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; list-style: none; }
.gt-team summary::-webkit-details-marker { display: none; }
.gt-emoji { font-size: 30px; }
.gt-name { display: flex; flex-direction: column; min-width: 72px; }
.gt-name small { color: var(--pink); font-weight: 800; font-size: 11px; }
.gt-bar { flex: 1; min-width: 40px; }
.gt-score { white-space: nowrap; color: var(--violet); }
.gt-members { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 10px; }
.gt-m { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--soft-2); font-size: 14px; max-width: 100%; }
.gt-m .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.gt-m.me { outline: 2px solid var(--pink); }
.gt-ok { color: var(--ok-ink); font-weight: 900; }
/* ❄️ Tydzień nauki: 7 kropek (🔥 dzień nauki, ❄️ dzień wolny, ○ jeszcze nie) */
.st-box { margin: 10px 0; padding: 10px 12px; border-radius: 16px; background: var(--soft-2); }
.st-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-streak { font-weight: 800; color: #ff7a1a; font-size: 14px; }
.st-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 8px 0 4px; }
.st-day { display: grid; justify-items: center; gap: 2px; padding: 4px 0; border-radius: 12px; }
.st-day .st-dot { font-size: 20px; line-height: 1.2; }
.st-day.none .st-dot { color: var(--muted); }
.st-day small { font-size: 11px; color: var(--muted); text-transform: capitalize; }
.st-day.today { background: var(--card); box-shadow: inset 0 0 0 2px var(--violet); }

/* 🧠 Zachęta do przerwy - nieblokująca karta nad dolnym menu */
.brk-card { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); width: min(92vw, 420px); z-index: 40;
  margin: 0; box-shadow: var(--shadow); border: 2px solid var(--violet); animation: drop .3s; }
.brk-card p { margin: 6px 0 10px; }
