/* ==========================================================================
   FUT Web Lite V0.1 : design system (mobile-first, clair/sombre, sans dépendance)
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --surface-3: #e7eaef;
  --text: #0d1117;
  --text-2: #444c58;
  --text-3: #646d7a;
  --border: #e4e7ec;
  --border-strong: #d3d8df;
  --accent: #0a9f5f;
  --accent-strong: #07804c;
  --accent-soft: #e2f5eb;
  --on-accent: #ffffff;
  --hot: #dc3d43;
  --hot-soft: #fdeceb;
  --gold: #946c12;
  --gold-strong: #7a580b;
  --gold-soft: #f7efd9;
  --info: #2f5bea;
  --info-soft: #e8eefd;
  --warn: #a15c07;
  --warn-soft: #fdf3e2;
  --win: #0a9f5f;
  --draw: #8b93a1;
  --loss: #dc3d43;
  --overlay: rgba(10, 12, 15, 0.5);
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-2: 0 6px 24px rgba(16, 24, 40, 0.08);
  --shadow-3: 0 16px 48px rgba(16, 24, 40, 0.16);
  --skeleton: #e9ecf0;
  --skeleton-hi: #f5f6f8;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r-xs: 6px;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --pill: 999px;
  --gap: 16px;
  --topbar-h: 56px;
  --tabbar-h: 64px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0c0f;
    --surface: #13161b;
    --surface-2: #1a1e24;
    --surface-3: #242a32;
    --text: #f2f4f7;
    --text-2: #bac1cc;
    --text-3: #8f98a5;
    --border: #252a32;
    --border-strong: #333a44;
    --accent: #2bd47f;
    --accent-strong: #52e199;
    --accent-soft: rgba(43, 212, 127, 0.13);
    --on-accent: #03140b;
    --hot: #ff5c61;
    --hot-soft: rgba(255, 92, 97, 0.13);
    --gold: #e3b955;
    --gold-strong: #f0cb72;
    --gold-soft: rgba(227, 185, 85, 0.12);
    --info: #7c9cff;
    --info-soft: rgba(124, 156, 255, 0.13);
    --warn: #f0a945;
    --warn-soft: rgba(240, 169, 69, 0.12);
    --win: #2bd47f;
    --draw: #8f98a5;
    --loss: #ff5c61;
    --overlay: rgba(0, 0, 0, 0.62);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 8px 28px rgba(0, 0, 0, 0.45);
    --shadow-3: 0 18px 50px rgba(0, 0, 0, 0.6);
    --skeleton: #1c2027;
    --skeleton-hi: #252a32;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0c0f;
  --surface: #13161b;
  --surface-2: #1a1e24;
  --surface-3: #242a32;
  --text: #f2f4f7;
  --text-2: #bac1cc;
  --text-3: #8f98a5;
  --border: #252a32;
  --border-strong: #333a44;
  --accent: #2bd47f;
  --accent-strong: #52e199;
  --accent-soft: rgba(43, 212, 127, 0.13);
  --on-accent: #03140b;
  --hot: #ff5c61;
  --hot-soft: rgba(255, 92, 97, 0.13);
  --gold: #e3b955;
  --gold-strong: #f0cb72;
  --gold-soft: rgba(227, 185, 85, 0.12);
  --info: #7c9cff;
  --info-soft: rgba(124, 156, 255, 0.13);
  --warn: #f0a945;
  --warn-soft: rgba(240, 169, 69, 0.12);
  --win: #2bd47f;
  --draw: #8f98a5;
  --loss: #ff5c61;
  --overlay: rgba(0, 0, 0, 0.62);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 8px 28px rgba(0, 0, 0, 0.45);
  --shadow-3: 0 18px 50px rgba(0, 0, 0, 0.6);
  --skeleton: #1c2027;
  --skeleton-hi: #252a32;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100dvh;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 22px; line-height: 1.25; font-weight: 750; letter-spacing: -0.02em; }
h2 { font-size: 18px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 15px; line-height: 1.35; font-weight: 650; }
.num, .tabular { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: var(--r-sm); font-weight: 600; }
.skip-link:focus { top: 8px; }
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.small { font-size: 13px; }
.xsmall { font-size: 12px; }
.strong { font-weight: 650; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { text-align: center; }
.icon { width: 20px; height: 20px; flex: none; }
.icon-sm { width: 16px; height: 16px; flex: none; }
.icon-lg { width: 24px; height: 24px; flex: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Layout shell ---------- */
.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100dvh;
}
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: calc(var(--topbar-h) + var(--safe-t));
  padding: var(--safe-t) 12px 0 16px;
  display: flex; align-items: center; gap: 8px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--border); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -0.03em; font-size: 20px; }
