/* 근무 인수인계 웹앱 스타일: 디자인 토큰(:root), 라이트/다크 모드, 모바일 우선 레이아웃 */
:root { color-scheme: light; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* Layout: one narrow column of ruled count-sheets in the order the shift report is read, ending in a receipt-style preview of the message; copy button pinned at the bottom. */
:root {
  --bg: #eceff3;
  --surface: #f8f9fb;
  --ink: #1c2331;
  --muted: #5b6577;
  --line: #cdd3dd;
  --accent: #0d7a6b;
  --accent-ink: #ffffff;
  --warn: #a85a00;
  --paper: #fdfdfa;
  --paper-ink: #20242c;
  --f-display: 'Do Hyeon', 'Noto Sans KR', sans-serif;
  --f-body: 'Noto Sans KR', system-ui, sans-serif;
  --f-mono: 'IBM Plex Mono', 'Noto Sans KR', monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161d; --surface: #1b212b; --ink: #e6e9ef; --muted: #98a2b5; --line: #2c3442;
    --accent: #3fc4ae; --accent-ink: #06211d; --warn: #f0a44b; --paper: #232a35; --paper-ink: #e6e9ef;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12161d; --surface: #1b212b; --ink: #e6e9ef; --muted: #98a2b5; --line: #2c3442;
  --accent: #3fc4ae; --accent-ink: #06211d; --warn: #f0a44b; --paper: #232a35; --paper-ink: #e6e9ef;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.5;
  padding-inline: 16px; padding-block: 20px 110px;
}
.wrap { max-width: 540px; margin-inline: auto; display: flex; flex-direction: column; gap: 14px; }
.top { padding-block: 6px 4px; }
.eyebrow { margin: 0; font-size: 12px; letter-spacing: .08em; color: var(--muted); }
h1 { margin: 2px 0 6px; font-family: var(--f-display); font-weight: 400; font-size: 32px; line-height: 1.15; text-wrap: balance; }
.lede { margin: 0; color: var(--muted); max-width: 46ch; }

.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 14px 12px; }
.sh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); margin-bottom: 4px; }
h2 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 20px; letter-spacing: .01em; }
.tot { font-family: var(--f-mono); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

.line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding-block: 8px; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.lab { min-width: 0; font-weight: 500; }
.sub { display: block; font-family: var(--f-mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.stepper, .rstep { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg); }
.stepper button, .rstep button { width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--ink); font-size: 20px; cursor: pointer; }
.stepper button:active, .rstep button:active { background: var(--line); }
.stepper input, .rstep input { width: 52px; border: 0; border-inline: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: center; font: 500 17px var(--f-mono); font-variant-numeric: tabular-nums; padding: 0; }

.task { display: grid; grid-template-columns: 24px 48px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 48px; padding-block: 6px; border-bottom: 1px solid var(--line); cursor: pointer; }
.task:last-child { border-bottom: 0; }
.task input { width: 22px; height: 22px; accent-color: var(--accent); }
.tt { font: 500 14px var(--f-mono); font-variant-numeric: tabular-nums; color: var(--muted); }
.tn { min-width: 0; font-weight: 500; }
.ts { font-size: 12px; font-weight: 700; color: var(--muted); }
.task.now .ts { color: var(--accent); }
.task.late .ts { color: var(--warn); }
.task.done .tn { text-decoration: line-through; color: var(--muted); font-weight: 400; }
.coldtime { display: flex; align-items: center; gap: 10px; padding: 0 0 10px 82px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.coldtime.nb { border-bottom: 0; padding-bottom: 4px; }
.coldtime .boxcnt { width: 64px; text-align: center; }
.coldtime input { min-height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); padding: 0 8px; font: 500 15px var(--f-mono); }
.coldhint { padding-inline-start: 82px; }
.rows { display: flex; flex-direction: column; gap: 8px; padding-block: 8px 4px; }
.note { display: block; width: 100%; min-height: 96px; margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font: 400 15px/1.6 var(--f-body); resize: vertical; }
.row.cnt { grid-template-columns: minmax(0, 1fr) auto 44px; }
.rstep input { width: 40px; min-width: 0; }
.rstep button { width: 38px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 44px; gap: 8px; }
.row.one { grid-template-columns: minmax(0, 1fr) 44px; }
.rowin { min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); padding: 0 10px; font: 400 15px var(--f-body); }
.rowin.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.rm { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }
.none { margin: 0; padding-block: 6px; color: var(--muted); font-size: 13px; }
.add { margin-top: 6px; min-height: 44px; width: 100%; border: 1px dashed var(--line); border-radius: 8px; background: transparent; color: var(--accent); font: 500 14px var(--f-body); cursor: pointer; }

