:root {
  color-scheme: dark;
  --bg: #080a08;
  --card: #101410;
  --line: rgba(210, 232, 214, 0.16);
  --text: #d7e4d8;
  --heading: #f3faf3;
  --dim: #8ea396;
  --faint: #66756c;
  --accent: #c8f5d4;
  --danger: #ffb4a8;
  --mono: Consolas, "Cascadia Mono", "Segoe UI Mono", ui-monospace, monospace;
  --sans: "Segoe UI", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html {
  scrollbar-width: thin;
  scrollbar-color: #2a3830 #080a08;
}

html::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html::-webkit-scrollbar-track { background: #080a08; }

html::-webkit-scrollbar-thumb {
  background: #2a3830;
  border: 2px solid #080a08;
}

html::-webkit-scrollbar-thumb:hover { background: #c8f5d4; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
}

body {
  min-height: 100vh;
  background-image: radial-gradient(520px 280px at 50% 0%, rgba(200, 245, 212, 0.07), transparent 70%);
}

::selection {
  background: var(--accent);
  color: #081208;
}

button, input, a { font: inherit; color: inherit; }

.kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.mono { font-family: var(--mono); }

.mark {
  display: block;
  width: 54px;
  height: 54px;
}

.mark circle {
  fill: none;
  stroke: rgba(200, 245, 212, 0.45);
  stroke-width: 1.25;
}

.auth, .entry {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
}

.card, .entry-card {
  width: min(380px, 100%);
}

.card {
  padding: 26px 24px 20px;
  border: 1px solid var(--line);
  background: rgba(16, 20, 16, 0.92);
}

.card h1, .entry-card h1 {
  margin: 0;
  color: var(--heading);
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.card h1 { font-size: 32px; }

.entry-card h1 { margin-top: 0; }

.of { color: var(--faint); }

.entry-status {
  min-height: 1.3em;
  margin: 16px 0 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 13px;
}

.entry-count {
  margin: 14px 0 0;
  color: var(--heading);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
}

.meter {
  height: 2px;
  margin-top: 12px;
  background: rgba(210, 232, 214, 0.16);
}

.meter span {
  display: block;
  height: 2px;
  width: 0;
  background: var(--accent);
}

form { margin-top: 18px; }

.field { margin-top: 12px; }

.field-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.field label {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  margin-top: 6px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: #0c0f0c;
  color: var(--heading);
  font-family: var(--mono);
  font-size: 14px;
  caret-color: var(--accent);
  outline: none;
}

.field input:focus { border-color: var(--accent); }

.captcha {
  display: block;
  width: 100%;
  height: 64px;
  margin-top: 6px;
  border: 1px solid var(--line);
  background: #101410;
  object-fit: cover;
}

input:-webkit-autofill {
  -webkit-text-fill-color: var(--heading);
  box-shadow: 0 0 0 1000px #0c0f0c inset;
}

.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.text-button:hover { color: var(--accent); }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 40px;
  margin-top: 16px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--accent);
  color: #081208;
}

.button:disabled { opacity: 0.55; cursor: wait; }

.button-inline {
  width: auto;
  margin-top: 18px;
  padding: 0 18px;
}

.form-error {
  margin: 12px 0 0;
  color: var(--danger);
  font-family: var(--mono);
  font-size: 12px;
}

.fine {
  margin: 12px 0 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 52px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--heading);
  font-family: var(--mono);
  letter-spacing: 0.16em;
  text-decoration: none;
}

.brand svg,
.ghost svg,
.button svg,
.ops svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  margin-left: auto;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: rgba(8, 10, 8, 0.55);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.ghost:hover { border-color: var(--accent); color: var(--accent); }

.bar .text-button { margin-left: auto; }

