@font-face { font-family: PixelTitle; src: url('/press-start-2p.woff2') format('woff2'); font-display: swap; }
:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0d100f;
  color: #e9e5d9;
  letter-spacing: 0;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #0d100f; }
button, input { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.shell { min-height: 100vh; }
.login-view { width: min(420px, calc(100% - 32px)); margin: 0 auto; padding-top: min(22vh, 180px); }
.login-brand, .brand-lockup { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border: 2px solid #9f6a37; background: #1d2521; color: #f2c66d; box-shadow: 4px 4px 0 #060706; font-family: PixelTitle, monospace; font-size: 11px; }
.login-brand small, .brand-lockup small { display: block; color: #7f9187; font-family: PixelTitle, monospace; font-size: 7px; }
h1 { margin: 5px 0 0; font-family: PixelTitle, monospace; color: #f2c66d; font-size: 17px; line-height: 1.55; }
h2 { margin: 6px 0 0; color: #e9e5d9; font-size: 18px; line-height: 1.4; }
.login-form { margin-top: 28px; border-top: 1px solid #37433d; padding-top: 22px; }
.session-panel { margin-top: 28px; padding: 22px 0; border-top: 1px solid #37433d; }
#session-state { margin: 0; color: #d8c99e; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
#session-state.session-state--error { color: #e9a26f; }
.session-help, .login-session-note { color: #94a29a; font-size: 12px; line-height: 1.8; }
.session-help { margin: 12px 0 18px; }
.login-session-note { margin: 14px 0 0; }
#session-retry { min-height: 44px; }
#session-retry:focus-visible { outline: 2px solid #f2c66d; outline-offset: 3px; }
label { display: block; margin: 13px 0; color: #aeb9b2; font-size: 12px; }
input { width: 100%; min-height: 43px; margin-top: 7px; padding: 9px 11px; border: 1px solid #4b5b52; border-radius: 2px; outline: none; background: #171d1a; color: #f5f1e5; }
input:focus { border-color: #c38a45; box-shadow: inset 3px 0 0 #c38a45; }
.primary, .icon-command { min-height: 40px; border: 1px solid #b17b3d; border-radius: 2px; background: #8d552d; color: #fff8e8; font-weight: 700; }
.primary { width: 100%; margin-top: 8px; }
.primary:hover, .icon-command:hover { background: #a66735; }
.error { min-height: 20px; margin: 9px 0; color: #ef8f80; font-size: 12px; }
.dashboard { width: min(1240px, 100%); margin: 0 auto; padding: 0 28px 28px; }
.topbar { min-height: 84px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #334039; }
.admin-actions { display: flex; align-items: center; gap: 12px; color: #94a29a; font-size: 12px; }
.logout-state { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid #be7954; background: #241b17; color: #edb391; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
#logout { white-space: nowrap; }
.icon-command { min-height: 34px; padding: 6px 12px; background: #242c28; }
.ranges { display: flex; flex-wrap: wrap; gap: 7px; padding: 20px 0 14px; }
.ranges button { min-height: 34px; padding: 6px 12px; border: 1px solid #435048; border-radius: 2px; background: #171d1a; color: #9eaaa3; }
.ranges button:hover { border-color: #8d683e; color: #e8ddc7; }
.ranges button.active { border-color: #d09a4f; background: #2d271d; color: #f2c66d; box-shadow: inset 3px 0 0 #d09a4f; }
.range-line { min-height: 42px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #28322d; color: #7f9187; font-size: 12px; }
.range-line strong { color: #d7ded9; font-size: 14px; }
#load-state { margin-left: auto; color: #c4a362; }
.section-heading { display: flex; align-items: baseline; gap: 12px; margin-top: 24px; }
.section-heading > span { color: #c68b47; font-family: PixelTitle, monospace; font-size: 7px; }
.section-heading h2 { font-size: 15px; }
.section-heading--usage { margin-top: 28px; }
.section-heading--features { margin-top: 28px; }
.feature-scope-note { margin: 8px 0 0; padding: 9px 12px; border-left: 3px solid #9f6a37;
  background: #151a17; color: #87968e; font-size: 11px; line-height: 1.7; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-left: 1px solid #39463f; border-top: 1px solid #39463f; margin-top: 12px; }
.metrics article { min-height: 168px; display: flex; flex-direction: column; justify-content: center; padding: 22px; border-right: 1px solid #39463f; border-bottom: 1px solid #39463f; background: #141916; }
.metrics article:nth-child(2) { background: #181d19; }
.metrics article:nth-child(3) { background: #171b1a; }
.metrics article:nth-child(4) { background: #1b1914; }
.metrics--usage article:nth-child(1) { background: #171b1a; }
.metrics--usage article:nth-child(2) { background: #161c1a; }
.metrics--usage article:nth-child(3) { background: #191b17; }
.metrics--usage article:nth-child(4) { background: #1b1914; }
.metrics--features { margin-top: 9px; }
.metrics--features .metric-feature-reported { background: #171b1a; }
.metrics--features .metric-feature-enabled { background: #151d18; }
.metrics--features .metric-feature-disabled { background: #1d1715; }
.metrics--features .metric-feature-interactive { background: #1b1914; }
.metrics small { color: #93a199; font-size: 12px; }
.metrics strong { margin: 14px 0 10px; color: #f2c66d; font-family: PixelTitle, monospace; font-size: 32px; line-height: 1.4; }
.metrics article:nth-child(3) strong { color: #82c59a; }
.metrics .metric-recharge strong { color: #e9a26f; }
.metrics--features .metric-feature-reported strong { color: #d8c99e; }
.metrics--features .metric-feature-enabled strong { color: #82c59a; }
.metrics--features .metric-feature-disabled strong { color: #e89a86; }
.metrics--features .metric-feature-interactive strong { color: #f2c66d; }
.metrics span { color: #66766d; font-size: 11px; }
.feature-usage { min-width: 0; margin-top: 30px; padding: 22px 20px; border: 1px solid #4b5546; background: #131914; }
.feature-usage-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.feature-usage-heading .section-heading { flex-wrap: wrap; margin-top: 0; gap: 8px 12px; }
.feature-usage-heading .icon-command { flex-shrink: 0; min-height: 40px; }
.feature-usage-overview { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 22px; }
.feature-usage-total > span { color: #aab8ad; font-size: 12px; }
.feature-usage-total > div { display: flex; align-items: baseline; gap: 12px; margin-top: 10px; }
.feature-usage-total strong { color: #f2c66d; font-family: PixelTitle, monospace; font-size: 32px; line-height: 1.5; }
.feature-usage-total > div > span { color: #87968e; font-size: 12px; }
.feature-usage-period { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; color: #9baa9f; font-size: 12px; overflow-wrap: anywhere; }
.feature-usage-period strong { color: #e0dfcf; }
#feature-usage-state { color: #82c59a; }
#feature-usage-state.feature-usage-state--error { color: #ef8f80; }
.feature-usage-tracking { margin: 12px 0 0; color: #8d9d92; font-size: 11px; line-height: 1.7; }
.feature-usage-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.feature-usage-card { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; padding: 15px 12px 12px; border: 1px solid #354438; background: #1a221b; }
.feature-usage-card small { color: #c1cbbb; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.feature-usage-card strong { margin: 12px 0 8px; color: #d5be81; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.feature-usage-card > span { color: #859387; font-size: 10px; }
.feature-usage-table-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 24px; }
.feature-usage-table-heading h3 { margin: 0; font-size: 14px; color: #dce3d9; }
.feature-usage-table-heading p { margin: 7px 0 0; color: #91a093; font-size: 11px; line-height: 1.6; }
.feature-usage-table-heading label { display: flex; align-items: center; flex-shrink: 0; gap: 10px; margin: 0; font-size: 11px; }
.feature-usage-table-heading select { width: 158px; min-height: 40px; padding: 8px 10px; border: 1px solid #58664f; border-radius: 2px; background: #1c241d; color: #e9e5d9; font: inherit; font-size: 13px; }
.feature-usage-table-heading select:focus-visible, .feature-usage-table-scroll:focus-visible, #feature-usage-refresh:focus-visible { outline: 2px solid #f2c66d; outline-offset: 3px; }
.feature-usage-table-scroll { max-width: 100%; overflow-x: auto; margin-top: 14px; border: 1px solid #38493b; overscroll-behavior-inline: contain; scrollbar-color: #66754f #172019; scrollbar-width: thin; }
.feature-usage-table { width: 100%; min-width: 1420px; border-collapse: collapse; table-layout: fixed; font-size: 12px; font-variant-numeric: tabular-nums; }
.feature-usage-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.feature-usage-table th, .feature-usage-table td { height: 48px; padding: 10px 12px; border-bottom: 1px solid #2d3b30; text-align: right; }
.feature-usage-table thead th { color: #b0bfaa; background: #1d281e; font-size: 11px; font-weight: 500; }
.feature-usage-table th:first-child { position: sticky; left: 0; z-index: 1; width: 148px; text-align: left; background: #1a231c; }
.feature-usage-table tbody th { color: #c1ccbf; font-size: 11px; font-weight: 500; }
.feature-usage-table tbody th small { display: block; margin-top: 5px; color: #889781; font-size: 10px; }
.feature-usage-table td { color: #e3dfc8; }
.feature-usage-table tbody tr:last-child > * { border-bottom: 0; }
.feature-usage-table tbody tr:hover td { background: #1d271e; }
.feature-usage-table-scroll--single .feature-usage-table { min-width: 0; }
.feature-usage-table-scroll--single th:first-child { width: 50%; }
.feature-usage-empty { margin: 14px 0 0; padding: 26px 12px; border: 1px dashed #3d4b3d; color: #96a18f; font-size: 12px; text-align: center; line-height: 1.7; }
.feature-usage-scope { margin: 16px 0 0; color: #91a18f; font-size: 11px; line-height: 1.9; }
.ranking { margin-top: 32px; border-top: 1px solid #39463f; border-bottom: 1px solid #39463f; }
.ranking-heading { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.ranking-heading small { color: #c68b47; font-family: PixelTitle, monospace; font-size: 7px; }
.ranking-heading h2 { margin-top: 8px; }
.ranking-heading > span { color: #66766d; font-size: 11px; }
.ranking-scroll { overflow-x: auto; overscroll-behavior-inline: contain; }
.ranking-grid { min-width: 940px; display: grid; grid-template-columns: 58px minmax(190px, 1.4fr) repeat(5, minmax(104px, .75fr)); align-items: center; column-gap: 12px; }
.ranking-grid--head { min-height: 38px; border-top: 1px solid #2c3731; border-bottom: 1px solid #39463f; color: #718078; font-size: 10px; text-transform: uppercase; }
.ranking-grid > span:nth-child(n + 3) { text-align: right; font-variant-numeric: tabular-nums; }
.ranking-row { min-height: 58px; border-bottom: 1px solid #242e29; color: #b9c3bd; font-size: 12px; }
.ranking-row:last-child { border-bottom: 0; }
.ranking-row:hover { background: #151b18; }
.ranking-row > span:first-child { color: #c68b47; font-family: PixelTitle, monospace; font-size: 9px; }
.ranking-row > span:nth-child(6) { color: #f2c66d; font-weight: 700; }
.ranking-user { min-width: 0; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.ranking-user strong, .ranking-user small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-user strong { color: #e7e2d7; font-size: 12px; }
.ranking-user small { color: #65746c; font-size: 10px; }
.ranking-empty { margin: 0; padding: 30px 0; border-top: 1px solid #2c3731; color: #65746c; font-size: 12px; text-align: center; }
.settings-band { display: grid; grid-template-columns: minmax(240px, .9fr) minmax(320px, 1.1fr); gap: 48px;
  align-items: center; margin-top: 28px; padding: 28px 0; border-top: 1px solid #39463f; border-bottom: 1px solid #39463f; }
.settings-copy small { color: #c68b47; font-family: PixelTitle, monospace; font-size: 7px; }
.settings-copy p { max-width: 520px; margin: 10px 0 0; color: #87968e; font-size: 12px; line-height: 1.75; }
.setting-form { min-width: 0; }
.download-settings-forms { display: grid; gap: 20px; min-width: 0; }
.download-settings-forms .setting-form > p:not(.setting-state) { font-size: 12px; color: var(--muted, #aeb6ae); line-height: 1.6; }
.setting-form > label { margin: 0 0 8px; }
.money-control { display: grid; grid-template-columns: 40px minmax(0, 1fr) 132px; min-height: 44px; }
.money-control > span { display: grid; place-items: center; border: 1px solid #4b5b52; border-right: 0;
  background: #202822; color: #f2c66d; font-family: PixelTitle, monospace; font-size: 11px; }
.money-control input { min-height: 44px; margin: 0; border-radius: 0; font-variant-numeric: tabular-nums; }
.save-setting { min-height: 44px; margin: 0 0 0 8px; }
.setting-state { min-height: 20px; margin: 9px 0 0; color: #82c59a; font-size: 12px; }
.setting-state--error { color: #ef8f80; }
button:disabled { cursor: wait; opacity: .65; }
footer { display: flex; justify-content: space-between; gap: 12px; padding-top: 18px; color: #5f6d65; font-size: 11px; }
[hidden] { display: none !important; }
@media (max-width: 820px) {
  .dashboard { padding: 0 14px 20px; }
  .topbar { min-height: 74px; }
  .brand-mark { width: 42px; height: 42px; }
  h1 { font-size: 13px; }
  .admin-actions > span { display: none; }
  .ranges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .ranges button { min-width: 0; padding: 5px 3px; font-size: 11px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics article { min-height: 130px; padding: 16px; }
  .metrics strong { font-size: 26px; }
  .feature-usage { padding: 18px 14px; }
  .feature-usage-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-usage-card { padding: 12px; }
  .feature-usage-overview { align-items: flex-start; }
  .feature-usage-period { max-width: 46%; }
  .feature-usage-table-heading { align-items: stretch; flex-direction: column; gap: 12px; }
  .feature-usage-table-heading label { justify-content: space-between; }
  .feature-usage-table-heading select { width: min(220px, 68%); min-height: 44px; font-size: 16px; }
  .ranking-heading { min-height: 72px; }
  .settings-band { grid-template-columns: 1fr; gap: 20px; padding: 24px 0; }
  footer { flex-direction: column; }
}
@media (max-width: 420px) {
  .ranges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics { grid-template-columns: 1fr; }
  .metrics article { min-height: 112px; }
  .feature-usage { padding: 16px 12px; }
  .feature-usage-heading { gap: 10px; }
  .feature-usage-heading .section-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .feature-usage-heading .section-heading > span { font-size: 6px; }
  .feature-usage-heading h2 { font-size: 14px; }
  .feature-usage-overview { flex-direction: column; gap: 12px; margin-top: 18px; }
  .feature-usage-period { max-width: 100%; align-items: flex-start; }
  .feature-usage-card small { min-height: 36px; }
  .section-heading { margin-top: 20px; }
  .ranking { margin-top: 24px; }
  .ranking-heading { align-items: flex-start; flex-direction: column; justify-content: center; gap: 6px; }
  .ranking-grid { min-width: 820px; grid-template-columns: 50px minmax(160px, 1.3fr) repeat(5, minmax(92px, .72fr)); }
  .range-line { flex-wrap: wrap; padding: 8px 0; }
  #load-state { width: 100%; margin-left: 0; }
  .money-control { grid-template-columns: 36px minmax(0, 1fr); }
  .save-setting { grid-column: 1 / -1; width: 100%; margin: 8px 0 0; }
}
