/* zamo — terminal aesthetic, plain css */

:root,
[data-theme="dark"] {
  --bg: #0a0a0c;
  --bg2: #101014;
  --panel: #0e0e12;
  --line: #20202a;
  --fg: #d8d2c4;
  --dim: #7a7568;
  --faint: #45423b;
  --accent: #d9a05b;
  --hot: #e05561;
  --cool: #7aa2f7;
  --sel: #1a1a22;
}

[data-theme="paper"] {
  --bg: #f2efe7;
  --bg2: #e9e5da;
  --panel: #faf7ef;
  --line: #d8d2c2;
  --fg: #2b2823;
  --dim: #7c766a;
  --faint: #b3ac9c;
  --accent: #9a6a2f;
  --hot: #c2403f;
  --cool: #3d5af1;
  --sel: #e4dfd2;
}

[data-theme="phosphor"] {
  --bg: #040804;
  --bg2: #081008;
  --panel: #060c06;
  --line: #12301a;
  --fg: #8dffab;
  --dim: #3f8f57;
  --faint: #1d4d2c;
  --accent: #c7ff5e;
  --hot: #ff5e7a;
  --cool: #5ee7ff;
  --sel: #0a180c;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { height: 100%; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

body.site {
  height: 100vh;
  overflow: hidden;
}

body.landing {
  height: 100vh;
  overflow: hidden;
}

.landing .cmdline { bottom: 0; }

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.35) 100%);
  z-index: 50;
}

[data-theme="paper"] body::after { background: radial-gradient(ellipse at 50% 40%, transparent 60%, rgba(80, 70, 40, 0.08) 100%); }

::selection { background: var(--accent); color: var(--bg); }

a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--accent); }

.dim { color: var(--dim); }
.faint { color: var(--faint); }
.hot { color: var(--hot); }
.accent { color: var(--accent); }
.cool { color: var(--cool); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── top bar ─────────────────────────────────────────── */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px;
  font-size: 12px;
}

.brand { display: inline-flex; align-items: center; gap: 9px; letter-spacing: 0.06em; }

.mark {
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  border: 1px solid var(--line);
  color: var(--accent);
  font-weight: 700;
  font-size: 10px;
}

.elsewhere a { color: var(--dim); }
.elsewhere a:hover { color: var(--accent); }

/* ── landing ─────────────────────────────────────────── */

.stage {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
}

.wall {
  width: min(700px, 94vw);
  flex: 1;
  min-height: 0;
  margin-top: 6px;
}

.kb {
  width: min(620px, 94vw);
  height: 210px;
  flex: none;
}

.note {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateX(-220px);
  color: var(--faint);
  font-size: 12px;
}

