:root {
  --bg: #f5f6f8; --card: #ffffff; --text: #1c2230; --sub: #5a6375; --mute: #98a1b0; --line: #e7eaf0; --line2: #f0f2f5;
  --accent: #2f6fed; --accent-weak: #eaf0fe; --accent-text: #ffffff;
  --warn: #b85c00; --warn-bg: #fdf0e1; --err: #c62f2a; --err-bg: #fde8e7;
  --n-bg: #e8ecf4; --rest-bg: #f4f5f8; --sun: #c9443f; --sat: #3f68c9;
  --radius: 12px; --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 2px 8px rgba(16, 24, 40, .05);
  --font: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1217; --card: #171b22; --text: #e6e9ef; --sub: #a5adbb; --mute: #6d7584; --line: #262b35; --line2: #1e232b;
    --accent: #5c8dff; --accent-weak: #1c2944; --accent-text: #0b1020;
    --warn: #f0a457; --warn-bg: #3a2915; --err: #ff7b72; --err-bg: #3e1c1b;
    --n-bg: #222a39; --rest-bg: #1b1f27; --sun: #ff8a80; --sat: #8fb0ff;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
.hidden { display: none !important; }
.mute { color: var(--mute); }
.sub { color: var(--sub); }
.err-t { color: var(--err); }
.warn-t { color: var(--warn); }
.num { font-variant-numeric: tabular-nums; }

/* ── 머리줄·탭 ───────────────────────── */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 20px;
  background: var(--card); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; white-space: nowrap; }
.brand .logo { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; }
.brand .logo svg { width: 18px; height: 18px; stroke: #fff; }
.brand small { font-weight: 500; color: var(--sub); font-size: 13px; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; color: var(--sub); font-weight: 600; white-space: nowrap; }
.nav a:hover { background: var(--line2); }
.nav a.on { color: var(--accent); background: var(--accent-weak); }
.nav a svg { width: 18px; height: 18px; }
.topbar .spacer { flex: 1; }
.who { display: flex; align-items: center; gap: 10px; color: var(--sub); font-size: 14px; white-space: nowrap; }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--err); color: #fff; font-size: 11px; font-weight: 700; }
.demo-flag { font-size: 12px; color: var(--warn); background: var(--warn-bg); padding: 3px 8px; border-radius: 6px; font-weight: 600; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: var(--card); box-shadow: 0 -1px 0 var(--line);
  padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; color: var(--mute); font-size: 11.5px; font-weight: 600; position: relative; }
.tabbar a svg { width: 23px; height: 23px; }
.tabbar a.on { color: var(--accent); }
.tabbar a .badge { position: absolute; top: 4px; left: calc(50% + 6px); }

.main { padding: 20px 24px 40px; }
body.phone .topbar { height: 52px; padding: 0 14px; gap: 10px; }
body.phone .main { padding: 12px 12px calc(84px + env(safe-area-inset-bottom)); }
body.phone .nav { display: none; }

/* ── 공통 부품 ───────────────────────── */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card + .card { margin-top: 14px; }
.card h3 { font-size: 16px; margin-bottom: 12px; }
.card .hint { font-size: 13px; color: var(--sub); margin-top: -6px; margin-bottom: 12px; line-height: 1.5; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 9px; border: 0;
  background: var(--line2); color: var(--text); font-weight: 600; cursor: pointer; white-space: nowrap; font-size: 14px; }
