:root {
  color-scheme: dark;
  --bg: #070b0c;
  --card: #121a1c;
  --line: rgba(186, 230, 210, 0.14);
  --text: #e8f6f1;
  --muted: #8ea89c;
  --mint: #1af0b5;
  --mint-ink: #04281e;
  --danger: #ff6b7d;
  --warn: #ffb020;
  --sans: "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html.maint-hold body { visibility: hidden; }

.maint-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(640px, calc(100% - 32px));
  margin: 0 auto;
}

.maint-screen h1 {
  margin: 8px 0 12px;
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.maint-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.switch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
}

.switch input {
  width: 22px;
  height: 22px;
  flex: none;
  margin: 0;
  padding: 0;
  accent-color: var(--mint);
}

.maint-state {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

html, body {
  margin: 0;
  background:
    radial-gradient(900px 320px at 80% -10%, rgba(26, 240, 181, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
}

a { color: inherit; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  font-size: 18px;
}

nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 999px;
}

.lang {
  display: inline-flex;
  align-items: center;
  margin-right: 4px;
}

nav a[aria-current="page"] {
  color: var(--mint-ink);
  background: var(--mint);
}

main { flex: 1; padding: 36px 0 64px; }

.hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  max-width: 14ch;
}

.kicker, .meta, .note, .empty, footer p, .lede {
  color: var(--muted);
}

.kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lede { max-width: 62ch; font-size: 18px; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: var(--mint);
  color: var(--mint-ink);
  font-weight: 700;
  border-radius: 12px;
  padding: 12px 16px;
  border: 0;
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 16px;
  margin-top: 36px;
}

.card, .post, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 18px 8px;
}

.card h2, .panel h2, .post h2 { margin: 8px 0 10px; letter-spacing: -0.03em; }

.facts { list-style: none; padding: 0; margin: 0 0 12px; }
.facts li { padding: 8px 0; border-top: 1px solid var(--line); }
.facts b { display: block; font-size: 14px; }

.meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
}

.kind {
  color: var(--mint);
  border: 1px solid rgba(26, 240, 181, 0.35);
  border-radius: 999px;
  padding: 2px 8px;
}

.posts { display: grid; gap: 12px; }

