:root { --primary:#17324d; --accent:#ff6b4a; --teal:#2bb8a5; color:#172638; background:#f3f7f8; font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
* { box-sizing:border-box; letter-spacing:0; }
body { margin:0; }
[hidden] { display:none !important; }
header { background:linear-gradient(115deg,#fff 0%,#f4fbfa 100%); border-bottom:1px solid #d8e5e7; padding:18px 32px; display:flex; align-items:center; justify-content:space-between; gap:20px; }
.brand,.account,.actions,.toolbar,nav { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.brand img { width:52px; height:52px; object-fit:contain; filter:drop-shadow(0 6px 10px rgba(23,50,77,.16)); }
.brand strong { display:block; font-size:23px; letter-spacing:-.025em; color:var(--primary); overflow-wrap:anywhere; }
.brand span { display:block; font-size:14px; color:#647078; margin-top:4px; }
main,footer { max-width:1440px; margin:auto; padding:24px 32px; }
footer { border-top:1px solid #dce2e4; display:flex; justify-content:space-between; gap:16px; font-size:12px; color:#647078; }
.powered { display:flex; align-items:center; gap:10px; }
.powered img { width:94px; height:auto; }
button,input,select { font:inherit; font-size:14px; border-radius:6px; border:1px solid #c8d1d5; padding:10px 12px; background:white; color:inherit; }
button { cursor:pointer; min-height:40px; transition:transform .15s ease,box-shadow .15s ease,background .15s ease; }
button:hover { border-color:var(--primary); background:#edf6f5; transform:translateY(-1px); }
button.active,#signIn,.save-all { background:var(--primary); color:white; border-color:var(--primary); box-shadow:0 5px 14px rgba(23,50,77,.16); }
button:disabled { opacity:.5; cursor:not-allowed; }
input:focus-visible,button:focus-visible,select:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }
nav { border-bottom:1px solid #dce2e4; padding-bottom:16px; margin-bottom:20px; }
.toolbar { justify-content:space-between; }
.period { display:flex; gap:12px; }
label { display:flex; gap:6px; flex-direction:column; font-size:13px; }
.check { flex-direction:row; align-items:center; }
h1 { font-size:28px; line-height:1.2; margin:12px 0; }
h2 { font-size:20px; line-height:1.3; margin:26px 0 14px; }
p { line-height:1.5; }
#authPanel { max-width:600px; padding:40px 0; }
#status,#updated,.muted { color:#647078; font-size:13px; }
.stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin:20px 0; }
.stat { border-top:3px solid var(--teal); border-radius:8px; background:white; padding:16px; min-width:0; box-shadow:0 7px 24px rgba(23,50,77,.06); }
.stat span { display:block; font-size:13px; color:#647078; }
.stat strong { display:block; margin-top:10px; font-size:28px; overflow-wrap:anywhere; }
.podium { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.person { border:1px solid #dce2e4; border-radius:10px; padding:18px; background:white; min-width:0; box-shadow:0 7px 24px rgba(23,50,77,.06); }
.person:first-child { border-top:4px solid var(--accent); }
.person h3 { font-size:18px; overflow-wrap:anywhere; }
.person strong { font-size:28px; color:var(--primary); }
.rank { background:var(--accent); color:white; font-weight:700; display:inline-flex; width:30px; height:30px; justify-content:center; align-items:center; border-radius:50%; }
.table-wrap { overflow:auto; max-width:100%; background:white; border-radius:10px; box-shadow:0 7px 24px rgba(23,50,77,.06); }
table { width:100%; border-collapse:collapse; font-size:14px; }
th { color:#56666e; font-size:12px; text-align:left; border-bottom:2px solid var(--primary); }
td,th { padding:14px 12px; vertical-align:middle; }
td { border-bottom:1px solid #e1e7e9; }
td:first-child { min-width:140px; overflow-wrap:anywhere; }
table input { width:100px; min-width:80px; }
.mix { display:flex; gap:16px; flex-wrap:wrap; }
.mix .stat { flex:1 1 180px; }
.progress { display:grid; gap:5px; min-width:120px; }
progress { width:100%; height:8px; accent-color:var(--primary); }
.notice { background:#eaf2ef; border-left:3px solid var(--primary); padding:14px; display:flex; gap:16px; align-items:center; flex-wrap:wrap; margin:16px 0; }
.admin-tools { display:flex; gap:16px; align-items:center; justify-content:space-between; flex-wrap:wrap; margin:18px 0; }
.add-person { display:flex; gap:8px; flex-wrap:wrap; }
.add-person input { min-width:200px; }
details { margin:30px 0; border-top:1px solid #dce2e4; padding-top:16px; }
textarea { width:100%; min-height:160px; padding:12px; border:1px solid #c8d1d5; border-radius:6px; font:13px monospace; margin:16px 0; }
body.embed header,body.embed footer { display:none; }
body.tv header,body.tv nav,body.tv .toolbar,body.tv footer { display:none; }
body.tv { font-size:18px; }
body.tv table { font-size:18px; }
body.tv main { max-width:100%; }
#exitTv { position:fixed; right:12px; bottom:12px; z-index:5; }
@media(max-width:760px) {
  header,main,footer { padding:16px; }
  header { align-items:flex-start; flex-direction:column; }
  .account { font-size:12px; overflow-wrap:anywhere; }
  .stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .podium { grid-template-columns:1fr; }
  .toolbar { gap:16px; }
  .actions { width:100%; }
  nav { gap:8px; }
}