.btn:hover { filter: brightness(.97); }
.btn.primary { background: var(--accent); color: var(--accent-text); }
.btn.ghost { background: transparent; color: var(--sub); }
.btn.ghost:hover { background: var(--line2); }
.btn.danger { background: var(--err-bg); color: var(--err); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn.lg { height: 48px; font-size: 16px; border-radius: 11px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn svg { width: 17px; height: 17px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 7px; background: var(--line2); color: var(--sub); font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill.on { background: var(--accent-weak); color: var(--accent); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.err { background: var(--err-bg); color: var(--err); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--sub); font-weight: 600; }
.inp { height: 42px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); outline: none; min-width: 0; }
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.inp.sm { height: 32px; padding: 0 8px; border-radius: 7px; font-size: 14px; }
textarea.inp { height: auto; padding: 10px 12px; line-height: 1.5; }
.seg { display: inline-flex; background: var(--line2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font-weight: 600; color: var(--sub); cursor: pointer; font-size: 14px; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.empty { padding: 40px 16px; text-align: center; color: var(--sub); line-height: 1.6; }
.spin { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: sp 0.8s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 60px; color: var(--sub); }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 13px; transition: .15s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }

/* 모달·시트 */
.dim { position: fixed; inset: 0; z-index: 60; background: rgba(10, 14, 22, .38); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--card); border-radius: 16px; width: min(520px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.modal h3 { font-size: 18px; margin-bottom: 14px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
body.phone .dim { align-items: flex-end; padding: 0; }
body.phone .modal { width: 100%; border-radius: 18px 18px 0 0; max-height: 88vh; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); }
body.phone .modal .foot .btn { flex: 1; height: 46px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 80; background: #1f2633; color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: calc(100vw - 32px); }
body.phone .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
.toast.err { background: var(--err); }
.tip { position: fixed; z-index: 90; pointer-events: none; background: #1f2633; color: #fff; font-size: 12.5px; line-height: 1.5; padding: 7px 10px; border-radius: 8px; max-width: 280px; box-shadow: 0 6px 18px rgba(0,0,0,.18); white-space: pre-line; }

/* ── 로그인 ───────────────────────── */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero { background: var(--accent); color: #fff; padding: 64px 56px; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.login-hero h1 { font-size: 40px; line-height: 1.25; }
.login-hero p { font-size: 17px; line-height: 1.7; opacity: .92; margin: 0; }
.login-hero ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; font-size: 16px; }
.login-hero li { display: flex; gap: 10px; align-items: flex-start; }
.login-hero li b { flex: none; width: 26px; height: 26px; border-radius: 7px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 13px; }
.login-side { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.login-box { width: min(400px, 100%); }
.login-box .card { padding: 26px; }
/* 11-03 체험해 보기를 첫눈에(맨 위 파란 영역) */
.hero-brand { font-size: 15px; font-weight: 800; letter-spacing: .02em; opacity: .9; }
.hero-demo { background: rgba(255,255,255,.14); border-radius: 14px; padding: 16px; display: grid; gap: 10px; max-width: 480px; }
.hero-demo .hd-t b { display: block; font-size: 18px; }
.hero-demo .hd-t span { display: block; font-size: 13.5px; opacity: .88; margin-top: 2px; }
.hero-demo button { font: inherit; border: 0; cursor: pointer; border-radius: 11px; }
.hero-demo button:hover { filter: brightness(.96); }
.hero-demo .hd-main { height: 52px; background: #fff; color: #2f6fed; font-size: 17px; font-weight: 800; }
.hero-demo .hd-sub { display: flex; gap: 8px; }
.hero-demo .hd-sub button { flex: 1; height: 42px; background: rgba(255,255,255,.2); color: #fff; font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.hero-demo .hd-note { font-size: 12px; opacity: .78; }
/* PC 는 오른쪽 맨 위(로그인 칸보다 먼저), 폰은 파란 영역 안 */
.login-box .side-demo { background: var(--accent-weak); padding: 22px 26px; margin-bottom: 14px; display: grid; gap: 10px; }
.side-demo h3 { margin: 0; font-size: 20px; }
.side-demo .sub { margin: -6px 0 4px; font-size: 13.5px; }
.side-demo .btn.primary { width: 100%; height: 56px; font-size: 18px; font-weight: 800; border-radius: 12px; }
.side-demo .row { gap: 8px; flex-wrap: nowrap; }
.side-demo .row .btn { flex: 1; height: 44px; background: var(--card); color: var(--accent); font-weight: 600; white-space: nowrap; }
.side-demo .note { margin: 0; font-size: 12px; color: var(--sub); }
body:not(.phone) .login-hero .hero-demo { display: none; }
body.phone .side-demo { display: none; }
body.phone .login-wrap { grid-template-columns: 1fr; }
body.phone .login-hero { padding: 26px 18px 22px; gap: 12px; }
body.phone .hero-demo { padding: 14px; }
body.phone .login-hero p br { display: none; }
body.phone .login-hero h1 { font-size: 26px; }
body.phone .login-hero p { font-size: 14.5px; }
body.phone .login-hero ul { display: none; }
body.phone .login-side { align-items: flex-start; padding: 18px 14px 40px; }

/* ── 근무표 작업대 ───────────────────────── */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.mnav { display: flex; align-items: center; gap: 4px; }
.mnav h2 { font-size: 22px; min-width: 140px; text-align: center; }
.mnav .btn { width: 36px; padding: 0; }
.savestate { font-size: 13px; color: var(--mute); min-width: 60px; }
.toolbar .spacer { flex: 1; }
.board-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
body.phone .board-body, .board-body.narrow { grid-template-columns: minmax(0, 1fr); }
.gridwrap { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto; max-height: calc(100vh - 150px); position: relative; outline: none; }
body.phone .gridwrap { max-height: calc(100vh - 230px); }
table.duty { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; font-variant-numeric: tabular-nums; user-select: none; -webkit-user-select: none; }
.duty th, .duty td { height: 34px; padding: 0; text-align: center; font-size: 13.5px; border-bottom: 1px solid var(--line2); border-right: 1px solid var(--line2); background: var(--card); }
.duty thead th { position: sticky; top: 0; z-index: 3; height: 46px; font-weight: 600; border-bottom: 1px solid var(--line); cursor: pointer; }
.duty thead th b { display: block; font-size: 14px; }
.duty thead th i { display: block; font-style: normal; font-size: 11px; color: var(--mute); font-weight: 500; }
.duty thead th.sat, .duty thead th.sat i { color: var(--sat); }
.duty thead th.sun, .duty thead th.sun i, .duty thead th.hol, .duty thead th.hol i { color: var(--sun); }
.duty thead th.today b { display: inline-block; background: var(--accent); color: var(--accent-text); border-radius: 6px; padding: 0 5px; line-height: 20px; }
.duty .nm { position: sticky; left: 0; z-index: 2; width: 112px; text-align: left; padding: 0 10px; border-right: 1px solid var(--line); cursor: pointer; white-space: nowrap; overflow: hidden; }
.duty thead .nm { z-index: 4; cursor: default; }
.duty .nm span { font-weight: 600; }
.duty .nm small { color: var(--mute); font-size: 11.5px; margin-left: 5px; }
.duty td.c { cursor: cell; position: relative; font-weight: 600; }
.duty td.rest { background: var(--rest-bg); }
.duty td.k-N { background: var(--n-bg); }
.duty td.k-O { color: var(--mute); font-weight: 500; }
.duty td.k-V { color: var(--accent); }
.duty td.warn { background: var(--warn-bg); color: var(--warn); }
.duty td.err { background: var(--err-bg); color: var(--err); }
.duty td.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.duty td.lock::after { content: ""; position: absolute; right: 0; bottom: 0; border: 4px solid transparent; border-right-color: var(--mute); border-bottom-color: var(--mute); }
.duty td.req::before { content: ""; position: absolute; left: 3px; top: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.duty td.req.ok::before { opacity: .45; }
.duty .st { width: 34px; font-size: 12.5px; color: var(--sub); }
.duty thead .st { cursor: default; color: var(--sub); }
.duty td.st.warn { background: var(--warn-bg); color: var(--warn); font-weight: 700; }
.duty td.st.err { background: var(--err-bg); color: var(--err); font-weight: 700; }
.duty .st.first { border-left: 1px solid var(--line); }
.duty tr.mine th.nm, .duty tr.mine td { background-image: linear-gradient(var(--accent-weak), var(--accent-weak)); }
.duty tr.mine td.k-N { background-image: none; }
.duty tfoot td, .duty tfoot th { position: sticky; z-index: 2; background: var(--card); font-size: 12.5px; color: var(--sub); height: 28px; }
.duty tfoot tr:nth-child(1) > * { bottom: 56px; border-top: 1px solid var(--line); }
.duty tfoot tr:nth-child(2) > * { bottom: 28px; }
.duty tfoot tr:nth-child(3) > * { bottom: 0; }
.duty tfoot th.nm { z-index: 4; font-weight: 600; }
.duty tfoot td.err { background: var(--err-bg); color: var(--err); font-weight: 700; }
.duty tfoot td.warn { background: var(--warn-bg); color: var(--warn); font-weight: 700; }
.duty tr.grp th { height: 24px; font-size: 11.5px; color: var(--mute); text-align: left; padding-left: 10px; background: var(--card); font-weight: 600; }
body.phone .duty th, body.phone .duty td { height: 34px; font-size: 13px; }
body.phone .duty .nm { width: 70px; padding: 0 6px; }
body.phone .duty .nm small { display: none; }
body.phone .duty .st { width: 28px; }

.side .card { padding: 16px; }
.side h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.issues { display: flex; flex-direction: column; gap: 2px; max-height: 46vh; overflow: auto; margin: 0 -6px; }
.issues button { display: flex; gap: 8px; align-items: baseline; text-align: left; border: 0; background: transparent; padding: 7px 6px; border-radius: 7px; cursor: pointer; font-size: 13.5px; line-height: 1.45; }
.issues button:hover { background: var(--line2); }
.issues .dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); transform: translateY(-1px); }
.issues .dot.e { background: var(--err); }
.issues .where { flex: none; color: var(--sub); font-weight: 600; min-width: 64px; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; font-size: 13px; color: var(--sub); }
.keys kbd { font-family: inherit; font-size: 12px; font-weight: 700; background: var(--line2); color: var(--text); border-radius: 5px; padding: 2px 6px; text-align: center; }
.picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.picker button { height: 54px; border: 0; border-radius: 10px; background: var(--line2); font-size: 18px; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.picker button small { font-size: 11px; font-weight: 500; color: var(--sub); }
.picker button.on { background: var(--accent); color: var(--accent-text); }
.picker button.on small { color: var(--accent-text); }
.pop { position: fixed; z-index: 50; background: var(--card); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 10px; width: 300px; }
.pop .picker button { height: 46px; font-size: 16px; }
.pop .row { margin-top: 8px; }
.report dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 14.5px; }
.report dt { color: var(--sub); }
.report dd { margin: 0; font-weight: 600; }
.report ul { margin: 6px 0 0; padding-left: 18px; color: var(--sub); font-size: 13.5px; line-height: 1.6; max-height: 160px; overflow: auto; }
.busy { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px 0 6px; text-align: center; line-height: 1.6; }
.busy .spin { width: 34px; height: 34px; }

/* ── 내 근무 ───────────────────────── */
.me-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
body.phone .me-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.today { display: flex; gap: 18px; align-items: center; }
.today .big { width: 84px; height: 84px; border-radius: 20px; display: grid; place-items: center; font-size: 40px; font-weight: 800; background: var(--accent-weak); color: var(--accent); flex: none; }
.today .big.k-O, .today .big.k-V { background: var(--line2); color: var(--sub); font-size: 30px; }
.today .big.k-N { background: var(--n-bg); color: var(--text); }
.today h2 { font-size: 22px; }
.today .t { color: var(--sub); margin-top: 4px; }
.next-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.next-days div { background: var(--line2); border-radius: 10px; padding: 10px; text-align: center; }
.next-days b { display: block; font-size: 20px; margin-top: 2px; }
.next-days small { color: var(--sub); font-size: 12.5px; }
.mates { display: flex; flex-wrap: wrap; gap: 6px; }
.mates span { background: var(--line2); padding: 5px 10px; border-radius: 7px; font-size: 14px; }
.mates span.me { background: var(--accent-weak); color: var(--accent); font-weight: 600; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .h { text-align: center; font-size: 12.5px; color: var(--sub); font-weight: 600; padding: 4px 0; }
.cal .h.sun { color: var(--sun); } .cal .h.sat { color: var(--sat); }
.cal .d { min-height: 74px; border-radius: 10px; background: var(--line2); padding: 6px 7px; cursor: pointer; display: flex; flex-direction: column; position: relative; border: 0; text-align: left; }
.cal .d.blank { background: transparent; cursor: default; }
.cal .d .n { font-size: 12.5px; color: var(--sub); font-weight: 600; }
.cal .d.sat .n { color: var(--sat); }
.cal .d.sun .n, .cal .d.hol .n { color: var(--sun); }
.cal .d .code { margin: auto 0 2px; font-size: 22px; font-weight: 800; text-align: center; }
.cal .d.k-N { background: var(--n-bg); }
.cal .d.k-O .code, .cal .d.k-V .code { color: var(--mute); font-size: 17px; }
.cal .d.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal .d .chg { position: absolute; right: 6px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.cal .d .rq { font-size: 11.5px; font-weight: 700; margin-top: auto; text-align: center; border-radius: 6px; padding: 3px 0; background: var(--accent-weak); color: var(--accent); }
.cal .d .rq.approved { background: var(--accent); color: var(--accent-text); }
.cal .d .rq.rejected { background: transparent; color: var(--mute); text-decoration: line-through; }
.cal .d .oth { font-size: 11px; color: var(--mute); text-align: center; margin-top: 2px; }
.cal .d .oth.many { color: var(--warn); font-weight: 600; }
body.phone .cal { gap: 4px; }
body.phone .cal .d { min-height: 58px; padding: 4px 5px; border-radius: 8px; }
body.phone .cal .d .code { font-size: 18px; }
body.phone .cal .d .rq { font-size: 10.5px; }
.sums { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.sums span { font-size: 13px; color: var(--sub); background: var(--line2); padding: 5px 10px; border-radius: 7px; }
.sums b { color: var(--text); margin-left: 3px; }
.list { display: flex; flex-direction: column; }
.list .it { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line2); font-size: 14.5px; }
.list .it:last-child { border-bottom: 0; }
.list .it .when { color: var(--sub); font-size: 13px; }
.new-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); flex: none; }
.dayline { display: grid; grid-template-columns: 40px 1fr; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line2); align-items: baseline; }
.dayline:last-child { border-bottom: 0; }
.dayline b { font-size: 16px; }

/* ── 신청함·설정 ───────────────────────── */
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.three { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
body.phone .two, body.phone .three { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.req-day { padding: 12px 0; border-bottom: 1px solid var(--line2); }
.req-day:last-child { border-bottom: 0; }
.req-day .hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.req-day .hd b { font-size: 15px; }
.req-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14.5px; flex-wrap: wrap; }
.req-row .nm { font-weight: 600; min-width: 64px; }
.req-row .meta { color: var(--mute); font-size: 12.5px; }
.req-row .acts { margin-left: auto; display: flex; gap: 6px; }
.req-row.out .nm { color: var(--warn); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12.5px; color: var(--sub); font-weight: 600; padding: 6px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 6px 6px; border-bottom: 1px solid var(--line2); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .inp.sm { width: 100%; }
.scroll-x { overflow-x: auto; }
.staff-grid { display: grid; grid-template-columns: 90px repeat(3, minmax(0, 1fr)); gap: 8px; align-items: center; font-size: 14px; }
.staff-grid .h { color: var(--sub); font-size: 13px; font-weight: 600; text-align: center; }
.rules-grid { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 10px 12px; align-items: center; font-size: 14px; }
.rules-grid .inp { text-align: center; }
.checks { display: flex; gap: 8px; flex-wrap: wrap; }
.checks label { display: inline-flex; align-items: center; gap: 6px; background: var(--line2); padding: 7px 11px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.code-box { font-size: 26px; font-weight: 800; letter-spacing: .12em; }
.preview { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; letter-spacing: .06em; white-space: nowrap; }

/* ── v2: 알림·사람·조건·교환 ───────────────────── */
.bellbtn { position: relative; }
.bellbtn .badge { position: absolute; top: 0; right: 0; transform: translate(30%, -20%); }
.notis { display: flex; flex-direction: column; max-height: 60vh; overflow: auto; margin: 0 -8px; }
.noti { display: flex; gap: 10px; align-items: baseline; text-align: left; border: 0; background: transparent; padding: 11px 8px; border-radius: 9px; cursor: pointer; font-size: 14.5px; line-height: 1.45; color: var(--sub); }
.noti:hover { background: var(--line2); }
.noti.unread { color: var(--text); font-weight: 600; }
.noti .when { flex: none; font-size: 12px; color: var(--mute); font-weight: 500; }
.duty .nm .tag { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--accent); background: var(--accent-weak); padding: 1px 5px; border-radius: 4px; margin-left: 5px; vertical-align: 1px; }
.duty .nm .tag.soft { color: var(--sub); background: var(--line2); }
.duty td.na { background-image: repeating-linear-gradient(135deg, transparent 0 5px, var(--line) 5px 6px); cursor: not-allowed; }
body.phone .duty .nm .tag { display: none; }
.cal .d.k-na { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.cal .d .why { margin: auto 0 2px; font-size: 11.5px; color: var(--mute); text-align: center; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips button { border: 0; background: var(--line2); color: var(--sub); padding: 7px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.chips button.on { background: var(--accent-weak); color: var(--accent); }
.chip { display: inline-block; font-size: 12.5px; background: var(--line2); color: var(--sub); padding: 3px 8px; border-radius: 6px; margin: 1px 4px 1px 0; white-space: nowrap; }
.mustrow { display: flex; gap: 10px; align-items: flex-start; background: var(--line2); padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 14px; line-height: 1.5; }
.mustrow input { margin-top: 3px; }
.warnbox { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; line-height: 1.6; margin-top: 10px; }
.warnbox .sub { color: var(--sub); }
.cands { display: flex; flex-direction: column; gap: 6px; max-height: 56vh; overflow: auto; }
.cand { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: var(--line2); padding: 10px 12px; border-radius: 10px; cursor: pointer; line-height: 1.5; }
.cand:hover { filter: brightness(.97); }
h3 svg.ic { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; color: var(--sub); }
.why-t { font-size: 13px; color: var(--text); background: var(--line2); padding: 2px 8px; border-radius: 6px; }
.req-row .pill { height: 24px; font-size: 12px; }
.hintcard { background: var(--accent-weak); box-shadow: none; }
.hintcard .row + .row { margin-top: 8px; }
.ptbl tbody tr { cursor: pointer; }
.ptbl tbody tr:hover td { background: var(--line2); }
.ptbl td { vertical-align: middle; }
.pcards { display: flex; flex-direction: column; gap: 6px; }
.pcard { border: 0; background: var(--line2); border-radius: 10px; padding: 11px 12px; text-align: left; cursor: pointer; font-size: 14.5px; }
.pform { display: flex; flex-direction: column; gap: 4px; }
.pform .sec { padding: 12px 0; border-top: 1px solid var(--line2); }
.pform .sec:first-child { border-top: 0; padding-top: 0; }
.pform .sec-h { font-weight: 700; font-size: 14.5px; margin-bottom: 10px; }
.pform .sec-h .sub { font-weight: 500; font-size: 12.5px; margin-left: 6px; }
.pform .field { margin-bottom: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
body.phone .grid2 { grid-template-columns: 1fr; }
.absrow { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.absrow select { width: 120px; } .absrow input { width: 150px; }
.modal .foot .grow { flex: 1; }
.hrgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
body.phone .hrgrid { grid-template-columns: 1fr; }
.hrbox { background: var(--line2); border-radius: 12px; padding: 14px; }
.hrbox h4 { margin: 0 0 8px; font-size: 14.5px; }
.hrbox .it { padding: 5px 0; font-size: 14px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.picker button:disabled { opacity: .45; cursor: default; }

/* ── v3: 간호부·폰 알림·결원·자동 운행·연차 ───────────────────── */
.wardsel { height: 32px; font-weight: 700; font-size: 14px; max-width: 220px; margin-left: 4px; }
body.phone .wardsel { max-width: 150px; }
.pushrow { display: flex; align-items: center; gap: 10px; background: var(--accent-weak); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: 13.5px; line-height: 1.5; }
.pushrow svg, .hintcard svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.wgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1500px) { .wgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
body.phone .wgrid { grid-template-columns: minmax(0, 1fr); }
.wgrid .card + .card { margin-top: 0; }
.wrow { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; }
.wrow > span:first-child { min-width: 42px; color: var(--sub); font-weight: 600; }
.wal { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-height: 28px; align-items: center; }
.dmap { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.hrward { margin-bottom: 14px; }
.hrward > h4 { margin: 0 0 8px; font-size: 15px; }
.leavebar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; background: var(--line2); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: 14px; }
.aplog { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; font-size: 13px; color: var(--mute); }
.aplog .done { color: var(--accent); font-weight: 600; }
.picker.p6 { grid-template-columns: repeat(6, 1fr); }
.duty td.k-S { color: var(--warn); }
.cal .d.k-S .code { color: var(--warn); font-size: 17px; }
label.cand { cursor: pointer; }
label.cand input { flex: none; width: 18px; height: 18px; }

/* ── v4: 소통·도움말·초대·더보기 ───────────────────── */
.talkwrap { max-width: none; }
.talkseg { margin-bottom: 14px; }
.talkseg a { border: 0; background: transparent; padding: 7px 14px; border-radius: 7px; font-weight: 600; color: var(--sub); font-size: 14.5px; }
.talkseg a.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.notice { cursor: pointer; }
.notice.unread { box-shadow: inset 3px 0 0 var(--accent), var(--shadow); }
.nt-body, .pbody { margin-top: 10px; line-height: 1.7; font-size: 14.5px; white-space: normal; }
.cmts { margin-top: 10px; border-top: 1px solid var(--line2); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.cmt { font-size: 14px; line-height: 1.55; }
.replybox { margin-top: 8px; background: var(--accent-weak); border-radius: 8px; padding: 8px 10px; font-size: 13.5px; line-height: 1.6; }
.chatlog { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; min-height: 180px; overflow: auto; padding: 4px 2px; }
.msg { max-width: 86%; padding: 10px 12px; border-radius: 14px; font-size: 14.5px; line-height: 1.6; }
.msg.bot { background: var(--line2); align-self: flex-start; border-top-left-radius: 4px; }
.msg.me { background: var(--accent); color: var(--accent-text); align-self: flex-end; border-top-right-radius: 4px; }
.msg .btn { margin: 2px 4px 0 0; }
.steps { margin: 0 0 12px; padding-left: 20px; line-height: 1.9; font-size: 14.5px; }
.joinwrap { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; background: var(--bg); }
body.phone .joinwrap { padding: 16px 12px; }
.joincard { width: min(460px, 100%); padding: 24px; }
.namegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.namegrid .btn { height: 44px; }
.morelist { padding: 6px 0; }
.moreit { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 18px; border: 0; background: transparent; text-align: left; color: var(--text); font-size: 15px; font-weight: 600; cursor: pointer; border-bottom: 1px solid var(--line2); }
.moreit:last-child { border-bottom: 0; }
.moreit svg { width: 20px; height: 20px; color: var(--sub); flex: none; }
.invsec { padding: 14px 0; border-top: 1px solid var(--line2); }
.invsec:first-of-type { border-top: 0; padding-top: 4px; }
.invh { font-weight: 700; margin-bottom: 8px; }
.invlist { display: flex; flex-direction: column; max-height: 260px; overflow: auto; }
.invlist .it, .invsec > .it { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line2); }
.qr { width: 120px; height: 120px; border-radius: 8px; background: #fff; flex: none; }
#hp-t button, .seg a { cursor: pointer; }

/* ── v5: 정렬 원칙 ─────────────────────────────────────────
   1) 나란한 카드는 윗선·아랫선이 맞는다 (stretch, 둘째 카드 위 여백 0)
   2) 줄은 칸 너비·높이를 고정해 위아래가 맞는다 (.srows · .req-row 격자)
   3) 창은 탭을 눌러도 크기가 안 변한다 (.modal.fixed), 스크롤바가 생겨도 폭이 안 흔들린다 */
html { scrollbar-gutter: stable; }
.two > .card + .card, .three > .card + .card, .me-grid > .card + .card, .sgrid > .card + .card { margin-top: 0; }
.two { align-items: stretch; }
.me-grid > .span-all { grid-column: 1 / -1; margin-bottom: 0; }
.two > .sticky-side { align-self: start; position: sticky; top: 72px; }
body.phone .two > .sticky-side { position: static; }

/* 설정 화면 */
.sgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.sgrid > .card { display: flex; flex-direction: column; margin-top: 0; }
.sgrid > .span2 { grid-column: span 2; }
body.phone .sgrid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
body.phone .sgrid > .span2 { grid-column: auto; }
/* 설정 한 줄(.sr) = 이름(+작은 설명) + 입력칸. 입력칸 폭 고정·줄 높이 고정·구분선 이어짐 */
.srows { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 40px; }
.srows.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1700px) { .srows.two { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
body.phone .srows.two { grid-template-columns: minmax(0, 1fr); }
.sr { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 58px; padding: 8px 0; border-bottom: 1px solid var(--line2); }
.sr > label { display: flex; flex-direction: column; justify-content: center; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.4; }
.sr small, .srow-full small { display: block; font-size: 12px; font-weight: 400; color: var(--sub); line-height: 1.4; margin-top: 1px; }
.sr > .ctl { flex: none; width: 132px; display: flex; justify-content: flex-end; align-items: center; }
.sr .inp { width: 100%; height: 34px; text-align: center; text-align-last: center; }
.srow-full { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; padding: 8px 0; border-bottom: 1px solid var(--line2); flex-wrap: wrap; }
.srow-full > label { display: flex; flex-direction: column; font-size: 14px; font-weight: 600; line-height: 1.4; }
.sgrid .card-foot { margin-top: auto; padding-top: 14px; }
.sgrid .note { font-size: 12.5px; color: var(--sub); line-height: 1.65; margin: 14px 0 0; }
.sgrid textarea.fill { flex: 1; min-height: 300px; width: 100%; font-size: 13.5px; resize: none; }
.sgrid .h3b { margin: 26px 0 12px; }
.staff-grid { grid-template-columns: 96px repeat(3, minmax(0, 1fr)); }
.staff-grid.t2 { grid-template-columns: 96px repeat(2, minmax(0, 1fr)); }
.staff-grid .inp { height: 36px; }
.aplog { margin-top: 14px; }

/* 신청함 줄: [이름+근속·신청시각] [종류] [사유·표시] [단추] 가 줄마다 같은 자리. 넓은 화면은 날짜 묶음을 2단으로 */
.req-days { column-gap: 40px; }
@media (min-width: 1600px) { body:not(.phone) .req-days { columns: 2; column-rule: 1px solid var(--line2); } }
.req-day { break-inside: avoid; }
.req-row { display: grid; grid-template-columns: 172px 72px minmax(0, 1fr) 128px; gap: 0 12px; align-items: center; min-height: 50px; padding: 6px 0; }
.req-row .who { display: flex; flex-direction: column; align-items: flex-start; text-align: left; min-width: 0; line-height: 1.35; }
.req-row .nm { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.req-row .meta { font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; min-width: 0; }
.req-row .tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-width: 0; }
.req-row .acts { margin-left: 0; justify-self: end; display: flex; gap: 6px; align-items: center; }
body.phone .req-row { display: flex; flex-wrap: wrap; gap: 6px 10px; }
body.phone .req-row .acts { margin-left: auto; }

/* 한 줄 목록(근무 교환·결원): 내용은 한 줄, 경고 상자만 아래 줄 */
.list .it.oneline { flex-wrap: wrap; }
.it.oneline > .grow { line-height: 1.6; }
.it.oneline .full { order: 9; flex-basis: 100%; margin-top: 2px; }

/* 근무표 오른쪽 패널: 조금 넓게, 아래 끝을 표와 맞춤(검사 카드가 남는 높이를 씀) */
.board-body { grid-template-columns: minmax(0, 1fr) clamp(290px, 19vw, 380px); align-items: stretch; }
.side { display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 150px); min-height: 0; }
.side .card + .card { margin-top: 0; }
.side .card { flex: none; }
.side .grow-card { flex: 1 1 auto; min-height: 120px; display: flex; flex-direction: column; }
.side .grow-card .issues { max-height: none; flex: 1; min-height: 0; }
body.phone .side, .board-body.narrow .side { max-height: none; }

/* 고정 크기 창 (도움말 · 문의) */
.modal.fixed { width: min(940px, 100%); height: min(720px, calc(100vh - 40px)); display: flex; flex-direction: column; overflow: hidden; }
.modal.fixed > #hp-b { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
.modal.fixed .chatlog { flex: 1; max-height: none; min-height: 0; }
.modal.fixed #hp-b .foot { margin-top: auto; padding-top: 18px; }
body.phone .modal.fixed { width: 100%; height: 88vh; max-height: 88vh; }
body.phone .staff-grid { grid-template-columns: 52px repeat(3, minmax(0, 1fr)); gap: 6px; }
body.phone .staff-grid.t2 { grid-template-columns: 52px repeat(2, minmax(0, 1fr)); }
body.phone .staff-grid input[type=time] { padding: 0 6px; font-size: 13px; }

/* ── v6: 기능 켜고 끄기 · 가이드라인 · 공평 리포트 · 게시 뒤 변경 ───────────────────── */
.sgrid > .span3 { grid-column: 1 / -1; }
body.phone .sgrid > .span3 { grid-column: auto; }
.fgroup + .fgroup { margin-top: 10px; }
.fgroup h4 { margin: 14px 0 0; font-size: 14px; display: flex; align-items: baseline; gap: 8px; }
.fgroup h4 small { font-weight: 400; font-size: 12.5px; color: var(--sub); }
.glbar { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--sub); margin-top: 14px; line-height: 1.5; }
.glbar b { color: var(--text); }
.glbar .bad { color: var(--warn); font-weight: 600; }
.fairtbl th, .fairtbl td { text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fairtbl th:first-child, .fairtbl td:first-child { text-align: left; }
.fairtbl td.hi { background: var(--warn-bg); color: var(--warn); font-weight: 700; }
.fairtbl tfoot td { border-top: 1px solid var(--line); color: var(--sub); font-weight: 600; }
.fairtbl .grp { border-left: 1px solid var(--line); }
.why-box { margin-top: 4px; font-size: 12.5px; color: var(--sub); line-height: 1.55; }
.why-box.bad { color: var(--warn); }
.ackbar { display: flex; align-items: center; gap: 10px; background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; font-size: 13.5px; }
.ackbar .grow { color: var(--text); }
.modal.fixed > .fbody { flex: 1; min-height: 0; overflow: auto; }
.outsum { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; background: var(--line2); border-radius: 10px; padding: 10px 12px; margin: 0 0 6px; font-size: 14px; }

/* ── v6: 폰 정리 (26-10-23) ─────────────────────────────────
   폰(body.phone = 1100px 미만)만 손본다. PC 배치는 그대로.
   1) 글은 전체 폭으로 쓰고, 칩·단추는 그 아래 한 줄에 같은 높이(30px)로 — 상태 칩은 왼쪽, 단추는 오른쪽 끝
   2) 한국어는 낱말 단위로 줄바꿈(keep-all). 띄어쓰기 없는 긴 글(주소 등)만 넘칠 때 끊음
   3) 머리줄·도구줄은 화면 폭 안에서 정해진 자리로 줄을 나눈다(화면이 가로로 밀리지 않게) */

/* 공통 고침(PC·폰): 근무표 머리줄 '오늘' 칸이 오늘 카드(.today)의 flex 를 물려받아 표 칸·고정(sticky)이 풀리던 것 */
.duty thead th.today { display: table-cell; }
/* 동명이인 구분 번호(폰 근무표 이름 칸): 작게 붙여 이름이 잘리지 않게 */
.duty .nm .sfx { font-style: normal; font-size: 10px; font-weight: 500; color: var(--mute); margin-left: 1px; }

body.phone { word-break: keep-all; overflow-wrap: break-word; }

/* 머리줄: 간호부 병동 고르기가 줄어들어 폭 안에 들어감, 아이콘 단추는 34px 칸 */
body.phone .topbar { gap: 8px; }
body.phone .brand { flex: 0 1 auto; min-width: 0; gap: 8px; }
body.phone .wardsel { flex: 0 1 150px; min-width: 72px; margin-left: 0; }
body.phone .who { flex: none; gap: 2px; }
body.phone .who .btn.ghost.sm { width: 34px; padding: 0; }
body.phone .who .demo-flag { margin-right: 4px; }

/* 도구줄 */
body.phone .mnav h2 { font-size: 20px; min-width: 124px; }
/* 제목 줄 / 단추 줄 (사람·병원): 빈 칸(.spacer)이 줄바꿈 자리, 단추는 남는 폭을 나눠 가짐 */
body.phone .toolbar.tb-wrap > .spacer { flex: 1 0 100%; height: 0; }
body.phone .toolbar.tb-wrap > .btn { flex: 1 1 auto; }
/* 병동 근무표: [달] … [엑셀] / 게시 칩은 아래 줄 */
body.phone .toolbar.wtb > .pill { order: 5; }
/* 근무표 작업대: [달] … [되돌리기][공평] / [상태 칩][저장됨] / [자동 작성][엑셀][게시하기] 같은 폭 */
body.phone .btb #b-undo, body.phone .btb #b-fair { width: 38px; padding: 0; }
body.phone .btb .tb-sub { flex: 1 0 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
body.phone .btb .tb-sub .savestate { min-width: 0; }
body.phone .btb .tb-acts { flex: 1 0 100%; display: flex; gap: 8px; }
body.phone .btb .tb-acts > .btn { flex: 1 1 0; min-width: 0; padding: 0 8px; }

/* 신청함 한 줄: [이름][종류] … [단추] / [근속·신청 시각] / [꼭 필요·사유] — 단추는 두 줄 가운데 같은 자리 */
body.phone .req-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; grid-template-areas: "nm kd acts" "meta meta acts" "tags tags tags";
  gap: 1px 8px; align-items: center; min-height: 0; padding: 9px 0; }
body.phone .req-row .who { display: contents; }
body.phone .req-row .nm { grid-area: nm; }
body.phone .req-row .meta { grid-area: meta; }
body.phone .req-row .kd { grid-area: kd; font-size: 14px; white-space: nowrap; }
body.phone .req-row .tags { grid-area: tags; margin-top: 6px; }
body.phone .req-row .tags:empty { display: none; }
body.phone .req-row .acts { grid-area: acts; margin-left: 0; }
body.phone .req-row .acts .pill { height: 30px; font-size: 13px; }
body.phone .req-row .tags .pill, body.phone .req-row .why-t { display: inline-flex; align-items: center; height: 26px; padding: 0 8px; border-radius: 6px; font-size: 12.5px; }

/* 목록 한 줄(결원·교환·초과근무·내 신청·건의 등): 글은 전체 폭 → 다음 줄에 [상태 칩] … [단추] */
body.phone .it.oneline, body.phone .it.stk { flex-wrap: wrap; align-items: center; column-gap: 6px; row-gap: 8px; }
body.phone :is(.it.oneline, .it.stk) > .grow { flex: 1 0 100%; min-width: 0; line-height: 1.6; }
body.phone :is(.it.oneline, .it.stk) > :is(.btn, .acts):not(:is(.btn, .acts) ~ :is(.btn, .acts)) { margin-left: auto; }
body.phone :is(.it.oneline, .it.stk) > .pill, body.phone :is(.it.oneline, .it.stk) > .btn.sm, body.phone :is(.it.oneline, .it.stk) > .acts > .btn.sm { height: 30px; font-size: 13px; }
body.phone .it.oneline > .full { margin-top: 0; }
/* 카드 제목 줄의 칩·단추 같은 높이 */
body.phone .card h3 > .btn.sm { height: 28px; }
/* 자동 작성 창의 설명 줄: 글 사이 숫자가 따로 떨어지지 않게 */
body.phone .list .it.txt { display: block; }

/* 공지 카드: 제목은 전체 폭, [작성자·날짜 … 읽음·지우기]는 아래 줄 */
body.phone .nt-tl { line-height: 1.5; }
body.phone .nt-tl .pill { margin-right: 2px; }
body.phone .nt-ml { margin-top: 2px; gap: 2px; flex-wrap: nowrap; }
/* 댓글·답변 입력 줄: 단추를 입력칸 높이(32px)에 맞춤 */
body.phone .cform .btn.sm, body.phone .vbox .row .btn.sm { height: 32px; }
/* 입력칸(42px) 옆 보통 단추도 같은 높이 */
body.phone .row > .inp:not(.sm) ~ .btn:not(.sm) { height: 42px; }

/* 알림 안내줄·안내 카드: [아이콘][글]은 한 줄 폭, 단추는 아래 줄 오른쪽 */
body.phone .pushrow, body.phone .hintcard .row { flex-wrap: wrap; row-gap: 8px; }
body.phone .pushrow > .grow, body.phone .hintcard .row > .grow { flex: 1 1 calc(100% - 34px); }
body.phone .pushrow > .btn:first-of-type, body.phone .hintcard .row > .btn:first-of-type { margin-left: auto; }

/* 후보 고르기(교환·대타 창): 칩은 오른쪽 위, 설명은 전체 폭 */
body.phone .cand { position: relative; align-items: flex-start; }
body.phone .cand > .pill { position: absolute; top: 10px; right: 12px; }

/* 창 아래 단추: 폭이 모자라면 다음 줄로, 빈 칸(.grow)은 보조 단추와 주 단추 사이 줄바꿈 */
body.phone .modal .foot { flex-wrap: wrap; }
body.phone .modal .foot .grow { flex: 1 0 100%; height: 0; }
/* 초대하기 창: 링크 칸은 한 줄 전체, 단추는 아래 줄 */
body.phone #iv-link { flex: 1 0 100%; }
body.phone #iv-link ~ .btn { flex: 1 1 auto; }

/* 설정 */
body.phone .wtop > .grow { flex: 1 0 100%; }
body.phone .wtop > .wcode { text-align: left !important; }
body.phone .wtop > .wcode + .btn { margin-left: auto; }
body.phone .srow-full > .checks { flex: 1 0 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.phone .sgrid > .span3 > .row > h3 { flex: 1 0 100%; }
body.phone .staff-grid:not(.t2) { grid-template-columns: 84px repeat(3, minmax(0, 1fr)); }
/* 켜고 끄기 줄은 스위치만큼만 칸을 써서 이름·설명이 넓게 (입력칸·고르기 줄은 132px 칸 그대로) */
body.phone .sr > .ctl:has(> .switch) { width: auto; }

/* 근무 바꾸기 확인 창: 미리보기(경고 상자) 아래 한마디 칸과 간격 */
body.phone #sw-prev + .field { margin-top: 14px; }

/* 병원(간호부) 병동 카드: 단추가 줄 폭을 나눠 가짐 */
body.phone .wcard > .row:last-child > .btn { flex: 1 1 auto; }

/* ── v7(2026-10-24): 직급·경력 연차 · 설명해줘 ── */
/* 사람 화면: 경력 연차별로 보기 */
.tierbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.tierbar .lb { font-size: 13px; color: var(--sub); font-weight: 600; margin-right: 4px; }
.tierbar button { border: 0; background: var(--line2); color: var(--sub); height: 30px; padding: 0 11px; border-radius: 8px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.tierbar button b { margin-left: 4px; color: var(--text); }
.tierbar button.on { background: var(--accent-weak); color: var(--accent); }
.tierbar button.on b { color: var(--accent); }
body.phone .tierbar a { flex: 1 0 100%; margin-left: 0 !important; }
.careerbox { min-height: 42px; display: flex; flex-direction: column; justify-content: center; padding: 6px 12px; border-radius: 9px; background: var(--line2); font-size: 14px; line-height: 1.45; }

/* 설정: 직급·경력 연차 카드 — 왼쪽 스위치, 오른쪽 구간 표(칸 폭 고정) */
.crgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 8px 40px; align-items: start; }
body.phone .crgrid { grid-template-columns: minmax(0, 1fr); }
.tiers .tr { display: grid; grid-template-columns: minmax(90px, 1fr) 124px 120px 56px 60px; align-items: center; gap: 10px; min-height: 50px; border-bottom: 1px solid var(--line2); font-size: 14px; }
.tiers .tr.th { min-height: 34px; font-size: 12.5px; color: var(--sub); font-weight: 600; }
.tiers .ctl { display: flex; align-items: center; gap: 6px; }
.tiers .ctl .inp { width: 58px; height: 34px; text-align: center; }
.tiers .ctl small { font-size: 12.5px; color: var(--sub); white-space: nowrap; }
.tiers .cnt { font-weight: 600; }
.tiers.off { opacity: .45; }
body.phone .tiers .tr { grid-template-columns: minmax(0, 1fr) 50px 50px 34px 46px; gap: 6px; font-size: 13.5px; }
body.phone .tiers .tr.th { font-size: 11.5px; line-height: 1.25; }
body.phone .tiers .ctl small { display: none; }
body.phone .tiers .ctl .inp { width: 50px; }
body.phone .tiers .btn.sm { padding: 0 6px; }

/* 설명해줘 단추 · 안내 띠 */
.xpbtn span { font-weight: 700; }
.xpbtn.on, .xpbtn.on:hover { background: var(--accent); color: var(--accent-text); }
body.phone .who .btn.ghost.sm.xpbtn { width: auto; padding: 0 8px; gap: 3px; }
.xpbar { position: sticky; top: 56px; z-index: 29; display: flex; align-items: center; gap: 10px; padding: 8px 20px; background: var(--accent-weak); font-size: 15px; font-weight: 600; }
.xpbar > svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
body.phone .xpbar { top: 52px; padding: 7px 12px; gap: 6px; font-size: 13.5px; }
body.xmode [data-xp] { cursor: help; }
body.xmode .xp-hot { outline: 2px solid var(--accent); outline-offset: -2px; }
.xp-flash { animation: xpf 1.8s ease; }
@keyframes xpf { 0%, 65% { outline: 3px solid var(--accent); outline-offset: 1px; } 100% { outline: 3px solid transparent; outline-offset: 1px; } }

/* 올리자마자 뜨는 큰 글씨 설명(클릭을 가로채지 않음) */
.xtip { position: fixed; z-index: 96; pointer-events: none; max-width: 400px; background: #1f2633; color: #fff; border-radius: 12px; padding: 12px 15px; line-height: 1.6; box-shadow: 0 10px 30px rgba(0,0,0,.25); white-space: pre-line; }
.xtip b { display: block; font-size: 1.05em; margin-bottom: 3px; }

/* 설명 창: PC 는 오른쪽에 붙고 본문이 비켜 남, 폰은 전체 화면 */
.xpanel.side { position: fixed; top: 56px; right: 0; bottom: 0; width: 380px; z-index: 70; background: var(--card); box-shadow: -1px 0 0 var(--line), -10px 0 30px rgba(0,0,0,.06); display: flex; flex-direction: column; }
body.xpanel-on .main, body.xpanel-on .xpbar { margin-right: 380px; }
body.xpanel-on .dim { padding-right: 400px; }
.xpanel .xp-h { display: flex; align-items: center; gap: 4px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.xpanel .xp-h b { font-size: 17px; margin-right: 6px; }
.xpanel .xp-b { flex: 1; overflow: auto; padding: 14px 14px 24px; line-height: 1.65; }
.xp-intro { margin: 0 0 12px; padding: 12px 14px; background: var(--line2); border-radius: 10px; }
.xpanel h5 { font-size: .78em; color: var(--sub); margin: 14px 0 4px 12px; }
.xp-list { list-style: none; margin: 0; padding: 0; }
.xp-list li { padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.xp-list li:hover, .xp-list li.on { background: var(--accent-weak); }
.xp-list li b { display: block; }
.xpanel .xp-f { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.5; }
.xsheet { position: fixed; inset: 0; z-index: 95; background: rgba(10, 14, 22, .38); display: flex; align-items: flex-end; }
.xsheet .xs-card { width: 100%; background: var(--card); border-radius: 18px 18px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); line-height: 1.65; max-height: 80vh; overflow: auto; }
.xsheet .xs-card > b { font-size: 1.1em; }
.xsheet .xs-card p { margin: 8px 0 16px; }
.xs-foot { display: flex; flex-wrap: wrap; gap: 8px; }
.xs-foot .btn { flex: 1 1 auto; height: 46px; }
.xsheet.full { background: var(--bg); align-items: stretch; }
.xsheet.full .xpanel { width: 100%; display: flex; flex-direction: column; background: var(--card); padding-bottom: env(safe-area-inset-bottom); }

/* 설명서(#/guide): 큰 글씨, 인쇄 */
.guide { max-width: 820px; margin: 0 auto; padding: 8px 20px 60px; line-height: 1.7; }
.guide .g-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 12px 0; }
.guide h1 { font-size: 1.5em; margin: 0; }
.guide .g-lead { margin: 4px 0 14px; }
.g-toc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.g-toc a { padding: 6px 12px; border-radius: 8px; background: var(--line2); color: var(--text); font-size: .85em; font-weight: 600; }
.g-sec { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; margin-bottom: 14px; scroll-margin-top: 70px; }
.g-sec h2 { font-size: 1.25em; margin: 0 0 6px; }
.g-intro { margin: 0 0 6px; color: var(--sub); }
.g-sec dl { margin: 0; }
.g-sec dt { font-weight: 700; margin-top: 12px; }
.g-sec dd { margin: 2px 0 0; }
body.phone .guide { padding: 4px 12px 40px; }
@media print {
  .guide .g-top .btn, .g-toc { display: none; }
  .guide .g-top { position: static; }
  .g-sec { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  html, body { background: #fff; }
}

/* ── 26-10-28 약관·처리방침 동의 · 자동응답 ───────────────────── */
.consent { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.consent .mustrow { font-size: 13.5px; }
.consent a, .mustrow a { text-decoration: underline; }
.login-legal { text-align: center; font-size: 12.5px; color: var(--sub); margin: 14px 0 0; }
.hp-legal { margin: 10px 0 0; font-size: 12.5px; color: var(--sub); text-align: center; flex: none; }
.legal-links a { color: inherit; text-decoration: underline; }
.msg .xpans { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.sec.locked .grid2, .sec.locked .mustrow { opacity: .55; }

/* 26-11-02 쓰옾(사흘 연속 오프) — 내 근무 달력은 이어진 쉬는 날 아래에 얇은 띠, 신청 달력은 '쓰옾' 글자 */
.cal .d.sq { background-image: linear-gradient(var(--accent), var(--accent)); background-size: 100% 3px; background-position: bottom; background-repeat: no-repeat; }
.cal .d.sq .code { color: var(--accent); }
.cal .d .rq.sq { letter-spacing: -.02em; }

/* ── 26-11-03 폰 정리 2: 달 옮기기는 가운데 한 줄 · 쓰옾 묶음 줄 · 처음 안내 ── */
body.phone .mnav { flex: 1 0 100%; justify-content: center; }
body.phone .btb > .spacer { display: none; }
body.phone .btb .tb-sub { order: 1; flex: 1 1 auto; }
body.phone .btb > #b-undo, body.phone .btb > #b-fair { order: 2; }
body.phone .btb .tb-acts { order: 3; }
body.phone .rqtb { justify-content: center; }
body.phone .rqtb > .spacer { display: none; }
body.phone .toolbar.wtb > .pill { order: 1; }
body.phone .toolbar.wtb > .spacer { order: 2; }
body.phone .toolbar.wtb > .btn { order: 3; }
body.phone .sq-top { display: none; }          /* 내 근무: 달력 아래 합계에 '쓰옾 N'이 이미 있음 */
body.phone .wardsel { flex: 1 1 auto; max-width: 170px; }
.req-row.sq-cont { min-height: 0; color: var(--sub); }
.req-row.sq-cont .nm { font-weight: 500; }
.req-row.sq-cont .kd { font-weight: 500; }
.req-row.sq-cont .tags .sub { font-size: 12.5px; }
body.phone .req-row.sq-cont { grid-template-areas: "nm kd acts" "tags tags tags"; }
body.phone .req-row.sq-cont .tags { margin-top: 2px; }

.tour .t-step { font-size: 13px; font-weight: 700; color: var(--accent); }
.tour h3 { font-size: 21px; margin: 6px 0 12px; }
.tour .t-body { font-size: 16px; line-height: 1.7; }
.tour .t-body p { margin: 0 0 10px; }
.tour .t-body ol { margin: 4px 0 0; padding-left: 22px; }
.tour .t-body li { margin-bottom: 6px; }
.tour .t-xp { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 7px; background: var(--accent-weak); color: var(--accent); font-weight: 700; font-size: 15px; vertical-align: 1px; }
.tour .t-xp svg { width: 15px; height: 15px; }
.tour .t-dots { display: flex; gap: 6px; justify-content: center; margin: 18px 0 2px; }
.tour .t-dots i { width: 7px; height: 7px; border-radius: 4px; background: var(--line); }
.tour .t-dots i.on { width: 20px; background: var(--accent); }
.xpbtn.pulse { animation: xpPulse 1.3s ease-out 4; }
@keyframes xpPulse { 0% { box-shadow: 0 0 0 0 rgba(47, 111, 237, .6); } 100% { box-shadow: 0 0 0 12px rgba(47, 111, 237, 0); } }

/* ── 26-11-03 설명 끄기 찾기 쉽게: 짚어 주기(coach)·띠의 [설명 끄기 ×]·설명 창 아래 끄기 ── */
.coach { position: fixed; inset: 0; z-index: 96; }
.coach .c-ring { position: fixed; border-radius: 12px; border: 3px solid #fff; box-shadow: 0 0 0 9999px rgba(10, 14, 22, .58); cursor: pointer; }
.coach .c-ring::after { content: ''; position: absolute; inset: -3px; border: 3px solid #fff; border-radius: 13px; animation: coachRing 1.4s ease-out infinite; }
@keyframes coachRing { from { transform: scale(1); opacity: 1; } to { transform: scale(1.45); opacity: 0; } }
.coach .c-tip { position: fixed; width: min(300px, calc(100vw - 24px)); background: var(--card); color: var(--text); border-radius: 14px; padding: 16px 16px 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, .28); font-size: 16px; line-height: 1.6; }
.coach .c-tip::before { content: ''; position: absolute; top: -9px; left: calc(var(--ax, 50%) - 9px); border: 9px solid transparent; border-top: 0; border-bottom-color: var(--card); }
.coach .c-tip b { display: block; font-size: 18px; }
.coach .c-tip p { margin: 6px 0 14px; color: var(--sub); }
.coach .c-foot { display: flex; gap: 8px; }
.coach .c-foot .btn { flex: 1; height: 44px; }
.xpbar .xp-off { background: var(--card); color: var(--accent); font-weight: 700; box-shadow: var(--shadow); }
.xpbar .xp-off b { font-size: 16px; line-height: 1; margin-left: 2px; }
.xs-off { display: block; width: 100%; margin-top: 12px; padding: 10px 0 2px; border: 0; background: none; color: var(--sub); font: inherit; font-size: 14px; cursor: pointer; }
.xs-off b { color: var(--accent); }