.sheet {
  width: min(640px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.sheet h1 {
  margin: 0 0 8px;
  color: var(--heading);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.lede {
  margin: 0;
  max-width: 58ch;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.55;
}

.sheet h2 {
  margin: 0 0 4px;
  color: var(--heading);
  font-size: 15px;
  font-weight: 500;
}

.sheet p {
  margin: 0;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.5;
}

.key-panel {
  margin-top: 18px;
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  background: rgba(16, 20, 16, 0.72);
}

.block { margin-top: 22px; }

.block p + p { margin-top: 8px; }

.key-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.key-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.key-actions .button { margin-top: 0; }

.button-solid {
  background: var(--accent);
  color: #081208;
}

.button-solid:hover {
  background: transparent;
  color: var(--accent);
}

.key-help {
  margin-top: 8px;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.45;
}

.key-head h2 {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.key-value {
  margin: 8px 0 0;
  color: var(--heading);
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
}

.link-state {
  margin-top: 8px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
}

.steps {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.step span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
}

.command-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: #0c0f0c;
}

.command-row code {
  color: var(--heading);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.facts { margin-top: 8px; }

.facts h2 {
  margin: 14px 0 10px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.facts dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  margin: 0;
}

.facts dt {
  color: var(--heading);
  font-size: 13px;
}

.facts dd {
  margin: 2px 0 0;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.4;
}

.noscript {
  margin: 0;
  padding: 12px 18px;
  color: var(--danger);
  font-family: var(--mono);
  font-size: 12px;
}

@media (max-width: 640px) {
  .facts dl, .command-row { grid-template-columns: 1fr; }
  .command-row { flex-direction: column; }
  .bar { padding: 0 14px; }
}

body.desk {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #080a08 radial-gradient(520px 280px at 50% 0%, rgba(200, 245, 212, 0.07), transparent 70%);
}

.desk .bar,
.desk .sheet,
.desk .tutorial { position: relative; z-index: 1; }

.desk .sheet {
  width: min(1040px, calc(100% - 48px));
  margin: 48px auto 64px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.mast-head { grid-column: 1 / -1; }

.mast { min-width: 0; }

.desk h1 {
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: lowercase;
}

.one {
  max-width: 36ch;
  margin-top: 10px;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.45;
}

.desk .link-state { margin: 8px 0 0; }

.download { margin-top: 12px; }

.ops { margin-top: 26px; }

.desk .ops {
  width: auto;
  margin: 0;
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  background: #101410;
}

.desk .ops ul {
  gap: 10px 18px;
}

.ops h2 {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ops ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ops li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 12px;
}

.ops svg { color: var(--accent); }

.tutorial {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 16px 18px 8px;
  border: 1px solid var(--line);
  background: #101410;
}

.tutorial h2 {
  margin: 0 0 4px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.tutorial ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tutorial li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 8px 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.tutorial li:first-child { border-top: 0; }

.tutorial li.has-shot {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
}

.tutorial li > span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.tutorial h3 {
  margin: 0;
  color: var(--heading);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.tutorial p {
  max-width: 62ch;
  margin: 6px 0 0;
  color: var(--dim);
  font-size: 14px;
  line-height: 1.45;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: #050605;
}

.shot {
  display: block;
  width: 100%;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.shot-key {
  width: 320px;
  max-width: 100%;
  margin: 0;
}

.spoiler {
  width: 460px;
  max-width: 100%;
}

.spoiler .shot { margin: 0; }

.spoiler-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1024 / 385;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  background: #101410;
  color: var(--accent);
  cursor: pointer;
}

.spoiler-cover:hover { border-color: var(--accent); }

.spoiler-cover .spoiler-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
}

.spoiler-badge svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.spoiler-cover span {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.spoiler-cover small {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.viewer[hidden],
.shot[hidden],
.spoiler-cover[hidden] { display: none; }

.viewer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(8, 10, 8, 0.94);
  cursor: pointer;
}

.viewer img {
  position: relative;
  z-index: 1;
  max-width: calc(100vw - 72px);
  max-height: calc(100vh - 72px);
  width: auto;
  height: auto;
  border: 1px solid var(--line);
  background: #080a08;
}

.viewer-x {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: #101410;
  color: var(--heading);
  cursor: pointer;
}

.viewer-x svg {
  width: 16px;
  height: 16px;
}

.viewer-x svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

@media (max-width: 980px) {
  .desk .sheet {
    grid-template-columns: minmax(0, 520px);
    justify-content: center;
    margin: 28px auto 40px;
  }

  .tutorial li.has-shot { grid-template-columns: 36px minmax(0, 1fr); }

  .shot-key,
  .spoiler { grid-column: 2; width: 100%; }

  .ops ul { grid-template-columns: 1fr; }
}

