/* ============ Lolos Joke Card ============ */
@font-face { font-family: "Unbounded"; src: url(fonts/unbounded-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url(fonts/unbounded-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url(fonts/unbounded-latin-900-normal.woff2) format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #060806;
  --bg-2: #0b0f0b;
  --surface: #0f140f;
  --surface-2: #141b14;
  --line: #1f2a20;
  --line-2: #2b3a2c;
  --text: #e9f5ea;
  --muted: #8a9c8c;
  --dim: #5b6b5d;
  --green: #3cff7d;
  --green-2: #22c55e;
  --green-deep: #0d3a1d;
  --glow: 0 0 24px rgba(60, 255, 125, .35);
  --red: #ff5a5a;
  --gold: #e9ff70;
  --r: 18px;
  --r-sm: 12px;
  --f-display: "Unbounded", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --f-body: "Inter", system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 400 16px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code { font-family: var(--f-mono); font-size: .85em; color: var(--green); }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hl { color: var(--green); text-shadow: var(--glow); }
.neg { color: var(--red) !important; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }

.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(60,255,125,.10), transparent 60%),
    radial-gradient(40rem 30rem at -10% 110%, rgba(60,255,125,.06), transparent 60%),
    linear-gradient(rgba(60,255,125,.035) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(60,255,125,.035) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--bg);
  mask-image: linear-gradient(#000 0%, #000 60%, transparent 100%);
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  background: rgba(6,8,6,.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand__mark { color: var(--green); display: grid; filter: drop-shadow(0 0 8px rgba(60,255,125,.5)); transition: transform .3s; }
.brand.is-wobble .brand__mark { animation: wobble .6s; }
.brand__text { display: grid; gap: 4px; }
.brand__name { font: 700 15px/1 var(--f-display); letter-spacing: -.01em; white-space: nowrap; }
.brand__group { font: 500 10px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--green); white-space: nowrap; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: var(--muted); font: 500 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em;
  padding: 9px 10px; border-radius: 999px; white-space: nowrap;
}
.nav a:hover { color: var(--text); text-decoration: none; background: var(--surface); }
.nav a.is-active { color: var(--bg); background: var(--green); }
@media (max-width: 560px) { .brand__text { display: none; } .nav a { padding: 8px 7px; font-size: 11px; letter-spacing: .03em; } .topbar { gap: 8px; } }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: 920px; margin: 0 auto; padding: 24px 16px 48px; }
.narrow { max-width: 480px; margin-inline: auto; }
.split { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 760px) { .split { grid-template-columns: 1fr 1fr; } }

.eyebrow { font: 500 11px/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--green); margin: 0 0 10px; }
.display { font: 900 clamp(34px, 9vw, 68px)/.98 var(--f-display); letter-spacing: -.035em; margin: 0; }
.display.small { font-size: 72px; color: var(--green); text-shadow: var(--glow); }
.h1 { font: 700 clamp(26px, 6vw, 38px)/1.08 var(--f-display); letter-spacing: -.025em; margin: 0 0 8px; }
.h2 { font: 700 18px/1.25 var(--f-display); letter-spacing: -.01em; margin: 0 0 16px; }

.hero { padding: 20px 0 28px; }
.group-pill { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 8px 14px 8px 12px; border-radius: 999px; border: 1px solid rgba(60,255,125,.35); background: rgba(60,255,125,.07); font: 700 13px/1 var(--f-display); letter-spacing: -.005em; color: var(--text); }
.group-pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 1.6s ease-in-out infinite; }
.hero--tight { padding: 8px 0 20px; }
.hero__meta { margin: 18px 0 0; color: var(--muted); }
.hero__meta .mono { color: var(--green); font-weight: 700; }

.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px; margin-top: 16px;
}
.card--line { border-style: dashed; border-color: var(--line-2); background: transparent; }
.card.empty { text-align: center; padding: 40px 22px; }
.card.empty .btn { margin-top: 12px; }