.hero-actions {
  position: absolute;
  right: 36px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.theme-key {
  background: none;
  border: none;
  color: var(--dim);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
}
.theme-key:hover { color: var(--accent); }
.cmd-glyph { color: var(--hot); }

.enter {
  font-size: 17px;
  padding: 8px 26px;
  border: 1px solid var(--line);
  background: var(--sel);
}
.enter:hover { border-color: var(--accent); color: var(--accent); }

/* ── deck layout ─────────────────────────────────────── */

.deck {
  flex: 1;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 200px;
  gap: 26px;
  padding: 6px 26px 16px;
  min-height: 0;
}

/* wheel — circular drum */

.wheel-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

.tabline {
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font: inherit;
  font-size: 11px;
  text-align: left;
  padding: 4px 2px 6px;
  cursor: default;
  display: flex;
  gap: 8px;
}
.tabline .tab-dir { color: var(--faint); }
.tabline .tab-file { color: var(--dim); }

.wheel {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
.wheel.dragging { cursor: grabbing; }

.ink {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.wheel-items { position: absolute; inset: 0; }

.card {
  position: absolute;
  left: 0;
  top: 0;
  width: 150px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--fg);
  font: inherit;
  cursor: pointer;
  padding: 14px 10px 10px;
  text-align: center;
  will-change: transform;
  transition: border-color 0.25s ease;
}

.card .glyph {
  display: block;
  font-size: 26px;
  line-height: 1.2;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  min-height: 34px;
}

.card .title {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  color: var(--fg);
  overflow-wrap: break-word;
  word-break: normal;
}

.card.active { border-color: var(--accent); }

.wheel-mark {
  position: absolute;
  color: var(--accent);
  font-size: 11px;
  pointer-events: none;
}

.wheel-hint, .wheel-date {
  font-size: 11px;
  padding: 6px 0 0 4px;
}

.wheel-date { padding-top: 0; }

/* terminal */

.term {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  padding: 26px 30px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-size: 14px;
}

.term .p-row {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin: 6px 0 4px;
}

.term .portrait-mount {
  flex: none;
  width: 280px;
}

.term .portrait-mount canvas {
  display: block;
  width: 100%;
  height: auto;
  cursor: default;
  touch-action: none;
}

.term .p-side {
  color: var(--dim);
  white-space: pre-wrap;
  padding-top: 20px;
}

.term .line {
  white-space: pre-wrap;
  word-break: break-word;
  opacity: 0;
  animation: rise 0.3s ease forwards;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

.term .gap { height: 14px; }

.prompt .user { color: var(--accent); }
.prompt .path { color: var(--cool); }
.prompt .branch { color: var(--hot); }
.prompt .chev { color: var(--hot); font-weight: 700; }
.prompt .cmd { color: var(--fg); }

.kv { display: inline-block; min-width: 11ch; color: var(--dim); }

.bar-hot { color: var(--hot); }
.bar-rest { color: var(--faint); }

.term a { border-bottom: 1px solid var(--faint); }
.term a:hover { border-bottom-color: var(--accent); }

.term .head { color: var(--fg); font-weight: 700; }
.term .sub { color: var(--dim); }

/* deco */

.deco {
  padding-top: 30px;
  color: var(--faint);
  font-size: 11px;
  user-select: none;
  overflow: hidden;
}

.deco-art { line-height: 1.5; }
.deco-readout { margin-top: 26px; font-size: 10px; color: var(--faint); }

/* ── status bar ──────────────────────────────────────── */

.statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 8px 22px;
  font-size: 12.5px;
  background: var(--bg2);
}

.sb-left { display: flex; flex-direction: column; line-height: 1.4; }
.sb-name { letter-spacing: 0.08em; font-weight: 500; }
.sb-hints { font-size: 11px; }

.sb-mid { display: flex; gap: 34px; }
.sb-stat { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.4; }
.sb-stat .k { color: var(--dim); font-size: 11px; letter-spacing: 0.1em; }
.sb-stat .v { color: var(--fg); }

.sb-right { display: flex; align-items: center; gap: 12px; }

.spark { display: inline-flex; align-items: flex-end; gap: 1px; height: 14px; }
.spark i { width: 2px; background: var(--faint); display: block; }
.spark i.peak { background: var(--dim); }

/* command line */

.cmdline {
  position: fixed;
  left: 0; right: 0; bottom: 34px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 22px;
  background: var(--bg2);
  border-top: 1px solid var(--line);
  z-index: 60;
}

.cmdline[hidden] { display: none; }

.cmd-prompt { color: var(--hot); font-weight: 700; }

.cmdline input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--fg);
  font: inherit;
  caret-color: var(--accent);
}

/* ── responsive ──────────────────────────────────────── */

@media (max-width: 980px) {
  .deck { grid-template-columns: 130px minmax(0, 1fr); }
  .deco { display: none; }
  .card { width: 110px; }
  .hero-art { display: none; }
}

@media (max-width: 640px) {
  .deck { grid-template-columns: 1fr; }
  .wheel-wrap { order: 2; max-height: 220px; }
  .term { order: 1; border: none; padding: 10px 4px; }
  .sb-mid { gap: 16px; }
  .sb-hints { display: none; }
}
