/* ======================================================================
   Mój Dziennik - style. Najpierw czytelny dziennik, gra tylko w "Skinach".
   ====================================================================== */
:root {
  --bg: #f5f6fa;
  --card: #ffffff;
  --card-2: #f0f2f7;
  --text: #141824;
  --muted: #687087;
  --line: #e4e7ef;
  --accent: #3b5bfd;
  --accent-2: #7c5cff;
  --accent-soft: #e9edff;
  --accent-text: #2b45d6;
  --danger: #e5484d;
  --danger-soft: #fdecec;
  --warn: #d48806;
  --warn-soft: #fff4d9;
  --ok: #18a058;
  --ok-soft: #e3f7ec;
  --gold: #e0a800;
  --g1: #e5484d; --g2: #f0802a; --g3: #d9a400; --g4: #4fae2e; --g5: #18a058; --g6: #0e9384; --gx: #8b90a0;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20, 24, 40, .04), 0 6px 20px rgba(20, 24, 40, .05);
  --tabbar-h: 64px;
  /* dolny margines iPhone'a - z limitem: Safari potrafi chwilowo podać ogromną wartość (pasek ląduje w połowie ekranu) */
  --sab: min(env(safe-area-inset-bottom), 34px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1117; --card: #181b24; --card-2: #222634; --text: #eceef4; --muted: #969db1; --line: #2a2f3d;
    --accent: #7086ff; --accent-2: #a28bff; --accent-soft: #232a4d; --accent-text: #a9b6ff;
    --danger-soft: #3a1d20; --warn: #e8a92a; --warn-soft: #3a2f12; --ok-soft: #133024; --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1117; --card: #181b24; --card-2: #222634; --text: #eceef4; --muted: #969db1; --line: #2a2f3d;
  --accent: #7086ff; --accent-2: #a28bff; --accent-soft: #232a4d; --accent-text: #a9b6ff;
  --danger-soft: #3a1d20; --warn: #e8a92a; --warn-soft: #3a2f12; --ok-soft: #133024; --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
a { color: var(--accent-text); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.small { font-size: 13px; }
.error { color: var(--danger); margin: 0; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row.center { justify-content: center; }
.spread { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
svg.i { width: 22px; height: 22px; flex: none; }
svg.i.xs { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- Formularze i przyciski ---------- */
.field { display: flex; flex-direction: column; gap: 6px; text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; }
.field input, .input {
  font: inherit; font-size: 16px; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; outline: none; width: 100%;
}
.sim .input, .range-form .input, .room-chat .input { width: auto; }
textarea.input { resize: vertical; font: inherit; font-size: 16px; }
.field input:focus, .input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 12px 16px;
  font-weight: 650; cursor: pointer; text-decoration: none; text-align: center;
  background: var(--card-2); color: var(--text); transition: transform .1s, filter .15s;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--accent-text); }
.btn.danger-text { color: var(--danger); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.small { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn.icon-text svg { width: 19px; height: 19px; }
.icon-btn {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 12px; background: transparent;
  cursor: pointer; color: var(--text); text-decoration: none;
}
.icon-btn:hover { background: var(--card-2); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* przełącznik (checkbox jako suwak) */
input.toggle {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0;
  width: 46px; height: 28px; border-radius: 14px; background: var(--line); position: relative; cursor: pointer; transition: background .2s;
}
input.toggle::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s;
}
input.toggle:checked { background: var(--ok); }
input.toggle:checked::after { transform: translateX(18px); }

/* ---------- Logowanie ---------- */
/* Jedna karta z formularzem, pod nią "albo" i dwa spokojne przyciski - bez ramek wokół każdego zdania */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  padding: calc(env(safe-area-inset-top) + 28px) 16px calc(var(--sab) + 24px);
  background: radial-gradient(120% 60% at 50% 0%, var(--accent-soft), transparent 70%), var(--bg); }
.login-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 18px; text-align: center; }
.login-card p { margin: 0; }
.login-head { display: grid; justify-items: center; gap: 6px; }
.login-logo { border-radius: 16px; box-shadow: 0 10px 28px rgba(59, 91, 253, .28); margin-bottom: 6px; }
.login-card h1 { font-size: 26px; letter-spacing: -.02em; }
.login-box { display: grid; gap: 14px; padding: 18px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.login-box .field { gap: 6px; font-size: 13px; }
.login-box .field input { background: var(--card-2); border-color: transparent; }
.login-box .field input:focus { border-color: var(--accent); background: var(--card); }
.login-box .btn.primary { padding: 14px 16px; font-size: 16px; border-radius: 14px; margin-top: 2px; }
.login-error { text-align: left; font-size: 14px; padding: 10px 12px; border-radius: 12px; background: var(--danger-soft); }
.login-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--text); }
.btn.outline:hover { background: var(--card-2); }

/* ---------- Szkielet aplikacji ---------- */
.app { min-height: 100vh; min-height: 100dvh; }
.main { padding-bottom: calc(var(--tabbar-h) + var(--sab) + 20px); min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 4px;
  padding: calc(env(safe-area-inset-top) + 10px) 12px 10px 16px;
  background: var(--bg); background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
}
.topbar h1 { font-size: 24px; letter-spacing: -.015em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#back-btn { margin-left: -8px; }
.badge { font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 3px 8px; border-radius: 99px; background: var(--warn-soft); color: var(--warn); }
.bell-btn { position: relative; }
.bell-count { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; line-height: 17px; text-align: center; }
.bell-count:empty { display: none; }
.bell-btn.has svg { animation: bell-ring 1.2s ease-in-out 2; transform-origin: 50% 0; }
@keyframes bell-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } }
.me-btn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; text-decoration: none; margin-left: 2px; }
.me-ini { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

.view { padding: 4px 16px 16px; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 20; display: flex;
  height: calc(var(--tabbar-h) + var(--sab)); padding-bottom: var(--sab);
  background: var(--card); background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  flex: 1; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 650;
}
.tabbar a svg { width: 24px; height: 24px; transition: transform .15s; }
.tabbar a.active { color: var(--accent); }
.tabbar a.active svg { transform: translateY(-1px); }
.dot-count {
  position: absolute; top: 6px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.sidebar { display: none; }

@media (max-width: 699px) {
  #refresh-btn, #demo-badge { display: none !important; }
}
@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: 250px 1fr; }
  .tabbar { display: none; }
  .main { padding-bottom: 32px; }
  .sidebar {
    display: flex; flex-direction: column; gap: 14px;
    position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
    padding: 20px 14px; border-right: 1px solid var(--line); background: var(--card);
  }
  .brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; padding: 0 8px; }
  .brand img { border-radius: 9px; }
  #side-nav { display: flex; flex-direction: column; gap: 2px; }
  #side-nav .nav-group { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 12px 12px 4px; }
  #side-nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 550; }
  #side-nav a:hover { background: var(--card-2); }
  #side-nav a.active { background: var(--accent-soft); color: var(--accent-text); }
  #side-nav a .dot-count { position: static; margin-left: auto; }
  #side-nav .sep { height: 1px; background: var(--line); margin: 8px 4px; }
  #side-nav a.nav-game svg { color: var(--accent-2); }
  .topbar { padding-top: 18px; max-width: 792px; margin: 0 auto; }
}

/* ---------- Karty i listy ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card.bordered { box-shadow: none; border: 1px solid var(--line); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.card-head.pad { padding: 16px 16px 4px; margin: 0; }
.card-head h2 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.card-head a { color: var(--accent-text); font-size: 13px; font-weight: 650; text-decoration: none; flex: none; }
.section-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 6px 4px -4px; display: flex; align-items: center; gap: 6px; }
.note { padding: 12px 14px; border-radius: 14px; background: var(--card-2); font-size: 14px; line-height: 1.45; }
.note.warn { background: var(--warn-soft); }
.note.ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; }

.list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-top: 1px solid var(--line);
  text-decoration: none; color: inherit; background: none;
  border-left: 0; border-right: 0; border-bottom: 0;
  width: 100%; text-align: left; cursor: pointer;
}
.row:first-child { border-top: 0; }
@media (hover: hover) { .row:hover { background: var(--card-2); } }
.row.static { cursor: default; }
.row.static:hover, .row.lesson:hover { background: none; }
.row.block { display: block; }
.row .title { font-weight: 650; }
.row .sub { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.row .sub.wrap { white-space: normal; }
.row .end { text-align: right; flex: none; font-size: 13px; color: var(--muted); }
.row > svg.i { color: var(--muted); }
.row.unread .title { font-weight: 800; }
.row.unread::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; margin-left: -6px; }
.row.is-new { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.row > .grade:first-child { min-width: 40px; }
.row-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.row-link > span:first-child { font-size: 24px; }
.chev { font-size: 22px; color: var(--muted); }
.kind-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 7px; vertical-align: 1px; flex: none; }
.kind-dot.test { background: var(--danger); }
.kind-dot.hw { background: var(--warn); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.grade {
  position: relative; min-width: 34px; height: 34px; padding: 0 8px;
  display: inline-grid; place-items: center; border-radius: 10px;
  font-weight: 750; font-size: 15px; color: #fff; background: var(--gx);
  border: 0; cursor: pointer; font-variant-numeric: tabular-nums; transition: transform .1s;
}
.grade:active:not(.pop) { transform: scale(.92); }
.grade.lg { min-width: 56px; height: 56px; font-size: 24px; border-radius: 16px; }
.grade.sm { min-width: 28px; height: 28px; font-size: 13px; border-radius: 8px; padding: 0 5px; cursor: default; }
.grade.g1 { background: var(--g1); } .grade.g2 { background: var(--g2); } .grade.g3 { background: var(--g3); }
.grade.g4 { background: var(--g4); } .grade.g5 { background: var(--g5); } .grade.g6 { background: var(--g6); }
.grade.nc { opacity: .5; }
.grade.new { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.grade.new::after { content: ""; position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--card); }
.avg-txt { font-weight: 800; font-variant-numeric: tabular-nums; }
.avg-txt.g1 { color: var(--g1); } .avg-txt.g2 { color: var(--g2); } .avg-txt.g3 { color: var(--g3); }
.avg-txt.g4 { color: var(--g4); } .avg-txt.g5 { color: var(--g5); } .avg-txt.g6 { color: var(--g6); }

.pill {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 650;
  background: var(--card-2); color: var(--muted); white-space: nowrap;
}
.pill.accent { background: var(--accent-soft); color: var(--accent-text); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.sym { min-width: 36px; justify-content: center; }
.quiz-pill { background: var(--accent-soft) !important; color: var(--accent-text) !important; }

.segmented { display: flex; padding: 3px; gap: 3px; background: var(--card-2); border-radius: 12px; }
.segmented button, .segmented a {
  flex: 1; border: 0; background: transparent; padding: 8px 10px; border-radius: 9px;
  font-weight: 650; font-size: 14px; color: var(--muted); cursor: pointer; text-decoration: none; text-align: center;
}
.segmented button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(20, 24, 40, .1); }
.segmented button:disabled { opacity: .35; cursor: not-allowed; }
@media (max-width: 400px) { .segmented button, .segmented a { font-size: 13px; padding: 8px 4px; } }
.navline { display: flex; align-items: center; gap: 8px; }
.navline .label { flex: 1; text-align: center; font-weight: 750; }

.bar { height: 6px; border-radius: 3px; background: var(--card-2); overflow: hidden; margin-top: 6px; }
.bar > div { height: 100%; border-radius: 3px; background: var(--ok); transition: width .6s cubic-bezier(.2, .9, .2, 1); }
.bar.warn > div { background: var(--warn); }
.bar.danger > div { background: var(--danger); }
.bar.now > div { background: var(--accent); }
.bar.xp > div { background: linear-gradient(90deg, #8b5cf6, #ec4899); }

/* ---------- Start ---------- */
.hello {
  display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: 22px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 30%, transparent);
}
.hello h2 { font-size: 24px; letter-spacing: -.01em; margin: 2px 0; }
.hello-date { font-size: 13px; font-weight: 650; opacity: .85; }
.hello-sub { font-size: 14px; opacity: .9; }
.lucky { flex: none; width: 84px; padding: 10px 4px; text-align: center; border-radius: 16px; background: rgba(255, 255, 255, .18); }
.lucky b { display: block; font-size: 30px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.lucky span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; opacity: .9; line-height: 1.2; margin-top: 2px; }
.lucky.me { background: #fff; color: var(--accent-text); }

.now-card { margin: 8px 12px 6px; padding: 14px; border-radius: 14px; background: var(--accent-soft); }
.now-card.next { background: var(--card-2); }
.now-kicker { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-text); }
.now-card.next .now-kicker { color: var(--muted); }
.now-title { font-size: 20px; font-weight: 800; margin-top: 2px; }
.now-sub { font-size: 13px; color: var(--muted); }
.now-next { font-size: 13px; margin-top: 8px; color: var(--muted); }
.now-next b { color: var(--text); }
.now-card .bar { background: color-mix(in srgb, var(--accent) 18%, transparent); height: 7px; }

