:root{color-scheme:dark;--gold:#d7b66d;--muted:#aaa3a0;--border:#675332}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 50% 0,#45151e 0,transparent 550px),#0d0d11;color:#eee9df;font-family:system-ui,Arial,sans-serif}header{text-align:center;padding:36px 16px 28px}.crown{font-size:64px;line-height:1;color:var(--gold);text-shadow:0 0 35px #bc863d60}h1,h2,h3{margin:0}h1{font-family:Georgia,serif;font-size:clamp(42px,8vw,80px);letter-spacing:.06em;line-height:1.1}h1 span{color:var(--gold)}.tagline,small{letter-spacing:.19em;font-size:11px;font-weight:700;color:var(--gold)}.tagline{font-size:13px;margin:12px 0}.rule{height:1px;max-width:420px;background:linear-gradient(90deg,transparent,var(--gold),transparent);margin:22px auto}.subtitle{color:var(--muted);margin:0}main{max-width:1060px;margin:auto;padding:0 18px 24px}.panel{background:linear-gradient(135deg,#20171b,#121216 65%);border:1px solid var(--border);border-radius:12px;padding:24px;margin-bottom:20px;box-shadow:0 10px 40px #0005}.heading{display:flex;justify-content:space-between;align-items:end;gap:10px;margin-bottom:22px}h2{font:700 29px Georgia,serif;margin-top:6px}.meta{color:var(--muted);font-size:13px;text-align:right}.podium{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:end;gap:14px}.place{border:1px solid var(--metal);border-radius:9px;text-align:center;padding:22px 8px;background:linear-gradient(160deg,#ffffff08,transparent);min-width:0;box-shadow:inset 0 0 24px #0006}.place-1{--metal:#d7b66d;padding-top:35px;padding-bottom:35px;background:radial-gradient(ellipse at top,#77552655,transparent 80%),#1e1817}.place-2{--metal:#9fa8b8}.place-3{--metal:#bd835c}.medal{font:700 46px Georgia,serif;color:var(--metal);margin-bottom:10px}.place h3{font-size:clamp(14px,2.1vw,22px);overflow-wrap:anywhere;margin:12px 0}.place strong{display:block;font-size:32px;color:var(--metal);margin-bottom:4px;font-variant-numeric:tabular-nums}.place small{color:var(--metal)}table{width:100%;border-collapse:collapse;text-align:left;font-variant-numeric:tabular-nums}th{font-size:12px;text-transform:uppercase;letter-spacing:.13em;color:var(--gold);background:#252024}td,th{padding:14px 12px;border-bottom:1px solid #393039}td:last-child,th:last-child{text-align:right}td:first-child{color:var(--gold)}a{color:inherit;text-decoration:none}a:hover{text-decoration:underline}.empty{text-align:center!important;color:#eee9df!important;padding:36px 12px}.empty span{color:var(--muted);font-size:13px}footer{text-align:center;color:var(--muted);font-size:12px;letter-spacing:.08em;padding:0 12px 32px}footer span{color:var(--gold);padding:0 8px}@media(max-width:580px){.panel{padding:16px}.podium{grid-template-columns:1fr}.place-1{order:-2}.place-2{order:-1}.place{padding:16px}.heading{align-items:start}h2{font-size:24px}header{padding-top:20px}}

.brand-logo{display:block;width:112px;height:112px;margin:0 auto 12px;filter:drop-shadow(0 0 20px #b98a3544)}
.site-nav{display:flex;justify-content:center;gap:12px;margin:24px auto 0}.site-nav a{border:1px solid var(--border);border-radius:6px;padding:10px 22px;color:var(--gold)}.site-nav a[aria-current=page]{background:#d7b66d;color:#111;font-weight:700}.rules h3{font:700 23px Georgia,serif;color:var(--gold);margin:30px 0 10px}.rules p{line-height:1.65;color:#ddd6cc}.rules .formula{font-weight:700;color:var(--gold)}.rules p a{text-decoration:underline}.rules table{margin:16px 0}

/* Royal Black — v1.6 */
:root{--gold:#ffd700;--muted:#c7c7c7;--border:#424242;--black:#000000}
body{background:#000;color:#fff}
header{background:#000;padding-top:28px}
h1,h2,.rules h3{font-family:system-ui,Arial,sans-serif;font-weight:850;letter-spacing:.025em}
h1{color:#fff}h1 span{color:var(--gold)}
.brand-logo{filter:none}
.panel{background:#101010;border-color:#383838;box-shadow:none}
.heading{border-bottom:1px solid #383838;padding-bottom:15px}
.place{background:#191919;border-width:1px;box-shadow:none}
.place-1{--metal:#ffd700;border-width:2px}
.place-2{--metal:#e4e8ee}.place-3{--metal:#e9a77d}
th{background:#191919;color:var(--gold)}td,th{border-bottom-color:#333}tbody tr:nth-child(even){background:#191919}tbody tr:hover{background:#242424}
td:last-child{font-weight:700;color:var(--gold)}.empty{color:#fff!important}
.site-nav a{background:#191919;border-color:#424242;color:#fff}.site-nav a[aria-current=page]{background:#ffd700;color:#000;border-color:#ffd700}.site-nav a:hover{border-color:#ffd700;text-decoration:none}
.rules p{color:#fff}.rules h3,.rules p a{color:var(--gold)}
a:focus-visible{outline:2px solid var(--gold);outline-offset:4px}

/* v1.5 — compact full-width mobile podium rows */
@media (max-width: 580px) {
  main {padding-inline: 10px;}
  .panel {padding: 12px;}
  .podium {grid-template-columns: minmax(0,1fr); gap: 6px; align-items: stretch;}
  .podium .place {display:grid; grid-template-columns: 45px minmax(0,1fr) auto; grid-template-rows: auto auto; align-items:center; column-gap:9px; row-gap:2px; padding:9px 10px; min-height:58px; text-align:left; border-radius:6px; order:0;}
  .podium .place-1 {order:-2;}
  .podium .place-2 {order:-1;}
  .podium .medal {grid-column:1; grid-row:1 / 3; font-size:19px; line-height:1; margin:0; text-align:center; white-space:nowrap;}
  .podium .place h3 {grid-column:2; grid-row:1 / 3; font-size:14px; line-height:1.2; margin:0; overflow-wrap:anywhere; min-width:0;}
  .podium .place strong {grid-column:3; grid-row:2; font-size:17px; line-height:1.2; margin:0; text-align:right;}
  .podium .place small:last-of-type {grid-column:3; grid-row:1; text-align:right;}
  .podium .place small {font-size:9px; letter-spacing:.045em;}
  .heading {margin-bottom:12px; padding-bottom:10px;}
  .brand-logo {width:76px; height:76px; margin-bottom:8px;}
}

/* v1.9: crown and numeric rank */
.podium-rank{display:block;font:700 20px system-ui,Arial,sans-serif;line-height:1.15;margin-top:4px}
@media(max-width:580px){.podium .medal svg{display:block!important;margin:0 auto}.podium-rank{font-size:12px;margin-top:2px}}

/* v1.12: Royal Signature footer */
footer.royal-signature{display:flex;flex-direction:column;align-items:center;gap:8px;max-width:1060px;margin:0 auto;padding:12px 16px 34px;text-align:center;letter-spacing:normal;color:#fff}
.signature-divider{display:flex;align-items:center;gap:13px;width:min(100%,340px);color:#ffd700;margin-bottom:3px}
.signature-divider::before,.signature-divider::after{content:"";height:1px;flex:1;background:linear-gradient(90deg,transparent,#a98628)}
.signature-divider::after{background:linear-gradient(90deg,#a98628,transparent)}
.signature-divider svg{flex:none;filter:drop-shadow(0 0 5px #ffd70035)}
.signature-domain{color:#ffd700;font-size:clamp(15px,3.7vw,22px);font-weight:750;letter-spacing:.23em;line-height:1.4}
.signature-hashtag{color:#fff;font-size:15px;font-weight:600;letter-spacing:.035em}
.signature-time{display:flex;align-items:center;justify-content:center;gap:6px;color:#b3b3b3;font-size:12px}
.signature-copyright{color:#929292;font-size:11px;line-height:1.5;margin-top:12px}
/* v2.0: database-backed submission area */
.submit-form{display:grid;gap:9px;margin:15px 0}.submit-form label{color:#fff;font-weight:650;font-size:14px}.submit-form input:not([type=hidden]){width:100%;min-width:0;background:#191919;border:1px solid #555;border-radius:6px;color:#fff;padding:12px;font:inherit}.form-line{display:flex;gap:8px}.submit-form button{background:#ffd700;color:#000;border:0;border-radius:6px;padding:12px 18px;font:700 15px system-ui;cursor:pointer;white-space:nowrap}.submit-form input:focus,.submit-form button:focus-visible{outline:2px solid #ffd700;outline-offset:2px}.form-help{font-size:13px;color:#bbb;line-height:1.5;margin:4px 0}.repost-claim{border-top:1px solid #333;padding-top:14px;margin-top:16px}.repost-claim summary{cursor:pointer;color:#ffd700;font-weight:600}.notice{padding:12px;border:1px solid #555;border-radius:6px;line-height:1.5}.notice.error{border-color:#a55;color:#ffbaba}.notice.ok{border-color:#87751c;color:#ffe573}#cutoff{font-variant-numeric:tabular-nums;color:#ffd700}@media(max-width:580px){.form-line{flex-direction:column}.submit-form button{width:100%}}

.royal-link{color:#ffd700;font-weight:700;text-align:right} .site-nav{flex-wrap:wrap}

/* v2.2 submission page */
.submit-form fieldset{border:0;margin:0;padding:0;min-width:0;display:grid;gap:9px}.submit-form fieldset:disabled{opacity:.55}.submit-form fieldset:disabled button{cursor:not-allowed}.submit-form fieldset:disabled input{cursor:not-allowed}

/* Mobile leaderboard containment: keep all three columns inside the panel. */
@media (max-width: 580px) {
  .tablewrap {width:100%; min-width:0; max-width:100%;}
  .tablewrap table {width:100%; table-layout:fixed;}
  .tablewrap th, .tablewrap td {padding:12px 6px; font-size:14px;}
  .tablewrap th {font-size:11px; letter-spacing:.035em; overflow-wrap:anywhere;}
  .tablewrap th:first-child {width:19%;}
  .tablewrap th:last-child {width:32%;}
  .tablewrap td:first-child:not(.empty), .tablewrap td:last-child:not(.empty) {overflow-wrap:anywhere;}
  .tablewrap td:nth-child(2) a {display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .tablewrap td:nth-child(2) {overflow-wrap:anywhere;}
  .tablewrap td:last-child:not(.empty) {text-align:right;}
  .podium .place strong {min-width:0; overflow-wrap:anywhere;}
  .podium .place {grid-template-columns:45px minmax(0,1fr) minmax(0,32%);}
}

/* Royal Ten: fit all columns on narrow screens and retain full X usernames. */
@media (max-width: 580px) {
  .royal-ten-table th:first-child {width:18%;}
  .royal-ten-table th:last-child {width:32%;}
  .royal-ten-table td:nth-child(2) a {white-space:normal; overflow-wrap:anywhere; overflow:visible; text-overflow:clip;}
  .royal-ten-table td, .royal-ten-table th {min-width:0; overflow-wrap:anywhere;}
}

/* Royal Ten quote-post progress checker */
.qp-checker{border-top:1px solid var(--border);margin-top:22px;padding-top:18px;min-width:0}
.qp-checker h3{font:700 21px Georgia,serif;color:var(--gold);margin-bottom:8px}
.qp-checker .form-line input{flex:1;min-width:0}
.royal-ten-table tr.qp-completed td{background:#163322}
.royal-ten-table tr.qp-completed td:nth-child(2),.royal-ten-table tr.qp-completed td:nth-child(2) a,.qp-mark{color:#79ef99;font-weight:700}
.qp-summary{border-color:#3b7650;color:#a6efb6;overflow-wrap:anywhere}
.qp-checker .form-help a{text-decoration:underline}

/* Daily Battle Report */
.battle .panel,.battle .heading>div,.battle-metric,.battle-event>div{min-width:0;overflow-wrap:anywhere}
.battle-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.battle-metric{background:#191919;border:1px solid #383838;border-radius:8px;padding:16px}.battle-metric span,.battle-event span{display:block;font-size:13px;color:var(--muted)}.battle-metric strong{display:block;color:var(--gold);font-size:clamp(19px,4vw,32px);margin-top:6px;font-variant-numeric:tabular-nums}.battle-lines>div,.battle-event{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #333}.battle-lines>div>*{min-width:0;overflow-wrap:anywhere}.battle-lines strong,.battle-event>strong{color:var(--gold);text-align:right;flex-shrink:0;max-width:48%;overflow-wrap:anywhere}.battle progress{width:100%;height:15px;accent-color:#62d987}.battle-target{display:grid;grid-template-columns:38px minmax(0,1fr) minmax(0,36%);gap:8px;align-items:center;padding:12px 8px;border-bottom:1px solid #333;overflow-wrap:anywhere}.battle-target span:last-child{text-align:right;font-size:13px}.battle-target.done{background:#163322;color:#79ef99}.battle a:not(.royal-link){text-decoration:underline}.battle-event span{margin-top:5px}.battle .form-line input{flex:1}.battle h2{margin-bottom:8px}@media(max-width:580px){.site-nav{gap:6px}.site-nav a{padding:9px 12px;font-size:13px}.battle-grid{gap:8px}.battle-metric{padding:10px}.battle-target{grid-template-columns:30px minmax(0,1fr) minmax(0,35%);font-size:13px}.battle .heading{align-items:flex-start}.battle .meta{font-size:11px}.battle-event{font-size:13px}}

.site-nav{flex-wrap:wrap}.site-nav .daily-bonus-nav[data-status=Available]{border-color:#ffd700;color:#ffd700}

/* Compact Royal Menu — shared across all public pages */
.royal-menu{width:100%;max-width:600px;margin:12px auto 0;text-align:left;position:relative;z-index:10}
:root{--royal-bar-inner-height:42px;--royal-bar-border:#a98a36;--royal-bar-radius:8px;--royal-bar-background:linear-gradient(110deg,#242016,#101010 65%);--royal-bar-shadow:0 3px 12px #0008}
.royal-menu-details{border:1px solid var(--royal-bar-border);border-radius:var(--royal-bar-radius);background:#121212;box-shadow:var(--royal-bar-shadow)}
.royal-menu-details>summary{display:grid;grid-template-columns:auto minmax(0,1fr) 20px;align-items:center;gap:12px;height:var(--royal-bar-inner-height);min-height:var(--royal-bar-inner-height);padding:8px 13px;cursor:pointer;list-style:none;color:#ffd700;background:var(--royal-bar-background);border-radius:calc(var(--royal-bar-radius) - 1px);user-select:none}
.royal-menu-details>summary::-webkit-details-marker{display:none}
.royal-menu-details>summary::marker{content:''}
.royal-menu-brand{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:850;letter-spacing:.12em;white-space:nowrap}
.royal-menu-brand svg{width:20px;height:20px;flex:none}
.royal-menu-current{font-size:14px;font-weight:700;color:#fff;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.royal-menu-chevron{width:20px;height:20px;transition:transform .18s ease}
.royal-menu-details[open] .royal-menu-chevron{transform:rotate(180deg)}
.royal-menu-details[open]>summary{border-radius:7px 7px 0 0;border-bottom:1px solid #685724}
.royal-menu-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:7px}
.royal-menu-links a{display:flex;align-items:center;justify-content:space-between;min-height:44px;padding:8px 12px;border:1px solid #363636;border-radius:5px;background:#191919;color:#eee;font-size:14px;font-weight:600;text-decoration:none}
.royal-menu-links a[aria-current=page]{background:#302817;border-color:#b99a42;color:#ffd700}
.royal-menu-links a[aria-current=page]::after{content:'✓';margin-left:6px}
.royal-menu-links a:hover,.royal-menu-details>summary:hover{background:#332a17;color:#ffd700}
.royal-menu a:focus-visible,.royal-menu summary:focus-visible{outline:2px solid #ffd700;outline-offset:2px}
@media(max-width:580px){.royal-menu{margin-top:10px}.royal-menu-details>summary{gap:8px;padding:8px 10px}.royal-menu-links{grid-template-columns:1fr}.royal-menu-links a{font-size:14px}}
@media(prefers-reduced-motion:reduce){.royal-menu-chevron{transition:none}}

/* Menu shares the exact panel container, including page-specific widths. */
main > .royal-menu{display:block;width:100%;max-width:none;min-width:0;margin:0 0 12px;box-sizing:border-box}
main > .royal-menu > .royal-menu-details{display:block;width:100%;min-width:0;box-sizing:border-box}

/* Compact royal masthead — identical layout across all public pages. */
header.compact-brand{padding:10px 10px 12px;text-align:center;background:#000}
.compact-brand .brand-line{display:flex;align-items:center;justify-content:center;gap:.75em;font-size:clamp(28px,9vw,48px);line-height:1;white-space:nowrap}
.compact-brand .brand-home{display:flex;align-items:center;justify-content:center;flex:none;padding:2px 0}
.compact-brand .brand-logo{display:block;width:1.12em;height:1.12em;margin:0;object-fit:contain;filter:none}
.compact-brand h1{font-size:1em;line-height:1.05;margin:0;letter-spacing:.025em}
.compact-brand .tagline{font-size:clamp(10px,3vw,12px);line-height:1.2;margin:2px 0 3px;letter-spacing:.19em}
.compact-brand .subtitle{font-size:clamp(9px,3.05vw,13px);line-height:1.25;margin:0;white-space:nowrap;letter-spacing:0}

/* Center the wordmark independently of its right-hand logo. */
.compact-brand .brand-line{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;justify-content:stretch;gap:.5em;font-size:clamp(20px,8vw,48px);min-height:calc(1.12em + 4px)}
.compact-brand h1{grid-column:2;grid-row:1;text-align:center;justify-self:center}
.compact-brand .brand-home{grid-column:3;grid-row:1;justify-self:start}
.compact-brand .tagline,.compact-brand .subtitle{text-align:center}

/* Match all public panel outlines to the Royal Menu and Battle Live. */
main .panel{border-color:var(--royal-bar-border)!important}
/* Reserve equal space on both sides of the centered hashtagged wordmark. */
.compact-brand .brand-line{font-size:clamp(18px,7vw,48px)}

/* Equal medal borders, independent of rank and viewport. */
.podium .place{border:3px solid var(--metal);}

/* Unified royal panel surfaces — shared with MENU and BATTLE. */
main .panel, main > .royal-menu > .royal-menu-details {
  background: var(--royal-bar-background) !important;
  border: 1px solid var(--royal-bar-border) !important;
  border-radius: var(--royal-bar-radius) !important;
  box-shadow: var(--royal-bar-shadow);
}
