:root {
  /* 스테이위브 브랜드: 구리빛 오렌지 심볼, 차콜 글자, 따뜻한 크림 바탕 */
  --copper: #c4652f; --copper-dark: #a9501f; --copper-tint: #f8e9dd; --copper-soft: #fbf3ec;
  --blue: var(--copper-dark); --red: #c9413f; --red-ink: #b3322f; --green: var(--text); --plus: #d23f3f; --minus: #2f6fd1;
  --bg: #f6f3ee; --card: #ffffff; --line: #e9e3da; --text: #2b2f36; --muted: #5f636b; --sand-tint: #ebe6de; --field-line: #8c8172;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; word-break: keep-all; overflow-wrap: anywhere; background: var(--bg); color: var(--text); font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; font-size: 15px; line-height: 1.45; -webkit-text-size-adjust: 100%; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.num { font-variant-numeric: tabular-nums; }
body.noscroll { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .sm { font-size: 13px; } .b { font-weight: 700; } .red { color: var(--red); } .blue { color: var(--blue); } .center { text-align: center; }
.sub { font-size: 12px; color: var(--muted); }

#app { max-width: 560px; margin: 0 auto; padding: 0 16px calc(76px + env(safe-area-inset-bottom)); }
.demobar { margin: 8px -16px 0; padding: 6px 16px; background: var(--copper-tint); color: var(--copper-dark); font-size: 12px; text-align: center; }

.back { color: var(--blue); font-size: 14px; margin-bottom: 4px; display: block; }
.card { background: var(--card); border-radius: 14px; padding: 16px; margin-bottom: 10px; box-shadow: 0 1px 1px rgba(40,30,20,.04), 0 0 0 1px rgba(40,30,20,.03); }
.card.slim { padding: 10px 14px; } .card.link { text-align: left; width: 100%; background: var(--copper-tint); display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .grid2.gap { margin-bottom: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.h2 { font-size: 22px; font-weight: 700; margin: 2px 0 10px; letter-spacing: -0.02em; } .h3 { font-size: 13px; font-weight: 700; margin-bottom: 10px; color: var(--muted); letter-spacing: .02em; } .h3 .cnt { font-weight: 500; margin-left: 4px; }
.big { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; } .big small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.stat { padding: 2px 0; } .kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 0; } .kpi .stat { padding: 10px 12px; } .kpi .stat .sm { white-space: nowrap; font-size: 12px; } .kpi .stat:nth-child(odd) { border-right: 1px solid var(--line); } .kpi .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } .card.kpi { padding: 4px; }
.delta { font-size: 12px; font-weight: 600; } .delta.up { color: var(--plus); } .delta.down { color: var(--minus); } .delta.flat { color: var(--muted); }
.neg { color: var(--minus); } .pos { color: var(--plus); }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; } .chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; padding: 7px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--field-line); font-size: 14px; text-align: center; }
.chip.on { background: var(--text); color: #fff; border-color: var(--text); }
.sorts { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin-bottom: 10px; } .sorts .on { color: var(--text); font-weight: 700; }
.seg { display: flex; background: #eae5dd; border-radius: 10px; padding: 3px; margin-bottom: 12px; } .seg button { flex: 1; padding: 8px; border-radius: 8px; font-size: 14px; text-align: center; } .seg .on { background: #fff; font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.search { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--field-line); background: #fff; margin-bottom: 12px; }

.btn { text-align: center; padding: 10px 14px; border-radius: 10px; background: var(--copper-tint); color: var(--copper-dark); font-weight: 600; font-size: 14px; }
.btn.primary { background: var(--copper-dark); color: #fff; }
.btn.outline { background: transparent; color: var(--copper-dark); border: 1.5px solid #e2c9b6; }
a.btn { display: inline-block; text-decoration: none; }
.btn.dark { background: var(--text); color: #fff; }
.btn.disabled, .btn:disabled { background: #ebe6de; color: #a7a39c; cursor: default; }
body.readonly .btn.dark { display: none !important; } .btn.ghost { background: transparent; color: var(--muted); } .btn.wide { width: 100%; display: block; margin-top: 10px; padding: 13px; font-size: 15px; } .btn.sm { padding: 7px 11px; font-size: 13px; } .btn.red { color: var(--red); }
.btn:disabled { opacity: .5; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.task { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.tmain { flex: 1; min-width: 0; } .task:first-of-type { border-top: 0; padding-top: 4px; }
.tmain { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; } .tmain .muted { grid-column: 2; }
.tmain.notag { display: block; } .tmain.notag .muted { margin-top: 2px; }
.ttitle { font-weight: 600; font-size: 15px; word-break: keep-all; }
.tbtns { display: flex; gap: 6px; flex-shrink: 0; justify-content: flex-end; }
@media (max-width: 440px) { .tbtns { flex-direction: column; align-items: stretch; min-width: 88px; } .tbtns .btn.sm { text-align: center; } }
.tbtns .btn.sm { padding: 7px 10px; white-space: nowrap; }
.tag, .mtag { display: inline-flex; align-items: center; justify-content: center; height: 22px; font-size: 12px; font-weight: 700; line-height: 1; padding: 0 8px; border-radius: 6px; background: var(--sand-tint); color: var(--muted); vertical-align: middle; white-space: nowrap; }
.tag.red { background: #fae5e4; color: var(--red-ink); } .tag.blue { background: var(--copper-tint); color: var(--copper-dark); } .tag.green { background: #ebe6de; color: var(--text); } .tag.orange, .tag.yellow { background: var(--copper-soft); color: var(--copper-dark); box-shadow: inset 0 0 0 1px var(--copper-tint); } .tag.gray { background: var(--sand-tint); color: var(--muted); }

.rooms { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.room { background: #fff; border-radius: 14px; padding: 14px; text-align: left; border: 1.5px solid transparent; min-height: 118px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; }
.room.empty { background: #faf8f4; border: 1.5px dashed #ddd5c9; } .room.over { border-color: #e8b4b2; }
.rno { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 6px; letter-spacing: -0.02em; } .rno small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: -4px; }
.mtag { background: var(--copper-tint); color: var(--copper-dark); } .mtag.card { background: var(--sand-tint); color: var(--muted); } .mtag.park { background: #2b2f36; color: #fff; } .mtag.warn { background: #fae5e4; color: var(--red-ink); }
.gtag { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 6px; font-size: 12px; font-weight: 700; line-height: 1; margin-left: 4px; background: var(--sand-tint); color: var(--text); }
.rtype { font-size: 12px; color: var(--copper-dark); font-weight: 600; margin-top: 1px; } .rwin { color: var(--muted); font-weight: 500; }
.rname { margin-top: 6px; font-weight: 600; } .rdue { margin-top: 4px; font-size: 14px; }

.list .li { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 0; border-top: 1px solid var(--line); } .list .li:first-child, .list .h3 + .li { border-top: 0; }
.lino { min-width: 42px; font-weight: 800; font-size: 17px; } .limain { flex: 1; min-width: 0; } .liright { white-space: nowrap; font-weight: 600; text-align: right; min-width: 84px; }
.form label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.form input, .form select, .form textarea { display: block; width: 100%; margin-top: 4px; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--field-line); background: #fff; color: var(--text); font-size: 16px; }
.form .row input { flex: 1; } .form textarea { resize: vertical; }
.form .grid2 label { margin-top: 10px; }
.form input[readonly] { background: #f6f3ee; }
.box { background: #faf8f4; border-radius: 12px; padding: 12px; margin-top: 10px; }
.note { background: var(--copper-soft); box-shadow: inset 0 0 0 1px var(--copper-tint); border-radius: 10px; padding: 10px; font-size: 14px; margin-top: 8px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; max-height: 220px; overflow: auto; } .check { font-size: 14px; display: flex; gap: 6px; align-items: center; }
.chartbox { height: 250px; margin: 4px 0 0; }
.row.between { justify-content: space-between; } .right { text-align: right; line-height: 1.3; } .row.between .h3 { margin-bottom: 0; }
.sumgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; } .sumgrid .b { font-size: 18px; letter-spacing: -0.02em; }
.bar { height: 8px; background: #efe9e0; border-radius: 4px; margin: 12px 0 8px; overflow: hidden; } .bar div { height: 100%; background: var(--copper-dark); border-radius: 4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.unit { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; }
.tbl .c-m { width: 13%; } .tbl .c-p { width: 11%; }
.tbl th { font-weight: 600; color: var(--muted); text-align: right; padding: 6px 4px 8px; border-bottom: 1px solid var(--line); font-size: 12px; white-space: nowrap; }
.tbl td { text-align: right; padding: 8px 4px; border-bottom: 1px solid #f1ede6; white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: left; padding-left: 4px; font-weight: 600; color: var(--muted); }
.tbl tr.on td { background: var(--copper-soft); font-weight: 700; color: var(--text); } .tbl tr { cursor: pointer; }
.tbl .neg { color: var(--minus); } .green { color: var(--text); }
.receipt { width: 100%; border: 1px solid var(--line); border-radius: 8px; }

#tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: #fffdfa; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
#tabs button { flex: 1; text-align: center; padding: 8px 0 6px; font-size: 11px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 3px; } #tabs .on { color: var(--copper-dark); font-weight: 700; }
#tabs .side-only { display: none; }  /* 폰 아래 메뉴에는 안 보인다(PC 왼쪽 메뉴 전용) */
#tabs svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.gate-box { text-align: center; max-width: 320px; width: 100%; }
.gate-box h1 { font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: 5px; margin: 6px 0 0; color: var(--text); }
.gate-box .tagline { font-family: var(--serif); font-size: 15px; letter-spacing: 2px; color: var(--muted); margin: 2px 0 18px; }
.gate-box .mark { width: 120px; height: auto; display: block; margin: 0 auto 10px; }

#sheet { position: fixed; inset: 0; z-index: 20; display: none; } #sheet.open { display: block; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.sheet-body { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow: auto; background: #fffdfa; border-radius: 20px 20px 0 0; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; animation: up .18s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: .6; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; } .sheet-head .h3 { margin: 0; font-size: 18px; } .x { font-size: 26px; color: var(--muted); padding: 0 6px; }
#toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: #2b2f36; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; opacity: 0; transition: .2s; z-index: 30; white-space: nowrap; }
#toast.show { opacity: 1; transform: translateX(-50%); } #toast button { color: #f0b48a; margin-left: 8px; font-weight: 700; }
@media (min-width: 600px) { .rooms { grid-template-columns: repeat(3, 1fr); } }

.rc_row { display: grid; grid-template-columns: 1fr 1.3fr 44px auto; gap: 6px; align-items: center; margin-top: 6px; }
.rc_row select, .rc_row input { margin: 0 !important; padding: 9px 8px !important; font-size: 14px !important; }
.rc_row .rc_amt { text-align: right; } .rc_row .rc_day { text-align: center; }
.tg { padding: 2px 0; } .tg + .li { margin-top: 8px; } .chev { display: inline-block; color: var(--muted); font-size: 20px; line-height: 1; transform: rotate(90deg); transition: .15s; } .chev.open { transform: rotate(-90deg); }
.tbl.tight { font-size: 12px; } .tbl.tight th, .tbl.tight td { padding-left: 2px; padding-right: 2px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
/* 열람 전용: 변경 버튼 숨김 */
body.readonly .btn.primary, body.readonly .tbtns, body.readonly [data-act="payPick"], body.readonly [data-act="bank"], body.readonly [data-act="addExp"], body.readonly [data-act="stayNew"], body.readonly [data-act="reserve:"], body.readonly [data-act="import"], body.readonly [data-act="addRoom"], body.readonly [data-act="tplNew"], body.readonly [data-act="changePw"], body.readonly [data-act="saveSettings"], body.readonly #f_del, body.readonly #l_del, body.readonly #e_del, body.readonly #ev_add, body.readonly [data-del], body.readonly .rc_del, body.readonly #rc_add, body.readonly #rc_fill, body.readonly [data-a="undoPay"], body.readonly #cr_skip, body.readonly #cr_done, body.readonly [data-a="pay"], body.readonly [data-a="out"], body.readonly [data-a="clean"], body.readonly [data-a="room"], body.readonly [data-a="reserve"], body.readonly [data-a="checkin"], body.readonly #m_edit { display: none !important; }
body.readonly .demobar { background: #e8e3db; color: #5a5e66; }
.foot { text-align: center; padding: 28px 0 10px; opacity: .55; }
.foot img { width: 34px; height: auto; display: block; margin: 0 auto 6px; }
.foot-name { font-family: var(--serif); font-size: 13px; letter-spacing: 3px; color: var(--text); }
.foot-tag { font-family: var(--serif); font-size: 11px; letter-spacing: 1.5px; color: var(--muted); margin-top: 2px; }
.form label.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); } .form label.check input { width: auto; margin: 0; display: inline-block; }

/* ---------- 어두운 화면 ---------- */
:root { color-scheme: only light; } /* 폰 브라우저가 멋대로 어둡게 뒤집지 못하게 */
:root[data-theme="dark"] { color-scheme: only dark;
  --bg: #1b1a17; --card: #262420; --line: #3a362f; --text: #ece7df; --muted: #a39d92;
  --copper-tint: #3a2a1f; --copper-soft: #2f2620; --plus: #e4625f; --minus: #6a9ae6; --blue: #e8b48f; --red-ink: #f0908d; --sand-tint: #33302a; --field-line: #857e73; }
:root[data-theme="dark"] body { background: var(--bg); }
:root[data-theme="dark"] .card { box-shadow: 0 1px 1px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.04); }
:root[data-theme="dark"] .room { background: #2d2a25; color: var(--text); border-color: var(--line); }
:root[data-theme="dark"] .chip, :root[data-theme="dark"] .search, :root[data-theme="dark"] .form input, :root[data-theme="dark"] .form select, :root[data-theme="dark"] .form textarea, :root[data-theme="dark"] .bk_sel, :root[data-theme="dark"] .rc_row select, :root[data-theme="dark"] .rc_row input { background: #2d2a25; color: var(--text); border-color: var(--field-line); }
:root[data-theme="dark"] .room.empty { background: #221f1b; border-color: #3f3a32; }
:root[data-theme="dark"] .box, :root[data-theme="dark"] .form input[readonly] { background: #2d2a25; }
:root[data-theme="dark"] .card.link { background: var(--copper-tint); }
:root[data-theme="dark"] #tabs .on { color: #e8b48f; }
:root[data-theme="dark"] #tabs, :root[data-theme="dark"] .sheet-body, :root[data-theme="dark"] .hdate { background: #222019; border-color: var(--line); }
:root[data-theme="dark"] .seg { background: #2d2a25; } :root[data-theme="dark"] .seg .on { background: #3a362f; }
:root[data-theme="dark"] .chip.on { background: var(--text); color: #1b1a17; border-color: var(--text); }
:root[data-theme="dark"] .btn { background: var(--copper-tint); color: #e8b48f; } :root[data-theme="dark"] .btn.primary { background: var(--copper-dark); color: #fff; }
:root[data-theme="dark"] .btn.outline { background: transparent; color: #e8b48f; border-color: #5a4535; } :root[data-theme="dark"] .btn.dark { background: #ece7df; color: #1b1a17; }
:root[data-theme="dark"] .btn.disabled, :root[data-theme="dark"] .btn:disabled { background: #2d2a25; color: #6f6a62; }
:root[data-theme="dark"] .tag { background: #33302a; color: var(--muted); } :root[data-theme="dark"] .tag.red { background: #4a2626; color: #f0908d; } :root[data-theme="dark"] .tag.blue { background: var(--copper-tint); color: #e8b48f; } :root[data-theme="dark"] .tag.green { background: #33302a; color: var(--text); } :root[data-theme="dark"] .tag.orange, :root[data-theme="dark"] .tag.yellow { background: var(--copper-soft); color: #e8b48f; box-shadow: inset 0 0 0 1px var(--copper-tint); }
:root[data-theme="dark"] .mtag { background: var(--copper-tint); color: #e8b48f; } :root[data-theme="dark"] .mtag.card { background: #33302a; color: var(--muted); } :root[data-theme="dark"] .mtag.park { background: #ece7df; color: #1b1a17; } :root[data-theme="dark"] .mtag.warn { background: #4a2626; color: #f0908d; }
:root[data-theme="dark"] .gtag { background: var(--sand-tint); color: var(--text); }
:root[data-theme="dark"] .tbl td { border-color: #302d27; } :root[data-theme="dark"] .tbl tr.on td { background: var(--copper-soft); }
:root[data-theme="dark"] .note { background: var(--copper-soft); color: var(--text); } :root[data-theme="dark"] .demobar { background: var(--copper-tint); color: #e8b48f; } :root[data-theme="dark"] body.readonly .demobar { background: #33302a; color: var(--muted); }
:root[data-theme="dark"] .bar { background: #33302a; } :root[data-theme="dark"] .kpi .stat { border-color: var(--line); }
:root[data-theme="dark"] .red { color: #f0908d; } :root[data-theme="dark"] .rtype { color: #e8b48f; } :root[data-theme="dark"] .gate { background: var(--bg); }
:root[data-theme="dark"] #toast { background: #ece7df; color: #1b1a17; } :root[data-theme="dark"] #toast button { color: var(--copper-dark); }
:root[data-theme="dark"] .receipt { border-color: var(--line); } :root[data-theme="dark"] .foot { opacity: .45; }
:root[data-theme="dark"] .logo-dark-fix img { filter: none; }

/* 폰이 다크 모드여도 '밝게'를 고르면 밝게. 브라우저에 "이 페이지는 다크 모드를 스스로 처리한다"고 알리는 선언 */
@media (prefers-color-scheme: dark) {
  :root[data-theme="light"] { color-scheme: only light; --bg: #f6f3ee; --card: #ffffff; --text: #2b2f36; --muted: #5f636b; --line: #e9e3da; --blue: #a9501f; --red-ink: #b3322f; --sand-tint: #ebe6de; --field-line: #8c8172; --copper-tint: #f8e9dd; --copper-soft: #fbf3ec; --plus: #d23f3f; --minus: #2f6fd1; }
  :root[data-theme="light"] body { background: #f6f3ee; color: #2b2f36; }
}
html { background: var(--bg); }

/* ---------- 화면 크기 대응 (2026-11-03) ----------
   폰(기본) | 600px 이상 태블릿 | 1024px 이상 PC: 왼쪽 메뉴, 넓은 본문, 가운데 창 | 가로로 눕힌 폰: 낮은 높이에 맞춤 */
#app { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
#tabs { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.gate { min-height: 100dvh; }
.sheet-body { max-height: 92dvh; }
@media (max-width: 359px) { /* 작은 폰(갤럭시 폴드 접은 화면 등) */
  html, body { font-size: 14px; } .rooms { gap: 8px; } .room { padding: 11px; min-height: 108px; } .rno { font-size: 18px; }
  .kpi .stat { padding: 8px; } #tabs button { font-size: 10px; }
}
@media (min-width: 600px) {
  #app { max-width: 820px; }
  .rooms { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .checks { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  #app { max-width: 1240px; padding-left: 236px; padding-bottom: 32px; }
  #tabs { top: 0; bottom: 0; right: auto; width: 208px; flex-direction: column; gap: 2px; padding: 24px 12px; border-top: 0; border-right: 1px solid var(--line); }
  #tabs button { flex: 0 0 auto; flex-direction: row; gap: 12px; padding: 11px 14px; border-radius: 10px; font-size: 15px; text-align: left; }
  #tabs button:hover { background: var(--copper-soft); } #tabs .on { background: var(--copper-tint); }
  #tabs svg { width: 20px; height: 20px; }
  #tabs { overflow-y: auto; } #tabs .side-only { display: flex; } #tabs .side-only[hidden] { display: none; }
  .side-head { font-size: 12px; font-weight: 700; color: var(--muted); padding: 14px 14px 4px; } .side-gap { flex: 1 0 8px; }
  #view .more-dup { display: none; }  /* 왼쪽 메뉴에 있는 줄은 PC 더보기에서 뺀다 */
  .demobar { margin: 8px 0 0; border-radius: 10px; }
  /* 오늘 탭: 왼쪽 「할 일」, 오른쪽 「현황」 두 기둥을 따로 쌓는다(줄로 맞추지 않아 옆 카드 높이 차로 생기는 빈 틈이 없다) */
  /* 첫 줄(미납 요약 | 지표 4칸)은 같은 줄이라 높이가 같고, 그 아래는 두 기둥을 따로 쌓는다 */
  .tcols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px 14px; align-items: start; }
  .tcols > .tcard-quick, .tcols > .kpi { align-self: stretch; margin-bottom: 0; }
  .tcol { display: flex; flex-direction: column; gap: 10px; } .tcol > .card { margin-bottom: 0; }
  .tcol-side { position: sticky; top: 16px; }
  /* 아래에서 올라오는 창은 가운데 창으로 */
  .sheet-body { top: 50%; bottom: auto; left: 50%; right: auto; width: min(620px, calc(100vw - 48px)); transform: translate(-50%, -50%); max-height: 86dvh; border-radius: 18px; padding-bottom: 24px; animation: pop .16s ease-out; }
  #toast { bottom: 28px; left: calc(50% + 104px); }
}
@media (min-width: 1024px) and (max-height: 860px) {  /* 낮은 노트북 화면에서도 왼쪽 메뉴가 스크롤 없이 다 들어가게 */
  #tabs { padding: 14px 12px; } #tabs button { padding: 8px 14px; } .side-head { padding: 10px 14px 2px; }
}
@keyframes pop { from { transform: translate(-50%, -48%); opacity: .6; } }
@media (orientation: landscape) and (max-height: 500px) { /* 가로로 눕힌 폰 */
  .sheet-body { max-height: 96dvh; }
  #tabs button { padding: 4px 0 3px; flex-direction: row; justify-content: center; gap: 6px; font-size: 12px; } #tabs svg { width: 18px; height: 18px; }
  #app { padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
  #toast { bottom: calc(56px + env(safe-area-inset-bottom)); }
  .rooms { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .sheet-body { animation: none; } #toast { transition: none; } }
.grid2 > *, .form .row > * { min-width: 0; } .form input[type="date"] { min-width: 0; -webkit-appearance: none; appearance: none; min-height: 44px; }
@media (max-width: 374px) { .form .grid2:has(input[type="date"]) { grid-template-columns: 1fr; gap: 0; } }
.installnote { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; padding: 10px 12px; background: var(--copper-soft); border-radius: 12px; font-size: 14px; } .installnote span { flex: 1; } .installnote .x { font-size: 22px; }
@media (min-width: 1024px) { .installnote { display: none; } }

/* ---------- 디자인 정리 (2026-11-03 점검) ---------- */
/* 폰과 태블릿: 기둥을 풀고 「요약, 지표, 처리 대기, 입금 진행, 이번 주」 순서로 한 줄 */
@media (max-width: 1023px) {
  .tcols, .tcol { display: contents; }
  #view:has(.tcols) { display: flex; flex-direction: column; }
  #view:has(.tcols) > * { order: 9; }
  #view:has(.tcols) > header { order: 0; } .tcard-quick { order: 1; } .tcols > .kpi { order: 2; } .tcard-tasks { order: 3; } .tcard-plan { order: 4; } .tcol-side > section:not(.tcard-plan):not(.tcard-week) { order: 5; } .tcard-week { order: 6; } #view:has(.tcols) > .foot { order: 10; }
}
/* 탭 머리: 모든 탭이 같은 높이(탭을 넘어가도 본문 첫 카드가 같은 자리) */
.top { min-height: 69px; padding: 16px 0 9px; display: flex; flex-direction: column; justify-content: flex-end; }
.hdr { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 44px; }
.hleft { display: flex; align-items: center; gap: 10px; min-width: 0; } .hleft h1 { margin: 0; font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand { display: flex; align-items: center; flex: 0 0 auto; } .brand img { width: 30px; height: auto; display: block; }
.hright { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; } .hright .btn { min-width: 64px; }
.hdate { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fffdfa; white-space: nowrap; font-size: 14px; font-weight: 600; }
.top .back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin: 0; } .top > .muted.sm { margin-top: 4px; }
.ico { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; vertical-align: middle; }
/* 입실현황 층별 묶음 */
.floor + .floor { margin-top: 18px; } .floor > .h3 { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 8px; } .floor > .h3 .cnt { color: var(--muted); font-weight: 500; }
/* ---------- 디자인 수정 2차 (2026-11-03) ---------- */
.nw { white-space: nowrap; }
/* 호실 카드: 같은 높이, 이름 한 줄, 태그 줄은 늘 자리 차지 */
.room { min-height: 158px; min-width: 0; overflow: hidden; } .rno { min-height: 28px; flex-wrap: nowrap; } .rtype { min-height: 18px; }
.rname { width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 22px; }
.rdue { min-height: 20px; white-space: nowrap; }
.rtags { display: flex; gap: 4px; flex-wrap: nowrap; overflow: hidden; height: 22px; margin-top: 6px; width: 100%; }
@media (max-width: 359px) { .room { min-height: 150px; } }
/* 입실현황 거르기 카드, 입실자 목록 머리 */
.card.filters { padding: 12px 14px 8px; }
.basedate { gap: 8px; flex-wrap: wrap; } .basedate label { font-size: 14px; }
.field { min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--field-line); background: #fff; color: var(--text); font-size: 15px; -webkit-appearance: none; appearance: none; }
.card.filters .chips { padding: 10px 0 6px; } .card.filters .sorts { margin: 0; }
.sorts button { min-height: 36px; padding: 0 2px; }
.lhead { padding-bottom: 6px; } .lhead .seg { margin-bottom: 10px; } .lhead .search { margin-bottom: 4px; } .lhead .chips { padding-bottom: 6px; } .list .lhead + .li { border-top: 1px solid var(--line); }
/* 칩 줄이 옆으로 넘칠 때 오른쪽 끝을 흐리게 해서 더 있음을 알린다 */
.chips:not(.wrap) { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.chips:not(.wrap)::after { content: ''; flex: 0 0 20px; }
/* 처리 대기 단추 묶음: 줄마다 같은 폭(왼쪽 끝이 한 줄로) */
.tbtns { display: grid; grid-template-columns: 84px 84px; gap: 6px; } .tbtns.one .btn { grid-column: 1 / -1; } .tbtns .btn.sm { text-align: center; padding-left: 4px; padding-right: 4px; }
@media (max-width: 440px) { .tbtns, .tbtns.one { grid-template-columns: 92px; min-width: 0; } .tbtns.one .btn { grid-column: auto; } }
/* 폰: 누르는 크기 44px */
@media (max-width: 900px) {
  .btn.sm, button.chip, .sorts button, .seg button, .field, .form input[type="date"] { min-height: 44px; }
  .btn.sm, button.chip { display: inline-flex; align-items: center; justify-content: center; }
  .sorts { gap: 18px; }
}
/* 더보기 화살표, 접기 화살표(Lucide) */
.liright.chev-r { min-width: 0; color: var(--muted); display: flex; align-items: center; } .liright.chev-r .ico { width: 18px; height: 18px; }
.chev { font-size: 0; transform: none; display: inline-flex; } .chev .ico { width: 18px; height: 18px; transition: transform .15s; } .chev.open { transform: none; } .chev.open .ico { transform: rotate(180deg); }
.back .ico { width: 18px; height: 18px; }
/* 초점 테두리: 구리빛 2px */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.sheet-body:focus { outline: none; } .sheet-body:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.kpi .big { font-size: 20px; }
@media (max-width: 374px) { .kpi .big { font-size: 18px; } }
:root[data-theme="dark"] .field { background: #2d2a25; color: var(--text); border-color: var(--field-line); }
:root[data-theme="dark"] .hdate { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .chev .ico { transition: none; } }
.tmain { grid-template-columns: 64px minmax(0, 1fr); } .tmain > .tag { justify-self: start; min-width: 64px; padding: 0 6px; }
