/* DYNO 출석 대시보드 — 기능 확인용 기본 스타일 (디자인 작업 전 단계) */
:root {
  --bg: #F5F6FA;
  --card: #FFFFFF;
  --ink: #0B1A4A;
  --ink-2: #4A5684;
  --muted: #8D96B8;
  --line: #E4E8F2;
  --line-2: #F0F2F8;
  --blue: #1846FF;
  --blue-soft: #EEF2FF;
  --attend: #1846FF;
  --host: #FF7A45;
  --hidden: #7C4DFF;
  --ok: #138A5E;
  --ok-bg: #E6F6EF;
  --warn: #B25E00;
  --warn-bg: #FFF3E0;
  --bad: #D81E5B;
  --bad-bg: #FFE6EE;
  --radius: 16px;
  --f-body: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', system-ui, sans-serif;
  --gl: max(16px, env(safe-area-inset-left, 0px));
  --gr: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid rgba(24, 70, 255, .35); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 20px var(--gr) calc(32px + env(safe-area-inset-bottom, 0px)) var(--gl);
}

/* ── 머리 ── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--blue); }
.top-link { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink-2); }
h1 { margin: 6px 0 2px; font-size: 26px; line-height: 1.25; letter-spacing: -.02em; }
.sub { margin: 0; color: var(--ink-2); font-size: 14px; }

/* ── 공통 카드·버튼 ── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px;
  border: 0; border-radius: 12px;
  background: var(--blue); color: #fff; font-weight: 700;
}
.btn:disabled { opacity: .4; cursor: default; }
.btn.ghost { background: var(--blue-soft); color: var(--blue); }
.btn.line { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.sm { min-height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
  background: var(--line-2); color: var(--ink-2);
}
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.blue { background: var(--blue-soft); color: var(--blue); }
.muted { color: var(--muted); }
.state { padding: 36px 16px; text-align: center; color: var(--ink-2); }
.state .btn { margin-top: 12px; }

/* ── 기간 탭 ── */
.periods {
  display: flex; gap: 8px; margin: 18px calc(-1 * var(--gr)) 0 calc(-1 * var(--gl));
  padding: 0 var(--gr) 4px var(--gl);
  min-height: 42px; overflow-x: auto; scrollbar-width: none;
}
.periods::-webkit-scrollbar { display: none; }
.periods button {
  flex: 0 0 auto; min-height: 38px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink-2); font-weight: 700; font-size: 14px;
}
.periods button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ── 요약 숫자 ── */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stat { padding: 12px 14px; }
.stat .k { display: block; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.stat b { display: block; margin-top: 2px; font-size: 22px; letter-spacing: -.02em; }
.stat b small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 2px; }