.brand-mark { min-width: 34px; height: 30px; padding: 0 5px; border-radius: 9px; background: var(--text); color: var(--bg); display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 850; letter-spacing: -0.03em; white-space: nowrap; }
.brand-mark span { color: var(--accent); }
.brand small { font-size: 11px; font-weight: 650; color: var(--text-3); letter-spacing: 0.02em; margin-left: 2px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: var(--pill);
  display: grid; place-items: center; color: var(--text);
  transition: background .15s var(--ease), transform .1s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.94); }
.dot-badge { position: absolute; top: 7px; right: 7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--hot); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }

.main { min-width: 0; padding: 0 0 calc(var(--tabbar-h) + var(--safe-b) + 24px); }
.view { padding: 8px 16px 0; max-width: 680px; margin: 0 auto; width: 100%; }
.view.wide { max-width: 980px; }
.rail { display: none; }

/* Navigation : barre en bas (mobile) → rail latéral (tablette) → sidebar (desktop) */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: flex; align-items: stretch; justify-content: space-around;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-top: 1px solid var(--border);
}
.nav-brand, .nav-footer { display: none; }
.nav-brand .brand-text { display: none; }
.nav-link {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--text-3); position: relative;
  transition: color .15s;
}
.nav-link .icon { width: 23px; height: 23px; transition: transform .2s var(--ease); }
.nav-link[aria-current="page"] { color: var(--text); }
.nav-link[aria-current="page"] .icon { transform: translateY(-1px); }
.nav-link[aria-current="page"]::after { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.nav-link .dot-badge { top: 6px; right: calc(50% - 20px); }

@media (min-width: 768px) {
  .app { grid-template-columns: 80px minmax(0, 1fr); }
  .nav {
    position: sticky; top: 0; bottom: auto; height: 100dvh; padding: 16px 0;
    flex-direction: column; justify-content: flex-start; gap: 4px;
    border-top: 0; border-right: 1px solid var(--border); background: var(--surface);
    grid-row: 1 / span 2;
  }
  .nav-brand { display: flex; justify-content: center; padding: 4px 0 16px; }
  .nav-link { flex: none; height: 56px; margin: 0 10px; border-radius: var(--r); }
  .nav-link:hover { background: var(--surface-2); color: var(--text); }
  .nav-link[aria-current="page"] { background: var(--surface-2); }
  .nav-link[aria-current="page"]::after { display: none; }
  .nav-footer { display: flex; flex-direction: column; margin-top: auto; }
  .nav-footer .nav-link { height: 44px; }
  .nav-footer .nav-link .label { display: none; }
  .topbar { grid-column: 2; }
  .topbar .brand { display: none; }
  .main { grid-column: 2; padding-bottom: 48px; }
  .view { padding: 12px 24px 0; }
}
@media (min-width: 1100px) {
  .app { grid-template-columns: 248px minmax(0, 1fr) 340px; }
  .nav { padding: 20px 12px; }
  .nav-brand { justify-content: flex-start; padding: 4px 12px 20px; }
  .nav-brand .brand-text { display: inline; }
  .nav-link { flex-direction: row; justify-content: flex-start; gap: 14px; height: 48px; margin: 0; padding: 0 14px; font-size: 15px; font-weight: 600; }
  .nav-link .label { display: inline; }
  .nav-link .dot-badge { position: static; margin-left: auto; border: 0; }
  .nav-footer .nav-link { height: 40px; font-size: 13px; color: var(--text-3); }
  .nav-footer .nav-link .label { display: inline; }
  .topbar { grid-column: 2 / span 2; }
  .main { grid-column: 2; }
  .rail {
    display: block; grid-column: 3; grid-row: 2; position: sticky; top: var(--topbar-h);
    height: calc(100dvh - var(--topbar-h)); overflow-y: auto; padding: 12px 24px 24px 0;
    scrollbar-width: thin;
  }
}

/* ---------- Bannières ---------- */
.demo-banner {
  display: flex; align-items: center; gap: 8px; margin: 8px 16px 0; padding: 8px 12px;
  border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn);
  font-size: 12.5px; font-weight: 550; line-height: 1.35;
}
.demo-banner .icon { width: 16px; height: 16px; }
.demo-banner button { margin-left: auto; color: inherit; opacity: .8; }
@media (min-width: 768px) { .demo-banner { margin: 12px 24px 0; } }
.announce { margin: 8px 16px 0; padding: 10px 14px; border-radius: var(--r-sm); background: var(--info-soft); color: var(--info); font-size: 13px; font-weight: 550; }

