/* ─────────────────────────────────────────────────────────────────────────────
   메타PC 출퇴근 — 업무용 모바일 우선 화면.
   · 운영보드와 같은 브랜드(남파랑→보라 그라데이션 마크·중성 회색·Pretendard), 대표색만 다르게:
     운영보드 = 보라 #7C5CFF / 출퇴근 앱 = 남파랑 #3158A8(브랜드 그라데이션의 시작색). 출근 = 파랑, 퇴근 = 진남색.
   · 출근·퇴근 버튼이 가장 크고 눈에 띄는 요소.
   · iPhone 안전영역(노치·홈 막대): env(safe-area-inset-*)로 상단바·하단 메뉴 안쪽 여백을 맞춘다.
   · PC: 가운데 560px 기둥으로 표시(휴대폰 화면과 같은 구성).
   ───────────────────────────────────────────────────────────────────────────── */

/* 글꼴 — Pretendard v1.3.9(SIL OFL 1.1, 라이선스: /fonts/pretendard-1.3.9/OFL-LICENSE.txt).
   운영보드와 같은 글꼴을 **이 앱 주소에서 직접** 제공한다(CSP font-src 'self' — 외부 CDN을 쓰지 않는다).
   쓰는 굵기 4개만, 한글 2,780자(KS X 1001 + 자주 쓰는 글자)·라틴·기호 서브셋(굵기당 약 260KB).
   서브셋에 없는 드문 글자는 아래 글꼴 목록의 다음 글꼴로 그 글자만 표시된다. */
