:root {
  color-scheme: light;
  --ink: #202233;
  --muted: #707386;
  --line: #e6e4ef;
  --paper: #ffffff;
  --background: #f5f3f8;
  --primary: #7051a6;
  --primary-dark: #573c88;
  --accent: #d35d8d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at top right, #eadcf2 0, transparent 32rem), var(--background); }
button, input, textarea { font: inherit; }
button { border: 0; border-radius: 10px; padding: .72rem 1rem; color: white; background: var(--primary); cursor: pointer; font-weight: 650; }
button:hover { background: var(--primary-dark); }
button:disabled { cursor: wait; opacity: .6; }
button.secondary { color: var(--primary); background: #eee8f7; }
button.ghost { color: var(--muted); background: transparent; border: 1px solid var(--line); }
input, textarea { width: 100%; color: var(--ink); background: #fbfaff; border: 1px solid var(--line); border-radius: 10px; padding: .78rem .9rem; }
input:focus, textarea:focus { outline: 2px solid #c9b4e9; border-color: var(--primary); }
label { display: block; margin: .45rem 0; font-size: .88rem; font-weight: 650; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.55rem, 4vw, 2.3rem); }
h2 { margin-bottom: 0; }
.shell { width: min(1040px, calc(100% - 2rem)); margin: 0 auto; padding: 2.5rem 0 5rem; }
header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.6rem; }
.eyebrow { margin-bottom: .28rem; color: var(--accent); font-size: .72rem; letter-spacing: .16em; font-weight: 800; }
.card { background: color-mix(in srgb, var(--paper) 94%, transparent); border: 1px solid rgba(255,255,255,.8); border-radius: 18px; padding: clamp(1.1rem, 3vw, 2rem); box-shadow: 0 18px 55px rgba(74, 56, 96, .08); }
.unlock { max-width: 680px; margin: 5rem auto; }
.unlock p, .hint { color: var(--muted); }
.row { display: flex; gap: .7rem; align-items: stretch; }
.row input { flex: 1; }
.tabs { display: flex; gap: .45rem; margin-bottom: .8rem; }
.tab { color: var(--muted); background: transparent; }
.tab.active { color: var(--primary); background: white; box-shadow: 0 8px 26px rgba(74,56,96,.08); }
.panel { display: none; }
.panel.active { display: block; }
.section-title { display: flex; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; }
.actions { display: flex; gap: .55rem; }
.editor { min-height: 26rem; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; line-height: 1.55; }
.test-box { margin-top: 1.3rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.answer { min-height: 4.5rem; margin-bottom: 0; padding: 1rem; white-space: pre-wrap; color: #433750; background: #f2edf7; border-radius: 10px; }
.upload-form { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: .8rem; align-items: end; padding: 1rem; margin-bottom: 1.7rem; background: #f8f6fb; border-radius: 12px; }
.slots { display: grid; gap: .7rem; }
.slot { padding: 1rem; background: #f8f6fb; border: 1px solid var(--line); border-radius: 12px; }
.slot strong, .slot span { display: block; overflow-wrap: anywhere; }
.slot span { margin-top: .3rem; color: var(--muted); font-size: .85rem; }
.notice { position: fixed; right: 1rem; bottom: 1rem; max-width: min(28rem, calc(100% - 2rem)); padding: .85rem 1rem; color: white; background: #2e2940; border-radius: 10px; box-shadow: 0 12px 35px rgba(0,0,0,.2); }
.notice.error { background: #a3314c; }
.hidden { display: none !important; }

@media (max-width: 720px) {
  .row, .section-title { align-items: stretch; flex-direction: column; }
  .upload-form { grid-template-columns: 1fr; }
  .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .editor { min-height: 20rem; }
}

