/* ============================================================
   Housemate of the Week — styles
   data-style="playful" (default) | data-style="classic"
   data-theme="light" | "dark" (or follows the device)
   ============================================================ */
:root {
  --bg: #faf7ff;
  --card: #ffffff;
  --ink: #1e1b2e;
  --muted: #6b6785;
  --line: #ece7f7;
  --soft: #f3effc;
  --pink: #ec4899;
  --mint: #10b981;
  --sky: #0ea5e9;
  --red: #ef4444;
  --sun: #f59e0b;
  --house: #7c3aed;
  --accent: var(--house);
  --radius: 20px;
  --radius-sm: 14px;
  --pill-r: 999px;
  --shadow: 0 6px 24px -10px rgba(76, 29, 149, .25), 0 2px 6px -2px rgba(30, 27, 46, .06);
  --display: "Fredoka", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, sans-serif;
  --w-bold: 800;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #120f1d; --card: #1d1930; --ink: #f4f1ff; --muted: #a9a3c7; --line: #2d2846; --soft: #262140;
    --shadow: 0 8px 28px -12px rgba(0,0,0,.6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #120f1d; --card: #1d1930; --ink: #f4f1ff; --muted: #a9a3c7; --line: #2d2846; --soft: #262140;
  --shadow: 0 8px 28px -12px rgba(0,0,0,.6); color-scheme: dark;
}

/* ---------- Classic style: neutral, modern, minimal ---------- */
:root[data-style="classic"] {
  /* Brand: sage #a3b6a2, cream #fbf9ed, charcoal #2a302e */
  --sage: #a3b6a2; --sage-dk: #6f8a6e; --cream: #fbf9ed; --char: #2a302e;
  --bg: #f6f5ef; --card: #ffffff; --ink: #2a302e; --muted: #6b716d; --line: #e4e4dc; --soft: #efeee6;
  --accent: #2a302e; --radius: 12px; --radius-sm: 8px; --pill-r: 6px;
  --shadow: 0 1px 2px rgba(17, 24, 39, .06), 0 0 0 1px rgba(17, 24, 39, .05);
  --display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --w-bold: 600;
}
@media (prefers-color-scheme: dark) {
  :root[data-style="classic"]:not([data-theme="light"]) {
    --bg: #121513; --card: #1b1f1c; --ink: #eceee6; --muted: #a3aaa4; --line: #2b302c; --soft: #222723; --accent: #fbf9ed;
    --shadow: 0 0 0 1px rgba(255,255,255,.06);
  }
}
:root[data-style="classic"][data-theme="dark"] {
  --bg: #121513; --card: #1b1f1c; --ink: #eceee6; --muted: #a3aaa4; --line: #2b302c; --soft: #222723; --accent: #fbf9ed;
  --shadow: 0 0 0 1px rgba(255,255,255,.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.45 var(--body); -webkit-font-smoothing: antialiased; min-height: 100dvh; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; letter-spacing: -.01em; }
[data-style="classic"] h1, [data-style="classic"] h2, [data-style="classic"] h3 { letter-spacing: -.02em; font-weight: 650; }
h1 { font-size: 1.8rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.1rem; }
[data-style="classic"] h1 { font-size: 1.6rem; } [data-style="classic"] h2 { font-size: 1.2rem; } [data-style="classic"] h3 { font-size: 1rem; }
p { margin: 0; }
a { color: var(--house); }
[data-style="classic"] a { color: var(--ink); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
b, strong { font-weight: var(--w-bold); }
.boot { display: grid; place-items: center; height: 100dvh; font-size: 4rem; animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-6deg); } }

/* icons */
.i { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }
.em { line-height: 1; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrapy { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tiny { font-size: .75rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rounded { border-radius: var(--radius); cursor: zoom-in; }
.big-num { font-family: var(--display); font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.lift { margin-top: -14px; position: relative; }

/* Avatars */
.avatar { border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center; vertical-align: middle; background: var(--soft); }
.avatar.ini { background: hsl(var(--h) 75% 88%); color: hsl(var(--h) 55% 28%); font-weight: 800; letter-spacing: .02em; }
[data-style="classic"] .avatar.ini { background: var(--soft); color: var(--muted); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.me-photo { display: grid; place-items: center; }
.me-photo .avatar { box-shadow: 0 0 0 4px var(--card), 0 0 0 6px var(--line); }
.cell-av { display: inline-flex; gap: 8px; align-items: center; }

/* Buttons */
.btn {
  border: 0; cursor: pointer; border-radius: var(--pill-r); padding: 12px 20px; font-weight: var(--w-bold);
  background: var(--soft); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s ease, filter .12s, background .12s; text-decoration: none; min-height: 44px;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, var(--house), color-mix(in srgb, var(--house) 55%, var(--pink))); color: #fff; box-shadow: 0 8px 20px -10px var(--house); }
.btn.go { background: linear-gradient(135deg, #10b981, #0ea5e9); color: #fff; }
.btn.danger { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.btn.ghost { background: transparent; border: 2px solid var(--line); }
.btn.sm { padding: 7px 14px; min-height: 34px; font-size: .9rem; }
.btn.block { width: 100%; }
[data-style="classic"] .btn { border: 1px solid var(--line); background: var(--card); font-size: .95rem; }
[data-style="classic"] .btn:hover { background: var(--soft); }
[data-style="classic"] .btn.primary { background: var(--accent); color: var(--bg); border-color: var(--accent); box-shadow: none; }
[data-style="classic"] .btn.primary:hover { filter: brightness(1.15); }
[data-style="classic"] .btn.go { background: var(--accent); color: var(--bg); border-color: var(--accent); }
[data-style="classic"] .btn.danger { background: var(--card); color: #b91c1c; border-color: #fecaca; }
[data-style="classic"] .btn.ghost { border: 1px solid var(--line); }
[data-style="classic"] .btn:active { transform: none; }
.icon-btn { border: 0; background: var(--soft); width: 40px; height: 40px; border-radius: var(--radius-sm); cursor: pointer; font-size: 1.1rem; display: grid; place-items: center; flex: none; color: inherit; text-decoration: none; }
.icon-btn.xs { width: 28px; height: 28px; font-size: .8rem; background: transparent; }
[data-style="classic"] .icon-btn { background: var(--card); border: 1px solid var(--line); }
[data-style="classic"] .icon-btn.xs { border: 0; background: transparent; }

/* Forms */
label.f { display: grid; gap: 6px; font-weight: 700; font-size: .9rem; }
[data-style="classic"] label.f { font-weight: 550; }
label.f > span.h { color: var(--muted); font-weight: 500; font-size: .8rem; }
.in, select.in, textarea.in { width: 100%; border: 2px solid var(--line); background: var(--card); border-radius: var(--radius-sm); padding: 11px 14px; outline: none; min-height: 46px; }
[data-style="classic"] .in { border-width: 1px; min-height: 42px; padding: 9px 12px; }
.in:focus { border-color: var(--house); }
[data-style="classic"] .in:focus { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent); }
textarea.in { min-height: 90px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; cursor: pointer; }
.check input, .cb { width: 20px; height: 20px; accent-color: var(--house); flex: none; }
[data-style="classic"] .check input, [data-style="classic"] .cb { accent-color: #2a302e; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 2px solid var(--line); background: var(--card); padding: 6px 12px; border-radius: var(--pill-r); cursor: pointer; font-weight: 700; font-size: .88rem; display: inline-flex; gap: 6px; align-items: center; }
.chip.on { background: var(--house); border-color: var(--house); color: #fff; }
[data-style="classic"] .chip { border-width: 1px; font-weight: 500; }
[data-style="classic"] .chip.on { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.swatch.on { border-color: var(--ink); transform: scale(1.1); }
[data-style="classic"] .swatch { width: 26px; height: 26px; border-width: 2px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.emoji-grid button { border: 0; background: var(--soft); border-radius: 10px; font-size: 1.35rem; aspect-ratio: 1; cursor: pointer; }
.emoji-grid button.on { background: var(--house); }
.opt-cards { display: grid; gap: 8px; }
.opt-cards.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 420px) { .opt-cards.two { grid-template-columns: 1fr; } }
.opt-card { border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; background: var(--card); font-weight: 400; }
.opt-card.on { border-color: var(--house); background: color-mix(in srgb, var(--house) 8%, var(--card)); }
[data-style="classic"] .opt-card { border-width: 1px; border-radius: var(--radius-sm); }
[data-style="classic"] .opt-card.on { border-color: var(--ink); background: var(--card); box-shadow: inset 0 0 0 1px var(--ink); }
.opt-card .e { font-size: 1.4rem; line-height: 1; }
[data-style="classic"] .opt-card .e { font-size: 1.15rem; color: var(--muted); padding-top: 2px; }
.style-prev { display: grid; grid-template-columns: repeat(3, 10px); gap: 3px; padding-top: 4px; flex: none; }
.style-prev i { height: 22px; border-radius: 3px; }
.style-prev.playful i:nth-child(1) { background: #7c3aed; } .style-prev.playful i:nth-child(2) { background: #ec4899; } .style-prev.playful i:nth-child(3) { background: #f59e0b; }
.style-prev.classic i:nth-child(1) { background: #2a302e; } .style-prev.classic i:nth-child(2) { background: #a3b6a2; } .style-prev.classic i:nth-child(3) { background: #fbf9ed; box-shadow: inset 0 0 0 1px #e4e4dc; }

/* Cards */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card.flat { box-shadow: none; border: 2px solid var(--line); }
[data-style="classic"] .card.flat { border-width: 1px; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin: 22px 0 10px; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--pill-r); font-weight: var(--w-bold); font-size: .78rem; background: var(--soft); white-space: nowrap; }
.pill .avatar { width: 18px; height: 18px; font-size: 8px; }
.pill.pts { background: linear-gradient(135deg, #fde68a, #fbbf24); color: #78350f; }
.pill.bounty { background: linear-gradient(135deg, #fb7185, #f97316); color: #fff; animation: pulse 1.6s ease-in-out infinite; }
.pill.ok { background: color-mix(in srgb, var(--mint) 18%, transparent); color: #047857; }
.pill.wait { background: color-mix(in srgb, var(--sun) 20%, transparent); color: #92400e; }
.pill.bad { background: color-mix(in srgb, var(--red) 16%, transparent); color: #b91c1c; }
.pill.you { background: var(--house); color: #fff; }
[data-style="classic"] .pill { background: var(--soft); color: var(--ink); font-weight: 500; box-shadow: inset 0 0 0 1px var(--line); }
[data-style="classic"] .pill.pts { background: var(--card); color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
[data-style="classic"] .pill.bounty { background: #fff7ed; color: #9a3412; animation: none; box-shadow: inset 0 0 0 1px #fed7aa; }
[data-style="classic"] .pill.ok { background: #ecfdf5; color: #065f46; box-shadow: inset 0 0 0 1px #a7f3d0; }
[data-style="classic"] .pill.wait { background: #fffbeb; color: #92400e; box-shadow: inset 0 0 0 1px #fde68a; }
[data-style="classic"] .pill.bad { background: #fef2f2; color: #991b1b; box-shadow: inset 0 0 0 1px #fecaca; }
[data-style="classic"] .pill.you { background: var(--accent); color: var(--bg); box-shadow: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.ok { color: #6ee7b7; } :root:not([data-theme="light"]) .pill.wait { color: #fcd34d; } :root:not([data-theme="light"]) .pill.bad { color: #fca5a5; } }
@keyframes pulse { 50% { transform: scale(1.06); } }
.tag-mini { display: inline-flex; align-items: center; gap: 3px; font-size: .7rem; font-weight: 600; padding: 1px 7px; border-radius: var(--pill-r); background: var(--soft); color: var(--muted); vertical-align: 1px; }
.tag-mini.lead { background: color-mix(in srgb, var(--sun) 22%, transparent); color: #92400e; }
[data-style="classic"] .tag-mini.lead { background: var(--ink); color: var(--bg); }
.room-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--rc, #94a3b8); margin-right: 6px; vertical-align: 1px; }
.room-dot.lg { width: 14px; height: 14px; margin: 0; flex: none; }

/* Auth / landing */
.hero {
  min-height: 100dvh; display: grid; align-content: center; padding: 32px 16px 48px;
  background: radial-gradient(circle at 15% 15%, #fbcfe8 0, transparent 40%), radial-gradient(circle at 85% 20%, #c4b5fd 0, transparent 45%), radial-gradient(circle at 50% 100%, #fde68a 0, transparent 50%), var(--bg);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero { background: radial-gradient(circle at 15% 15%, #4c1d95 0, transparent 45%), radial-gradient(circle at 85% 20%, #831843 0, transparent 45%), var(--bg); } }
[data-style="classic"] .hero, :root[data-style="classic"]:not([data-theme="light"]) .hero { background: var(--bg); }
.hero .logo { font-size: 4.5rem; text-align: center; animation: bob 2.4s ease-in-out infinite; }
[data-style="classic"] .hero .logo { animation: none; font-size: 1.8rem; }
.logo-mark { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--accent); color: var(--bg); }
.brand-logo { width: 168px; height: 168px; border-radius: 28px; margin: 0 auto; box-shadow: var(--shadow); object-fit: cover; }
.mark { width: 1.6em; height: 1.6em; flex: none; }
.mark-tile { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #a3b6a2; color: #fbf9ed; }
.mark-tile .mark { width: 24px; height: 24px; }
.boot svg { width: 72px; height: 72px; color: #a3b6a2; }
.hero h1 { text-align: center; font-size: 2.3rem; line-height: 1.05; }
.hero h1 b { background: linear-gradient(90deg, #7c3aed, #ec4899, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-style="classic"] .hero h1 { font-size: 2rem; }
[data-style="classic"] .hero h1 b { background: none; color: var(--muted); font-weight: 600; }
.hero .tag { text-align: center; color: var(--muted); margin: 10px auto 22px; max-width: 420px; font-weight: 500; }
.feature-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.tabs2 { display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); padding: 4px; border-radius: var(--pill-r); margin-bottom: 14px; }
.tabs2 button { border: 0; background: transparent; padding: 10px; border-radius: var(--pill-r); font-weight: var(--w-bold); cursor: pointer; }
.tabs2 button.on { background: var(--card); box-shadow: var(--shadow); }
.auth-card { max-width: 420px; margin: 0 auto; width: 100%; }

/* Home */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.1rem; display: flex; gap: 8px; align-items: center; }
.house-tile { position: relative; overflow: hidden; border-radius: 24px; min-height: 140px; color: #fff; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; cursor: pointer; box-shadow: var(--shadow); text-decoration: none; background: var(--hc, #7c3aed); }
[data-style="classic"] .house-tile { border-radius: var(--radius); background: #2a302e; }
[data-style="classic"] .house-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--hc); z-index: 1; }
.house-tile .bgimg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.house-tile .shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(0,0,0,.6)); }
.house-tile > *:not(.bgimg):not(.shade) { position: relative; }

/* House header */
.hhead { position: relative; color: #fff; padding: calc(env(safe-area-inset-top) + 14px) 0 22px; overflow: hidden; border-radius: 0 0 28px 28px; }
.hhead .bgimg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .55; }
.hhead .tint { position: absolute; inset: 0; background: linear-gradient(135deg, var(--house), color-mix(in srgb, var(--house) 50%, #ec4899) 60%, color-mix(in srgb, var(--house) 30%, #f59e0b)); mix-blend-mode: multiply; }
.hhead .tint2 { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.35)); }
.hhead .wrap { position: relative; }
.hhead .icon-btn { background: rgba(255,255,255,.2); color: #fff; border: 0; }
.hhead h1 { font-size: 1.6rem; }
.weekbar { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.weekbar .pill { background: rgba(255,255,255,.2); color: #fff; backdrop-filter: blur(6px); box-shadow: none; }
[data-style="classic"] .hhead { background: #a3b6a2; color: #2a302e; border-radius: 0; padding-bottom: 26px; border-bottom: 3px solid var(--house); }
[data-style="classic"] .hhead .tint { background: #a3b6a2; mix-blend-mode: normal; opacity: .84; }
[data-style="classic"] .hhead .bgimg { opacity: 1; filter: grayscale(.4); }
[data-style="classic"] .hhead .tint2 { background: none; }
[data-style="classic"] .hhead .icon-btn { background: rgba(251,249,237,.55); color: #2a302e; }
[data-style="classic"] .weekbar .pill { background: rgba(251,249,237,.6); color: #2a302e; font-weight: 500; backdrop-filter: none; }
[data-style="classic"] .hhead .mark-tile { background: #fbf9ed; color: #6f8a6e; }

/* Bottom nav */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.nav .wrap { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.nav a { text-decoration: none; color: var(--muted); display: grid; justify-items: center; align-content: center; gap: 2px; padding: 8px 0 10px; font-weight: var(--w-bold); font-size: .72rem; position: relative; }
.nav a .e { font-size: 1.45rem; line-height: 1.2; height: 30px; display: grid; place-items: center; transition: transform .15s; }
.nav a.on { color: var(--house); }
.nav a.on .e { transform: translateY(-2px) scale(1.12); }
.nav a .e .avatar { width: 26px; height: 26px; }
.nav a.on .e .avatar { box-shadow: 0 0 0 2px var(--house); }
[data-style="classic"] .nav a { font-weight: 500; }
[data-style="classic"] .nav a .e { font-size: 1.25rem; }
[data-style="classic"] .nav a.on { color: var(--ink); }
[data-style="classic"] .nav a.on .e { transform: none; }
[data-style="classic"] .nav a.on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; background: var(--ink); }
[data-style="classic"] .nav a.on .e .avatar { box-shadow: 0 0 0 2px var(--ink); }
.nav .badge { position: absolute; top: 4px; left: 54%; background: var(--red); color: #fff; border-radius: 999px; font-size: .68rem; padding: 1px 6px; }
.page { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

/* Tasks */
.task { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); border-left: 7px solid var(--tc, var(--house)); cursor: pointer; transition: transform .12s; }
.task:active { transform: scale(.985); }
.ico { width: 54px; height: 54px; flex: none; border-radius: 18px; display: grid; place-items: center; font-size: 1.9rem; background: color-mix(in srgb, var(--tc) 18%, transparent); overflow: hidden; }
.ico.sm { width: 40px; height: 40px; font-size: 1.3rem; border-radius: 12px; }
.ico img { width: 100%; height: 100%; object-fit: cover; }
.mono { font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: color-mix(in srgb, var(--tc) 70%, #111827); }
.ico.sm .mono { font-size: .9rem; }
.task.done { opacity: .7; }
.task.done .ico { filter: grayscale(.5); }
.task.locked { opacity: .6; }
.task .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.task h3 { font-size: 1.05rem; }
[data-style="classic"] .task { border-radius: var(--radius); border-left: 0; box-shadow: var(--shadow); position: relative; overflow: hidden; }
[data-style="classic"] .task::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--tc); opacity: .85; }
[data-style="classic"] .task:active { transform: none; background: var(--soft); }
[data-style="classic"] .ico { border-radius: 10px; width: 44px; height: 44px; background: color-mix(in srgb, var(--tc) 12%, var(--card)); }
[data-style="classic"] .task h3 { font-size: .98rem; font-weight: 600; }

/* Board */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 8px; align-items: end; margin-top: 8px; }
.pod { text-align: center; cursor: pointer; }
.pav { position: relative; display: grid; place-items: center; margin-bottom: 6px; }
.pav .avatar { box-shadow: 0 0 0 3px var(--card), var(--shadow); }
.pod .crown { position: absolute; top: -22px; left: 50%; transform: translateX(-50%) rotate(-8deg); font-size: 1.6rem; animation: bob 2s ease-in-out infinite; z-index: 1; }
[data-style="classic"] .pod .crown { animation: none; transform: translateX(-50%); color: #6f8a6e; font-size: 1.1rem; top: -20px; }
.pod .block { border-radius: 16px 16px 6px 6px; color: #fff; padding: 10px 4px; font-family: var(--display); font-weight: 700; }
.pod.p1 .block { background: linear-gradient(180deg, #fbbf24, #f59e0b); height: 110px; }
.pod.p2 .block { background: linear-gradient(180deg, #a5b4fc, #818cf8); height: 82px; }
.pod.p3 .block { background: linear-gradient(180deg, #fda4af, #fb7185); height: 64px; }
[data-style="classic"] .pod .block { border-radius: 6px 6px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
[data-style="classic"] .pod.p1 .block { background: #2a302e; }
[data-style="classic"] .pod.p2 .block { background: #6f8a6e; }
[data-style="classic"] .pod.p3 .block { background: #a3b6a2; color: #2a302e; }
.pod .name { font-weight: var(--w-bold); font-size: .9rem; }
.rank { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 16px; background: var(--card); cursor: pointer; }
.rank + .rank { margin-top: 6px; }
.rank .n { width: 24px; text-align: center; font-family: var(--display); font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.rank .pts { font-family: var(--display); font-weight: 700; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.rank.me { outline: 2px solid var(--house); }
[data-style="classic"] .rank { border-radius: 0; margin: 0 !important; border-bottom: 1px solid var(--line); }
[data-style="classic"] .rank:first-child { border-radius: var(--radius) var(--radius) 0 0; }
[data-style="classic"] .rank:last-child { border-radius: 0 0 var(--radius) var(--radius); border-bottom: 0; }
[data-style="classic"] .rank.me { outline: 0; background: var(--soft); }
[data-style="classic"] .rank .pts { font-weight: 600; font-size: 1.05rem; }
.notice { border-radius: 16px; padding: 12px 14px; background: color-mix(in srgb, var(--sky) 12%, var(--card)); font-weight: 500; font-size: .9rem; }
[data-style="classic"] .notice { border-radius: var(--radius-sm); background: var(--card); box-shadow: inset 3px 0 0 var(--ink), var(--shadow); }
.prize { display: flex; gap: 12px; align-items: center; }
.prize .e { font-size: 1.8rem; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; background: var(--soft); flex: none; }
[data-style="classic"] .prize .e { font-size: .95rem; font-weight: 600; width: 36px; height: 36px; border-radius: 8px; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); background: var(--card); }

/* Tables */
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }

/* Feed */
.post { background: var(--card); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
[data-style="classic"] .post { border-radius: var(--radius); }
.post .hd { padding: 12px 14px; display: flex; gap: 10px; align-items: center; }
.post .ph { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--soft); cursor: zoom-in; }
.post .ft { padding: 10px 14px 14px; display: grid; gap: 10px; }
.reacts { display: flex; gap: 6px; flex-wrap: wrap; }
.reacts button { border: 2px solid var(--line); background: var(--card); border-radius: var(--pill-r); padding: 3px 9px; cursor: pointer; font-weight: 700; font-size: .85rem; display: inline-flex; gap: 4px; align-items: center; color: var(--muted); min-height: 32px; }
.reacts button.mine { border-color: var(--house); background: color-mix(in srgb, var(--house) 12%, var(--card)); color: var(--ink); }
[data-style="classic"] .reacts button { border-width: 1px; font-weight: 500; }
[data-style="classic"] .reacts button.mine { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.comments { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.cmt { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; }
.cmt-body { overflow-wrap: anywhere; }
.cmt-form { display: flex; gap: 6px; align-items: center; position: relative; }
.cmt-form .in { min-height: 38px; padding: 7px 46px 7px 12px; border-radius: var(--pill-r); font-size: .9rem; }
.cmt-form .cnt { position: absolute; right: 56px; pointer-events: none; }
.cmt-form .icon-btn { width: 38px; height: 38px; border-radius: var(--pill-r); }
.seg { display: inline-flex; background: var(--soft); padding: 4px; border-radius: var(--pill-r); }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: var(--pill-r); font-weight: var(--w-bold); cursor: pointer; }
.seg button.on { background: var(--card); box-shadow: var(--shadow); }
.seg.block3 { display: grid; grid-template-columns: repeat(3, 1fr); }

/* Sheets (modals) */
.scrim { position: fixed; inset: 0; background: rgba(15, 10, 30, .5); z-index: 40; animation: fade .18s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 92dvh; overflow: auto; background: var(--bg); border-radius: 28px 28px 0 0; padding: 10px 0 calc(24px + env(safe-area-inset-bottom)); animation: up .24s cubic-bezier(.2,.9,.3,1.1); }
[data-style="classic"] .sheet { border-radius: 16px 16px 0 0; animation: up .2s ease-out; }
@media (min-width: 760px) { .sheet { left: 50%; right: auto; width: 680px; transform: translateX(-50%); bottom: 4dvh; border-radius: 28px; animation: fade .2s; } [data-style="classic"] .sheet { border-radius: 16px; } }
.sheet .grab { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 4px auto 12px; }
@keyframes up { from { transform: translateY(40%); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sheet-hero { border-radius: 22px; padding: 18px; color: #fff; background: linear-gradient(135deg, var(--tc, var(--house)), color-mix(in srgb, var(--tc, var(--house)) 45%, #1e1b2e)); }
.sheet-hero .big { font-size: 3rem; }
[data-style="classic"] .sheet-hero { border-radius: var(--radius); background: #2a302e; box-shadow: inset 4px 0 0 var(--tc); }
[data-style="classic"] .sheet-hero .pill.pts { background: rgba(255,255,255,.1); color: #fff; box-shadow: none; }
.media-box { border-radius: 18px; overflow: hidden; background: #000; }
.media-box video, .media-box img { width: 100%; max-height: 60dvh; object-fit: contain; }
.proof-preview { border-radius: 18px; overflow: hidden; position: relative; background: var(--soft); aspect-ratio: 4/3; display: grid; place-items: center; }
.proof-preview img { width: 100%; height: 100%; object-fit: cover; }
.camera-btn { border: 3px dashed var(--line); border-radius: 22px; padding: 30px; text-align: center; cursor: pointer; display: grid; gap: 6px; background: var(--card); justify-items: center; }
.camera-btn .e { font-size: 3rem; }
[data-style="classic"] .camera-btn { border: 1px dashed #9ca3af; border-radius: var(--radius); }
[data-style="classic"] .camera-btn .e { font-size: 1.8rem; color: var(--muted); }

#toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 16px; font-weight: 700; opacity: 0; pointer-events: none; transition: all .25s; z-index: 60; max-width: calc(100% - 32px); text-align: center; }
[data-style="classic"] #toast { border-radius: 8px; font-weight: 500; font-size: .92rem; }
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.confetti { position: fixed; z-index: 70; pointer-events: none; font-size: 1.6rem; top: 50%; left: 50%; animation: burst 1.3s ease-out forwards; }
@keyframes burst { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.code-big { font-family: var(--display); font-size: 2.2rem; letter-spacing: .2em; font-weight: 700; text-align: center; padding: 8px; border-radius: 16px; background: var(--soft); }
[data-style="classic"] .code-big { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 600; font-size: 1.8rem; border-radius: var(--radius-sm); }
#qr { display: grid; place-items: center; padding: 12px; background: #fff; border-radius: 16px; width: fit-content; margin: 0 auto; }
details.acc { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
details.acc + details.acc { margin-top: 10px; }
details.acc > summary { list-style: none; padding: 16px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
details.acc > summary .sum { display: inline-flex; gap: 10px; align-items: center; }
[data-style="classic"] details.acc > summary { font-size: .98rem; }
[data-style="classic"] details.acc > summary .i { color: var(--muted); }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after { content: "+"; color: var(--muted); font-size: 1.2rem; }
details.acc[open] > summary::after { content: "−"; }
details.acc > .body { padding: 0 16px 16px; display: grid; gap: 12px; }
details.acc details.acc { box-shadow: none; border: 1px solid var(--line); }
.admin-task { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: var(--radius-sm); background: var(--soft); }
[data-style="classic"] .admin-task { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.ledger-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ledger-row .amt { font-family: var(--display); font-weight: 700; font-size: 1.1rem; min-width: 56px; text-align: right; font-variant-numeric: tabular-nums; }
.ledger-row .amt.neg { color: var(--red); }
.ledger-row .amt.pos { color: var(--mint); }
[data-style="classic"] .ledger-row .amt.pos { color: #047857; }
.ledger-row img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; cursor: zoom-in; }
.lg-ico { width: 46px; height: 46px; display: grid; place-items: center; font-size: 1.4rem; color: var(--muted); }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.lightbox img { max-height: 92dvh; border-radius: 12px; }

/* ---------- Plans & billing ---------- */
.tag-mini.pro { background: linear-gradient(135deg, #7c3aed, #ec4899); color: #fff; }
[data-style="classic"] .tag-mini.pro { background: #a3b6a2; color: #2a302e; }
.locked-row { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px dashed var(--line); color: var(--muted); cursor: pointer; font-size: .9rem; }
.locked-row:hover { background: var(--soft); }
.check.locked { color: var(--muted); }
.feat-list { display: grid; gap: 10px; }
.feat { display: flex; gap: 12px; align-items: flex-start; }
.feat .fi { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--soft); flex: none; }
[data-style="classic"] .feat .fi { background: #eef3ed; color: #6f8a6e; }
.price-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.price-opt { border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 12px; display: grid; gap: 2px; cursor: pointer; text-align: center; background: var(--card); }
.price-opt.on { border-color: var(--house); box-shadow: 0 0 0 3px color-mix(in srgb, var(--house) 18%, transparent); }
[data-style="classic"] .price-opt { border-width: 1px; }
[data-style="classic"] .price-opt.on { border-color: #2a302e; box-shadow: inset 0 0 0 1px #2a302e; }
.price-opt .pr { font-family: var(--display); font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.plan-badge { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; padding: 4px 12px; border-radius: var(--pill-r); background: linear-gradient(135deg, #7c3aed, #ec4899); color: #fff; width: fit-content; }
.plan-badge.big { font-size: 1.1rem; padding: 6px 16px; margin: 0 auto; }
[data-style="classic"] .plan-badge { background: #a3b6a2; color: #2a302e; }
