:root {
  color-scheme: dark;
  --bg: #080c0f;
  --panel: rgba(18, 25, 29, .88);
  --panel-2: #151d21;
  --line: rgba(255, 255, 255, .09);
  --text: #f4f6f3;
  --muted: #929d99;
  --lime: #d8ff48;
  --lime-ink: #0e150c;
  --orange: #ff7648;
  --blue: #7bc5ff;
  --radius: 24px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(216, 255, 72, .09), transparent 34rem),
    radial-gradient(circle at 100% 35%, rgba(55, 117, 137, .14), transparent 28rem),
    var(--bg);
  color: var(--text);
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, label:focus-within { outline: 2px solid var(--lime); outline-offset: 3px; }
.hidden { display: none !important; }
.grain {
  position: fixed; inset: 0; opacity: .045; pointer-events: none; z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.shell { width: min(760px, 100%); margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 16px max(64px, env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.brand { color: inherit; display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--lime); color: var(--lime-ink); font-weight: 900; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .02em; }
.brand small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.icon-button { border: 1px solid var(--line); background: rgba(255,255,255,.035); border-radius: 50%; width: 42px; height: 42px; font-size: 22px; cursor: pointer; }
.panel { background: linear-gradient(145deg, rgba(24, 32, 36, .96), rgba(14, 20, 23, .96)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.login-card { margin: 14vh auto 0; max-width: 480px; padding: 34px; }
.login-card h1 { margin: 10px 0; font-size: clamp(28px, 8vw, 42px); letter-spacing: -.04em; }
.login-card p { color: var(--muted); line-height: 1.65; }
.login-card form { display: grid; gap: 12px; margin-top: 28px; }
.pin-input, .schedule-picker input { width: 100%; border: 1px solid var(--line); background: #0b1114; color: var(--text); border-radius: 15px; padding: 16px; }
.pin-input { text-align: center; font-size: 24px; letter-spacing: .28em; }
.eyebrow { color: var(--lime); font: 700 10px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .18em; }
.hero { padding: clamp(22px, 5vw, 40px); overflow: hidden; position: relative; }
.hero::before { content: ""; position: absolute; width: 210px; height: 210px; border: 1px solid rgba(216,255,72,.1); border-radius: 50%; top: -130px; right: -50px; box-shadow: 0 0 0 34px rgba(216,255,72,.025), 0 0 0 68px rgba(216,255,72,.015); }
.hero-copy { position: relative; z-index: 1; }
.hero h1 { margin: 12px 0; font-size: clamp(35px, 9vw, 62px); line-height: 1.04; letter-spacing: -.055em; }
.hero h1 em { color: var(--lime); font-style: normal; }
.hero-copy > p { margin: 0 0 28px; color: var(--muted); line-height: 1.6; }
.drop-zone { display: grid; place-items: center; text-align: center; min-height: 210px; padding: 28px; border: 1.5px dashed rgba(216,255,72,.35); border-radius: 21px; background: rgba(216,255,72,.035); cursor: pointer; transition: .2s ease; }
.drop-zone:hover, .drop-zone.dragging { background: rgba(216,255,72,.075); border-color: var(--lime); transform: translateY(-1px); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-glyph { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--lime); color: var(--lime-ink); font-size: 34px; margin-bottom: 14px; }
.drop-zone strong { font-size: 18px; }
.drop-zone small { color: var(--muted); margin-top: 7px; }
.selected-file { display: grid; grid-template-columns: 48px 1fr 34px; align-items: center; gap: 12px; background: var(--panel-2); border: 1px solid var(--line); padding: 13px; border-radius: 16px; }
.file-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: rgba(216,255,72,.1); color: var(--lime); }
.selected-file strong, .selected-file small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file small { color: var(--muted); margin-top: 4px; }
.selected-file button { border: 0; background: transparent; color: var(--muted); font-size: 25px; cursor: pointer; }
.options { margin-top: 30px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin: 0 0 14px; }
.section-heading > div { display: flex; align-items: center; gap: 10px; }
.section-heading button { border: 0; background: none; color: var(--lime); font-size: 12px; cursor: pointer; }
.step { color: var(--muted); font: 700 10px ui-monospace, Consolas, monospace; }
.platform-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.platform-chip { position: relative; }
.platform-chip input { position: absolute; opacity: 0; }
.platform-chip span { display: grid; place-items: center; min-height: 44px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 12px; text-align: center; cursor: pointer; transition: .15s; }
.platform-chip input:checked + span { border-color: rgba(216,255,72,.58); background: rgba(216,255,72,.09); color: var(--text); }
.platform-chip input:checked + span::after { content: "·"; color: var(--lime); position: absolute; right: 7px; top: 2px; font-size: 24px; }
.schedule-heading { margin-top: 28px; }
.schedule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-card { position: relative; display: block; border: 1px solid var(--line); border-radius: 15px; padding: 14px; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card strong, .radio-card small { display: block; }
.radio-card small { color: var(--muted); margin-top: 5px; font-size: 11px; line-height: 1.45; }
.radio-card.active { border-color: var(--lime); background: rgba(216,255,72,.06); }
.schedule-picker { margin-top: 10px; }
.schedule-picker label { display: block; color: var(--muted); font-size: 11px; margin: 0 0 7px 4px; }
.primary { border: 0; border-radius: 15px; min-height: 54px; padding: 0 20px; background: var(--lime); color: var(--lime-ink); font-weight: 800; cursor: pointer; }
.primary:disabled { opacity: .35; cursor: not-allowed; }
.upload-button { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 26px; font-size: 16px; }
.upload-button b { font-size: 25px; }
.progress-card { margin-top: 18px; padding: 17px; background: #0b1114; border-radius: 15px; border: 1px solid var(--line); }
.progress-copy { display: flex; justify-content: space-between; }
.progress-copy span { color: var(--lime); font-variant-numeric: tabular-nums; }
.progress-track { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin: 12px 0 9px; }
.progress-track div { height: 100%; width: 0; background: var(--lime); border-radius: 99px; transition: width .15s; }
.progress-card small { color: var(--muted); }
.error { color: #ff8e74 !important; min-height: 1.4em; font-size: 13px; }
.jobs-section { margin-top: 38px; }
.jobs-title { display: flex; align-items: end; justify-content: space-between; padding: 0 6px; margin-bottom: 14px; }
.jobs-title h2 { margin: 6px 0 0; font-size: 29px; letter-spacing: -.04em; }
.count-badge { display: grid; place-items: center; width: 36px; height: 36px; background: var(--lime); color: var(--lime-ink); border-radius: 50%; font-weight: 900; }
.empty-state { padding: 30px; text-align: center; color: var(--muted); }
.empty-state strong { color: var(--text); }
.empty-state p { line-height: 1.6; margin-bottom: 0; }
.jobs-list { display: grid; gap: 12px; }
.job-card { padding: 19px; background: rgba(18,25,29,.84); border: 1px solid var(--line); border-radius: 18px; }
.job-card-top { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 12px; }
.job-card h3 { font-size: 16px; margin: 0; overflow-wrap: anywhere; }
.job-card time { color: var(--muted); font-size: 11px; display: block; margin-top: 5px; }
.status-pill { white-space: nowrap; border-radius: 99px; padding: 6px 9px; background: rgba(123,197,255,.1); color: var(--blue); font-size: 10px; font-weight: 700; }
.status-pill.published { background: rgba(216,255,72,.1); color: var(--lime); }
.status-pill.failed, .status-pill.needs_user_action { background: rgba(255,118,72,.12); color: var(--orange); }
.job-content { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.job-title { font-weight: 700; margin: 0 0 7px; }
.topics { display: flex; flex-wrap: wrap; gap: 6px; }
.topic { color: var(--lime); background: rgba(216,255,72,.07); border-radius: 7px; padding: 4px 7px; font-size: 11px; }
.platform-results { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.result-chip { border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; color: var(--muted); font-size: 10px; }
.result-chip.published { color: var(--lime); border-color: rgba(216,255,72,.25); }
.result-chip.failed, .result-chip.needs_user_action { color: var(--orange); border-color: rgba(255,118,72,.25); }
.toast { position: fixed; z-index: 30; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translate(-50%, 120px); opacity: 0; background: var(--text); color: #111; padding: 12px 16px; border-radius: 12px; font-weight: 700; transition: .25s; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 560px) {
  .shell { padding-left: 12px; padding-right: 12px; }
  .hero { padding: 22px 17px; }
  .platform-grid { grid-template-columns: repeat(3, 1fr); }
  .schedule-grid { grid-template-columns: 1fr; }
  .drop-zone { min-height: 185px; }
  .login-card { padding: 27px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