.banner {
  border: 1px solid rgba(255, 176, 32, 0.45);
  color: #ffe1a8;
  background: rgba(255, 176, 32, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

th, td { padding: 12px 8px; border-top: 1px solid var(--line); }

.panel { padding-bottom: 18px; margin-bottom: 12px; }
.panel h2 { margin-top: 0; }

footer {
  border-top: 1px solid var(--line);
  padding: 18px 0 28px;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

footer a { color: var(--mint); }

.form, .login {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
}

.form label, .login label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

input, textarea, select {
  width: 100%;
  background: #0c1214;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}

.lang select {
  width: auto;
  border-radius: 999px;
  padding: 6px 28px 6px 12px;
  font-size: 13px;
  background-color: transparent;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #8ea89c 50%),
    linear-gradient(135deg, #8ea89c 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% - 1px), calc(100% - 9px) calc(50% - 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

textarea { min-height: 140px; resize: vertical; }

.row { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }

.btn.danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(255, 107, 125, 0.45);
}

.editor-item { display: grid; gap: 8px; }
.editor-item .post { margin: 0; }

.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.gate-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 22px 18px;
}

.gate-card h1 {
  margin: 8px 0 8px;
  font-size: 42px;
  letter-spacing: -0.045em;
}

.gate[hidden],
#shell[hidden] {
  display: none !important;
}

nav .btn {
  padding: 8px 12px;
  border-radius: 999px;
}

.desk {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: #070b0c;
}

.side {
  width: 232px;
  flex: none;
  padding: 22px 12px 16px;
  border-right: 1px solid var(--line);
  background: #0b1012;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-brand {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.03em;
  padding: 4px 12px 16px;
}

.side-label {
  margin: 14px 12px 4px;
  color: #66786f;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.side-link {
  appearance: none;
  width: 100%;
  text-align: left;
  background: transparent;
  color: #b7c7bf;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  cursor: pointer;
}

.side-link.is-on {
  background: rgba(26, 240, 181, 0.12);
  color: var(--mint);
}

.side-logout { margin-top: auto; color: var(--muted); }

.desk-main {
  flex: 1;
  min-width: 0;
  padding: 28px 32px 48px;
}

.desk-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.desk-head h1 {
  margin: 0 0 6px;
  font-size: 34px;
  letter-spacing: -0.04em;
}

.desk-head .lede { margin: 0; font-size: 14px; max-width: 62ch; }

.scope {
  margin: 0;
  color: #ffb020;
  border: 1px solid rgba(255, 176, 32, 0.45);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.scope:empty { display: none; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.stat {
  background: #101618;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px 12px;
}

.stat.hot { border-color: rgba(26, 240, 181, 0.55); }

.stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat b {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.stat small, .stat-text {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.sheet {
  background: #101618;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 16px 8px;
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.sheet-head h2 { margin: 0; font-size: 18px; }

.filters { display: flex; gap: 8px; flex: 1; justify-content: flex-end; }

.filters input, .filters select {
  width: auto;
  min-width: 180px;
  background: #0c1214;
}

.filters select { min-width: 140px; }

.status { min-height: 1.4em; color: var(--mint); }

@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .top { align-items: flex-start; flex-direction: column; }
  table { display: block; overflow-x: auto; }
  .desk { flex-direction: column; }
  .side { width: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-logout { margin-top: 8px; }
  .desk-main { padding: 20px 16px 40px; }
  .stats { grid-template-columns: 1fr; }
  .desk-head, .sheet-head, .filters, .offer-bar, .dialog-head, .form-foot { flex-direction: column; align-items: stretch; }
  .filters input, .filters select, .filters .btn { width: 100%; }
  .split, .gear-row, .maint-grid { grid-template-columns: 1fr; }
}

.offer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.seg {
  display: inline-flex;
  background: #161e21;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.seg-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
}

.seg-btn.is-on {
  background: #0c1214;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}

.count {
  background: var(--mint);
  color: var(--mint-ink);
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
}

.task-pill {
  color: var(--mint);
  border: 1px solid rgba(26, 240, 181, 0.45);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.btn.slim { padding: 8px 12px; font-size: 13px; border-radius: 10px; }

.btn.danger-fill {
  background: #e11d48;
  color: #fff;
}

.btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.hint, .proof, .when, .reason {
  color: var(--muted);
  font-size: 12px;
}

.sheet-head .hint { margin: 4px 0 0; }

.reason { color: var(--danger); margin: 4px 0 0; max-width: 180px; }

.proof { margin: 0; }

.linkish {
  border: 0;
  background: transparent;
  color: var(--mint);
  padding: 0;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.offer-table { min-width: 760px; }

.offer-table th:last-child,
.offer-table td:last-child { text-align: right; }

.offer-table td.empty { text-align: center; }

.offer-table td:last-child .row { justify-content: flex-end; }

.sheet { overflow-x: auto; }

td b { display: block; }

td .hint { display: block; max-width: 280px; }

.strong { font-weight: 650; }

.clip { max-width: 240px; }

.reward {
  color: var(--mint);
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}

.chip {
  display: inline-flex;
  color: #7ad7ff;
  border: 1px solid rgba(122, 215, 255, 0.45);
  border-radius: 999px;
  padding: 2px 8px;
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  border: 1px solid var(--line);
}

.pill.pending { color: var(--warn); border-color: rgba(255, 176, 32, 0.55); }
.pill.approved { color: var(--mint); background: rgba(26, 240, 181, 0.12); border-color: rgba(26, 240, 181, 0.4); }
.pill.rejected { color: var(--danger); border-color: rgba(255, 107, 125, 0.5); }

.row.tight { gap: 6px; }

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 0;
  background: var(--mint);
  color: var(--mint-ink);
  font-weight: 800;
  cursor: pointer;
}

.icon-btn.no {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(255, 107, 125, 0.45);
}

.icon-btn.quiet {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.switch {
  position: relative;
  display: inline-flex;
  width: 42px;
  height: 24px;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
}

.switch span {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #24302c;
  display: block;
  position: relative;
}

.switch span::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c9d5cf;
  top: 3px;
  left: 3px;
}

.switch input:checked + span { background: var(--mint); }

.switch input:checked + span::after {
  transform: translateX(18px);
  background: #04281e;
}

dialog {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  margin: auto;
  overflow: auto;
  background: #12191c;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 18px 14px;
  scrollbar-color: #3d5c52 transparent;
}

dialog::backdrop { background: rgba(0, 0, 0, 0.66); }

dialog h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.03em; }

dialog textarea { min-height: 72px; }

.dialog-head, .form-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.form-foot { justify-content: flex-end; margin-top: 4px; }

dialog .form { margin: 0; }

.icon-btn:focus-visible,
.btn:focus-visible,
.seg-btn:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.reward-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.box-title { margin: 0; font-size: 13px; font-weight: 700; }

.gear-list { display: grid; gap: 8px; }

.gear-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) 72px 34px;
  gap: 8px;
  align-items: end;
}

.gear-row .icon-btn { margin-bottom: 1px; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.split.end { align-items: end; }

.form label.checkline {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--text);
  padding-bottom: 8px;
}

#shot-img,
#report-shot-img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0c1214;
}

.report-body { white-space: pre-wrap; }
