/* Original store shell — terminal ledger aesthetic.
   Not Play Store, not App Store, not gugarhices marketing. */

:root {
  --bg: #0c0f14;
  --panel: #12171f;
  --line: #243041;
  --ink: #e8eef7;
  --mute: #8b9bb0;
  --accent: #7dd3c0;
  --warn: #e8b86d;
  --font: "IBM Plex Sans Thai", "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.frame {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 1100px;
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(125, 211, 192, 0.04), transparent 180px),
    var(--bg);
}

/* top bar */
.bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 15, 20, 0.92);
  position: sticky;
  top: 0;
  z-index: 10;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 13px;
}
.box {
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent);
  border-radius: 3px;
}
.find input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 6px;
  padding: 0 12px;
  outline: none;
}
.find input:focus { border-color: var(--accent); }
.find input::placeholder { color: #5c6b80; }
.bar-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mute);
  white-space: nowrap;
}

/* body + left index */
.body {
  display: grid;
  grid-template-columns: 180px 1fr;
  flex: 1;
  min-height: 0;
}
.rail {
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rail-label {
  margin: 0 8px 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--mute);
}
.rail-btn {
  text-align: left;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--mute);
}
.rail-btn:hover { background: var(--panel); color: var(--ink); }
.rail-btn.active {
  background: rgba(125, 211, 192, 0.12);
  color: var(--accent);
  border: 1px solid rgba(125, 211, 192, 0.35);
}
.rail-spacer { flex: 1; }
.rail-note {
  margin: 12px 8px 0;
  font-size: 11px;
  line-height: 1.5;
  color: #5c6b80;
}

.stage { padding: 22px 22px 40px; }

.lead { margin-bottom: 28px; max-width: 36rem; }
.code {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.lead h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.sub {
  margin: 0;
  color: var(--mute);
  font-size: 15px;
}
.sub strong { color: var(--ink); font-weight: 600; }

/* ledger table — own metaphor, not app cards */
.board {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
  margin-bottom: 28px;
}
.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.board-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.pill {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--warn);
  border: 1px solid rgba(232, 184, 109, 0.35);
  padding: 4px 8px;
  border-radius: 999px;
}
.table { width: 100%; }
.thead, .empty-row {
  display: grid;
  grid-template-columns: 48px 1fr 100px 100px;
  gap: 8px;
  padding: 12px 14px;
  font-size: 13px;
}
.thead {
  color: var(--mute);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--line);
}
.empty-row { color: var(--ink); align-items: center; }
.empty-row .dash,
.empty-row .mute { color: var(--mute); font-family: var(--mono); }

.slots h2 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--mute);
  letter-spacing: 0.04em;
}
.slot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.slot {
  border: 1px dashed var(--line);
  border-radius: 8px;
  min-height: 88px;
  padding: 12px;
  background: rgba(18, 23, 31, 0.5);
}
.slot span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
}
.slot p {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--mute);
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: #5c6b80;
}

@media (max-width: 760px) {
  .body { grid-template-columns: 1fr; }
  .rail {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    align-items: center;
  }
  .rail-label, .rail-note, .rail-spacer { display: none; }
  .rail-btn { padding: 8px 10px; font-size: 13px; }
  .bar { grid-template-columns: 1fr; }
  .bar-meta { display: none; }
  .slot-grid { grid-template-columns: repeat(2, 1fr); }
  .thead, .empty-row { grid-template-columns: 36px 1fr 72px; }
  .thead span:last-child,
  .empty-row span:last-child { display: none; }
}