.flash { padding: 12px 16px; border-radius: var(--r-sm); margin: 0 0 16px; border: 1px solid; font-size: 14px; }
.flash--ok { border-color: var(--green-2); background: rgba(60,255,125,.08); color: var(--green); }
.flash--err { border-color: rgba(255,90,90,.5); background: rgba(255,90,90,.08); color: #ffb3b3; }

/* ---------- Buttons & Forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 14px/1 var(--f-body); color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px;
  padding: 13px 20px; cursor: pointer; transition: transform .12s, background .2s, border-color .2s;
  text-decoration: none !important;
}
.btn:hover { border-color: var(--green-2); }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--green); color: #031107; border-color: var(--green); box-shadow: var(--glow); }
.btn--primary:hover { background: #6bff9c; }
.btn--ghost { background: transparent; }
.btn--danger { background: transparent; border-color: rgba(255,90,90,.5); color: #ffb3b3; }
.btn--sm { padding: 9px 14px; font-size: 13px; }

.form { display: grid; gap: 14px; margin-top: 8px; }
.form + .form { margin-top: 14px; }
.form--grid { grid-template-columns: 1fr; }
@media (min-width: 640px) { .form--grid { grid-template-columns: 1fr 1fr; } .form--grid .fs, .form--grid .hue { grid-column: 1 / -1; } }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
label small, legend small { color: var(--dim); font-weight: 400; }
input:not([type=checkbox]):not([type=range]) {
  font: 400 16px/1.2 var(--f-body); color: var(--text);
  background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 13px 14px; width: 100%;
}
input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(60,255,125,.15); }
input::placeholder { color: var(--dim); }
.fs { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; display: grid; gap: 12px; margin: 0; }
@media (min-width: 640px) { .fs { grid-template-columns: 1fr 1fr; } .fs legend { grid-column: 1 / -1; } }
legend { font-size: 13px; color: var(--muted); padding: 0 6px; }
.hue { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hue input[type=range] { flex: 1 1 160px; width: auto; }
input[type=range] { accent-color: var(--green); width: 100%; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline input { flex: 1 1 160px; width: auto !important; }
.danger { display: grid; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line-2); }

.switch { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; cursor: pointer; color: var(--muted); font-size: 14px; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: transform .2s; }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(18px); background: #031107; }

/* ---------- Avatar ---------- */
.avatar {
  --h: 140; flex: none; display: inline-grid; place-items: center; border-radius: 30%;
  font: 700 14px/1 var(--f-display); letter-spacing: -.02em;
  color: hsl(var(--h) 100% 78%);
  background:
    radial-gradient(circle at 30% 25%, hsl(var(--h) 90% 45% / .55), transparent 60%),
    linear-gradient(135deg, hsl(var(--h) 60% 16%), hsl(var(--h) 50% 8%));
  border: 1px solid hsl(var(--h) 80% 50% / .45);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.avatar--xs { width: 26px; height: 26px; font-size: 10px; border-radius: 8px; }
.avatar--sm { width: 38px; height: 38px; font-size: 13px; border-radius: 11px; }
.avatar--md { width: 48px; height: 48px; }
.avatar--lg { width: 60px; height: 60px; font-size: 19px; border-radius: 18px; }
.avatar--xl { width: 84px; height: 84px; font-size: 26px; border-radius: 24px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; width: max-content; max-width: 100%; overflow-x: auto; }
.tab { font: 500 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 14px; border-radius: 999px; white-space: nowrap; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.is-active { background: var(--green); color: #031107; }

/* ---------- Podium ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 10px; margin: 36px 0 8px; }
.podium__slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text); text-align: center; min-width: 0; }
.podium__slot:hover { text-decoration: none; }
.podium__slot:hover .avatar { transform: translateY(-4px) rotate(-3deg); }
.podium__slot .avatar { transition: transform .25s; }
.podium__name { font-weight: 600; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium__pts { font-size: 22px; font-weight: 700; color: var(--green); }
.podium__block {
  width: 100%; display: grid; place-items: center; border-radius: 14px 14px 4px 4px;
  background: linear-gradient(180deg, var(--surface-2), var(--bg-2)); border: 1px solid var(--line); border-bottom: 0;
}
.podium__block .mono { font-size: 28px; font-weight: 700; color: var(--dim); }
.podium__slot--1 .podium__block { height: 120px; border-color: rgba(60,255,125,.45); background: linear-gradient(180deg, rgba(60,255,125,.18), var(--bg-2) 85%); }
.podium__slot--1 .podium__block .mono { color: var(--green); font-size: 40px; text-shadow: var(--glow); }
.podium__slot--1 .podium__pts { font-size: 30px; text-shadow: var(--glow); }
.podium__slot--2 .podium__block { height: 84px; }
.podium__slot--3 .podium__block { height: 60px; }
.crown { color: var(--gold); filter: drop-shadow(0 0 10px rgba(233,255,112,.6)); animation: bob 2.4s ease-in-out infinite; margin-bottom: -4px; }

/* ---------- Board ---------- */
.board { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.board__row {
  display: grid; grid-template-columns: 30px auto 1fr auto; align-items: center; gap: 12px;
  padding: 10px 16px 10px 12px; border-radius: 14px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, transform .15s;
}
.board__row:hover { text-decoration: none; border-color: var(--green-2); transform: translateX(3px); }
.board__place { color: var(--dim); text-align: center; font-weight: 700; }
.board__who { display: grid; min-width: 0; }
.board__who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board__who small { color: var(--muted); font-size: 12px; }
.board__pts { font-size: 20px; font-weight: 700; color: var(--green); }

.mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mini li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.mini li:last-child { border-bottom: 0; }
.mini a { color: var(--text); font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini__n { color: var(--dim); width: 14px; }
.mini__time { color: var(--dim); font-size: 12px; white-space: nowrap; }
.mini__pts { color: var(--green); font-weight: 700; min-width: 34px; text-align: right; }

/* ---------- Profile ---------- */
.profile__card {
  position: relative; overflow: hidden;
  border-radius: 26px; padding: 26px 22px 22px;
  background:
    radial-gradient(30rem 16rem at 100% 0%, rgba(60,255,125,.16), transparent 60%),
    linear-gradient(160deg, #0f1a11, #070a07 70%);
  border: 1px solid rgba(60,255,125,.28);
  box-shadow: 0 30px 80px -30px rgba(60,255,125,.25);
}
.profile__card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 3px);
}
.profile__id { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.profile__id .h1 { margin: 0; }
.profile__id .muted { margin: 2px 0 0; }

.score { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0 12px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.score__label { grid-column: 1 / -1; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; }
.score__value { font-size: clamp(64px, 20vw, 112px); line-height: 1; font-weight: 700; color: var(--green); text-shadow: 0 0 40px rgba(60,255,125,.45); letter-spacing: -.04em; }
.score__place { color: var(--muted); font-size: 14px; padding-bottom: 12px; text-align: right; }
.score__place b { color: var(--text); font-size: 22px; display: block; }

.level { padding-top: 18px; }
.level__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.level__badge { font-size: 11px; font-weight: 700; color: #031107; background: var(--green); padding: 5px 8px; border-radius: 6px; }
.level__title { font: 700 16px/1.2 var(--f-display); }
.level__bar { height: 12px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line-2); overflow: hidden; }
.level__bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--green-2), var(--green)); box-shadow: var(--glow); transition: width 1.4s cubic-bezier(.2,.8,.2,1); }
.level__bar.is-in span { width: var(--p); }
.level__next { font-size: 14px; margin: 10px 0 0; }
.level__next b { color: var(--text); }
.reward { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: rgba(233,255,112,.08); border: 1px solid rgba(233,255,112,.3); color: var(--gold); font-size: 14px; }

.laughmeter { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.laughmeter__label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; }
.laughmeter__scale { display: flex; gap: 4px; justify-content: flex-end; }
.laughmeter__scale span { width: 100%; max-width: 20px; height: 18px; border-radius: 4px; background: var(--line); }
.laughmeter__scale span.on { background: hsl(calc(140 - (var(--i) - 1) * 9) 95% 55%); box-shadow: 0 0 10px hsl(calc(140 - (var(--i) - 1) * 9) 95% 55% / .5); animation: pulse 1.6s ease-in-out infinite; animation-delay: calc(var(--i) * 80ms); }
.laughmeter__txt { grid-column: 1 / -1; text-align: right; font: 700 13px/1 var(--f-display); color: var(--text); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 12px; display: grid; gap: 4px; text-align: center; }
.stat__v { font-size: 26px; font-weight: 700; color: var(--text); }
.stat__l { font-size: 12px; color: var(--muted); }

.curve { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; height: 170px; align-items: end; }
.curve__col { display: grid; grid-template-rows: auto 1fr auto; height: 100%; gap: 6px; text-align: center; }
.curve__v { font-size: 12px; color: var(--green); min-height: 16px; }
.curve__bar { align-self: end; height: 0; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--green), var(--green-deep)); transition: height 1s cubic-bezier(.2,.8,.2,1); min-height: 3px; opacity: .9; }
.curve.is-in .curve__bar { height: var(--h); }
.curve__l { font: 500 11px/1 var(--f-mono); color: var(--muted); text-transform: uppercase; }

.badges { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.badge { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 16px 10px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line-2); }
.badge b { font: 700 13px/1.2 var(--f-display); }
.badge small { font-size: 11px; color: var(--muted); line-height: 1.3; }
.badge__ico { width: 44px; height: 44px; border-radius: 50%; display: block; margin-bottom: 6px; background: var(--green-deep) center / 26px no-repeat; border: 1px solid var(--green-2); box-shadow: var(--glow); }
.badge--first .badge__ico { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233cff7d' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 14c1.5 2.5 6.5 2.5 8 0M9 9.5h.01M15 9.5h.01'/%3E%3C/svg%3E"); }
.badge--hattrick .badge__ico { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233cff7d'%3E%3Cpath d='M4 17h16l-1.5-8-4 3L12 5l-2.5 7-4-3z'/%3E%3C/svg%3E"); }
.badge--onfire .badge__ico { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233cff7d'%3E%3Cpath d='M12 2c1 4 5 6 5 11a5 5 0 0 1-10 0c0-2 1-3.5 2-4.5 0 2 1 3 2 3 0-3-1-6 1-9.5z'/%3E%3C/svg%3E"); }
.badge--winner .badge__ico { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233cff7d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 4h10v5a5 5 0 0 1-10 0zM7 6H4a3 3 0 0 0 3 4M17 6h3a3 3 0 0 1-3 4M12 14v4M8 20h8'/%3E%3C/svg%3E"); }
.badge--loyal .badge__ico { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233cff7d' stroke-width='2' stroke-linecap='round'%3E%3Crect x='4' y='5' width='16' height='15' rx='2'/%3E%3Cpath d='M4 10h16M9 3v4M15 3v4M9 15l2 2 4-4'/%3E%3C/svg%3E"); }
.badge--dud .badge__ico { border-color: rgba(255,90,90,.6); background-color: rgba(255,90,90,.12); box-shadow: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff7a7a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 16c1.5-2 6.5-2 8 0M9 9.5h.01M15 9.5h.01'/%3E%3C/svg%3E"); }
.badge--hundred .badge__ico { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctext x='12' y='16' font-family='monospace' font-size='10' font-weight='700' text-anchor='middle' fill='%233cff7d'%3E100%3C/text%3E%3C/svg%3E"); }

.tiers { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tiers li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--dim); font-size: 14px; }
.tiers li.done { color: var(--muted); }
.tiers li.done .tiers__lvl { background: var(--green-deep); color: var(--green); border-color: var(--green-2); }
.tiers li.cur { background: rgba(60,255,125,.08); color: var(--text); }
.tiers li.cur .tiers__lvl { background: var(--green); color: #031107; }
.tiers__lvl { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line-2); font-size: 12px; font-weight: 700; }
.tiers__t small { display: block; font-size: 12px; color: var(--gold); }
.tiers__min { font-size: 12px; }

.timeline { display: grid; gap: 2px; }
.timeline__day { display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline__day:last-child { border-bottom: 0; }
.timeline__date { font: 500 13px/1 var(--f-mono); color: var(--muted); }
.timeline__dots { display: flex; flex-wrap: wrap; gap: 5px; }
.dot { display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 99px; background: var(--green); color: #031107; font: 700 10px/1 var(--f-mono); box-shadow: 0 0 8px rgba(60,255,125,.4); }
.dot.neg { background: var(--red); box-shadow: none; }
.timeline__sum { font-weight: 700; color: var(--green); }

.copy { cursor: pointer; display: inline-block; max-width: 100%; overflow-wrap: anywhere; padding: 2px 6px; border-radius: 6px; background: rgba(60,255,125,.06); border: 1px dashed rgba(60,255,125,.3); }
.copy:hover { background: rgba(60,255,125,.12); }

/* ---------- Admin: Scorer ---------- */
.scorer { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
@media (max-width: 400px) { .scorer { grid-template-columns: 1fr 1fr; gap: 10px; } }
.tile { --h: 140; position: relative; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: border-color .2s; }
.tile:target { border-color: var(--green); }
.tile__main {
  all: unset; box-sizing: border-box; width: 100%; cursor: pointer; -webkit-tap-highlight-color: transparent;
  display: grid; justify-items: center; gap: 6px; padding: 20px 10px 14px; text-align: center; position: relative;
  transition: transform .1s, background .25s;
}
.tile__main:active { transform: scale(.96); }
.tile__main:focus-visible { outline: 2px solid var(--green); outline-offset: -4px; border-radius: 22px; }
.tile__name { font-weight: 600; font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile__total { font-size: 34px; font-weight: 700; color: var(--green); line-height: 1; }
.tile__today { font-size: 11px; color: var(--muted); min-height: 13px; }
.tile__more { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.chip { all: unset; box-sizing: border-box; cursor: pointer; text-align: center; padding: 12px 0; font: 700 14px/1 var(--f-mono); color: var(--muted); -webkit-tap-highlight-color: transparent; transition: background .15s, color .15s; }
.chip + .chip { border-left: 1px solid var(--line); }
.chip:hover, .chip:focus-visible { background: var(--surface-2); color: var(--green); }
.chip--neg:hover, .chip--neg:focus-visible { color: var(--red); }
.chip:active { background: var(--green-deep); }
.tile.is-hit { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), var(--glow); }
.tile.is-hit .tile__total { animation: pop .45s cubic-bezier(.3,1.6,.5,1); }
.tile.is-dud { border-color: var(--red); animation: shake .4s; }
.tile.is-busy { pointer-events: none; opacity: .7; }
.float { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); font: 900 26px/1 var(--f-display); color: var(--green); text-shadow: var(--glow); pointer-events: none; animation: floatUp 1s ease-out forwards; z-index: 2; }
.float.neg { color: var(--red); text-shadow: none; }

.mlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mlist li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mlist li:last-child { border-bottom: 0; }
.mlist li.is-off { opacity: .5; }
.mlist__who { min-width: 0; display: grid; gap: 4px; justify-items: start; }
.mlist__who code { font-size: 11px; }
.mlist__pts { color: var(--green); font-weight: 700; font-size: 18px; }
.mlist li .btn { grid-row: 2; }
.mlist li .btn--ghost { grid-column: 2; justify-self: end; }
.mlist li .btn:not(.btn--ghost) { grid-column: 3; }
@media (min-width: 680px) {
  .mlist li { grid-template-columns: auto 1fr auto auto auto; }
  .mlist li .btn { grid-row: auto; grid-column: auto !important; justify-self: auto; }
}
.tag { display: inline-block; font: 500 10px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; padding: 4px 6px; border-radius: 5px; background: var(--green); color: #031107; margin-left: 6px; vertical-align: 2px; }
.tag--off { background: var(--line-2); color: var(--muted); }
.tag--dim { background: transparent; border: 1px solid var(--line-2); color: var(--muted); }

.hist { display: grid; grid-template-columns: 46px auto 1fr auto auto; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; }
.hist a { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist__t { color: var(--dim); font-size: 12px; }
.hist__a { font-weight: 700; color: var(--green); }
.hist__day { margin: 18px 0 4px; }
.hist__day:first-child { margin-top: 0; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }

/* ---------- Footer / Toast / FX ---------- */
.foot { max-width: 920px; margin: 0 auto; padding: 24px 16px calc(32px + env(safe-area-inset-bottom)); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--dim); font: 500 11px/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; border-top: 1px solid var(--line); }
.foot__egg { cursor: default; user-select: none; }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 140%); opacity: 0;
  display: flex; align-items: center; gap: 14px; width: max-content; max-width: calc(100vw - 32px);
  padding: 12px 12px 12px 18px; border-radius: 16px;
  background: #0d150e; border: 1px solid var(--green-2); box-shadow: 0 20px 50px -10px rgba(0,0,0,.8), var(--glow);
  font-size: 14px; transition: transform .35s cubic-bezier(.2,1.2,.4,1), opacity .25s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.toast b { color: var(--green); }
.toast button { all: unset; cursor: pointer; font: 700 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--text); white-space: nowrap; }
.toast button:hover { color: var(--green); }

.fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 50; }

.levelup {
  position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; pointer-events: none;
  background: radial-gradient(circle, rgba(60,255,125,.18), rgba(6,8,6,.85) 70%);
  animation: fadeInOut 2.6s forwards;
}
.levelup div { text-align: center; padding: 16px; animation: zoomIn .5s cubic-bezier(.3,1.6,.5,1); }
.levelup small { display: block; font: 500 12px/1 var(--f-mono); letter-spacing: .2em; color: var(--green); text-transform: uppercase; margin-bottom: 10px; }
.levelup strong { font: 900 clamp(28px, 8vw, 54px)/1.05 var(--f-display); letter-spacing: -.03em; text-shadow: var(--glow); }

/* ---------- Animationen ---------- */
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes floatUp { from { opacity: 1; transform: translate(-50%, 0) scale(.8); } to { opacity: 0; transform: translate(-50%, -70px) scale(1.2); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-5px) rotate(4deg); } }
@keyframes wobble { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-18deg) scale(1.15); } 40% { transform: rotate(14deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(4deg); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .65; } }
@keyframes fadeInOut { 0% { opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes zoomIn { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Profilbild, Beschreibung, Konto erstellen ---------- */
.avatar--img { overflow: hidden; padding: 0; background: var(--surface-2); }
.avatar--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bio { margin: -6px 0 18px; font-size: 15px; line-height: 1.5; color: var(--text); opacity: .85; max-width: 46ch; }
.profile__edit { margin: -6px 0 18px; }
.claim {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  margin-bottom: 16px; padding: 18px 20px; border-radius: 20px;
  background: linear-gradient(120deg, rgba(60,255,125,.16), rgba(60,255,125,.04));
  border: 1px solid rgba(60,255,125,.45); box-shadow: var(--glow);
}
.claim .eyebrow { margin-bottom: 6px; }
.claim__t { margin: 0; font-weight: 600; max-width: 42ch; }
.avatar-edit { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.avatar-edit__ctrl { display: grid; gap: 8px; justify-items: start; }
.file-btn { position: relative; overflow: hidden; display: inline-flex; color: var(--text); font-size: 13px; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.check input { accent-color: var(--green); width: 16px; height: 16px; }
textarea {
  font: 400 16px/1.45 var(--f-body); color: var(--text); background: var(--bg);
  border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 13px 14px; width: 100%; resize: vertical;
}
textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(60,255,125,.15); }
.counter { justify-self: end; font-family: var(--f-mono); font-size: 11px; }