.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.chk { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; min-height: 44px; }
.chk input { width: 18px; height: 18px; accent-color: var(--accent); }
.receipt { margin: 0; padding: 18px 16px; background: var(--paper); color: var(--paper-ink); border: 1px solid var(--line); border-radius: 4px; font: 400 14px/1.7 var(--f-mono); white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 1px 0 var(--line), 0 6px 14px rgba(0,0,0,.05); }
.reset { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink); font: 500 14px var(--f-body); cursor: pointer; padding-inline: 14px; }
.reset.armed { border-color: var(--warn); color: var(--warn); }

.bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); }
.bar-inner { width: 100%; max-width: 540px; display: flex; align-items: center; gap: 12px; }
#status { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); }
#copy { min-height: 48px; padding-inline: 22px; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font: 700 16px var(--f-body); cursor: pointer; }
[hidden] { display: none !important; }
.view { display: flex; flex-direction: column; gap: 14px; }
.tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.tabs button { min-height: 44px; padding: 0 2px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: 700 14px var(--f-body); cursor: pointer; }
.bdg { display: inline-block; min-width: 18px; margin-left: 3px; padding: 0 5px; border-radius: 9px; background: var(--warn); color: #fff; font-size: 12px; line-height: 18px; }
.expban { padding: 10px 12px; border: 1px solid var(--warn); border-radius: 10px; background: var(--surface); color: var(--warn); font-size: 14px; font-weight: 700; }
.expban button { margin-left: 8px; }
.ex { padding: 10px 0; border-bottom: 1px solid var(--line); }
.ex:last-child { border-bottom: 0; }
.exh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.exh b { font-size: 16px; }
.exd { font: 700 13px var(--f-mono); white-space: nowrap; }
.ex.g0 .exd, .ex.g1 .exd { color: var(--warn); }
.ex.g2 .exd { color: var(--accent); }
.exm { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.exb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.exb .reset { min-height: 44px; }
.exb .rm { min-width: 44px; margin-left: auto; }
.phgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.ph { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.ph img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.ph .rm { position: absolute; top: 2px; right: 2px; min-width: 44px; min-height: 44px; border: 0; background: rgba(0, 0, 0, 0.55); color: #fff; border-radius: 8px; font-size: 20px; }
.phbtn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink); font: 500 14px var(--f-body); cursor: pointer; }
.phkind { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.phkind h3 { margin: 0; font-size: 15px; }
.phrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.lightbox { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 12px; background: rgba(0, 0, 0, 0.88); }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.exgrid .rowin, #exName { width: 100%; box-sizing: border-box; }
.exgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.exsum { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 0; font-size: 14px; }
.exsum b { font-family: var(--f-mono); }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cal-head strong { font-family: var(--f-display); font-weight: 400; font-size: 21px; }
.nav { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink); font-size: 22px; cursor: pointer; }
.cal-sum { margin: 6px 0 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; }
.dow, .grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dow { margin-top: 12px; text-align: center; font-size: 12px; color: var(--muted); }
.grid { margin-top: 4px; }
.day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 48px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); font: 500 15px var(--f-mono); font-variant-numeric: tabular-nums; cursor: pointer; }
.day.work { background: var(--bg); }
.day.today { border-color: var(--accent); }
.day.sel { background: var(--accent); color: var(--accent-ink); }
.dot { display: block; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--muted); }
.dot.rec { background: var(--accent); border-color: var(--accent); }
.dot.miss { background: var(--warn); border-color: var(--warn); }
.dot.none { visibility: hidden; }
.day.sel .dot { border-color: var(--accent-ink); }
.day.sel .dot.rec, .day.sel .dot.miss { background: var(--accent-ink); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.recbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.recbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.calstatus { margin: 0; min-height: 20px; font-size: 13px; color: var(--muted); }
.backup summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-family: var(--f-display); font-size: 20px; }
.livemain { margin: 10px 0 2px; font: 700 22px/1.3 var(--f-body); font-variant-numeric: tabular-nums; text-wrap: balance; }
.earn { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 4px 0 0; }
.ek { font: 500 14px var(--f-body); color: var(--muted); }
.en { font: 500 30px/1.2 var(--f-mono); color: var(--accent); font-variant-numeric: tabular-nums; }
.livesub { margin: 6px 0 0; font: 400 13px/1.5 var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.track { height: 8px; margin-top: 12px; border-radius: 4px; background: var(--line); overflow: hidden; }
.fill { height: 100%; width: 0; background: var(--accent); border-radius: 4px; }
.linkbtn { min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--accent); font: 500 13px var(--f-body); text-align: left; text-decoration: underline; cursor: pointer; }
.notice { display: grid; grid-template-columns: minmax(0, 1fr) 44px 44px; align-items: center; gap: 8px; padding-block: 2px; border-bottom: 1px solid var(--line); }
.notice:last-child { border-bottom: 0; }
.ntext { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: start; gap: 10px; min-height: 44px; padding-block: 10px; cursor: pointer; overflow-wrap: anywhere; }
.ntext input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.notice.done .ntext span { text-decoration: line-through; color: var(--muted); }
.notice.pinned .ntext span { font-weight: 700; }
.pin { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; }
.pin[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 4px 0 12px; border: 1px solid var(--line); border-radius: 22px; background: var(--bg); font-size: 15px; }
.chip button { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.setgrp { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.wkrow { display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.setgrp h3 { margin: 0 0 4px; font-size: 16px; }
.setgrp .chk { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.man { border-bottom: 1px solid var(--line); }
.man:last-of-type { border-bottom: 0; }
.man summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.man .mbody { margin: 0 0 8px; font-size: 15px; line-height: 1.7; }
.man .recbtns { margin-bottom: 8px; }
.mform { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.mform .note { margin-top: 0; }
.addrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 8px; }
.pnote { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: 14px; line-height: 1.6; }
.pnote b { display: block; margin-bottom: 4px; }
.pnote p { margin: 0; }
.cmp { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding-block: 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.cmp:last-child { border-bottom: 0; }
.cmp b { font: 500 14px var(--f-mono); font-variant-numeric: tabular-nums; }
.cmp.down b { color: var(--warn); }
.cmp.up b { color: var(--accent); }
.flag { margin: 8px 0 0; padding: 10px 12px; border: 1px solid var(--warn); border-radius: 8px; color: var(--warn); font-size: 14px; }
.day.chg { border-style: dashed; border-color: var(--muted); }
.day.today.chg { border-style: solid; border-color: var(--accent); }
.legend .swatch { width: 14px; height: 14px; border: 1px dashed var(--muted); border-radius: 4px; }
.edit { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.edit h3 { margin: 0 0 4px; font: 700 14px var(--f-body); }
.times { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-block: 8px; font-size: 13px; color: var(--muted); }
.times input { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); padding: 0 8px; font: 500 15px var(--f-mono); }
.fields { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; margin-block: 8px 4px; }
.fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 12px; color: var(--muted); }
.val { font-family: var(--f-mono); font-variant-numeric: tabular-nums; text-align: right; }
.val.big { font-size: 18px; color: var(--accent); }
.wagebox { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.wagebox input { width: 110px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); text-align: right; padding: 0 10px; font: 500 16px var(--f-mono); }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { #copy, .stepper button { transition: transform .08s; } #copy:active { transform: scale(.98); } }
