:root {
  color-scheme: light;
  --background: #f5f5f3;
  --surface: #ffffff;
  --text: #111111;
  --muted: #686868;
  --line: #ddddda;
  --soft: #eeeeeb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--background); }
a { color: inherit; }
.shell { width: min(1160px, calc(100% - 48px)); margin: auto; padding-bottom: 96px; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { color: var(--text); font-size: 21px; font-weight: 900; letter-spacing: -.055em; text-decoration: none; }
.brand span { margin-left: 4px; font-weight: 500; }
.ghost { padding: 8px 0; color: var(--muted); background: none; border: 0; border-bottom: 1px solid transparent; cursor: pointer; }
.ghost:hover { color: var(--text); border-color: var(--text); }

.hero { padding: 72px 0 64px; }
.hero h1 { margin: 12px 0 22px; max-width: 760px; font-size: clamp(48px, 7vw, 82px); font-weight: 780; line-height: .98; letter-spacing: -.065em; }
.hero em { color: var(--muted); font-style: normal; font-weight: 450; }
.hero > p:last-child, .muted, .section-head > p, .tab-intro > p { color: var(--muted); }
.eyebrow { margin: 0; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .16em; }

.game-tabs { display: grid; grid-template-columns: repeat(2, 1fr); margin-bottom: 54px; background: var(--surface); border: 1px solid var(--line); }
.game-tabs a { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 20px; color: var(--muted); border-right: 1px solid var(--line); text-decoration: none; font-size: 13px; font-weight: 750; letter-spacing: .025em; }
.game-tabs a:last-child { border-right: 0; }
.game-tabs a span { color: #919191; font-size: 9px; font-weight: 650; letter-spacing: .12em; }
.game-tabs a.active { color: #ffffff; background: #111111; }
.game-tabs a.active span { color: #cfcfcf; }

.tab-intro, .section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.tab-intro { margin-bottom: 20px; }
.tab-intro h2, .section-head h2 { margin: 6px 0 0; font-size: 27px; font-weight: 720; letter-spacing: -.035em; }
.tab-intro > p, .section-head > p { margin: 0; font-size: 12px; }
.section-head { margin-top: 66px; }

.cards, .settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 0; }
.tab-overlay-card { grid-template-columns: 1fr; margin-top: 20px; }
.settings-card, .game-card, .auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 3px; }
.settings-card { padding: 26px; }
.settings-card h2, .game-card h2 { margin: 7px 0 10px; font-size: 25px; font-weight: 720; letter-spacing: -.035em; }
.settings-card form { display: grid; gap: 14px; margin-top: 24px; }
.settings-card form + form { margin-top: 10px; }
.settings-card code { padding: 1px 4px; color: var(--text); background: var(--soft); }
.bot-state { display: inline-block; margin-top: 18px; color: var(--muted); font-size: 11px; }

.game-card { position: relative; display: grid; gap: 24px; padding: 28px; }
.status { position: absolute; top: 28px; right: 28px; color: var(--text); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.status::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; background: var(--text); border-radius: 50%; vertical-align: 1px; }
label { display: grid; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 600; }
input, select { width: 100%; min-height: 43px; padding: 11px 12px; color: var(--text); background: var(--surface); border: 1px solid #c9c9c5; border-radius: 2px; font: inherit; outline: none; }
input:focus, select:focus { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.riot-id-fields { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }

.button, button[type="submit"] { min-height: 41px; padding: 11px 16px; color: #ffffff; background: #111111; border: 1px solid #111111; border-radius: 2px; font: inherit; font-weight: 720; text-align: center; text-decoration: none; cursor: pointer; }
.button:hover, button[type="submit"]:hover { color: #111111; background: #ffffff; }
.button.secondary { color: var(--text); background: var(--surface); border-color: #bdbdb8; }
.button.secondary:hover { border-color: var(--text); }
.overlay-actions { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 12px; }
.overlay-actions > a { white-space: nowrap; }
.overlay-actions form { display: flex; align-items: end; justify-content: flex-end; gap: 10px; margin: 0; }
.overlay-actions form label { min-width: 220px; }
.overlay-actions form button { white-space: nowrap; }

.overlay-editor { display: grid; grid-template-columns: minmax(0, 1fr) 280px; border: 1px solid var(--line); }
.preview-panel { min-width: 0; padding: 16px; background: #eeeeeb; border-right: 1px solid var(--line); }
.preview-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.preview-toolbar label { width: min(240px, 60%); }
.preview-toolbar select { min-height: 36px; padding: 7px 10px; background: #ffffff; }
.text-link { padding-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 650; text-decoration: none; }
.text-link:hover { color: var(--text); }
.preview-viewport { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: #252525; border: 1px solid #ccccca; }
.preview-viewport iframe { position: absolute; inset: 0; width: 1920px; height: 1080px; border: 0; transform: scale(.4); transform-origin: top left; pointer-events: none; }
.appearance-panel { padding: 22px; background: var(--surface); }
.appearance-panel h3 { margin: 6px 0 0; font-size: 21px; letter-spacing: -.03em; }
.appearance-panel form { display: grid; gap: 16px; margin-top: 24px; }
.color-control { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.color-control input[type="color"] { width: 58px; min-height: 43px; padding: 4px; cursor: pointer; }
.color-control output { padding-bottom: 13px; color: var(--muted); font: 600 11px ui-monospace, SFMono-Regular, Consolas, monospace; }

.error, .success { margin: 0 0 26px; padding: 13px 15px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--text); font-size: 13px; }
.legal { max-width: 820px; margin: 50px auto 0; color: #888888; font-size: 10px; line-height: 1.65; text-align: center; }

.auth-card { width: min(430px, 100%); margin: 11vh auto; padding: 34px; }
.auth-card .brand { display: inline-block; margin-bottom: 64px; }
.auth-card h1 { margin: 9px 0 0; font-size: 40px; line-height: 1; letter-spacing: -.055em; }
.auth-card form { display: grid; gap: 18px; margin: 32px 0 24px; }
.auth-card .muted { font-size: 13px; }
.auth-card .muted a { color: var(--text); font-weight: 650; }

@media (max-width: 720px) {
  .shell { width: min(100% - 24px, 1160px); }
  .hero { padding: 52px 0 46px; }
  .cards, .settings-grid, .game-tabs { grid-template-columns: 1fr; }
  .game-tabs a { border-right: 0; border-bottom: 1px solid var(--line); }
  .game-tabs a:last-child { border-bottom: 0; }
  .tab-intro, .section-head { align-items: start; flex-direction: column; }
  .riot-id-fields, .overlay-actions { grid-template-columns: 1fr; }
  .overlay-editor { grid-template-columns: 1fr; }
  .preview-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .overlay-actions form { align-items: stretch; flex-direction: column; }
  .overlay-actions form label { min-width: 0; }
  .auth-card { margin: 4vh auto; padding: 26px; }
}
