/* 로그인·가입서·대기·운영진·개인정보 화면 공통 (홈 화면과 같은 토큰) */
:root {
  --paper: #ffffff; --ink: #101417; --ink-2: #505a61; --rule: #d9dde0; --rule-strong: #101417;
  --accent: #0a5fa8; --sea-dark: #07141c; --sea-ink: #ffffff; --sea-ink-2: #aebbc4;
  --good: #1d7a45; --warn: #b4690b; --bad: #b8302a; --kakao: #fee500; --kakao-ink: #191600;
  --display: "Anton", "Noto Sans KR", sans-serif;
  --body: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #0d1317; --ink: #eef1f3; --ink-2: #9aa5ad; --rule: #26313a; --rule-strong: #eef1f3; --accent: #5aa9e6;
  --good: #52c27d; --warn: #e3a33a; --bad: #ef7a72; color-scheme: dark;
} }
* { box-sizing: border-box; }
html, body { margin: 0; }
[hidden] { display: none !important; }
body { background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: 760px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.wide { max-width: 1200px; }
.top { border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.wordmark { font-family: var(--display); font-size: 24px; letter-spacing: .04em; text-decoration: none; }
.label { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.link { border-bottom: 1px solid currentColor; text-decoration: none; padding-bottom: 1px; }
main { padding-block: 48px 72px; }
h1.page { font-size: clamp(30px, 4.5vw, 44px); font-weight: 900; letter-spacing: -.02em; margin-top: 10px; }
.lead { margin-top: 14px; color: var(--ink-2); font-size: 17px; max-width: 36em; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 22px; border: 0; border-radius: 2px; background: var(--ink); color: var(--paper); font: 700 15px var(--body); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--accent); color: #fff; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--rule-strong); }
.btn.kakao { background: var(--kakao); color: var(--kakao-ink); border-radius: 6px; width: 100%; max-width: 360px; font-size: 16px; padding: 15px 22px; }
.btn.kakao:hover { filter: brightness(.96); }
.btn.kakao svg { width: 20px; height: 20px; }
.notice { margin-top: 18px; padding: 12px 14px; border-left: 3px solid var(--warn); font-size: 14px; }
.notice.bad { border-color: var(--bad); }
.notice.good { border-color: var(--good); }

/* 로그인(공개 첫 화면) */
.gate { min-height: 100%; display: grid; grid-template-rows: auto 1fr auto; color: var(--sea-ink);
  background: linear-gradient(180deg, rgba(7,20,28,.8), rgba(7,20,28,.68) 50%, rgba(7,20,28,.9)), url(/img/hero.jpg) center 62%/cover no-repeat, var(--sea-dark); }
.brand { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: inherit; }
.brand span { font-family: var(--display); font-size: 15px; letter-spacing: .12em; padding-top: 2px; }
.brand img { height: 30px; width: auto; display: block; }
.gate .brand img { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand img { filter: brightness(0) invert(1); } }
.gate .top { border-color: rgba(255,255,255,.15); }
.gate .muted, .gate .label { color: var(--sea-ink-2); }
.gate main { display: flex; align-items: center; }
.gate h1 { font-weight: 900; font-size: clamp(40px, 8vw, 84px); letter-spacing: -.02em; line-height: 1.04; margin-top: 16px; }
.gate .lead { color: var(--sea-ink-2); }
.gate .actions { margin-top: 36px; display: grid; gap: 14px; }
.gate footer .wrap { padding-block: 22px 32px; font-size: 13px; color: var(--sea-ink-2); border-top: 1px solid rgba(255,255,255,.15); display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* 폼 */
form { margin-top: 36px; display: grid; gap: 22px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--ink-2); }
input[type=text], input[type=number], select, textarea { width: 100%; font: 400 16px var(--body); color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-bottom: 1.5px solid var(--rule-strong); padding: 12px 12px; border-radius: 0; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1.5px 0 var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.waiver { border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule); padding: 18px 0; max-height: 320px; overflow-y: auto; font-size: 14px; }
.waiver ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--accent); }

/* 표 (운영진) */
.tablewrap { overflow-x: auto; margin-top: 18px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: 12px; letter-spacing: .12em; color: var(--ink-2); font-weight: 700; border-bottom: 1px solid var(--rule-strong); white-space: nowrap; }
td .act { display: flex; gap: 6px; flex-wrap: wrap; }
td button { font: 700 13px var(--body); padding: 6px 10px; border: 1.5px solid var(--rule-strong); background: transparent; color: var(--ink); cursor: pointer; border-radius: 2px; }
td button.go { background: var(--ink); color: var(--paper); }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--rule); margin-top: 28px; }
.tabs button { background: none; border: 0; padding: 10px 0; font: 700 15px var(--body); color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected=true] { color: var(--ink); border-color: var(--ink); }
.state { font-weight: 900; }
.st-pending { color: var(--warn); } .st-approved { color: var(--good); } .st-rejected { color: var(--bad); } .st-new { color: var(--ink-2); }