/* ---------- Composants génériques ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow-1);
}
.card-pad { padding: 16px; }
.section { margin-top: 24px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: 17px; }
.section-head a, .link { color: var(--accent-strong); font-weight: 600; font-size: 14px; }
.divider { height: 1px; background: var(--border); margin: 12px 0; border: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--pill);
  font-weight: 650; font-size: 14.5px; white-space: nowrap;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  transition: background .15s, transform .1s, opacity .15s, border-color .15s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary:hover { opacity: .9; }
.btn.accent { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.gold { background: var(--gold); color: #fff; border-color: var(--gold); }
:root[data-theme="dark"] .btn.gold { color: #1a1305; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.gold { color: #1a1305; } }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--hot); }
.btn.sm { height: 34px; padding: 0 13px; font-size: 13px; }
.btn.block { width: 100%; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scroll-padding: 16px; }
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .chips { margin: 0; padding-left: 0; padding-right: 0; flex-wrap: wrap; } }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border-radius: var(--pill); background: var(--surface); border: 1px solid var(--border);
  font-size: 13.5px; font-weight: 600; color: var(--text-2); white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip[aria-pressed="true"], .chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .count { font-size: 11px; opacity: .7; }

.segmented { display: flex; padding: 4px; gap: 4px; background: var(--surface-2); border-radius: var(--pill); }
.segmented button { flex: 1; height: 36px; border-radius: var(--pill); font-weight: 650; font-size: 14px; color: var(--text-3); transition: background .2s var(--ease), color .2s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.segmented button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.tabs::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .tabs { margin: 0; padding: 0; } }
.tab { flex: none; height: 44px; padding: 0 12px; font-weight: 650; font-size: 14px; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .15s; }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--pill);
  font-size: 11px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
  background: var(--surface-2); color: var(--text-2);
}
.badge .icon { width: 12px; height: 12px; }
.badge.news { background: var(--info-soft); color: var(--info); }
.badge.hot { background: var(--hot-soft); color: var(--hot); }
.badge.analysis { background: var(--accent-soft); color: var(--accent-strong); }
.badge.stats { background: var(--info-soft); color: var(--info); }
.badge.prediction { background: var(--surface-2); color: var(--text); }
.badge.community { background: var(--warn-soft); color: var(--warn); }
.badge.certified { background: var(--gold-soft); color: var(--gold); }
.badge.free { background: var(--accent-soft); color: var(--accent-strong); }
.badge.demo { background: var(--warn-soft); color: var(--warn); }
.badge.live { background: var(--hot); color: #fff; }
.badge.outline { background: transparent; border: 1px solid var(--border); }

.live-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 750; font-size: 14px; letter-spacing: -.02em; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 72px; height: 72px; font-size: 24px; }
.verified { color: var(--accent); width: 15px; height: 15px; }

.crest { flex: none; display: block; }

.toggle { position: relative; width: 46px; height: 28px; flex: none; }
.toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.toggle span { position: absolute; inset: 0; border-radius: var(--pill); background: var(--surface-3); transition: background .2s; }
.toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.toggle input:checked + span { background: var(--accent); }
.toggle input:checked + span::after { transform: translateX(18px); }
.toggle input:disabled + span { opacity: .45; }
.toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 13px; font-weight: 650; color: var(--text-2); }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-field { position: relative; }
.search-field .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search-field .input { padding-left: 44px; border-radius: var(--pill); height: 48px; background: var(--surface); }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 56px; border-bottom: 1px solid var(--border); transition: background .15s; width: 100%; text-align: left; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover, button.list-item:hover { background: var(--surface-2); }
.list-item .chev { color: var(--text-3); margin-left: auto; }

.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); font-size: 13.5px; line-height: 1.45; background: var(--surface-2); color: var(--text-2); }
.notice .icon { margin-top: 1px; width: 18px; height: 18px; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.info { background: var(--info-soft); color: var(--info); }
.notice.gold { background: var(--gold-soft); color: var(--gold); }
.notice.ok { background: var(--accent-soft); color: var(--accent-strong); }
.notice.err { background: var(--hot-soft); color: var(--hot); }

/* États vides / erreurs */
.state { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-2); }
.state .state-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); margin-bottom: 4px; }
.state .state-icon .icon { width: 26px; height: 26px; }
.state h3 { color: var(--text); font-size: 16px; }
.state p { max-width: 340px; font-size: 14px; }

