:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --ink: #1d2733;
  --muted: #667085;
  --line: #dde3ec;
  --brand: #2563eb;
  --brand-ink: #ffffff;
  --brand-soft: #e8f0fe;
  --ok: #15803d;
  --ok-soft: #e3f6ea;
  --warn: #b45309;
  --warn-soft: #fff4dc;
  --bad: #b91c1c;
  --bad-soft: #fde8e8;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}
header.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.wrap { max-width: 720px; margin: 0 auto; padding: 12px 16px; }
.brand { font-weight: 700; font-size: 18px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.who { font-size: 13px; color: var(--muted); font-weight: 400; }
nav.tabs { display: flex; gap: 4px; overflow-x: auto; padding-top: 8px; }
nav.tabs a {
  flex: 1 0 auto; text-align: center; padding: 8px 12px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap;
}
nav.tabs a.on { background: var(--brand-soft); color: var(--brand); }
.devbar { background: #fff7d6; border-bottom: 1px solid #ecd98a; font-size: 13px; }
.devbar .wrap { display: flex; gap: 8px; align-items: center; padding-top: 6px; padding-bottom: 6px; }
main { max-width: 720px; margin: 0 auto; padding: 16px; }
h1 { font-size: 20px; margin: 4px 0 12px; }
h2 { font-size: 17px; margin: 20px 0 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.muted { color: var(--muted); font-size: 14px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
button, .btn {
  font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 10px 14px; border-radius: 10px; cursor: pointer; min-height: 44px;
}
button.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
button.danger { color: var(--bad); border-color: #f1b8b8; }
button.small { min-height: 36px; padding: 6px 10px; font-size: 14px; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea {
  font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  min-height: 44px; max-width: 100%;
}
textarea { width: 100%; min-height: 140px; font-family: ui-monospace, Menlo, monospace; font-size: 14px; }
label.field { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.big { font-size: 34px; font-weight: 800; line-height: 1.1; }
.big small { font-size: 16px; font-weight: 600; color: var(--muted); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.chip {
  flex: 0 0 auto; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  font-weight: 600; cursor: pointer; min-height: 40px;
}
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.zone { margin-top: 14px; }
.zone h2 { display: flex; justify-content: space-between; }
.slot { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.slot:last-child { border-bottom: 0; }
.slot .no { font-weight: 800; color: var(--muted); }
.slot.mine { background: var(--brand-soft); }
.slot .owner { font-weight: 600; }
.slot .sub { font-size: 13px; color: var(--muted); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.badge.vacant { background: var(--ok-soft); color: var(--ok); }
.badge.assigned { background: var(--warn-soft); color: var(--warn); }
.badge.owner { background: #eef1f6; color: var(--muted); }
.badge.todo { background: var(--warn-soft); color: var(--warn); }
.badge.reapply { background: var(--bad-soft); color: var(--bad); }
.badge.done { background: var(--ok-soft); color: var(--ok); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { text-align: center; font-size: 12px; color: var(--muted); padding: 2px 0; }
.cal button.day {
  min-height: 58px; padding: 4px 2px; border-radius: 10px; font-size: 14px; display: grid; gap: 2px; align-content: center; justify-items: center;
}
.cal button.day small { font-size: 11px; font-weight: 600; color: var(--muted); }
.cal button.day.sel { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.cal button.day.sel small { color: #dbe7ff; }
.cal button.day.inrange { background: var(--brand-soft); border-color: var(--brand); }
.cal button.day.released { background: var(--ok-soft); }
.cal button.day.taken { background: var(--warn-soft); }
.cal button.day.past { opacity: .4; }
.cal .pad { visibility: hidden; }
.msg { padding: 10px 12px; border-radius: 10px; margin: 8px 0; font-size: 15px; }
.msg.ok { background: var(--ok-soft); color: var(--ok); }
.msg.warn { background: var(--warn-soft); color: var(--warn); }
.msg.bad { background: var(--bad-soft); color: var(--bad); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
.scroll { overflow-x: auto; }
.tabbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #1d2733; color: #fff;
  padding: 10px 16px; border-radius: 10px; z-index: 20; max-width: 90vw;
}
.hide { display: none !important; }
