:root {
  --navy: #063A52;
  --navy-2: #0A5878;
  --orange: #00A3C4;
  --orange-d: #00799A;
  --bg: #F7F6F2;
  --card: #FFFFFF;
  --line: #E5E7EB;
  --text: var(--navy);
  --muted: #5A6474;
  --ok: #16A34A;
  --ok-bg: #DCFCE7;
  --warn: #B45309;
  --warn-bg: #FEF3C7;
  --bad: #DC2626;
  --bad-bg: #FEE2E2;
  --none-bg: #EEF0F4;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(var(--navy-rgb), .06), 0 4px 16px rgba(var(--navy-rgb), .05);
  --head: "Montserrat", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sidebar: 248px;
  --sec: var(--orange);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
p { margin: 0 0 .6em; }
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.ic { flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.grow { flex: 1; }
.link { color: var(--orange-d); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ------------------------------------------------------------ layout */
.layout { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
  background: var(--navy); color: #fff;
  display: flex; flex-direction: column; padding: 20px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 800; line-height: 1.05; }
.brand img { width: 44px; height: 44px; }
.sidebar .brand { padding: 0 8px 22px; font-size: 17px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 10px; color: rgba(255, 255, 255, .78); font-weight: 500;
}
.sidebar nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar nav a.on { background: var(--orange); color: var(--navy); font-weight: 700; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; padding: 0 8px; }
.who { display: flex; flex-direction: column; font-size: 13px; }
.who span { color: rgba(255, 255, 255, .6); }

.lang-switch { display: inline-flex; background: rgba(127, 127, 127, .15); border-radius: 999px; padding: 3px; gap: 2px; }
.lang-switch button { border: 0; background: none; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; color: inherit; opacity: .75; }
.lang-switch button.on { background: var(--orange); color: var(--navy); opacity: 1; }

.topbar, .tabbar { display: none; }
.view { margin-left: var(--sidebar); padding: 32px 40px 64px; max-width: calc(1120px + var(--sidebar)); }

@media (max-width: 860px) {
  .sidebar { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 20; padding: 10px 16px;
    background: var(--navy); color: #fff;
  }
  .topbar .brand img { width: 34px; height: 34px; }
  .topbar .brand span { font-size: 15px; }
  .view { margin: 0; padding: 18px 16px 100px; }
  .tabbar {
    display: flex; position: fixed; inset: auto 0 0 0; z-index: 20;
    background: var(--card); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; color: var(--muted); padding: 4px 0; min-width: 0; }
  .tabbar a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .tabbar a.on { color: var(--orange-d); font-weight: 700; }
  h1 { font-size: 24px; }
}

/* ------------------------------------------------------------ primitives */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.block { margin-top: 28px; }
.block-title { display: flex; align-items: center; gap: 8px; font-size: 17px; margin-bottom: 12px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-d); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-between.wrap { flex-wrap: wrap; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.row-gap { display: flex; align-items: center; gap: 10px; }
.back { display: inline-block; margin-bottom: 14px; color: var(--muted); font-weight: 500; }
.back:hover { color: var(--text); }
.empty { color: var(--muted); text-align: center; padding: 18px 8px; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 40px 0; justify-content: center; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--orange); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: #CBD0D8; background: #FAFAFA; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-primary { background: var(--orange); border-color: var(--orange); color: var(--navy); }
.btn-primary:hover { background: var(--orange-strong); border-color: var(--orange-strong); }
.btn-success { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-success:hover { background: #15803D; border-color: #15803D; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger-ghost { color: var(--bad); border-color: #F5C2C2; }
.btn-danger-ghost:hover { background: var(--bad-bg); border-color: var(--bad); }
.btn-ghost { background: none; border-color: transparent; color: var(--muted); }
.btn-lg { padding: 12px 20px; font-size: 16px; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn.recording { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, .12); } }
.icon-btn { border: 0; background: none; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--muted); display: inline-flex; }
.icon-btn:hover { background: var(--none-bg); color: var(--text); }
.icon-btn.danger:hover { background: var(--bad-bg); color: var(--bad); }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip-none { background: var(--none-bg); color: var(--muted); }
.chip-pending { background: var(--warn-bg); color: var(--warn); }
.chip-approved { background: var(--ok-bg); color: var(--ok); }
.chip-rejected { background: var(--bad-bg); color: var(--bad); }
.sec-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: var(--sec);
  background: color-mix(in srgb, var(--sec) 13%, white);
}
.meta { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13.5px; }
.meta-late { color: var(--bad); }
.types { display: inline-flex; gap: 6px; color: var(--muted); }

/* ------------------------------------------------------------ forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.form.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form .span2, .form fieldset { grid-column: 1 / -1; }
.form label, .file-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
input[type=text], input:not([type]), input[type=password], input[type=number], input[type=date], input[type=datetime-local],
input[type=url], input[type=search], input[type=tel], input[type=email], select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid #D5D9E0; background: #fff;
  font-weight: 400; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .18); }
textarea { resize: vertical; min-height: 90px; }
input[type=color] { width: 64px; height: 40px; border: 1px solid #D5D9E0; border-radius: 10px; padding: 2px; background: #fff; }
input[type=file] { font-size: 13px; font-weight: 400; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.input-row { display: flex; gap: 8px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill { flex-direction: row !important; align-items: center; gap: 6px !important; padding: 8px 12px; border: 1px solid #D5D9E0; border-radius: 999px; cursor: pointer; font-weight: 500 !important; }
.check-pill:has(input:checked) { border-color: var(--orange); background: var(--accent-soft); }
.switch { flex-direction: row !important; align-items: center; gap: 10px !important; cursor: pointer; align-self: end; padding-bottom: 8px; }
.switch input { display: none; }
.slider { width: 42px; height: 24px; border-radius: 999px; background: #D5D9E0; position: relative; transition: background .15s; flex: none; }
.slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--ok); }
.switch input:checked + .slider::after { transform: translateX(18px); }
.current-file { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 400 !important; font-size: 13px !important; color: var(--muted); }
.current-file a { color: var(--text); text-decoration: underline; }
.select-sm { width: auto; padding: 7px 10px; font-size: 14px; }
.notice { display: flex; gap: 8px; align-items: flex-start; background: var(--accent-soft); color: var(--orange-d); padding: 10px 12px; border-radius: 10px; font-size: 14px; }

.progress { position: relative; height: 26px; border-radius: 8px; background: var(--none-bg); overflow: hidden; }
.progress .bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--orange); transition: width .2s; }
.progress span { position: relative; display: block; text-align: center; font-size: 13px; font-weight: 600; line-height: 26px; }

@media (max-width: 640px) { .form.grid2 { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 50% -10%, var(--navy-2), var(--navy)); }
.auth-card { width: 100%; max-width: 400px; text-align: center; padding: 28px 24px 22px; }
.auth-card .form { text-align: left; margin: 14px 0 12px; }
.auth-card h2 { margin-top: 18px; font-size: 18px; }
.auth-top { display: flex; justify-content: flex-end; color: var(--text); }
.auth-logo { width: 116px; height: 116px; margin: 0 auto 10px; }

/* ------------------------------------------------------------ home */
.hero {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: var(--navy); color: #fff; border-radius: 20px; padding: 26px 28px;
  background-image: radial-gradient(500px 220px at 100% 0%, rgba(var(--accent-rgb), .28), transparent);
}
.hero h1 { margin: 4px 0 0; }
.hero .eyebrow { color: var(--orange); }
.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; min-width: 92px; padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, .08); }
.stat b { font-family: var(--head); font-size: 26px; line-height: 1.1; }
.stat span { font-size: 12.5px; opacity: .8; }
.stats.compact .stat { background: var(--none-bg); }
.stats.tiles { display: grid; grid-template-columns: repeat(3, 1fr); }
.stats.tiles .stat { background: var(--card); padding: 18px; }
.stats.tiles .stat b { font-size: 34px; }
.stats.tiles .stat.accent b { color: var(--orange-d); }
@media (max-width: 640px) {
  .hero { padding: 20px; }
  .stats { width: 100%; }
  .stat { flex: 1; min-width: 0; padding: 10px 12px; }
  .stat b { font-size: 22px; }
  .stats.tiles { grid-template-columns: 1fr; }
}

.week-hero { display: flex; gap: 20px; align-items: stretch; transition: transform .15s, box-shadow .15s; border-left: 0; }
.week-hero:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(var(--navy-rgb), .10); }
.week-cover { width: 120px; flex: none; border-radius: 12px; overflow: hidden; background: color-mix(in srgb, var(--sec) 14%, white); aspect-ratio: 2 / 3; }
.week-cover img { width: 100%; height: 100%; object-fit: cover; }
.week-cover.lg { width: 200px; }
.cover-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--sec); }
.week-info { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.week-info h3 { font-size: 22px; margin: 4px 0 0; }
.author { color: var(--muted); }
.week-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; }
@media (max-width: 560px) {
  .week-cover { width: 92px; }
  .week-info h3 { font-size: 18px; }
}