@font-face { font-family: 'Pretendard'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/pretendard-1.3.9/Pretendard-Regular.subset.woff2') format('woff2'); }
@font-face { font-family: 'Pretendard'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/pretendard-1.3.9/Pretendard-SemiBold.subset.woff2') format('woff2'); }
@font-face { font-family: 'Pretendard'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/pretendard-1.3.9/Pretendard-Bold.subset.woff2') format('woff2'); }
@font-face { font-family: 'Pretendard'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/pretendard-1.3.9/Pretendard-ExtraBold.subset.woff2') format('woff2'); }

:root {
  /* 중성 회색·배경·테두리 = 운영보드와 같은 값(tailwind slate 재정의·globals.css 토큰) */
  --bg: #f7f8fa;
  --surface: #ffffff;
  --line: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --faint: #9ca3af;

  --brand: #3158a8; /* 앱 대표색 — 운영보드 브랜드 그라데이션 시작색 */
  --brand-dark: #2f4e93;
  --brand-grad: linear-gradient(135deg, #3158a8 0%, #6f63f6 100%); /* 운영보드와 같은 브랜드 마크 */
  --in: #2563eb; /* 출근 */
  --in-dark: #1d4ed8;
  --in-soft: #dbeafe; /* 출근 처리 중(원래 색을 흐리게) */
  --out: #1f2a44; /* 퇴근 */
  --out-dark: #151d30;
  --out-soft: #e2e6ef; /* 퇴근 처리 중 */
  --off-bg: #f3f4f6; /* 사용 불가 */
  --off-line: #d1d5db;
  --accent: var(--brand);

  --ok-bg: #e8f6ef;
  --ok-line: #b9e3cd;
  --warn-bg: #fff6e5;
  --warn-line: #f6d79a;
  --err-bg: #fdecec;
  --err-line: #f3c0c0;
  --info-bg: #f3f4f6;
  --info-line: #e5e7eb;

  --radius: 14px;
  --col: 560px;
  --tabbar-h: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
h1, h2, p { margin: 0; }
a { color: inherit; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-sm { width: 16px; height: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.noscript { padding: 24px; }

/* ── 버튼 ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 0 18px;
  border: 1px solid transparent; border-radius: 12px;
  font-size: 16px; font-weight: 600; cursor: pointer;
  background: var(--surface); border-color: var(--line);
  touch-action: manipulation;
}
.btn:disabled { cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:active:not(:disabled) { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-primary:disabled { background: var(--off-bg); border-color: var(--line); color: var(--faint); }
.btn-secondary { background: var(--surface); border-color: var(--off-line); color: var(--text); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn:focus-visible, .tab:focus-visible, input:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* ── 로그인 전·차단 화면 ───────────────────────────────── */
.gate {
  min-height: 100vh; min-height: 100dvh;
  max-width: 440px; margin: 0 auto;
  padding: calc(32px + var(--safe-top)) 20px calc(32px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 20px;
}
.gate-brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--brand-grad); color: #fff; font-weight: 800; font-size: 18px;
}
.brand-mark-sm { width: 28px; height: 28px; border-radius: 8px; font-size: 14px; }
.brand-name { font-weight: 700; font-size: 18px; }
.gate-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 20px; display: flex; flex-direction: column; gap: 14px;
}
.gate-title { font-size: 21px; font-weight: 700; }
.gate-sub { color: var(--muted); font-size: 15px; }

.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 14px; font-weight: 600; color: var(--muted); }
.field input {
  min-height: 50px; padding: 0 14px;
  border: 1px solid var(--off-line); border-radius: 12px; background: #fff;
  font-size: 17px; /* 16px 이상: iPhone이 입력 시 화면을 확대하지 않게 */
}
.form-error:empty { display: none; }
.rules { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.consent-text { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; font-weight: 600; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--brand); }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }

/* ── 앱 틀 ─────────────────────────────────────────────── */
.app { min-height: 100vh; min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding-top: var(--safe-top);
}
.topbar-inner {
  max-width: var(--col); margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.topbar-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-name { font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.clock-date { font-size: 13px; color: var(--muted); white-space: nowrap; }
.clock-time { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }

.content {
  max-width: var(--col); margin: 0 auto;
  padding: 16px 16px calc(var(--tabbar-h) + var(--safe-bottom) + 24px);
}
.page { display: flex; flex-direction: column; gap: 14px; }
.page-title { font-size: 20px; font-weight: 700; padding: 4px 2px; }

/* ── 카드 ──────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--muted); }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.row-label { color: var(--muted); font-size: 14px; flex: none; }
.row-value { text-align: right; font-size: 15px; word-break: keep-all; }
.row-strong .row-value { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.home-site { display: flex; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 14px; }
.home-site strong { color: var(--text); margin-left: auto; font-weight: 600; }
.details summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 4px 0; }
.details[open] summary { margin-bottom: 8px; }

/* 상태 카드 */
.status-card { border-width: 1px; }
.status-head { display: flex; align-items: center; justify-content: space-between; }
.status-label { font-size: 15px; font-weight: 700; color: var(--muted); }
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 15px; font-weight: 700; }
.badge-idle { background: var(--off-bg); color: #4b5563; }
.badge-active { background: #eff6ff; color: var(--in-dark); } /* 근무 중 = 출근 색 계열 */
.badge-done { background: var(--out-soft); color: var(--out); } /* 퇴근 완료 = 퇴근 색 계열 */
.badge-warn { background: var(--warn-bg); color: #8a5300; }
.tone-active { border-color: #bfdbfe; }
.tone-warn { border-color: var(--warn-line); }

/* ── 출근·퇴근 버튼(가장 중요한 요소) ─────────────────── */
.clock-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.clock-col { display: flex; flex-direction: column; gap: 8px; }
.btn-clock {
  width: 100%; min-height: 108px; border-radius: 18px; border: 0;
  font-size: 24px; font-weight: 800; letter-spacing: 0.02em; color: #fff;
}
.btn-in { background: var(--in); }
.btn-in:active:not(:disabled) { background: var(--in-dark); }
.btn-out { background: var(--out); }
.btn-out:active:not(:disabled) { background: var(--out-dark); }
/* 사용 불가 = 연한 회색 + 점선 테두리(누를 수 있는 버튼과 구분). 이유는 버튼 아래 문구로 안내 */
.btn-clock:disabled { background: var(--off-bg); color: var(--faint); border: 1px dashed var(--off-line); }
/* 처리 중 = 누른 버튼의 원래 색을 흐리게(어느 버튼을 눌렀는지 보이게) + '처리 중…' 문구. 중복 클릭은 disabled가 막는다 */
.btn-clock.btn-in[aria-busy='true'] { font-size: 18px; background: var(--in-soft); color: var(--in-dark); border: 0; box-shadow: inset 0 0 0 2px #93c5fd; cursor: progress; }
.btn-clock.btn-out[aria-busy='true'] { font-size: 18px; background: var(--out-soft); color: var(--out); border: 0; box-shadow: inset 0 0 0 2px #a3adc2; cursor: progress; }
.btn-clock-label { padding: 0 8px; }
.reason { font-size: 13px; color: var(--muted); text-align: center; word-break: keep-all; }

/* ── 안내 상자 ────────────────────────────────────────── */
.notice { border: 1px solid; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.notice-title { font-weight: 700; font-size: 16px; }
.notice-line { font-size: 14px; word-break: keep-all; }
.notice-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.notice-actions .btn { min-height: 44px; }
.notice-success { background: var(--ok-bg); border-color: var(--ok-line); }
.notice-warn { background: var(--warn-bg); border-color: var(--warn-line); }
.notice-error { background: var(--err-bg); border-color: var(--err-line); }
.notice-info { background: var(--info-bg); border-color: var(--info-line); }

/* 준비 중 */
.card-soon { border-style: dashed; background: #fafbfc; }
.soon-badge { align-self: flex-start; padding: 2px 10px; border-radius: 999px; background: var(--off-bg); color: var(--muted); font-size: 12px; font-weight: 700; }
.btn-logout { color: #b42318; }

/* ── 근무표(주간·월간) ─────────────────────────────────── */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--off-bg); border: 1px solid var(--line); }
.seg-btn {
  min-height: 36px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent;
  font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; touch-action: manipulation;
}
.seg-active { background: var(--surface); color: var(--brand); box-shadow: 0 1px 2px rgba(17, 24, 39, 0.08); }
.period-nav { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px auto; align-items: center; gap: 6px; }
.nav-btn {
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  font-size: 22px; line-height: 1; color: var(--text); cursor: pointer; touch-action: manipulation;
}
.period-title { text-align: center; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; word-break: keep-all; }
.btn-today { min-height: 44px; padding: 0 12px; font-size: 14px; }
.btn-today:disabled { color: var(--faint); }
.period-summary { font-size: 14px; color: var(--muted); padding: 0 2px; }

.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--off-bg); color: var(--muted); white-space: nowrap; }
.chip-today { background: var(--brand); color: #fff; }
.chip-support { background: #fff7ed; color: #9a3412; }

.shift-item { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--in); border-radius: 10px; background: var(--surface); }
.shift-support { border-left-color: #f59e0b; }
.shift-time { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; word-break: keep-all; }
.shift-site { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 15px; font-weight: 600; }
.shift-site-name { word-break: keep-all; }
.shift-meta { font-size: 13px; color: var(--muted); }
.shift-next { color: var(--in-dark); font-weight: 600; }

.week-list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.day-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 12px; border-top: 1px solid var(--line); }
.day-row:first-child { border-top: 0; }
.day-today { background: #f5f8ff; }
.day-head { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 2px; }
.day-num { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.day-wd { font-size: 13px; font-weight: 600; color: var(--muted); }
.day-sun .day-wd, .day-sun .day-num { color: #dc2626; }
.day-sat .day-wd, .day-sat .day-num { color: var(--in); }
.day-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.day-empty { color: var(--muted); font-size: 14px; padding: 8px 0; }

.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 6px; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head { padding-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; }
.cal-grid { gap: 2px; }
.cal-cell {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 1px;
  min-height: 56px; padding: 6px 0 4px; border: 0; border-radius: 8px; background: transparent;
  color: var(--text); cursor: pointer; touch-action: manipulation; font-variant-numeric: tabular-nums; min-width: 0;
}
.cal-day { font-size: 15px; font-weight: 600; line-height: 1.2; }
.cal-time { font-size: 11px; font-weight: 700; color: var(--in-dark); letter-spacing: -0.02em; }
.cal-more { font-size: 11px; font-weight: 700; color: var(--muted); }
.cal-dot { position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: #f59e0b; }
.cal-has { background: #eff6ff; }
.cal-out { opacity: 0.45; }
.cal-sun .cal-day, .cal-head .cal-sun { color: #dc2626; }
.cal-sat .cal-day, .cal-head .cal-sat { color: var(--in); }
.cal-today .cal-day { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.cal-selected { box-shadow: inset 0 0 0 2px var(--brand); }
.day-detail .shift-item { background: var(--surface); }

/* ── 출퇴근 기록(한 달 단위) — 상태 색은 홈 상태 배지와 같다 ─────────── */
.chip-done { background: var(--out-soft); color: var(--out); }
.chip-active { background: #eff6ff; color: var(--in-dark); }
.chip-warn { background: var(--warn-bg); color: #8a5300; }
.rec-list { display: flex; flex-direction: column; gap: 16px; }
.rec-day { display: flex; flex-direction: column; gap: 8px; }
.rec-day-head { display: flex; align-items: center; gap: 8px; padding: 0 2px; }
.rec-day-date { font-size: 15px; font-weight: 700; }
.rec-item { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.rec-active { border-color: #bfdbfe; }
.rec-warn { border-color: var(--warn-line); }
.rec-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rec-actual { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rec-time { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--bg); min-width: 0; }
.rec-time-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.rec-time-value { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; word-break: keep-all; }
.rec-time-missing .rec-time-value { font-size: 16px; color: #8a5300; }
.rec-line { display: flex; gap: 10px; font-size: 14px; align-items: baseline; }
.rec-line-label { flex: none; width: 44px; color: var(--muted); }
.rec-line > span:last-child { min-width: 0; word-break: keep-all; font-variant-numeric: tabular-nums; }
.rec-hint { font-size: 13px; color: #8a5300; word-break: keep-all; }
.rec-active .rec-hint { color: var(--in-dark); }
.rec-empty { align-items: center; text-align: center; padding: 28px 16px; }
.rec-empty-title { font-size: 16px; font-weight: 700; }
.nav-btn:disabled { color: var(--faint); cursor: not-allowed; }

/* ── 정정 요청(직원) — 상태 색: 처리 대기 = 주황 / 승인 = 초록 / 반려 = 빨강 / 취소 = 회색 ─────────── */
.chip-pending { background: var(--warn-bg); color: #8a5300; }
.chip-approved { background: var(--ok-bg); color: #166534; }
.chip-rejected { background: var(--err-bg); color: #b42318; }
.seg-wide { display: flex; }
.seg-wide .seg-btn { flex: 1; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg-count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #f59e0b; color: #fff; font-size: 12px; font-weight: 800; line-height: 20px; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn-danger { background: #b42318; border-color: #b42318; color: #fff; }
.btn-danger:disabled { background: var(--off-bg); border-color: var(--line); color: var(--faint); }
.btn-danger-outline { background: var(--surface); border-color: var(--err-line); color: #b42318; }
.rec-corr { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.rec-corr .btn { margin-left: auto; }
.rec-corr-off { font-size: 13px; color: var(--muted); padding-top: 8px; border-top: 1px dashed var(--line); word-break: keep-all; }
.rec-voided { background: #fafbfc; border-style: dashed; }
.rec-voided .btn { align-self: flex-start; min-height: 36px; padding: 0 8px; }
.req-list { display: flex; flex-direction: column; gap: 8px; }
.req-item {
  display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; cursor: pointer; touch-action: manipulation;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--off-line); border-radius: var(--radius); font: inherit; color: inherit;
}
.req-pending { border-left-color: #f59e0b; }
.req-approved { border-left-color: #16a34a; }
.req-rejected { border-left-color: #dc2626; }
.req-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.req-type { font-size: 15px; font-weight: 700; }
.req-date { font-size: 14px; font-weight: 600; }
.req-reason { font-size: 14px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-all; }
.req-meta { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }

/* 덮는 시트(입력·확인·상세) — 휴대폰 = 아래에서 올라오는 전체 폭 / PC = 가운데 560px */
body.sheet-open { overflow: hidden; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(17, 24, 39, 0.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: var(--col); max-height: 92vh; max-height: 92dvh;
  display: flex; flex-direction: column; background: var(--surface); border-radius: 18px 18px 0 0;
  padding-bottom: var(--safe-bottom);
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.sheet-title { font-size: 18px; font-weight: 700; }
.sheet-close { width: 44px; height: 44px; border: 0; background: transparent; font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; }
.sheet-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.sheet-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.sheet-foot .btn-block { grid-column: 1 / -1; }
.sheet-summary { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; background: var(--bg); }
.sheet-summary-date { font-size: 17px; font-weight: 700; }
.sheet-summary .small { font-variant-numeric: tabular-nums; word-break: keep-all; }
.dt-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 8px; }
.dt-date, .dt-time, .reason-input {
  width: 100%; min-width: 0; min-height: 50px; padding: 0 12px;
  border: 1px solid var(--off-line); border-radius: 12px; background: #fff;
  font: inherit; font-size: 17px; color: var(--text); /* 16px 이상: iPhone이 입력 시 화면을 확대하지 않게 */
  -webkit-appearance: none; appearance: none;
}
.reason-input { min-height: 96px; padding: 12px; resize: vertical; line-height: 1.5; }
.dt-date:focus-visible, .dt-time:focus-visible, .reason-input:focus-visible, .type-btn:focus-visible, .req-item:focus-visible, .sheet-close:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.field-hint { font-size: 13px; color: var(--muted); word-break: keep-all; }
.right { text-align: right; }
.type-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.type-btn {
  min-height: 52px; padding: 6px 10px; border: 1px solid var(--off-line); border-radius: 12px; background: var(--surface);
  font: inherit; font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer; touch-action: manipulation; word-break: keep-all;
}
.type-btn-on { border-color: var(--brand); background: #eef3ff; color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.type-single { font-size: 16px; font-weight: 700; color: var(--brand); }
.confirm-list { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px 12px; margin: 0; }
.confirm-list dt { font-size: 14px; color: var(--muted); }
.confirm-list dd { margin: 0; font-size: 15px; word-break: keep-all; font-variant-numeric: tabular-nums; }
.confirm-after { font-weight: 700; color: var(--brand); }
.pre { white-space: pre-wrap; word-break: break-all; }

@media (min-width: 720px) {
  .sheet-backdrop { align-items: center; padding: 24px; }
  .sheet { border-radius: 18px; }
}
@media (max-width: 340px) {
  .type-list { grid-template-columns: 1fr; }
  .confirm-list { grid-template-columns: 64px minmax(0, 1fr); }
}

/* ── 하단 메뉴 ────────────────────────────────────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: var(--safe-bottom);
}
.tabbar-inner { max-width: var(--col); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); height: var(--tabbar-h); }
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 600; /* 비선택 탭도 흰 바탕 대비 4.5:1 이상 */
}
.tab-active { color: var(--brand); }
.tab-icon { width: 24px; height: 24px; }

/* ── 넓은 화면(PC) ────────────────────────────────────── */
@media (min-width: 720px) {
  .content { padding-top: 24px; }
  .clock-actions { gap: 16px; }
  .btn-clock { min-height: 120px; }
}
/* 아주 좁은 화면(구형 소형 기기) */
@media (max-width: 340px) {
  .btn-clock { font-size: 20px; min-height: 96px; }
  .clock-time { font-size: 17px; }
  .seg-btn { padding: 0 10px; }
  .period-nav { gap: 4px; }
  .period-title { font-size: 15px; }
  .btn-today { padding: 0 8px; }
  .cal-time { font-size: 10px; }
  .rec-time-value { font-size: 18px; }
}