/* Skeleton */
.sk { background: linear-gradient(90deg, var(--skeleton) 0%, var(--skeleton-hi) 50%, var(--skeleton) 100%); background-size: 200% 100%; animation: sk 1.3s ease-in-out infinite; border-radius: 8px; }
@keyframes sk { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.sk-line { height: 12px; margin: 8px 0; }
.sk-title { height: 18px; width: 70%; margin: 6px 0 10px; }
.sk-media { aspect-ratio: 16 / 9; border-radius: var(--r-sm); margin-top: 12px; }
.sk-circle { width: 40px; height: 40px; border-radius: 50%; flex: none; }

/* ---------- Fil social ---------- */
.feed-head { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 12px; }
.feed { display: flex; flex-direction: column; gap: 12px; }
.post { position: relative; overflow: hidden; transition: border-color .15s, box-shadow .2s, transform .2s var(--ease); animation: rise .35s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.post:hover { border-color: var(--border-strong); }
.post-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.post-link:focus-visible { outline-offset: -2px; }
.post-body { padding: 14px 16px 4px; display: flex; flex-direction: column; gap: 10px; }
.post-meta { display: flex; align-items: center; gap: 10px; min-width: 0; }
.post-meta .who { min-width: 0; flex: 1; }
.post-meta .name { font-weight: 650; font-size: 14px; display: flex; align-items: center; gap: 4px; }
.post-meta .sub { font-size: 12.5px; color: var(--text-3); }
.post-title { font-size: 17px; font-weight: 720; line-height: 1.3; letter-spacing: -0.012em; }
.post-summary { color: var(--text-2); font-size: 14.5px; }
.post-media { margin: 0 16px; border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 16 / 9; background: var(--surface-2); }
.post-media img { width: 100%; height: 100%; object-fit: cover; }
.post-source { font-size: 12px; color: var(--text-3); display: flex; gap: 6px; align-items: center; }
.post.hot { border-color: color-mix(in srgb, var(--hot) 35%, var(--border)); }
.post.hot::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--hot); }
.post.certified { border-color: color-mix(in srgb, var(--gold) 40%, var(--border)); background: linear-gradient(180deg, var(--gold-soft), var(--surface) 140px); }