/* ------------------------------------------------------------ cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.task-card { display: flex; flex-direction: column; gap: 10px; transition: transform .15s, box-shadow .15s; position: relative; overflow: hidden; }
.task-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(var(--navy-rgb), .10); }
.task-card h4 { margin: 0; font-size: 16.5px; }
.task-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }

.sections-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.section-card { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; transition: transform .15s, box-shadow .15s; }
.section-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(var(--navy-rgb), .10); }
.section-card p { color: var(--muted); font-size: 14px; flex: 1; }
.section-card.is-soon { opacity: .72; }
.section-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--sec); color: #fff; flex: none; }
.section-icon.big { width: 64px; height: 64px; border-radius: 18px; }
.list-row .section-icon { width: 40px; height: 40px; border-radius: 12px; }
.section-head { display: flex; gap: 18px; align-items: center; padding: 22px; border-radius: 20px; background: color-mix(in srgb, var(--sec) 12%, white); margin-bottom: 8px; }
.section-head h1 { margin: 0 0 4px; }
.section-head p { margin: 0; color: var(--muted); }
.soon { text-align: center; color: var(--muted); padding: 40px 20px; display: grid; justify-items: center; gap: 6px; margin-top: 16px; }

.list { padding: 6px 0; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: #FAFAF8; }
.thumb { width: 40px; height: 56px; border-radius: 6px; object-fit: cover; flex: none; }
.thumb.ph { display: grid; place-items: center; background: color-mix(in srgb, var(--sec) 14%, white); color: var(--sec); }

.event-row { display: flex; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.event-row:last-child { border-bottom: 0; }
.event-date { width: 54px; flex: none; text-align: center; border-radius: 12px; background: color-mix(in srgb, var(--sec) 13%, white); color: var(--sec); padding: 6px 0; display: flex; flex-direction: column; }
.event-date b { font-family: var(--head); font-size: 22px; line-height: 1.1; }
.event-date span { font-size: 12px; font-weight: 600; text-transform: uppercase; }
.event-body h4 { margin: 2px 0 0; }
.event-body p { margin: 8px 0 0; font-size: 14px; }
.faded { opacity: .7; }

/* ------------------------------------------------------------ week + task */
.week-top { display: flex; gap: 24px; }
.week-top h1 { margin: 10px 0 2px; }
.facts { display: grid; gap: 10px; margin: 16px 0 0; }
.facts div { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.facts dt { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; min-width: 110px; }
.facts dd { margin: 0; font-weight: 600; }
@media (max-width: 640px) {
  .week-top { flex-direction: column; }
  .week-cover.lg { width: 140px; }
}
.prose { font-size: 15.5px; line-height: 1.65; }
.prose a, .answer-text a { color: var(--orange-d); text-decoration: underline; word-break: break-all; }
.block.card .block-title { margin-bottom: 8px; }

.media-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.media { border-radius: 12px; overflow: hidden; background: #000; }
.media video { width: 100%; max-height: 520px; }
.media-audio { background: var(--none-bg); padding: 8px; grid-column: span 1; }
.media-audio audio { width: 100%; }
.media-img { background: var(--none-bg); }
.media-img img { width: 100%; height: 180px; object-fit: cover; }
.media-item { display: flex; flex-direction: column; gap: 6px; }
.file-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--none-bg); font-size: 14px; word-break: break-all; }
.file-link:hover { background: #E3E6EC; }
.embed { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.block > .media video { max-height: 70vh; }

.task-page h1 { margin: 12px 0 8px; }
.answer-types { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 14px; font-size: 14px; }
.answer-form { display: flex; flex-direction: column; gap: 14px; }
.pickers { display: flex; flex-wrap: wrap; gap: 10px; }
.pickers label.btn { cursor: pointer; }
.new-files, .existing { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.existing .label { grid-column: 1 / -1; margin: 0; font-weight: 600; font-size: 14px; }
.existing-file { position: relative; }
.existing-file .icon-btn { position: absolute; top: 6px; right: 6px; background: rgba(255, 255, 255, .92); box-shadow: var(--shadow); }
.review-box { margin-top: 16px; }
.review-approved { background: #F0FDF4; }
.review-rejected { background: #FEF2F2; }
.review-pending { background: #FFFBEB; }
.score { color: var(--ok); font-family: var(--head); }
.answer-text { background: #FAFAF8; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 12px; white-space: normal; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { border: 1px solid var(--line); background: var(--card); padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.tab.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.tab .count { background: rgba(127, 127, 127, .18); border-radius: 999px; padding: 0 7px; font-size: 12px; }

/* ------------------------------------------------------------ rating */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; align-items: end; }
.podium-item { background: var(--card); box-shadow: var(--shadow); border-radius: var(--radius); padding: 16px 10px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; min-width: 0; }
.podium-item b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.podium-item.p1 { order: 2; padding-top: 26px; background: linear-gradient(180deg, var(--accent-soft), #fff); }
.podium-item.p2 { order: 1; }
.podium-item.p3 { order: 3; }
.medal { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-family: var(--head); font-weight: 800; color: #fff; margin-bottom: 6px; }
.p1 .medal { background: #E8A317; width: 46px; height: 46px; font-size: 20px; }
.p2 .medal { background: #9CA3AF; }
.p3 .medal { background: #B87333; }
.pts { font-family: var(--head); font-weight: 800; font-size: 20px; color: var(--orange-d); }
.rating-row { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.rating-row:last-child { border-bottom: 0; }
.rating-row .rank { width: 28px; text-align: center; font-weight: 700; color: var(--muted); }
.is-me { background: var(--accent-soft); }

/* ------------------------------------------------------------ profile */
.profile-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.profile-head h1 { margin: 0; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--navy); color: var(--orange); display: grid; place-items: center; font-family: var(--head); font-weight: 800; font-size: 26px; flex: none; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.badge { background: var(--card); box-shadow: var(--shadow); border-radius: var(--radius); padding: 16px 12px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; filter: grayscale(1); opacity: .45; }
.badge.got { filter: none; opacity: 1; }
.badge-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--orange-d); margin-bottom: 4px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two-col .block { margin-top: 28px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg-btn { border: 0; background: var(--card); padding: 10px 18px; font-weight: 600; cursor: pointer; }
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn.on { background: var(--orange); color: var(--navy); }
.logout-btn { margin-top: 24px; }

/* ------------------------------------------------------------ admin */
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px; scrollbar-width: none; }
.admin-tabs .tab { white-space: nowrap; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input[type=search] { flex: 1; min-width: 180px; }
.quick { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.review-layout { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.review-layout .form h3 { margin-bottom: 0; }
@media (max-width: 900px) { .review-layout { grid-template-columns: 1fr; } }
.cred-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 14px 0; max-height: 50vh; overflow: auto; }
.cred { border: 1px dashed #C7CCD4; border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.6; }

/* ------------------------------------------------------------ modal + toast */
.modal-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(var(--navy-rgb), .45); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--card); border-radius: 18px; width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modal-wide { max-width: 720px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 0; }
.modal-head h3 { margin: 0; }
.modal-body { padding: 16px 20px 20px; }
@keyframes fade { from { opacity: 0; } }
#toasts { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: 24px; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); transition: opacity .4s, transform .4s; }
.toast-err { background: var(--bad); }
.toast.out { opacity: 0; transform: translateY(8px); }
@media (max-width: 860px) { #toasts { bottom: 90px; } }

@media print {
  .sidebar, .topbar, .tabbar { display: none; }
  .view { margin: 0; }
}

/* ------------------------------------------------------------ quiz, reader, invites, team */
.quiz { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 8px; }
.quiz-q { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.quiz-q legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; padding: 0 4px; }
.quiz-ok { border-color: #86EFAC; background: #F0FDF4; }
.quiz-bad { border-color: #FCA5A5; background: #FEF2F2; }
.quiz-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; flex: none; }
.quiz-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-weight: 400; }
.quiz-opt:hover { background: var(--none-bg); }
.quiz-opt:has(input:checked) { background: var(--accent-soft); }
.quiz-opt input { width: 18px; height: 18px; accent-color: var(--orange); flex: none; }
.quiz-editor { border: 1px dashed #CBD0D8; border-radius: 14px; padding: 14px; }
.quiz-editor legend { display: flex; align-items: center; gap: 6px; padding: 0 6px; }
.qe { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.qe p { margin: 0; }
.qe-opt { display: flex; align-items: center; gap: 8px; }
.qe-opt input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--ok); flex: none; }
.read-btn { margin-top: 16px; align-self: flex-start; }

.reader { display: flex; flex-direction: column; gap: 12px; }
.reader-bar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 6px 0; }
.reader-bar .icon-btn { font-size: 20px; padding: 4px 10px; }
.reader-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-ctrl { display: flex; gap: 4px; }
.reader-ctrl .icon-btn { font-size: 20px; width: 36px; justify-content: center; border: 1px solid var(--line); background: var(--card); }
.reader-stage { display: flex; justify-content: center; overflow: auto; min-height: 60vh; }
.reader-stage canvas { background: #fff; box-shadow: var(--shadow); border-radius: 4px; max-width: none; }
.reader-nav { display: flex; align-items: center; justify-content: center; gap: 12px; position: sticky; bottom: 0; padding: 10px 0; background: var(--bg); }
.reader-page { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.reader-page input { width: 64px; padding: 6px 8px; text-align: center; }
@media (max-width: 860px) {
  .reader-nav { bottom: 70px; }
  .reader-stage { margin: 0 -16px; }
}

.invite-box { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.invite-box b { display: inline-flex; align-items: center; gap: 6px; color: var(--orange-d); }
.invite-box p { margin: 0; font-size: 14px; }
.invite-card { border: 2px solid var(--orange); }
.news .list-row { padding: 10px 0; }
.att-list { display: flex; flex-direction: column; max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; }
.att-row { display: flex !important; flex-direction: row !important; align-items: center; gap: 12px !important; padding: 9px 14px; border-bottom: 1px solid var(--line); cursor: pointer; font-weight: 400 !important; }
.att-row:last-child { border-bottom: 0; }
.att-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--orange); flex: none; }
.att-row .rank { width: 24px; color: var(--muted); font-weight: 700; text-align: center; }
.att-row.is-dim { opacity: .55; }
.pts-input { width: 72px !important; padding: 6px 8px !important; }
.perm-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

/* ============================================================ talks */
.lead { font-size: 16px; max-width: 720px; }
.chip-live { background: #FEE2E2; color: #DC2626; animation: pulse 1.6s ease-in-out infinite; }
.talk-card { display: flex; flex-direction: column; gap: 8px; transition: transform .15s, box-shadow .15s; }
.talk-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(var(--navy-rgb), .10); }
.talk-card h4 { margin: 0; font-size: 17px; }
.talk-card .sec-chip { align-self: flex-start; }
.talk-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.talk-type { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--sec); text-transform: uppercase; letter-spacing: .04em; }
.talk-head { display: flex; gap: 18px; align-items: center; padding: 22px; border-radius: 20px; background: color-mix(in srgb, var(--sec) 12%, white); margin-bottom: 14px; flex-wrap: wrap; }
.talk-head h1 { margin: 6px 0 4px; }
.talk-timer { display: flex; flex-direction: column; align-items: flex-end; font-family: var(--head); }
.talk-timer b { font-size: 26px; }
.talk-desc { margin-bottom: 14px; }
.talk-desc summary { cursor: pointer; font-weight: 600; }
.room-picker { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.group-strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; font-size: 14px; }
.room-card { padding: 0; overflow: hidden; }

/* ============================================================ chat */
.chat { display: flex; flex-direction: column; height: min(72vh, 760px); min-height: 460px; }
.chat-live { height: 100%; min-height: 520px; }
.debate-panel:empty { display: none; }
.debate-panel { padding: 12px 16px; border-bottom: 1px solid var(--line); background: #FAFAF8; }
.chat-tabs { display: flex; gap: 4px; padding: 8px 10px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.ctab { border: 0; background: none; padding: 9px 12px; font-weight: 600; font-size: 14px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.ctab.on { color: var(--text); border-bottom-color: var(--orange); }
.ctab .dot { background: var(--bad); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 6px; }
.chat-body { flex: 1; overflow: auto; padding: 12px 14px; display: flex; flex-direction: column; }
.chat-hint { margin: 0 0 10px; }
.msgs { display: flex; flex-direction: column; gap: 8px; overflow: auto; flex: 1; }
.msg { max-width: 78%; align-self: flex-start; background: var(--none-bg); border-radius: 14px 14px 14px 4px; padding: 8px 12px; }
.msg.mine { align-self: flex-end; background: var(--accent-soft); border-radius: 14px 14px 4px 14px; }
.msg.side-a { box-shadow: inset 3px 0 0 #3B82F6; }
.msg.side-b { box-shadow: inset 3px 0 0 #EF5B5B; }
.msg-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; }
.msg-badge { background: var(--navy); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.msg-time { color: var(--muted); font-size: 11.5px; margin-left: auto; }
.msg-del { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 2px; opacity: 0; }
.msg:hover .msg-del, .tmsg:hover .msg-del { opacity: 1; }
.msg-text { white-space: pre-wrap; word-wrap: break-word; font-size: 15px; margin-top: 2px; }
.msg-sys { align-self: center; font-size: 12.5px; color: var(--muted); background: #F1F2F5; padding: 4px 12px; border-radius: 999px; text-align: center; max-width: 92%; }
.idea-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.tag-like { background: #DCFCE7; color: #15803D; }
.tag-dislike { background: #FEE2E2; color: #B91C1C; }
.tag-idea { background: #FEF3C7; color: #B45309; }
.tag-question { background: #DBEAFE; color: #1D4ED8; }
.chat-input { border-top: 1px solid var(--line); padding: 10px 12px; }
.chat-form { display: flex; gap: 8px; align-items: center; }
.chat-form input { flex: 1; }
.send-btn { padding: 10px 14px; }
.chat-closed { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 6px; justify-content: center; padding: 4px; }
.tag-pick { display: flex; gap: 4px; }
.tag-btn { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px; cursor: pointer; display: inline-flex; color: var(--muted); }
.tag-btn.on.tag-like { background: #DCFCE7; color: #15803D; border-color: #86EFAC; }
.tag-btn.on.tag-dislike { background: #FEE2E2; color: #B91C1C; border-color: #FCA5A5; }
.tag-btn.on.tag-idea { background: #FEF3C7; color: #B45309; border-color: #FCD34D; }
.tag-btn.on.tag-question { background: #DBEAFE; color: #1D4ED8; border-color: #93C5FD; }

.idea-board { display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: 10px; overflow-x: auto; }
.idea-col { background: #FAFAF8; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 170px; }
.idea-col h4 { display: flex; align-items: center; gap: 6px; font-size: 14px; margin: 0 0 2px; }
.col-like h4 { color: #15803D; } .col-dislike h4 { color: #B91C1C; } .col-idea h4 { color: #B45309; } .col-question h4 { color: #1D4ED8; }
.idea { background: #fff; border-radius: 10px; padding: 10px; box-shadow: var(--shadow); }
.idea p { margin: 0 0 6px; font-size: 14px; }
.idea-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.like-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; color: var(--muted); }
.like-btn.on { background: #FFE4E6; border-color: #FDA4AF; color: #E11D48; }
@media (max-width: 760px) { .idea-board { grid-template-columns: repeat(4, 220px); } }

.qlist { display: flex; flex-direction: column; gap: 8px; }
.qitem { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.qitem p { margin: 0; }
.qitem.answered { opacity: .6; }

.poll-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.poll { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.poll.open { border-color: var(--orange); background: var(--accent-soft); }
.poll-opts { display: flex; flex-direction: column; gap: 6px; }
.poll-opt { text-align: left; border: 1px solid #D5D9E0; background: #fff; border-radius: 10px; padding: 10px 12px; font-weight: 600; cursor: pointer; }
.poll-opt:hover:not(:disabled) { border-color: var(--orange); }
.poll-opt.on { background: var(--orange); border-color: var(--orange); color: var(--navy); }
.poll-opt:disabled:not(.on) { opacity: .6; cursor: default; }
.poll-res { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--none-bg); overflow: hidden; font-size: 14px; }
.poll-res .bar { position: absolute; inset: 0 auto 0 0; background: #E2E8F0; }
.poll-res.win .bar { background: #FDE2C2; }
.poll-res span:not(.bar), .poll-res b { position: relative; }
.poll-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.poll-form #opts { display: flex; flex-direction: column; gap: 6px; }

/* ---- debate */
.debate h4 { display: flex; align-items: center; gap: 6px; margin: 0; }
.stages { display: flex; gap: 4px; list-style: none; padding: 0; margin: 10px 0 6px; overflow-x: auto; }
.stages li { flex: 1; min-width: 74px; text-align: center; font-size: 11.5px; font-weight: 600; padding: 6px 4px; border-radius: 8px; background: var(--none-bg); color: var(--muted); white-space: nowrap; }
.stages li.done { background: #DCFCE7; color: #15803D; }
.stages li.now { background: var(--navy); color: #fff; }
.stage-hint { font-size: 13.5px; display: flex; gap: 6px; align-items: flex-start; margin: 4px 0 8px; }
.winner { background: linear-gradient(90deg, var(--accent-soft), #fff); border: 1px solid #FCD34D; border-radius: 12px; padding: 10px 14px; display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.debate details summary { cursor: pointer; font-size: 14px; font-weight: 600; padding: 4px 0; }
.sides { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 8px; }
.side { border-radius: 12px; padding: 10px; background: #fff; border: 1px solid var(--line); }
.side h5 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.side-a h5 { color: #2563EB; } .side-b h5 { color: #DC2626; } .side-shared h5 { color: var(--muted); }
.role-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; font-size: 13px; }
.role-name { width: 100%; color: var(--muted); font-size: 12px; }
.slot { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 13px; }
.slot.filled { background: var(--none-bg); font-weight: 600; }
.slot.filled.me { background: var(--accent-soft); }
.slot.free { border: 1px dashed var(--orange); background: #fff; color: var(--orange-d); cursor: pointer; font-weight: 600; }
.slot.empty { color: #A0A7B4; }
.slot .x { border: 0; background: none; cursor: pointer; font-size: 15px; line-height: 1; color: var(--muted); }
@media (max-width: 760px) { .sides { grid-template-columns: 1fr; } }

/* ============================================================ live */
.live-layout { display: grid; grid-template-columns: 1fr 380px; gap: 16px; align-items: start; }
.live-main { display: flex; flex-direction: column; gap: 10px; }
.live-side { padding: 0; overflow: hidden; height: 640px; }
@media (max-width: 1000px) { .live-layout { grid-template-columns: 1fr; } .live-side { height: 560px; } }
.live-stage { position: relative; aspect-ratio: 16 / 9; background: radial-gradient(circle at 50% 40%, var(--navy-2), #0B1328); border-radius: 18px; overflow: hidden; }
.live-stage video { width: 100%; height: 100%; object-fit: cover; }
.live-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; text-align: center; padding: 20px; }
.live-overlay[hidden] { display: none; }
.live-overlay p { margin: 0; opacity: .85; max-width: 420px; }
.live-overlay .countdown { font-family: var(--head); font-size: 34px; }
.live-badge { position: absolute; top: 12px; left: 12px; background: #DC2626; color: #fff; font-weight: 800; font-size: 12px; padding: 4px 10px; border-radius: 999px; letter-spacing: .05em; }
.live-count { position: absolute; top: 12px; right: 12px; background: rgba(0, 0, 0, .5); color: #fff; font-size: 12.5px; padding: 4px 10px; border-radius: 999px; display: inline-flex; gap: 4px; align-items: center; }
.live-controls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.live-controls:empty { display: none; }
.hands { padding: 14px; }
.hands h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; }
.hand-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; }
.hand-row.raised { background: var(--accent-soft); }
.hand-row.speaking { background: #DCFCE7; }

/* ============================================================ support */
.thread { display: flex; flex-direction: column; gap: 10px; max-height: 56vh; overflow: auto; margin: 14px 0; padding: 4px; }
.tmsg { max-width: 82%; align-self: flex-start; background: var(--none-bg); border-radius: 14px; padding: 10px 14px; }
.tmsg.mine { align-self: flex-end; background: var(--accent-soft); }
.tmsg.support:not(.mine) { background: #EEF4FF; }

/* ============================================================ admin additions */
.alerts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.alert-card { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--accent-soft); color: var(--orange-d); font-weight: 600; flex: 1; min-width: 240px; }
.alert-card span { flex: 1; }
.preset-hint { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #F3F0FF; color: #5B21B6; padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.preset-hint:empty { display: none; }
.preset-hint span { flex: 1; }
.split-form { background: #FAFAF8; border-radius: 12px; padding: 12px; margin: 8px 0 14px; }
.groups-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.group-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.group-box h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; }
.member-row { display: flex; align-items: center; gap: 6px; font-size: 14px; padding: 3px 0; }
.member-row .move { width: auto; padding: 2px 6px; font-size: 12px; }
.app-list { display: flex; flex-direction: column; gap: 12px; }
.app-card h3 { margin: 0; }
.app-facts { display: grid; gap: 8px; margin: 12px 0 0; }
.app-facts div { display: grid; grid-template-columns: 170px 1fr; gap: 10px; }
.app-facts dt { color: var(--muted); font-size: 14px; }
.app-facts dd { margin: 0; }
@media (max-width: 640px) { .app-facts div { grid-template-columns: 1fr; gap: 2px; } }
.auth-links { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; font-size: 14px; }
.profile-actions { margin-top: 24px; }
.profile-actions .logout-btn { margin-top: 0; }

/* ============================================================ landing */
.landing { background: #fff; min-height: 100vh; }
.land-top { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px clamp(16px, 4vw, 48px); background: rgba(var(--navy-rgb), .92); backdrop-filter: blur(10px); color: #fff; }
.land-top .brand img { width: 38px; height: 38px; }
.land-login { background: var(--orange); border-color: var(--orange); color: var(--navy); }
.land-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding: clamp(40px, 8vw, 96px) clamp(16px, 6vw, 80px); background: radial-gradient(900px 500px at 85% 20%, rgba(var(--accent-rgb), .28), transparent), radial-gradient(700px 500px at 0% 100%, rgba(59, 130, 246, .25), transparent), var(--navy); color: #fff; }
.land-hero h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.08; margin: 10px 0 16px; }
.land-hero .lead { color: rgba(255, 255, 255, .82); font-size: clamp(16px, 2vw, 19px); margin-bottom: 26px; }
.land-hero .eyebrow { color: var(--orange); }
.btn-glass { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); color: #fff; }
.btn-glass:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .4); }
.land-stats { display: flex; gap: 28px; margin-top: 34px; flex-wrap: wrap; }
.land-stats div { display: flex; flex-direction: column; }
.land-stats b { font-family: var(--head); font-size: 34px; color: var(--orange); }
.land-stats span { font-size: 13px; opacity: .8; }
.land-hero-art { display: grid; place-items: center; }
.land-hero-art img { width: min(420px, 80%); filter: drop-shadow(0 20px 60px rgba(var(--accent-rgb), .35)); animation: spin-slow 60s linear infinite; }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .land-hero-art img { animation: none; } }
@media (max-width: 860px) { .land-hero { grid-template-columns: 1fr; text-align: left; } .land-hero-art { order: -1; } .land-hero-art img { width: 200px; } }
.land-section { padding: clamp(40px, 7vw, 80px) clamp(16px, 6vw, 80px); }
.land-alt { background: var(--bg); }
.land-h2 { font-size: clamp(26px, 3.5vw, 38px); text-align: center; margin-bottom: 8px; }
.land-sub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 32px; }
.mission-card { display: flex; gap: 20px; align-items: flex-start; max-width: 900px; margin: 0 auto; padding: 30px; border-radius: 24px; background: linear-gradient(135deg, var(--accent-soft), #F3F0FF); }
.mission-card h2 { margin-bottom: 8px; }
.mission-card p { font-size: 17px; margin: 0; }
.mission-ic { width: 60px; height: 60px; border-radius: 18px; background: var(--orange); color: var(--navy); display: grid; place-items: center; flex: none; }
.land-dirs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 1100px; margin: 0 auto; }
.land-dir { border-radius: 20px; padding: 22px; background: color-mix(in srgb, var(--sec) 10%, white); border: 1px solid color-mix(in srgb, var(--sec) 25%, white); transition: transform .2s; }
.land-dir:hover { transform: translateY(-4px); }
.land-dir h3 { margin: 12px 0 6px; }
.land-dir p { color: var(--muted); margin: 0; font-size: 14.5px; }
@media (max-width: 860px) { .land-dirs { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .land-dirs { grid-template-columns: 1fr; } }
.land-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 1200px; margin: 0 auto; }
@media (min-width: 1100px) { .land-features { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 460px) { .land-features { grid-template-columns: 1fr; } }
.land-feature { background: #fff; border-radius: 18px; padding: 20px; box-shadow: var(--shadow); }
.land-feature h4 { margin: 12px 0 6px; }
.land-feature p { color: var(--muted); font-size: 14px; margin: 0; }
.feat-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--navy); color: var(--orange); display: grid; place-items: center; }
.land-steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 1100px; margin: 0 auto; counter-reset: s; }
.land-steps li { padding: 22px; border-radius: 18px; border: 1px solid var(--line); position: relative; }
.land-steps h4 { margin: 12px 0 6px; }
.land-steps p { color: var(--muted); font-size: 14px; margin: 0; }
.step-n { width: 40px; height: 40px; border-radius: 50%; background: var(--orange); color: var(--navy); font-family: var(--head); font-weight: 800; display: grid; place-items: center; font-size: 18px; }
@media (max-width: 860px) { .land-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .land-steps { grid-template-columns: 1fr; } }
.land-why { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; max-width: 1100px; margin: 0 auto; }
.why-item { display: flex; gap: 12px; align-items: flex-start; background: #fff; border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.why-item > .ic { color: #fff; background: var(--ok); border-radius: 50%; padding: 4px; width: 28px; height: 28px; flex: none; }
.why-item p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.land-cta { text-align: center; padding: clamp(48px, 8vw, 90px) 20px; background: radial-gradient(700px 300px at 50% 0%, rgba(var(--accent-rgb), .3), transparent), var(--navy); color: #fff; }
.land-cta h2 { font-size: clamp(28px, 4vw, 42px); }
.land-cta p { opacity: .85; margin-bottom: 24px; }
.center { justify-content: center; }
.land-foot { padding: 30px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; border-top: 1px solid var(--line); }
.land-foot .brand img { width: 34px; height: 34px; }
.land-foot p { margin: 0; }

.apply-wrap { background: var(--bg); min-height: calc(100vh - 62px); }
.apply-card { max-width: 760px; margin: 0 auto; padding: clamp(20px, 4vw, 36px); }
.apply-card.narrow { max-width: 460px; }
.apply-card h1 { display: flex; align-items: center; gap: 10px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.consent { flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-weight: 400 !important; font-size: 14px !important; }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--orange); flex: none; }
.apply-done { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.done-ic { width: 76px; height: 76px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; }
.code-box { background: var(--navy); color: #fff; border-radius: 16px; padding: 14px 28px; display: flex; flex-direction: column; gap: 4px; }
.code-box .muted { color: rgba(255, 255, 255, .7); }
.code-box b { font-size: 28px; letter-spacing: .08em; color: var(--orange); }
.status-box { margin-top: 16px; padding: 16px; border-radius: 14px; background: var(--none-bg); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.status-box p { margin: 0; }
.status-new { background: var(--warn-bg); }
.status-approved { background: var(--ok-bg); }
.status-rejected { background: var(--bad-bg); }

/* ============================================================ tour */
.tour-wrap { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(var(--navy-rgb), .35); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); animation: fade .25s; }
.tour-card { position: relative; width: 100%; max-width: 480px; background: #fff; border-radius: 24px; padding: 32px 28px 22px; text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); display: flex; flex-direction: column; align-items: center; gap: 10px; animation: pop .3s ease-out; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.tour-card h2 { margin: 4px 0 0; font-size: 23px; }
.tour-card p { color: var(--muted); font-size: 15.5px; margin: 0; }
.tour-ic { width: 76px; height: 76px; border-radius: 24px; background: linear-gradient(135deg, var(--orange), var(--orange-light)); color: var(--navy); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(var(--accent-rgb), .35); }
.tour-skip { position: absolute; top: 12px; right: 12px; }
.tour-dots { display: flex; gap: 6px; margin: 8px 0 4px; flex-wrap: wrap; justify-content: center; }
.tour-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.tour-dots span.on { background: var(--orange); width: 22px; border-radius: 999px; }
.tour-nav { display: flex; justify-content: space-between; width: 100%; gap: 10px; margin-top: 6px; }
.tour-spot { position: relative; z-index: 90; box-shadow: 0 0 0 3px var(--orange), 0 0 0 9px rgba(var(--accent-rgb), .35) !important; border-radius: 10px; animation: pulse 1.4s ease-in-out infinite; }
.tour-raise { z-index: 85 !important; }
.group-box .add-member { margin-top: 8px; width: 100%; }
.split-box { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.split-box summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.picker { display: flex; flex-direction: column; gap: 10px; }
.picker-tabs { margin: 0; }

/* The hidden attribute must win over component display rules. */
[hidden] { display: none !important; }

/* ==================================================================== design v2
   White, airy, glassy cards over softly floating line icons. */
:root {
  --bg: #FFFFFF;
  --card: rgba(255, 255, 255, .84);
  --line: #ECEEF2;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px -14px rgba(16, 24, 40, .14);
  --shadow-hover: 0 2px 4px rgba(16, 24, 40, .05), 0 18px 40px -14px rgba(16, 24, 40, .2);
  --grad-orange: linear-gradient(135deg, var(--orange-light) 0%, var(--orange) 55%, var(--orange-strong) 100%);
}
body { background: #fff; }

/* ---- floating background */
.bg-float { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; color: #C9D0DA; opacity: 0; transition: opacity .9s ease; }
.bg-float.show { opacity: 1; }
.bf { position: absolute; width: var(--s); height: var(--s); opacity: .5; animation: drift var(--d) ease-in-out infinite alternate; will-change: transform; }
.bf svg { width: 100%; height: 100%; display: block; }
@keyframes drift {
  0% { transform: translate(0, 0) rotate(var(--r)); }
  50% { transform: translate(22px, -30px) rotate(calc(var(--r) + 9deg)); }
  100% { transform: translate(-16px, 18px) rotate(calc(var(--r) - 7deg)); }
}
@media (prefers-reduced-motion: reduce) { .bf { animation: none; } }
@media (min-width: 861px) { .bg-float { left: var(--sidebar); } }
.layout { position: relative; z-index: 1; }

/* ---- cards: soft glass */
.card, .badge, .podium-item, .land-feature, .why-item {
  background: var(--card);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  backdrop-filter: blur(10px) saturate(1.15);
  border: 1px solid rgba(226, 230, 236, .85);
  box-shadow: var(--shadow);
}
.task-card:hover, .section-card:hover, .week-hero:hover, .talk-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.list-row:hover, a.list-row:hover { background: rgba(var(--accent-rgb), .05); }
.page-title { font-size: 30px; letter-spacing: -.02em; }

/* ---- sidebar */
.sidebar { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); box-shadow: 4px 0 30px -10px rgba(var(--navy-rgb), .35); z-index: 2; }
.sidebar nav a { position: relative; transition: background .15s, color .15s, transform .15s; }
.sidebar nav a:hover { transform: translateX(2px); }
.sidebar nav a.on { background: var(--grad-orange); color: var(--navy); box-shadow: 0 8px 20px -8px rgba(var(--accent-rgb), .7); }
.who { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; transition: background .15s; }
.who:hover { background: rgba(255, 255, 255, .07); }
.who > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.who small { color: rgba(255, 255, 255, .55); font-size: 12px; }
.who-av { width: 34px; height: 34px; border-radius: 50%; background: var(--grad-orange); color: var(--navy); display: grid; place-items: center; font-weight: 800; flex: none; }

/* ---- new-item counters */
.nbadge { min-width: 19px; height: 19px; padding: 0 6px; border-radius: 999px; background: #EF4444; color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; margin-left: auto; line-height: 1; box-shadow: 0 0 0 2px rgba(var(--navy-rgb), .9); animation: pop .3s ease-out; }
.nbadge[hidden] { display: none !important; }
.sidebar nav a.on .nbadge { box-shadow: 0 0 0 2px var(--orange-light); }

/* ---- hero & stats */
.hero { position: relative; overflow: hidden; border-radius: 26px; padding: 30px 32px;
  background: radial-gradient(520px 260px at 100% 0%, rgba(var(--accent-rgb), .38), transparent 70%), radial-gradient(420px 260px at 0% 120%, rgba(59, 130, 246, .3), transparent 70%), linear-gradient(135deg, var(--navy), var(--navy-2));
  box-shadow: 0 20px 50px -24px rgba(var(--navy-rgb), .7); }
.hero::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; background: url(../img/logo.png) center / contain no-repeat; opacity: .09; transform: rotate(-12deg); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: 32px; }
.stat { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .12); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.stats.tiles .stat { background: var(--card); border: 1px solid rgba(226, 230, 236, .85); }
.stats.compact .stat { background: rgba(var(--navy-rgb), .05); border: 0; }

/* ---- buttons */
.btn { border-radius: 12px; }
.btn-primary { background: var(--grad-orange); border-color: transparent; box-shadow: 0 8px 18px -10px rgba(var(--accent-rgb), .9); }
.btn-primary:hover { background: var(--grad-orange); filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 12px 22px -10px rgba(var(--accent-rgb), .9); }
.btn:not(.btn-primary):not(.btn-danger):not(.btn-success):not(.btn-glass):not(.btn-gold) { background: rgba(255, 255, 255, .9); }
.tab.on { background: var(--navy); box-shadow: 0 6px 14px -8px rgba(var(--navy-rgb), .8); }

/* ---- direction cards */
.section-card { background: linear-gradient(180deg, color-mix(in srgb, var(--sec) 11%, rgba(255, 255, 255, .9)) 0%, var(--card) 62%); }
.section-icon { background: linear-gradient(135deg, color-mix(in srgb, var(--sec) 85%, white), var(--sec) 60%, color-mix(in srgb, var(--sec) 80%, black)); box-shadow: 0 10px 20px -10px var(--sec); }
.section-head, .talk-head { background: linear-gradient(135deg, color-mix(in srgb, var(--sec) 14%, white), rgba(255, 255, 255, .7)); border: 1px solid color-mix(in srgb, var(--sec) 18%, white); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.week-cover { box-shadow: 0 12px 24px -14px rgba(var(--navy-rgb), .5); }

/* ---- gentle entrance */
.view > * { animation: rise .35s ease-out both; }
.view > *:nth-child(2) { animation-delay: .04s; }
.view > *:nth-child(3) { animation-delay: .08s; }
.view > *:nth-child(4) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .view > * { animation: none; } }

/* ---- online block */
.online { margin-bottom: 16px; }
.online-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
.online-col h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; }
.online-count { background: #DCFCE7; color: #15803D; border-radius: 999px; padding: 0 8px; font-size: 12px; }
.online-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; }
.online-row .muted { margin-left: auto; }
.online details summary { cursor: pointer; margin-top: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #CBD2DC; flex: none; }
.dot.on { background: #22C55E; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 4px rgba(34, 197, 94, .2); animation: pulse 1.8s ease-in-out infinite; }
@media (max-width: 640px) { .online-grid { grid-template-columns: 1fr; } }

/* ---- phone: glass top bar, 5-item tab bar, "More" sheet */
@media (max-width: 860px) {
  .topbar { background: rgba(var(--navy-rgb), .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .topbar .lang-switch button { padding: 4px 8px; }
  .tabbar { background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid rgba(226, 230, 236, .9); box-shadow: 0 -10px 30px -18px rgba(var(--navy-rgb), .35); }
  .tabbar a, .tb-more { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; color: var(--muted); padding: 4px 0; min-width: 0; background: none; border: 0; font-family: inherit; cursor: pointer; }
  .tabbar a.on, .tb-more.on { color: var(--orange-d); font-weight: 700; }
  .tabbar a.on .tb-ic, .tb-more.on .tb-ic { background: rgba(var(--accent-rgb), .14); }
  .tb-ic { position: relative; display: inline-grid; place-items: center; width: 44px; height: 28px; border-radius: 999px; transition: background .15s; }
  .tb-ic .nbadge { position: absolute; top: -6px; right: 0; box-shadow: 0 0 0 2px #fff; font-size: 10px; min-width: 17px; height: 17px; }
  .view { padding-top: 16px; }
  .page-title { font-size: 24px; }
  .hero { padding: 22px; border-radius: 22px; }
  .hero h1 { font-size: 24px; }
}
.sheet-wrap { position: fixed; inset: 0; z-index: 40; background: rgba(var(--navy-rgb), .3); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: flex; align-items: flex-end; animation: fade .2s; }
.sheet-wrap[hidden] { display: none; }
.sheet { width: 100%; background: #fff; border-radius: 26px 26px 0 0; padding: 10px 16px calc(84px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 50px -20px rgba(var(--navy-rgb), .4); animation: slide-up .25s ease-out; }
@keyframes slide-up { from { transform: translateY(40px); opacity: 0; } }
.sheet-grip { width: 40px; height: 5px; border-radius: 999px; background: #D5D9E0; margin: 0 auto 14px; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sheet-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 16px; background: #F6F7F9; font-size: 13px; font-weight: 600; text-align: center; }
.sheet-grid a.on { background: rgba(var(--accent-rgb), .14); color: var(--orange-d); }
.sheet-grid .tb-ic { width: auto; height: auto; }
.sheet-grid .tb-ic .nbadge { position: absolute; top: -8px; right: -14px; box-shadow: 0 0 0 2px #F6F7F9; }
@media (min-width: 861px) { .sheet-wrap { display: none !important; } }

/* Floating icons must never cause sideways scrolling on phones. */
html, body { overflow-x: clip; }
.bg-float { contain: strict; }

/* ---- ELDIN brand line */
.eldin { font-family: var(--head); font-weight: 800; letter-spacing: .18em; background: linear-gradient(135deg, var(--navy), #3B5BA9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eldin-line { font-size: 14px; color: var(--muted); }
.side-copy { margin: 0; font-size: 11.5px; color: rgba(255, 255, 255, .45); letter-spacing: .04em; padding: 0 8px; }
.side-copy b { color: rgba(255, 255, 255, .7); letter-spacing: .15em; }
.auth-copy { margin: 14px 0 0; font-size: 12px; color: var(--muted); }
.eldin-projects { font-size: 13px; color: var(--muted); }
.eldin-projects span { color: var(--text); font-weight: 600; }

/* ==================================================================== wow pack */

/* ---- levels */
.lvl-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--lvl); background: color-mix(in srgb, var(--lvl) 14%, white); border: 1px solid color-mix(in srgb, var(--lvl) 30%, white); vertical-align: middle; }
.lvl-chip.big { font-size: 14px; padding: 5px 14px; }
.hero-av { --sz: 64px; width: var(--sz); height: var(--sz); border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-family: var(--head); font-weight: 800; font-size: calc(var(--sz) * .4); color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--lvl) 80%, white), var(--lvl)); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--lvl), 0 8px 20px -8px var(--lvl); }
.hero-av.lvl-5 { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--lvl), 0 0 22px 2px color-mix(in srgb, var(--lvl) 60%, transparent); animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--lvl), 0 0 34px 6px color-mix(in srgb, var(--lvl) 55%, transparent); } }
.hero-level { display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; }
.hero-level .lvl-chip { background: rgba(255, 255, 255, .92); }
.xp-mini { width: 110px; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.xp-mini span { display: block; height: 100%; background: var(--grad-orange); border-radius: inherit; }
.hero-path { margin-top: 20px; }
.hp-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.hp-top h2 { display: flex; align-items: center; gap: 8px; margin: 4px 0; color: var(--lvl); }
.hp-xp { text-align: right; font-family: var(--head); }
.hp-xp b { font-size: 34px; display: block; line-height: 1; }
.hp-xp span { font-size: 12px; color: var(--muted); }
.xp-bar { height: 12px; border-radius: 999px; background: var(--none-bg); overflow: hidden; margin: 12px 0 18px; }
.xp-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--lvl) 70%, white), var(--lvl)); box-shadow: 0 0 12px color-mix(in srgb, var(--lvl) 60%, transparent); transition: width 1s ease; }
.hp-map { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; position: relative; }
.hp-map::before { content: ""; position: absolute; left: 8%; right: 8%; top: 19px; height: 3px; background: var(--line); border-radius: 3px; }
.hp-map li { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; position: relative; }
.hp-node { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--line); color: #A0A7B4; }
.hp-map li.done .hp-node { background: var(--c); border-color: var(--c); color: #fff; }
.hp-map li.now .hp-node { background: var(--c); border-color: #fff; color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 35%, transparent); transform: scale(1.12); }
.hp-name { font-size: 12px; font-weight: 700; }
.hp-req { font-size: 11px; color: var(--muted); }
.streak { margin: 14px 0 0; font-weight: 600; }
.levelup { border: 2px solid var(--lvl); }
.lvl-ic { background: linear-gradient(135deg, color-mix(in srgb, var(--lvl) 70%, white), var(--lvl)); color: #fff; box-shadow: 0 10px 30px -6px var(--lvl); }
.confetti { position: fixed; inset: 0; z-index: 2100; pointer-events: none; }
@media (max-width: 640px) {
  .hp-map { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
  .hp-map::before { display: none; }
}

/* ---- announcements */
.announce { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 18px; margin-bottom: 14px; background: linear-gradient(135deg, rgba(255, 244, 232, .95), rgba(255, 255, 255, .85)); border: 1px solid var(--accent-soft-border); box-shadow: var(--shadow); }
.announce.pinned { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; border-color: transparent; }
.announce.pinned .muted { color: rgba(255, 255, 255, .6); }
.announce p { margin: 4px 0; }
.ann-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--grad-orange); color: var(--navy); flex: none; }

/* ---- portfolio share */
.share-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.share-row input { margin-bottom: 8px; }
.qr { background: #fff; padding: 8px; border-radius: 12px; border: 1px solid var(--line); line-height: 0; }
.qr img, .qr canvas { display: block; }
.theme-title { margin-top: 16px; }

/* ---- certificate */
.cert-wrap { overflow-x: auto; padding: 10px 0 30px; }
.cert { width: 1000px; aspect-ratio: 297 / 210; margin: 0 auto; background: #fff; color: var(--navy); border-radius: 6px; box-shadow: 0 30px 60px -30px rgba(var(--navy-rgb), .45); padding: 22px; position: relative; overflow: hidden;
  background-image: radial-gradient(600px 300px at 100% 0%, rgba(var(--accent-rgb), .12), transparent), radial-gradient(500px 300px at 0% 100%, rgba(59, 130, 246, .1), transparent); }
.cert::after { content: ""; position: absolute; right: -80px; bottom: -80px; width: 380px; height: 380px; background: url(../img/logo.png) center / contain no-repeat; opacity: .06; }
.cert-inner { position: relative; z-index: 1; height: 100%; border: 3px double #C9A24B; border-radius: 4px; padding: 30px 50px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.cert-top { display: flex; align-items: center; gap: 14px; align-self: flex-start; text-align: left; }
.cert-top img { width: 62px; height: 62px; }
.cert-top b { font-family: var(--head); font-size: 20px; display: block; }
.cert-top span { font-size: 12px; color: #5A6474; }
.cert-kicker { font-family: var(--head); font-weight: 800; letter-spacing: .35em; text-transform: uppercase; font-size: 30px; margin: 18px 0 2px; color: #C9A24B; }
.cert-given { color: #5A6474; margin: 6px 0; }
.cert-name { font-family: "Montserrat", serif; font-size: 46px; margin: 4px 0; border-bottom: 2px solid #E9DFC5; padding: 0 30px 6px; }
.cert-grade { color: #5A6474; margin: 2px 0 8px; }
.cert-award { font-size: 26px; color: var(--orange-strong); margin: 10px 0 4px; }
.cert-desc { max-width: 680px; color: #4A5568; }
.cert-bottom { margin-top: auto; width: 100%; display: flex; justify-content: space-between; align-items: flex-end; }
.cert-sign, .cert-date { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #5A6474; }
.cert-sign .line { width: 200px; border-bottom: 1.5px solid var(--navy); height: 40px; }
.cert-date b { color: var(--navy); font-size: 15px; }
.cert-qr { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: #5A6474; }
.cert-qr img, .cert-qr canvas { width: 96px !important; height: 96px !important; }
.cert-brand { position: absolute; bottom: 8px; left: 0; right: 0; font-size: 10px; letter-spacing: .2em; color: #A0A7B4; margin: 0; }

/* ---- public pages */
.public-page { min-height: 100vh; }
.verify-wrap { display: grid; place-items: center; min-height: calc(100vh - 70px); background: var(--bg); }
.verify-card { max-width: 520px; width: 100%; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 28px; }
.verify-card .facts { text-align: left; width: 100%; }
.verify-ic { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; }
.verify-card.ok .verify-ic { background: var(--ok-bg); color: var(--ok); }
.verify-card.bad .verify-ic { background: var(--bad-bg); color: var(--bad); }
.pf-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 50px 20px 40px; color: #fff;
  background: radial-gradient(600px 300px at 50% 0%, color-mix(in srgb, var(--lvl) 45%, transparent), transparent), linear-gradient(135deg, var(--navy), var(--navy-2)); }
.pf-hero h1 { margin: 10px 0 0; font-size: 34px; }
.pf-hero p { opacity: .8; margin: 0; }
.pf-stats { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
.pf-stats div { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .15); border-radius: 16px; padding: 12px 18px; min-width: 110px; }
.pf-stats b { display: block; font-family: var(--head); font-size: 28px; }
.pf-stats span { font-size: 12.5px; opacity: .8; }
.pf-body { background: var(--bg); }
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 1000px; margin: 0 auto; }
.pf-grid .span-all { grid-column: 1 / -1; }
@media (max-width: 760px) { .pf-grid { grid-template-columns: 1fr; } }
.pf-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--orange-d); font-weight: 600; font-size: 13px; }
.pf-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.pf-book { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; background: var(--none-bg); }
.pf-book .ic { color: var(--orange); }
.pf-path { display: flex; justify-content: center; gap: 8px; margin-top: 26px; }
.pf-path span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--none-bg); color: #A0A7B4; }
.pf-path span.on { background: var(--c); color: #fff; }

/* ---- analytics */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 12px 0 16px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px; }
.kpi .ic { color: var(--orange); }
.kpi b { font-family: var(--head); font-size: 28px; line-height: 1; }
.kpi span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.an-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .an-grid { grid-template-columns: 1fr; } }
.chart { width: 100%; height: 150px; display: block; }
.chart-labels { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin-top: 6px; }
.chart-labels span { display: flex; flex-direction: column; align-items: center; font-size: 10.5px; color: var(--muted); }
.chart-labels b { color: var(--text); font-size: 12px; }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: 140px 1fr 36px; gap: 10px; align-items: center; font-size: 13.5px; }
.hb-track { height: 10px; border-radius: 999px; background: var(--none-bg); overflow: hidden; }
.hb-track span { display: block; height: 100%; border-radius: inherit; background: var(--sec); }
.hbar b { text-align: right; }
.print-only { display: none; }
.report-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.report-head.print-only { display: none; }
.report-head img { width: 60px; height: 60px; }

/* ---- ban screen */
.ban-wrap { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; background: rgba(var(--navy-rgb), .45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fade .3s; }
.ban-card { width: 100%; max-width: 460px; background: #fff; color: var(--text); border-radius: 24px; padding: 30px 26px 22px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); animation: pop .3s ease-out; }
.ban-ic { width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center; background: var(--bad-bg); color: var(--bad); }
.ban-card h2 { margin: 0; font-size: 21px; }
.ban-reason { width: 100%; background: #FEF2F2; border: 1px solid #FECACA; border-radius: 14px; padding: 12px 14px; text-align: left; }
.ban-reason span { font-size: 12px; font-weight: 700; color: var(--bad); text-transform: uppercase; letter-spacing: .05em; }
.ban-reason p { margin: 4px 0 0; font-size: 15.5px; }
.ban-time { width: 100%; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.ban-count { display: flex; justify-content: center; gap: 8px; }
.ban-count div { background: var(--navy); color: #fff; border-radius: 12px; padding: 8px 10px; min-width: 62px; display: flex; flex-direction: column; }
.ban-count b { font-family: var(--head); font-size: 24px; }
.ban-count small { font-size: 11px; opacity: .7; }

/* ---- theme button */
.theme-btn { border: 0; background: rgba(127, 127, 127, .15); color: inherit; width: 32px; height: 30px; border-radius: 999px; display: inline-grid; place-items: center; cursor: pointer; flex: none; }
.theme-btn:hover { background: rgba(127, 127, 127, .25); }
.theme-anim, .theme-anim * { transition: background-color .35s, color .35s, border-color .35s !important; }

/* ---- UG Quiz */
.quiz-logo { font-family: var(--head); font-weight: 800; font-size: 34px; letter-spacing: -.02em; color: #fff; }
.quiz-logo b { color: var(--orange); margin-left: 4px; }
.quiz-logo.big { font-size: 56px; }
.quiz-hero { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 40px 20px; border-radius: 28px; color: #fff;
  background: radial-gradient(500px 260px at 0% 0%, rgba(226, 27, 60, .5), transparent 70%), radial-gradient(500px 260px at 100% 0%, rgba(19, 104, 206, .55), transparent 70%), radial-gradient(500px 300px at 50% 120%, rgba(216, 158, 0, .45), transparent 70%), #1A1446; box-shadow: 0 24px 60px -30px rgba(26, 20, 70, .9); }
.quiz-hero p { opacity: .85; max-width: 460px; }
.join-form { display: flex; gap: 8px; width: 100%; max-width: 380px; }
.join-form input { text-align: center; font-family: var(--head); font-size: 26px !important; font-weight: 800; letter-spacing: .3em; padding: 12px !important; }
.quiz-mode .bg-float { display: none; }
.quiz-stage { border-radius: 26px; padding: 26px; min-height: 70vh; color: #fff; background: linear-gradient(160deg, #1A1446, #2A1C6B 60%, #3B1F7A); box-shadow: 0 30px 70px -40px rgba(26, 20, 70, .9); display: flex; flex-direction: column; }
.quiz-stage .muted { color: rgba(255, 255, 255, .65); }
.quiz-stage .btn:not(.btn-primary) { background: rgba(255, 255, 255, .12) !important; color: #fff; border-color: rgba(255, 255, 255, .2); }
.btn-xl { padding: 18px 34px; font-size: 22px; border-radius: 18px; }
.host-lobby, .host-final { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; margin: auto; }
.host-lobby h1, .host-final h1 { font-size: 40px; margin: 0; }
.join-box { display: flex; gap: 30px; align-items: center; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); border-radius: 22px; padding: 20px 28px; text-align: left; }
.join-box p { margin: 0; opacity: .75; }
.join-box .url { font-size: 18px; display: block; margin-bottom: 10px; word-break: break-all; }
.join-box .code { font-family: var(--head); font-size: 64px; letter-spacing: .12em; color: var(--orange); line-height: 1; }
.host-q { display: flex; flex-direction: column; gap: 18px; flex: 1; }
.q-count { font-weight: 800; font-family: var(--head); background: rgba(255, 255, 255, .12); padding: 4px 12px; border-radius: 999px; }
.answered { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; }
.q-text { font-size: clamp(26px, 3.4vw, 42px); text-align: center; margin: 4px auto; max-width: 900px; }
.timer { width: 96px; height: 96px; position: relative; margin: 0 auto; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer circle { fill: none; stroke: rgba(255, 255, 255, .15); stroke-width: 3.4; }
.timer .arc { stroke: var(--orange); stroke-dasharray: 100; stroke-dashoffset: 0; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.timer b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--head); font-size: 34px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 16px; background: var(--tile); color: #fff; font-weight: 700; font-size: 18px; border: 0; text-align: left; box-shadow: 0 6px 0 color-mix(in srgb, var(--tile) 70%, black); cursor: pointer; transition: transform .1s, opacity .2s; min-height: 76px; }
.tile:active { transform: translateY(3px); box-shadow: 0 3px 0 color-mix(in srgb, var(--tile) 70%, black); }
.tile.picked { outline: 4px solid #fff; }
.tile-shape { font-size: 26px; opacity: .9; flex: none; width: 30px; text-align: center; }
.tile-text { flex: 1; position: relative; z-index: 1; }
.tiles.big .tile { font-size: 24px; min-height: 100px; cursor: default; }
.tile.dim { opacity: .35; }
.tile.ok { box-shadow: 0 0 0 5px #fff, 0 6px 0 color-mix(in srgb, var(--tile) 70%, black); }
.tile-count { position: relative; z-index: 1; font-family: var(--head); font-size: 28px; }
.tile-bar { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, .18); transition: height .8s ease; }
.leaders { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 760px; margin: 0 auto; }
.leader { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-radius: 14px; background: rgba(255, 255, 255, .08); overflow: hidden; animation: rise .4s ease-out both; }
.leader .lbar { position: absolute; inset: 0 auto 0 0; width: var(--w); background: linear-gradient(90deg, rgba(var(--accent-rgb), .35), rgba(var(--accent-rgb), .08)); z-index: 0; transition: width 1s ease; }
.leader > *:not(.lbar) { position: relative; z-index: 1; }
.leader b { flex: 1; }
.leader .rank { font-family: var(--head); font-weight: 800; width: 24px; }
.leader .pts { font-family: var(--head); font-weight: 800; color: #FFD08A; }
.leader:nth-child(2) { animation-delay: .06s; } .leader:nth-child(3) { animation-delay: .12s; } .leader:nth-child(4) { animation-delay: .18s; } .leader:nth-child(5) { animation-delay: .24s; }
.podium-3d { display: flex; align-items: flex-end; justify-content: center; gap: 14px; margin: 10px 0 20px; }
.podium-3d .step { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 170px; animation: rise .6s ease-out both; }
.podium-3d .step b { font-size: 18px; }
.podium-3d .step .pts { color: #FFD08A; font-family: var(--head); font-weight: 800; }
.block-step { width: 100%; border-radius: 14px 14px 0 0; display: grid; place-items: center; font-family: var(--head); font-weight: 800; font-size: 40px; color: rgba(255, 255, 255, .9); }
.s1 .block-step { height: 170px; background: linear-gradient(180deg, #F7B733, #E8961E); }
.s2 .block-step { height: 120px; background: linear-gradient(180deg, #CBD5E1, #94A3B8); }
.s3 .block-step { height: 90px; background: linear-gradient(180deg, #E0A26A, #B87333); }
.s1 { animation-delay: .3s !important; } .s2 { animation-delay: .1s !important; } .s3 { animation-delay: .5s !important; }
.step.empty { visibility: hidden; }
.play-wait, .play-result { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.play-wait h2, .play-result h2 { margin: 0; font-size: 26px; }
.big-ic { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); }
.play-result.ok .big-ic { background: #26890C; }
.play-result.bad .big-ic { background: #E21B3C; }
.gain { font-family: var(--head); font-size: 44px; font-weight: 800; color: #FFD08A; margin: 0; animation: pop .4s ease-out; }
.final-rank { font-family: var(--head); font-size: 80px; font-weight: 800; margin: 0; color: var(--orange); }
.dots { display: flex; gap: 8px; }
.dots span { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, .7); animation: bounce 1.2s infinite ease-in-out; }
.dots span:nth-child(2) { animation-delay: .15s; } .dots span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }
.play-q { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.play-q h2 { font-size: 22px; text-align: center; margin: 4px 0; }
.play-q .secs { font-family: var(--head); font-size: 22px; font-weight: 800; }
.pbar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.pbar span { display: block; height: 100%; background: var(--grad-orange); transition: width .2s linear; }
.play .tiles { flex: 1; grid-auto-rows: 1fr; }
.send-multi { margin-top: 4px; }
.tile-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile-edit .qe-opt { background: color-mix(in srgb, var(--tile) 10%, white); border-radius: 12px; padding: 6px 10px; border: 1px solid color-mix(in srgb, var(--tile) 35%, white); }
.tile-edit .tile-shape { color: var(--tile); font-size: 18px; width: 20px; }
@media (max-width: 760px) {
  .quiz-stage { padding: 16px; border-radius: 20px; min-height: calc(100vh - 170px); }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { padding: 14px; font-size: 16px; min-height: 90px; flex-direction: column; justify-content: center; text-align: center; gap: 6px; }
  .join-box { flex-direction: column; text-align: center; }
  .join-box .code { font-size: 46px; }
  .podium-3d .step { width: 104px; }
  .tile-edit { grid-template-columns: 1fr; }
  .quiz-logo.big { font-size: 40px; }
}

/* ==================================================================== dark theme */
:root[data-theme="dark"] {
  --bg: #06141B;
  --card: rgba(12, 35, 48, .82);
  --line: #173747;
  --text: #E6EAF2;
  --muted: #94A3B8;
  --none-bg: #12303F;
  --ok-bg: rgba(34, 197, 94, .16);
  --warn-bg: rgba(245, 158, 11, .16);
  --bad-bg: rgba(239, 68, 68, .16);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -14px rgba(0, 0, 0, .6);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 18px 40px -14px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
[data-theme="dark"] body { background: var(--bg); color: var(--text); }
[data-theme="dark"] .bg-float { color: #16384A; }
[data-theme="dark"] .card, [data-theme="dark"] .badge, [data-theme="dark"] .podium-item { border-color: rgba(30, 65, 82, .8); }
[data-theme="dark"] input:not([type=checkbox]):not([type=radio]):not([type=color]), [data-theme="dark"] select, [data-theme="dark"] textarea { background: #0A1F2B; border-color: #1E4152; color: var(--text); }
[data-theme="dark"] .btn:not(.btn-primary):not(.btn-danger):not(.btn-success):not(.btn-glass):not(.btn-gold) { background: rgba(14, 39, 52, .9); border-color: #1E4152; color: var(--text); }
[data-theme="dark"] .tab:not(.on), [data-theme="dark"] .seg-btn:not(.on), [data-theme="dark"] .check-pill { background: #0E2734; border-color: #1E4152; color: var(--muted); }
[data-theme="dark"] .tab.on { background: var(--orange); color: var(--navy); }
[data-theme="dark"] .chip-pending { color: #FBBF24; } [data-theme="dark"] .chip-approved { color: #4ADE80; } [data-theme="dark"] .chip-rejected { color: #F87171; }
[data-theme="dark"] .sec-chip, [data-theme="dark"] .lvl-chip { background: color-mix(in srgb, var(--sec, var(--lvl)) 18%, #06141B); }
[data-theme="dark"] .lvl-chip { background: color-mix(in srgb, var(--lvl) 18%, #06141B); }
[data-theme="dark"] .section-card { background: linear-gradient(180deg, color-mix(in srgb, var(--sec) 16%, #0C2330) 0%, var(--card) 62%); }
[data-theme="dark"] .section-head, [data-theme="dark"] .talk-head { background: linear-gradient(135deg, color-mix(in srgb, var(--sec) 20%, #06141B), rgba(12, 35, 48, .7)); border-color: color-mix(in srgb, var(--sec) 30%, #06141B); }
[data-theme="dark"] .msg { background: #12303F; } [data-theme="dark"] .msg.mine { background: #0E3A4C; }
[data-theme="dark"] .msg-sys { background: #0E2733; }
[data-theme="dark"] .tmsg { background: #12303F; } [data-theme="dark"] .tmsg.mine { background: #0E3A4C; } [data-theme="dark"] .tmsg.support:not(.mine) { background: #0F2E3D; }
[data-theme="dark"] .debate-panel, [data-theme="dark"] .idea-col, [data-theme="dark"] .split-form, [data-theme="dark"] .answer-text { background: #091B24; }
[data-theme="dark"] .idea, [data-theme="dark"] .side, [data-theme="dark"] .qe, [data-theme="dark"] .like-btn, [data-theme="dark"] .poll-opt, [data-theme="dark"] .tag-btn { background: #0E2734; border-color: #1E4152; color: var(--text); }
[data-theme="dark"] .poll.open { background: #0F3240; }
[data-theme="dark"] .modal, [data-theme="dark"] .tour-card, [data-theme="dark"] .ban-card, [data-theme="dark"] .sheet { background: #0C2330; color: var(--text); }
[data-theme="dark"] .sheet-grid a { background: #12303F; }
[data-theme="dark"] .notice, [data-theme="dark"] .invite-box { background: rgba(var(--accent-rgb), .12); }
[data-theme="dark"] .announce:not(.pinned) { background: linear-gradient(135deg, rgba(var(--accent-rgb), .14), rgba(12, 35, 48, .85)); border-color: rgba(var(--accent-rgb), .3); }
[data-theme="dark"] .ban-reason { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .3); }
[data-theme="dark"] .tabbar { background: rgba(6, 20, 27, .92); border-color: #173747; }
[data-theme="dark"] .list-row:hover, [data-theme="dark"] a.list-row:hover { background: rgba(var(--accent-rgb), .07); }
[data-theme="dark"] .hero-av { box-shadow: 0 0 0 3px #06141B, 0 0 0 5px var(--lvl); }
[data-theme="dark"] .hp-node { background: #0E2734; }
[data-theme="dark"] .table th, [data-theme="dark"] .table td { border-color: #173747; }
[data-theme="dark"] .stats.compact .stat { background: rgba(255, 255, 255, .05); }
[data-theme="dark"] .reader-stage canvas, [data-theme="dark"] .cert { filter: none; }
[data-theme="dark"] .land-alt, [data-theme="dark"] .apply-wrap, [data-theme="dark"] .verify-wrap, [data-theme="dark"] .pf-body { background: var(--bg); }
[data-theme="dark"] .landing, [data-theme="dark"] .land-foot { background: #06141B; }
[data-theme="dark"] .land-dir { background: color-mix(in srgb, var(--sec) 12%, #0C2330); border-color: color-mix(in srgb, var(--sec) 30%, #0C2330); }
[data-theme="dark"] .mission-card { background: linear-gradient(135deg, rgba(var(--accent-rgb), .14), rgba(155, 93, 229, .12)); }
[data-theme="dark"] .land-steps li { border-color: #173747; }
[data-theme="dark"] .eldin { background: linear-gradient(135deg, #E6EAF2, #9DB4F0); -webkit-background-clip: text; background-clip: text; }
[data-theme="dark"] .pf-badge { background: rgba(var(--accent-rgb), .15); }
[data-theme="dark"] .auth-card { background: #0C2330; }

/* ==================================================================== print (certificates, reports) */
@media print {
  @page { size: A4 landscape; margin: 0; }
  body { background: #fff !important; }
  .sidebar, .topbar, .tabbar, .bg-float, .no-print, .back, .admin-tabs, .page-title, #toasts, .sheet-wrap { display: none !important; }
  .view { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  .view > * { animation: none !important; }
  .cert-wrap { padding: 0; overflow: visible; }
  .cert { width: 297mm; height: 210mm; aspect-ratio: auto; box-shadow: none; border-radius: 0; margin: 0; }
  .print-only { display: block; }
  .report-head.print-only { display: flex; }
  .card { box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: #fff !important; border: 1px solid #ddd !important; break-inside: avoid; }
}

/* Host screen on a projector: no menu, the stage fills the screen. */
.quiz-host .sidebar, .quiz-host .topbar, .quiz-host .tabbar { display: none !important; }
.quiz-host .view { margin: 0 auto; max-width: 1400px; padding: 16px; }
.quiz-host .quiz-stage { min-height: calc(100vh - 32px); }
.host-bar { display: flex; justify-content: space-between; margin-bottom: 8px; opacity: .55; transition: opacity .2s; }
.host-bar:hover { opacity: 1; }
.leaders { text-align: left; }

/* Certificate scales with its own width (container units), on screen and in print. */
.cert { width: min(1000px, 100%); container-type: inline-size; padding: 2.2cqw; }
.cert-inner { padding: 3cqw 5cqw; }
.cert-top { gap: 1.4cqw; }
.cert-top img { width: 6.2cqw; height: 6.2cqw; }
.cert-top b { font-size: 2cqw; }
.cert-top span { font-size: 1.2cqw; }
.cert-kicker { font-size: 3cqw; margin: 1.8cqw 0 .2cqw; }
.cert-given, .cert-grade { font-size: 1.5cqw; }
.cert-name { font-size: 4.6cqw; padding: 0 3cqw .6cqw; }
.cert-award { font-size: 2.6cqw; margin: 1cqw 0 .4cqw; }
.cert-desc { font-size: 1.5cqw; max-width: 68cqw; }
.cert-sign, .cert-date { font-size: 1.3cqw; }
.cert-sign .line { width: 20cqw; height: 4cqw; }
.cert-date b { font-size: 1.5cqw; }
.cert-qr { font-size: 1.1cqw; }
.cert-qr img, .cert-qr canvas { width: 9.6cqw !important; height: 9.6cqw !important; }
.cert-brand { font-size: 1cqw; }
@media print { .cert { width: 297mm; } }
.profile-actions { flex-wrap: wrap; }
.row-gap.wrap { flex-wrap: wrap; }
.view > .announce { margin-top: 16px; }

/* ---- quiz: players panel on the host screen */
.players-box { width: 100%; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; padding: 12px 14px; }
.pp-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; margin-bottom: 10px; }
.pp-online { color: #4ADE80; font-weight: 700; }
.pp-progress { flex: 1 0 100%; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .15); overflow: hidden; margin-top: 2px; }
.pp-progress span { display: block; height: 100%; background: linear-gradient(90deg, #4ADE80, #22C55E); transition: width .5s ease; }
.pp-list { display: flex; flex-wrap: wrap; gap: 8px; max-height: 190px; overflow: auto; }
.pp { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 13.5px; transition: background .3s, opacity .3s; }
.pp.new { animation: pop .35s ease-out; }
.pp .hero-av { box-shadow: none; }
.pp i { font-style: normal; font-weight: 800; margin-left: 2px; }
.pp-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp.done, .pp.ok { background: rgba(38, 137, 12, .55); }
.pp.bad { background: rgba(226, 27, 60, .5); }
.pp.wait { background: rgba(255, 255, 255, .1); }
.pp.off, .pp.none { opacity: .4; }
.host-lobby .players-box { max-width: 760px; text-align: left; }

/* ==================================================================== palette «Көк аспан»
   Sky blue + gold (colours of the Kazakh flag) on deep sea blue.
   The six direction colours from the logo stay as they are. */
:root {
  --navy: #063A52;
  --navy-2: #0A5878;
  --navy-rgb: 6, 58, 82;
  --text: #0B2A3A;
  --muted: #557080;
  --orange: #00A3C4;          /* main accent: buttons, links, focus */
  --orange-d: #00799A;        /* accent text on light backgrounds */
  --orange-strong: #008BAA;
  --orange-light: #2CC7E4;
  --accent-rgb: 0, 163, 196;
  --accent-soft: #E3F7FC;
  --accent-soft-border: #B5E6F2;
  --gold: #F2C230;            /* highlights: active menu item, game code, stats */
  --gold-d: #8A6400;
  --grad-orange: linear-gradient(135deg, #2CC7E4 0%, #00A3C4 55%, #008BAA 100%);
  --grad-gold: linear-gradient(135deg, #F7D768 0%, #F2C230 55%, #E0AC14 100%);
  --none-bg: #EEF4F7;
}
.btn-primary { color: #fff; }
.btn-primary:hover { color: #fff; }
.sidebar nav a.on { background: var(--grad-gold); color: var(--navy); box-shadow: 0 8px 20px -8px rgba(242, 194, 48, .7); }
.sidebar nav a.on .nbadge { box-shadow: 0 0 0 2px #F2C230; }
.who-av { background: var(--grad-gold); color: var(--navy); }
.hero .eyebrow, .land-hero .eyebrow, .land-stats b, .join-box .code, .quiz-logo b, .final-rank, .pts, .leader .pts { color: var(--gold); }
.hero { background: radial-gradient(520px 260px at 100% 0%, rgba(242, 194, 48, .25), transparent 70%), radial-gradient(420px 260px at 0% 120%, rgba(44, 199, 228, .35), transparent 70%), linear-gradient(135deg, #063A52, #00799A); }
.tabbar a.on, .tb-more.on { color: var(--orange-d); }
.lang-switch button.on, .seg-btn.on { background: var(--gold); color: var(--navy); }
.ann-ic, .mission-ic, .step-n { background: var(--grad-gold); color: var(--navy); }
.chip-live { background: #FEE2E2; color: #DC2626; }
.tab.on { background: var(--navy); }
.pf-badge, .badge-ic { background: #FDF3D2; color: var(--gold-d); }
.quiz-hero .btn-glass { color: #fff; }

/* Quiz code field: white box, dark digits (it sits on a dark card). */
.join-form input { background: #fff; color: #0B2A3A; caret-color: #00A3C4; }
.join-form input::placeholder { color: #8AA3B0; letter-spacing: .05em; font-size: 16px; font-weight: 600; }

/* ---- dark */
:root[data-theme="dark"] {
  --text: #E3F1F6;
  --muted: #8FB0BE;
  --orange: #22C1E0;
  --orange-d: #7FDBEE;
  --orange-strong: #0EA9C9;
  --orange-light: #5AD6EE;
  --accent-rgb: 34, 193, 224;
  --accent-soft: rgba(34, 193, 224, .12);
  --accent-soft-border: rgba(34, 193, 224, .3);
  --grad-orange: linear-gradient(135deg, #5AD6EE 0%, #22C1E0 55%, #0EA9C9 100%);
  --gold-d: #F7D768;
}
[data-theme="dark"] .btn-primary, [data-theme="dark"] .btn-primary:hover { color: #06141B; }
[data-theme="dark"] .sidebar { background: linear-gradient(180deg, #081D27 0%, #0A2533 100%); }
[data-theme="dark"] .hero { background: radial-gradient(520px 260px at 100% 0%, rgba(242, 194, 48, .16), transparent 70%), radial-gradient(420px 260px at 0% 120%, rgba(34, 193, 224, .22), transparent 70%), linear-gradient(135deg, #0A4660, #0C2E40); }
[data-theme="dark"] .topbar { background: rgba(8, 29, 39, .92); }
[data-theme="dark"] .tab.on { background: var(--orange); color: #06141B; }
[data-theme="dark"] .pf-badge, [data-theme="dark"] .badge-ic { background: rgba(242, 194, 48, .14); }
[data-theme="dark"] .announce.pinned { background: linear-gradient(135deg, #0A4660, #0C2E40); }
[data-theme="dark"] .msg.mine, [data-theme="dark"] .tmsg.mine { background: #0E3A4C; }
[data-theme="dark"] .bg-float { color: #16384A; }
/* Quiz screens in the «Көк аспан» palette (answer tiles keep their game colours). */
.quiz-hero { background: radial-gradient(500px 260px at 0% 0%, rgba(44, 199, 228, .45), transparent 70%), radial-gradient(500px 300px at 100% 120%, rgba(242, 194, 48, .35), transparent 70%), linear-gradient(135deg, #063A52, #0A2533); box-shadow: 0 24px 60px -30px rgba(6, 58, 82, .9); }
.quiz-stage { background: radial-gradient(700px 360px at 100% 0%, rgba(44, 199, 228, .18), transparent 70%), linear-gradient(160deg, #063A52, #08304A 60%, #0A2533); box-shadow: 0 30px 70px -40px rgba(6, 58, 82, .9); }
.land-login { background: var(--grad-gold) !important; color: var(--navy) !important; border-color: transparent !important; }

/* ---------------------------------------------------------------- Telegram */
.tg-card .tg-btn { margin-top: 4px; }
.tg-card .tg-wait { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-soft-border); }
.tg-card .tg-wait p { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; }
.tg-card .tg-kinds { margin: 6px 0 12px; }
.tg-steps { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 6px; }
.tg-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.tg-error { color: var(--bad); word-break: break-word; }
[data-theme="dark"] .tg-card .tg-wait { background: rgba(var(--accent-rgb), .12); border-color: rgba(var(--accent-rgb), .3); }

/* ---------------------------------------------------------------- Sponsors board + Help the club */
.btn-gold { background: var(--grad-gold); border-color: transparent; color: var(--navy) !important; font-weight: 700; box-shadow: 0 8px 18px -10px rgba(224, 172, 20, .9); }
.btn-gold:hover { filter: brightness(1.05); transform: translateY(-1px); }
.label-text { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.check-line { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 500 !important; cursor: pointer; }
.hp-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.sp-page { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.land-section.sp-page { max-width: none; }
.land-section.sp-page > * { width: 100%; max-width: 1120px; margin-left: auto; margin-right: auto; }

.sp-hero { position: relative; overflow: hidden; text-align: center; padding: clamp(28px, 5vw, 52px) clamp(16px, 5vw, 56px); border-radius: 24px; color: #fff;
  background: radial-gradient(520px 260px at 85% -10%, rgba(242, 194, 48, .35), transparent 70%), radial-gradient(520px 280px at 0% 110%, rgba(var(--accent-rgb), .45), transparent 70%), linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); }
.sp-hero h1 { color: #fff; font-size: clamp(26px, 4vw, 40px); margin: 8px 0 10px; }
.sp-hero p { max-width: 720px; margin: 0 auto; color: rgba(255, 255, 255, .86); line-height: 1.6; }
.sp-hero .eyebrow { color: #F7D768; }
.sp-hero-ic { width: 60px; height: 60px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 18px; background: var(--grad-gold); color: var(--navy); box-shadow: 0 10px 30px -10px rgba(242, 194, 48, .8); }
.sp-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.sp-stat { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); font-size: 14px; }
.sp-stat b { font-size: 16px; }
.sp-stat.big { background: var(--grad-gold); color: var(--navy); border-color: transparent; }
.sp-stat.big b { font-size: 18px; }

.sp-tier-title { display: flex; align-items: center; gap: 10px; font-size: clamp(20px, 2.6vw, 26px); margin: 0 0 14px; }
.sp-tier-main .sp-tier-title { color: var(--gold-d); }
.sp-tier-title .ic { padding: 7px; box-sizing: content-box; border-radius: 12px; background: var(--accent-soft); color: var(--orange-d); }
.sp-tier-main .sp-tier-title .ic { background: rgba(242, 194, 48, .18); color: var(--gold-d); }
.sp-grid { display: grid; gap: 16px; }
.sp-grid-main { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.sp-grid-partner { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.sp-grid-friend { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }

.sp-card { position: relative; background: var(--card); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; transition: transform .2s, box-shadow .2s; }
.sp-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px rgba(var(--navy-rgb), .45); }
.sp-card h3 { margin: 0 0 6px; font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
.sp-card-head { display: flex; gap: 14px; align-items: center; }
.sp-main { padding: 26px; border: 2px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--grad-gold) border-box; }
.sp-main h3 { font-size: 22px; }
.sp-partner { border-top: 4px solid var(--orange); }
.sp-friend { padding: 14px 16px; gap: 8px; border-radius: 16px; }
.sp-friend h3 { font-size: 15px; }
.sp-friend .sp-text { font-size: 13px; }
.sp-ribbon { position: absolute; top: -12px; right: 18px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--grad-gold); color: var(--navy); font-size: 12px; font-weight: 800; box-shadow: 0 6px 16px -8px rgba(224, 172, 20, .9); }
.sp-logo { --s: 64px; width: var(--s); height: var(--s); flex: 0 0 var(--s); border-radius: calc(var(--s) * .26); background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.sp-logo img { width: 100%; height: 100%; object-fit: contain; padding: calc(var(--s) * .08); box-sizing: border-box; }
.sp-initials { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #F7D768; font-weight: 800; font-size: calc(var(--s) * .34); border: 0; letter-spacing: .02em; }
.sp-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-kind { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--orange-d); }
.sp-text { margin: 0; color: var(--text); line-height: 1.55; font-size: 15px; overflow-wrap: anywhere; }
.sp-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin-top: auto; }
.sp-meta span, .sp-meta a { display: inline-flex; align-items: center; gap: 5px; }

.sp-empty { text-align: center; padding: 40px 20px; }
.sp-empty h2 { margin: 12px 0 6px; }
.sp-empty-ic { width: 70px; height: 70px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; background: rgba(242, 194, 48, .18); color: var(--gold-d); }

.sp-cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 26px clamp(18px, 4vw, 34px); border-radius: 22px; color: #fff;
  background: radial-gradient(400px 200px at 100% 0%, rgba(242, 194, 48, .3), transparent 70%), linear-gradient(135deg, var(--navy), var(--navy-2)); }
.sp-cta h2 { color: #fff; margin: 0 0 4px; }
.sp-cta p { margin: 0; color: rgba(255, 255, 255, .82); max-width: 560px; }

/* landing strip */
.land-sponsors { display: flex; flex-direction: column; gap: 22px; align-items: center; }
.sp-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 26px; max-width: 1000px; }
.sp-strip-item { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 110px; text-align: center; font-size: 13px; font-weight: 600; color: var(--text); text-decoration: none; }
.sp-strip-item .sp-logo { transition: transform .2s; }
.sp-strip-item:hover .sp-logo { transform: scale(1.06); }
.sp-help-band { width: 100%; max-width: 1000px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px 24px; border-radius: 22px; color: #fff;
  background: radial-gradient(360px 180px at 100% 0%, rgba(242, 194, 48, .3), transparent 70%), linear-gradient(135deg, var(--navy), var(--navy-2)); }
.sp-help-band h3 { color: #fff; margin: 0 0 4px; }
.sp-help-band p { margin: 0; color: rgba(255, 255, 255, .82); }
.sp-help-ic { width: 54px; height: 54px; flex: 0 0 54px; display: grid; place-items: center; border-radius: 16px; background: var(--grad-gold); color: var(--navy); }
.land-foot-links { font-size: 14px; }

/* help page */
.hp-goal { max-width: 560px; margin: 24px auto 0; text-align: left; padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); }
.hp-goal h3 { color: #fff; margin: 4px 0 10px; font-size: 17px; }
.hp-goal .muted { color: rgba(255, 255, 255, .7); }
.hp-goal p { margin: 8px 0 0; text-align: left; }
.hp-pct { color: #F7D768; font-size: 18px; }
.hp-bar { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.hp-bar span { display: block; height: 100%; border-radius: inherit; background: var(--grad-gold); box-shadow: 0 0 16px rgba(242, 194, 48, .6); min-width: 6px; }

.hp-pay { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; border: 2px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--grad-gold) border-box; }
.hp-pay-text { flex: 1 1 300px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.hp-pay h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 22px; }
.hp-pay h2 .ic { color: var(--gold-d); }
.hp-details { margin: 0; white-space: pre-wrap; font-family: var(--body); font-size: 17px; font-weight: 600; line-height: 1.6; padding: 12px 16px; border-radius: 12px; background: var(--none-bg); width: 100%; box-sizing: border-box; overflow-wrap: anywhere; }
.hp-qr { margin: 0 auto; text-align: center; }
.hp-qr img { width: 180px; height: 180px; object-fit: contain; border-radius: 14px; background: #fff; padding: 8px; border: 1px solid var(--line); }

.hp-ways { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.hp-way { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); transition: transform .2s, border-color .2s; }
.hp-way:hover { transform: translateY(-3px); border-color: var(--orange); }
.hp-way h3 { margin: 6px 0 0; font-size: 17px; }
.hp-way p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; flex: 1; }
.hp-way-ic { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--accent-soft); color: var(--orange-d); }
.hp-pick { align-self: flex-start; background: none; border: 0; padding: 4px 0 0; font-weight: 700; cursor: pointer; font-size: 14px; }

.hp-form-card { padding: clamp(18px, 4vw, 30px); scroll-margin-top: 20px; }
.hp-form-head h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; }
.hp-form-head p { margin: 0 0 16px; }
.hp-contact { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hp-thanks { text-align: center; padding: 24px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hp-thanks h2 { margin: 6px 0 0; }
.hp-thanks-ic { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; background: var(--grad-gold); color: var(--navy); animation: hp-pop .5s ease; }
@keyframes hp-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* admin */
.sp-admin-list .list-row { gap: 10px; flex-wrap: wrap; }
.sp-admin-list .icon-btn:disabled { opacity: .3; cursor: default; }
.sp-logo-row { display: flex; align-items: center; gap: 14px; }
.offer-list { display: flex; flex-direction: column; gap: 12px; margin: 14px 0 22px; }
.offer { display: flex; flex-direction: column; gap: 8px; }
.offer-amount, .offer-msg { margin: 0; overflow-wrap: anywhere; }
.offer-msg { color: var(--muted); }
.offer-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 8px; border-top: 1px solid var(--line); }
.offer-actions input { flex: 1 1 200px; }
.hs-qr { width: 110px; height: 110px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); background: #fff; }

[data-theme="dark"] .sp-logo { background: #F4F8FA; border-color: transparent; }
[data-theme="dark"] .sp-initials { background: linear-gradient(135deg, #0A2533, #10405A); }
[data-theme="dark"] .sp-card, [data-theme="dark"] .hp-way { border-color: rgba(30, 65, 82, .8); }
[data-theme="dark"] .sp-main, [data-theme="dark"] .hp-pay { border-color: transparent; }
[data-theme="dark"] .sp-kind, [data-theme="dark"] .hp-way-ic, [data-theme="dark"] .sp-tier-title .ic { background: rgba(var(--accent-rgb), .14); }
[data-theme="dark"] .sp-tier-main .sp-tier-title { color: #F2C230; }
[data-theme="dark"] .hp-pay h2 .ic { color: #F2C230; }
[data-theme="dark"] .sp-hero, [data-theme="dark"] .sp-cta, [data-theme="dark"] .sp-help-band { background: radial-gradient(520px 260px at 85% -10%, rgba(242, 194, 48, .22), transparent 70%), radial-gradient(520px 280px at 0% 110%, rgba(var(--accent-rgb), .3), transparent 70%), linear-gradient(135deg, #0A2533, #0D3346); border: 1px solid rgba(30, 65, 82, .8); }
@media (max-width: 640px) {
  .sp-card-head { align-items: flex-start; }
  .sp-cta, .sp-help-band { flex-direction: column; align-items: stretch; text-align: center; }
  .sp-help-ic { margin: 0 auto; }
  .hp-pay { flex-direction: column; align-items: stretch; }
}
@media (max-width: 640px) {
  .sp-help-band .row-gap, .sp-cta .btn { width: 100%; }
  .sp-help-band .row-gap .btn { flex: 1 1 100%; justify-content: center; }
}

/* ---------------------------------------------------------------- Animated guided tour */
.gt { position: fixed; inset: 0; z-index: 2000; animation: gt-fade .3s ease; }
.gt.gt-leave { opacity: 0; transition: opacity .25s; }
.gt-block { position: absolute; inset: 0; }
.gt.gt-intro-on .gt-block { background: rgba(var(--navy-rgb), .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.gt-hole { position: fixed; border-radius: 16px; pointer-events: none; box-shadow: 0 0 0 200vmax rgba(6, 26, 38, .62); transition: top .55s cubic-bezier(.65, 0, .35, 1), left .55s cubic-bezier(.65, 0, .35, 1), width .55s cubic-bezier(.65, 0, .35, 1), height .55s cubic-bezier(.65, 0, .35, 1), opacity .3s; }
.gt-hole::after { content: ""; position: absolute; inset: -4px; border-radius: 19px; border: 3px solid #F2C230; box-shadow: 0 0 24px rgba(242, 194, 48, .6); animation: gt-glow 1.6s ease-in-out infinite; }
.gt-hole.gt-hole-off { top: 50% !important; left: 50% !important; width: 0 !important; height: 0 !important; }
.gt-hole.gt-hole-off::after { display: none; }
.gt-cursor { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 3; transform: translate(50vw, 110vh); transition: transform .85s cubic-bezier(.45, 0, .2, 1); filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .35)); }
.gt-cursor svg { display: block; transition: transform .15s; transform-origin: 4px 2px; }
.gt-cursor.gt-click svg { transform: scale(.82); }
.gt-ripple { position: fixed; z-index: 2; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 3px solid #F2C230; pointer-events: none; animation: gt-ripple .8s ease-out forwards; }
.gt-stage { position: absolute; inset: 0; pointer-events: none; }
.gt-stage > * { pointer-events: auto; }

.gt-card { position: fixed; width: min(380px, calc(100vw - 32px)); background: var(--card); color: var(--text); border-radius: 20px; padding: 0 20px 16px; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .55); overflow: hidden; animation: gt-in .4s cubic-bezier(.2, .9, .3, 1.2); transition: top .45s ease, left .45s ease; }
.gt-card.gt-center { top: 50%; left: 50%; transform: translate(-50%, -50%); animation: gt-fade .3s; }
.gt-card.gt-sheet { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; top: auto !important; }
.gt-card.gt-sheet-top { bottom: auto; top: calc(12px + env(safe-area-inset-top)) !important; }
.gt-progress { height: 4px; margin: 0 -20px 14px; background: var(--none-bg); }
.gt-progress span { display: block; height: 100%; background: var(--grad-gold); border-radius: 0 4px 4px 0; transition: width .5s ease; }
.gt-head { display: flex; align-items: center; gap: 10px; }
.gt-ic { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 12px; background: var(--grad-orange); color: #fff; box-shadow: 0 8px 18px -8px rgba(var(--accent-rgb), .9); }
.gt-count { font-size: 13px; font-weight: 700; color: var(--muted); flex: 1; }
.gt-x { margin-right: -6px; }
.gt-card h3 { margin: 12px 0 6px; font-size: 19px; animation: gt-up .45s .05s both; }
.gt-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; animation: gt-up .45s .12s both; }
.gt-tip { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); border: 1px dashed var(--accent-soft-border); font-size: 14px; display: flex; flex-direction: column; gap: 3px; animation: gt-up .45s .22s both; }
.gt-tip b { display: inline-flex; align-items: center; gap: 5px; color: var(--orange-d); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.gt-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; }
.gt-nav.center { justify-content: center; }

.gt-intro { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; background: var(--card); color: var(--text); border-radius: 26px; padding: 30px 26px 22px; text-align: center; box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .6); animation: gt-pop .55s cubic-bezier(.2, .9, .3, 1.25); }
.gt-intro .gt-x { position: absolute; top: 14px; right: 16px; }
.gt-logo { position: relative; width: 96px; height: 96px; margin: 0 auto 6px; }
.gt-logo img { width: 100%; height: 100%; border-radius: 50%; animation: gt-spin-in .9s cubic-bezier(.2, .9, .3, 1.2) both; }
.gt-orbit { position: absolute; inset: -10px; border-radius: 50%; border: 2px dashed rgba(242, 194, 48, .7); animation: gt-rotate 12s linear infinite; }
.gt-hi { margin: 10px 0 8px; font-size: 26px; animation: gt-up .5s .35s both; }
.gt-role { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--grad-gold); color: var(--navy); animation: gt-up .5s .45s both; }
.gt-lead { margin: 12px 0 6px; color: var(--muted); line-height: 1.55; animation: gt-up .5s .55s both; }
.gt-can { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.gt-can li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--accent-soft); font-weight: 600; font-size: 14.5px; animation: gt-slide .5s var(--d) both; }
.gt-can li .ic { color: var(--ok); flex: 0 0 auto; }
.gt-meta { margin: 14px 0 0; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.gt-intro .gt-nav { margin-top: 18px; }
.gt-trophy { width: 84px; height: 84px; margin: 0 auto; display: grid; place-items: center; border-radius: 26px; background: var(--grad-gold); color: var(--navy); box-shadow: 0 14px 34px -10px rgba(242, 194, 48, .9); animation: gt-spin-in .8s cubic-bezier(.2, .9, .3, 1.3) both; }

body.gt-on { overflow: hidden; }
[data-theme="dark"] .gt-card, [data-theme="dark"] .gt-intro { background: #0C2330; }
[data-theme="dark"] .gt-tip, [data-theme="dark"] .gt-can li { background: rgba(var(--accent-rgb), .12); border-color: rgba(var(--accent-rgb), .3); }

@keyframes gt-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gt-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes gt-pop { from { opacity: 0; transform: translate(-50%, -46%) scale(.9); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes gt-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes gt-slide { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes gt-spin-in { from { opacity: 0; transform: scale(.3) rotate(-160deg); } to { opacity: 1; transform: none; } }
@keyframes gt-rotate { to { transform: rotate(360deg); } }
@keyframes gt-glow { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes gt-ripple { from { transform: scale(.4); opacity: 1; } to { transform: scale(4.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .gt *, .gt *::after { animation: none !important; transition: none !important; }
}

/* ================================================================ Layout v3: icon rail + stories + bento + hero road */
@media (min-width: 861px) {
  :root { --sidebar: 84px; }
  .sidebar { width: 84px; padding: 16px 12px; overflow: hidden; transition: width .25s cubic-bezier(.4, 0, .2, 1), box-shadow .25s; z-index: 30; }
  .sidebar:hover, .sidebar:focus-within { width: 252px; box-shadow: 14px 0 44px -14px rgba(var(--navy-rgb), .55); }
  .sidebar .brand { padding: 0 4px 16px; white-space: nowrap; }
  .sidebar .brand img { flex: 0 0 44px; }
  .sidebar nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; gap: 3px; }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .sidebar nav a { padding: 10px 18px; gap: 18px; white-space: nowrap; }
  .sidebar nav a:hover { transform: none; }
  .sidebar nav a .ic { flex: 0 0 20px; }
  .sidebar .brand span, .sidebar nav a > span:not(.nbadge), .sidebar .who > span:last-child, .sidebar .side-copy { opacity: 0; transition: opacity .12s; }
  .sidebar:hover .brand span, .sidebar:hover nav a > span:not(.nbadge), .sidebar:hover .who > span:last-child, .sidebar:hover .side-copy,
  .sidebar:focus-within .brand span, .sidebar:focus-within nav a > span:not(.nbadge), .sidebar:focus-within .who > span:last-child { opacity: 1; transition-delay: .1s; }
  .sidebar nav a .nbadge { position: absolute; top: 3px; left: 34px; }
  .sidebar:hover nav a .nbadge { position: static; margin-left: auto; }
  .sidebar-foot { padding: 0 4px; gap: 10px; }
  .sidebar-foot .row-gap { flex-wrap: nowrap; }
  .sidebar:not(:hover):not(:focus-within) .sidebar-foot .lang-switch { display: none; }
  .sidebar:not(:hover):not(:focus-within) .sidebar-foot .row-gap { justify-content: center; }
  .sidebar .who { flex-direction: row; align-items: center; gap: 10px; white-space: nowrap; }
  .sidebar .who-av { flex: 0 0 36px; }
  .view { margin-left: 84px; max-width: calc(1240px + 84px); }
}

/* ---- stories */
.stories { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; margin: 0 0 6px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story-btn { flex: 0 0 auto; width: 78px; display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--text); font: inherit; }
.story-ring { width: 70px; height: 70px; border-radius: 50%; padding: 3px; background: var(--line); display: grid; place-items: center; transition: transform .2s; }
.story-btn:hover .story-ring { transform: scale(1.06); }
.story-btn.new .story-ring { background: conic-gradient(from 200deg, #F7D768, #F2C230, #00A3C4, #2CC7E4, #F7D768); }
.story-av { width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--bg); background: var(--sc); color: #fff; display: grid; place-items: center; overflow: hidden; }
.story-av img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.story-name { font-size: 12px; font-weight: 600; max-width: 78px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-btn:not(.new) .story-name { color: var(--muted); font-weight: 500; }

.story-view { position: fixed; inset: 0; z-index: 1900; background: rgba(3, 16, 24, .92); display: grid; place-items: center; animation: gt-fade .2s; }
.story-view.leave { opacity: 0; transition: opacity .2s; }
.sv-card { position: relative; width: min(420px, 100vw); height: min(92vh, 760px); border-radius: 24px; overflow: hidden; color: #fff; display: flex; flex-direction: column; padding: 14px 20px 22px;
  background: radial-gradient(120% 70% at 85% 0%, color-mix(in srgb, var(--sc) 75%, transparent) 0%, transparent 65%), radial-gradient(90% 60% at 0% 100%, rgba(242, 194, 48, .25), transparent 70%), linear-gradient(165deg, color-mix(in srgb, var(--sc) 55%, #062C3F) 0%, #062C3F 100%); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.sv-bars { display: flex; gap: 4px; position: relative; z-index: 3; }
.sv-bars span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.sv-bars i { display: block; height: 100%; width: 0; background: #fff; }
.sv-bars .done i { width: 100%; }
.sv-head { display: flex; align-items: center; gap: 10px; margin-top: 12px; position: relative; z-index: 3; }
.sv-av { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: grid; place-items: center; overflow: hidden; flex: 0 0 36px; }
.sv-av img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.sv-time { opacity: .7; font-size: 13px; }
.sv-x { margin-left: auto; background: none; border: 0; color: #fff; cursor: pointer; padding: 6px; }
.sv-body { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px; animation: gt-up .45s both; }
.sv-ic { width: 100px; height: 100px; border-radius: 30px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); display: grid; place-items: center; }
.sv-img { width: 150px; max-height: 210px; object-fit: cover; border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.sv-kind { font-size: 13px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #F7D768; }
.sv-body h2 { color: #fff; font-size: clamp(24px, 6vw, 32px); line-height: 1.15; margin: 0; overflow-wrap: anywhere; }
.sv-body p { margin: 0; opacity: .85; font-size: 16px; line-height: 1.5; }
.sv-cta { position: relative; z-index: 3; justify-content: center; }
.sv-tap { position: absolute; top: 80px; bottom: 90px; width: 42%; background: none; border: 0; z-index: 2; cursor: pointer; }
.sv-prev { left: 0; } .sv-next { right: 0; }
@media (max-width: 600px) { .sv-card { width: 100vw; height: 100dvh; border-radius: 0; padding-top: calc(14px + env(safe-area-inset-top)); padding-bottom: calc(22px + env(safe-area-inset-bottom)); } }

/* ---- bento home */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 16px; margin-top: 4px; }
.tile { align-items: stretch; text-align: left; position: relative; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; color: var(--text); text-decoration: none; overflow: hidden; transition: transform .2s, box-shadow .2s; }
a.tile:hover { transform: translateY(-3px); box-shadow: 0 20px 44px -24px rgba(var(--navy-rgb), .5); }
.span2 { grid-column: span 2; }
.row2 { grid-row: span 2; }
.t-label { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.t-big { font-family: var(--head); font-size: 30px; font-weight: 800; line-height: 1.1; }
.t-title { font-size: 17px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.t-sub { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.t-empty { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; }

.t-hello { color: #fff; border: 0; background: radial-gradient(420px 220px at 100% 0%, rgba(242, 194, 48, .28), transparent 70%), radial-gradient(360px 220px at 0% 100%, rgba(var(--accent-rgb), .35), transparent 70%), linear-gradient(135deg, var(--navy), var(--navy-2)); }
.t-hello .eyebrow { color: #F7D768; }
.t-hello h1 { color: #fff; font-size: 34px; margin: 0; }
.t-hello .t-sub { color: rgba(255, 255, 255, .82); }
.t-hello .t-sub b { color: #F7D768; }
.t-hello-top { display: flex; align-items: center; gap: 14px; }
.ring { --p: 0; position: relative; flex: 0 0 86px; width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: conic-gradient(#F2C230 calc(var(--p) * 1%), rgba(255, 255, 255, .14) 0); }
.ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #0A3F58; }
.ring b { position: relative; font-size: 18px; font-family: var(--head); }
.t-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; margin-top: auto; padding-top: 8px; }
.t-stats a { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); color: #fff; text-decoration: none; transition: background .15s; }
.t-stats a:hover { background: rgba(255, 255, 255, .18); }
.t-stats b { font-family: var(--head); font-size: 21px; }
.t-stats span { font-size: 12px; opacity: .75; }

.t-map { padding: 0; border: 0; background: linear-gradient(180deg, #062C3F 0%, #0B4A66 55%, #0F5470 100%); min-height: 230px; justify-content: center; }
.t-map .t-label { position: absolute; top: 14px; left: 16px; z-index: 2; color: #F7D768; }

.hroad svg { display: block; width: 100%; height: auto; }
.hero-path .hroad { margin-top: 14px; border-radius: 18px; overflow: hidden; }
.hr-star { fill: #fff; animation: hr-twinkle 3.2s ease-in-out infinite; }
.hr-tree path { fill: #0A3A50; }
.hr-tree rect { fill: #072A3A; }
.hr-edge { fill: none; stroke: #1B6C8C; stroke-width: 32; stroke-linecap: round; }
.hr-asphalt { fill: none; stroke: #0A2F42; stroke-width: 26; stroke-linecap: round; }
.hr-dash { fill: none; stroke: rgba(255, 255, 255, .32); stroke-width: 2; stroke-dasharray: 10 12; }
.hr-path { fill: none; stroke: url(#hr-gold); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 0 1; filter: drop-shadow(0 0 6px rgba(242, 194, 48, .75)); }
.hr-dot { fill: #123F55; stroke: #2B6A86; stroke-width: 3; }
.hr-done .hr-dot { fill: #F2C230; stroke: #FFF0B8; }
.hr-now .hr-dot { fill: var(--c); stroke: #fff; stroke-width: 4; }
.hr-pulse { fill: none; stroke: #F2C230; stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: hr-pulse 1.8s ease-out infinite; }
.hr-ic { color: #fff; }
.hr-done .hr-ic { color: #063A52; }
.hr-locked .hr-ic { color: #5F8DA3; }
.hr-label { fill: #fff; font-family: var(--head); font-size: 15px; font-weight: 800; text-anchor: middle; paint-order: stroke; stroke: #062C3F; stroke-width: 5px; stroke-linejoin: round; }
.hr-locked .hr-label { fill: #8FB0BE; }
.hr-xp { fill: #8FB0BE; font-size: 12px; font-weight: 600; text-anchor: middle; paint-order: stroke; stroke: #062C3F; stroke-width: 4px; }
.hr-av { fill: #F2C230; stroke: #fff; stroke-width: 3; }
.hr-av-t { fill: #063A52; font-family: var(--head); font-size: 16px; font-weight: 800; text-anchor: middle; }
.hr-pin { fill: #fff; }
.hr-flag rect { fill: #fff; }
.hr-flag text { fill: #063A52; font-size: 12px; font-weight: 800; text-anchor: middle; }
.hroad-compact .hr-label { font-size: 17px; }
@keyframes hr-twinkle { 0%, 100% { opacity: .9; } 50% { opacity: .25; } }
@keyframes hr-pulse { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }

.t-team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; flex: 1; align-content: start; }
.t-team-item { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 16px; background: var(--none-bg); color: var(--text); text-decoration: none; }
.t-team-item span { color: var(--muted); }
.t-team-item.hot { background: var(--accent-soft); }
.t-team-item.hot span { color: var(--orange-d); }
.t-team-item b { font-family: var(--head); font-size: 26px; }
.t-team-item small { color: var(--muted); font-size: 12px; }

.t-book { background: linear-gradient(180deg, color-mix(in srgb, var(--sec) 16%, var(--card)) 0%, var(--card) 70%); }
.t-cover { height: 170px; border-radius: 16px; overflow: hidden; display: grid; place-items: center; color: var(--sec); background: color-mix(in srgb, var(--sec) 22%, var(--card)); }
.t-cover img { width: 100%; height: 100%; object-fit: cover; }
.t-btn { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; background: var(--grad-orange); color: #fff; font-size: 13px; font-weight: 700; }
.t-quiz { border: 0; color: #fff; background: radial-gradient(160px 120px at 100% 0%, rgba(242, 194, 48, .35), transparent 70%), linear-gradient(135deg, #00A3C4, #2CC7E4); }
.t-quiz .t-label { color: rgba(255, 255, 255, .88); }
.t-quiz .t-big { font-size: 21px; }
.t-go { position: absolute; right: 14px; bottom: 14px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .22); display: grid; place-items: center; }
.t-rank .t-big { color: var(--orange-d); font-size: 36px; }
.t-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin: 0 -8px; border-radius: 14px; color: var(--text); text-decoration: none; transition: background .15s; }
.t-row:hover { background: var(--none-bg); }
.t-row b { display: block; font-size: 14.5px; overflow-wrap: anywhere; }
.t-row small { display: block; color: var(--muted); font-size: 12px; }
.t-dot { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--sec); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sec) 20%, transparent); }
.t-due { flex: 0 0 auto; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--none-bg); color: var(--muted); }
.t-due.soon { background: var(--warn-bg); color: var(--warn); }
.t-event > .grow { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.t-event { flex-direction: row; align-items: center !important; gap: 14px; border: 0; color: var(--navy); background: var(--grad-gold); }
.t-event .t-label { color: rgba(6, 58, 82, .75); }
.t-event .t-sub { color: rgba(6, 58, 82, .8); }
.t-date { flex: 0 0 66px; height: 66px; border-radius: 18px; background: rgba(255, 255, 255, .55); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.t-date b { font-family: var(--head); font-size: 26px; }
.t-date small { font-size: 12px; font-weight: 700; text-transform: uppercase; }
.t-talk { background: linear-gradient(135deg, color-mix(in srgb, var(--sec) 14%, var(--card)), var(--card)); }
.t-invite { padding: 0; background: none; border: 0; box-shadow: none; }
.t-invite .card { margin: 0; }

[data-theme="dark"] .tile { border-color: rgba(30, 65, 82, .8); }
[data-theme="dark"] .t-hello, [data-theme="dark"] .t-quiz, [data-theme="dark"] .t-event, [data-theme="dark"] .t-map { border: 0; }
[data-theme="dark"] .t-date { background: rgba(255, 255, 255, .45); }

@media (max-width: 1180px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .bento { gap: 12px; }
  .tile { border-radius: 20px; padding: 15px; }
  .t-hello h1 { font-size: 28px; }
  .ring { flex-basis: 72px; width: 72px; height: 72px; }
  .t-cover { height: 130px; }
  .t-map { min-height: 190px; }
  .story-btn { width: 70px; }
  .story-ring { width: 64px; height: 64px; }
}
@media (prefers-reduced-motion: reduce) { .hr-star, .hr-pulse { animation: none; } }
.t-hello .t-sub { display: block; line-height: 1.45; }
.t-hello .t-sub .ic { vertical-align: -2px; }
@media (max-width: 600px) {
  .t-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .t-stats a { padding: 8px 8px; border-radius: 13px; }
  .t-stats b { font-size: 18px; }
  .t-stats span { font-size: 10px; line-height: 1.25; letter-spacing: -.01em; }
  .t-stats a { padding: 8px 6px; }
}

/* ================================================================ Landing v2: hero + phone + numbers + night road */
.l2 { background: #041E2B; color: #E3F1F6; }
.l2 .land-foot { background: #03161F; border-top-color: rgba(255, 255, 255, .08); color: #B9D3DE; }
.l2 .land-foot .muted { color: #7FA3B3; }
.l2-top { position: sticky; top: 0; z-index: 30; background: rgba(4, 30, 43, .82); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.l2-links { display: flex; gap: 22px; margin: 0 auto 0 32px; }
.l2-links a { color: rgba(255, 255, 255, .78); font-weight: 600; font-size: 14px; }
.l2-links a:hover { color: #F7D768; }

.l2-hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 90px) clamp(16px, 6vw, 80px) clamp(56px, 8vw, 100px);
  background: radial-gradient(700px 400px at 85% 20%, rgba(242, 194, 48, .18), transparent 70%), radial-gradient(800px 500px at 0% 100%, rgba(0, 163, 196, .28), transparent 70%), linear-gradient(180deg, #041E2B 0%, #063A52 100%); }
.l2-sky { position: absolute; inset: 0; pointer-events: none; }
.l2-sky i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: .7; animation: hr-twinkle 3.4s ease-in-out infinite; }
.l2-sky i:nth-child(5n) { width: 3px; height: 3px; }
.l2-hero-in { position: relative; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.l2-hero-text .eyebrow { color: #F7D768; }
.l2-hero h1 { color: #fff; font-size: clamp(40px, 6.4vw, 76px); line-height: 1.02; margin: 14px 0 18px; letter-spacing: -.02em; }
.l2-hero .lead { color: rgba(255, 255, 255, .8); font-size: clamp(16px, 1.6vw, 19px); max-width: 560px; margin: 0 0 26px; line-height: 1.6; }
.l2-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; color: #7FDBEE; font-weight: 600; font-size: 14px; }

.l2-phone-wrap { position: relative; display: grid; place-items: center; min-height: 560px; }
.l2-phone { position: relative; width: 270px; height: 550px; border-radius: 44px; padding: 12px; background: #0B2A3A; box-shadow: 0 0 0 2px #1E4D63, 0 40px 90px -20px rgba(0, 0, 0, .7), 0 0 120px -20px rgba(0, 163, 196, .5); animation: l2-bob 6s ease-in-out infinite; }
.l2-notch { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 90px; height: 22px; border-radius: 12px; background: #0B2A3A; z-index: 2; }
.l2-screen { height: 100%; border-radius: 34px; overflow: hidden; background: #F3F8FA; padding: 46px 12px 12px; display: flex; flex-direction: column; gap: 9px; color: #0B2A3A; font-size: 11px; }
.l2-ph-top { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.l2-ph-top img { width: 20px; height: 20px; }
.l2-ph-stories { display: flex; gap: 8px; }
.l2-sdot { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--c); box-shadow: 0 0 0 2px #fff, 0 0 0 4px #F2C230; }
.l2-ph-hello { display: flex; align-items: center; justify-content: space-between; padding: 12px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #063A52, #0A5878); }
.l2-ph-hello small { display: block; color: #F7D768; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.l2-ph-hello b { display: block; font-family: var(--head); font-size: 18px; }
.l2-ph-hello span { font-size: 10px; opacity: .8; }
.l2-ph-ring { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#F2C230 30%, rgba(255, 255, 255, .15) 0); position: relative; }
.l2-ph-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #0A4A66; }
.l2-ph-ring i { position: relative; font-style: normal; font-size: 10px; font-weight: 800; }
.l2-ph-map { border-radius: 16px; overflow: hidden; background: #062C3F; }
.l2-ph-map .hr-label, .l2-ph-map .hr-flag { display: none; }
.l2-ph-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; }
.l2-ph-quiz { padding: 10px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #00A3C4, #2CC7E4); font-weight: 700; }
.l2-ph-quiz b { display: block; font-family: var(--head); font-size: 15px; letter-spacing: .08em; }
.l2-ph-rank { padding: 10px; border-radius: 14px; background: #fff; border: 1px solid #D6E4EA; font-family: var(--head); font-size: 20px; font-weight: 800; color: #00799A; }
.l2-ph-rank small { display: block; font-family: var(--body); font-size: 9px; color: #557080; font-weight: 600; }
.l2-float { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .96); color: #0B2A3A; font-weight: 700; font-size: 14px; box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .6); animation: l2-float 5s ease-in-out infinite; white-space: nowrap; }
.l2-float .ic { color: #00A3C4; }
.l2-float.f1 { top: 12%; left: -2%; }
.l2-float.f2 { top: 30%; right: -4%; animation-delay: -1.2s; }
.l2-float.f3 { bottom: 24%; left: -6%; animation-delay: -2.4s; }
.l2-float.f4 { bottom: 8%; right: 2%; animation-delay: -3.6s; background: #F2C230; }
.l2-float.f4 .ic { color: #063A52; }
@keyframes l2-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes l2-bob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-10px) rotate(-1deg); } }

.l2-nums { position: relative; text-align: center; padding: clamp(40px, 6vw, 70px) clamp(16px, 6vw, 80px); background: #052433; border-top: 1px solid rgba(255, 255, 255, .06); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.l2-nums h2 { color: #fff; font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 6px; }
.l2-nums > p { color: #8FB0BE; margin: 0 0 26px; }
.l2-num-grid { max-width: 1000px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.l2-num-grid > .l2-num { flex: 1 1 160px; max-width: 200px; }
.l2-num { padding: 20px 12px; border-radius: 20px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.l2-num span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #063A52; background: var(--grad-gold); margin-bottom: 6px; }
.l2-num b { font-family: var(--head); font-size: clamp(30px, 4vw, 44px); color: #fff; line-height: 1; }
.l2-num small { color: #8FB0BE; font-size: 13px; }

.l2-journey { padding: clamp(48px, 7vw, 90px) clamp(16px, 5vw, 60px) clamp(40px, 6vw, 70px); background: radial-gradient(900px 500px at 100% 30%, rgba(0, 163, 196, .14), transparent 70%), radial-gradient(700px 400px at 0% 80%, rgba(242, 194, 48, .08), transparent 70%), #041E2B; }
.l2-journey-head { text-align: center; margin-bottom: 30px; }
.l2-journey-head h2 { color: #fff; font-size: clamp(28px, 3.8vw, 40px); margin: 0 0 6px; }
.l2-journey-head p { color: #8FB0BE; margin: 0; }
.l2-track { position: relative; max-width: 1080px; margin: 0 auto; padding-left: 110px; }
.l2-road { position: absolute; left: 0; top: 0; width: 110px; height: 100%; overflow: visible; }
.l2-road path { fill: none; stroke-linecap: round; }
.l2-road-base { stroke: #0B3A50; stroke-width: 30; }
.l2-road-dash { stroke: rgba(255, 255, 255, .25); stroke-width: 2; stroke-dasharray: 10 12; }
.l2-road-gold { stroke: #F2C230; stroke-width: 7; stroke-dasharray: 0 1; filter: drop-shadow(0 0 8px rgba(242, 194, 48, .7)); transition: stroke-dasharray .15s linear; }

.l2-station { position: relative; padding: 10px 0 64px; opacity: .25; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.l2-station.in { opacity: 1; transform: none; }
.l2-node { position: absolute; left: -110px; top: 6px; width: 110px; display: grid; place-items: center; }
.l2-node { font-family: var(--head); font-weight: 800; font-size: 18px; color: #8FB0BE; }
.l2-node::before { content: ""; position: absolute; width: 48px; height: 48px; border-radius: 50%; background: #0F3F57; border: 3px solid #2B6A86; z-index: -1; transition: background .5s, border-color .5s, box-shadow .5s; }
.l2-station.in .l2-node { color: #063A52; }
.l2-station.in .l2-node::before { background: #F2C230; border-color: #FFF0B8; box-shadow: 0 0 0 8px rgba(242, 194, 48, .18), 0 0 30px rgba(242, 194, 48, .6); }
.l2-node { height: 48px; z-index: 1; }
.l2-st-kicker { color: #F7D768; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.l2-st-body h2 { color: #fff; font-size: clamp(24px, 3vw, 34px); margin: 6px 0 12px; }
.l2-text { color: #B9D3DE; font-size: 16.5px; line-height: 1.65; max-width: 760px; margin: 0 0 20px; }
.l2-why { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.l2-why > div { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); color: #B9D3DE; font-size: 14px; line-height: 1.45; }
.l2-why .ic { color: #F2C230; flex: 0 0 auto; margin-top: 2px; }
.l2-why b { color: #fff; }

.l2-dirs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.l2-dir { position: relative; padding: 18px; border-radius: 20px; overflow: hidden; background: linear-gradient(160deg, color-mix(in srgb, var(--sec) 32%, #062C3F) 0%, #062C3F 75%); border: 1px solid color-mix(in srgb, var(--sec) 40%, transparent); transition: transform .2s; }
.l2-dir:hover { transform: translateY(-4px); }
.l2-dir-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--sec); box-shadow: 0 10px 24px -10px var(--sec); }
.l2-dir h3 { color: #fff; margin: 12px 0 4px; font-size: 17px; }
.l2-dir p { color: #B9D3DE; margin: 0; font-size: 14px; line-height: 1.5; }

.l2-show { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 14px; }
.l2-tile { position: relative; overflow: hidden; padding: 18px; border-radius: 22px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09); display: flex; flex-direction: column; gap: 6px; transition: transform .2s, border-color .2s; }
.l2-tile:hover { transform: translateY(-3px); border-color: rgba(242, 194, 48, .45); }
.l2-tile.wide { grid-column: span 2; }
.l2-tile-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(0, 163, 196, .2); color: #7FDBEE; }
.l2-tile h3 { color: #fff; margin: 6px 0 0; font-size: 16px; }
.l2-tile p { color: #9FC0CE; margin: 0; font-size: 13.5px; line-height: 1.5; }
.l2-tile.st-quiz { background: linear-gradient(135deg, #00A3C4, #2CC7E4); border: 0; }
.l2-tile.st-quiz .l2-tile-ic { background: rgba(255, 255, 255, .25); color: #fff; }
.l2-tile.st-quiz p { color: rgba(255, 255, 255, .88); }
.l2-tile.st-tg { background: linear-gradient(135deg, rgba(242, 194, 48, .22), rgba(255, 255, 255, .04)); }
.l2-show-stories { display: flex; gap: 10px; margin-bottom: 6px; }
.l2-show-stories .l2-sdot { width: 48px; height: 48px; box-shadow: 0 0 0 3px #041E2B, 0 0 0 5px #F2C230; }
.l2-show-map { margin: -18px -18px 8px; }
.l2-show-map .hr-flag { display: none; }

.l2-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: s; }
.l2-steps li { padding: 18px; border-radius: 20px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09); color: #B9D3DE; }
.l2-steps li > span { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--grad-gold); color: #063A52; font-family: var(--head); font-weight: 800; margin-bottom: 10px; }
.l2-steps b { display: block; color: #fff; font-size: 16px; margin-bottom: 4px; }
.l2-steps p { margin: 0; font-size: 14px; line-height: 1.5; }

.l2-station .land-sponsors { padding: 0; align-items: flex-start; }
.l2-station .land-sponsors .land-h2 { display: none; }
.l2-station .sp-strip { justify-content: flex-start; }
.l2-station .sp-strip-item { color: #E3F1F6; }
.l2-station .sp-help-band { max-width: none; border: 1px solid rgba(255, 255, 255, .1); }
.l2-finish { padding-bottom: 10px; }
.l2-finish .l2-st-body { padding: 26px; border-radius: 26px; background: radial-gradient(500px 240px at 100% 0%, rgba(242, 194, 48, .25), transparent 70%), linear-gradient(135deg, #063A52, #0A5878); border: 1px solid rgba(242, 194, 48, .3); }

@media (max-width: 1000px) {
  .l2-hero-in { grid-template-columns: 1fr; text-align: left; }
  .l2-phone-wrap { min-height: 520px; }
  .l2-num-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .l2-show { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .l2-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .l2-dirs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .l2-links { display: none; }
}
@media (max-width: 600px) {
  .l2-hero h1 { font-size: 42px; }
  .l2-phone { width: 230px; height: 470px; border-radius: 38px; }
  .l2-screen { border-radius: 28px; padding-top: 40px; }
  .l2-phone-wrap { min-height: 480px; }
  .l2-float { font-size: 12px; padding: 8px 11px; }
  .l2-float.f1 { left: 0; } .l2-float.f3 { left: 0; } .l2-float.f2 { right: 0; } .l2-float.f4 { right: 0; }
  .l2-num-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .l2-num:last-child { grid-column: span 2; }
  .l2-track { padding-left: 52px; }
  .l2-road { width: 52px; }
  .l2-road-base { stroke-width: 20; }
  .l2-node { left: -52px; width: 52px; height: 40px; font-size: 15px; }
  .l2-node::before { width: 38px; height: 38px; }
  .l2-dirs, .l2-show, .l2-steps { grid-template-columns: 1fr; }
  .l2-tile.wide { grid-column: auto; }
  .l2-station { padding-bottom: 48px; }
  .l2-finish .l2-st-body { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .l2-sky i, .l2-float, .l2-phone { animation: none; }
  .l2-station { opacity: 1; transform: none; }
}

/* ================================================================ Design v4: login + night headers + all pages */

/* ---- login */
.auth2 { position: relative; min-height: 100vh; display: grid; grid-template-columns: 1.1fr minmax(380px, .9fr); overflow: hidden; color: #fff;
  background: radial-gradient(700px 420px at 15% 20%, rgba(242, 194, 48, .16), transparent 70%), radial-gradient(800px 520px at 100% 100%, rgba(0, 163, 196, .3), transparent 70%), linear-gradient(160deg, #041E2B 0%, #063A52 100%); }
.auth2 > .l2-sky { position: absolute; inset: 0; pointer-events: none; }
.a2-side { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 60px clamp(24px, 6vw, 90px); }
.a2-side .eyebrow { color: #F7D768; }
.a2-side h1 { color: #fff; font-size: clamp(40px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -.02em; margin: 0; }
.a2-logo { position: relative; display: inline-block; width: 92px; height: 92px; }
.a2-logo img { width: 100%; height: 100%; border-radius: 50%; animation: gt-spin-in .9s cubic-bezier(.2, .9, .3, 1.2) both; }
.a2-logo i { position: absolute; inset: -10px; border-radius: 50%; border: 2px dashed rgba(242, 194, 48, .7); animation: gt-rotate 14s linear infinite; }
.a2-points { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.a2-points li { display: flex; align-items: center; gap: 12px; font-size: 16px; color: rgba(255, 255, 255, .85); animation: gt-slide .5s both; }
.a2-points li:nth-child(2) { animation-delay: .12s; } .a2-points li:nth-child(3) { animation-delay: .24s; }
.a2-points .ic { width: 38px; height: 38px; padding: 9px; box-sizing: border-box; border-radius: 12px; background: rgba(255, 255, 255, .1); color: #F7D768; flex: 0 0 38px; }
.a2-road { width: min(420px, 100%); height: auto; margin-top: 10px; }
.a2-road-gold { stroke-dasharray: 0 1; animation: a2-draw 2.2s .4s cubic-bezier(.45, 0, .2, 1) forwards; }
@keyframes a2-draw { to { stroke-dasharray: .45 1; } }
.a2-card { position: relative; z-index: 1; margin: 24px; align-self: center; justify-self: center; width: min(440px, calc(100vw - 32px)); padding: 26px 28px 20px; border-radius: 28px; color: var(--text); background: rgba(255, 255, 255, .97); box-shadow: 0 40px 90px -24px rgba(0, 0, 0, .65); display: flex; flex-direction: column; gap: 12px; animation: gt-in .5s cubic-bezier(.2, .9, .3, 1.2); }
.a2-card.shake { animation: a2-shake .45s; }
@keyframes a2-shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.a2-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.a2-back { font-size: 13px; font-weight: 600; color: var(--muted); }
.a2-mini-logo { width: 54px; height: 54px; margin-top: 4px; }
.a2-card h2 { margin: 0; font-size: 28px; }
.a2-sub { margin: -4px 0 4px; color: var(--muted); font-size: 14.5px; }
.a2-form { display: flex; flex-direction: column; gap: 14px; }
.a2-field { display: flex; flex-direction: column; gap: 6px; }
.a2-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.a2-input { display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px; height: 52px; border-radius: 16px; border: 1.5px solid #D6E4EA; background: #F6FAFC; transition: border-color .15s, box-shadow .15s, background .15s; }
.a2-input > .ic { color: #8FB0BE; flex: 0 0 auto; transition: color .15s; }
.a2-input input { flex: 1; min-width: 0; height: 100%; border: 0 !important; background: none !important; box-shadow: none !important; padding: 0 !important; font-size: 16px; color: var(--text); outline: none; }
.a2-input:focus-within { border-color: var(--orange); background: #fff; box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .15); }
.a2-input:focus-within > .ic { color: var(--orange); }
.a2-eye { border: 0; background: none; padding: 6px; border-radius: 10px; cursor: pointer; color: #8FB0BE; display: grid; place-items: center; }
.a2-eye.on { color: var(--orange); background: var(--accent-soft); }
.a2-submit { width: 100%; justify-content: center; height: 54px; margin-top: 4px; font-size: 17px; }
.a2-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin-top: 4px; }
.a2-or::before, .a2-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.a2-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.a2-links .btn { min-width: 0; white-space: normal; text-align: center; }
.a2-links .btn-glass { background: var(--none-bg) !important; border-color: transparent !important; color: var(--text) !important; justify-content: center; font-size: 13.5px; }
.a2-copy { margin: 4px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
[data-theme="dark"] .a2-card { background: #0C2330; }
[data-theme="dark"] .a2-input { background: #08202C; border-color: #1E4152; }
[data-theme="dark"] .a2-input:focus-within { background: #0A2836; }
@media (max-width: 900px) {
  .auth2 { grid-template-columns: 1fr; align-content: start; }
  .a2-side { padding: 28px 22px 0; gap: 10px; align-items: flex-start; }
  .a2-side h1 { font-size: 34px; }
  .a2-logo { width: 64px; height: 64px; }
  .a2-points, .a2-road { display: none; }
  .a2-card { margin: 18px auto 28px; padding: 22px 20px 18px; }
  .a2-mini-logo { display: none; }
}

/* ---- night page header */
.ph { position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 24px 26px; margin: 0 0 20px; border-radius: 26px; color: #fff;
  background: radial-gradient(420px 200px at 100% 0%, rgba(242, 194, 48, .26), transparent 70%), radial-gradient(420px 240px at 0% 100%, rgba(var(--accent-rgb), .32), transparent 70%), linear-gradient(135deg, #062C3F, #0A5878); box-shadow: 0 20px 44px -26px rgba(var(--navy-rgb), .7); }
.ph > .l2-sky { position: absolute; inset: 0; pointer-events: none; }
.ph-ic { position: relative; flex: 0 0 62px; width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; color: var(--navy); background: var(--grad-gold); transform: rotate(-6deg); box-shadow: 0 12px 26px -10px rgba(242, 194, 48, .9); animation: gt-spin-in .7s cubic-bezier(.2, .9, .3, 1.2) both; }
.ph-text { position: relative; flex: 1 1 260px; min-width: 0; }
.ph .page-title { color: #fff; margin: 0; font-size: clamp(26px, 3.2vw, 36px); display: block; }
.ph-text p { margin: 4px 0 0; color: rgba(255, 255, 255, .78); }
.ph-extra { position: relative; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ph-extra:empty { display: none; }
.ph-extra .link { color: #7FDBEE; }
.ph-extra select { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .25); border-radius: 12px; }
.ph-extra select option { color: #0B2A3A; }
@media (max-width: 600px) { .ph { padding: 18px; gap: 14px; border-radius: 22px; } .ph-ic { flex-basis: 50px; width: 50px; height: 50px; border-radius: 16px; } }

/* ---- shared pieces */
.block-title .ic { padding: 6px; box-sizing: content-box; border-radius: 10px; background: var(--accent-soft); color: var(--orange-d); }
.card { border-radius: 22px; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tabs .tab { border: 0; background: none; padding: 8px 16px; transition: background .2s, color .2s; }
.tabs .tab.on { background: var(--navy); color: #fff; box-shadow: 0 8px 18px -10px rgba(var(--navy-rgb), .9); }
.tabs .tab .count { background: rgba(127, 127, 127, .18); border-radius: 999px; padding: 1px 7px; font-size: 12px; }
.tabs .tab.on .count { background: #F2C230; color: var(--navy); }
.sec-chip { border-radius: 999px; }
.meta { border-radius: 999px; }

/* ---- directions */
.sections-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.section-card { position: relative; overflow: hidden; min-height: 210px; padding: 22px; border: 0 !important; color: #fff !important;
  background: radial-gradient(260px 200px at 100% 0%, rgba(255, 255, 255, .22), transparent 70%), linear-gradient(155deg, var(--sec) 0%, color-mix(in srgb, var(--sec) 45%, #062C3F) 100%) !important; box-shadow: 0 18px 40px -24px var(--sec) !important; }
.section-card:nth-child(-n+2) { grid-column: span 2; }
.section-card .section-icon { width: 56px; height: 56px; border-radius: 18px; background: rgba(255, 255, 255, .2); color: #fff; border: 1px solid rgba(255, 255, 255, .3); display: grid; place-items: center; }
.section-card h3 { color: #fff; font-size: 21px; margin: 6px 0 0; }
.section-card p { color: rgba(255, 255, 255, .86) !important; }
.section-card .chip { background: rgba(255, 255, 255, .2) !important; color: #fff !important; }
.section-card::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 160px; height: 160px; border-radius: 50%; border: 22px solid rgba(255, 255, 255, .08); }
.section-head { position: relative; overflow: hidden; padding: 26px !important; border-radius: 26px !important; border: 0 !important; color: #fff;
  background: radial-gradient(300px 200px at 100% 0%, rgba(255, 255, 255, .2), transparent 70%), linear-gradient(135deg, var(--sec), color-mix(in srgb, var(--sec) 40%, #062C3F)) !important; }
.section-head h1 { color: #fff; }
.section-head p { color: rgba(255, 255, 255, .86) !important; }
.section-head .section-icon { background: rgba(255, 255, 255, .2) !important; color: #fff !important; }
@media (max-width: 900px) { .sections-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .sections-grid { grid-template-columns: 1fr; } .section-card:nth-child(-n+2) { grid-column: auto; } .section-card { min-height: 170px; } }

/* ---- task and talk cards */
.task-card, .talk-card { padding: 20px 20px 18px 24px; border-radius: 22px; }
.task-card::before, .talk-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(180deg, var(--sec), color-mix(in srgb, var(--sec) 50%, #F2C230)); }
.talk-card { position: relative; overflow: hidden; }
.task-card h4, .talk-card h4 { font-size: 17.5px; line-height: 1.3; }
.task-card-meta .meta, .talk-card .meta { background: var(--none-bg); padding: 4px 10px; font-size: 12.5px; }
.task-card-meta .types { margin-left: auto; color: var(--muted); display: inline-flex; gap: 4px; }
.chip-live { animation: pulse 1.6s ease-in-out infinite; }

/* ---- rating podium */
.podium { position: relative; overflow: hidden; padding: 30px 18px 0; border-radius: 26px; gap: 14px; align-items: end;
  background: radial-gradient(400px 220px at 50% 0%, rgba(242, 194, 48, .3), transparent 70%), linear-gradient(180deg, #062C3F, #0A4A66); }
.podium-item { background: none !important; box-shadow: none !important; border: 0 !important; color: #fff; padding: 0 !important; gap: 4px !important; }
.podium-item b { color: #fff; }
.podium-item .muted { color: rgba(255, 255, 255, .7) !important; }
.podium-item .pts { font-family: var(--head); font-weight: 800; font-size: 20px; color: #F7D768; }
.podium-item::after { content: ""; display: block; width: 100%; margin-top: 10px; border-radius: 16px 16px 0 0; background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .06)); border: 1px solid rgba(255, 255, 255, .18); border-bottom: 0; }
.podium-item.p1::after { height: 120px; background: linear-gradient(180deg, #F7D768, #E0AC14); box-shadow: 0 0 40px rgba(242, 194, 48, .45); }
.podium-item.p2::after { height: 84px; background: linear-gradient(180deg, #E4EEF2, #9DB4BF); }
.podium-item.p3::after { height: 60px; background: linear-gradient(180deg, #F0B98A, #B9733D); }
.podium-item .medal { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #fff; color: var(--navy); }
.podium-item.p1 .medal { background: #F2C230; transform: scale(1.15); }
.podium-item.p1 .hero-av { transform: scale(1.15); margin: 6px 0; }
.rating-row { transition: background .15s; }
.rating-row:hover { background: var(--none-bg); }
.rating-row.is-me { background: linear-gradient(90deg, rgba(242, 194, 48, .2), transparent 70%); box-shadow: inset 4px 0 0 #F2C230; }
.rating-row .pts { font-family: var(--head); font-weight: 800; font-size: 18px; color: var(--orange-d); }

/* ---- events */
.event-row { align-items: center; padding: 16px 20px; transition: background .15s; }
.event-row:hover { background: var(--none-bg); }
.event-date { flex: 0 0 64px; height: 64px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff !important; background: linear-gradient(150deg, var(--sec, #00A3C4), color-mix(in srgb, var(--sec, #00A3C4) 45%, #062C3F)) !important; box-shadow: 0 10px 22px -12px var(--sec, #00A3C4); }
.event-date b { color: #fff; font-family: var(--head); font-size: 24px; line-height: 1; }
.event-date span { color: rgba(255, 255, 255, .85); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.event-body h4 { font-size: 17px; }

/* ---- profile */
.profile-head { position: relative; overflow: hidden; color: #fff; border: 0 !important; padding: 26px !important;
  background: radial-gradient(420px 200px at 100% 0%, rgba(242, 194, 48, .26), transparent 70%), radial-gradient(420px 240px at 0% 100%, rgba(var(--accent-rgb), .32), transparent 70%), linear-gradient(135deg, #062C3F, #0A5878) !important; }
.profile-head h1 { color: #fff; }
.profile-head .muted { color: rgba(255, 255, 255, .75) !important; }
.profile-head .stat { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .15); border-radius: 16px; color: #fff; }
.profile-head .stat b { color: #F7D768; }
.profile-head .stat span { color: rgba(255, 255, 255, .75); }
.badge { border-radius: 20px; transition: transform .2s; }
.badge.got { background: linear-gradient(160deg, rgba(242, 194, 48, .2), var(--card)); border-color: rgba(242, 194, 48, .5); }
.badge.got:hover { transform: translateY(-3px) rotate(-1deg); }
.badge.got .badge-ic { background: var(--grad-gold); color: var(--navy); }

/* ---- admin */
.admin-tabs { gap: 6px; padding: 6px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.admin-tabs .tab { border: 0; background: none; border-radius: 14px; }
.admin-tabs .tab.on { background: var(--navy); color: #fff; }
.admin-tabs .tab.on .ic { color: #F2C230; }
.stats.tiles .stat { border-radius: 20px; }

[data-theme="dark"] .tabs, [data-theme="dark"] .admin-tabs { border-color: rgba(30, 65, 82, .8); }
[data-theme="dark"] .tabs .tab.on, [data-theme="dark"] .admin-tabs .tab.on { background: #F2C230; color: #063A52; }
[data-theme="dark"] .admin-tabs .tab.on .ic { color: #063A52; }
.week-hero { border: 1px solid color-mix(in srgb, var(--sec) 30%, var(--line)) !important; background: radial-gradient(400px 200px at 100% 0%, color-mix(in srgb, var(--sec) 22%, transparent), transparent 70%), linear-gradient(120deg, color-mix(in srgb, var(--sec) 12%, var(--card)), var(--card)) !important; }
.week-hero .week-cover { border-radius: 16px; overflow: hidden; box-shadow: 0 14px 30px -14px rgba(var(--navy-rgb), .55); }
.cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)) !important; gap: 16px; }
.switch { display: inline-flex; }
.ph + p.lead, .ph + .muted.lead { display: none; }

/* ================================================================ Design v5: page layouts */
/* ---- tasks: quest board */
.qb-head { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 150px; gap: 14px; margin-bottom: 18px; }
.qb-tab { position: relative; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 22px; padding: 16px 18px; cursor: pointer; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 12px; color: var(--text); font: inherit; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, background .2s; }
.qb-tab:hover { transform: translateY(-2px); }
.qb-ic { grid-row: span 2; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--orange-d); }
.qb-tab b { font-family: var(--head); font-size: 30px; line-height: 1; }
.qb-name { font-weight: 700; font-size: 14px; }
.qb-tab small { grid-column: span 2; margin-top: 8px; color: var(--muted); font-size: 12.5px; }
.qb-tab.on { color: #fff; border-color: transparent; background: radial-gradient(240px 140px at 100% 0%, rgba(242, 194, 48, .3), transparent 70%), linear-gradient(135deg, #062C3F, #0A5878); box-shadow: 0 18px 40px -22px rgba(var(--navy-rgb), .9); }
.qb-tab.on .qb-ic { background: var(--grad-gold); color: var(--navy); }
.qb-tab.on small { color: rgba(255, 255, 255, .75); }
.qb-ring { --p: 0; border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; position: relative; }
.qb-ring::before { content: ""; width: 76px; height: 76px; border-radius: 50%; background: conic-gradient(#F2C230 calc(var(--p) * 1%), var(--none-bg) 0); -webkit-mask: radial-gradient(circle, transparent 28px, #000 29px); mask: radial-gradient(circle, transparent 28px, #000 29px); }
.qb-ring b { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -78%); font-family: var(--head); font-size: 17px; }
.qb-ring small { color: var(--muted); font-size: 12px; font-weight: 600; }
.qb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.quest { position: relative; display: flex; flex-direction: column; border-radius: 24px; overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: transform .25s, box-shadow .25s; }
.quest:hover { transform: translateY(-5px) rotate(-.4deg); box-shadow: 0 26px 50px -26px color-mix(in srgb, var(--sec) 70%, #000); }
.quest-top { position: relative; display: flex; align-items: center; gap: 12px; padding: 18px; color: #fff; background: radial-gradient(200px 120px at 100% 0%, rgba(255, 255, 255, .28), transparent 70%), linear-gradient(135deg, var(--sec), color-mix(in srgb, var(--sec) 45%, #062C3F)); }
.quest-top::after { content: ""; position: absolute; right: -30px; bottom: -50px; width: 120px; height: 120px; border-radius: 50%; border: 18px solid rgba(255, 255, 255, .1); }
.quest-ic { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .3); flex: 0 0 50px; }
.quest-sec { font-weight: 700; font-size: 13px; opacity: .92; flex: 1; min-width: 0; }
.quest-coin { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%; background: var(--grad-gold); color: var(--navy); font-family: var(--head); font-weight: 800; font-size: 18px; line-height: 1; box-shadow: 0 0 0 4px rgba(255, 255, 255, .25), 0 8px 18px -6px rgba(0, 0, 0, .4); }
.quest-coin small { font-size: 9px; font-family: var(--body); font-weight: 700; }
.quest-body { padding: 16px 18px 8px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.quest-body h3 { margin: 0; font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.quest-body p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.quest-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.quest-types { margin-left: auto; display: inline-flex; gap: 6px; color: var(--muted); }
.q-due { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--none-bg); color: var(--muted); }
.q-due.hot { background: var(--warn-bg); color: var(--warn); }
.q-due.late { background: var(--bad-bg); color: var(--bad); }
.quest-go { display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding: 12px 18px 16px; font-weight: 800; font-size: 14px; color: var(--orange-d); }
.quest.urgent { box-shadow: 0 0 0 2px #F2C230, 0 20px 40px -24px rgba(242, 194, 48, .9); }
.quest.done .quest-coin { background: linear-gradient(135deg, #4ADE80, #16A34A); color: #fff; }
.qb-empty { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.qb-empty h3 { margin: 0; max-width: 460px; }
.qb-empty-ic { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-gold); color: var(--navy); box-shadow: 0 14px 30px -12px rgba(242, 194, 48, .8); }
@media (max-width: 900px) { .qb-head { grid-template-columns: repeat(3, minmax(0, 1fr)); } .qb-ring { display: none; } }
@media (max-width: 600px) {
  .qb-head { gap: 8px; }
  .qb-tab { padding: 12px; grid-template-columns: 1fr; text-align: center; justify-items: center; border-radius: 18px; }
  .qb-ic { grid-row: auto; width: 36px; height: 36px; margin-bottom: 6px; }
  .qb-tab b { font-size: 24px; }
  .qb-name { font-size: 12px; }
  .qb-tab small { display: none; }
}

/* ---- rating */
.rk-me { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin: 16px 0; border-radius: 24px; color: #fff; background: radial-gradient(300px 160px at 100% 0%, rgba(242, 194, 48, .35), transparent 70%), linear-gradient(135deg, #062C3F, #0A5878); box-shadow: 0 0 0 2px rgba(242, 194, 48, .5), 0 20px 44px -24px rgba(var(--navy-rgb), .8); }
.rk-me .eyebrow { color: #F7D768; }
.rk-me b { display: block; font-size: 19px; }
.rk-me p { margin: 2px 0 8px; color: rgba(255, 255, 255, .82); }
.rk-me-bar, .rk-bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.rk-me-bar span, .rk-bar span { display: block; height: 100%; border-radius: inherit; background: var(--grad-gold); }
.rk-me-pts { font-family: var(--head); font-weight: 800; font-size: 34px; color: #F7D768; text-align: center; line-height: 1; }
.rk-me-pts small { display: block; font-family: var(--body); font-size: 11px; color: rgba(255, 255, 255, .7); }
.rk-list { display: flex; flex-direction: column; gap: 10px; }
.rk-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .2s; }
.rk-row:hover { transform: translateX(4px); }
.rk-rank { flex: 0 0 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 2px; font-family: var(--head); font-weight: 800; background: var(--none-bg); color: var(--muted); }
.rk-row.top1 .rk-rank { background: var(--grad-gold); color: var(--navy); }
.rk-row.top2 .rk-rank { background: linear-gradient(135deg, #E4EEF2, #9DB4BF); color: #0B2A3A; }
.rk-row.top3 .rk-rank { background: linear-gradient(135deg, #F0B98A, #B9733D); color: #fff; }
.rk-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.rk-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rk-info small { color: var(--muted); }
.rk-bar { background: var(--none-bg); height: 6px; }
.rk-pts { font-family: var(--head); font-weight: 800; font-size: 20px; color: var(--orange-d); }
.rk-row.is-me { border-color: #F2C230; box-shadow: 0 0 0 2px rgba(242, 194, 48, .4); }
@media (max-width: 600px) { .rk-me { flex-wrap: wrap; } .rk-row { gap: 10px; padding: 10px 12px; } .rk-rank { flex-basis: 36px; height: 36px; } }

/* ---- events timeline */
.tl { position: relative; padding-left: 8px; }
.tl::before { content: ""; position: absolute; left: 92px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, #F2C230, var(--orange), transparent); }
.tl-month { position: relative; margin: 8px 0 14px 70px; }
.tl-month span { display: inline-block; padding: 6px 16px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.tl-item { position: relative; display: grid; grid-template-columns: 70px 1fr; gap: 34px; margin-bottom: 18px; }
.tl-dot { position: absolute; left: 77px; top: 18px; width: 18px; height: 18px; border-radius: 50%; background: var(--sec, #00A3C4); box-shadow: 0 0 0 5px var(--bg), 0 0 0 7px color-mix(in srgb, var(--sec, #00A3C4) 40%, transparent); }
.tl-date { text-align: center; padding-top: 6px; }
.tl-date b { display: block; font-family: var(--head); font-size: 34px; line-height: 1; color: var(--sec, var(--orange-d)); }
.tl-date span { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: capitalize; }
.tl-card { padding: 18px 20px; border-radius: 22px; background: radial-gradient(260px 140px at 100% 0%, color-mix(in srgb, var(--sec, #00A3C4) 16%, transparent), transparent 70%), var(--card); border: 1px solid color-mix(in srgb, var(--sec, #00A3C4) 25%, var(--line)); box-shadow: var(--shadow); transition: transform .2s; }
.tl-card:hover { transform: translateX(4px); }
.tl-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-card h3 { margin: 10px 0 8px; font-size: 19px; }
.tl-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-meta span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--none-bg); font-size: 13px; font-weight: 600; color: var(--muted); }
.tl-count { margin-left: auto; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800; background: var(--accent-soft); color: var(--orange-d); }
.tl-count.hot { background: var(--grad-gold); color: var(--navy); animation: pulse 1.8s ease-in-out infinite; }
.tl-past { margin-top: 18px; }
.tl-past summary { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 700; color: var(--muted); margin-bottom: 12px; list-style: none; }
.tl-past summary::-webkit-details-marker { display: none; }
.tl-past .count { background: var(--none-bg); border-radius: 999px; padding: 0 8px; font-size: 12px; }
@media (max-width: 600px) {
  .tl::before { left: 22px; }
  .tl-month { margin-left: 0; }
  .tl-item { grid-template-columns: 1fr; gap: 0; padding-left: 44px; }
  .tl-dot { left: 14px; }
  .tl-date { text-align: left; display: flex; align-items: baseline; gap: 8px; padding: 0 0 6px; }
  .tl-date b { font-size: 24px; }
}

/* ---- talks */
.stages { display: grid; gap: 16px; margin-bottom: 18px; }
.stage { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 28px; border-radius: 28px; color: #fff; text-decoration: none; background: radial-gradient(400px 220px at 100% 0%, rgba(239, 91, 91, .45), transparent 70%), radial-gradient(400px 260px at 0% 100%, rgba(var(--accent-rgb), .35), transparent 70%), linear-gradient(135deg, #1A0F2E, #062C3F); box-shadow: 0 0 0 2px rgba(239, 91, 91, .5), 0 30px 60px -30px rgba(239, 91, 91, .8); }
.stage h2 { color: #fff; font-size: clamp(24px, 3.4vw, 36px); margin: 0; max-width: 760px; }
.stage-live { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: #EF4444; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.stage-live .live-dot { background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .3); }
.stage-meta { display: flex; flex-wrap: wrap; gap: 14px; color: rgba(255, 255, 255, .8); }
.stage-meta span { display: inline-flex; align-items: center; gap: 6px; }
.stage-go { margin-top: 6px; }
.stage-bars { position: absolute; right: 28px; bottom: 28px; display: flex; align-items: flex-end; gap: 6px; height: 70px; }
.stage-bars i { height: 40px; width: 10px; border-radius: 6px; background: linear-gradient(180deg, #F2C230, #EF5B5B); animation: stage-eq 1s ease-in-out infinite alternate; }
@keyframes stage-eq { from { height: 14px; } to { height: 70px; } }
.soon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.soon-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 0 0 16px; border-radius: 24px; overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: transform .25s; }
.soon-card:hover { transform: translateY(-5px); }
.soon-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; color: #fff; background: linear-gradient(135deg, #14B8A6, #0A5878); }
.soon-live .soon-head { background: linear-gradient(135deg, #EF5B5B, #7C1D4E); }
.soon-type { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.soon-in { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .22); font-size: 12px; font-weight: 800; }
.soon-body { display: flex; gap: 14px; padding: 0 18px; }
.soon-date { flex: 0 0 60px; height: 64px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--none-bg); }
.soon-date b { font-family: var(--head); font-size: 26px; line-height: 1; }
.soon-date small { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: capitalize; }
.soon-body h3 { margin: 0 0 6px; font-size: 18px; line-height: 1.3; }
.soon-body p { margin: 0 0 3px; color: var(--muted); font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.soon-card .sec-chip { margin: 0 18px; align-self: flex-start; }
@media (max-width: 600px) { .stage { padding: 22px; } .stage-bars { display: none; } }

/* ---- profile */
.pf-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "av who" "stats stats"; align-items: center; gap: 18px 22px; padding: 28px; margin-bottom: 20px; border-radius: 30px; color: #fff; background: radial-gradient(420px 220px at 100% 0%, rgba(242, 194, 48, .3), transparent 70%), radial-gradient(420px 260px at 0% 100%, rgba(var(--accent-rgb), .35), transparent 70%), linear-gradient(135deg, #062C3F, #0A5878); box-shadow: 0 24px 50px -28px rgba(var(--navy-rgb), .8); }
.pf-hero > .l2-sky { position: absolute; inset: 0; pointer-events: none; }
.pf-av { --p: 0; grid-area: av; position: relative; width: 116px; height: 116px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#F2C230 calc(var(--p) * 1%), rgba(255, 255, 255, .15) 0); }
.pf-av .hero-av { box-shadow: 0 0 0 6px #0A4A66; }
.pf-who { grid-area: who; position: relative; min-width: 0; }
.pf-who h1 { color: #fff; margin: 0 0 4px; font-size: clamp(26px, 3.4vw, 38px); overflow-wrap: anywhere; }
.pf-who p { margin: 0 0 10px; color: rgba(255, 255, 255, .75); }
.pf-stats { grid-area: stats; position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pf-stats div { padding: 12px 14px; border-radius: 18px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .15); }
.pf-stats b { display: block; font-family: var(--head); font-size: 26px; color: #F7D768; }
.pf-stats span { font-size: 12.5px; color: rgba(255, 255, 255, .78); }
.medals { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
.medal-item { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 16px 10px 14px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .25s; }
.medal-disc { position: relative; z-index: 1; width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; color: #8FB0BE; background: radial-gradient(circle at 30% 30%, #fff, #D9E4EA); box-shadow: inset 0 -4px 8px rgba(0, 0, 0, .08), 0 0 0 4px #E8EFF2; }
.medal-ribbon { position: absolute; top: 60px; width: 34px; height: 30px; background: linear-gradient(90deg, #9DB4BF 0 50%, #B9CBD3 50%); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 75%, 0 100%); }
.medal-item b { margin-top: 18px; font-size: 14px; }
.medal-item small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.medal-item:not(.got) { opacity: .6; filter: grayscale(.6); }
.medal-item.got .medal-disc { color: var(--navy); background: radial-gradient(circle at 30% 30%, #FFF3C4, #F2C230 55%, #C8920C); box-shadow: inset 0 -4px 10px rgba(0, 0, 0, .15), 0 0 0 4px #FFF0B8, 0 10px 24px -8px rgba(242, 194, 48, .9); }
.medal-item.got .medal-ribbon { background: linear-gradient(90deg, #00A3C4 0 50%, #063A52 50%); }
.medal-item.got:hover { transform: translateY(-4px) rotate(-2deg); }
.certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.cert-card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 26px 20px 20px; border-radius: 18px; color: #3A2A06; text-decoration: none; background: linear-gradient(160deg, #FFFDF5, #FFF4D6); border: 2px solid #E8C35A; box-shadow: inset 0 0 0 6px #FFFDF5, inset 0 0 0 7px #E8C35A, 0 18px 36px -22px rgba(138, 100, 0, .6); transition: transform .25s; }
.cert-card:hover { transform: translateY(-4px) rotate(-.6deg); }
.cert-seal { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-gold); color: var(--navy); box-shadow: 0 0 0 4px #FFF0B8; }
.cert-kicker { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #8A6400; }
.cert-card b { font-family: var(--head); font-size: 18px; color: #2A1E04; }
.cert-card small { color: #7A5F1E; }
.cert-date { margin-top: 4px; font-size: 12px; color: #8A6400; }
.pf-settings-title { display: flex; align-items: center; gap: 10px; margin: 30px 0 12px; font-size: 22px; }
@media (max-width: 600px) {
  .pf-hero { grid-template-columns: 1fr; grid-template-areas: "av" "who" "stats"; justify-items: center; text-align: center; padding: 22px 18px; }
  .pf-av { width: 104px; height: 104px; }
  .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
}

/* ---- week page poster */
.week-top { position: relative; overflow: hidden; color: #fff; border: 0 !important; padding: 26px !important; border-radius: 28px !important; background: radial-gradient(360px 220px at 100% 0%, rgba(255, 255, 255, .2), transparent 70%), linear-gradient(135deg, var(--sec), color-mix(in srgb, var(--sec) 35%, #062C3F)) !important; }
.week-top h1, .week-top h2, .week-top h3, .week-top .author { color: #fff; }
.week-top .muted, .week-top .meta, .week-top p { color: rgba(255, 255, 255, .86) !important; }
.week-top .week-cover { transform: rotate(-3deg); border-radius: 16px; overflow: hidden; box-shadow: 0 24px 40px -16px rgba(0, 0, 0, .55); border: 4px solid rgba(255, 255, 255, .85); }
.week-top .meta { background: rgba(255, 255, 255, .16) !important; border-radius: 999px; padding: 4px 10px; }
.week-top .eyebrow { color: #FFF3C4; }

/* ---- support */
#new-ticket { border: 0; color: #fff; background: radial-gradient(360px 200px at 100% 0%, rgba(242, 194, 48, .25), transparent 70%), linear-gradient(135deg, #062C3F, #0A5878); }
#new-ticket h3, #new-ticket label { color: #fff; }
#new-ticket input, #new-ticket textarea { background: rgba(255, 255, 255, .96); }
#new-ticket .check-pill { border-color: rgba(255, 255, 255, .3); color: #fff; }
#new-ticket .check-pill:has(input:checked) { background: #F2C230; color: #063A52; border-color: #F2C230; }

/* ---- admin overview tiles */
.stats.tiles { gap: 14px; }
.stats.tiles .stat { position: relative; overflow: hidden; padding: 18px 20px; color: #fff; border: 0; background: linear-gradient(135deg, #062C3F, #0A5878); }
.stats.tiles .stat:nth-child(2) { background: linear-gradient(135deg, #00A3C4, #2CC7E4); }
.stats.tiles .stat:nth-child(3) { background: var(--grad-gold); color: var(--navy); }
.stats.tiles .stat b { font-size: 34px; color: inherit; }
.stats.tiles .stat span { color: inherit; opacity: .85; }
.stats.tiles .stat::after { content: ""; position: absolute; right: -30px; bottom: -40px; width: 110px; height: 110px; border-radius: 50%; border: 16px solid rgba(255, 255, 255, .12); }
.pf-hero { text-align: left; }
.pf-who, .pf-stats div { text-align: left; }
.pf-who h1 { font-size: clamp(28px, 3.6vw, 42px); }
@media (max-width: 600px) { .pf-who, .pf-stats div { text-align: center; } }

/* ================================================================ Classes + team stories */
.cl-new { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 12px; align-items: end; margin: 14px 0 18px; }
.cl-new label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.cl-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 22px; color: #fff; background: radial-gradient(200px 120px at 100% 0%, rgba(242, 194, 48, .3), transparent 70%), linear-gradient(135deg, #062C3F, #0A5878); box-shadow: 0 16px 34px -22px rgba(var(--navy-rgb), .8); }
.cl-card .icon-btn { color: rgba(255, 255, 255, .75); }
.cl-card .icon-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.cl-card-top { display: flex; align-items: center; justify-content: space-between; }
.cl-card-top b { font-family: var(--head); font-size: 30px; }
.cl-card small { color: rgba(255, 255, 255, .75); display: inline-flex; align-items: center; gap: 5px; }
.cl-nums { display: flex; gap: 16px; margin-top: auto; }
.cl-nums span { display: flex; flex-direction: column; font-size: 12px; color: rgba(255, 255, 255, .7); }
.cl-nums b { font-family: var(--head); font-size: 22px; color: #F7D768; }
.cl-free { background: var(--card); color: var(--text); border: 2px dashed var(--line); box-shadow: none; }
.cl-free .cl-nums span { color: var(--muted); } .cl-free .cl-nums b { color: var(--orange-d); }
.cl-assign { margin-bottom: 90px; }
.cl-assign select, .cl-assign input[type=search] { min-width: 160px; }
.cl-row { display: flex !important; flex-direction: row !important; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; cursor: pointer; transition: background .15s; font-weight: 400 !important; }
.cl-row:hover { background: var(--none-bg); }
.cl-row.on { background: var(--accent-soft); }
.cl-row input { width: 20px; height: 20px; accent-color: var(--orange); }
.cl-row .grow b { display: block; }
.cl-row small { color: var(--muted); font-size: 12px; }
.cl-head { border-bottom: 1px solid var(--line); border-radius: 0; margin-bottom: 6px; font-weight: 700 !important; color: var(--muted); }
.cl-tag { padding: 4px 12px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 700; font-size: 13px; }
.cl-tag.none { background: var(--none-bg); color: var(--muted); }
.cl-pts { min-width: 48px; text-align: right; font-family: var(--head); font-weight: 800; color: var(--orange-d); }
.cl-bar { position: fixed; z-index: 40; left: 50%; bottom: 24px; transform: translate(-50%, 140%); display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 22px; border-radius: 999px; background: var(--navy); color: #fff; box-shadow: 0 20px 44px -16px rgba(0, 0, 0, .6); transition: transform .3s cubic-bezier(.2, .9, .3, 1.2); }
.cl-bar.show { transform: translate(-50%, 0); }
.cl-bar b { color: #F7D768; }
.cl-bar select { border-radius: 999px; color: var(--text); background: #fff; min-width: 120px; }
@media (min-width: 861px) { .cl-bar { left: calc(50% + 42px); } }
@media (max-width: 860px) { .cl-bar { bottom: 90px; } }
@media (max-width: 600px) { .cl-new { grid-template-columns: 1fr; } .cl-bar { left: 12px; right: 12px; transform: translate(0, 160%); flex-wrap: wrap; border-radius: 22px; } .cl-bar.show { transform: none; } }
.cl-badge { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-family: var(--head); font-weight: 800; font-size: 17px; color: var(--navy); background: var(--grad-gold); box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.cl-badge.sm { width: 44px; height: 44px; border-radius: 13px; font-size: 14px; flex: 0 0 44px; }
.cl-podium .podium-item b { font-size: 15px; }
.rk-switch { margin-bottom: 4px; }
.rk-switch .tabs .tab { display: inline-flex; align-items: center; gap: 6px; }

/* team stories: admin */
.st-form { display: grid; grid-template-columns: 260px 1fr; gap: 22px; margin: 14px 0 22px; }
.st-drop { position: relative; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; border: 2px dashed var(--line); background: var(--none-bg); }
.st-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
.st-preview { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px; color: var(--muted); }
.st-preview img, .st-preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-preview span { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--grad-gold); color: var(--navy); }
.st-preview small { font-size: 12px; }
.st-fields { display: flex; flex-direction: column; gap: 12px; }
.st-progress { height: 8px; border-radius: 6px; background: var(--none-bg); overflow: hidden; }
.st-progress span { display: block; height: 100%; width: 0; background: var(--grad-gold); transition: width .2s; }
.st-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; margin-bottom: 20px; }
.st-item { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.st-item.old { opacity: .55; }
.st-thumb { position: relative; flex: 0 0 64px; height: 100px; border-radius: 14px; overflow: hidden; background: #062C3F; }
.st-thumb img, .st-thumb video { width: 100%; height: 100%; object-fit: cover; }
.st-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.st-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.st-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-info small { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.st-old-title { margin-top: 10px; }
@media (max-width: 700px) { .st-form { grid-template-columns: 1fr; } .st-drop { max-width: 260px; justify-self: center; width: 100%; } }

/* team stories: viewer */
.sv-media { position: absolute; inset: 0; z-index: 0; background: #000; display: grid; place-items: center; }
.sv-media img, .sv-media video { width: 100%; height: 100%; object-fit: contain; }
.sv-card:has(.sv-media)::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .45) 0%, transparent 18%, transparent 70%, rgba(0, 0, 0, .65) 100%); }
.sv-card .sv-bars, .sv-card .sv-head { z-index: 3; }
.sv-caption { position: absolute; z-index: 3; left: 20px; right: 20px; bottom: 96px; margin: 0; font-size: 20px; font-weight: 600; line-height: 1.4; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); overflow-wrap: anywhere; }
.sv-card:has(.sv-media) .sv-cta { position: absolute; left: 20px; right: 20px; bottom: 24px; z-index: 3; }
.sv-card:has(.sv-media):not(:has(.sv-cta)) .sv-caption { bottom: 30px; }
.sv-sound { position: absolute; z-index: 4; top: 64px; right: 16px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .45); font-size: 20px; cursor: pointer; }
.rk-section { margin-bottom: 30px; }
.rk-head { margin: 6px 0 12px; }
.rk-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 22px; }
.rk-head h2 .ic { padding: 7px; box-sizing: content-box; border-radius: 12px; background: var(--grad-gold); color: var(--navy); }
.rk-more { margin: 12px auto 0; display: flex; }
body.capture-blank #app { visibility: hidden; }
.cap { border: 2px solid var(--bad); margin-bottom: 16px; }
.cap-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.cap-ic { font-size: 22px; }

/* ---- phone capture deterrents */
body.capture-shield #app { filter: blur(28px); }
body.capture-shield::after {
  content: "United Generation"; position: fixed; inset: 0; z-index: 2147482999;
  display: grid; place-items: center; background: #0b1230; color: #e9c46a;
  font: 800 22px/1 system-ui, sans-serif; letter-spacing: .04em;
}
body.guarded #app { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
body.guarded #app :is(input, textarea, select, [contenteditable=true]) { -webkit-user-select: text; user-select: text; }
body.guarded #app img, body.guarded #app video { -webkit-user-drag: none; pointer-events: auto; }
@media print { body.guarded * { display: none !important; } }

/* ---- phone warnings 1/3 */
.sw-wrap { z-index: 96; }
.sw-ic { background: #FEF3C7; color: #B45309; }
.sw-dots { display: flex; gap: 8px; }
.sw-dots span { width: 34px; height: 8px; border-radius: 4px; background: var(--line, #E5E7EB); }
.sw-dots span.on { background: #F59E0B; }

/* ---- class audience chips */
.chip-class { background: rgba(var(--navy-rgb), .08); color: var(--navy); font-weight: 700; }
[data-theme="dark"] .chip-class { background: rgba(233, 196, 106, .14); color: #e9c46a; }

/* ---- ban screen support + personal notices */
.ban-wrap { overflow-y: auto; }
.ban-btns { justify-content: center; }
.ban-support { width: 100%; text-align: left; }
.ban-support:empty { display: none; }
.bs-thread { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.bs-msg { background: var(--bg-soft, #F3F4F6); border-radius: 12px; padding: 8px 12px; max-width: 88%; }
.bs-msg.mine { align-self: flex-end; background: rgba(var(--navy-rgb), .08); }
.bs-msg small { color: var(--muted); font-size: 11.5px; }
.bs-msg p { margin: 2px 0 0; white-space: pre-wrap; }
.bs-form { display: flex; flex-direction: column; gap: 8px; }
.bs-form textarea { width: 100%; }
.bs-form .btn { align-self: flex-end; }
.ntc-wrap { z-index: 94; }
.ntc-ic { background: rgba(233, 196, 106, .2); color: #B7791F; }
.ntc-text { width: 100%; text-align: left; white-space: pre-wrap; font-size: 16px; line-height: 1.55; background: var(--bg-soft, #F8FAFC); border: 1px solid var(--line, #E5E7EB); border-radius: 14px; padding: 14px 16px; max-height: 50vh; overflow-y: auto; }
.ntc-list { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; }
.ntc-row { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line, #E5E7EB); border-radius: 12px; padding: 10px 12px; }
.ntc-row p { margin: 0 0 4px; white-space: pre-wrap; }
.ntc-row .ok { color: var(--good, #16a34a); }
[data-theme="dark"] .ntc-text, [data-theme="dark"] .bs-msg { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); }
