
:root{
  --bg:#0a0d16; --surface:#161b2c; --surface2:#1d2338; --border:#2a3149;
  --text:#eef1f8; --text2:#8d96ad; --text3:#4a5270;
  --gold:#c9a84c; --gold2:#e8c96a;
  --fire:#e2574c; --fire-l:#ff8f74;
  --air:#3fb6c9; --air-l:#8fe3ee;
  --earth:#3f8f4f; --earth-l:#7bd18f;
  --water:#3366cc; --water-l:#7fa8f0;
  --tpsr:#b33f3f; --se:#2c5282; --tourn:#b8860b; --break:#2f7d5c;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
html{-webkit-tap-highlight-color:transparent;}
body{ font-family:'DM Sans',sans-serif; background:var(--bg); color:var(--text); min-height:100vh; overflow-x:hidden; position:relative; }
body::before{
  content:''; position:fixed; inset:0; pointer-events:none; z-index:0;
  background:radial-gradient(ellipse 70% 50% at 50% 0%, rgba(201,168,76,.07) 0%, transparent 60%),
    linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size:100% 100%, 56px 56px, 56px 56px; opacity:.3;
}
a{color:inherit}

.topbar{ position:sticky; top:0; z-index:40; background:rgba(10,13,22,.96); backdrop-filter:blur(10px); border-bottom:1px solid var(--border); }
.topbar-inner{ max-width:1220px; margin:0 auto; padding:10px 20px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.brand{ display:flex; align-items:center; gap:10px; }
.brand-logo{ width:32px; height:32px; border-radius:50%; background:#fff; padding:2px; flex-shrink:0; }
.brand-text .l1{ font-family:'Syne',sans-serif; font-weight:800; font-size:.7rem; color:var(--gold); line-height:1.3; }
.brand-text .l2{ font-size:.6rem; color:var(--text3); letter-spacing:.04em; }
.gnav{ display:flex; gap:6px; margin-left:14px; flex-wrap:wrap; }
.gnav-btn{ background:var(--surface); border:1px solid var(--border); color:var(--text2); font-family:'Syne',sans-serif; font-size:.72rem; font-weight:700; padding:8px 14px; border-radius:8px; cursor:pointer; transition:.15s; display:flex; align-items:center; gap:6px; }
.gnav-btn:hover{ border-color:var(--gold); color:var(--gold); }
.gnav-btn.active{ background:rgba(201,168,76,.14); border-color:var(--gold); color:var(--gold); }
.topbar-right{ margin-left:auto; display:flex; align-items:center; gap:8px; }
.staff-link{ background:none; border:none; color:var(--text3); font-size:.66rem; font-family:'DM Sans',sans-serif; cursor:pointer; padding:6px 8px; text-decoration:underline; text-decoration-style:dotted; opacity:.6; }
.staff-link:hover{ opacity:1; color:var(--text2); }
.mute-btn{ background:var(--surface); border:1px solid var(--border); color:var(--text2); width:34px; height:34px; border-radius:8px; cursor:pointer; font-size:.95rem; flex-shrink:0; }

.gate-overlay{ position:fixed; inset:0; z-index:200; background:rgba(6,8,14,.88); backdrop-filter:blur(6px); display:none; align-items:center; justify-content:center; padding:20px; }
.gate-overlay.open{ display:flex; }
.gate-box{ max-width:380px; width:100%; text-align:center; }
.gate-logo{ width:64px; height:64px; border-radius:50%; background:#fff; padding:5px; margin:0 auto 14px; }
.form-card{ background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:26px; text-align:left; }
.field{ margin-bottom:14px; }
.field label{ display:block; font-family:'Syne',sans-serif; font-size:.66rem; font-weight:700; color:var(--text2); margin-bottom:6px; text-transform:uppercase; letter-spacing:.06em; }
.field input, .field select, .field textarea{ width:100%; background:var(--surface2); border:1px solid var(--border); border-radius:8px; padding:10px 12px; color:var(--text); font-size:.9rem; font-family:'DM Sans',sans-serif; }
.field textarea{ resize:vertical; min-height:80px; }
.btn{ font-family:'Syne',sans-serif; font-size:.8rem; font-weight:700; padding:11px 22px; border-radius:9px; border:none; cursor:pointer; width:100%; text-transform:uppercase; letter-spacing:.05em; }
.btn-gold{ background:linear-gradient(135deg,var(--gold),var(--gold2)); color:#1a1200; }
.btn-gold:hover{ filter:brightness(1.05); }
.btn-ghost{ background:transparent; border:1px solid var(--border); color:var(--text2); width:auto; padding:9px 18px; }
.err{ color:var(--fire-l); font-size:.78rem; margin-top:10px; min-height:1em; }
.gate-close{ margin-top:12px; }

.page{ display:none; position:relative; z-index:1; }
.page.active{ display:block; animation:pageIn .35s ease; }
@keyframes pageIn{ from{opacity:0; transform:translateY(10px);} to{opacity:1; transform:none;} }

.home-wrap, .feed-wrap{ max-width:900px; margin:0 auto; padding:36px 20px 60px; }
.home-hero, .feed-hdr{ text-align:center; margin-bottom:30px; }
.home-logo{ width:76px; height:76px; border-radius:50%; background:#fff; padding:5px; margin:0 auto 14px; filter:drop-shadow(0 8px 20px rgba(201,168,76,.28)); }
.home-kicker{ font-family:'Syne',sans-serif; font-size:.7rem; font-weight:700; letter-spacing:.24em; text-transform:uppercase; color:var(--gold); margin-bottom:10px; }
.home-title, .feed-hdr h1{ font-family:'Syne',sans-serif; font-size:clamp(1.7rem,4.5vw,2.4rem); font-weight:800; margin-bottom:8px; }
.home-sub, .sub{ color:var(--text2); font-size:.9rem; max-width:520px; margin:0 auto; }

.card{ background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:24px; margin-bottom:22px; }
.card-title{ font-family:'Syne',sans-serif; font-size:.9rem; font-weight:800; margin-bottom:16px; display:flex; align-items:center; gap:8px; }
.live-pill{ margin-left:auto; display:flex; align-items:center; gap:6px; font-family:'DM Mono',monospace; font-size:.65rem; color:var(--earth-l); background:rgba(63,143,79,.12); border:1px solid rgba(63,143,79,.3); padding:4px 10px; border-radius:20px; }
.live-dot{ width:6px; height:6px; border-radius:50%; background:var(--earth-l); animation:livepulse 1.6s ease-in-out infinite; }
@keyframes livepulse{ 0%,100%{opacity:1;} 50%{opacity:.4;} }

.standing-row{ display:flex; align-items:center; gap:14px; padding:11px 0; border-bottom:1px solid var(--border); }
.standing-row:last-child{ border-bottom:none; }
.standing-rank{ font-family:'Syne',sans-serif; font-weight:800; font-size:1.1rem; color:var(--text3); width:22px; }
.standing-rank.r1{ color:var(--gold); }
.standing-house{ display:flex; align-items:center; gap:8px; font-family:'Syne',sans-serif; font-weight:700; font-size:.92rem; width:110px; }
.standing-bar-track{ flex:1; height:8px; background:var(--surface2); border-radius:4px; overflow:hidden; }
.standing-bar-fill{ height:100%; border-radius:4px; transition:width 1s; }
.standing-pts{ font-family:'DM Mono',monospace; font-weight:600; width:50px; text-align:right; }

.activity-list{ display:flex; flex-direction:column; gap:8px; max-height:420px; overflow-y:auto; }
.activity-row{ display:flex; align-items:center; gap:10px; background:var(--surface2); border-radius:9px; padding:10px 14px; font-size:.82rem; }
.activity-row .a-icon{ font-size:1.1rem; flex-shrink:0; }
.activity-row .a-text{ flex:1; line-height:1.4; }
.activity-row .a-text b{ color:var(--gold); }
.activity-row .a-time{ font-family:'DM Mono',monospace; font-size:.68rem; color:var(--text3); white-space:nowrap; }
.activity-empty{ text-align:center; color:var(--text3); font-size:.82rem; padding:24px; }

.award-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
@media(max-width:640px){ .award-grid{ grid-template-columns:1fr; } }
.award-cat{ background:var(--surface2); border-radius:10px; padding:14px 16px; }
.award-cat h4{ font-family:'Syne',sans-serif; font-size:.8rem; margin-bottom:8px; }
.award-item{ display:flex; justify-content:space-between; font-size:.78rem; padding:4px 0; color:var(--text2); }
.award-item b{ color:var(--text); font-family:'DM Mono',monospace; }

.post-card{ background:var(--surface); border:1px solid var(--border); border-radius:14px; overflow:hidden; margin-bottom:18px; }
.post-photo{ width:100%; max-height:320px; object-fit:cover; display:block; }
.post-body{ padding:20px 22px; }
.post-meta{ display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.post-tag{ font-family:'Syne',sans-serif; font-size:.62rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; padding:3px 10px; border-radius:20px; }
.post-tag.news{ background:rgba(63,182,201,.14); color:var(--air-l); }
.post-tag.application{ background:rgba(201,168,76,.16); color:var(--gold); }
.post-date{ font-family:'DM Mono',monospace; font-size:.7rem; color:var(--text3); }
.post-title{ font-family:'Syne',sans-serif; font-size:1.05rem; font-weight:800; margin-bottom:8px; }
.post-text{ color:var(--text2); font-size:.86rem; line-height:1.65; margin-bottom:14px; white-space:pre-wrap; }
.post-links{ display:flex; gap:10px; flex-wrap:wrap; }
.post-link{ display:inline-flex; align-items:center; gap:6px; background:var(--surface2); border:1px solid var(--border); color:var(--gold); text-decoration:none; padding:9px 16px; border-radius:8px; font-family:'Syne',sans-serif; font-size:.76rem; font-weight:700; transition:.15s; }
.post-link:hover{ border-color:var(--gold); background:rgba(201,168,76,.1); }
.feed-empty{ text-align:center; color:var(--text3); padding:60px 20px; }
.feed-empty .fe-icon{ font-size:2.4rem; margin-bottom:14px; display:block; }

.sort-wrap-inner{ max-width:780px; margin:0 auto; padding:40px 20px 60px; text-align:center; position:relative; z-index:1; }
.sort-screen{ display:none; width:100%; flex-direction:column; align-items:center; animation:fadeUp .5s ease; }
.sort-screen.active{ display:flex; }
@keyframes fadeUp{ from{opacity:0; transform:translateY(18px);} to{opacity:1; transform:none;} }
.crest-logo{ width:84px; height:84px; margin:0 auto 16px; border-radius:50%; background:#fff; padding:6px; filter:drop-shadow(0 8px 20px rgba(201,168,76,.28)); object-fit:contain; }
.role-toggle{ display:flex; gap:8px; margin-bottom:20px; }
.role-btn{ flex:1; background:var(--surface2); border:1px solid var(--border); color:var(--text2); padding:11px 6px; border-radius:9px; font-family:'Syne',sans-serif; font-size:.72rem; font-weight:700; cursor:pointer; transition:.15s; text-align:center; }
.role-btn.active{ background:rgba(201,168,76,.14); border-color:var(--gold); color:var(--gold); }
.field-group{ display:none; }
.field-group.visible{ display:block; }
.hint{ font-size:.72rem; color:var(--text3); margin-top:6px; }
.cycle-badge{ display:inline-flex; align-items:center; gap:8px; background:var(--surface2); border:1px solid var(--border); border-radius:30px; padding:7px 18px; font-family:'Syne',sans-serif; font-size:.75rem; font-weight:700; color:var(--gold); margin-bottom:26px; }
.cards-row{ display:flex; gap:18px; justify-content:center; flex-wrap:wrap; perspective:1400px; margin-bottom:24px; }
.mystery-card{ width:126px; height:176px; position:relative; cursor:pointer; transform-style:preserve-3d; transition:transform .8s cubic-bezier(.34,1.56,.64,1), opacity .4s ease; }
.mystery-card.disabled{ pointer-events:none; opacity:.25; }
.mystery-card.chosen-dim{ opacity:0; }
.mystery-card.flipped{ transform:rotateY(180deg); }
.card-face{ position:absolute; inset:0; border-radius:14px; backface-visibility:hidden; display:flex; flex-direction:column; align-items:center; justify-content:center; box-shadow:0 12px 28px rgba(0,0,0,.4); }
.card-back{ background:repeating-linear-gradient(45deg, rgba(201,168,76,.06) 0 8px, transparent 8px 16px), linear-gradient(160deg,#1d2338,#12162458); border:2px solid var(--border); }
.card-back-inner{ border:1px solid rgba(201,168,76,.35); border-radius:9px; width:calc(100% - 18px); height:calc(100% - 18px); display:flex; align-items:center; justify-content:center; }
.card-back .mark{ font-family:'Syne',sans-serif; font-size:2.1rem; font-weight:800; color:rgba(201,168,76,.55); }
.card-front{ transform:rotateY(180deg); border:2px solid; }
.card-front .emblem{ font-size:2.3rem; margin-bottom:6px; }
.card-front .hname{ font-family:'Syne',sans-serif; font-size:.9rem; font-weight:800; color:#fff; letter-spacing:.03em; }
.mystery-card.spinning{ animation:cardshake .13s infinite; }
@keyframes cardshake{ 0%{transform:translateX(0) rotate(0deg);} 25%{transform:translateX(-3px) rotate(-1.5deg);} 75%{transform:translateX(3px) rotate(1.5deg);} 100%{transform:translateX(0) rotate(0deg);} }
.mystery-card.spinning .card-back{ box-shadow:0 0 0 3px var(--flicker,var(--gold)), 0 14px 34px rgba(0,0,0,.5); }
.status-line{ font-size:.85rem; color:var(--text2); min-height:1.4em; margin-top:6px; }
.flavor{ font-size:.78rem; color:var(--text3); font-style:italic; margin-top:20px; }
.quota-note{ font-size:.72rem; color:var(--text3); margin-top:8px; }
.reveal-stage{ position:relative; margin-bottom:30px; }
.reveal-crest{ font-size:5rem; margin-bottom:10px; animation:popin .6s cubic-bezier(.34,1.56,.64,1); }
@keyframes popin{ 0%{transform:scale(0) rotate(-20deg); opacity:0;} 60%{transform:scale(1.15) rotate(6deg);} 100%{transform:scale(1) rotate(0); opacity:1;} }
.reveal-house{ font-family:'Syne',sans-serif; font-size:clamp(2rem,6vw,2.8rem); font-weight:800; margin-bottom:6px; }
.reveal-motto{ font-style:italic; color:var(--text2); font-size:1rem; margin-bottom:6px; }
.reveal-cycle{ font-size:.78rem; color:var(--text3); text-transform:uppercase; letter-spacing:.08em; font-family:'Syne',sans-serif; font-weight:700; margin-bottom:30px; }
.reveal-name{ font-size:1.15rem; margin-bottom:4px; }
.reveal-name strong{ color:var(--gold); }
.already-card{ background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:36px 30px; max-width:420px; width:100%; margin:0 auto; }
#confetti-container{ position:fixed; inset:0; pointer-events:none; z-index:150; overflow:hidden; }
.confetti-piece{ position:absolute; border-radius:1px; will-change:transform,opacity; }
@keyframes confetti-fall{ 0%{transform:translate(0,0) rotate(0deg); opacity:1;} 100%{transform:translate(var(--dx),480px) rotate(var(--rot)); opacity:0;} }

.track-hdr-row{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin:20px auto; max-width:1020px; padding:0 20px; }
.live-totals{ display:flex; gap:8px; flex-wrap:wrap; }
.lt-chip{ display:flex; align-items:center; gap:5px; background:var(--surface); border:1px solid var(--border); border-radius:20px; padding:5px 12px; font-family:'DM Mono',monospace; font-size:.76rem; }
.lt-chip .n{ font-weight:700; }
.undo-btn{ background:var(--surface2); border:1px solid var(--border); color:var(--text2); border-radius:8px; padding:6px 12px; font-size:.72rem; font-family:'Syne',sans-serif; font-weight:700; cursor:pointer; margin-left:auto; }
.undo-btn:disabled{ opacity:.35; }
.track-main{ max-width:1020px; margin:0 auto; padding:0 20px 60px; }
.tabs{ display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:26px; }
.tab{ background:var(--surface); border:2px solid var(--border); border-radius:12px; padding:16px 10px; cursor:pointer; text-align:center; transition:.18s; color:var(--text2); }
.tab .temoji{ font-size:1.6rem; margin-bottom:6px; display:block; }
.tab .tlabel{ font-family:'Syne',sans-serif; font-size:.78rem; font-weight:700; }
.tab.active{ color:#fff; }
.tab[data-cat="tpsr"].active{ border-color:var(--tpsr); background:linear-gradient(160deg, rgba(179,63,63,.18), var(--surface)); }
.tab[data-cat="se"].active{ border-color:var(--se); background:linear-gradient(160deg, rgba(44,82,130,.22), var(--surface)); }
.tab[data-cat="tournament"].active{ border-color:var(--tourn); background:linear-gradient(160deg, rgba(184,134,11,.2), var(--surface)); }
.tab[data-cat="breakclub"].active{ border-color:var(--break); background:linear-gradient(160deg, rgba(47,125,92,.2), var(--surface)); }
@media(max-width:640px){ .tabs{ grid-template-columns:repeat(2,1fr); } }
.panel{ display:none; }
.panel.active{ display:block; animation:pageIn .3s ease; }
.panel-hdr{ display:flex; align-items:center; gap:10px; margin-bottom:6px; }
.panel-hdr .pemoji{ font-size:1.4rem; }
.panel-hdr h2{ font-family:'Syne',sans-serif; font-size:1.15rem; font-weight:800; }
.panel-desc{ color:var(--text2); font-size:.84rem; margin-bottom:20px; }
.step-label{ font-family:'Syne',sans-serif; font-size:.68rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--text2); margin-bottom:10px; }
.subtype-row{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:22px; }
.subtype-chip{ background:var(--surface); border:2px solid var(--border); border-radius:10px; padding:10px 16px; cursor:pointer; transition:.15s; text-align:left; color:var(--text); }
.subtype-chip .sc-label{ font-family:'Syne',sans-serif; font-size:.82rem; font-weight:700; display:block; }
.subtype-chip .sc-pts{ font-family:'DM Mono',monospace; font-size:.72rem; color:var(--text2); }
.class-row{ margin-bottom:22px; max-width:260px; }
.class-row label{ display:block; font-size:.7rem; color:var(--text2); margin-bottom:6px; font-family:'Syne',sans-serif; font-weight:700; }
.class-row select{ width:100%; background:var(--surface2); border:1px solid var(--border); border-radius:8px; padding:9px 12px; color:var(--text); font-size:.85rem; }
.hint-banner{ background:var(--surface); border:1px dashed var(--border); border-radius:10px; padding:14px 18px; color:var(--text3); font-size:.82rem; margin-bottom:20px; text-align:center; }
.house-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:26px; }
@media(max-width:640px){ .house-grid{ grid-template-columns:repeat(2,1fr); } }
.house-card{ position:relative; border-radius:14px; padding:20px 14px; text-align:center; cursor:pointer; border:2px solid var(--border); background:var(--surface); transition:transform .12s; overflow:hidden; user-select:none; }
.house-card:active{ transform:scale(.96); }
.house-card.disabled{ opacity:.35; cursor:not-allowed; pointer-events:none; }
.house-card .hc-emoji{ font-size:2.2rem; margin-bottom:6px; }
.house-card .hc-name{ font-family:'Syne',sans-serif; font-size:1rem; font-weight:800; margin-bottom:10px; }
.house-card .hc-stats{ display:flex; justify-content:center; gap:14px; font-family:'DM Mono',monospace; font-size:.72rem; color:var(--text2); }
.house-card .hc-stats b{ color:var(--text); font-size:.9rem; display:block; }
.house-fire{ border-color:rgba(226,87,76,.4); } .house-fire .hc-name{ color:var(--fire-l); }
.house-air{ border-color:rgba(63,182,201,.4); } .house-air .hc-name{ color:var(--air-l); }
.house-earth{ border-color:rgba(63,143,79,.4); } .house-earth .hc-name{ color:var(--earth-l); }
.house-water{ border-color:rgba(51,102,204,.4); } .house-water .hc-name{ color:var(--water-l); }
.floater{ position:absolute; left:50%; top:40%; transform:translate(-50%,-50%); font-family:'Syne',sans-serif; font-weight:800; font-size:1.4rem; pointer-events:none; opacity:0; z-index:5; }
.floater.show{ animation:floatUp 1s ease forwards; }
@keyframes floatUp{ 0%{opacity:0; transform:translate(-50%,-40%) scale(.6);} 25%{opacity:1; transform:translate(-50%,-70%) scale(1.15);} 100%{opacity:0; transform:translate(-50%,-140%) scale(1);} }
.card-pulse{ animation:cardpulse .5s ease; }
@keyframes cardpulse{ 0%{box-shadow:0 0 0 0 rgba(255,255,255,.4);} 100%{box-shadow:0 0 0 18px rgba(255,255,255,0);} }
.log-title{ font-family:'Syne',sans-serif; font-size:.78rem; font-weight:700; color:var(--text2); margin-bottom:10px; text-transform:uppercase; }
.log-list{ display:flex; flex-direction:column; gap:6px; }
.log-row{ display:flex; align-items:center; gap:10px; background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:8px 14px; font-size:.78rem; color:var(--text2); }
.log-row .lr-house{ font-weight:700; }
.log-row .lr-time{ margin-left:auto; font-family:'DM Mono',monospace; font-size:.7rem; color:var(--text3); }
.log-empty{ color:var(--text3); font-size:.8rem; text-align:center; padding:16px; }

.dash-wrap{ max-width:1220px; margin:0 auto; padding:24px 20px 60px; }
.dash-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; flex-wrap:wrap; gap:14px; }
.dash-header h2{ font-family:'Syne',sans-serif; font-size:1.4rem; font-weight:800; }
.dash-actions{ display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.btn-small{ width:auto; padding:9px 16px; font-size:.72rem; }
.live-indicator{ display:flex; align-items:center; gap:7px; font-family:'DM Mono',monospace; font-size:.7rem; color:var(--earth-l); background:rgba(63,143,79,.12); border:1px solid rgba(63,143,79,.3); padding:6px 12px; border-radius:20px; }
.admin-tabs{ display:flex; gap:6px; margin-bottom:22px; border-bottom:1px solid var(--border); flex-wrap:wrap; }
.admin-tab{ background:none; border:none; color:var(--text2); font-family:'Syne',sans-serif; font-size:.78rem; font-weight:700; padding:10px 14px; cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1px; }
.admin-tab.active{ color:var(--gold); border-bottom-color:var(--gold); }
.tab-panel{ display:none; }
.tab-panel.active{ display:block; animation:pageIn .3s ease; }
.sheet-note{ font-size:.78rem; color:var(--text2); margin-bottom:16px; }
.stat-row{ display:flex; gap:12px; flex-wrap:wrap; margin-bottom:24px; }
.stat{ background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:14px 20px; flex:1; min-width:110px; text-align:left; }
.stat .v{ font-family:'Syne',sans-serif; font-size:1.5rem; font-weight:800; }
.stat .l{ font-size:.68rem; color:var(--text2); text-transform:uppercase; margin-top:2px; }
.house-summary{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-bottom:28px; }
@media(max-width:800px){ .house-summary{ grid-template-columns:1fr; } }
.hs-cycle{ background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:16px; }
.hs-cycle h4{ font-family:'Syne',sans-serif; font-size:.78rem; color:var(--text2); margin-bottom:12px; }
.hs-row{ display:flex; align-items:center; justify-content:space-between; padding:5px 0; font-size:.82rem; }
.hs-dot{ width:9px; height:9px; border-radius:50%; display:inline-block; margin-right:8px; }
.section-title{ font-family:'Syne',sans-serif; font-size:.9rem; font-weight:800; margin:26px 0 14px; }
.standings-strip{ background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:20px; max-width:none; margin-bottom:24px; }
.staff-summary{ display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:10px; }
@media(max-width:640px){ .staff-summary{ grid-template-columns:repeat(2,1fr); } }
.staff-house-card{ background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:14px; text-align:center; }
.staff-house-card .v{ font-family:'Syne',sans-serif; font-size:1.4rem; font-weight:800; }
.class-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:12px; }
.class-card{ background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:13px 15px; }
.class-card-hdr{ display:flex; justify-content:space-between; align-items:center; margin-bottom:9px; }
.class-card-hdr .cname{ font-family:'Syne',sans-serif; font-weight:800; font-size:.85rem; }
.class-card-hdr .ctotal{ font-family:'DM Mono',monospace; font-size:.7rem; color:var(--text3); }
.qbar-row{ display:flex; align-items:center; gap:7px; margin-bottom:5px; font-size:.68rem; }
.qbar-label{ width:14px; text-align:center; }
.qbar-track{ flex:1; height:6px; background:var(--surface2); border-radius:3px; overflow:hidden; }
.qbar-fill{ height:100%; border-radius:3px; transition:width .5s; }
.qbar-count{ width:26px; text-align:right; font-family:'DM Mono',monospace; color:var(--text2); }
.qbar-full .qbar-count{ color:var(--fire-l); font-weight:700; }
.cat-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:14px; margin-bottom:26px; }
@media(max-width:640px){ .cat-grid{ grid-template-columns:1fr; } }
.cat-card{ background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:16px; }
.cat-card h4{ font-family:'Syne',sans-serif; font-size:.78rem; margin-bottom:10px; }
.cat-hrow{ display:flex; justify-content:space-between; font-size:.8rem; padding:4px 0; }
.filters{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:16px; }
.filters select{ background:var(--surface2); border:1px solid var(--border); border-radius:7px; padding:8px 12px; color:var(--text); font-size:.8rem; }
.table-wrap{ background:var(--surface); border:1px solid var(--border); border-radius:12px; overflow:hidden; overflow-x:auto; }
.sheet-wrap{ max-height:480px; overflow-y:auto; }
table{ width:100%; border-collapse:collapse; font-size:.8rem; }
.sheet-table{ font-family:'DM Mono',monospace; }
thead th{ text-align:left; padding:11px 14px; font-family:'Syne',sans-serif; font-size:.63rem; text-transform:uppercase; color:var(--text2); background:var(--surface2); white-space:nowrap; position:sticky; top:0; z-index:2; }
tbody td{ padding:9px 14px; border-top:1px solid var(--border); white-space:nowrap; font-size:.76rem; }
.sheet-table .col-row{ width:40px; color:var(--text3); text-align:center; }
.sheet-table tbody tr:nth-child(even){ background:rgba(255,255,255,.015); }
.sheet-table tbody tr.row-new{ animation:rowflash 1.8s ease; }
@keyframes rowflash{ 0%{background:rgba(201,168,76,.35);} 100%{background:transparent;} }
.house-pill{ display:inline-flex; align-items:center; gap:5px; padding:2px 10px; border-radius:20px; font-size:.7rem; font-weight:700; font-family:'Syne',sans-serif; }
.role-pill{ display:inline-flex; padding:2px 9px; border-radius:20px; font-size:.66rem; font-weight:700; font-family:'Syne',sans-serif; background:var(--surface2); color:var(--text2); }
.role-pill.staff{ color:var(--gold); background:rgba(201,168,76,.12); }
.empty-row td{ text-align:center; color:var(--text3); padding:40px; }
.danger-zone{ margin-top:32px; padding:18px 20px; border:1px dashed rgba(226,87,76,.4); border-radius:10px; background:rgba(226,87,76,.05); }
.danger-zone p{ font-size:.78rem; color:var(--text2); margin-bottom:10px; }
.btn-danger{ background:transparent; border:1px solid var(--fire); color:var(--fire-l); width:auto; padding:8px 16px; font-size:.72rem; margin-right:8px; margin-bottom:8px; cursor:pointer; }
.pcat-block{ background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:18px 20px; margin-bottom:18px; }
.pcat-hdr{ font-family:'Syne',sans-serif; font-size:.95rem; font-weight:800; margin-bottom:14px; display:flex; align-items:center; gap:8px; }
.prow{ display:grid; grid-template-columns:1fr 100px 34px; gap:10px; align-items:center; margin-bottom:8px; }
.prow input[type="text"]{ background:var(--surface2); border:1px solid var(--border); border-radius:7px; padding:8px 10px; color:var(--text); font-size:.82rem; }
.prow input[type="number"]{ background:var(--surface2); border:1px solid var(--border); border-radius:7px; padding:8px 10px; color:var(--text); font-size:.82rem; text-align:center; }
.prow select{ background:var(--surface2); border:1px solid var(--border); border-radius:7px; padding:8px 10px; color:var(--text); font-size:.8rem; }
.prow .del-btn{ background:rgba(226,87,76,.12); border:1px solid rgba(226,87,76,.3); color:var(--fire-l); border-radius:7px; height:34px; cursor:pointer; }
.add-row-btn{ background:var(--surface2); border:1px dashed var(--border); color:var(--text2); border-radius:7px; padding:8px 14px; font-size:.76rem; font-family:'Syne',sans-serif; font-weight:700; cursor:pointer; margin-top:6px; }
.save-cat-btn{ background:var(--gold); color:#1a1200; border:none; border-radius:7px; padding:8px 16px; font-size:.76rem; font-family:'Syne',sans-serif; font-weight:700; cursor:pointer; margin-top:10px; }
.save-confirm{ font-size:.74rem; color:var(--earth-l); margin-left:10px; }
.composer{ background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:22px; margin-bottom:26px; }
.composer h3{ font-family:'Syne',sans-serif; font-size:1rem; margin-bottom:16px; }
.type-toggle{ display:flex; gap:8px; margin-bottom:16px; }
.type-btn{ flex:1; background:var(--surface2); border:1px solid var(--border); color:var(--text2); padding:9px; border-radius:8px; font-family:'Syne',sans-serif; font-size:.76rem; font-weight:700; cursor:pointer; }
.type-btn.active{ background:rgba(201,168,76,.14); border-color:var(--gold); color:var(--gold); }
.link-row{ display:grid; grid-template-columns:1fr 2fr 34px; gap:8px; margin-bottom:8px; }
.link-row input{ background:var(--surface2); border:1px solid var(--border); border-radius:7px; padding:8px 10px; color:var(--text); font-size:.8rem; }
.link-row button{ background:rgba(226,87,76,.12); border:1px solid rgba(226,87,76,.3); color:var(--fire-l); border-radius:7px; cursor:pointer; }
.photo-preview{ max-width:200px; border-radius:8px; margin-top:8px; display:none; }
.posts-list{ display:flex; flex-direction:column; gap:10px; }
.post-admin-row{ background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:14px 16px; display:flex; align-items:center; gap:14px; }
.post-admin-row img{ width:50px; height:50px; object-fit:cover; border-radius:8px; flex-shrink:0; }
.post-admin-info{ flex:1; }
.post-admin-info .pt{ font-family:'Syne',sans-serif; font-weight:700; font-size:.86rem; }
.post-admin-info .pm{ font-size:.72rem; color:var(--text3); }
.post-admin-actions{ display:flex; gap:8px; }
.post-admin-actions button{ background:var(--surface2); border:1px solid var(--border); color:var(--text2); border-radius:7px; padding:6px 12px; font-size:.72rem; cursor:pointer; font-family:'Syne',sans-serif; font-weight:700; }
.tbl-remove-btn{ background:rgba(226,87,76,.12); border:1px solid rgba(226,87,76,.3); color:var(--fire-l); border-radius:6px; padding:4px 10px; font-size:.68rem; cursor:pointer; font-family:'Syne',sans-serif; font-weight:700; }