/* ── 순위표 ── */
.board { margin-top: 14px; overflow: hidden; }
.board-head, .row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 40px 40px 44px 40px;
  align-items: center; column-gap: 6px;
  padding: 0 14px;
}
.board-head {
  min-height: 40px; font-size: 12px; font-weight: 700; color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.board-head span:nth-child(n+3), .row .num { text-align: right; }
.board ol { list-style: none; margin: 0; padding: 0; }
.row { min-height: 56px; border-bottom: 1px solid var(--line-2); }
.row:last-child { border-bottom: 0; }
.row .rk { font-size: 14px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.row.top3 .rk { color: var(--blue); }
.row .who { min-width: 0; }
.row .nm { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .nm[data-em]::before { content: attr(data-em); margin-right: 5px; font-weight: 400; }
.row .bar { display: flex; gap: 2px; height: 6px; margin-top: 5px; }
.row .bar i { display: block; height: 100%; border-radius: 3px; }
.row .bar .a { background: var(--attend); }
.row .bar .h { background: var(--host); }
.row .num { font-variant-numeric: tabular-nums; font-size: 15px; }
.row .num.total { font-weight: 800; }
.row .num.hid { color: var(--hidden); font-weight: 700; }
.legend { display: flex; gap: 14px; padding: 10px 14px; font-size: 12px; color: var(--ink-2); border-top: 1px solid var(--line); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ── 건의함 바로가기 ── */
.cta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding: 16px 18px;
  text-decoration: none; color: var(--ink);
}
.cta strong { font-size: 16px; }
.cta span { font-size: 13px; color: var(--ink-2); }
.cta .arr { font-size: 20px; color: var(--blue); }
.note { margin: 16px 2px 0; font-size: 12.5px; color: var(--muted); line-height: 1.7; }

/* ── 건의함 ── */
.suggest-form { margin-top: 18px; padding: 16px; }
.suggest-form textarea {
  display: block; width: 100%; min-height: 200px; padding: 14px;
  border: 1px solid var(--line); border-radius: 12px; resize: vertical;
  background: #FBFCFE; font-size: 16px; line-height: 1.6;
}
.suggest-form textarea:focus { outline: none; border-color: var(--blue); background: #fff; }
.form-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 13px; color: var(--muted); }
.form-meta .over { color: var(--bad); font-weight: 700; }
.suggest-form .btn { width: 100%; margin-top: 14px; }
.privacy { margin: 12px 2px 0; font-size: 13px; color: var(--ink-2); }
.err { margin: 10px 2px 0; font-size: 13px; color: var(--bad); font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done { margin-top: 18px; padding: 28px 18px; text-align: center; }
.done h2 { margin: 0 0 6px; font-size: 20px; }
.done .actions { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }

/* ── 운영진 ── */
.login { max-width: 380px; margin: 12vh auto 0; padding: 24px 20px; }
.login h1 { font-size: 22px; }
.login input {
  display: block; width: 100%; height: 48px; margin-top: 16px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 12px; font-size: 16px; background: #FBFCFE;
}
.login .btn { width: 100%; margin-top: 10px; }
.tabs {
  display: flex; gap: 4px; margin: 16px 0 0; padding: 4px;
  background: #E9ECF5; border-radius: 14px; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: 1 0 auto; min-height: 38px; padding: 0 12px;
  border: 0; border-radius: 10px; background: transparent;
  font-weight: 700; font-size: 14px; color: var(--ink-2); white-space: nowrap;
}
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(11, 26, 74, .08); }
.tabs .badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.panel { margin-top: 14px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar select, .toolbar input[type="search"], .inp {
  height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.toolbar input[type="search"] { flex: 1 1 160px; min-width: 0; }
.toolbar label.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.hint { margin: 10px 2px 0; font-size: 13px; color: var(--ink-2); }
.notice { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-size: 13px; font-weight: 600; }
.notice button { margin-left: 6px; }

/* 월별 입력 카드 */
.admin-page { scroll-padding-bottom: 96px; }
.ilist { display: grid; gap: 8px; margin-top: 12px; }
.icard { padding: 12px 14px; }
.icard.dirty { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft); }
.icard.off { opacity: .6; }
.icard .ih { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.icard .ih b { font-size: 16px; }
.icard .ih .nk { font-size: 12px; color: var(--muted); margin-left: 6px; }
.icard .ih .hsum { font-size: 13px; color: var(--hidden); font-weight: 700; white-space: nowrap; }
.igrid { display: grid; grid-template-columns: 44px repeat(3, minmax(0, 1fr)); gap: 6px 8px; align-items: start; margin-top: 8px; }
.igrid .grp { font-size: 12px; font-weight: 800; color: var(--ink-2); padding-top: 27px; }
.igrid .g-k { grid-row: 1; grid-column: 1; }
.igrid .k1 { grid-row: 1; grid-column: 2; }
.igrid .k2 { grid-row: 1; grid-column: 3; }
.igrid .g-s { grid-row: 2; grid-column: 1; }
.igrid .s1 { grid-row: 2; grid-column: 2; }
.igrid .s2 { grid-row: 2; grid-column: 3; }
.igrid .s3 { grid-row: 2; grid-column: 4; }
.fld { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fld .lbl { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fld input {
  width: 100%; height: 38px; padding: 0 8px; text-align: right;
  border: 1px solid var(--line); border-radius: 9px; background: #FBFCFE; font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.fld input:focus { outline: none; border-color: var(--blue); background: #fff; }
.fld.manual input { border-color: var(--host); background: #FFF6F1; }
.fld .auto { font-size: 11px; line-height: 1.35; color: var(--muted); white-space: normal; }
.fld .auto button { display: inline-block; border: 0; background: none; padding: 3px 0; color: var(--blue); font-size: 11px; font-weight: 700; text-decoration: underline; }
.savebar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 14px calc(-1 * var(--gr)) 0 calc(-1 * var(--gl));
  padding: 12px var(--gr) calc(12px + env(safe-area-inset-bottom, 0px)) var(--gl);
  background: rgba(245, 246, 250, .94); backdrop-filter: blur(6px); border-top: 1px solid var(--line);
}
.savebar .msg { font-size: 13px; color: var(--ink-2); }

/* 멤버 */
.mlist { margin-top: 12px; }
.mrow { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.mrow:last-child { border-bottom: 0; }
.mrow .mi { flex: 1 1 auto; min-width: 0; }
.mrow .mi b { font-size: 15px; }
.mrow .mi .meta { display: block; font-size: 12px; color: var(--muted); }
.nicks { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 6px; vertical-align: 1px; }
.medit { padding: 14px; border-bottom: 1px solid var(--line-2); background: #FBFCFE; display: grid; gap: 8px; }
.medit label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.medit .inp { width: 100%; }
.medit .row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
/* 관리: 멤버 이모티콘 */
.mrow .mi b[data-em]::before { content: attr(data-em); margin-right: 5px; font-weight: 400; }
.emo-field { display: grid; gap: 6px; }
.emo-field .lbl { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.emo-row { display: flex; align-items: center; gap: 8px; }
.emo-prev {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; font-size: 24px; line-height: 1;
}
.emo-row .emo-inp { flex: 1 1 auto; min-width: 0; }
.emo-row .btn { flex: none; white-space: nowrap; }
.emo-pick summary { padding: 2px 0; font-size: 13px; font-weight: 700; color: var(--blue); cursor: pointer; }
.emo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 4px; max-height: 232px; margin-top: 6px;
  padding: 6px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.emo-grid button { height: 40px; border: 0; border-radius: 10px; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; }
@media (hover: hover) { .emo-grid button:hover { background: var(--line-2); } }
.unl { margin-top: 12px; padding: 4px 0; }
.unl h3, .sec-title { margin: 10px 14px 6px; font-size: 14px; }
.unl .urow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line-2); }
.unl .urow b { min-width: 72px; }
.unl .urow select { height: 36px; border: 1px solid var(--line); border-radius: 9px; padding: 0 8px; background: #fff; max-width: 150px; }
.unl .urow .newname { height: 36px; width: 110px; }

/* 건의함 */
.slist { display: grid; gap: 8px; margin-top: 12px; }
.sitem { padding: 14px; }
.sitem.unread { border-color: var(--blue); }
.sitem .sh { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.sitem p { margin: 8px 0 0; white-space: pre-wrap; font-size: 15px; line-height: 1.65; }
.sitem .sa { display: flex; gap: 6px; margin-top: 10px; }

/* 벙 기록 */
.elist { margin-top: 12px; }
.erow { padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.erow:last-child { border-bottom: 0; }
.erow .eh { display: flex; align-items: center; gap: 8px; }
.erow .eh .dt { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.erow .eh .tt { flex: 1 1 auto; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.erow .em { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.erow details { margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.erow summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.erow .ea { margin-top: 8px; }
.erow.off .tt { color: var(--muted); text-decoration: line-through; }
.runs { margin-top: 14px; }
.run { padding: 10px 14px; border-top: 1px solid var(--line-2); font-size: 13px; }
.run .rh { display: flex; gap: 8px; align-items: center; }
.run .rn { margin-top: 2px; color: var(--muted); font-size: 12.5px; }

/* 현황 (정렬 표) */
.sortbar { margin-top: 8px; }
.sortbar .muted { font-size: 13px; font-weight: 600; }
.stwrap { margin-top: 12px; }
.stbl { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.stbl th, .stbl td { padding: 9px 6px; border-bottom: 1px solid var(--line-2); text-align: right; vertical-align: middle; }
.stbl thead th {
  position: sticky; top: 0; z-index: 1; padding: 0;
  background: var(--card); border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
.stbl thead th:first-child { border-top-left-radius: var(--radius); }
.stbl thead th:last-child { border-top-right-radius: var(--radius); }
.stbl thead th button {
  display: flex; align-items: center; justify-content: flex-end; gap: 2px;
  width: 100%; min-height: 44px; padding: 4px 6px;
  border: 0; background: none; color: inherit; font-weight: 700; font-size: 12px; line-height: 1.25;
  text-align: right; word-break: keep-all;
}
.stbl thead th[aria-sort="ascending"] button, .stbl thead th[aria-sort="descending"] button { color: var(--blue); }
.stbl thead th[data-sort="name"] button { justify-content: flex-start; text-align: left; padding-left: 14px; }
.stbl .arr { font-size: 9px; }
.stbl tbody th { text-align: left; padding-left: 14px; font-weight: 700; font-size: 15px; min-width: 84px; }
.stbl tbody th .nk { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.stbl tbody th .chip { font-size: 11px; padding: 1px 6px; vertical-align: 1px; }
.stbl td { font-size: 15px; white-space: nowrap; }
.stbl td:last-child { padding-right: 14px; }
.stbl td.tot { font-weight: 800; }
.stbl td.hid { color: var(--hidden); font-weight: 700; }
.stbl td.dt { font-size: 13px; color: var(--ink-2); }
.stbl tr.zero td, .stbl tr.zero th .nm { color: var(--muted); }
.stbl tbody tr:last-child th, .stbl tbody tr:last-child td { border-bottom: 0; }
.stbl td.state { text-align: center; white-space: normal; }
.stbl.busy tbody { opacity: .45; }

/* ── 랭킹 · 벙 캘린더 전환 (대시보드 첫 화면·캘린더 공통) ── */
.views { display: flex; gap: 4px; margin-top: 16px; padding: 4px; background: #E9ECF5; border-radius: 14px; }
.views a {
  flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; border-radius: 10px; text-decoration: none;
  font-weight: 700; font-size: 15px; color: var(--ink-2);
}
.views a[aria-current="page"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(11, 26, 74, .08); }

/* ── 벙 캘린더 ── */
.cal { margin-top: 14px; padding: 12px 8px 8px; }
.cal-head { display: flex; align-items: center; gap: 6px; padding: 0 4px 8px 8px; }
.cal-head h2 { flex: 1 1 auto; margin: 0; font-size: 20px; letter-spacing: -.02em; }
.nav-btn {
  width: 38px; height: 38px; border: 0; border-radius: 11px;
  background: var(--line-2); color: var(--ink); font-size: 22px; line-height: 1;
}
.nav-btn:disabled { opacity: .3; cursor: default; }
.wdays, .grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.wdays span { padding: 4px 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.wdays .sun, .day.sun .dn { color: #E5484D; }
.wdays .sat, .day.sat .dn { color: #2F6BFF; }
.grid { margin-top: 2px; transition: opacity .15s; }
.grid.busy { opacity: .45; }
.day {
  display: flex; flex-direction: column; align-items: stretch; gap: 2px;
  min-width: 0; min-height: 64px; padding: 3px 2px 5px;
  border: 1px solid transparent; border-radius: 10px; background: transparent;
  font: inherit; color: var(--ink); text-align: left;
}
.day.pad { pointer-events: none; }
@media (hover: hover) { button.day:hover { background: var(--line-2); } }
.day .dn {
  align-self: center; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink);
}
.day.past .dn { opacity: .5; }
.day.is-today .dn { opacity: 1; background: var(--ink); color: #fff; }
.day.sel { border-color: var(--blue); background: var(--blue-soft); }
.day .ch {
  display: flex; align-items: center; gap: 3px; min-width: 0;
  padding: 1px 4px; border-radius: 5px;
  font-size: 10.5px; font-weight: 700; line-height: 1.45; white-space: nowrap;
}
.day .ch .cl { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.day .ch b { flex: none; font-weight: 800; opacity: .75; font-variant-numeric: tabular-nums; }
.day .more { padding-left: 3px; font-size: 10.5px; font-weight: 700; color: var(--muted); }
.ch.s-done { background: #ECEFF6; color: #56628C; }
.ch.s-pending { background: var(--warn-bg); color: var(--warn); }
.ch.s-live { background: var(--ok); color: #fff; }
.ch.s-today { background: var(--blue); color: #fff; }
.ch.s-planned { background: var(--blue-soft); color: var(--blue); box-shadow: inset 0 0 0 1px rgba(24, 70, 255, .22); }
.cal-legend {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; padding: 10px 8px 4px;
  border-top: 1px solid var(--line-2); font-size: 12px; color: var(--ink-2);
}
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend .ch { padding: 1px 6px; border-radius: 5px; font-size: 10.5px; font-weight: 700; font-style: normal; }
.cal .state { padding: 20px 12px; }

.sec-h { display: flex; align-items: center; gap: 8px; margin: 24px 2px 0; font-size: 17px; letter-spacing: -.01em; }
.sec-h .cnt { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.dayp .empty, .ulist .empty { margin: 10px 0 0; padding: 22px 16px; text-align: center; font-size: 14px; color: var(--ink-2); }
.ulist .empty { margin: 0; }

/* 고른 날의 벙 카드 */
.ecard {
  position: relative; margin-top: 10px; padding: 14px 16px 15px 19px; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.ecard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #C9CFE0; }
.ecard.s-live::before { background: var(--ok); }
.ecard.s-today::before, .ecard.s-planned::before { background: var(--blue); }
.ecard.s-pending::before { background: var(--warn); }
.ecard .eh { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ecard .tm { font-size: 14px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.ecard .et { margin: 10px 0 0; font-size: 18px; line-height: 1.35; letter-spacing: -.01em; }
.ecard .gy { margin: 4px 0 0; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.ecard .ph { margin: 12px 0 0; font-size: 13px; color: var(--ink-2); }
.ecard .ph b { color: var(--ink); }
.st {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 800; white-space: nowrap; background: #ECEFF6; color: #56628C;
}
.st i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st.s-live { background: var(--ok-bg); color: var(--ok); }
.st.s-live i { animation: dyno-live 1.4s ease-in-out infinite; }
.st.s-today, .st.s-planned { background: var(--blue-soft); color: var(--blue); }
.st.s-pending { background: var(--warn-bg); color: var(--warn); }
@keyframes dyno-live {
  0%, 100% { box-shadow: 0 0 0 0 rgba(19, 138, 94, .55); }
  50% { box-shadow: 0 0 0 5px rgba(19, 138, 94, 0); }
}
.pp { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.pp li {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px;
  background: var(--line-2); font-size: 14px; font-weight: 600;
}
.pp li.op { background: #FFF1EA; color: #A83F12; }
.pp li em {
  padding: 1px 6px; border-radius: 999px; background: var(--host); color: #fff;
  font-size: 11px; font-weight: 800; font-style: normal;
}
.pp li[data-em]::before { content: attr(data-em); margin-right: -1px; font-size: 15px; line-height: 1; }
.more-btn { display: block; width: 100%; margin-top: 8px; }

/* 다가오는 벙 */
.ulist { list-style: none; margin: 10px 0 0; padding: 0; overflow: hidden; }
.ulist li + li { border-top: 1px solid var(--line-2); }
.uprow {
  display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  width: 100%; min-height: 64px; padding: 10px 14px; border: 0; background: none; color: var(--ink); text-align: left;
}
@media (hover: hover) { .uprow:hover { background: var(--line-2); } }
.uprow .ud { display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
.uprow .ud b { font-size: 16px; font-variant-numeric: tabular-nums; }
.uprow .ud small { font-size: 12px; font-weight: 700; color: var(--muted); }
.uprow.s-today .ud small, .uprow.s-live .ud small { color: var(--blue); }
.uprow .ui { min-width: 0; }
.uprow .ui b, .uprow .ui small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uprow .ui b { font-size: 15px; }
.uprow .ui small { margin-top: 1px; font-size: 12.5px; color: var(--ink-2); }
.uprow .uc { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.uprow .uc b { font-size: 14px; font-variant-numeric: tabular-nums; }
.uprow .st { padding: 2px 8px; font-size: 11px; }

@media (max-width: 420px) {
  /* 좁은 화면: 달력 칸에는 벙 이름만 (인원은 아래 카드에서).
     네 글자(투이얼즈 같은 줄임말)가 잘리지 않게 칸 여백을 줄이고, 글자 크기를 칸 폭에 맞춘다 */
  .cal { padding: 10px 4px 6px; }
  .cal-head { padding: 0 8px 8px 12px; }
  .cal-legend { padding-inline: 12px; }
  .wdays, .grid { gap: 2px; }
  .day { padding: 3px 1px 4px; container-type: inline-size; }
  .day .ch {
    padding: 1px 2px; letter-spacing: -.04em;
    font-size: 10px; font-size: clamp(8.5px, calc((100cqi - 5px) / 3.84), 10.5px);
  }
  .day .ch b { display: none; }
}
@media (min-width: 640px) {
  .cal { padding: 16px 14px 10px; }
  .cal-head { padding-bottom: 10px; }
  .day { min-height: 94px; padding: 5px 4px 6px; gap: 3px; }
  .day .dn { width: 28px; height: 28px; font-size: 14px; }
  .day .ch { padding: 2px 6px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .st.s-live i { animation: none; }
  .grid { transition: none; }
}

/* 알림 */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 50;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 12px; background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 600; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); }
.admin-page .toast { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }

@media (max-width: 430px) {
  /* 운영진 탭 5개가 한 줄에 들어가도록 */
  .tabs { gap: 2px; }
  .tabs button { padding: 0 7px; font-size: 13px; }
}

@media (min-width: 640px) {
  .wrap { padding-top: 32px; }
  h1 { font-size: 30px; }
  .board-head, .row { grid-template-columns: 40px minmax(0, 1fr) 64px 64px 64px 64px; padding: 0 20px; }
  .stat { padding: 14px 18px; }
  .stat b { font-size: 26px; }
}

@media (min-width: 720px) {
  .icard { display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: 14px; align-items: start; }
  .icard .ih { flex-direction: column; align-items: flex-start; gap: 2px; padding-top: 20px; }
  .icard .ih .nk { display: block; margin: 2px 0 0; }
  .igrid { margin-top: 0; grid-template-columns: 36px repeat(2, minmax(0, 1fr)) 48px repeat(3, minmax(0, 1fr)); }
  .igrid .g-s { grid-row: 1; grid-column: 4; }
  .igrid .s1 { grid-row: 1; grid-column: 5; }
  .igrid .s2 { grid-row: 1; grid-column: 6; }
  .igrid .s3 { grid-row: 1; grid-column: 7; }
}

@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}
