/* 호암랩스 PDAM UI · Version: 7.1.0-test (2026-11-01) */
:root {
  --ink: #0B1220;
  --panel: #121A2B;
  --line: #2A3548;
  --paper: #F4F1EA;
  --muted: #8B93A7;
  --gold: #C4A35A;
  --go: #1F7A4D;
  --halt: #6E2C2C;
  --ok: #7DCEA0;
  --warn: #E8A0A0;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  background: var(--ink);
  color: var(--paper);
}
a { color: var(--gold); }
.wrap { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.wrap.wide { max-width: 1180px; }
header.app { padding: 18px 20px 12px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.brand { font-size: 11px; letter-spacing: .22em; color: var(--gold); font-weight: 700; }
.ver { font-size: 11px; color: var(--muted); }
h1 { margin: 6px 0 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.title-row { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.title-row h1 { margin: 0; }
.apk-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  background: #C4A35A;
  color: #0B1220;
  text-decoration: none;
}
.apk-ico svg { width: 22px; height: 22px; display: block; }
.apk-ico:hover { background: #E0C07A; color: #0B1220; }
.navpc a.apk-ico { width: 42px; height: 42px; margin: 0; padding: 0; border: 0; }
.sub { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.45; }
main { flex: 1; padding: 16px 16px 96px; }
input, textarea, select {
  width: 100%; background: #0E1626; color: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; font-size: 16px; margin: 6px 0;
}
textarea { min-height: 120px; resize: vertical; }
.btn {
  width: 100%; border: 0; border-radius: 14px; font-weight: 800; color: #fff;
  padding: 14px; font-size: 16px; margin-top: 8px; cursor: pointer;
}
.btn.go { background: var(--go); min-height: 72px; font-size: 24px; }
.btn.go.busy { background: #C9A227; color: #1A1408; }
.btn.go.rec { background: #9B1C1C; }
.btn.halt { background: var(--halt); font-size: 16px; min-height: 48px; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--paper); font-weight: 600; font-size: 14px; }
.btn.gold { background: #3A3018; color: var(--gold); border: 1px solid #5C4A22; }
.btn.sm { min-height: 40px; font-size: 13px; width: auto; padding: 8px 12px; margin: 0; }
.hero {
  background: #101827; border: 1px solid var(--line); border-radius: 18px;
  padding: 20px 18px 16px; margin-bottom: 14px;
}
.kicker { font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.pile-no { font-size: 42px; font-weight: 800; margin: 8px 0 4px; }
.status { font-size: 13px; color: var(--gold); }
.rigs, .cards { display: grid; gap: 8px; margin: 12px 0; }
.rig, .card {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel);
}
.rig.on { border-color: var(--gold); }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: #243049; margin-top: 6px; }
.pill.ok { background: #1F3D2E; color: var(--ok); }
.pill.rec { background: #4A1A1A; color: #FFB4B4; }
.pill.warn { background: #3D2A12; color: var(--gold); }
.msg { min-height: 20px; font-size: 13px; color: var(--muted); margin: 8px 0; }
.msg.warn { color: var(--warn); }
.msg.ok { color: var(--ok); }
.hide { display: none !important; }
.tabs {
  position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  background: #0A101C; border-top: 1px solid var(--line);
  padding: 8px 8px calc(10px + env(safe-area-inset-bottom));
}
.tabs button {
  background: transparent; border: 0; color: var(--muted); font-size: 12px; font-weight: 700; padding: 10px 0;
}
.tabs button.on { color: var(--gold); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 4px; border-bottom: 1px solid var(--line); }
td { padding: 10px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.queue { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; }
.q {
  flex: 0 0 auto; min-width: 72px; text-align: center; padding: 10px 8px;
  border: 1px solid var(--line); border-radius: 12px; font-size: 13px; font-weight: 700; background: transparent; color: inherit;
}
.q.on { border-color: var(--gold); color: var(--gold); }
.q.done { opacity: .4; }
.overlay {
  position: fixed; inset: 0; background: rgba(6,10,18,.72);
  display: flex; align-items: flex-end; justify-content: center; z-index: 20;
}
.overlay.ask { align-items: center; z-index: 80; padding: 16px; }
.overlay.ask .sheet { border-radius: 16px; max-width: 440px; }
body.pdam-busy { cursor: wait; }
body.pdam-busy button { pointer-events: none; }
#pdam-ask:not(.hide) button { pointer-events: auto; }
.sheet {
  width: 100%; max-width: 480px; background: #161E30; border-radius: 20px 20px 0 0;
  padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.navpc { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.navpc button { width: auto; }
label.small { display: block; font-size: 12px; color: var(--muted); margin-top: 10px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat b { display: block; font-size: 28px; }
@media (min-width: 880px) {
  .pcgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
}
