@import url('https://fonts.googleapis.com/css2?family=Chivo+Mono:wght@600;700&family=Sarabun:wght@400;600;700;800&display=swap');

[ng\:cloak], [ng-cloak], .ng-cloak { display: none !important; }

:root {
  --enamel: #155e5a;
  --enamel-deep: #0d3d3a;
  --putty: #c9bba8;
  --putty-dark: #a8967e;
  --brass: #b07a2b;
  --brass-shine: #e0b15a;
  --ink: #1a1612;
  --paper: #efe6d4;
  --stamp: #c4452d;
  --led: #f3d27a;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Sarabun, Tahoma, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 50% -10%, #1d7a74 0%, transparent 55%),
    repeating-linear-gradient(90deg, #12322f 0 28px, #155e5a 28px 56px);
  background-color: var(--enamel);
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.stage {
  min-height: 100vh;
  padding: 28px 16px 48px;
}

.eyebrow {
  margin: 0 0 8px;
  font-family: 'Chivo Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.lede, .chute-face p, .empty {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
}

.gate {
  max-width: 420px;
  margin: 6vh auto 0;
  background: var(--putty);
  border: 3px solid var(--ink);
  box-shadow: 10px 12px 0 var(--enamel-deep);
  padding: 28px 22px 24px;
}

.lock { margin-top: 22px; }

.pin-wrap { position: relative; margin-bottom: 16px; }

.pin-capture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 2;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.tile {
  height: 58px;
  border: 2px solid var(--ink);
  background: #2a241c;
  color: var(--led);
  font-family: 'Chivo Mono', ui-monospace, monospace;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 -6px 0 #16120e;
}

.tile.on {
  background: #3a3226;
  text-shadow: 0 0 10px #f3d27a;
}

.err {
  margin: 0 0 12px;
  color: var(--stamp);
  font-weight: 700;
}

.pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pad button {
  height: 56px;
  border: 2px solid var(--ink);
  background: #efe6d4;
  font-family: 'Chivo Mono', ui-monospace, monospace;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--ink);
}

.pad button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}

.pad button.act {
  background: var(--brass);
  color: var(--ink);
}

.pad button.mute {
  background: #d7cbb6;
  font-size: 16px;
}

.bolt, .ghost, .take, .copy {
  font-family: Sarabun, Tahoma, sans-serif;
  font-weight: 700;
  cursor: pointer;
}

.bolt {
  width: 100%;
  margin-top: 16px;
  height: 52px;
  border: 2px solid var(--ink);
  background: var(--stamp);
  color: #fff8ee;
  font-size: 18px;
  box-shadow: 0 4px 0 var(--ink);
}

.bolt:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.bay {
  max-width: 1100px;
  margin: 0 auto;
}

.bay-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  color: var(--paper);
  margin-bottom: 22px;
}

.bay-head h1 { color: var(--paper); }

.ghost {
  height: 44px;
  padding: 0 16px;
  border: 2px solid var(--paper);
  background: transparent;
  color: var(--paper);
}

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

.chute {
  background: var(--putty);
  border: 3px solid var(--ink);
  min-height: 340px;
  box-shadow: 8px 10px 0 var(--enamel-deep);
}

.file-pick { display: none; }

.chute-face {
  min-height: 340px;
  padding: 28px 24px;
  cursor: pointer;
  background:
    repeating-linear-gradient(-18deg, transparent 0 14px, rgba(26,22,18,0.06) 14px 16px);
}

.chute-kicker {
  font-family: 'Chivo Mono', ui-monospace, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--brass);
  margin: 0 0 10px;
}

.chute-face h2 {
  margin: 0 0 8px;
  font-size: 36px;
  line-height: 1;
}

.chute.hot .chute-face {
  background: #e7d7b8;
}

.now {
  margin-top: 18px !important;
  font-family: 'Chivo Mono', ui-monospace, monospace;
  font-size: 13px;
}

.bar {
  margin-top: 10px;
  height: 10px;
  background: #2a241c;
  border: 2px solid var(--ink);
}

.bar i {
  display: block;
  height: 100%;
  background: var(--brass);
  width: 0;
}

.rack {
  background: var(--paper);
  border: 3px solid var(--ink);
  padding: 18px;
  min-height: 340px;
}

.rack-label {
  margin: 0 0 12px;
  font-family: 'Chivo Mono', ui-monospace, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
}

.rack ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rack li {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border: 2px solid var(--ink);
  background: #fffaf0;
  margin-bottom: 10px;
  padding: 10px 12px 10px 0;
}

.stub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 16px;
  border-left: 10px dotted var(--stamp);
  min-width: 0;
}

.stub strong {
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stub span {
  font-family: 'Chivo Mono', ui-monospace, monospace;
  font-size: 12px;
  color: #5c5348;
}

.take, .copy {
  flex: none;
  text-decoration: none;
  color: var(--ink);
  background: var(--brass-shine);
  border: 2px solid var(--ink);
  padding: 8px 10px;
  font-size: 14px;
}

.copy {
  background: var(--paper);
  font-family: Sarabun, Tahoma, sans-serif;
  font-weight: 700;
  cursor: pointer;
}

.acts {
  display: flex;
  flex: none;
  gap: 8px;
  align-items: center;
}

.empty { color: #5c5348; }

@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .bay-head { flex-direction: column; align-items: flex-start; }
  .tile { height: 48px; font-size: 22px; }
}
