:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #f8f6ff;
  background: #121318;
  --panel: #1b1d26;
  --border: #333545;
  --muted: #b2b2c5;
  --accent: #c2a6ff;
  --mint: #94ebc5;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button, input { border-radius: .63rem; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.15rem); letter-spacing: -.055em; line-height: 1.06; }
h2 { font-size: 1.25rem; letter-spacing: -.025em; }
p { line-height: 1.6; }
.muted, .page-heading p:not(.eyebrow) { color: var(--muted); }
.small, small { font-size: .875rem; }
.brand { display: flex; align-items: center; gap: .65rem; font-size: 1.4rem; font-weight: 800; letter-spacing: -.045em; }
.brand > span > span { color: var(--accent); }
.brand-icon, .game-icon, .avatar { display: grid; place-items: center; flex: 0 0 auto; font-weight: 800; }
.brand-icon { width: 2.2rem; height: 2.2rem; border-radius: .65rem; background: var(--accent); color: #211538; font-size: 1.65rem; }
.eyebrow { margin-bottom: .7rem; font-size: .875rem; color: var(--accent); font-weight: 750; letter-spacing: .14em; }
.primary, .secondary { border: 1px solid transparent; min-height: 2.7rem; padding: .56rem .95rem; font-weight: 650; }
.primary { background: var(--accent); color: #211538; }
.primary:hover { background: #d3bfff; }
.secondary { background: #252633; border-color: var(--border); color: #f8f6ff; }
.secondary:hover { background: #343548; }
.text-button { color: var(--accent); border: 0; padding: .25rem 0; background: none; font-size: .875rem; text-align: left; }
.text-button:hover { text-decoration: underline; }
.danger, .form-error { color: #ffafbc; }
.form-error:empty { display: none; }
.boot { padding: 2rem; }
.auth-layout { min-height: 100svh; display: grid; grid-template-columns: 1.15fr 1fr; }
.auth-hero { display: flex; flex-direction: column; justify-content: space-between; gap: 3rem; padding: clamp(2rem, 6vw, 6rem); background: radial-gradient(ellipse at 0 100%, #354850 0%, transparent 60%), radial-gradient(ellipse at 85% 20%, #443366 0%, transparent 63%), #211c34; }
.auth-hero h1 { font-size: clamp(3rem, 6.5vw, 6.25rem); }
.auth-hero em { font-style: normal; color: var(--accent); }
.hero-content > p:not(.eyebrow) { margin-top: 1.15rem; color: #ded7ef; max-width: 32rem; }
.hero-sample { display: flex; align-items: center; gap: .85rem; margin-top: 2.3rem; padding: .85rem; max-width: 28rem; background: #191727cc; border: 1px solid #655b7b; border-radius: 1rem; }
.hero-sample div { flex: 1; }
.hero-sample progress { margin-top: .4rem; }
.auth-panel { display: grid; place-items: center; padding: clamp(1.3rem, 5vw, 5rem); }
.auth-inner { width: min(100%, 25rem); }
.auth-inner h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 1.6rem 0 .35rem; }
.auth-inner form { margin-top: 1.35rem; }
.tabs { display: flex; gap: .25rem; padding: .25rem; background: var(--panel); border: 1px solid var(--border); border-radius: .8rem; }
.tabs button { flex: 1; border: none; background: none; color: var(--muted); padding: .55rem; }
.tabs button[aria-pressed="true"] { background: #343047; color: #fff; }
form { display: grid; gap: 1rem; }
label { display: grid; gap: .45rem; font-size: .925rem; font-weight: 600; }
input:not([type="checkbox"]) { width: 100%; min-width: 0; padding: .68rem .75rem; background: #12131b; border: 1px solid var(--border); color: inherit; }
input[type="checkbox"] { accent-color: var(--accent); inline-size: 1.15rem; block-size: 1.15rem; margin: 0; }
.shell { display: grid; grid-template-columns: 14rem minmax(0, 1fr); min-height: 100svh; }
.sidebar { background: #171820; border-right: 1px solid #292b36; padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 2rem; }
.sidebar .brand { padding-inline: .4rem; }
.sidebar nav { display: grid; gap: .3rem; }
.sidebar nav button { padding: .7rem .75rem; border: 1px solid transparent; text-align: left; background: transparent; color: var(--muted); }
.sidebar nav button:hover, .sidebar nav button[aria-current] { background: #2c2540; border-color: #3b3053; color: #e3d5ff; }
.identity { margin-top: auto; display: flex; gap: .7rem; align-items: center; overflow-wrap: anywhere; }
.identity button { display: block; }
.avatar { background: #39314c; color: var(--accent); border-radius: 50%; width: 2.15rem; height: 2.15rem; }
.topbar { padding: .9rem clamp(1rem, 4vw, 3.5rem); border-bottom: 1px solid #292b36; display: flex; justify-content: flex-end; gap: .7rem; font-size: .875rem; color: var(--muted); }
time, .stamina-value, .stats strong { font-variant-numeric: tabular-nums; }
.content { max-width: 93rem; margin-inline: auto; padding: clamp(1rem, 4vw, 3.5rem); }
.quote-banner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .85rem; padding: .8rem 1rem; margin-bottom: 1.45rem; border: 1px solid #67577e; border-radius: 1rem; background: #211c2ee8; }
.quote-banner .eyebrow { display: block; letter-spacing: .04em; margin: 0 0 .15rem; }
.quote-mark { font: 3.6rem/.75 Georgia, serif; color: var(--accent); align-self: start; margin-top: .5rem; }
.quote-text { border: 0; padding: .2rem 0; background: none; color: inherit; text-align: left; font-weight: 650; overflow-wrap: anywhere; }
.quote-text:hover:not(:disabled) { color: var(--accent); }
.quote-text:disabled { opacity: 1; cursor: default; }
.quote-hide { position: relative; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; background: #302740; border: 1px solid #67577e; color: #eadcff; }
.quote-hide span { position: relative; width: 1.05rem; height: .7rem; border: 1.5px solid currentColor; border-radius: 70% 70% 70% 70%; }
.quote-hide span::before { content: ""; position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: .28rem; height: .28rem; border-radius: 50%; background: currentColor; }
.quote-hide::after { content: ""; position: absolute; width: 1.2rem; height: 1.5px; background: currentColor; transform: rotate(-45deg); box-shadow: 0 1px 0 #302740; }
@media (hover: hover) {
  .quote-hide { opacity: 0; }
  .quote-banner:hover .quote-hide, .quote-banner:focus-within .quote-hide { opacity: 1; }
}
.eta-clock:not(:empty)::before { content: " · "; color: var(--muted); }
.eta-clock { color: #e4d8ff; white-space: nowrap; }
.settings-panel { max-width: 32rem; }
.settings-panel .daily { margin-top: .9rem; }
.quotes-admin { margin-top: 1rem; max-width: 57rem; }
.quotes-admin form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.quotes-admin > form { margin-top: 1rem; }
.quote-admin-list { display: grid; gap: .65rem; margin-top: 1rem; }
.quote-admin-list form { border-top: 1px solid var(--border); padding-top: .65rem; }
@media (max-width: 520px) { .quotes-admin form { grid-template-columns: 1fr; } }
.page-heading { margin-bottom: 1.7rem; display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-heading h1 + p { margin-top: .6rem; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.4rem; }
.stats > div { display: grid; gap: .35rem; padding: .9rem 1.1rem; background: #1c1c28; border: 1px solid var(--border); border-radius: .85rem; }
.stats span { color: var(--muted); font-size: .875rem; }
.stats strong { font-size: 1.65rem; }
.game-grid, .split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 1rem; }
.game-card, .panel, .empty { padding: 1.15rem; border: 1px solid var(--border); border-radius: 1rem; background: var(--panel); }
.game-card header { display: flex; align-items: center; gap: .8rem; margin-bottom: .9rem; }
.game-card header h2 { overflow-wrap: anywhere; }
.game-card header .muted { font-size: .875rem; }
.game-icon { width: 2.8rem; height: 2.8rem; border-radius: .8rem; background: #344a45; color: #b3f2cf; }
.hue-1 { background: #45375e; color: #dfceff; }
.hue-2 { background: #49422d; color: #ffe4a5; }
.hue-3 { background: #2d4558; color: #bde3ff; }
.hue-4 { background: #4e3344; color: #ffd3ed; }
.account { display: grid; gap: .6rem; padding: .9rem 0; border-top: 1px solid var(--border); }
.account-top, .meter-title, .account-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .4rem .65rem; }
.account-top strong { overflow-wrap: anywhere; }
.account-top .edit-stamina { margin-inline-start: auto; }
.meter-title, .account-meta { font-size: .875rem; color: var(--muted); }
.stamina-value { color: #fff; }
.overflow { color: var(--accent); }
progress { width: 100%; height: .55rem; display: block; border: 0; border-radius: 1rem; overflow: hidden; background: #373747; accent-color: var(--mint); }
progress::-webkit-progress-bar { background: #373747; }
progress::-webkit-progress-value { background: var(--mint); border-radius: 1rem; }
progress::-moz-progress-bar { background: var(--mint); border-radius: 1rem; }
.daily { display: flex; align-items: center; gap: .55rem; width: fit-content; }
.account .daily { margin-top: .25rem; }
.catalog { width: min(100%, 47rem); display: grid; gap: .55rem; }
.catalog-row { background: var(--panel); border: 1px solid var(--border); border-radius: .8rem; display: flex; align-items: center; gap: .8rem; padding: .75rem; cursor: pointer; }
.catalog-row:has(:checked) { border-color: var(--accent); background: #292338; }
.catalog-row strong, .catalog-row small { display: block; }
.catalog-row small { color: var(--muted); margin-top: .2rem; }
.catalog-row input { margin-inline-start: auto; flex-shrink: 0; }
.actions { display: flex; gap: .65rem; flex-wrap: wrap; align-items: center; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
.panel h2 + p, .panel p + form, .empty h2 + button { margin-top: .75rem; }
.empty { padding: 2rem; text-align: center; }
.suggestion-list { list-style: none; margin: .6rem 0 0; padding: 0; }
.suggestion-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: .65rem 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.pill { border-radius: 2rem; background: #332a46; color: #e6d7ff; font-size: .875rem; padding: .2rem .55rem; }
dialog { width: min(calc(100% - 2rem), 28rem); background: var(--panel); color: inherit; border: 1px solid var(--border); border-radius: 1rem; padding: 1.25rem; }
dialog::backdrop { background: #0b0a13bf; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
#notice { display: none; position: fixed; z-index: 2; bottom: 1rem; right: 1rem; max-width: calc(100% - 2rem); padding: .8rem 1rem; color: #d7fce9; background: #253d35; border: 1px solid #50816c; border-radius: .7rem; }
#notice.visible { display: block; }
#notice.error { color: #ffe1e8; background: #4b2731; border-color: #935461; }
@media (max-width: 950px) {
  .game-grid, .split { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 11rem minmax(0, 1fr); }
}
@media (max-width: 650px) {
  .auth-layout, .shell { grid-template-columns: 1fr; }
  .auth-hero { padding: 1.4rem; gap: 1.6rem; }
  .auth-hero h1 { font-size: 2.8rem; }
  .hero-sample, .auth-hero > .muted { display: none; }
  .sidebar { padding: .8rem; gap: .75rem; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar nav { grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); }
  .sidebar nav button { padding: .55rem .45rem; font-size: .875rem; }
  .identity { padding-inline: .4rem; }
  .identity > span + span { display: flex; align-items: center; gap: .65rem; }
  .stats { gap: .35rem; }
  .stats > div { padding: .55rem; }
  .stats strong { font-size: 1.3rem; }
}
@media (max-width: 385px) { .fields { grid-template-columns: 1fr; } }
