:root {
  --bg: #17191a;
  --bar: #242627;
  --panel: #303234;
  --panel-hi: #3b3d3f;
  --panel-deep: #242627;
  --line: #111314;
  --line-soft: #515355;
  --text: #f3f4f4;
  --muted: #b4b7b9;
  --green: #3f7f31;
  --green-hi: #72c653;
  --blue: #3187e8;
  --gold: #f2bd38;
  --red: #cf5260;
  --shadow: 0 3px 0 #0f1011;
  --font: "Microsoft YaHei UI", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; background: var(--bg); }
body { margin: 0; min-width: 320px; color: var(--text); background: radial-gradient(circle at 65% 0, #2b2d2f 0, var(--bg) 44rem); font-family: var(--font); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
code { overflow-wrap: anywhere; word-break: break-word; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
:focus-visible { outline: 3px solid #ffe184; outline-offset: 3px; }
.skip-link { position: fixed; z-index: 999; left: 1rem; top: -5rem; padding: .7rem 1rem; background: #fff; color: #111; }
.skip-link:focus { top: 1rem; }
.app-shell { min-height: 100vh; border-top: 3px solid #0e0f10; }
.topbar { position: sticky; z-index: 50; top: 0; min-height: 76px; display: flex; align-items: stretch; padding-top: env(safe-area-inset-top); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); border-bottom: 4px solid #111; background: #292b2c; box-shadow: 0 2px 0 #4a4c4e; }
.brand { width: 292px; display: flex; align-items: center; gap: 13px; padding: 12px 24px; border-right: 3px solid #111; background: #202223; }
.brand-cube { width: 44px; height: 44px; display: grid; place-items: center; background: var(--green); border: 4px solid #151718; box-shadow: inset 0 0 0 3px #79cb59, 3px 3px 0 #0f1011; transform: rotate(45deg) scale(.72); }
.brand-cube i { width: 16px; height: 16px; display: block; border: 3px solid #fff; background: #222; }
.brand span:last-child { display: flex; flex-direction: column; line-height: 1; }
.brand b { font: 900 1.42rem/1 Consolas, monospace; letter-spacing: .08em; }
.brand small { margin-top: 7px; color: var(--muted); font-size: .74rem; letter-spacing: .06em; white-space: nowrap; }
.desktop-nav { display: flex; align-items: stretch; }
.desktop-nav a { position: relative; display: grid; place-items: center; min-width: 108px; padding: 0 16px; color: #d6d8d9; font-weight: 700; font-size: .93rem; border-right: 1px solid #3d3f40; }
.desktop-nav a:hover, .desktop-nav a:focus-visible { background: #363839; color: #fff; }
.desktop-nav a.is-active { background: #333536; color: #fff; }
.desktop-nav a.is-active::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 4px; background: var(--green-hi); box-shadow: 0 -2px 0 #234f1b; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; padding: 0 20px; }
.sound-toggle { width: 38px; height: 38px; color: #ddd; background: #383a3c; border: 3px solid #151718; box-shadow: inset 0 0 0 1px #5c5e60; cursor: pointer; }
.page-grid { display: grid; grid-template-columns: 248px minmax(0, 1fr); max-width: 1740px; margin: 0 auto; min-height: calc(100vh - 76px); }
.sidebar { display: flex; flex-direction: column; border-right: 4px solid #111; background: #232526; box-shadow: inset -2px 0 0 #464849; }
.sidebar-title { padding: 22px 22px 12px; color: #929597; font-size: .72rem; font-weight: 800; letter-spacing: .14em; }
.sidebar-item { min-height: 58px; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 9px; padding: 0 18px; color: #d9dbdc; border-top: 2px solid #3d3f40; border-bottom: 2px solid #151718; }
.sidebar-item:hover, .sidebar-item:focus-visible { background: #343638; }
.sidebar-item.is-active { background: #3b3d3f; box-shadow: inset 5px 0 0 var(--green-hi); color: #fff; }
.sidebar-item em { padding: 3px 5px; color: #fff; background: #b8404e; font: 700 .58rem Consolas, monospace; font-style: normal; }
.pixel-icon { width: 27px; height: 27px; display: grid; place-items: center; color: #fff; background: #292b2d; border: 3px solid #101112; box-shadow: inset 0 0 0 2px #57595b; font: 900 1rem Consolas, monospace; }
.sidebar-item.is-active .pixel-icon { background: var(--green); }
.sidebar-spacer { flex: 1; min-height: 30px; }
.server-card { margin: 16px; padding: 15px; background: #191b1c; border: 3px solid #0f1011; box-shadow: inset 0 0 0 2px #3e4041; }
.server-status { display: flex; align-items: center; color: #9bd58c; font-size: .74rem; font-weight: 800; letter-spacing: .05em; }
.server-status b { font: inherit; }
.server-status span { display: inline-block; width: 9px; height: 9px; margin-right: 6px; background: #63c94a; box-shadow: 0 0 0 2px #173f13, 0 0 9px #60d34a; }
.server-status--checking, .server-status--preview { color: #f6cf68; }
.server-status--checking span, .server-status--preview span { background: var(--gold); box-shadow: 0 0 0 2px #5a4312, 0 0 9px #f2bd38; }
.server-status--offline { color: #ff9ca5; }
.server-status--offline span { background: var(--red); box-shadow: 0 0 0 2px #541820, 0 0 9px #cf5260; }
.server-card strong { display: block; margin-top: 12px; font-size: .88rem; }
.server-card p, .server-card small { margin: 7px 0 0; color: #8f9294; font-size: .7rem; }
.main-content { padding: 24px; overflow: hidden; }
.ore-panel { border: 3px solid var(--line); background: var(--panel); box-shadow: inset 0 0 0 2px var(--line-soft), var(--shadow); }
.hero { position: relative; min-height: 420px; overflow: hidden; background: #3b2f23; }
.hero > img { position: absolute; inset: -22px 0 -76px; width: 100%; height: calc(100% + 98px); object-fit: cover; object-position: center 47%; filter: saturate(.9) contrast(1.04) brightness(.72); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,22,23,.96) 0, rgba(20,22,23,.76) 42%, rgba(20,22,23,.1) 78%), linear-gradient(0deg, rgba(18,19,20,.7), transparent 50%); }
.hero-grid { position: absolute; inset: 0; opacity: .13; background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg,#fff 1px,transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(90deg,#000,transparent 70%); }
.hero-copy { position: relative; z-index: 2; max-width: 660px; padding: 54px 52px 48px; }
.eyebrow { color: #c6c9ca; font: 700 .78rem Consolas, monospace; letter-spacing: .13em; }
.eyebrow span { display: inline-block; width: 13px; height: 13px; margin-right: 8px; vertical-align: -2px; background: var(--green-hi); border: 3px solid #132711; }
.hero h1 { margin: 22px 0 16px; font-size: clamp(2.6rem,5vw,5rem); line-height: .98; letter-spacing: -.05em; text-shadow: 4px 4px 0 #0f1011; }
.hero mark { color: var(--gold); background: transparent; }
.hero p { max-width: 570px; margin: 0; color: #d1d3d4; font-size: 1rem; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.ore-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 20px; color: #f8f8f8; background: #4a4c4e; border: 3px solid #101112; box-shadow: inset 0 0 0 2px #6b6d6f, 0 3px 0 #0d0e0f; font-weight: 800; cursor: pointer; }
.ore-button:hover, .ore-button:focus-visible { filter: brightness(1.12); transform: translateY(-1px); }
.ore-button:active { transform: translateY(2px); box-shadow: inset 0 0 0 2px #6b6d6f; }
.ore-button--green { background: #3f7f31; box-shadow: inset 0 0 0 2px #71c457, 0 3px 0 #0d0e0f; }
.ore-button--danger { background: #9a3846; box-shadow: inset 0 0 0 2px #d46773, 0 3px 0 #0d0e0f; }
.ore-button--compact { min-height: 40px; padding: 0 15px; font-size: .82rem; }
.hero-badge { position: absolute; z-index: 3; right: 28px; bottom: 26px; width: 112px; display: grid; grid-template-columns: 48px 1fr; align-items: center; padding: 8px; background: rgba(24,26,27,.9); border: 3px solid #101112; box-shadow: inset 0 0 0 2px #555; }
.hero-badge b { color: var(--gold); font: 900 1.8rem Consolas, monospace; }
.hero-badge span { color: #bbb; font-size: .64rem; line-height: 1.4; }
.stat-strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-top: 18px; }
.stat-card { position: relative; min-height: 108px; padding: 19px 20px; }
.stat-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: #626568; }
.stat-card span { display: block; color: #aeb1b3; font-size: .72rem; font-weight: 800; }
.stat-card b { display: block; margin-top: 5px; font: 900 1.85rem Consolas, monospace; }
.stat-card small { position: absolute; right: 16px; bottom: 14px; color: #7ecb6a; font-size: .66rem; }
.stat-card--accent::before { background: var(--gold); }
.stat-card--accent b { color: var(--gold); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.75fr) minmax(280px,.75fr); gap: 18px; margin-top: 18px; }
.rank-preview { overflow: hidden; }
.panel-heading { min-height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; background: #3a3c3e; border-bottom: 3px solid #111; box-shadow: inset 0 -2px 0 #56585a; }
.panel-heading > div { display: flex; align-items: center; gap: 12px; }
.heading-icon { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: var(--blue); border: 3px solid #111; box-shadow: inset 0 0 0 2px #65a6ee; }
.panel-heading h2 { margin: 0; font-size: 1rem; }
.panel-heading p { margin: 5px 0 0; color: #b8bbbd; font-size: .68rem; }
.panel-heading > a { color: #c8cbcc; font-size: .75rem; font-weight: 800; }
.panel-heading > a b { color: var(--green-hi); font-size: 1.2rem; }
.rank-row { display: grid; grid-template-columns: 72px minmax(150px,1fr) 100px 76px; align-items: center; min-height: 64px; padding: 0 18px; border-top: 2px solid #4a4c4e; border-bottom: 2px solid #171819; }
.rank-row--head { min-height: 41px; color: #898c8e; background: #232526; font-size: .68rem; font-weight: 800; }
.rank-row > span:first-child i { width: 28px; height: 28px; display: grid; place-items: center; color: #ddd; background: #252728; border: 2px solid #111; font: 800 .82rem Consolas, monospace; font-style: normal; }
.rank-row > span:nth-child(2) { display: flex; flex-direction: column; }
.rank-row b { font-size: .82rem; }
.rank-row small { margin-top: 4px; color: var(--muted); font: .62rem Consolas, monospace; }
.rank-row strong { font: 800 .96rem Consolas, monospace; }
.rank-row em { color: #81cc6e; font: 700 .68rem Consolas, monospace; font-style: normal; }
.rank-row em.down { color: #e66c75; }
.rank-row--gold { background: linear-gradient(90deg,rgba(242,189,56,.12),transparent 70%); }
.rank-row--gold > span:first-child i { color: #171819; background: var(--gold); box-shadow: inset 0 0 0 2px #ffe184; }
.action-stack { display: grid; gap: 18px; }
.action-card { position: relative; min-height: 174px; padding: 20px 22px; overflow: hidden; }
.action-card::after { content: ""; position: absolute; right: -24px; bottom: -34px; width: 118px; height: 118px; transform: rotate(45deg); background: rgba(255,255,255,.035); border: 8px solid rgba(255,255,255,.04); }
.action-card > span { color: #9fa2a4; font-size: .66rem; font-weight: 800; letter-spacing: .1em; }
.action-card h3 { margin: 8px 0; font-size: 1.15rem; }
.action-card p { max-width: 280px; margin: 0; color: #b9bcbd; font-size: .72rem; line-height: 1.65; }
.action-card a { display: inline-block; margin-top: 16px; color: #fff; font-size: .75rem; font-weight: 800; }
.action-symbol { position: absolute; right: 19px; top: 18px; width: 46px; height: 46px; display: grid; place-items: center; border: 3px solid #111; font-size: 1.4rem; }
.action-card--green { box-shadow: inset 5px 0 0 var(--green), inset 0 0 0 2px var(--line-soft), var(--shadow); }
.action-card--green .action-symbol { background: #3f7f31; box-shadow: inset 0 0 0 2px #72c653; }
.action-card--gold { box-shadow: inset 5px 0 0 var(--gold), inset 0 0 0 2px var(--line-soft), var(--shadow); }
.action-card--gold .action-symbol { color: #161718; background: var(--gold); box-shadow: inset 0 0 0 2px #ffe081; }
.notice-bar { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 18px; }
.notice-icon { width: 34px; height: 34px; display: grid; place-items: center; color: #202223; background: var(--gold); border: 3px solid #111; font-weight: 900; }
.notice-bar b { font-size: .76rem; }
.notice-bar p { margin: 4px 0 0; color: #aeb1b3; font-size: .68rem; }
.notice-bar > a { color: #a7d99b; font-size: .72rem; font-weight: 800; }

@media (max-width: 1180px) {
  .desktop-nav a { min-width: auto; padding: 0 12px; font-size: .8rem; }
  .brand { width: 245px; }
  .page-grid { grid-template-columns: 210px minmax(0,1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .action-stack { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .topbar { min-height: 64px; }
  .brand { width: auto; flex: 1; border-right: 0; padding-left: 14px; }
  .brand small, .sound-toggle, .desktop-nav { display: none; }
  .top-actions { padding: 0 10px; }
  .page-grid { display: block; }
  .sidebar { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; height: calc(62px + env(safe-area-inset-bottom)); padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); flex-direction: row; border: 3px solid #111; box-shadow: inset 0 0 0 2px #4a4c4e; }
  .sidebar-title, .sidebar-spacer, .server-card { display: none; }
  .sidebar-item { min-width: 0; flex: 1; grid-template-columns: 1fr; justify-items: center; gap: 2px; padding: 5px 2px; border: 0; border-right: 1px solid #111; font-size: .58rem; }
  .sidebar-item .pixel-icon { width: 26px; height: 26px; font-size: .78rem; }
  .sidebar-item em { display: none; }
  .main-content { padding: 12px max(12px,env(safe-area-inset-right)) calc(80px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); }
  .hero { min-height: 460px; }
  .hero-copy { padding: 40px 24px; }
  .hero h1 { font-size: clamp(2.45rem,14vw,4.2rem); }
  .hero-badge { display: none; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .rank-row { grid-template-columns: 48px minmax(130px,1fr) 72px; padding: 0 10px; }
  .rank-row > *:last-child { display: none; }
  .action-stack { grid-template-columns: 1fr; }
  .notice-bar { grid-template-columns: 36px 1fr; }
  .notice-bar > a { grid-column: 2; }
}
@media (max-width: 520px) {
  .ore-button--compact { padding: 0 9px; font-size: .68rem; }
  .hero-actions .ore-button { width: 100%; }
  .stat-strip { grid-template-columns: 1fr; }
  .panel-heading { padding: 0 12px; }
  .panel-heading > a { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* Shared application states */
.loading-chip { color: #aaa; font: .72rem Consolas, monospace; }
.loading-chip--error { color: #ff9ca5; }
.account-chip { min-height: 44px; display: grid; grid-template-columns: 34px auto auto; align-items: center; gap: 9px; padding: 4px 10px 4px 5px; border: 3px solid #101112; background: #36383a; box-shadow: inset 0 0 0 2px #5b5d5f; }
.account-chip > span { width: 31px; height: 31px; display: grid; place-items: center; color: #172016; background: var(--green-hi); border: 2px solid #111; font-weight: 900; }
.account-chip b { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .76rem; }
.account-chip em { color: var(--gold); font: 700 .66rem Consolas, monospace; font-style: normal; }
.page-loading, .error-state { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.page-loading b { margin-top: 18px; }
.page-loading small { margin-top: 8px; color: var(--muted); }
.loading-cube { width: 42px; height: 42px; display: block; background: var(--green); border: 5px solid #111; box-shadow: inset 0 0 0 3px var(--green-hi); animation: load-cube 1s steps(4,end) infinite; }
@keyframes load-cube { to { transform: rotate(360deg); } }
.error-state > span { width: 56px; height: 56px; display: grid; place-items: center; color: #fff; background: var(--red); border: 4px solid #111; font-size: 1.6rem; font-weight: 900; }
.error-state h1 { margin: 18px 0 6px; }
.error-state p { max-width: 540px; margin: 0 0 22px; color: var(--muted); }
.empty-state { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; text-align: center; }
.empty-state > span { width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted); background: #222; border: 3px solid #111; font-size: 1.2rem; }
.empty-state b { margin-top: 14px; }
.empty-state p { margin: 7px 0 0; color: var(--muted); font-size: .75rem; }
.data-badge { padding: 6px 8px; color: #a4d999; background: #202a1e; border: 2px solid #111; font: 700 .66rem Consolas, monospace; }
.ore-button:disabled { cursor: not-allowed; filter: grayscale(1); opacity: .55; transform: none; }
.ore-button--gold { color: #171819; background: var(--gold); box-shadow: inset 0 0 0 2px #ffe184, 0 3px 0 #0d0e0f; }
.heading-icon--gold { color: #171819; background: var(--gold); box-shadow: inset 0 0 0 2px #ffe184; }
.ore-pagination { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) minmax(96px,auto) minmax(0,1fr); align-items: center; gap: 12px; margin-top: 18px; padding: 12px; }
.rank-full > .ore-pagination, .admin-table > .ore-pagination { margin-top: 0; border: 0; border-top: 3px solid #111; box-shadow: inset 0 2px 0 #515355; }
.page-button { min-width: 0; min-height: 42px; padding: 0 15px; overflow: hidden; color: #f4f5f5; background: #454749; border: 3px solid #101112; box-shadow: inset 0 0 0 2px #686a6c, 0 3px 0 #0d0e0f; font-size: .72rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.page-button:first-child { justify-self: start; }
.page-button:last-child { justify-self: end; }
.page-button:hover, .page-button:focus-visible { filter: brightness(1.12); transform: translateY(-1px); }
.page-button:active { transform: translateY(2px); box-shadow: inset 0 0 0 2px #686a6c; }
.page-button:disabled { cursor: not-allowed; filter: grayscale(1); opacity: .48; transform: none; }
.page-status { min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.page-status b { font: 800 .72rem Consolas, monospace; white-space: nowrap; }
.page-status small { margin-top: 4px; color: var(--muted); font-size: .61rem; white-space: nowrap; }

/* Subpage headers and forms */
.page-title { min-height: 136px; display: grid; grid-template-columns: 72px minmax(0,1fr) auto; align-items: center; gap: 20px; padding: 22px 28px; margin-bottom: 18px; background: linear-gradient(110deg,#343638,#282a2b); }
.page-title__icon { width: 64px; height: 64px; display: grid; place-items: center; color: #fff; background: var(--blue); border: 4px solid #111; box-shadow: inset 0 0 0 3px #69aaf0, 4px 4px 0 #171819; font: 900 1.8rem Consolas, monospace; }
.page-title small { color: #8fb8e8; font: 700 .68rem Consolas, monospace; letter-spacing: .15em; }
.page-title h1 { margin: 6px 0 5px; font-size: clamp(1.5rem,3vw,2.2rem); }
.page-title p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.6; }
.page-title__actions { display: flex; gap: 10px; }
.ore-form { padding: 22px; }
.ore-form > header, .binding-card > header { display: flex; align-items: center; gap: 12px; margin: -22px -22px 20px; padding: 15px 18px; background: #3b3d3f; border-bottom: 3px solid #111; box-shadow: inset 0 -2px 0 #57595b; }
.ore-form > header > span, .binding-card > header > span { width: 38px; height: 38px; display: grid; place-items: center; background: var(--blue); border: 3px solid #111; box-shadow: inset 0 0 0 2px #69aaf0; font-weight: 900; }
.ore-form header h2, .binding-card header h2 { margin: 0; font-size: 1rem; }
.ore-form header p, .binding-card header p { margin: 4px 0 0; color: var(--muted); font-size: .67rem; }
.ore-form label, .binding-form label, .ticket-admin label { display: grid; gap: 7px; margin-bottom: 15px; color: #d8dadb; font-size: .74rem; font-weight: 800; }
.ore-form input, .ore-form textarea, .ore-form select, .binding-form input, .binding-form textarea, .ticket-admin input, .ticket-admin textarea, .ticket-admin select { width: 100%; min-height: 44px; padding: 10px 12px; color: #f3f4f4; background: #1e2021; border: 3px solid #101112; border-radius: 0; box-shadow: inset 0 0 0 2px #444648; }
.ore-form textarea, .binding-form textarea, .ticket-admin textarea { min-height: auto; resize: vertical; line-height: 1.55; }
.ore-form input:focus-visible, .ore-form textarea:focus-visible, .ore-form select:focus-visible, .binding-form input:focus-visible, .binding-form textarea:focus-visible, .ticket-admin input:focus-visible, .ticket-admin textarea:focus-visible, .ticket-admin select:focus-visible { outline: 3px solid #ffe184; outline-offset: 2px; box-shadow: inset 0 0 0 2px var(--green-hi); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check-field { grid-template-columns: 24px 1fr !important; align-items: center; }
.check-field input { width: 22px; min-height: 22px; accent-color: var(--green); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.form-actions--split { justify-content: space-between; }
.form-error { margin: 0 0 16px; padding: 11px 13px; color: #fff; background: #8d2f3a; border: 3px solid #111; box-shadow: inset 0 0 0 2px #d46773; font-size: .72rem; line-height: 1.55; }
.field-help { display: block; color: var(--muted); font-size: .64rem; font-weight: 400; }
.field-block { margin-bottom: 15px; }
.field-block > label { display: block; margin-bottom: 7px; color: #d8dadb; font-size: .74rem; font-weight: 800; }
.input-action { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.input-action .ore-button { min-width: 72px; padding: 0 12px; }
.form-switch { margin: 18px 0 0; color: var(--muted); font-size: .72rem; text-align: center; }
.form-switch a { color: #9cdc8c; font-weight: 800; }

/* Leaderboard */
.rank-layout { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 18px; }
.tab-rail { align-self: start; overflow: hidden; }
.tab-button { width: 100%; min-height: 72px; display: grid; grid-template-columns: 38px 1fr; grid-template-rows: 1fr 1fr; column-gap: 12px; align-items: center; padding: 10px 13px; color: #ddd; background: #2d2f31; border: 0; border-top: 2px solid #4b4d4f; border-bottom: 2px solid #111; text-align: left; cursor: pointer; }
.tab-button > span { grid-row: 1/3; width: 36px; height: 36px; display: grid; place-items: center; background: #222; border: 3px solid #111; }
.tab-button b { align-self: end; font-size: .78rem; }
.tab-button small { align-self: start; color: #b8bbbd; font: .58rem Consolas, monospace; }
.tab-button:hover, .tab-button.is-active { background: #3b3d3f; box-shadow: inset 5px 0 0 var(--green-hi); }
.tab-button.is-active > span { background: var(--green); }
.rank-full { overflow: hidden; }
.rank-full .rank-row:nth-child(n+12) { min-height: 56px; }

/* Store */
.info-split { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 18px; }
.info-split > div { padding: 17px 20px; }
.info-split > div + div { border-left: 3px solid #111; }
.info-split b { font-size: .78rem; }
.info-split p { margin: 6px 0 0; color: var(--muted); font-size: .7rem; }
.product-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.product-card { overflow: hidden; }
.product-card.is-sold-out { filter: grayscale(.7); }
.product-art { height: 150px; display: grid; place-items: center; align-content: center; gap: 8px; background: radial-gradient(circle,#3d6333,#222 65%); border-bottom: 3px solid #111; }
.product-art > span { width: 68px; height: 68px; display: grid; place-items: center; color: #efffe9; background: var(--green); border: 5px solid #111; box-shadow: inset 0 0 0 4px var(--green-hi), 5px 5px 0 #171819; font-size: 1.8rem; }
.product-art small { color: #9fc894; font: 700 .6rem Consolas, monospace; letter-spacing: .15em; }
.product-body { padding: 18px; }
.product-stock { display: flex; justify-content: space-between; }
.product-stock span, .product-stock em { color: #90d47d; font-size: .64rem; font-weight: 800; font-style: normal; }
.product-stock em { color: #aaa; }
.product-body h2 { margin: 11px 0 7px; font-size: 1.03rem; }
.product-body > p { min-height: 40px; margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.55; }
.reward-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.reward-tags span { padding: 5px 7px; color: #d8dadb; background: #232526; border: 2px solid #111; font: 700 .61rem Consolas, monospace; }
.product-body footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 2px solid #171819; }
.product-body footer strong { color: var(--gold); font: 900 1.45rem Consolas, monospace; }
.product-body footer small { font-size: .6rem; }

/* Lottery */
.lottery-layout { display: grid; grid-template-columns: minmax(340px,.8fr) minmax(0,1.2fr); gap: 18px; }
.draw-machine { min-height: 520px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 38%,#473f22,#282a2b 48%,#1c1e1f); }
.draw-display { width: 100%; display: flex; flex-direction: column; align-items: center; padding: 36px; text-align: center; }
.draw-ring { width: 180px; height: 180px; display: grid; place-items: center; border: 12px solid #161718; outline: 4px solid #5e512a; background: repeating-conic-gradient(var(--gold) 0 12deg,#685625 12deg 24deg); box-shadow: inset 0 0 0 10px #292b2c, 0 7px 0 #111; border-radius: 50%; }
.draw-ring i { width: 88px; height: 88px; display: grid; place-items: center; color: #191a1b; background: var(--gold); border: 6px solid #111; border-radius: 50%; font-size: 2.3rem; font-style: normal; }
.draw-display > small { margin-top: 26px; color: var(--gold); font: 700 .64rem Consolas, monospace; letter-spacing: .2em; }
.draw-display h2 { margin: 8px 0; }
.draw-display p { margin: 0 0 20px; color: var(--muted); font-size: .76rem; }
.draw-display p b { color: var(--gold); }
.draw-display > em { margin-top: 22px; color: #b8bbbd; font-size: .61rem; font-style: normal; }
.prize-list { overflow: hidden; }
.prize-row { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px; min-height: 83px; padding: 0 18px; border-top: 2px solid #4b4d4f; border-bottom: 2px solid #151617; }
.prize-row > i { width: 38px; height: 38px; display: grid; place-items: center; color: var(--gold); background: #222; border: 3px solid #111; font: 700 .72rem Consolas, monospace; font-style: normal; }
.prize-row > span { display: flex; flex-direction: column; }
.prize-row b { font-size: .82rem; }
.prize-row small { margin-top: 5px; color: var(--muted); font-size: .66rem; }
.prize-row > em { color: #a5a8aa; font: 700 .65rem Consolas, monospace; font-style: normal; }
.winner-strip { display: flex; align-items: center; gap: 20px; margin-top: 18px; padding: 14px 18px; overflow: auto; white-space: nowrap; }
.winner-strip > b { color: var(--gold); font-size: .72rem; }
.winner-strip > span { color: var(--muted); font-size: .68rem; }
.winner-strip i { color: var(--gold); font-style: normal; }

/* Auth, feedback and account */
.auth-required { min-height: 390px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.lock-block { width: 70px; height: 70px; display: grid; place-items: center; background: #242627; border: 5px solid #111; box-shadow: inset 0 0 0 3px #56585a; font-size: 2rem; }
.auth-required h2 { margin: 20px 0 7px; }
.auth-required p { max-width: 540px; margin: 0; color: var(--muted); font-size: .76rem; }
.auth-page { min-height: calc(100vh - 130px); display: grid; grid-template-columns: minmax(0,1.2fr) minmax(340px,.8fr); align-items: stretch; gap: 18px; }
.auth-art { position: relative; min-height: 600px; overflow: hidden; }
.auth-art img { position: absolute; inset: -35px 0 -80px; width: 100%; height: calc(100% + 115px); object-fit: cover; filter: brightness(.54) saturate(.8); }
.auth-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg,rgba(19,20,21,.95),transparent 66%); }
.auth-art > div { position: absolute; z-index: 2; left: 42px; right: 42px; bottom: 42px; }
.auth-art span { color: var(--green-hi); font: 700 .72rem Consolas, monospace; letter-spacing: .16em; }
.auth-art h1 { margin: 8px 0; font-size: 2.6rem; }
.auth-art p { max-width: 520px; margin: 0; color: #d5d7d8; line-height: 1.7; }
.auth-form { align-self: center; }
.form-layout { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(320px,.85fr); gap: 18px; align-items: start; }
.ticket-list { overflow: hidden; }
.ticket-list > article { padding: 17px; border-top: 2px solid #4b4d4f; border-bottom: 2px solid #151617; }
.ticket-list h3 { margin: 8px 0; font-size: .85rem; }
.ticket-list article p { color: var(--muted); font-size: .7rem; line-height: 1.5; }
.ticket-list small { color: var(--muted); font-size: .62rem; }
.ticket-list blockquote { margin: 12px 0 0; padding: 10px; background: #232526; border-left: 4px solid var(--green); font-size: .7rem; }
.status { display: inline-block; padding: 4px 7px; color: #fff; background: #5d6062; border: 2px solid #111; font: 700 .6rem Consolas, monospace; }
.status--new, .status--pending { background: #9a5b1d; }
.status--reviewing { background: #286eaa; }
.status--resolved, .status--approved { background: #3f7f31; }
.status--rejected, .status--cancelled { background: #a54853; }
.profile-grid { display: grid; grid-template-columns: 320px minmax(0,1fr); gap: 18px; }
.player-card { padding: 24px; text-align: center; }
.player-avatar { width: 90px; height: 90px; display: grid; place-items: center; margin: 0 auto 15px; color: #172016; background: var(--green); border: 6px solid #111; box-shadow: inset 0 0 0 4px var(--green-hi), 5px 5px 0 #171819; font-size: 2.2rem; font-weight: 900; }
.player-card > small { color: var(--muted); font: .7rem Consolas, monospace; }
.player-card h2 { margin: 6px 0 18px; }
.point-balance { padding: 15px; text-align: left; background: #1f2122; border: 3px solid #111; box-shadow: inset 0 0 0 2px #434547; }
.point-balance span { display: block; color: var(--muted); font-size: .66rem; }
.point-balance b { display: inline-block; margin-top: 4px; color: var(--gold); font: 900 2rem Consolas, monospace; }
.point-balance em { margin-left: 6px; color: #888; font: 700 .6rem Consolas, monospace; font-style: normal; }
.admin-badge { display: inline-block; margin-top: 15px; padding: 5px 8px; color: #101112; background: var(--gold); border: 2px solid #111; font: 800 .62rem Consolas, monospace; }
.binding-card { padding: 22px; }
.binding-form { max-width: 620px; }
.binding-ok, .binding-pending { min-height: 260px; display: flex; align-items: center; justify-content: center; gap: 20px; text-align: left; }
.binding-ok > span, .binding-pending > span { width: 60px; height: 60px; display: grid; place-items: center; background: var(--green); border: 4px solid #111; box-shadow: inset 0 0 0 3px var(--green-hi); font-size: 1.5rem; font-weight: 900; }
.binding-pending > span { color: #111; background: var(--gold); box-shadow: inset 0 0 0 3px #ffe184; }
.binding-ok small, .binding-pending small { color: var(--muted); }
.binding-ok h3, .binding-pending h3 { margin: 6px 0; }
.binding-ok code, .binding-pending code { max-width: 100%; color: var(--green-hi); font-size: 1rem; overflow-wrap: anywhere; word-break: break-word; }
.binding-retry { display: grid; gap: 18px; }
.binding-retry__status { display: grid; gap: 8px; padding: 15px 16px; background: #222425; border: 3px solid #111; box-shadow: inset 0 0 0 2px #454749; }
.binding-retry__status .status { justify-self: start; }
.binding-retry__status b { font-size: .8rem; }
.binding-retry__status p { margin: 0; color: #f2b4ba; font-size: .7rem; line-height: 1.55; }
.binding-retry__status small { color: var(--muted); font-size: .66rem; }
.history-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.history-card { overflow: hidden; }
.history-card--wide { grid-column: 1 / -1; }
.history-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; min-height: 68px; padding: 10px 16px; border-top: 2px solid #4b4d4f; border-bottom: 2px solid #151617; }
.history-row > span { display: flex; flex-direction: column; }
.history-row b { font-size: .76rem; }
.history-row small { margin-top: 5px; color: var(--muted); font-size: .62rem; }
.history-row > * { min-width: 0; }
.history-row code { max-width: 100%; padding: 6px; color: var(--green-hi); background: #202321; border: 2px solid #111; overflow-wrap: anywhere; word-break: break-word; }
.history-row button { color: #eee; background: #46484a; border: 2px solid #111; cursor: pointer; }
.history-row--ledger > em { color: var(--muted); font-size: .66rem; font-style: normal; white-space: nowrap; }
.ledger-delta { font: 900 .78rem Consolas, monospace; white-space: nowrap; }
.ledger-delta.is-positive { color: var(--green-hi); }
.ledger-delta.is-negative { color: #ff9ca5; }
.security-panel { display: grid; grid-template-columns: minmax(260px,.8fr) minmax(0,1.2fr); gap: 24px; align-items: center; margin-top: 18px; padding: 22px; }
.security-panel > div { display: flex; align-items: center; gap: 14px; }
.security-panel h2 { margin: 0 0 6px; }
.security-panel p { margin: 0; color: var(--muted); font-size: .7rem; }
.security-panel form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.security-panel label { display: grid; gap: 6px; color: #d8dadb; font-size: .7rem; font-weight: 800; }
.security-panel input { min-height: 44px; padding: 10px 12px; color: #fff; background: #1e2021; border: 3px solid #101112; box-shadow: inset 0 0 0 2px #444648; }

/* Admin */
.admin-tabs { display: flex; margin-bottom: 18px; overflow: auto; }
.admin-tabs a { min-width: 110px; padding: 14px 15px; border-right: 2px solid #111; color: #c4c6c7; font-size: .72rem; font-weight: 800; text-align: center; white-space: nowrap; }
.admin-tabs a:hover, .admin-tabs a.is-active { color: #fff; background: #3d3f41; box-shadow: inset 0 -4px 0 var(--green-hi); }
.status-tabs { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 14px; padding: 8px; }
.status-tabs a { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; color: #c4c6c7; background: #27292a; border: 2px solid #111; font-size: .68rem; font-weight: 800; }
.status-tabs a:hover, .status-tabs a.is-active { color: #171819; background: var(--green-hi); }
.admin-stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.admin-stat-grid article { min-height: 118px; display: grid; grid-template-columns: 42px 1fr; grid-template-rows: 1fr 1fr; align-items: center; padding: 16px; }
.admin-stat-grid article > span { grid-row: 1/3; width: 38px; height: 38px; display: grid; place-items: center; background: #252728; border: 3px solid #111; }
.admin-stat-grid small { align-self: end; color: var(--muted); font-size: .65rem; }
.admin-stat-grid b { align-self: start; margin-top: 3px; font: 900 1.55rem Consolas, monospace; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; align-items: start; }
.admin-grid--three { grid-template-columns: repeat(3,1fr); }
.admin-quick { padding: 22px; }
.admin-quick h2 { margin-top: 0; }
.admin-quick ol { margin: 0; padding: 0; list-style: none; counter-reset: steps; }
.admin-quick li { counter-increment: steps; display: grid; grid-template-columns: 38px 1fr; gap: 10px; padding: 12px 0; border-top: 2px solid #171819; }
.admin-quick li::before { content: counter(steps,decimal-leading-zero); grid-row: 1/3; width: 32px; height: 32px; display: grid; place-items: center; color: var(--green-hi); background: #222; border: 2px solid #111; font: 700 .65rem Consolas, monospace; }
.admin-quick li b { font-size: .76rem; }
.admin-quick li span { color: var(--muted); font-size: .66rem; }
.compact-form { padding: 18px; }
.compact-form > header { margin: -18px -18px 17px; }
.admin-table { overflow: hidden; }
.table-scroll { overflow: auto; }
.admin-table table { width: 100%; border-collapse: collapse; font-size: .72rem; }
.admin-table th { padding: 12px; color: #999c9e; background: #222425; border-bottom: 3px solid #111; text-align: left; white-space: nowrap; }
.admin-table td { padding: 12px; border-top: 2px solid #47494b; border-bottom: 2px solid #151617; vertical-align: middle; }
.admin-table td b, .admin-table td small { display: block; }
.admin-table td small { margin-top: 4px; color: var(--muted); }
.admin-table td code { color: #9bd58c; }
.admin-table td button { margin: 2px; padding: 6px 9px; color: #fff; background: #478c35; border: 2px solid #111; cursor: pointer; }
.admin-table td button.danger { background: #a54853; }
.guide-card { padding: 22px; }
.guide-card h2 { margin-top: 0; }
.guide-card h3 { font-size: .85rem; }
.guide-card > code { display: block; padding: 12px; color: #9bd58c; background: #1d1f20; border: 3px solid #111; white-space: normal; word-break: break-word; }
.guide-card p { color: var(--muted); font-size: .72rem; line-height: 1.7; }
.guide-card hr { margin: 22px 0; border: 0; border-top: 3px solid #111; }
.configured-list { overflow: hidden; }
.configured-item { padding: 18px; border-top: 2px solid #47494b; border-bottom: 2px solid #151617; }
.configured-item h3 { margin: 9px 0 5px; }
.configured-item p { margin: 0; color: var(--muted); font-size: .7rem; }
.configured-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.configured-actions .ore-button { min-height: 38px; padding: 0 12px; font-size: .7rem; }
.ticket-admin-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; }
.ticket-admin { padding: 20px; }
.ticket-admin > header { display: flex; justify-content: space-between; }
.ticket-admin > header small { color: var(--muted); }
.ticket-admin h2 { margin: 14px 0 7px; font-size: 1rem; }
.ticket-admin > p, .ticket-admin blockquote, .ticket-admin details { color: var(--muted); font-size: .7rem; line-height: 1.6; }
.ticket-admin blockquote { margin: 12px 0; padding: 12px; background: #222425; border-left: 4px solid var(--blue); }
.ticket-admin details { margin-bottom: 15px; }

/* Toast and confirmation */
.toast-region { position: fixed; z-index: 200; right: max(18px,env(safe-area-inset-right)); bottom: 18px; display: grid; gap: 10px; }
.toast { width: min(390px,calc(100vw - 36px)); display: grid; grid-template-columns: 38px 1fr; align-items: center; padding: 10px; color: #fff; background: #303234; border: 3px solid #111; box-shadow: inset 0 0 0 2px #555, 0 5px 0 rgba(0,0,0,.5); }
.toast > span { width: 32px; height: 32px; display: grid; place-items: center; background: var(--green); border: 2px solid #111; font-weight: 900; }
.toast--error > span { background: var(--red); }
.toast p { margin: 0 0 0 8px; font-size: .74rem; }
dialog:not([open]) { display: none; }
.ore-dialog { width: min(480px,calc(100vw - 28px)); padding: 0; color: var(--text); background: #303234; border: 4px solid #111; box-shadow: inset 0 0 0 2px #5a5c5e, 7px 7px 0 rgba(0,0,0,.65); }
.ore-dialog::backdrop { background: rgba(0,0,0,.72); }
.ore-dialog form { padding: 24px; text-align: center; }
.dialog-symbol { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto; color: #171819; background: var(--gold); border: 4px solid #111; font-size: 1.4rem; font-weight: 900; }
.ore-dialog h2 { margin: 16px 0 7px; }
.ore-dialog p { color: var(--muted); font-size: .76rem; line-height: 1.6; white-space: pre-line; }
.noscript { position: fixed; z-index: 999; inset: 0; display: grid; place-items: center; color: #111; background: var(--gold); font-weight: 900; }
.clipboard-fallback { position: fixed; left: -10000px; top: 0; width: 1px; height: 1px; opacity: 0; }
.is-demo::after { content: "LOCAL DESIGN PREVIEW"; position: fixed; z-index: 80; right: 10px; top: 86px; padding: 5px 7px; color: #171819; background: var(--gold); border: 2px solid #111; font: 700 .56rem Consolas, monospace; }

@media (max-width: 1180px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
  .admin-stat-grid { grid-template-columns: repeat(3,1fr); }
  .admin-grid--three { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .account-chip { grid-template-columns: 30px auto; }
  .account-chip em { display: none; }
  .page-title { grid-template-columns: 54px 1fr; padding: 18px; }
  .page-title__icon { width: 50px; height: 50px; font-size: 1.3rem; }
  .page-title__actions { grid-column: 1/3; }
  .rank-layout, .lottery-layout, .auth-page, .form-layout, .profile-grid { grid-template-columns: 1fr; }
  .tab-rail { display: grid; grid-template-columns: 1fr 1fr; }
  .product-grid, .history-grid, .admin-grid, .admin-grid--three, .ticket-admin-grid { grid-template-columns: 1fr; }
  .security-panel, .security-panel form { grid-template-columns: 1fr; }
  .admin-stat-grid { grid-template-columns: 1fr 1fr; }
  .auth-art { min-height: 360px; }
  .auth-page { min-height: auto; }
  .toast-region { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .is-demo::after { top: 70px; }
}
@media (max-width: 520px) {
  .account-chip b { max-width: 66px; }
  .page-title { grid-template-columns: 44px 1fr; gap: 12px; }
  .page-title__icon { width: 42px; height: 42px; border-width: 3px; }
  .page-title p { font-size: .69rem; }
  .page-title__actions .ore-button { width: 100%; }
  .field-grid, .info-split, .admin-stat-grid { grid-template-columns: 1fr; }
  .info-split > div + div { border-left: 0; border-top: 3px solid #111; }
  .product-grid { grid-template-columns: 1fr; }
  .tab-button { min-height: 64px; }
  .ore-pagination { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 6px; padding: 9px 7px; }
  .page-button { min-height: 38px; padding: 0 8px; font-size: .64rem; }
  .page-status b { font-size: .63rem; }
  .page-status small { font-size: .56rem; }
  .draw-ring { width: 150px; height: 150px; }
  .history-row { grid-template-columns: 1fr; }
  .input-action { grid-template-columns: 1fr; }
  .auth-art > div { left: 22px; right: 22px; bottom: 24px; }
  .auth-art h1 { font-size: 2rem; }
}

/* Community, competitions and server-confirmed case reel */
.action-card--blue { background: linear-gradient(135deg,#234466,#282a2b 72%); }
.action-card--blue .action-symbol { background: var(--blue); box-shadow: inset 0 0 0 3px #69aaf0; }
.status--published, .status--active { background: #3f7f31; }
.status--draft { background: #6b6e70; }
.status--closed { background: #946122; }
.status--completed { background: #286eaa; }
.status--cancelled, .status--withdrawn { background: #a54853; }

.guild-summary { display: grid; grid-template-columns: minmax(0,1fr) 230px; gap: 18px; margin-bottom: 18px; }
.guild-champion { min-height: 150px; display: grid; grid-template-columns: 78px minmax(0,1fr) auto; align-items: center; gap: 20px; padding: 22px; background: linear-gradient(110deg,#3b3d3f,#262b24); }
.guild-emblem { width: 48px; height: 54px; display: grid; place-items: center; color: #172016; background: var(--green-hi); border: 4px solid #101112; box-shadow: inset 0 0 0 3px #d3f1c9, 4px 4px 0 #171819; font-weight: 900; clip-path: polygon(0 0,100% 0,100% 76%,50% 100%,0 76%); }
.guild-emblem--large { width: 72px; height: 82px; font-size: 1.45rem; }
.guild-champion small { color: #9cdc8c; font: 700 .64rem Consolas, monospace; letter-spacing: .12em; }
.guild-champion h2 { margin: 7px 0 4px; }
.guild-champion p { margin: 0; color: var(--muted); font-size: .7rem; }
.guild-champion > strong { color: var(--gold); font: 900 1.8rem Consolas, monospace; text-align: right; }
.guild-champion > strong small { display: block; margin-top: 6px; color: #9a9d9f; font-size: .58rem; }
.guild-sync-card { display: flex; flex-direction: column; justify-content: center; padding: 22px; }
.guild-sync-card span { color: var(--muted); font-size: .68rem; }
.guild-sync-card b { margin: 8px 0; color: var(--green-hi); font: 900 2rem Consolas, monospace; }
.guild-sync-card small { color: var(--muted); font-size: .62rem; line-height: 1.5; }
.guild-table { overflow: hidden; }
.guild-table-scroll { overflow-x: auto; }
.guild-row { min-height: 68px; display: grid; grid-template-columns: 72px minmax(230px,1.5fr) minmax(130px,.8fr) 90px minmax(120px,.6fr); align-items: center; gap: 12px; padding: 8px 18px; border-top: 2px solid #47494b; border-bottom: 2px solid #151617; }
.guild-row--head { min-height: 46px; color: #999c9e; background: #222425; border-top: 0; font-size: .64rem; font-weight: 800; }
.guild-row > span:first-child i { width: 36px; height: 36px; display: grid; place-items: center; color: #bbb; background: #242627; border: 3px solid #111; font: 800 .7rem Consolas, monospace; font-style: normal; }
.guild-row--podium > span:first-child i { color: #171819; background: var(--gold); }
.guild-identity { display: flex; align-items: center; gap: 13px; }
.guild-identity > span, .guild-row > span:not(:first-child) { min-width: 0; }
.guild-row b, .guild-row small { display: block; }
.guild-row small { margin-top: 4px; color: var(--muted); font-size: .61rem; }
.guild-row > strong { color: var(--gold); font: 900 1rem Consolas, monospace; text-align: right; }

.lottery-audit-table { margin-top: 18px; }
.lottery-audit-table table { min-width: 980px; }
.lottery-audit-table th:last-child, .lottery-audit-table td:last-child { white-space: nowrap; }
.rarity-badge--common { background: #5d6062; }
.rarity-badge--uncommon { background: #3f7f31; }
.rarity-badge--rare { background: #286eaa; }
.rarity-badge--epic { background: #75449b; }
.rarity-badge--legendary { color: #171819; background: var(--gold); }

.competition-notice { min-height: 148px; display: grid; grid-template-columns: 112px minmax(0,1fr); align-items: center; gap: 22px; margin-bottom: 18px; padding: 18px 24px; background: linear-gradient(105deg,#24384c,#303234); }
.competition-notice img { width: 96px; height: 96px; object-fit: cover; image-rendering: pixelated; border: 4px solid #111; box-shadow: 4px 4px 0 #171819; }
.competition-notice small { color: #8fb8e8; font: 700 .64rem Consolas, monospace; letter-spacing: .14em; }
.competition-notice h2 { margin: 7px 0; }
.competition-notice p { margin: 0; color: #c2c5c7; font-size: .74rem; line-height: 1.65; }
.competition-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.competition-card { overflow: hidden; }
.competition-cover { position: relative; height: 190px; overflow: hidden; background: #1f2122; border-bottom: 3px solid #111; }
.competition-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg,rgba(20,21,22,.92),transparent 65%); }
.competition-cover img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.competition-cover .status { position: absolute; z-index: 2; top: 14px; left: 14px; }
.competition-card__body { padding: 20px; }
.competition-card__body > small { color: #8fb8e8; font: 700 .62rem Consolas, monospace; }
.competition-card h2 { margin: 8px 0; font-size: 1.12rem; }
.competition-card p { min-height: 44px; margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.6; }
.competition-card dl { display: grid; grid-template-columns: .6fr .6fr 1.4fr; gap: 8px; margin: 17px 0; }
.competition-card dl div { padding: 10px; background: #222425; border: 2px solid #111; }
.competition-card dt { color: var(--muted); font-size: .58rem; }
.competition-card dd { margin: 5px 0 0; font-size: .67rem; font-weight: 800; }
.competition-card .ore-button { width: 100%; }
.competition-hero { display: grid; grid-template-columns: minmax(280px,.8fr) minmax(0,1.2fr); overflow: hidden; }
.competition-hero__art { min-height: 420px; background: #1d1f20; border-right: 3px solid #111; }
.competition-hero__art img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.competition-hero__copy { padding: 28px; }
.competition-hero__copy h2 { margin: 18px 0 10px; }
.competition-hero__copy dl { margin: 0; }
.competition-hero__copy dl div { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 12px 0; border-bottom: 2px solid #1a1b1c; }
.competition-hero__copy dt { color: var(--muted); font-size: .67rem; }
.competition-hero__copy dd { margin: 0; font-size: .72rem; font-weight: 800; }
.competition-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.entry-state { padding: 10px 12px; }
.team-contact { margin: 18px 0 0; padding: 12px; color: var(--muted); background: #222425; border-left: 4px solid var(--gold); font-size: .7rem; line-height: 1.6; }
.team-contact code { color: var(--gold); }
.competition-copy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.prose-card { padding: 22px; }
.prose-card header { display: flex; align-items: center; gap: 12px; }
.prose-card header span { width: 36px; height: 36px; display: grid; place-items: center; background: var(--blue); border: 3px solid #111; font-weight: 900; }
.prose-card h2 { margin: 0; font-size: .95rem; }
.prose-card > p { margin: 16px 0 0; color: #c4c7c8; font-size: .74rem; line-height: 1.8; }
.prize-showcase { margin-top: 18px; overflow: hidden; }
.competition-prizes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.competition-prize { min-width: 0; padding: 18px; border-right: 3px solid #111; text-align: center; }
.competition-prize:last-child { border-right: 0; }
.competition-prize img { width: 100%; height: 150px; object-fit: contain; image-rendering: pixelated; background: radial-gradient(circle,#46523d,#222 72%); border: 3px solid #111; }
.competition-prize > span { display: block; margin-top: 12px; color: var(--gold); font: 700 .58rem Consolas, monospace; letter-spacing: .15em; }
.competition-prize h3 { margin: 7px 0 4px; font-size: .84rem; }
.competition-prize p { margin: 0; color: var(--muted); font-size: .65rem; }
.registration-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.registration-list { overflow: hidden; }
.registration-person, .registration-team { min-height: 70px; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; padding: 10px 16px; border-top: 2px solid #47494b; border-bottom: 2px solid #151617; }
.registration-person > i, .registration-team > i { width: 34px; height: 34px; display: grid; place-items: center; color: var(--green-hi); background: #222; border: 2px solid #111; font: 700 .62rem Consolas, monospace; font-style: normal; }
.registration-person b, .registration-person small, .registration-team b, .registration-team small, .registration-team em { display: block; }
.registration-person small, .registration-team small { margin-top: 5px; color: var(--muted); font-size: .62rem; }
.registration-person em { color: #9cdc8c; font-size: .62rem; font-style: normal; }
.registration-team { grid-template-columns: 40px 1fr; }
.registration-team em { margin-top: 6px; color: #9a9d9f; font-size: .58rem; font-style: normal; line-height: 1.5; }

.case-terminal { overflow: hidden; background: #202223; }
.case-terminal__header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; background: linear-gradient(90deg,#343638,#242627); border-bottom: 3px solid #111; }
.case-terminal__header small { color: var(--gold); font: 700 .6rem Consolas, monospace; letter-spacing: .15em; }
.case-terminal__header h2 { margin: 5px 0 3px; }
.case-terminal__header p { margin: 0; color: var(--muted); font-size: .68rem; }
.case-terminal__header > span { padding: 9px 12px; color: #171819; background: var(--gold); border: 3px solid #111; font: 900 .7rem Consolas, monospace; white-space: nowrap; }
.case-reel-shell { position: relative; height: 250px; display: flex; align-items: center; overflow: hidden; background: radial-gradient(circle at center,#384136,#191b1c 72%); border-bottom: 3px solid #111; }
.case-reel-shell::before, .case-reel-shell::after { content: ""; position: absolute; z-index: 3; top: 0; bottom: 0; width: 16%; pointer-events: none; }
.case-reel-shell::before { left: 0; background: linear-gradient(90deg,#161718,transparent); }
.case-reel-shell::after { right: 0; background: linear-gradient(-90deg,#161718,transparent); }
.case-pointer { position: absolute; z-index: 5; left: 50%; top: 0; bottom: 0; width: 4px; background: var(--gold); box-shadow: 0 0 18px rgba(242,194,75,.8); pointer-events: none; }
.case-pointer::before, .case-pointer::after { content: ""; position: absolute; left: 50%; width: 0; height: 0; transform: translateX(-50%); border-left: 13px solid transparent; border-right: 13px solid transparent; }
.case-pointer::before { top: 0; border-top: 18px solid var(--gold); }
.case-pointer::after { bottom: 0; border-bottom: 18px solid var(--gold); }
.case-reel { display: flex; flex: none; gap: 12px; padding-left: calc(50% - 92px); will-change: transform; }
.case-card { position: relative; flex: 0 0 184px; height: 196px; display: grid; grid-template-rows: auto 1fr auto; align-items: center; padding: 10px; overflow: hidden; background: linear-gradient(155deg,#3d4143,#232526); border: 4px solid #101112; box-shadow: inset 0 0 0 3px #575b5d, 4px 4px 0 rgba(0,0,0,.5); text-align: center; }
.case-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: #777; }
.case-card--uncommon::after { background: #65ad4f; }
.case-card--rare::after { background: #438bd0; }
.case-card--epic::after { background: #9b5dcc; }
.case-card--legendary::after { background: var(--gold); }
.case-card > span { justify-self: start; color: #aaa; font: 700 .55rem Consolas, monospace; letter-spacing: .1em; }
.case-card img { width: 100%; height: 118px; object-fit: contain; image-rendering: pixelated; }
.case-card b { width: 100%; overflow: hidden; font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.case-card.is-revealed { filter: brightness(1.25); box-shadow: inset 0 0 0 3px var(--gold), 0 0 24px rgba(242,194,75,.6); }
.case-console { min-height: 92px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 16px 22px; }
.case-console > div:first-child b, .case-console > div:first-child small, .case-result b, .case-result small { display: block; }
.case-console small { margin-top: 5px; color: var(--muted); font-size: .62rem; }
.case-result { justify-self: end; max-width: 360px; text-align: right; }
.case-result b { color: var(--gold); }
.case-result button { margin-top: 7px; padding: 5px 8px; color: #fff; background: #454749; border: 2px solid #111; cursor: pointer; }
.lottery-layout--details { grid-template-columns: minmax(0,1.35fr) minmax(300px,.65fr); margin-top: 18px; }
.prize-row--visual > i { overflow: hidden; }
.prize-row--visual > i img { width: 100%; height: 100%; object-fit: contain; }
.prize-row--visual.is-unavailable { filter: grayscale(1); opacity: .55; }
.draw-proof { padding: 22px; }
.draw-proof > img { width: 100%; height: 190px; object-fit: contain; image-rendering: pixelated; background: radial-gradient(circle,#534624,#222 68%); border: 3px solid #111; }
.draw-proof > small { display: block; margin-top: 16px; color: var(--gold); font: 700 .6rem Consolas, monospace; letter-spacing: .15em; }
.draw-proof h2 { margin: 7px 0; }
.draw-proof ol { padding-left: 20px; color: #d0d2d3; font-size: .7rem; line-height: 1.8; }
.draw-proof p { margin: 15px 0 0; padding-top: 15px; color: var(--muted); border-top: 2px solid #171819; font-size: .66rem; line-height: 1.6; }

.guide-card__icon { width: 76px; height: 76px; object-fit: contain; image-rendering: pixelated; float: right; margin: 0 0 12px 12px; }
.competition-admin-layout { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 18px; align-items: start; }
.competition-admin-rail { overflow: hidden; }
.competition-admin-rail > header { display: flex; align-items: center; justify-content: space-between; padding: 14px; border-bottom: 3px solid #111; }
.competition-admin-rail h2 { margin: 0; font-size: .9rem; }
.competition-admin-rail > a { display: flex; flex-direction: column; gap: 6px; padding: 14px; color: #ddd; border-top: 2px solid #47494b; border-bottom: 2px solid #151617; }
.competition-admin-rail > a:hover, .competition-admin-rail > a.is-active { background: #3b3d3f; box-shadow: inset 5px 0 0 var(--green-hi); }
.competition-admin-rail > a .status { align-self: flex-start; }
.competition-admin-rail > a b { font-size: .74rem; }
.competition-admin-rail > a small { color: var(--muted); font-size: .6rem; }
.competition-admin-rail > .ore-pagination { grid-template-columns: 1fr 1fr; margin: 0; border: 0; border-top: 3px solid #111; box-shadow: inset 0 2px 0 #515355; }
.competition-admin-rail > .ore-pagination .page-status { grid-column: 1/3; grid-row: 1; }
.competition-admin-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding: 18px 22px; }
.competition-admin-summary h2 { margin: 8px 0 4px; }
.competition-admin-summary p { margin: 0; color: var(--muted); font-size: .7rem; }
.competition-admin-summary > div:last-child { display: flex; gap: 9px; }
.status-tabs--embedded { margin: 0; border-top: 2px solid #47494b; border-bottom: 2px solid #151617; }
.competition-team-admin { display: grid; grid-template-columns: 360px minmax(0,1fr); gap: 18px; margin-top: 18px; align-items: start; }

@media (max-width: 1180px) {
  .competition-grid { grid-template-columns: 1fr; }
  .competition-admin-layout { grid-template-columns: 250px minmax(0,1fr); }
  .competition-team-admin { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .guild-summary, .competition-hero, .competition-copy-grid, .registration-grid, .competition-admin-layout { grid-template-columns: 1fr; }
  .guild-champion { grid-template-columns: 68px minmax(0,1fr); }
  .guild-champion > strong { grid-column: 1/3; text-align: left; }
  .guild-row { min-width: 650px; grid-template-columns: 56px minmax(220px,1fr) 100px 80px 110px; }
  .competition-hero__art { min-height: 280px; border-right: 0; border-bottom: 3px solid #111; }
  .competition-prizes { grid-template-columns: 1fr; }
  .competition-prize { border-right: 0; border-bottom: 3px solid #111; }
  .case-console { grid-template-columns: 1fr auto; }
  .case-result { grid-column: 1/3; justify-self: stretch; text-align: left; }
  .lottery-layout--details { grid-template-columns: 1fr; }
  .competition-admin-summary { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 520px) {
  .guild-champion { grid-template-columns: 58px minmax(0,1fr); padding: 16px; }
  .guild-emblem--large { width: 54px; height: 62px; }
  .guild-row { min-width: 650px; }
  .competition-notice { grid-template-columns: 70px 1fr; padding: 14px; }
  .competition-notice img { width: 64px; height: 64px; }
  .competition-card dl { grid-template-columns: 1fr 1fr; }
  .competition-card dl div:last-child { grid-column: 1/3; }
  .competition-hero__copy { padding: 18px; }
  .competition-hero__copy dl div { grid-template-columns: 84px 1fr; }
  .case-terminal__header { align-items: flex-start; flex-direction: column; }
  .case-reel-shell { height: 220px; }
  .case-card { flex-basis: 154px; height: 176px; }
  .case-card img { height: 100px; }
  .case-reel { padding-left: calc(50% - 77px); }
  .case-console { grid-template-columns: 1fr; }
  .case-console .ore-button { width: 100%; }
  .case-result { grid-column: 1; }
  .competition-admin-summary > div:last-child { width: 100%; flex-direction: column; }
}