.prose h2 { font-size: 20px; font-weight: 900; margin-top: 32px; }
.prose p, .prose li { color: var(--ink); font-size: 15px; }
.prose ul { padding-left: 20px; }

/* 운영진 화면 */
.admin-nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; font-weight: 700; }
.admin-nav a { text-decoration: none; color: var(--ink-2); padding: 4px 0; border-bottom: 2px solid transparent; }
.admin-nav a[aria-current=page] { color: var(--ink); border-color: var(--ink); }
.admin-nav a:hover { color: var(--ink); }
.bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 28px; }
.bar input, .bar select { width: auto; padding: 9px 10px; font-size: 15px; }
.bar .btn { padding: 10px 16px; font-size: 14px; }
.sect { margin-top: 48px; }
.sect h2 { font-size: 22px; font-weight: 900; letter-spacing: -.01em; }
.sect > p.muted { margin-top: 6px; font-size: 14px; }
table.grid td.c { text-align: center; padding: 0; min-width: 44px; }
table.grid td.c button { width: 100%; height: 40px; border: 0; background: transparent; cursor: pointer; font: 900 16px var(--body); color: var(--ink); }
table.grid td.c button[aria-pressed=true] { background: var(--ink); color: var(--paper); }
table.grid td.c button:hover { outline: 1.5px solid var(--accent); outline-offset: -2px; }
table.grid th.c { text-align: center; padding-right: 0; min-width: 44px; white-space: nowrap; }
table.grid th.c small { display: block; font-weight: 500; letter-spacing: 0; }
table.grid td.n, table.grid th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.grid th.c button.x { border: 0; background: none; color: var(--ink-2); cursor: pointer; font-size: 12px; padding: 0; }
.sticky-col { position: sticky; left: 0; background: var(--paper); z-index: 1; min-width: 120px; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.pill.good { color: var(--good); } .pill.warn { color: var(--warn); } .pill.bad { color: var(--bad); } .pill.mute { color: var(--ink-2); }
textarea.paste { min-height: 120px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.msgbox { border-top: 1px solid var(--rule); padding: 14px 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: start; }
.msgbox p { white-space: pre-line; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translate(-50%, calc(100% + 60px)); visibility: hidden; background: var(--ink); color: var(--paper); padding: 10px 16px; font-size: 14px; font-weight: 700; transition: transform .2s, visibility .2s; z-index: 50; max-width: calc(100vw - 32px); }
.toast.show { transform: translate(-50%, 0); visibility: visible; }
/* 폰에서 운영진 위쪽 줄: 로고 한 줄, 메뉴는 아래 줄에서 옆으로 넘김 */
.brand span { white-space: nowrap; }
@media (max-width: 760px) {
  .top .wrap { height: auto; min-height: 60px; flex-wrap: wrap; padding-block: 10px; row-gap: 6px; }
  .admin-nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; gap: 16px; scrollbar-width: none; }
  .admin-nav::-webkit-scrollbar { display: none; }
  .admin-nav a { white-space: nowrap; }
}
.toast.bad { background: var(--bad); color: #fff; }

@media (max-width: 600px) { .row2 { grid-template-columns: 1fr; } }