.actions { display: flex; align-items: center; gap: 2px; padding: 6px 8px 8px; position: relative; z-index: 2; }
.action {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: var(--pill);
  color: var(--text-3); font-size: 13px; font-weight: 600; transition: background .15s, color .15s;
}
.action:hover { background: var(--surface-2); color: var(--text); }
.action .icon { width: 19px; height: 19px; transition: transform .2s var(--ease); }
.action[aria-pressed="true"].like { color: var(--hot); }
.action[aria-pressed="true"].like .icon { fill: currentColor; animation: pop .35s var(--ease); }
.action[aria-pressed="true"].fav { color: var(--accent-strong); }
.action[aria-pressed="true"].fav .icon { fill: currentColor; animation: pop .35s var(--ease); }
.action.push { margin-left: auto; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* Cartes interactives (au-dessus du lien de carte) */
.z2 { position: relative; z-index: 2; }

/* Rencontres dans une carte */
.mini-matches { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.mini-match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.mini-match:last-child { border-bottom: 0; }
.mini-match .side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mini-match .side.away { flex-direction: row-reverse; text-align: right; }
.mini-match .mid { text-align: center; font-weight: 700; font-size: 13px; min-width: 56px; }
.mini-match .mid small { display: block; font-weight: 550; font-size: 11px; color: var(--text-3); }
.more-row { padding: 9px 12px; font-size: 13px; font-weight: 600; color: var(--text-3); text-align: center; background: var(--surface-2); }

/* Stats */
.statbar { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 10px; font-size: 13.5px; }
.statbar .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.statbar .v.right { text-align: right; }
.statbar .lbl { text-align: center; font-size: 12.5px; color: var(--text-3); font-weight: 600; margin-bottom: 4px; }
.statbar .bars { display: flex; gap: 4px; height: 6px; }
.statbar .bar { flex: 1; background: var(--surface-3); border-radius: 3px; overflow: hidden; display: flex; }
.statbar .bar.l { justify-content: flex-end; }
.statbar .bar i { display: block; height: 100%; border-radius: 3px; background: var(--text-3); transition: width .6s var(--ease); }
.statbar .bar.win i { background: var(--accent); }
.stat-rows { display: flex; flex-direction: column; gap: 14px; }
.leaders { display: flex; flex-direction: column; gap: 10px; }
.leader { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.leader .rk { font-weight: 750; color: var(--text-3); font-size: 13px; text-align: center; }
.leader .meter { height: 5px; border-radius: 3px; background: var(--surface-3); margin-top: 5px; overflow: hidden; }
.leader .meter i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.leader .val { font-weight: 750; font-variant-numeric: tabular-nums; }

/* Formes W/D/L */
.form { display: inline-flex; gap: 4px; }
.form i { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-style: normal; font-size: 10.5px; font-weight: 800; color: #fff; }
.form i.W { background: var(--win); }
.form i.D { background: var(--draw); }
.form i.L { background: var(--loss); }
:root[data-theme="dark"] .form i.W { color: #03140b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .form i.W { color: #03140b; } }

/* Sondage */
.poll { display: flex; flex-direction: column; gap: 8px; }
.poll-opt {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 44px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--border-strong);
  font-weight: 600; font-size: 14px; text-align: left; transition: border-color .15s;
}
.poll-opt:hover:not([disabled]) { border-color: var(--accent); }
.poll-opt .fill { position: absolute; inset: 0 auto 0 0; background: var(--surface-3); z-index: 0; transition: width .6s var(--ease); }
.poll-opt.mine .fill { background: var(--accent-soft); }
.poll-opt.mine { border-color: var(--accent); }
.poll-opt > span { position: relative; z-index: 1; }
.poll-opt[disabled] { cursor: default; }

/* Verrou CERTIFIÉ */
.lock {
  position: relative; border-radius: var(--r-sm); overflow: hidden; border: 1px dashed color-mix(in srgb, var(--gold) 55%, var(--border));
  background: var(--gold-soft); padding: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
}
.lock .lock-title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--gold); }
.lock p { font-size: 13.5px; color: var(--text-2); }
.blurred { filter: blur(5px); user-select: none; pointer-events: none; opacity: .65; }

/* Bande des matchs (accueil mobile) */
.strip { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; scroll-snap-type: x proximity; }
.strip::-webkit-scrollbar { display: none; }
.strip-card { flex: none; width: 210px; scroll-snap-align: start; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.strip-card .team-line { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.strip-card .team-line .sc { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (min-width: 1100px) { .home-strip { display: none; } }

/* ---------- Matchs ---------- */
.day-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab { flex: none; min-width: 64px; padding: 8px 10px; border-radius: var(--r-sm); text-align: center; font-weight: 650; font-size: 13px; color: var(--text-3); border: 1px solid transparent; }
.day-tab small { display: block; font-size: 11px; font-weight: 550; }
.day-tab[aria-selected="true"] { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow-1); }
@media (min-width: 768px) { .day-tabs { margin: 0; padding: 0; } }
.comp-group { margin-top: 16px; }
.comp-head { display: flex; align-items: center; gap: 10px; padding: 0 4px 8px; font-weight: 700; font-size: 14px; }
.comp-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.match-row { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); transition: background .15s; }
.match-row:last-child { border-bottom: 0; }
.match-row:hover { background: var(--surface-2); }
.match-row .when { font-size: 12.5px; font-weight: 650; color: var(--text-3); text-align: center; line-height: 1.25; }
.match-row .when.live { color: var(--hot); }
.match-row .teams { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.match-row .t { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; min-width: 0; }
.match-row .t.lose { color: var(--text-3); font-weight: 550; }
.match-row .scores { display: flex; flex-direction: column; gap: 6px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; font-size: 14px; min-width: 20px; }
.status-chip { font-size: 11px; font-weight: 750; letter-spacing: .03em; text-transform: uppercase; }

/* Match Center */
.scoreboard { padding: 18px 16px 16px; text-align: center; }
.scoreboard .comp { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--text-3); }
.sb-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-top: 14px; }
.sb-team { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.sb-team a { font-weight: 700; font-size: 14.5px; line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
.sb-score { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; min-width: 100px; }
.sb-score.tbd { font-size: 22px; color: var(--text-2); font-weight: 750; }
.sb-status { margin-top: 10px; display: flex; justify-content: center; }
.timeline { position: relative; display: flex; flex-direction: column; gap: 4px; }
.tl-item { display: grid; grid-template-columns: 1fr 44px 1fr; align-items: center; gap: 8px; min-height: 40px; font-size: 13.5px; }
.tl-item .min { text-align: center; font-weight: 750; font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tl-item .ev { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tl-item .ev.home { justify-content: flex-end; text-align: right; }
.tl-item .ev .txt { min-width: 0; }
.tl-item .ev .txt b { display: block; font-weight: 650; }
.tl-item .ev .txt small { display: block; font-size: 12px; color: var(--text-3); }
.tl-ico { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); }
.tl-ico.goal { background: var(--accent-soft); color: var(--accent-strong); }
.tl-ico.card-y::before, .tl-ico.card-r::before { content: ""; width: 10px; height: 14px; border-radius: 2px; background: #f5c518; }
.tl-ico.card-r::before { background: var(--hot); }
.tl-sep { text-align: center; font-size: 12px; font-weight: 700; color: var(--text-3); padding: 6px 0; letter-spacing: .04em; }

.table-wrap { overflow-x: auto; }
table.standings { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.standings th { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--text-3); padding: 8px 4px; border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: .03em; }
.standings th.team-col, .standings td.team-col { text-align: left; }
.standings td { padding: 10px 4px; border-bottom: 1px solid var(--border); text-align: center; }
.standings tr:last-child td { border-bottom: 0; }
.standings tr.hl td { background: var(--accent-soft); }
.standings td.team-col a { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.standings .pts { font-weight: 800; }
.standings .hide-sm { display: none; }
@media (min-width: 560px) { .standings .hide-sm { display: table-cell; } }

.h2h-row { display: grid; grid-template-columns: 74px 1fr auto 1fr; gap: 8px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.h2h-row:last-child { border-bottom: 0; }
.h2h-row .d { color: var(--text-3); font-size: 12px; }
.h2h-row .h { text-align: right; }
.h2h-row .s { font-weight: 800; font-variant-numeric: tabular-nums; padding: 0 6px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { padding: 12px; border-radius: var(--r-sm); background: var(--surface-2); text-align: center; }
.kpi b { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.kpi span { font-size: 12px; color: var(--text-3); font-weight: 600; }

/* ---------- Détail publication ---------- */
.back { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 10px 0 4px; margin-left: -6px; border-radius: var(--pill); font-weight: 650; font-size: 14px; color: var(--text-2); }
.back:hover { background: var(--surface-2); }
.detail-head { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 16px; }
.detail-head h1 { font-size: 24px; }
@media (min-width: 768px) { .detail-head h1 { font-size: 28px; } }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .meta-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.meta-cell { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); }
.meta-cell span { display: block; font-size: 11.5px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.meta-cell b { display: block; font-size: 14px; font-weight: 700; margin-top: 2px; }
.prose { display: flex; flex-direction: column; gap: 12px; font-size: 15.5px; line-height: 1.65; color: var(--text-2); }
.prose p { color: var(--text); }
.match-fiche { overflow: hidden; }
.match-fiche > summary { list-style: none; cursor: pointer; padding: 14px 16px; display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; }
.match-fiche > summary::-webkit-details-marker { display: none; }
.match-fiche .idx { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.match-fiche .chev { transition: transform .2s var(--ease); color: var(--text-3); }
.match-fiche[open] .chev { transform: rotate(90deg); }
.match-fiche .fiche-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--border); padding-top: 14px; }
.trend { display: flex; gap: 10px; font-size: 14px; line-height: 1.45; }
.trend .ti { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.trend .ti .icon { width: 15px; height: 15px; }
.conclusion { padding: 12px 14px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--text); font-size: 14px; line-height: 1.5; }
.conclusion b { color: var(--accent-strong); display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.sub-title { font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }

/* Commentaires */
.comments { display: flex; flex-direction: column; gap: 16px; }
.comment { display: flex; gap: 10px; }
.comment .bubble { flex: 1; min-width: 0; }
.comment .c-head { display: flex; align-items: baseline; gap: 6px; font-size: 13.5px; flex-wrap: wrap; }
.comment .c-head b { font-weight: 650; }
.comment .c-body { font-size: 14.5px; margin-top: 2px; overflow-wrap: anywhere; }
.comment .c-actions { display: flex; gap: 14px; margin-top: 4px; font-size: 12.5px; font-weight: 650; color: var(--text-3); }
.comment .c-actions button:hover { color: var(--text); }
.replies { margin-left: 38px; display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.composer { display: flex; gap: 10px; align-items: flex-end; }
.composer .textarea { min-height: 44px; height: 44px; border-radius: 22px; padding: 11px 16px; resize: none; }
.composer .reply-to { font-size: 12.5px; color: var(--text-3); margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }

/* ---------- Magic Touch ---------- */
.magic-hero { padding: 20px; border-radius: var(--r-lg); background: var(--text); color: var(--bg); position: relative; overflow: hidden; }
.magic-hero h1 { color: inherit; }
.magic-hero p { opacity: .78; margin-top: 6px; font-size: 14.5px; }
.magic-hero .badge { background: color-mix(in srgb, var(--bg) 16%, transparent); color: var(--bg); }
.stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 18px 0 6px; }
.stepper i { height: 4px; border-radius: 2px; background: var(--surface-3); transition: background .3s; }
.stepper i.done { background: var(--accent); }
.opt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .opt-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; min-height: 64px;
  border-radius: var(--r); border: 1.5px solid var(--border); background: var(--surface); text-align: left;
  transition: border-color .15s, background .15s, transform .1s;
}
.opt:hover { border-color: var(--border-strong); }
.opt:active { transform: scale(.98); }
.opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.opt b { font-size: 14.5px; }
.opt small { font-size: 12.5px; color: var(--text-3); }
.count-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.count-pick .opt { min-width: 64px; align-items: center; min-height: 56px; justify-content: center; }
.count-pick .opt b { font-size: 20px; }
.wizard-nav { display: flex; gap: 10px; margin-top: 20px; position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px); padding: 10px 0; background: linear-gradient(transparent, var(--bg) 30%); }
@media (min-width: 768px) { .wizard-nav { bottom: 0; } }
.highlight { padding: 14px; }
.highlight ol { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.mt-table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.mt-table th { font-size: 11.5px; color: var(--text-3); font-weight: 700; text-align: right; padding: 6px 4px; border-bottom: 1px solid var(--border); }
.mt-table th:first-child, .mt-table td:first-child { text-align: left; }
.mt-table td { padding: 8px 4px; border-bottom: 1px solid var(--border); text-align: right; }
.mt-table td b { font-weight: 750; }

/* ---------- Messages ---------- */
.conv { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.conv:hover { background: var(--surface-2); }
.conv:last-child { border-bottom: 0; }
.conv .last { font-size: 13.5px; color: var(--text-3); }
.conv.unread .last { color: var(--text); font-weight: 600; }
.thread { display: flex; flex-direction: column; gap: 8px; padding: 12px 0 16px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }
.msg.them { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 6px; align-self: flex-start; }
.msg.me { background: var(--text); color: var(--bg); border-bottom-right-radius: 6px; align-self: flex-end; }
.msg time { display: block; font-size: 11px; opacity: .6; margin-top: 3px; }
.notif { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); position: relative; }
.notif:last-child { border-bottom: 0; }
.notif:hover { background: var(--surface-2); }
.notif.unread::after { content: ""; position: absolute; right: 16px; top: 20px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.notif .ni { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--surface-2); }
.notif .ni.goal, .notif .ni.match { background: var(--accent-soft); color: var(--accent-strong); }
.notif .ni.intelligence { background: var(--text); color: var(--bg); }
.notif .ni.social { background: var(--info-soft); color: var(--info); }
.notif .ni.system { background: var(--warn-soft); color: var(--warn); }

/* ---------- Profil ---------- */
.profile-card { padding: 20px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin-top: 6px; }
.tier-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tier-opt { padding: 14px; border-radius: var(--r); border: 1.5px solid var(--border); text-align: left; display: flex; flex-direction: column; gap: 4px; background: var(--surface); }
.tier-opt[aria-pressed="true"].free { border-color: var(--accent); background: var(--accent-soft); }
.tier-opt[aria-pressed="true"].certified { border-color: var(--gold); background: var(--gold-soft); }
.tier-opt small { color: var(--text-3); font-size: 12.5px; }
.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare th, .compare td { padding: 12px 8px; border-bottom: 1px solid var(--border); text-align: center; }
.compare th:first-child, .compare td:first-child { text-align: left; }
.compare th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.compare .yes { color: var(--accent-strong); }
.compare .no { color: var(--text-3); }
.cert-hero { padding: 24px 20px; border-radius: var(--r-lg); background: linear-gradient(160deg, var(--gold-soft), var(--surface)); border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--border)); }
.cert-hero h1 { margin-top: 10px; }

/* ---------- Rail desktop ---------- */
.rail .card + .card { margin-top: 16px; }
.rail-title { font-size: 15px; font-weight: 750; padding: 14px 16px 6px; display: flex; align-items: center; justify-content: space-between; }
.rail .match-row { grid-template-columns: 46px 1fr auto; padding: 10px 16px; }
.rail .match-row .t { font-size: 13px; }
.trend-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px 16px; }

/* ---------- Toast / sheet ---------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); z-index: 80; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
@media (min-width: 768px) { .toasts { bottom: 24px; } }
.toast { pointer-events: auto; background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: var(--r-sm); font-size: 14px; font-weight: 550; box-shadow: var(--shadow-3); display: flex; gap: 10px; align-items: center; animation: toast-in .25s var(--ease); }
.toast.err { background: var(--hot); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.sheet-backdrop { position: fixed; inset: 0; background: var(--overlay); z-index: 90; animation: fade .2s; display: flex; align-items: flex-end; justify-content: center; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 560px; max-height: 88dvh; overflow-y: auto; background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 8px 20px calc(20px + var(--safe-b)); animation: sheet-in .3s var(--ease); }
.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 4px auto 14px; }
@media (min-width: 768px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: var(--r-lg); } .sheet::before { display: none; } .sheet { padding-top: 20px; } }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }

/* ---------- Control ---------- */
.ctl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 768px) { .ctl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ctl-tile { padding: 14px; }
.ctl-tile span { font-size: 12px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.ctl-tile b { display: block; font-size: 18px; margin-top: 4px; font-weight: 750; overflow-wrap: anywhere; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.status-dot.ok { background: var(--accent); }
.status-dot.off { background: var(--draw); }
.status-dot.err { background: var(--hot); }
.log-line { font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 8px 12px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.log-line .lv { font-weight: 700; text-transform: uppercase; margin-right: 6px; }
.log-line .lv.error { color: var(--hot); }
.log-line .lv.warning { color: var(--warn); }
.log-line .lv.info { color: var(--info); }
.ctl-post { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); align-items: center; }
.ctl-post:last-child { border-bottom: 0; }
.form-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0 14px; }
