/* APDAY 콘텐츠팀 — 밝은 회색 바탕 + 흰 카드, 명확한 주요 버튼과 상태 표시 */
:root {
  --bg: #f2f4f6;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --line: #e5e8eb;
  --line-strong: #d1d6db;
  --text: #191f28;
  --text-2: #4e5968;
  --muted: #8b95a1;
  --primary: #3182f6;
  --primary-press: #1b64da;
  --primary-soft: #e8f3ff;
  --danger: #f04452;
  --danger-soft: #ffeeee;
  --success: #03b26c;
  --success-soft: #e5f8ef;
  --warn: #fe9800;
  --warn-soft: #fff3e0;
  --black: #191f28;
  --slack: #4a154b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 2px 8px rgba(0, 0, 0, .04);
  --sidebar: 232px;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100vh; overflow-x: hidden; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
img, video { max-width: 100%; display: block; }
.boot { padding: 40px; color: var(--muted); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.sub { color: var(--text-2); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { margin-left: auto; }
.num { font-variant-numeric: tabular-nums; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------- 레이아웃 ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--surface) calc(var(--sidebar) - 1px), var(--line) calc(var(--sidebar) - 1px), var(--line) var(--sidebar), var(--bg) var(--sidebar)); }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 700; font-size: 16px; }
.brand img { width: 28px; height: 28px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { margin: 14px 10px 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 500; text-decoration: none;
}
.nav a:hover { background: var(--surface-2); }
.nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.nav .count { margin-left: auto; min-width: 22px; padding: 0 7px; height: 20px; border-radius: 10px; background: var(--bg); color: var(--text-2); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.nav a.active .count { background: #fff; color: var(--primary); }
.nav .count.alert { background: var(--danger); color: #fff; }
.me { margin-top: auto; border-top: 1px solid var(--line); padding: 14px 10px 0; display: flex; flex-direction: column; gap: 6px; }
.me-name { font-weight: 700; }
.me-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.main { min-width: 0; padding: 28px 32px 60px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 24px; margin: 0; letter-spacing: -0.3px; }
.page-head .desc { color: var(--text-2); margin-top: 4px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.topbar { display: none; }
.nav-scrim { display: none; }

/* ---------- 카드 ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 12px; }
.card-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; margin: 0 0 12px; }
.card-title .right { font-weight: 500; font-size: 13px; }
.section-title { font-weight: 700; font-size: 15px; margin: 24px 0 10px; display: flex; align-items: center; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-nowrap { display: flex; align-items: center; gap: 8px; min-width: 0; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--bg); color: var(--text); font-weight: 600; cursor: pointer; white-space: nowrap;
  text-decoration: none; transition: background .12s, border-color .12s;
}
.btn:hover { background: #e8ebee; text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-press); }
.btn.black { background: var(--black); color: #fff; }
.btn.black:hover { background: #333d4b; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger-ghost { background: transparent; color: var(--danger); border-color: #ffd4d8; }
.btn.danger-ghost:hover { background: var(--danger-soft); }
.btn.ghost { background: transparent; border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.success { background: var(--success); color: #fff; }
.btn.slack { background: #fff; color: var(--text); border: 1px solid var(--line-strong); height: 48px; font-size: 15px; width: 100%; gap: 10px; }
.btn.slack:hover { background: var(--surface-2); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 46px; padding: 0 20px; font-size: 15px; }
.btn.link { background: none; border: 0; color: var(--primary); padding: 0 4px; height: auto; }
.btn.link:hover { text-decoration: underline; background: none; }
.btn.icon { width: 30px; padding: 0; }

/* ---------- 폼 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13px; color: var(--text-2); font-weight: 600; }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; outline: none; min-width: 0;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(49, 130, 246, .15); }
.input.sm, .select.sm { height: 32px; padding: 0 8px; font-size: 13px; border-radius: 8px; }
.textarea { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.input.invalid { border-color: var(--danger); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; height: 40px; }
.toggle input { width: 18px; height: 18px; accent-color: var(--primary); }
.seg { display: inline-flex; background: var(--bg); border-radius: var(--radius-sm); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; height: 32px; padding: 0 12px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--text-2); }
.seg button.on { background: #fff; color: var(--text); box-shadow: var(--shadow); }
.form-error { background: var(--danger-soft); color: #c4242e; border-radius: var(--radius-sm); padding: 10px 12px; font-weight: 600; }

/* ---------- 칩·배지 ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 600; background: var(--bg); color: var(--text-2); white-space: nowrap; }
.chip.blue { background: var(--primary-soft); color: var(--primary); }
.chip.green { background: var(--success-soft); color: #038a54; }
.chip.red { background: var(--danger-soft); color: #d22030; }
.chip.orange { background: var(--warn-soft); color: #c66f00; }
.chip.dark { background: var(--black); color: #fff; }
.due { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.due .left { font-weight: 600; color: var(--text-2); }
.due.soon .left { color: #c66f00; }
.due.today .left, .due.over .left { color: var(--danger); }
.due.over { color: var(--danger); }
.who { font-weight: 700; color: var(--text); white-space: nowrap; }
.who.none { color: var(--muted); font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--line-strong); }
.dot.on { background: var(--success); }

/* ---------- 상태 ---------- */
.state { padding: 36px 16px; text-align: center; color: var(--muted); }
.state .big { font-size: 15px; color: var(--text-2); font-weight: 600; margin-bottom: 4px; }
.state.error .big { color: var(--danger); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.notice.warn { background: var(--warn-soft); border-color: #ffe0b2; color: #8a4f00; }
.notice.danger { background: var(--danger-soft); border-color: #ffd4d8; color: #b0202c; }
.notice.info { background: var(--primary-soft); border-color: #cfe3ff; color: #1957b8; }
.notice b { color: inherit; }
.skeleton { height: 56px; border-radius: 12px; background: linear-gradient(90deg, #eef0f2 0%, #f6f7f8 50%, #eef0f2 100%); background-size: 200% 100%; animation: sk 1.2s infinite; }
.skeleton + .skeleton { margin-top: 8px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- 표 ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--surface-2); }
.table td.name { font-weight: 700; max-width: 340px; min-width: 160px; }
.table td.wrap { min-width: 200px; }
table.ref-table { min-width: 1000px; }
.table td.num { white-space: nowrap; }
.grid-2 > .card + .card, .grid-3 > .card + .card { margin-top: 0; }
.table .input.sm, .table .select.sm { min-width: 80px; }

/* ---------- 업무 행(낮은 카드) ---------- */
.items { display: flex; flex-direction: column; gap: 8px; }
.item {
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; min-height: 60px; flex-wrap: wrap;
}
.item .title { font-weight: 700; font-size: 15px; min-width: 0; flex: 1 1 220px; }
.item .meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--text-2); }
.item .acts { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.item.hl { box-shadow: 0 0 0 2px var(--primary) inset, var(--shadow); }
.item.over { box-shadow: inset 4px 0 0 var(--danger), var(--shadow); }

/* ---------- 스탯 ---------- */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--surface); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: block; }
.stat:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--primary-soft), var(--shadow); }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 22px; font-weight: 800; margin-top: 2px; }

/* ---------- 2단 업무 화면 (목록 + 작업) ---------- */
.split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.split.top { grid-template-columns: minmax(0, 1fr); }
.split.top .picker { position: static; max-height: none; flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
.split.top .pick { min-width: 240px; max-width: 320px; flex: none; }
.picker { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 2px; }
.pick { text-align: left; background: var(--surface); border: 1px solid transparent; border-radius: 12px; padding: 10px 12px; cursor: pointer; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.pick:hover { border-color: var(--line-strong); }
.pick.on { border-color: var(--primary); background: var(--primary-soft); }
.pick .n { font-weight: 700; }
.pick .m { display: flex; gap: 10px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; align-items: center; }

/* ---------- 요청 GIF / 썸네일 결과 ---------- */
.req-list { display: flex; flex-direction: column; gap: 8px; }
.req { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.req.done { background: var(--success-soft); border-color: #b6ebd2; }
.req .rq-title { font-weight: 700; }
.req .rq-no { color: var(--muted); font-weight: 700; margin-right: 6px; }
.slot { display: flex; align-items: center; gap: 10px; justify-content: flex-end; min-width: 0; }
.slot .thumb { width: 64px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--bg); flex: none; }
.slot .info { min-width: 0; font-size: 12px; }
.req-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.req-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; }
.req-chip.done { background: var(--success-soft); border-color: #b6ebd2; }
.req-chip button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0 2px; }

/* ---------- 대본·기획안 ↔ 예시 이미지 (좌우 동일 높이) ---------- */
.plan-sec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: stretch; margin-bottom: 12px; }
.plan-left, .plan-right { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fff; display: flex; flex-direction: column; gap: 10px; min-height: 280px; }
.plan-sec-head { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.plan-sec-head .tag { background: var(--black); color: #fff; border-radius: 8px; padding: 2px 8px; font-size: 12px; }
.plan-left .textarea { flex: 1; min-height: 90px; }
.plan-right { outline: none; }
.plan-right:focus-within, .plan-right:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(49, 130, 246, .12); }
.paste-zone { border: 1.5px dashed var(--line-strong); border-radius: 12px; padding: 12px; text-align: center; color: var(--muted); cursor: pointer; font-size: 13px; }
.paste-zone:hover { border-color: var(--primary); color: var(--primary); }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; flex: 1; align-content: start; overflow-y: auto; }
.img-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface-2); display: flex; flex-direction: column; }
.img-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #eef0f2; cursor: zoom-in; }
.img-card .memo { border: 0; border-top: 1px solid var(--line); padding: 6px 8px; font-size: 12px; background: #fff; outline: none; width: 100%; resize: none; min-height: 44px; }
.img-card .img-acts { display: flex; justify-content: flex-end; padding: 2px 4px; background: #fff; }
.concept-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.concept-tabs .tab { height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--line-strong); background: #fff; cursor: pointer; font-weight: 600; }
.concept-tabs .tab.on { background: var(--black); color: #fff; border-color: var(--black); }
.save-state { font-size: 12px; color: var(--muted); }
.save-state.err { color: var(--danger); }

/* ---------- 파일·미디어 ---------- */
.files { display: flex; flex-direction: column; gap: 6px; }
.file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.file .fname { font-weight: 600; min-width: 0; flex: 1; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.media { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.media video, .media img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: #111; }
.media img { background: #eef0f2; }
.media .cap { padding: 8px 10px; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.nas { font-size: 12px; font-weight: 600; white-space: nowrap; }
.nas.done { color: var(--success); }
.nas.failed { color: var(--danger); }
.nas.pending { color: #c66f00; }
.nas.not_configured, .nas.web_only { color: var(--muted); }
.progress { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--primary); width: 0; transition: width .15s; }

/* ---------- 수익성 ---------- */
.calc { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.calc .k { font-size: 12px; color: var(--muted); }
.calc .v { font-weight: 800; font-size: 16px; }
.calc .v.bad { color: var(--danger); }
.calc .v.good { color: var(--success); }
.roas-alert { margin-top: 8px; background: var(--danger); color: #fff; padding: 10px 12px; border-radius: 10px; font-weight: 700; }
.opt-row { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)) 30px; gap: 6px; align-items: center; }
.opt-row .res { font-size: 12px; color: var(--text-2); grid-column: 1 / -1; order: 9; margin: -2px 0 6px 2px; }
.opt-row .res:empty { display: none; }
.opt-row .res.bad { color: var(--danger); font-weight: 700; }
.dyn-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 30px; gap: 6px; align-items: center; }

/* ---------- 모달 ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 50; overflow-y: auto; }
.modal { background: #fff; border-radius: 20px; width: 100%; max-width: 560px; box-shadow: 0 20px 60px rgba(0, 0, 0, .2); display: flex; flex-direction: column; max-height: calc(100vh - 80px); }
.modal.wide { max-width: 920px; }
.modal-head { padding: 20px 24px 8px; display: flex; align-items: center; gap: 8px; }
.modal-head h2 { margin: 0; font-size: 19px; }
.modal-body { padding: 8px 24px 16px; overflow-y: auto; }
.modal-foot { padding: 12px 24px 20px; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--line); flex-wrap: wrap; }
.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .85); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 20px; cursor: zoom-out; }
.lightbox img { max-height: 90vh; max-width: 95vw; border-radius: 8px; }

/* ---------- 토스트 ---------- */
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 70; align-items: center; pointer-events: none; }
.toast { background: rgba(25, 31, 40, .94); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); max-width: min(560px, calc(100vw - 32px)); animation: tin .18s ease-out; }
.toast.err { background: var(--danger); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 로그인 ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 36px 32px; width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.auth-card h1 { margin: 6px 0 0; font-size: 24px; }
.auth-card .logo { width: 44px; height: 44px; }
.dev-box { border: 1px dashed var(--warn); border-radius: 14px; padding: 12px; background: var(--warn-soft); display: flex; flex-direction: column; gap: 8px; }
.dev-box .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

/* ---------- 타임라인 ---------- */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.tl:last-child { border-bottom: 0; }

/* ---------- 탭 ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a, .tabs button { padding: 10px 14px; border: 0; background: none; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; }
.tabs a.on, .tabs button.on { color: var(--text); border-bottom-color: var(--text); }

pre.report { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 0; font-family: inherit; line-height: 1.7; }

/* ---------- 반응형 ---------- */
@media (max-width: 1100px) {
  .split { grid-template-columns: 240px minmax(0, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; z-index: 40; transform: translateX(-100%); transition: transform .2s; visibility: hidden; }
  .shell.nav-open .sidebar { transform: none; visibility: visible; box-shadow: 0 0 40px rgba(0, 0, 0, .15); }
  .shell { background: var(--bg); }
  .plan-left, .plan-right { min-height: 0; }
  .table th, .table td { white-space: nowrap; }
  /* 모바일 카드형 표: 머리글 숨기고 행을 카드로, 칸마다 data-label 표시 */
  table.mcards thead { display: none; }
  table.mcards, table.mcards tbody, table.mcards tr, table.mcards td { display: block; width: 100%; }
  table.mcards tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  table.mcards tr:last-child { border-bottom: 0; }
  table.mcards td { border: 0; padding: 3px 0; white-space: normal; display: flex; align-items: center; gap: 10px; min-width: 0; max-width: none; }
  table.mcards td[data-label]::before { content: attr(data-label); flex: none; width: 76px; font-size: 12px; color: var(--muted); font-weight: 600; }
  table.mcards td.name { font-size: 15px; }
  table.mcards td .select { flex: 1; }
  .table td.wrap, .table td.name { white-space: normal; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shell.nav-open .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .3); z-index: 35; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px; font-weight: 700; }
  .main { padding: 18px 16px 48px; }
  .page-head h1 { font-size: 20px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .picker { position: static; max-height: none; flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .pick { min-width: 220px; }
  .grid-2, .grid-3, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .plan-sec { grid-template-columns: minmax(0, 1fr); }
  .req { grid-template-columns: minmax(0, 1fr); }
  .slot { justify-content: flex-start; }
  .opt-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 30px; }
  .opt-row .res { grid-column: 1 / -1; }
  .item .acts { margin-left: 0; width: 100%; }
  .file { flex-wrap: wrap; }
  .file .fname { flex-basis: 100%; }
  .file .nowrap { white-space: normal; }
  .modal-back { padding: 0; }
  .modal { border-radius: 0; max-height: 100vh; min-height: 100vh; }
  .tl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
