* { box-sizing: border-box; }
:root {
  color-scheme: light; --ink: #192526; --muted: #526363; --edge: #dbe5e1;
  --paper: #fff; --bg: #edf3ef; --accent: #176153; --on-accent: #fff;
  font-family: "Inter", "Microsoft YaHei", system-ui, sans-serif;
}
body { margin: 0; color: var(--ink); background: var(--bg); min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px; padding: 11px 16px;
  color: var(--on-accent); background: var(--accent); font-weight: 700;
  cursor: pointer; text-decoration: none; line-height: 1.35;
}
button:hover, .button:hover { filter: brightness(.93); }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #4383ff; outline-offset: 3px; }
button.secondary, .button.secondary, button.quiet { color: var(--ink); background: var(--paper); border-color: var(--edge); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(28px, 4vw, 45px); letter-spacing: -.04em; line-height: 1.15; overflow-wrap: anywhere; }
h2 { font-size: 17px; }
p { line-height: 1.6; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
.muted { color: var(--muted); font-size: 14px; }
#notice { margin-top: 14px; font-size: 14px; font-weight: 700; color: inherit; }
#notice:empty { display: none; }
.panel { background: var(--paper); border: 1px solid var(--edge); border-radius: 16px; padding: clamp(16px, 3vw, 25px); }
.panel + .panel, form .panel + .panel { margin-top: 14px; }
.panel h2 { margin-bottom: 14px; }
.panel .section-head h2 { margin-bottom: 0; }
.panel p + form, .panel p + .cols { margin-top: 16px; }
.mark { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; color: #17392d; background: #caf471; font-size: 22px; }
.login { max-width: 430px; margin: 12vh auto 0; width: calc(100% - 32px); }
.login h1 { margin: 20px 0 8px; font-size: 32px; }
.login p { color: var(--muted); }
.login form { margin-top: 24px; }
label { display: grid; gap: 7px; margin-bottom: 14px; font-size: 14px; font-weight: 650; min-width: 0; }
input:not([type=radio]), textarea, select {
  border: 1px solid var(--edge); border-radius: 9px; padding: 10px 11px; min-width: 0;
  width: 100%; background: var(--paper); color: var(--ink);
}
textarea { resize: vertical; }
.studio { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
aside { background: #102820; padding: 24px 17px; color: #ecf5ee; display: flex; flex-direction: column; gap: 15px; }
.studio-brand { display: flex; gap: 9px; align-items: center; margin-bottom: 12px; font-weight: 800; }
.studio-brand small { display: block; color: #b3c9bb; font-weight: 500; margin-top: 3px; }
#create { color: #17392d; background: #caf471; }
.side-label { color: #b3c9bb; margin-top: 10px; font-size: 13px; }
aside nav { display: grid; gap: 5px; }
.nav-item { background: transparent; color: #ecf5ee; justify-content: space-between; text-align: left; padding: 9px; font-size: 14px; }
.nav-item span { overflow-wrap: anywhere; }
.nav-item small { white-space: nowrap; color: #bed3c4; }
.nav-item.selected { background: #2c483c; }
.logout { margin-top: auto; }
.workspace { padding: clamp(16px, 4vw, 50px); width: 100%; max-width: 1120px; margin: 0 auto; }
.work-head, .section-head, .share { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.work-head { flex-wrap: wrap; }
.eyebrow { color: var(--accent); font-weight: 800; font-size: 13px; margin-bottom: 7px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--edge); margin: 22px 0 17px; }
.tabs button { border-radius: 0; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); }
.tabs .active { color: var(--accent); border-bottom-color: var(--accent); }
.share { margin-bottom: 14px; flex-wrap: wrap; }
.link-value { margin-top: 4px; overflow-wrap: anywhere; color: var(--muted); font-size: 13px; }
.cols, .skin-grid, .kpis { display: grid; gap: 0 14px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.cols.three, .skin-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.skin-swatch { display: flex; align-items: center; background: var(--bg); color: var(--ink); border: 1px solid var(--edge); border-radius: 10px; padding: 10px; }
.skin-swatch:has(:checked) { outline: 2px solid #4383ff; outline-offset: 2px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.kpis { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.kpis .panel { margin: 0; display: grid; gap: 6px; }
.kpis span { font-size: 13px; color: var(--muted); }
.kpis strong { font-size: 31px; font-variant-numeric: tabular-nums; }
.table-wrap { overflow: auto; margin-top: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--edge); }
th { color: var(--muted); white-space: nowrap; }
.night { --ink: #eff9ec; --muted: #b1c6bc; --edge: #426354; --bg: #10251d; --paper: #19362a; --accent: #c9f470; --on-accent: #15210e; --b-color: #65d9be; }
.paper { --ink: #1f2b33; --muted: #4c616c; --edge: #cbd9dc; --bg: #edf4f3; --paper: #fff; --accent: #176153; --on-accent: #fff; --b-color: #337caa; }
.violet { --ink: #faf0ff; --muted: #d5bfe7; --edge: #674e80; --bg: #211331; --paper: #352144; --accent: #efd0ff; --on-accent: #231231; --b-color: #d599f8; }
.player { background-size: cover; background-position: center; background-attachment: fixed; }
.player.serif { font-family: "Noto Serif SC", "Songti SC", Georgia, serif; }
.player-wrap { width: min(100% - 32px, 810px); margin: auto; padding: 22px 0 44px; }
.player-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 13px; border-radius: 13px; background: var(--paper); border: 1px solid var(--edge); font-size: 14px; font-weight: 800; }
.player-top > div { display: flex; align-items: center; gap: 9px; }
.player-top img { max-width: 110px; max-height: 36px; object-fit: contain; }
.status { border: 1px solid var(--edge); border-radius: 30px; padding: 5px 10px; font-size: 12px; }
.hero { padding: clamp(24px, 6vw, 56px) clamp(14px, 5vw, 44px) 25px; margin-top: 14px; border-radius: 22px; background: var(--paper); border: 1px solid var(--edge); }
.hero h1 { font-size: clamp(34px, 7vw, 68px); }
.hero p { margin-top: 13px; color: var(--muted); white-space: pre-line; }
.clock { display: inline-grid; gap: 2px; margin-top: 20px; }
.clock span { font-size: 13px; color: var(--muted); }
.clock strong { font-size: clamp(25px, 6vw, 39px); font-variant-numeric: tabular-nums; }
.choice-grid { display: grid; gap: 12px; grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 13px; }
.choice { --choice-accent: var(--custom-accent, var(--accent)); display: grid; align-content: start; justify-content: stretch; text-align: left; gap: 8px; width: 100%; min-height: 124px; color: var(--ink); background: var(--paper); border: 2px solid var(--edge); border-radius: 16px; padding: 13px; overflow-wrap: anywhere; }
.choice-B { --choice-accent: var(--b-color); }
.choice[aria-pressed=true] { border-color: var(--choice-accent); box-shadow: inset 0 0 0 1px var(--choice-accent); }
.choice img { width: 100%; height: clamp(80px, 22vw, 180px); object-fit: contain; background: var(--bg); border-radius: 8px; }
.choice-key { font-size: 18px; font-weight: 900; }
.choice strong { font-size: clamp(14px, 3vw, 21px); }
.player-panel { margin-top: 13px; padding: clamp(14px, 4vw, 24px); border: 1px solid var(--edge); border-radius: 15px; background: var(--paper); }
.player-panel p { margin-top: 7px; white-space: pre-line; }
.player-panel button:not(.secondary) { background: var(--custom-accent, var(--accent)); }
.ratio-label { display: flex; justify-content: space-between; margin-top: 12px; }
.ratio-bar { height: 9px; background: var(--b-color); overflow: hidden; border-radius: 12px; margin: 7px 0; }
.ratio-bar span { background: var(--custom-accent, var(--accent)); height: 100%; display: block; }
.scratch { position: relative; overflow: hidden; border-radius: 10px; min-height: 115px; margin: 12px 0; background: var(--bg); display: grid; place-items: center; aspect-ratio: 600/216; }
.scratch canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#prize { padding: 12px; text-align: center; font-weight: 800; font-size: clamp(17px, 5vw, 32px); overflow-wrap: anywhere; max-width: 100%; }
@media (max-width: 760px) {
  .studio { grid-template-columns: 1fr; }
  aside { gap: 10px; padding: 14px 16px; }
  aside nav { display: flex; overflow: auto; }
  aside nav button { flex: none; max-width: 75vw; gap: 10px; }
  .studio-brand { margin: 0; }
  .logout { align-self: start; }
  .kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .cols, .cols.three { grid-template-columns: 1fr; }
  .skin-grid { gap: 7px; }
  .skin-swatch { font-size: 12px; padding: 8px 4px; gap: 1px; }
  .tabs button { padding-inline: 10px; }
}