.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick.two { grid-template-columns: 1fr 1fr; }
.quick > div > .card { height: 100%; }
.stat { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; min-width: 0; }
.stat b { font-size: 24px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat span { color: var(--muted); font-size: 12.5px; line-height: 1.25; }
.stat.hot b { color: var(--accent); }
.stat.soft { background: var(--card-2); border-radius: 14px; padding: 12px; }
.quick .card.stat { padding: 14px 12px; transition: transform .12s; }
.quick .card.stat:active { transform: scale(.97); }
.quick .skeleton { min-height: 52px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.datebox { width: 46px; flex: none; text-align: center; border-radius: 12px; background: var(--card-2); padding: 6px 0; }
.datebox.today { background: var(--accent); color: #fff; }
.datebox.today small { color: rgba(255, 255, 255, .85); }
.datebox b { display: block; font-size: 18px; line-height: 1.1; }
.datebox small { font-size: 11px; color: var(--muted); text-transform: uppercase; font-weight: 700; }

/* ---------- Oceny ---------- */
.grade-summary { display: flex; align-items: center; gap: 16px; }
.gs-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.gs-main b { font-size: 40px; line-height: 1; letter-spacing: -.02em; }
.gs-main span { font-size: 13px; color: var(--muted); margin-top: 4px; }
.gs-side { display: flex; gap: 16px; }
.gs-side div { display: flex; flex-direction: column; align-items: center; }
.gs-side b { font-size: 20px; font-variant-numeric: tabular-nums; }
.gs-side span { font-size: 12px; color: var(--muted); }
.gs-new b { color: var(--accent); }
.row.subject { align-items: flex-start; }
.subject-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.avg-badge { flex: none; font-size: 13px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: var(--card-2); font-variant-numeric: tabular-nums; }
.avg-badge.g1 { color: var(--g1); background: color-mix(in srgb, var(--g1) 14%, transparent); }
.avg-badge.g2 { color: var(--g2); background: color-mix(in srgb, var(--g2) 14%, transparent); }
.avg-badge.g3 { color: var(--g3); background: color-mix(in srgb, var(--g3) 16%, transparent); }
.avg-badge.g4 { color: var(--g4); background: color-mix(in srgb, var(--g4) 14%, transparent); }
.avg-badge.g5 { color: var(--g5); background: color-mix(in srgb, var(--g5) 14%, transparent); }
.avg-badge.g6 { color: var(--g6); background: color-mix(in srgb, var(--g6) 14%, transparent); }
.sheet-grade { display: flex; gap: 14px; align-items: center; }
.sim { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sim select, .sim input { padding: 8px 10px; font-size: 15px; }

/* ---------- Plan lekcji ---------- */
.days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.days button {
  border: 0; border-radius: 14px; padding: 8px 0 6px; cursor: pointer;
  background: var(--card); box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
.days button small { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.days button b { font-size: 18px; line-height: 1.2; }
.days button i { font-style: normal; font-size: 10px; color: var(--muted); min-height: 13px; }
.days button.on { background: var(--accent); color: #fff; }
.days button.on small, .days button.on i { color: rgba(255, 255, 255, .85); }
.days button.today:not(.on) b { color: var(--accent); }

.lesson { align-items: flex-start; cursor: default; }
.lesson .num { width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--card-2); font-weight: 750; font-size: 13px; }
.lesson.colored { box-shadow: inset 4px 0 var(--sc); }
.lesson.colored .num { background: color-mix(in srgb, var(--sc) 18%, var(--card-2)); color: var(--sc); }
.lesson.colored.canceled { box-shadow: none; }
.lesson .badges { margin-top: 5px; display: flex; gap: 4px; flex-wrap: wrap; }
.lesson .badges .pill { white-space: normal; }
.lesson.now { background: var(--accent-soft); }
.lesson.now .num { background: var(--accent); color: #fff; }
.lesson.canceled .title { text-decoration: line-through; color: var(--muted); }

/* ---------- Terminarz ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal .wd { font-size: 11px; font-weight: 700; color: var(--muted); padding-bottom: 4px; }
.cal button { -webkit-appearance: none; appearance: none; padding: 0; margin: 0; min-width: 0; width: 100%; line-height: 1; -webkit-tap-highlight-color: transparent;
  aspect-ratio: 1; border: 0; border-radius: 10px; background: transparent; cursor: pointer; position: relative; font-weight: 650; font-variant-numeric: tabular-nums; }
.cal button:hover { background: var(--card-2); }
@supports not (aspect-ratio: 1) { .cal button { height: 42px; } }
.cal button.out { visibility: hidden; }
.cal button.weekend, .cal button.past { color: var(--muted); }
.cal button.today { color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.cal button.on { background: var(--accent); color: #fff; }
.cal button i { position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%); width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cal button i.test { background: var(--danger); }
.cal button.on i { background: #fff; }
.cal-legend { display: flex; gap: 14px; justify-content: center; margin-top: 10px; font-size: 12px; color: var(--muted); }
.cal-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 3px; }
.cal-legend i.test { background: var(--danger); }

/* ---------- Frekwencja ---------- */
.ring-wrap { display: flex; align-items: center; gap: 16px; }
.ring { width: 88px; height: 88px; flex: none; position: relative; }
@media (min-width: 420px) { .ring { width: 120px; height: 120px; } }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .val { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; font-weight: 800; }
@media (min-width: 420px) { .ring .val { font-size: 26px; } }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 8px; flex: 1; min-width: 0; }
.legend div b { display: block; font-size: 20px; }
.legend div span { display: block; font-size: 11px; line-height: 1.25; color: var(--muted); }

/* ---------- Wiadomości, ogłoszenia ---------- */
.msg-top { display: flex; gap: 8px; align-items: center; }
.msg-top .btn { flex: none; padding: 10px 14px; }
.row.msg { align-items: flex-start; }
.row.msg .avatar-sm { margin-top: 2px; }
.msg-title { font-size: 19px; margin-bottom: 12px; }
.message-body { white-space: pre-wrap; word-wrap: break-word; line-height: 1.6; }
.message-body.clamp { max-height: 9.6em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; margin: 0; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.people { max-height: 260px; overflow: auto; }
.announcement { display: flex; flex-direction: column; gap: 10px; }
.ann-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ann-head h2 { font-size: 17px; }
.announcement .btn.ghost { align-self: flex-start; padding: 0; }

/* ---------- Co nowego ---------- */
.upd-kicker { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-text); }
.update { display: flex; flex-direction: column; gap: 8px; }
.update h2 { font-size: 19px; }
.update.latest { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.upd-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.upd-list li { position: relative; padding-left: 22px; line-height: 1.45; }
.upd-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--ok); font-weight: 900; }
#sheet-body .btn.ghost { align-self: center; }

/* ---------- Zadania, tematy ---------- */
.hw-check {
  width: 30px; height: 30px; flex: none; border-radius: 9px; border: 2px solid var(--line); background: var(--card);
  display: grid; place-items: center; color: transparent; font-weight: 900; cursor: pointer; padding: 0;
}
.hw-check.on { background: var(--ok); border-color: var(--ok); color: #fff; animation: pop .35s cubic-bezier(.2, 2, .4, 1); }
@keyframes pop { from { transform: scale(.8); } }
.row.hw-done .title { text-decoration: line-through; color: var(--muted); }
.range-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- Profil, menu, znajomi ---------- */
.profile-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.profile-head h2 { font-size: 19px; }
.avatar-sm { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; background: var(--accent-soft); color: var(--accent-text); text-transform: uppercase; }
.avatar-xs { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--accent-soft); color: var(--accent-text); }
.avatar-lg { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); text-transform: uppercase; }

.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.menu-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px;
  background: var(--card-2); color: var(--text); text-decoration: none; font-size: 12.5px; font-weight: 650; text-align: center; line-height: 1.2;
}
.menu-item .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.menu-item:active { transform: scale(.96); }
.menu-game {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; text-decoration: none; color: #fff;
  background: linear-gradient(120deg, #2b2350, #4a2a6b 55%, #6b2a5e);
}
.menu-game b { display: block; }
.menu-game small { font-size: 12px; opacity: .8; }
.mg-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .14); flex: none; }
.mg-coins { font-weight: 800; color: #ffd23f; font-size: 13px; }

.friend-code { text-align: center; display: grid; gap: 8px; justify-items: center; }
.code-big { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 34px; font-weight: 800; letter-spacing: 6px; }
.add-friend { display: grid; gap: 10px; }
.add-friend h2 { font-size: 17px; }
.add-row { display: flex; gap: 8px; }
.add-row input { flex: 1; min-width: 0; font: inherit; font-size: 18px; letter-spacing: 4px; text-transform: uppercase; text-align: center;
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: inherit; }
.friend-row { align-items: flex-start; }
.friend-grades { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.friend-link { color: inherit; text-decoration: none; }
.friend-actions { display: flex; gap: 2px; align-items: center; flex: none; }
.friend-head { display: flex; align-items: center; gap: 14px; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-size: 13px; font-weight: 650; text-decoration: none; cursor: pointer; }
.chip.on { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.rank-n { width: 28px; text-align: center; font-weight: 800; }
.me-row { background: var(--accent-soft); }
.row.switch { cursor: pointer; }
.row.switch .sub { white-space: normal; }

/* ---------- Arkusz (szczegóły) ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(8, 10, 18, .45); animation: fade .2s; }
.sheet-panel {
  position: relative; width: 100%; max-width: 560px; max-height: 88vh; max-height: 88dvh; overflow: auto;
  background: var(--card); border-radius: 24px 24px 0 0;
  padding: 10px 18px calc(24px + env(safe-area-inset-bottom));
  animation: up .25s cubic-bezier(.2, .8, .2, 1);
}
.sheet-handle { position: relative; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 10px; cursor: pointer; }
.sheet-handle::before { content: ''; position: absolute; inset: -14px -60px; } /* większe pole do złapania palcem */
.sheet-close { position: absolute; top: 8px; right: 8px; }
#sheet-body { display: flex; flex-direction: column; gap: 14px; }
#sheet-body h2 { font-size: 20px; padding-right: 36px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@media (min-width: 700px) {
  .sheet { align-items: center; }
  .sheet-panel { border-radius: 24px; }
  .sheet-handle { display: none; }
}

/* ---------- Stany ---------- */
.skeleton { border-radius: 10px; min-height: 18px; background: linear-gradient(90deg, var(--card-2) 25%, var(--line) 50%, var(--card-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { text-align: center; color: var(--muted); padding: 22px 10px; }
.err-box { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; color: var(--danger); }
.demo-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between;
  max-width: 760px; margin: 0 auto 10px; padding: 10px 14px; border-radius: 14px; width: calc(100% - 32px);
  background: var(--warn-soft); color: var(--text); font-size: 13px; line-height: 1.3;
}
.demo-bar button { border: 0; border-radius: 10px; padding: 8px 12px; font-weight: 800; background: var(--warn); color: #1a1200; cursor: pointer; }
.ptr { position: fixed; z-index: 30; left: 50%; top: calc(env(safe-area-inset-top) + 60px); width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, -50px); pointer-events: none; }
.ptr.spin svg { animation: spin .8s linear infinite; }

/* ---------- Efekty i powiadomienia ---------- */
.fx-layer { position: fixed; inset: 0; z-index: 200; pointer-events: none; overflow: hidden; }
.fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.fx-float { position: absolute; transform: translate(-50%, 0); font-weight: 800; font-size: 18px; white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); animation: fx-float 1.3s ease-out forwards; }
@keyframes fx-float { to { transform: translate(-50%, -60px); opacity: 0; } }
.coin-ic, .fx-coin { width: 16px; height: 16px; border-radius: 50%; flex: none; display: inline-block;
  background: radial-gradient(circle at 35% 30%, #fff6c8, #ffd700 40%, #c79100); box-shadow: inset 0 0 0 2px #e0a800; }
.fx-coin { position: absolute; left: 0; top: 0; width: 22px; height: 22px; }
.fx-count { position: absolute; inset: 0; display: grid; place-items: center; }
.fx-count b { font-size: 120px; font-weight: 900; color: #fff; text-shadow: 0 6px 30px rgba(0, 0, 0, .5); animation: count-pop .9s ease-out forwards; }
@keyframes count-pop { from { transform: scale(1.6); opacity: 0; } 30% { transform: scale(1); opacity: 1; } to { opacity: 0; } }
.fx-notes { position: fixed; z-index: 260; left: 50%; top: calc(env(safe-area-inset-top) + 66px); transform: translateX(-50%); width: min(430px, calc(100vw - 20px)); pointer-events: none; }
.fx-notes.low { top: auto; bottom: calc(env(safe-area-inset-bottom) + 84px); }
@media (min-width: 900px) { .fx-notes.low { bottom: 24px; } }
.fx-note.low { opacity: .9; }
/* dymek: dotknięcie zamyka od razu, przesunięcie w bok/górę odrzuca (nie zasłania na długo tego, co pod spodem) */
.fx-note {
  pointer-events: auto; cursor: pointer; touch-action: none; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 14px; font-size: 13px !important;
  opacity: .96;
  background: #15131f; background: color-mix(in srgb, #15131f 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: #fff; font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  animation: note-in .32s cubic-bezier(.2, 1.3, .4, 1);
}
.fx-note.out { animation: note-out .26s ease-in forwards; }
@keyframes note-in { from { transform: translateY(-24px) scale(.96); opacity: 0; } }
@keyframes note-out { to { transform: translateY(-24px); opacity: 0; } }
.fx-note-body { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.fx-note button { pointer-events: auto; flex: none; border: 0; border-radius: 12px; padding: 8px 14px; font-weight: 800; background: var(--accent); color: #fff; cursor: pointer; }
.fx-ach-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #107c10; }
.fx-ach-text { display: flex; flex-direction: column; line-height: 1.25; }
.fx-ach-text small { font-size: 12px; opacity: .8; }

/* ---------- Smaczki (oba tryby) ---------- */
.view.enter > * { animation: rise .38s cubic-bezier(.2, .8, .2, 1) both; }
.view.enter > *:nth-child(2) { animation-delay: .04s; } .view.enter > *:nth-child(3) { animation-delay: .08s; }
.view.enter > *:nth-child(4) { animation-delay: .12s; } .view.enter > *:nth-child(5) { animation-delay: .16s; }
.view.enter > *:nth-child(n+6) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.grade.pop { animation: grade-pop .38s cubic-bezier(.2, 2, .4, 1); }
@keyframes grade-pop { 40% { transform: scale(1.25) rotate(-6deg); } }
.grade.new { animation: new-glow 1.6s ease-in-out 3; }
@keyframes new-glow { 50% { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent), 0 0 16px var(--accent); } }
.tabbar a.active svg { animation: tab-hop .35s cubic-bezier(.2, 2, .4, 1); }
@keyframes tab-hop { 40% { transform: translateY(-4px) scale(1.12); } }
.ring-fill { transition: stroke-dashoffset 1s cubic-bezier(.2, .8, .2, 1); }
.pill[data-fx] { cursor: pointer; }
.stripe { color: var(--danger); font-weight: 800; }
.lucky.me { animation: lucky-glow 1.2s ease-in-out 3; }
@keyframes lucky-glow { 50% { box-shadow: 0 0 0 4px rgba(255, 255, 255, .5), 0 0 24px rgba(255, 255, 255, .7); } }

.subj-ic { margin-right: 6px; font-size: .95em; }
.pill.ev { text-decoration: none; white-space: normal; }
.days button { position: relative; }
.ev-dot { position: absolute; top: 6px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.ev-dot.test { background: var(--danger); }
.days button.on .ev-dot { background: #fff; }
.day-events { display: flex; flex-direction: column; gap: 6px; padding: 4px 12px 8px; }
.day-ev { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: inherit; background: var(--accent-soft); }
.day-ev.test { background: var(--danger-soft); }
.day-ev b { display: block; font-size: 14px; }
.day-ev small { display: block; font-size: 12px; color: var(--muted); }
.hello-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hello-chips span { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .18); }
.week-strip { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; padding: 12px 14px; }
.week-strip b { display: block; }
.week-strip small { display: block; color: var(--muted); font-size: 13px; }
.week-ic { font-size: 24px; }
.streak-note { padding: 11px 14px; border-radius: 14px; font-size: 14px; background: linear-gradient(90deg, color-mix(in srgb, #ff9f1a 18%, var(--card)), var(--card)); box-shadow: var(--shadow); }
.need { padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); font-size: 14px; }
.need.ok { background: var(--ok-soft); }

/* ---------- Efekty trybu Turbo ---------- */
.fx-caption {
  position: absolute; left: 50%; transform: translate(-50%, -50%); width: 92vw; text-align: center; line-height: 1.05;
  font-weight: 900; letter-spacing: .01em; text-transform: uppercase; color: #fff;
  -webkit-text-stroke: .08em #000; paint-order: stroke fill; text-shadow: 0 6px 20px rgba(0, 0, 0, .4);
  animation: cap-out 1.4s ease forwards; animation-delay: .9s;
}
.fx-caption span { display: inline-block; animation: cap-word .35s cubic-bezier(.2, 1.8, .4, 1) both; }
@keyframes cap-word { from { opacity: 0; transform: scale(1.8) rotate(-4deg); } }
@keyframes cap-out { to { opacity: 0; transform: translate(-50%, -60%); } }
body.fx-shake #view { animation: shake .45s cubic-bezier(.36, .07, .19, .97); } /* nie .app - pasek na dole by skakał */
@keyframes shake {
  10%, 90% { transform: translate(calc(var(--shake) * -.3), 0); }
  20%, 80% { transform: translate(calc(var(--shake) * .5), calc(var(--shake) * .2)); }
  30%, 50%, 70% { transform: translate(calc(var(--shake) * -1), calc(var(--shake) * -.2)); }
  40%, 60% { transform: translate(var(--shake), 0); }
}
.fx-sixseven { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6vw; animation: fade-in-out 2.3s ease both; }
.fx-sixseven span {
  font-size: min(42vw, 260px); font-weight: 900; line-height: 1; color: #ffd23f;
  -webkit-text-stroke: .04em #000; paint-order: stroke fill; text-shadow: 0 10px 40px rgba(0, 0, 0, .45);
  animation: weigh .32s ease-in-out infinite alternate;
}
.fx-sixseven .seven { color: #ff7ad9; animation-delay: .16s; }
@keyframes weigh { from { transform: translateY(-.12em) rotate(-6deg); } to { transform: translateY(.12em) rotate(6deg); } }
@keyframes fade-in-out { 0% { opacity: 0; } 10%, 82% { opacity: 1; } 100% { opacity: 0; } }
.main, .tabbar, .sidebar { transition: filter .35s; }
.app.fx-gray .main, .app.fx-gray .tabbar, .app.fx-gray .sidebar { filter: grayscale(1) contrast(1.05) brightness(.9); }
.fx-wasted { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle, transparent 40%, rgba(0, 0, 0, .55)); animation: fade-in-out 1.9s ease both; }
.fx-wasted span {
  font: 900 italic min(16vw, 120px)/1 Georgia, "Times New Roman", serif; letter-spacing: .02em; text-transform: uppercase;
  color: #c8102e; -webkit-text-stroke: .025em #000; paint-order: stroke fill; text-shadow: 0 4px 0 #000;
  animation: wasted-in .5s cubic-bezier(.2, 1.4, .4, 1) .25s both;
}
@keyframes wasted-in { from { transform: scale(1.6); opacity: 0; } }
.fx-combo {
  position: absolute; right: 14px; top: calc(env(safe-area-inset-top) + 76px); text-align: right; line-height: 1;
  color: hsl(calc(50 - var(--heat, 0) * 50) 100% 58%); -webkit-text-stroke: .06em #000; paint-order: stroke fill; font-weight: 900;
}
.fx-combo b { display: block; font-size: calc(34px + var(--heat, 0) * 26px); }
.fx-combo span { font-size: 13px; color: #fff; letter-spacing: .04em; }

/* ---------- Tryb Turbo na Starcie ---------- */
.game-strip { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, #2b2350, #4a2a6b 55%, #7a2a62); box-shadow: 0 8px 24px rgba(74, 42, 107, .35); }
.game-strip b { display: block; }
.game-strip small { display: block; font-size: 12px; opacity: .8; margin-top: 4px; }
.game-strip .bar { background: rgba(255, 255, 255, .15); height: 7px; display: block; }
.game-strip .bar > span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #8b5cf6, #ec4899); }
.gs-lvl { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; font-weight: 900; background: rgba(255, 255, 255, .14); flex: none; }
.gs-btn { flex: none; font-size: 13px; font-weight: 800; padding: 9px 12px; border-radius: 12px; background: linear-gradient(180deg, #ffd23f, #e0a800); color: #2a1a00; animation: pulse 1.6s ease-in-out infinite; }
.hub-claims .quests { margin-top: 0; }
.feed.solo { position: static; padding-top: 4px; background: none; }

/* ---------- Wybór trybu (po pierwszym logowaniu) ---------- */
.mode-pick {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px 16px;
  background: var(--bg); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  animation: fade .25s;
}
.mode-pick.out { animation: fade-out .25s forwards; }
@keyframes fade-out { to { opacity: 0; } }
.mode-box { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.mode-box h2 { font-size: 24px; letter-spacing: -.01em; }
.mode-box p { margin: 0 0 6px; }
.mode-card {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px; border: 2px solid var(--line); border-radius: 20px;
  background: var(--card); box-shadow: var(--shadow); text-align: left; cursor: pointer; transition: transform .12s, border-color .15s;
}
.mode-card:hover { border-color: var(--accent); }
.mode-card:active { transform: scale(.98); }
.mode-card b { display: block; font-size: 18px; margin-bottom: 2px; }
.mode-card small { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; }
.mode-ic { font-size: 34px; flex: none; }
.mode-card.crazy { border-color: transparent; color: #fff; background: linear-gradient(135deg, #6d4bff, #c13dd6 60%, #ff7a59); box-shadow: 0 12px 30px rgba(193, 61, 214, .35); }
.mode-card.crazy small { color: rgba(255, 255, 255, .85); }

/* ---------- Tryb Turbo: monety na górze, złota szóstka, karta nowej oceny ---------- */
.coin-box.top { margin-right: 2px; }
@media (max-width: 380px) { .coin-box.top .free { display: none; } }
.golden-six {
  position: absolute; left: 0; top: 0; width: 64px; height: 64px; display: grid; place-items: center; pointer-events: auto; cursor: pointer;
  border-radius: 18px; font-size: 40px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 #9a6a00, 0 0 10px rgba(122, 82, 0, .6);
  background: radial-gradient(circle at 30% 25%, #fff6c8, #ffd700 35%, #c79100); box-shadow: 0 0 24px #ffd700, 0 0 60px #ffae00aa;
  animation: golden-glow .5s ease-in-out infinite alternate; touch-action: manipulation;
}
@keyframes golden-glow { to { box-shadow: 0 0 34px #fff1a0, 0 0 90px #ffd700; } }
.reveal { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: auto; background: rgba(5, 6, 14, .5); animation: reveal-bg 3.6s ease both; }
@keyframes reveal-bg { 0% { opacity: 0; } 8%, 88% { opacity: 1; } 100% { opacity: 0; } }
.reveal-card {
  width: min(320px, 86vw); padding: 24px 22px 22px; border-radius: 26px; text-align: center; color: #fff;
  background: linear-gradient(160deg, #22213a, #15141f); box-shadow: 0 24px 70px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .08);
  animation: reveal-in .55s cubic-bezier(.2, 1.5, .4, 1);
}
.reveal-card.l6 { background: linear-gradient(160deg, #0e4a43, #0b2b28); }
.reveal-card.l5 { background: linear-gradient(160deg, #0f4229, #0a2a1b); }
.reveal-card.l1 { background: linear-gradient(160deg, #4a0d15, #26070b); }
@keyframes reveal-in { from { transform: scale(.6) rotate(-6deg); opacity: 0; } }
.reveal-kicker { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .75; margin-bottom: 12px; }
.reveal-grade { min-width: 96px; height: 96px; font-size: 52px; font-weight: 900; border-radius: 24px; cursor: default; animation: reveal-flip .7s cubic-bezier(.2, 1.4, .4, 1) .1s both; }
@keyframes reveal-flip { from { transform: rotateY(180deg) scale(.5); } }
.reveal-subject { margin-top: 14px; font-size: 22px; font-weight: 900; }
.reveal-cat { font-size: 13px; opacity: .65; margin-top: 2px; }
.reveal-line { margin-top: 12px; font-size: 16px; font-weight: 600; line-height: 1.35; opacity: .95; }
.reveal-more { margin-top: 10px; font-size: 13px; opacity: .7; }

/* ======================================================================
   SKINY - wszystko poniżej dotyczy tylko zakładki z grą
   ====================================================================== */
.hub-bar {
  position: sticky; top: calc(env(safe-area-inset-top) + 60px); z-index: 9;
  display: flex; align-items: center; gap: 8px; max-width: 792px; margin: 0 auto; padding: 0 12px 8px 16px;
  background: var(--bg); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
@media (min-width: 900px) { .hub-bar { top: 68px; } }
.hub-tabs { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.hub-tabs::-webkit-scrollbar { display: none; }
.hub-tabs a { flex: none; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: none; background: var(--card); box-shadow: var(--shadow); }
.hub-tabs a.on { background: linear-gradient(120deg, #6d4bff, #c13dd6); color: #fff; }
.coin-box {
  flex: none; display: flex; align-items: center; gap: 5px; text-decoration: none; color: var(--text);
  background: var(--card); box-shadow: var(--shadow); padding: 6px 10px; border-radius: 99px; font-size: 13px; white-space: nowrap;
}
.coin-box b { font-variant-numeric: tabular-nums; }
.coin-box .free { font-size: 12px; font-weight: 800; }
.coin-box .free:empty { display: none; }
.coin-box.pulse { animation: pulse .45s ease; }
@keyframes pulse { 40% { transform: scale(1.1); } }

.hub-hero { display: flex; flex-direction: column; gap: 14px; color: #fff; background: linear-gradient(135deg, #2b2350, #4a2a6b 55%, #7a2a62); }
.hub-level { display: flex; gap: 12px; align-items: center; }
.hub-lvl { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; font-weight: 900; background: rgba(255, 255, 255, .14); flex: none; }
.hub-hero .muted { color: rgba(255, 255, 255, .7); }
.hub-hero .bar { background: rgba(255, 255, 255, .15); height: 8px; }
.hub-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hub-stats div { background: rgba(255, 255, 255, .1); border-radius: 12px; padding: 10px; }
.hub-stats b { display: block; font-size: 16px; color: #ffd23f; white-space: nowrap; }
.hub-stats span { font-size: 12px; opacity: .75; }
.hub-claims { display: flex; flex-direction: column; gap: 10px; }
.hub-claims:empty { display: none; }
.claim-card {
  display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-radius: 16px; padding: 14px; cursor: pointer; text-align: left;
  color: #2a1a00; background: linear-gradient(135deg, #ffe17a, #ffc400 60%, #f0a800); box-shadow: 0 6px 18px rgba(240, 168, 0, .3);
}
.claim-card.grades { background: linear-gradient(135deg, #b8f5d0, #3ddc84); color: #06301a; box-shadow: 0 6px 18px rgba(61, 220, 132, .3); }
.claim-card small { display: block; font-size: 12px; opacity: .8; }
.claim-ic { font-size: 26px; }
.claim-amt { font-size: 15px; white-space: nowrap; }
.hub-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .hub-tiles { grid-template-columns: repeat(3, 1fr); } }
.hub-tile {
  display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 16px; text-decoration: none; color: var(--text);
  background: var(--card); box-shadow: var(--shadow); border-left: 4px solid var(--tc, var(--accent)); transition: transform .12s;
}
.hub-tile:active { transform: scale(.97); }
.hub-tile span { font-size: 24px; }
.hub-tile small { color: var(--muted); font-size: 12px; }
.t-cases { --tc: #f0a800; } .t-inv { --tc: #3d8bff; } .t-upg { --tc: #3ddc84; } .t-battle { --tc: #ff5c7a; } .t-market { --tc: #8b5cf6; } .t-earn { --tc: #14b8a6; }
.ach-badge { width: 34px; text-align: center; font-size: 20px; }
.row.locked { opacity: .5; }

.quests .quest-check { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 900; font-size: 13px; }
.quest.done .quest-check { background: #3ddc84; border-color: #3ddc84; color: #08311b; }
.quest.done .title { text-decoration: line-through; color: var(--muted); }
.quest .end b { color: var(--gold); font-size: 13px; }
.quest.done .end b { opacity: .5; }

/* Live dropy */
.feed {
  position: sticky; top: calc(env(safe-area-inset-top) + 101px); z-index: 8; display: flex; align-items: center; gap: 8px;
  max-width: 792px; margin: 0 auto; padding: 0 16px 8px; overflow: hidden; background: linear-gradient(var(--bg) 70%, transparent);
}
@media (min-width: 900px) { .feed { top: 109px; } }
.feed-live { flex: none; font-size: 10px; font-weight: 900; letter-spacing: .06em; color: #fff; background: #fe2c55; padding: 3px 6px; border-radius: 4px; writing-mode: vertical-rl; transform: rotate(180deg); }
.feed-track { display: flex; gap: 6px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.feed-track:empty::after { content: 'Tu pojawią się dropy wszystkich graczy'; font-size: 12px; color: var(--muted); padding: 12px 0; white-space: nowrap; }
.feed-item {
  flex: none; width: 112px; height: 48px; display: flex; align-items: center; gap: 4px; padding: 2px 6px 2px 2px; border-radius: 8px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--rc) 28%, var(--card)), var(--card)); border-bottom: 2px solid var(--rc);
  font-size: 10px; line-height: 1.15; overflow: hidden;
}
.feed-item .gun { width: 46px; height: 36px; flex: none; }
.feed-item b, .feed-item span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 58px; }
.feed-item span { color: var(--muted); }
.feed-item.new { animation: feed-in .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes feed-in { from { transform: translateX(-60px) scale(.6); opacity: 0; } }

/* Eventy */
.event-bar { display: flex; align-items: center; gap: 10px; max-width: 760px; margin: 0 auto 8px; width: calc(100% - 32px); padding: 10px 12px; border-radius: 14px; text-decoration: none; color: #fff;
  background: linear-gradient(120deg, #7c3aed, #db2777); box-shadow: 0 6px 20px rgba(219, 39, 119, .3); }
.event-bar small { opacity: .9; }
.ev-ic { font-size: 24px; }
.ev-btn { flex: none; background: #fff; color: #7c3aed; font-weight: 800; border-radius: 999px; padding: 7px 14px; font-size: 13px; }
.event-head { text-align: center; display: grid; gap: 6px; background: linear-gradient(160deg, color-mix(in srgb, #7c3aed 25%, var(--card)), var(--card)); }
.event-kicker { font-size: 12px; font-weight: 900; letter-spacing: .14em; color: #db2777; }
.event-timer { font-size: 44px; font-weight: 900; line-height: 1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.admin-form { display: grid; gap: 10px; }
.admin-form label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.admin-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.admin-form label.switch { display: flex; color: var(--text); font-size: 14px; }
.admin-form textarea { font-weight: 400; font-size: 15px; line-height: 1.45; }
.admin-row label { min-width: 0; }

/* Skiny i skrzynki */
.gun { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .45)); }
.shop-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.shop-balance { font-size: 30px; font-weight: 900; color: var(--gold); line-height: 1.1; font-variant-numeric: tabular-nums; }
.shop-links { display: flex; gap: 6px; flex-wrap: wrap; }
.key-note { background: color-mix(in srgb, #3ddc84 14%, var(--card)); font-size: 14px; }
.case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .case-grid { grid-template-columns: repeat(4, 1fr); } }
.case-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px 12px; border-radius: 16px;
  text-decoration: none; color: var(--text); background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--cc) 30%, var(--card)), var(--card) 70%);
  box-shadow: var(--shadow); border: 1px solid color-mix(in srgb, var(--cc) 40%, transparent); transition: transform .15s;
}
@media (hover: hover) { .case-tile:hover { transform: translateY(-3px); } }
.case-tile-name { font-weight: 800; text-align: center; font-size: 14px; }
.case-tile-price { font-size: 16px; font-weight: 900; color: var(--gold); }
.case-free { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 800; background: #3ddc84; color: #04220f; padding: 2px 7px; border-radius: 99px; }
.case-stars { font-size: 11px; font-weight: 800; color: #9a6a00; background: #fff1bf; padding: 2px 8px; border-radius: 99px; }
.case-tag { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 900; letter-spacing: .08em; padding: 2px 7px; border-radius: 6px; background: var(--cc); color: #111; }
.case-art { position: relative; width: 100%; max-width: 180px; aspect-ratio: 1.33; display: grid; place-items: center; background: radial-gradient(circle, color-mix(in srgb, var(--cc) 55%, transparent), transparent 70%); }
.case-art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .5)); }
@media (hover: hover) { .case-tile:hover .case-art img { animation: float 1.6s ease-in-out infinite alternate; } }
@keyframes float { to { transform: translateY(-5px) rotate(-2deg) scale(1.04); } }
.case-art.skin-art { background: radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--cc) 45%, transparent), transparent 70%); border-radius: 14px; }
.case-art.skin-art img { transform: rotate(-12deg) scale(1.05); }
.case-hero { display: flex; gap: 14px; align-items: center; }
.case-hero .case-art { width: 130px; flex: none; }
.case-hero h2 { font-size: 21px; }
.case-hero-price { font-size: 20px; font-weight: 900; color: var(--gold); }

.star-card { background: linear-gradient(135deg, color-mix(in srgb, #ffd23f 18%, var(--card)), var(--card)); }
.star-head { display: flex; gap: 12px; align-items: center; }
.star-big { font-size: 30px; flex: none; filter: drop-shadow(0 2px 8px rgba(255, 190, 40, .5)); }
.star-info { display: flex; flex-direction: column; gap: 4px; background: linear-gradient(135deg, color-mix(in srgb, #ffd23f 14%, var(--card)), var(--card)); }
.skin-meta span.up { color: #d48806; }
.cougar-switch button[data-cg="1"].on { background: linear-gradient(135deg, #2ee6d6, #3d8bff); color: #fff; }
.open-btn.cougar { background: linear-gradient(180deg, #2ee6d6, #1f9fb8); box-shadow: 0 4px 0 #156f80; }
.open-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.open-btn {
  border: 0; border-radius: 14px; padding: 13px 10px; cursor: pointer; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 17px; font-weight: 900; letter-spacing: .01em; background: linear-gradient(180deg, #4fd86f, #23a344); box-shadow: 0 4px 0 #1a7a33;
}
.open-btn small { font-size: 12px; font-weight: 700; opacity: .9; }
.open-btn.free { background: linear-gradient(180deg, #ffd23f, #e0a800); box-shadow: 0 4px 0 #8a6500; color: #2a1a00; grid-column: 1 / -1; }
.open-btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #1a7a33; }
.open-btn:disabled { opacity: .4; cursor: default; }
.upg .open-btn, .view > .open-btn, #upg-top .open-btn { width: 100%; }
#upg-top { display: flex; flex-direction: column; gap: 14px; }

#reels { display: flex; flex-direction: column; gap: 8px; }
#reels:empty { display: none; }
.case-window { position: relative; width: 100%; height: 150px; overflow: hidden; border-radius: 14px; background: #1b1b24; box-shadow: inset 0 0 40px #000; }
.case-window.bonus { box-shadow: inset 0 0 40px #000, 0 0 0 2px #ffd23f, 0 0 24px rgba(255, 210, 63, .45); }
.case-strip { display: flex; gap: 8px; padding: 10px 0; will-change: transform; }
.case-item {
  position: relative; flex: none; width: 128px; height: 130px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--rc) 35%, #2a2a36), #1f1f2a 70%); border-bottom: 5px solid var(--rc); text-align: center; padding: 6px; color: #fff;
}
.case-item .gun { width: 104px; height: 78px; }
.case-name { font-size: 10px; line-height: 1.2; color: #c9c9d6; }
.case-name b { color: #fff; font-size: 11px; }
.case-item.win { box-shadow: 0 0 0 3px var(--rc), 0 0 40px var(--rc); transform: scale(1.05); transition: .3s; z-index: 1; }
.case-marker { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; transform: translateX(-50%); background: #ffd23f; box-shadow: 0 0 12px #ffd23f; z-index: 2; }
.case-window.vertical { height: 300px; }
.case-window.vertical .case-strip { flex-direction: column; align-items: center; padding: 0 6px; }
.case-window.vertical .case-item { width: 100%; height: 120px; }
.case-window.vertical .case-marker { left: 0; right: 0; top: 50%; bottom: auto; width: auto; height: 3px; transform: translateY(-50%); }
.star-tag { position: absolute; top: 4px; right: 4px; font-size: 22px; line-height: 1; filter: drop-shadow(0 0 8px #ffd23f); animation: star-in .6s cubic-bezier(.2, 2, .4, 1); }
@keyframes star-in { from { transform: scale(0) rotate(-30deg); } }
.bonus-banner { text-align: center; font-weight: 900; font-size: 17px; padding: 12px; border-radius: 14px; color: #2a1a00; background: linear-gradient(90deg, #ffe17a, #ffc400, #ffe17a); animation: star-in .5s cubic-bezier(.2, 2, .4, 1); }
.drop-banner { text-align: center; font-weight: 900; font-size: 20px; padding: 10px; border-radius: 14px; margin-bottom: 10px; color: #fff;
  background: linear-gradient(120deg, color-mix(in srgb, var(--rc) 85%, #000), var(--rc)); box-shadow: 0 0 30px color-mix(in srgb, var(--rc) 50%, transparent); }

.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.skin-card {
  position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 10px 8px; border-radius: 12px; cursor: default;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--rc) 25%, var(--card)), var(--card) 75%);
  border-bottom: 4px solid var(--rc); box-shadow: var(--shadow); transition: transform .15s;
}
.skin-card[role="button"] { cursor: pointer; }
.skin-card[role="button"]:hover { transform: translateY(-3px); }
.skin-card[data-sel] { outline: 3px solid #3ddc84; }
.skin-card[data-stars]::before { content: attr(data-stars); position: absolute; top: 6px; left: 6px; z-index: 1; font-size: 11px; font-weight: 900; color: #2a1a00; background: #ffd23f; padding: 1px 6px; border-radius: 99px; }
.skin-card .gun { margin: 4px 0 6px; }
.skin-card.r-gold, .skin-card.r-red { box-shadow: 0 0 16px color-mix(in srgb, var(--rc) 45%, transparent); }
.skin-card.r-gold::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .35) 45%, transparent 60%); background-size: 250% 100%; animation: shine 2.4s linear infinite; }
@keyframes shine { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.skin-weapon { font-size: 11px; color: var(--muted); }
.skin-name { font-weight: 800; font-size: 13px; line-height: 1.2; }
.skin-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; margin-top: 4px; }
.skin-meta span { color: var(--muted); font-weight: 700; }
.skin-meta b { color: var(--gold); }
.drops-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.drops-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.drops-actions .btn { flex: 1; }
#drops:empty { display: none; }
.skin-big { padding: 20px; border-radius: 16px; background: radial-gradient(circle, color-mix(in srgb, var(--rc) 35%, var(--card-2)), var(--card-2) 70%); border-bottom: 5px solid var(--rc); }
.float-bar { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #3ddc84 0 7%, #8bd34a 7% 15%, #ffd23f 15% 38%, #f0802a 38% 45%, #e5484d 45%); margin: 6px 0 4px; }
.float-bar span { position: absolute; top: -4px; width: 3px; height: 16px; background: var(--text); transform: translateX(-50%); }
.sell-row { display: grid; gap: 8px; }
.sell-all { border: 1px solid var(--gold); color: var(--gold); font-weight: 800; }

/* Upgrader */
.upg { display: grid; grid-template-columns: 1fr 160px 1fr; gap: 10px; align-items: center; }
@media (max-width: 520px) { .upg { grid-template-columns: 1fr 112px 1fr; } }
.upg-wheel { position: relative; aspect-ratio: 1; }
.upg-wheel svg { width: 100%; height: 100%; }
.upg-needle { position: absolute; left: 50%; top: 4%; bottom: 50%; width: 4px; margin-left: -2px; background: var(--text); border-radius: 2px; transform-origin: 50% 100%; }
.upg-needle::before { content: ""; position: absolute; top: -6px; left: -6px; border: 8px solid transparent; border-bottom-color: var(--text); }
.upg-pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; font-weight: 900; color: #23a344; pointer-events: none; }
.upg-result { text-align: center; font-weight: 750; padding: 10px; border-radius: 12px; }
.upg-result.win { background: var(--ok-soft); color: var(--ok); }
.upg-result.lose { background: var(--danger-soft); color: var(--danger); }
.result-title { font-size: clamp(30px, 9vw, 44px); font-weight: 900; line-height: 1.1; letter-spacing: -.01em; }
.result-title.win { color: var(--gold); }
.result-title.lose { color: var(--danger); }

/* Bitwy */
.join-form { display: flex; gap: 8px; }
.code-input { flex: 1; text-transform: uppercase; letter-spacing: .3em; font-size: 22px !important; font-weight: 900; text-align: center; }
.room-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.room-code { font-size: 46px; font-weight: 900; letter-spacing: .25em; color: #8b5cf6; line-height: 1; padding-left: .25em; font-variant-numeric: tabular-nums; }
.room-config { display: flex; gap: 8px; flex-wrap: wrap; }
.room-config select { flex: 1; min-width: 140px; width: auto; }
.room-players { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.room-player { display: flex; align-items: center; gap: 10px; border-left: 5px solid var(--pc); }
.room-player.ready { box-shadow: 0 0 0 2px #3ddc84, var(--shadow); }
.room-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--pc, #888); color: #fff; font-weight: 900; text-transform: uppercase; }
.room-chat { display: flex; flex-direction: column; gap: 8px; }
.room-chat-log { max-height: 180px; overflow: auto; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.room-chat form { display: flex; gap: 6px; }
.room-chat input { flex: 1; padding: 8px 12px; }
/* ---------- Bitwa: kolumny graczy dopasowane do ekranu ---------- */
.battle-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 17px; }
.battle-head .battle-case { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.battle-head > span { flex: none; font-size: 14px; }
/* pasek rund: miniatury skrzynek, bieżąca podświetlona */
.battle-rounds { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.battle-rounds::-webkit-scrollbar { display: none; }
.battle-rounds .br { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--card); display: grid; place-items: center;
  border: 2px solid transparent; opacity: .45; transition: opacity .2s, border-color .2s, transform .2s; }
.battle-rounds .br img { width: 34px; height: 30px; object-fit: contain; }
.battle-rounds .br.done { opacity: .8; }
.battle-rounds .br.on { opacity: 1; border-color: var(--accent); transform: scale(1.08); }
.battle { --cols: var(--n); display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 8px; --reel: 260px; --tile: 110px; }
.battle-col { display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 16px; background: var(--card);
  border-top: 4px solid var(--pc); transition: box-shadow .3s; min-width: 0; }
.battle-col.lead { box-shadow: 0 0 0 2px #3ddc84; }
.battle-col.winner { box-shadow: 0 0 0 3px #ffd700, 0 0 32px #ffd70077; }
.battle-player { display: flex; align-items: center; gap: 6px; min-width: 0; }
.battle-player .room-avatar { width: 28px; height: 28px; font-size: 13px; }
.battle-player b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.battle-total { font-size: 17px; font-weight: 900; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.battle .case-window.vertical { height: var(--reel); }
.battle .case-window.vertical .case-item { height: var(--tile); width: 100%; gap: 4px; }
.battle .case-window.vertical .case-item .gun { width: min(100%, calc(var(--tile) * .95)); height: calc(var(--tile) * .55); object-fit: contain; }
.battle .case-window.vertical .case-item .gun-ph { width: 70%; height: calc(var(--tile) * .38); }
/* wygrane skiny gracza: małe kafelki (nawet przy 10 rundach kolumna nie robi się kilometrowa) */
.battle-won { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 5px; }
.bw-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 2px 3px; border-radius: 9px;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--rc) 30%, var(--card-2)), var(--card-2) 75%); border-bottom: 3px solid var(--rc);
  animation: bw-in .35s cubic-bezier(.2, 1.4, .4, 1); }
.bw-item .gun { width: 100%; height: 32px; object-fit: contain; }
.bw-item small { font-size: 10px; font-weight: 800; color: var(--gold); white-space: nowrap; }
@keyframes bw-in { from { transform: scale(.6); opacity: 0; } }
.battle-result { text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.battle-result.won { box-shadow: 0 0 0 3px #ffd700, 0 0 40px #ffd70066; }
/* dużo graczy: siatka zamiast jednego rzędu */
.battle.many { --reel: 200px; --tile: 86px; }
@media (max-width: 600px) {
  .battle { --reel: 230px; --tile: 96px; }
  .battle.three { --reel: 210px; --tile: 84px; }
  .battle.three .case-name { font-size: 9px; }
  .battle.many { --reel: 170px; --tile: 76px; }
  .battle.many .case-name { display: none; }
  .battle-col { padding: 6px; gap: 6px; }
}
}
.invite-list { display: grid; gap: 8px; margin-top: 12px; text-align: left; width: 100%; }
.invite-row { display: flex; align-items: center; gap: 10px; }
/* Bitwy: tryby i wybór skrzynek */
.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mode-chip { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px; border: 2px solid var(--line); border-radius: 12px;
  background: var(--card); font-size: 12px; font-weight: 700; cursor: pointer; text-align: center; line-height: 1.15; }
.mode-chip span { font-size: 18px; }
.mode-chip.on { border-color: transparent; color: #fff; background: linear-gradient(135deg, #6d4bff, #c13dd6); }
.mode-desc { margin-top: 10px; font-size: 13px; color: var(--muted); }
.mode-desc b { color: var(--text); }
.bc-cost { color: var(--gold); }
.bc-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.bc-item, .bc-add { position: relative; flex: none; width: 84px; height: 96px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.bc-item { background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--cc) 35%, var(--card-2)), var(--card-2) 75%); border-bottom: 3px solid var(--cc); }
.bc-item img { width: 64px; height: 48px; object-fit: contain; }
.bc-item small { font-size: 10px; font-weight: 700; text-align: center; line-height: 1.1; padding: 0 4px; max-height: 22px; overflow: hidden; }
.bc-item .bc-n { position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; font-size: 11px; }
.bc-x { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; font-size: 11px; cursor: pointer; }
.bc-add { border: 2px dashed var(--line); background: none; color: var(--accent-text); font-weight: 800; cursor: pointer; }
.bc-picker { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.bc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 340px; overflow-y: auto; }
.bc-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 1px solid color-mix(in srgb, var(--cc) 40%, transparent); border-radius: 12px; cursor: pointer;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--cc) 25%, var(--card)), var(--card) 75%); }
.bc-tile:active { transform: scale(.95); }
.bc-tile img { width: 70px; height: 52px; object-fit: contain; }
.bc-tile b { font-size: 11px; text-align: center; line-height: 1.15; }
.bc-tile small { font-size: 11px; font-weight: 800; color: var(--gold); }
.battle-mode { padding: 9px 12px; border-radius: 12px; font-size: 13px; background: linear-gradient(90deg, color-mix(in srgb, #6d4bff 20%, var(--card)), var(--card)); }
.jackpot { display: flex; flex-direction: column; gap: 10px; }
.jp-bar { position: relative; display: flex; height: 26px; border-radius: 13px; overflow: hidden; }
.jp-bar span { height: 100%; }
.jp-needle { position: absolute; top: -4px; bottom: -4px; left: 0; width: 4px; margin-left: -2px; background: #fff; border-radius: 2px; box-shadow: 0 0 8px #000; }
.jp-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; }
.jp-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.bc-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--card-2); }

/* Rynek */
.mk { font-size: 11px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.mk.up { color: #2fbf71; }
.mk.down { color: #ff5a5f; }
.mk.big { font-size: 14px; vertical-align: middle; }
.skin-card > .mk { position: absolute; top: 6px; right: 8px; background: color-mix(in srgb, var(--card) 85%, transparent); border-radius: 6px; padding: 1px 4px; }
.mk-head { display: flex; justify-content: space-between; align-items: center; }
.mk-row { width: 100%; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.mk-row .grow .title { display: block; }
.mk-thumb { flex: none; width: 56px; height: 42px; display: grid; place-items: center; border-radius: 8px; border-bottom: 3px solid var(--rc); background: color-mix(in srgb, var(--rc) 18%, var(--card)); }
.mk-thumb img { max-width: 100%; max-height: 100%; }
.mk-chart svg { width: 100%; height: 90px; display: block; }
.mk-chart .line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.mk-chart .up .line { stroke: #2fbf71; } .mk-chart .up .area { fill: rgba(47, 191, 113, .15); }
.mk-chart .down .line { stroke: #ff5a5f; } .mk-chart .down .area { fill: rgba(255, 90, 95, .15); }
.mk-range { display: flex; justify-content: space-between; gap: 6px; margin-top: 4px; }

/* Zarabiaj */
.earn-head { text-align: center; }
.earn-card { display: flex; align-items: center; gap: 12px; }
.earn-card.ready { border: 1px solid #3ddc84; box-shadow: 0 0 0 3px rgba(61, 220, 132, .15); }
.earn-card .btn { flex: none; min-width: 92px; }
.earn-ic { font-size: 28px; flex: none; width: 40px; text-align: center; }
.math-game { display: grid; gap: 12px; }
.math-top { display: flex; justify-content: space-between; font-weight: 700; }
.math-time { font-size: 26px; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; }
.math-q { font-size: clamp(40px, 13vw, 60px); font-weight: 900; text-align: center; transition: color .2s; font-variant-numeric: tabular-nums; }
.math-q.ok { color: #23a344; } .math-q.bad { color: #ff5a5f; }
.math-in { font-size: 24px; text-align: center; }
.math-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.math-pad .btn { font-size: 20px; padding: 14px 0; }

/* ======================================================================
   Quizy (nauka - poza grą)
   ====================================================================== */
.quiz-intro { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; padding: 28px 18px; }
.quiz-intro h2 { font-size: 24px; }
.quiz-intro p { margin: 0; }
.quiz-kind { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: #8b5cf6; text-transform: uppercase; }
.quiz-loading { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-weight: 600; }
.quiz-spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--card-2); border-top-color: #8b5cf6; animation: spin .8s linear infinite; }
.quiz-start { font-size: 18px; font-weight: 800; padding: 14px 48px; margin-top: 8px; }
.quiz-top { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.quiz-count { padding: 4px 10px; border-radius: 99px; background: var(--card); box-shadow: var(--shadow); }
.quiz-streak { flex: 1; text-align: center; color: #ff9f1a; font-size: 18px; }
.quiz-score { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.quiz-timer { height: 10px; border-radius: 5px; background: var(--card-2); overflow: hidden; }
.quiz-timer > div { height: 100%; width: 100%; background: linear-gradient(90deg, #ff4d4f, #ffd23f 40%, #3ddc84); }
.quiz-q { font-size: 20px; font-weight: 700; text-align: center; padding: 26px 18px; }
.quiz-answers { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .quiz-answers { grid-template-columns: 1fr 1fr; } }
.quiz-a {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; border: 0; border-radius: 14px; cursor: pointer;
  color: #fff; font-size: 16px; font-weight: 700; text-align: left; box-shadow: 0 5px 0 rgba(0, 0, 0, .25); transition: transform .1s, opacity .2s;
}
.quiz-a:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.quiz-a .shape { font-size: 22px; opacity: .9; }
.quiz-a.a0 { background: #e21b3c; } .quiz-a.a1 { background: #1368ce; } .quiz-a.a2 { background: #d89e00; } .quiz-a.a3 { background: #26890c; }
.quiz-a:disabled { opacity: .35; cursor: default; }
.quiz-a.right { opacity: 1; outline: 4px solid #3ddc84; animation: pop .4s cubic-bezier(.2, 2, .4, 1); }
.quiz-a.wrong { opacity: 1; outline: 4px solid #ff4d4f; animation: shake-x .4s; }
@keyframes shake-x { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.quiz-after { display: flex; flex-direction: column; gap: 10px; }
.quiz-after:empty { display: none; }
.quiz-expl.ok { border-left: 5px solid #3ddc84; }
.quiz-expl.bad { border-left: 5px solid #ff4d4f; }
.quiz-next { font-size: 17px; font-weight: 800; padding: 14px; }
.view.quiz-fire .quiz-timer { box-shadow: 0 0 0 2px #ff9f1a; }
.quiz-end { text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 30px 18px; }
.quiz-final { font-size: 40px; font-weight: 900; color: #8b5cf6; font-variant-numeric: tabular-nums; }
.quiz-end-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }

/* ---------- Taśma bez obrazków + gwiazdka jako wynik ---------- */
.case-item .gun-ph { width: 96px; height: 60px; border-radius: 30px 8px 8px 30px; flex: none;
  background: linear-gradient(100deg, transparent 8%, color-mix(in srgb, var(--rc) 55%, #fff 0%) 8% 72%, transparent 72%),
              linear-gradient(0deg, transparent 40%, color-mix(in srgb, var(--rc) 35%, transparent) 40% 60%, transparent 60%);
  opacity: .55; }
.case-item.star-tile { background: radial-gradient(circle at 50% 40%, #fff3b0, #ffb800 45%, #7a4d00 100%); border-bottom-color: #ffd23f; }
.star-glyph { font-size: 48px; line-height: 1; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .4)); }
.star-glyph.big { font-size: 56px; display: block; text-align: center; margin: 10px 0; }
.star-pool { display: grid; gap: 6px; margin-top: 10px; }
.star-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; font-size: 13px;
  background: color-mix(in srgb, var(--rc) 12%, var(--card)); border-left: 4px solid var(--rc); }
.star-row .muted { white-space: nowrap; }
.skin-card.star-odds { --rc: #ffd23f; background: radial-gradient(circle at 50% 30%, rgba(255, 210, 63, .25), var(--card) 75%); }
@media (max-width: 420px) { .star-row { flex-wrap: wrap; } .star-row .muted { order: 3; width: 100%; } }

/* ---------- e-Usprawiedliwienia ---------- */
.justify-form { display: grid; gap: 10px; }
.justify-form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.justify-form .input { width: 100%; box-sizing: border-box; min-width: 0; }
.jf-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.justify-row { display: grid; gap: 4px; margin-bottom: 8px; }
.diag pre { white-space: pre-wrap; word-break: break-word; max-height: 300px; overflow: auto; }

/* ---------- Relacje: podsumowanie tygodnia ---------- */
.stories::-webkit-scrollbar { display: none; }
.story { display: flex; flex-direction: column; align-items: center; gap: 5px; border: 0; background: none; cursor: pointer; color: var(--text); flex: none; width: 74px; padding: 0; }
.story-ring { width: 66px; height: 66px; border-radius: 50%; padding: 3px; background: conic-gradient(#f59e0b, #ef4444, #ec4899, #8b5cf6, #f59e0b); display: grid; place-items: center; }
.story.seen .story-ring { background: var(--line); }
.story-ic { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; font-size: 26px; background: var(--card); border: 3px solid var(--bg); }
.story-label { font-size: 11px; font-weight: 600; text-align: center; line-height: 1.2; color: var(--muted); }
.story-view {
  position: fixed; inset: 0; z-index: 280; color: #fff; display: flex; flex-direction: column; touch-action: none; user-select: none;
  transition: background .4s; animation: fade .2s;
}
.st-bars { display: flex; gap: 4px; padding: calc(env(safe-area-inset-top) + 10px) 10px 0; }
.st-bars span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.st-bars i { display: block; height: 100%; width: 0; background: #fff; }
.st-close { position: absolute; right: 8px; top: calc(env(safe-area-inset-top) + 20px); border: 0; background: none; color: #fff; font-size: 22px; width: 44px; height: 44px; cursor: pointer; z-index: 2; }
.st-slide { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 26px 60px; gap: 10px; }
.st-slide.in > * { animation: st-in .5s cubic-bezier(.2, 1.3, .4, 1) both; }
.st-slide.in > *:nth-child(2) { animation-delay: .08s; } .st-slide.in > *:nth-child(3) { animation-delay: .16s; } .st-slide.in > *:nth-child(4) { animation-delay: .24s; }
@keyframes st-in { from { transform: translateY(24px); opacity: 0; } }
.st-kicker { font-size: 13px; font-weight: 900; letter-spacing: .14em; opacity: .8; }
.st-big { font: 400 clamp(40px, 12vw, 64px) Anton, Impact, sans-serif; line-height: 1.05; letter-spacing: .01em; }
.st-huge { font: 400 clamp(90px, 32vw, 150px) Anton, Impact, sans-serif; line-height: 1; }
.st-sub { font-size: 17px; font-weight: 600; opacity: .92; max-width: 340px; line-height: 1.35; }
.st-count { font: 400 44px Anton, Impact, sans-serif; margin-top: 6px; }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 320px; }
.st-chip { min-width: 44px; height: 44px; font-size: 20px; cursor: default; }
.st-best { min-width: 120px; height: 120px; font: 400 72px Anton, Impact, sans-serif; border-radius: 28px; cursor: default; }
.st-btn { margin-top: 14px; border: 0; border-radius: 14px; padding: 13px 22px; background: #fff; color: #111; font-weight: 800; font-size: 15px; text-decoration: none; cursor: pointer; }
.demo-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between;
  max-width: 760px; margin: 0 auto 10px; padding: 10px 14px; border-radius: 14px; width: calc(100% - 32px);
  background: var(--warn-soft); color: var(--text); font-size: 13px; line-height: 1.3;
}
.demo-bar button { border: 0; border-radius: 10px; padding: 8px 12px; font-weight: 800; background: var(--warn); color: #1a1200; cursor: pointer; }
.st-chip, .st-best { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 6px 16px rgba(0, 0, 0, .25); }
.stories { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.story-view { background: #111; }
.st-lines { display: grid; gap: 6px; font-size: 17px; font-weight: 700; max-width: 340px; }
.st-lines div::first-letter { text-transform: uppercase; }
.st-share { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 22px); transform: translateX(-50%); border: 0; border-radius: 999px;
  padding: 12px 20px; background: rgba(255, 255, 255, .95); color: #111; font-weight: 800; font-size: 15px; cursor: pointer; white-space: nowrap;
  animation: none !important; }

/* ---------- Konta ---------- */
.login-pane { display: grid; gap: 12px; }
.login-pane[hidden] { display: none; }
.login-card .check, .acct-prompt .check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); text-align: left; }
.login-sep { font-size: 12px; font-weight: 700; color: var(--muted); text-align: left; padding-top: 6px; border-top: 1px solid var(--line); }
.how-acct { text-align: left; font-size: 13px; }
.how-acct summary { cursor: pointer; font-weight: 600; color: var(--muted); list-style: none; text-align: center; padding: 2px; }
.how-acct summary::-webkit-details-marker { display: none; }
.how-acct summary::before { content: "🔒 "; }
.how-acct[open] summary { color: var(--text); }
.how-acct .how-body { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--card-2); }
.how-body ul { padding-left: 18px; margin: 8px 0; display: grid; gap: 6px; }
.how-body p { margin: 8px 0; }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 4px; }
.acct-prompt { display: grid; gap: 10px; }
.acct-prompt .field { display: grid; gap: 4px; font-size: 13px; }
.acct-prompt .input { width: 100%; box-sizing: border-box; }
.acct-card { display: grid; gap: 8px; }
.justify-form label.jf-check { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
/* przycisk "Dodaj" nie wystaje poza kartę na wąskich telefonach */
.add-friend { grid-template-columns: minmax(0, 1fr); }
.add-row { min-width: 0; }
.add-row input { width: 0; }
.add-row .btn { flex: none; }

/* ---------- Zwiastun "Co potrafi aplikacja" ---------- */
.st-ic { font-size: 84px; line-height: 1; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .3)); }
.st-lines.ticks { text-align: left; }
.st-lines.ticks div::before { content: "✓ "; font-weight: 900; }
.st-cta { display: grid; gap: 10px; width: min(320px, 100%); margin-top: 14px; }
.st-cta .st-btn { margin: 0; width: 100%; }
.st-btn.ghost { background: rgba(255, 255, 255, .18); color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); }
.trailer-btn { display: grid; gap: 2px; text-align: left; width: 100%; border: 0; cursor: pointer; padding: 14px 16px; border-radius: 16px; color: #fff;
  background: linear-gradient(120deg, #4f46e5, #c026d3 60%, #ec4899); box-shadow: 0 10px 30px rgba(192, 38, 211, .35); font: inherit; }
.trailer-btn b { font-size: 16px; }
.trailer-btn small { opacity: .9; font-size: 12px; }
.trailer-btn .tb-row { display: flex; align-items: center; gap: 12px; }
.trailer-btn .tb-ic { font-size: 28px; }
.trailer-btn .tb-go { margin-left: auto; font-size: 20px; font-weight: 900; }
.invite-hint { display: grid; gap: 8px; text-align: left; border: 1px solid #7c83ff; }
.ih-head { display: flex; gap: 10px; align-items: center; }
.ih-ic { font-size: 28px; }
.ih-code { letter-spacing: 3px; font-size: 16px; }
.librus-down { margin: 8px 12px 0; padding: 10px 12px; border-radius: 12px; font-size: 13px; font-weight: 600;
  background: rgba(234, 179, 8, .15); color: #eab308; border: 1px solid rgba(234, 179, 8, .4); }
.today-all > summary { list-style: none; cursor: pointer; padding: 10px 16px 12px; font-size: 14px; font-weight: 600; color: var(--accent); }
.today-all > summary::-webkit-details-marker { display: none; }
.today-all > summary::after { content: ' ▾'; }
.today-all[open] > summary::after { content: ' ▴'; }
.rem-btn { flex: none; width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--border); background: transparent;
  font-size: 15px; filter: grayscale(1); opacity: .45; cursor: pointer; }
.rem-btn.on { filter: none; opacity: 1; background: rgba(234, 179, 8, .14); border-color: rgba(234, 179, 8, .5); }
.row-emoji { font-size: 20px; width: 28px; text-align: center; flex: none; }

/* Logowanie: dwie jasne drogi - "Pierwszy raz" (Librus) i "Mam konto" */
.login-tag { color: var(--muted); font-size: 15px; }
.login-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 13px; background: var(--card-2); }
.login-tabs[hidden] { display: none; }
.login-tabs button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 650;
  padding: 9px 6px; border-radius: 10px; cursor: pointer; transition: background .15s, color .15s; }
.login-tabs button.on { background: var(--accent-soft); color: var(--accent-text); }
.login-hint { text-align: left; font-size: 13px; line-height: 1.45; color: var(--muted); }
.login-hint b { color: var(--text); }
.login-more { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.login-legal { line-height: 1.6; }
.login-legal a { color: var(--muted); }
.login-more .link-btn { white-space: nowrap; }
/* statystyki znajomego: każda w całości (bez kropki wiszącej na końcu linii) */
.friend-stats { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: center; }
.friend-stats span { white-space: nowrap; }
.friend-row .title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
/* Ustawienia quizu */
.quiz-setup { display: flex; flex-direction: column; gap: 12px; }
.quiz-setup h2 { font-size: 22px; margin: -4px 0 0; }
.quiz-setup textarea { resize: vertical; min-height: 96px; font: inherit; line-height: 1.4; }
.quiz-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; }
.quiz-setup .row.switch { padding: 6px 0; }
.quiz-setup .quiz-start { align-self: stretch; }
.quiz-topic { max-width: 520px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Terminarz na telefonie: zwarty kalendarz i jedna lista wydarzeń */
.cal-card { padding: 12px 10px; touch-action: pan-y; }
.cal { gap: 2px; }
.cal button { font-size: 15px; }
@media (max-width: 480px) {
  .cal button { aspect-ratio: auto; height: 42px; border-radius: 12px; }
  .cal button i { bottom: 4px; width: 5px; height: 5px; }
  .cal-legend { font-size: 11px; gap: 10px; margin-top: 6px; }
}
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; scroll-margin-top: 76px; }
.cal-head .link-btn { text-transform: none; letter-spacing: 0; font-weight: 700; }
.ev-row { gap: 12px; }
.ev-row .pill { flex: none; }
.ev-row.is-test .datebox { background: var(--danger-soft, rgba(239, 68, 68, .14)); color: var(--danger); }
.ev-row.is-test .datebox small { color: var(--danger); }
@media (max-width: 400px) { .ev-row .pill.danger:not(:last-child) { display: none; } }
.navline .btn.small { flex: none; }

/* Pasek "Wróć" do kręcącej się skrzynki / upgradera / bitwy */
.resume-bar { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 76px);
  display: flex; align-items: center; gap: 14px; padding: 11px 16px; border-radius: 99px; text-decoration: none; color: #fff; font-weight: 700; font-size: 14px;
  background: linear-gradient(90deg, #7c3aed, #ec4899); box-shadow: 0 10px 28px rgba(124, 58, 237, .45); white-space: nowrap;
  animation: note-in .32s cubic-bezier(.2, 1.3, .4, 1); }
.resume-bar b { background: rgba(255, 255, 255, .22); padding: 4px 10px; border-radius: 99px; }
@media (min-width: 900px) { .resume-bar { bottom: 24px; } }

/* Sezony */
.season-card { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; padding: 14px 16px;
  background: linear-gradient(120deg, rgba(234, 179, 8, .16), rgba(236, 72, 153, .12)); border: 1px solid rgba(234, 179, 8, .35); }
.season-ic { font-size: 28px; }
.season-card small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.season-place { text-align: right; } .season-place b { font-size: 20px; display: block; }
.season-hero { text-align: center; display: grid; gap: 8px; padding: 22px 16px; }
.season-timer { font-size: 34px; font-weight: 900; letter-spacing: -.02em; }
.season-me { margin-top: 4px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-chip { display: inline-block; white-space: nowrap; padding: 6px 12px; border-radius: 99px; font-weight: 800; font-size: 13px; background: var(--card-2); }
.badge-chip.p1 { background: linear-gradient(90deg, #fde047, #f59e0b); color: #3b2500; }
.badge-chip.p2 { background: linear-gradient(90deg, #e5e7eb, #9ca3af); color: #1f2937; }
.badge-chip.p3 { background: linear-gradient(90deg, #fdba74, #c2410c); color: #2a1004; }
.rank-n { width: 30px; text-align: center; font-weight: 900; flex: none; }
.row.is-me { background: var(--accent-soft); }

/* Kółko profilowe (zdjęcie albo inicjały) i ogień dla top 3 poprzedniego sezonu */
.av { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); isolation: isolate; }
.av > img, .av > span { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; }
.av-sm { width: 36px; height: 36px; font-size: 13px; }
.av-lg { width: 72px; height: 72px; font-size: 24px; }
.av.flame { --f1: #ffd23f; --f2: #ff8a00; --f3: #ff4d00; }
.av.flame.f2 { --f1: #f1f5f9; --f2: #cbd5e1; --f3: #94a3b8; }
.av.flame.f3 { --f1: #fdba74; --f2: #ea580c; --f3: #9a3412; }
/* lekki ogień: migoczące "języki" za kółkiem */
.av.flame::before, .av.flame::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; z-index: -1; pointer-events: none;
  background: conic-gradient(from 0deg, var(--f1), var(--f2), var(--f3), var(--f2), var(--f1), var(--f3), var(--f1));
  filter: blur(3px); animation: flame-spin 3.2s linear infinite, flame-flicker 1.1s ease-in-out infinite alternate; }
.av.flame::after { inset: -9px -4px -3px; border-radius: 50% 50% 45% 45%; opacity: .55; filter: blur(6px);
  animation: flame-spin 4.6s linear infinite reverse, flame-flicker .8s ease-in-out infinite alternate-reverse; }
.av-lg.flame::before { inset: -7px; } .av-lg.flame::after { inset: -14px -6px -4px; }
@keyframes flame-spin { to { transform: rotate(360deg); } }
@keyframes flame-flicker { from { opacity: .65; scale: .97; } to { opacity: 1; scale: 1.05; } }
@media (prefers-reduced-motion: reduce) { .av.flame::before, .av.flame::after { animation: none; } }
.me-btn .av-sm { width: 34px; height: 34px; }
.av-edit { position: relative; display: inline-block; }
.av-change { position: absolute; right: -4px; bottom: -4px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); box-shadow: var(--shadow), 0 0 0 2px var(--line); cursor: pointer; font-size: 14px; }
.badge-chip.beta { background: linear-gradient(90deg, #a78bfa, #22d3ee); color: #13092b; }
#profile-badges { display: grid; gap: 8px; justify-items: start; }
.rank-row { gap: 10px; }

/* Licznik do wipe'u na górze Skinów */
.season-card small { text-transform: none; }
.season-count { display: block; font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.15; }
.season-timer { font-variant-numeric: tabular-nums; }
.season-scope { margin-top: 4px; }
.bug-row { align-items: flex-start; }
.inbox-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.inbox-head h2 { margin: 0; }
.badge-chip.supporter { background: linear-gradient(90deg, #c084fc, #f472b6); color: #2a0a2e; }
.support-btn { background: linear-gradient(90deg, rgba(192, 132, 252, .18), rgba(244, 114, 182, .18)); }
.tip-code { font-family: ui-monospace, monospace; letter-spacing: .1em; padding: 1px 6px; border-radius: 6px; background: var(--card-2); }
.feed-hide { flex: none; align-self: center; width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--card-2); color: var(--muted); font-size: 12px; font-weight: 800; margin-left: 4px; }

/* Ustawienia: wybór zakładek na pasku na dole */
.tab-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 9px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card-2); color: var(--text); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.chip-btn svg { width: 16px; height: 16px; }
.chip-btn.on { background: color-mix(in srgb, var(--accent) 16%, var(--card)); border-color: var(--accent); color: var(--accent); }
.chip-btn b { min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; display: grid; place-items: center; }
@media (min-width: 900px) { .phone-only { display: none !important; } }

/* Upgrader: suwak szansy, strona pola, kilka skinów naraz */
.upg-controls { gap: 10px; }
.upg-chance-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.upg-chance-head b { font-size: 20px; color: #23a344; }
.upg-range { width: 100%; accent-color: #3ddc84; height: 28px; }
.upg-sides button { font-size: 13px; }
.upg-pick-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.upg-pick-head .link-btn { margin-left: auto; }
.upg-stack-art { display: flex; justify-content: center; height: 64px; }
.upg-stack-art svg, .upg-stack-art img { width: 46%; margin: 0 -9%; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .3)); }

/* Profil gracza (z rankingu) */
.rank-row { cursor: pointer; }
.player-head { display: flex; align-items: center; gap: 14px; }
.player-head h2 { margin: 0; }
.player-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.player-stats div { background: var(--card-2); border-radius: 14px; padding: 10px; text-align: center; display: flex; flex-direction: column; }
.player-stats b { font-size: 18px; }
.player-stats small { color: var(--muted); font-size: 12px; }

/* Panel admina: portfel gracza */
.aw-player { display: flex; flex-direction: column; gap: 10px; }
.aw-head { display: flex; align-items: baseline; gap: 8px; }
.aw-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.aw-stats b { color: var(--text); }
.aw-log summary { cursor: pointer; font-weight: 700; }
.aw-log-row { padding: 6px 0; border-bottom: 1px solid var(--line); }

/* Eventy: Piątkowy evencik / Wtorkowy kubełek */
.tn-hero { display: flex; flex-direction: column; gap: 10px; color: #fff; background: linear-gradient(135deg, #4a1d96, #1e1b4b); }
.tn-hero.tn-fri { background: linear-gradient(135deg, #7f1d1d, #3b0a0a 70%); }
.tn-hero.tn-tue { background: linear-gradient(135deg, #0e7490, #1e3a8a 75%); }
.tn-hero h2 { margin: 0; font-size: 26px; }
.tn-hero .muted { color: rgba(255, 255, 255, .75); }
.tn-kicker { font-size: 12px; font-weight: 800; letter-spacing: .06em; opacity: .9; }
.tn-kicker b { font-variant-numeric: tabular-nums; }
.tn-rules { display: flex; flex-wrap: wrap; gap: 6px; }
.tn-step { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 5px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-size: 13px; font-weight: 650; }
.tn-step b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #111; font-size: 11px; }
.tn-prize { font-weight: 800; }
.tn-score { font-size: 18px; }
.tn-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 14px; background: var(--card); font-weight: 750; }
.tn-bar b { color: var(--gold); }
.tn-stage { display: flex; flex-direction: column; gap: 12px; }
.tn-stage h2 { margin: 0; }
#tn-reels { display: flex; flex-direction: column; gap: 8px; }
.tn-points { text-align: center; font-size: 24px; font-weight: 900; color: #23a344; }
.tn-points.zero { color: var(--danger); }
.tn-timer { height: 8px; border-radius: 4px; background: var(--card-2); overflow: hidden; }
.tn-timer span { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, #f59e0b, #ef4444); animation: tn-time var(--t) linear forwards; }
@keyframes tn-time { to { width: 0; } }
.tn-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tn-opt { min-height: 54px; font-size: 15px; white-space: normal; }
.tn-opt.ok { background: #23a344; color: #fff; border-color: #23a344; }
.tn-opt.bad { background: var(--danger); color: #fff; border-color: var(--danger); }
.tn-banner { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; background: linear-gradient(135deg, #7f1d1d, #3b0a0a); }
.tn-banner.tn-tue { background: linear-gradient(135deg, #0e7490, #1e3a8a); }
.tn-banner-ic { font-size: 30px; }
.tn-banner small { display: block; font-size: 11px; opacity: .8; }
.tn-banner b { display: block; font-size: 17px; }
.tn-stage-pick { display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* Konto eventowe przy skrzynce */
.ev-pay { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 16px; background: color-mix(in srgb, #f59e0b 12%, var(--card)); border: 1px dashed #f59e0b; }
.ev-pay-head { font-size: 14px; }
.open-btn.event-pay { background: linear-gradient(180deg, #fbbf24, #d97706); color: #2a1a00; }
.tn-next { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none;
  background: linear-gradient(135deg, color-mix(in srgb, #ef4444 14%, var(--card)), var(--card)); }
.tn-next.tn-tue { background: linear-gradient(135deg, color-mix(in srgb, #0ea5e9 16%, var(--card)), var(--card)); }
.tn-next small { display: block; font-size: 11px; color: var(--muted); }
.tn-next b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }

/* Przerwa techniczna */
.maint { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(circle at 50% 20%, #312e81, #0b0b14 70%); color: #fff; overflow: auto; }
.maint-box { width: min(440px, 100%); display: flex; flex-direction: column; gap: 10px; text-align: center; }
.maint-box h2 { margin: 0; font-size: 28px; }
.maint-box .muted { color: rgba(255, 255, 255, .75); }
.maint-ic { font-size: 56px; animation: maint-spin 3s ease-in-out infinite; }
@keyframes maint-spin { 50% { transform: rotate(-12deg) scale(1.05); } }
.maint-left { font-size: 18px; }
.maint-left b { font-size: 30px; font-variant-numeric: tabular-nums; display: block; }
.maint-list { text-align: left; background: rgba(255, 255, 255, .08); border-radius: 16px; padding: 12px 16px; }
.maint-sub { font-weight: 800; margin-bottom: 6px; }
.maint-list ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.maint-admin { position: fixed; z-index: 999; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 84px); transform: translateX(-50%);
  background: #b45309; color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }

/* Statystyki all-time */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 600px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stats-grid .st { background: var(--card); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.stats-grid .st small { color: var(--muted); font-size: 12px; }
.stats-grid .st b { font-size: 17px; }
.stats-grid .st.up b, b.pos { color: #23a344; }
.stats-grid .st.down b, b.neg { color: var(--danger); }
.stats-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.stats-tabs .chip { flex: none; }
/* myszka nie przewija w bok (pasek bez suwaka) - na komputerze zakładki zawijamy w wiersze */
@media (hover: hover) and (pointer: fine) { .stats-tabs { flex-wrap: wrap; overflow: visible; } }

/* Testowe otwarcie skrzynki */
.btn.test-open { display: flex; flex-direction: column; align-items: center; gap: 2px; border-style: dashed; }
.btn.test-open small { font-weight: 500; color: var(--muted); font-size: 11px; }
.case-window.test { box-shadow: inset 0 0 40px #000, 0 0 0 2px #64748b; }

/* Zgoda przy pierwszym wejściu i dane (RODO) */
.consent { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 16px; background: rgba(8, 10, 18, .7); backdrop-filter: blur(6px); }
.consent-box { width: min(440px, 100%); display: flex; flex-direction: column; gap: 12px; }
.consent-box h2 { margin: 0; }
.consent-box .check { display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; font-size: 14px; text-align: left; }
.consent-box .check input { margin-top: 3px; flex: none; width: 18px; height: 18px; }
.btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.danger:disabled { opacity: .5; }
.login-legal a, .consent-box a { color: var(--accent); }
.data-dump { font-family: ui-monospace, monospace; font-size: 11px; white-space: pre; }

/* iPhone przybliża ekran przy pisaniu w polu z czcionką < 16 px (i potem nie oddala) - na telefonach min. 16 px */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), textarea, select { font-size: max(16px, 1em) !important; }
}

/* Własne wpisy w terminarzu */
.my-add { align-self: flex-start; }
.pill.mine { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }

/* Tryb lekki na słabszych telefonach (settings.js LOW_END): rozmycie tła i cienie to najdroższe rzeczy w WebView */
html.lite *, html.lite *::before, html.lite *::after { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
html.lite .tabbar, html.lite .topbar, html.lite .hub-bar { background: var(--card) !important; }
html.lite .gun, html.lite .case-art img, html.lite .reel img { filter: none !important; }
html.lite .card, html.lite .skin-card, html.lite .case-item { box-shadow: none !important; }
html.lite .view.enter > * { animation: none !important; }
html.lite .case-tile:hover .case-art img { animation: none !important; }

/* Baner "Pobierz aplikację" na stronie w telefonie */
.app-banner { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + var(--sab) + 10px); display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); font-size: 14px; }
.app-banner span { flex: 1; }
@media (min-width: 900px) { .app-banner { left: auto; right: 20px; bottom: 20px; max-width: 420px; } }

/* Okienka (arkusze) i formularze: nic nie może wyjść poza szerokość telefonu */
.sheet-panel { overflow-x: hidden; }
#sheet-body, #sheet-body form, #sheet-body .field { min-width: 0; max-width: 100%; }
.input, .field input { box-sizing: border-box; min-width: 0; max-width: 100%; }
input[type="date"].input { -webkit-appearance: none; appearance: none; display: block; min-height: 46px; text-align: left; }
input[type="date"].input::-webkit-date-and-time-value { text-align: left; }
/* wybór rodzaju wpisu: zawija się zamiast rozpychać okno */
#my-kind { display: grid; grid-template-columns: repeat(3, 1fr); }
#my-kind button { min-width: 0; padding: 9px 4px; }
/* przycisk "Dodaj swój wpis": na całą szerokość, z odstępem od kalendarza */
.my-add { display: flex; width: 100%; margin: 14px 0 4px; padding: 12px; border: 1px dashed var(--line); background: transparent; color: var(--accent); font-weight: 700; }

/* Tryb gier (strona otwierana z aplikacji na iPhone'a, ?tryb=gry): sama gra - bez menu dziennika */
html.games-only .sidebar, html.games-only .tabbar, html.games-only #bell-btn, html.games-only #me-btn, html.games-only #back-btn { display: none !important; }
html.games-only .main { padding-bottom: calc(var(--sab) + 20px); }
html.games-only .app { display: block; }

/* Górny pasek zawsze tej samej wysokości (pasek Skinów i live dropy przyklejają się tuż pod nim) -
   w trybie gier nie ma dzwonka i profilu, więc bez tego był niższy i prześwitywała treść */
.topbar { min-height: calc(env(safe-area-inset-top) + 60px); }
@media (min-width: 900px) { .topbar { min-height: 68px; } }
html.games-only .hub-bar { z-index: 11; }

/* ---------- Samouczek przy pierwszym uruchomieniu (tour.js) ---------- */
.tour { position: fixed; inset: 0; z-index: 400; animation: tour-in .25s ease both; }
.tour.out { opacity: 0; transition: opacity .2s; }
@keyframes tour-in { from { opacity: 0; } }
/* podświetlenie: "dziura" w przyciemnieniu - cień wokół elementu */
.tour-hole { position: fixed; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(5, 7, 14, .72), 0 0 0 2px var(--accent);
  transition: left .3s ease, top .3s ease, width .3s ease, height .3s ease; pointer-events: none; }
.tour.free .tour-hole { left: 50% !important; top: 50% !important; width: 0 !important; height: 0 !important; box-shadow: 0 0 0 9999px rgba(5, 7, 14, .72); }
.tour-card { position: fixed; display: grid; gap: 8px; padding: 16px; border-radius: 20px; background: var(--card); color: var(--text);
  border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, .45); transition: top .3s ease, bottom .3s ease, left .3s ease; }
.tour.free .tour-card { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(340px, calc(100vw - 24px)); text-align: center; }
.tour-title { font-size: 17px; }
.tour-text { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.tour-foot { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.tour-dots { display: flex; gap: 4px; margin-right: auto; }
.tour-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .2s, background .2s; }
.tour-dots i.on { width: 16px; background: var(--accent); }
.tour.free .tour-foot { justify-content: center; }
.tour-gesture { height: 70px; position: relative; overflow: hidden; border-radius: 12px; background: var(--card-2); }
.tg-hand { position: absolute; left: 50%; top: 6px; font-size: 30px; transform: translateX(-50%); animation: tg-pull 1.6s ease-in-out infinite; }
@keyframes tg-pull { 0%, 15% { top: 4px; opacity: 0; } 30% { opacity: 1; } 75% { top: 34px; opacity: 1; } 100% { top: 34px; opacity: 0; } }

/* ---------- Skiny → Przegląd: spokojniej (22.10) ----------
   Jedna karta z licznikami (wipe + najbliższy event), ikony w kafelkach, bonusy bez jaskrawych gradientów. */
.hub-timers { display: grid; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.hub-timers > div:empty { display: none; }
.hub-timers:not(:has(> div:not(:empty))) { display: none; }
.hub-timers > div:not(:empty) ~ div:not(:empty) { border-top: 1px solid var(--line); }
.hub-timers .card:not(.tn-banner) { background: none; border: 0; box-shadow: none; border-radius: 0; padding: 12px 16px; }
.hub-timers .tn-banner { border-radius: 0; }
.hub-timers .season-count, .hub-timers .tn-next b { font-size: 18px; }
.hub-timers .season-ic, .hub-timers .tn-next .tn-banner-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  font-size: 22px; background: var(--card-2); flex: none; }
.hub-timers small { letter-spacing: .02em; }
.claim-card { background: var(--card); color: var(--text); border: 1px solid color-mix(in srgb, #f0a800 50%, var(--line)); box-shadow: none; }
.claim-card .claim-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, #ffc400 22%, transparent); }
.claim-card .claim-amt { color: var(--gold); }
.claim-card.grades { background: var(--card); color: var(--text); border-color: color-mix(in srgb, #3ddc84 55%, var(--line)); box-shadow: none; }
.claim-card.grades .claim-ic { background: color-mix(in srgb, #3ddc84 22%, transparent); }
.claim-card.grades .claim-amt { color: var(--ok); }
.hub-tile { border-left: 0; border: 1px solid var(--line); box-shadow: none; }
.hub-tile span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 21px; margin-bottom: 6px;
  background: color-mix(in srgb, var(--tc, var(--accent)) 18%, transparent); }

/* ======================================================================
   Wygląd 2.0 (22.10): spokojnie, ale z życiem.
   Zasady: jeden akcent na ekran, kolor tylko tam, gdzie coś znaczy (przedmiot, ocena, termin),
   bez poświat i tęczy, mniej pogrubień, mniej emoji w listach.
   ====================================================================== */
:root { --card-ring: transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --card-ring: rgba(255, 255, 255, .045); } }
:root[data-theme="dark"] { --card-ring: rgba(255, 255, 255, .045); }
.card { box-shadow: var(--shadow), inset 0 0 0 1px var(--card-ring); }

/* Start: górna karta - delikatny kolor akcentu zamiast gradientu z poświatą */
.hello {
  color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 60%),
    color-mix(in srgb, var(--accent) 10%, var(--card));
}
.hello h2 { font-size: 22px; font-weight: 700; }
.hello-date { color: var(--accent-text); opacity: 1; font-weight: 600; }
.hello-sub { color: var(--muted); opacity: 1; }
.hello-chips span { background: var(--card); color: var(--muted); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.lucky { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); width: 76px; }
.lucky b { color: var(--accent-text); }
.lucky span { color: var(--muted); opacity: 1; }
.lucky.me { background: var(--accent); color: #fff; box-shadow: none; }
.lucky.me b, .lucky.me span { color: #fff; }

/* Relacje: obwódka w kolorach aplikacji zamiast tęczy */
.story-ring { padding: 2.5px; background: conic-gradient(var(--accent), var(--accent-2), var(--accent)); }

/* Lekcje: kolor przedmiotu tylko w kwadraciku z numerem (bez paska z boku), bez emoji przy każdym przedmiocie */
.lesson.colored { box-shadow: none; }
.row .subj-ic { display: none; }
.now-title { font-weight: 700; }
.now-kicker { font-weight: 700; }

/* Tekst: mniej pogrubień */
.row .title { font-weight: 600; }
.row.unread .title { font-weight: 750; }
.card-head h2 { font-weight: 650; }
.section-title { font-weight: 700; }
.datebox small { font-weight: 600; }

/* Baner demo: spokojniejszy */
.demo-bar { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 30%, transparent); }
.demo-bar button { background: transparent; color: var(--warn); box-shadow: inset 0 0 0 1.5px var(--warn); font-weight: 700; }
.hello-chips { gap: 0; margin-top: 8px; }
.hello-chips span { background: none; box-shadow: none; padding: 0; color: var(--muted); font-size: 13px; font-weight: 500; }
.hello-chips span + span::before { content: "·"; margin: 0 7px; }
.story { width: 66px; }
.story-ring { width: 56px; height: 56px; }
.story-ic { font-size: 22px; }
.hello-chips { display: grid; gap: 1px; }
.hello-chips span + span::before { content: none; }
.row .sub .when { font-weight: 600; color: var(--text); }
.row .sub .when.danger { color: var(--danger); }
.row .sub .when.warn { color: var(--warn); }
.pill.quiz-pill { background: var(--accent-soft); color: var(--accent-text); box-shadow: none; }
/* przełączniki: wybrana opcja jaśniejsza od tła (w ciemnym motywie była ciemniejsza i wyglądała na wciśniętą) */
:root { --seg-on: var(--card); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --seg-on: #33384b; } }
:root[data-theme="dark"] { --seg-on: #33384b; }
.segmented button.on, .segmented a.on, .login-tabs button.on { background: var(--seg-on); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }

/* ---------- Wygląd 2.1: życie z powodem ----------
   Karta powitalna w kolorach pory dnia, kolorowe znaczki sekcji, zabarwione kafelki z liczbami. */
.hello { position: relative; overflow: hidden; isolation: isolate; --h1: #6366f1; --h2: #8b5cf6;
  background: linear-gradient(135deg, color-mix(in srgb, var(--h1) 24%, var(--card)), color-mix(in srgb, var(--h2) 14%, var(--card)) 70%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--h1) 30%, transparent); }
.hello::before { content: ""; position: absolute; z-index: -1; width: 200px; height: 200px; right: -60px; top: -80px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--h1) 60%, transparent), transparent 68%); }
.hello.tod-morning { --h1: #ff9f43; --h2: #ff6b9d; }
.hello.tod-day { --h1: #22a6f2; --h2: #5b6cff; }
.hello.tod-evening { --h1: #f0609e; --h2: #8b5cf6; }
.hello.tod-night { --h1: #5b6cff; --h2: #1e2a78; }
.hello.tod-night::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .7; pointer-events: none;
  background: radial-gradient(1.5px 1.5px at 62% 22%, #fff, transparent), radial-gradient(1px 1px at 78% 60%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 88% 14%, #fff, transparent), radial-gradient(1px 1px at 52% 78%, #fff, transparent),
    radial-gradient(1px 1px at 70% 40%, #fff, transparent); }
.hello-date { color: color-mix(in srgb, var(--h1) 65%, var(--text)); }
.lucky { background: color-mix(in srgb, var(--card) 80%, transparent); backdrop-filter: blur(6px); }
.lucky b { color: color-mix(in srgb, var(--h1) 70%, var(--text)); }
.lucky.me { background: var(--h1); }

.h-ic { width: 28px; height: 28px; border-radius: 9px; display: inline-grid; place-items: center; flex: none; margin-right: 2px; }
.h-ic svg.i { width: 16px; height: 16px; }
.h-ic.blue { background: color-mix(in srgb, #3b82f6 18%, transparent); color: #3b82f6; }
.h-ic.green { background: color-mix(in srgb, #22c55e 18%, transparent); color: #22c55e; }
.h-ic.amber { background: color-mix(in srgb, #f59e0b 20%, transparent); color: #f59e0b; }
.h-ic.pink { background: color-mix(in srgb, #ec4899 18%, transparent); color: #ec4899; }

.quick .card.stat { position: relative; --tc: var(--accent); background: color-mix(in srgb, var(--tc) 9%, var(--card)); }
.quick .card.stat.tint-green { --tc: #22c55e; }
.quick .card.stat.tint-teal { --tc: #14b8a6; }
.quick .card.stat.tint-blue { --tc: #3b82f6; }
.stat .st-ic { position: absolute; right: 10px; top: 10px; width: 16px; height: 16px; color: var(--tc); opacity: .8; }

/* ---------- Oceny (2.1) ---------- */
.grade-summary { flex-wrap: wrap; position: relative; overflow: hidden; --tc: var(--accent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 16%, var(--card)), var(--card) 75%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 24%, transparent); }
.grade-summary:has(.avg-txt.g1) { --tc: var(--g1); } .grade-summary:has(.avg-txt.g2) { --tc: var(--g2); }
.grade-summary:has(.avg-txt.g3) { --tc: var(--g3); } .grade-summary:has(.avg-txt.g4) { --tc: var(--g4); }
.grade-summary:has(.avg-txt.g5) { --tc: var(--g5); } .grade-summary:has(.avg-txt.g6) { --tc: var(--g6); }
.gs-sem { flex-basis: 100%; }
.streak-note { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--card);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--card-ring); font-size: 14px; }
.subj-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--sc); margin-right: 8px; vertical-align: 1px; }
.gs-sem { flex: 0 0 100%; } .gs-sem button { padding: 7px 6px; font-size: 13px; }
/* ---------- Plan (2.1): mocniejszy kolor przedmiotu w kwadraciku, dzisiejszy dzień w kolorze akcentu ---------- */
.lesson.colored .num { background: color-mix(in srgb, var(--sc) 26%, var(--card)); color: color-mix(in srgb, var(--sc) 80%, var(--text)); }
.lesson.now { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.days button.today:not(.on) b { color: var(--accent-text); }
.avatar-sm[style*="--ac"] { background: color-mix(in srgb, var(--ac) 22%, var(--card)); color: color-mix(in srgb, var(--ac) 75%, var(--text)); }
/* ---------- Terminarz (2.1): dni ze sprawdzianem z lekkim czerwonym tłem ---------- */
.cal button:has(i.test):not(.on):not(.past) { background: color-mix(in srgb, var(--danger) 12%, transparent); }
.cal button.today:not(.on) { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.ring-wrap[style*="--tc"] { background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 14%, var(--card)), var(--card) 75%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 22%, transparent); }
/* ---------- Skrzynki (2.1): pomoc zwinięta w jedną kartę ---------- */
.cases-help summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.cases-help summary::-webkit-details-marker { display: none; }
.cases-help summary::after { content: "›"; color: var(--muted); font-size: 20px; transition: transform .2s; }
.cases-help[open] summary::after { transform: rotate(90deg); }
.cases-help summary small { display: block; color: var(--muted); font-size: 12.5px; }
.cases-help p { margin: 12px 0 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.cases-help p b { color: var(--text); }
.tour-choices { display: grid; gap: 8px; margin-top: 6px; }
.tour-choices .btn { flex-direction: column; gap: 1px; padding: 11px 14px; }
.tour-choices .btn small { font-weight: 500; font-size: 12px; opacity: .8; }
.tour-count { margin-right: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tour-card.busy { opacity: .6; }
.scale-choices { display: grid; gap: 10px; }
.scale-choice { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--card-2); cursor: pointer; text-align: left; font: inherit; color: var(--text); }
.scale-choice:hover { border-color: var(--accent); }
.scale-choice .grade { min-width: 54px; }
.scale-choice b { display: block; font-size: 16px; }
.scale-choice small { color: var(--muted); }
/* statystyki: zakładki rankingów zawsze w kilku wierszach (przewijanie w bok nie działało na części komputerów) */
.stats-tabs { flex-wrap: wrap !important; overflow: visible !important; }

/* Android (settings.js: html.perf): bez rozmycia tła i cieni pod obrazkami skinów - to one dławiły listę skrzynek
   i taśmę losowania nawet na mocnych telefonach. */
html.perf *, html.perf *::before, html.perf *::after { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
html.perf .tabbar, html.perf .topbar, html.perf .hub-bar { background: var(--bg) !important; }
html.perf .gun, html.perf .case-art img, html.perf .reel img, html.perf .skin-card img { filter: none !important; }
html.perf .case-item.win { box-shadow: 0 0 0 3px var(--rc) !important; }
html.perf .skin-card.r-gold::after { animation: none !important; }
html.perf .av.flame::before, html.perf .av.flame::after { filter: none !important; }

/* Strona gier (gry.byrybicki.pl): logowanie tylko kontem Mój Dziennik */
html.games-only #login-tabs, html.games-only #login-form { display: none !important; }
.game-logout { display: block; margin: 4px auto 0; }
html.games-only .login-more { grid-template-columns: 1fr; }

/* ważne ogłoszenie z odliczaniem (przeniesienie gier, ekran główny) */
.hold-notice { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 16px; background: rgba(5, 8, 20, .72); backdrop-filter: blur(6px); }
.hold-card { width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; display: grid; gap: 10px; padding: 20px; }
.hold-card h2 { margin: 0; font-size: 1.25rem; }
.hold-card p, .hold-card ul { margin: 0; line-height: 1.45; }
.hold-card ul, .hold-card ol { padding-left: 20px; }
.hold-steps { display: grid; gap: 10px; }
.hold-steps > div { padding: 10px 12px; border-radius: 12px; background: rgba(127, 127, 127, .1); }
.hold-steps ol { margin: 6px 0 0; }
.hold-card .btn[disabled] { opacity: .55; }
.game-push { display: block; margin: 4px auto 0; }
