/* ── Design tokens (画面モック用) ────────────── */
:root {
  --brand:       #0CB6D5;
  --brand-deep:  #0790AC;
  --brand-pale:  #E0F4F9;
  --brand-paler: #F3FAFC;
  --navy:        #1a1a2e;
  --navy2:       #1e2d4a;
  --date:        #fcc842;
  --text:        #222;
  --text-mid:    #555;
  --text-light:  #999;
  --bg:          #f4f6f9;
  --surface:     #ffffff;
  --border:      #e2e8f0;
  --ok:          #2ecc71;
  --err:         #e74c3c;
  --sb: env(safe-area-inset-bottom, 0px);
  --st: env(safe-area-inset-top, 0px);
}

/* ── Reset ────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN",
               "Noto Sans", Meiryo, sans-serif;
  font-size: 16px;
  letter-spacing: 0.04em;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  min-height: 100dvh;
}

/* ── Header ────────────── */
.app-header {
  background: #ffffff;
  color: var(--text);
  padding: calc(var(--st) + 1.25rem) 1.25rem 0;
  border-bottom: 3px solid var(--brand);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* header-inner: 左テキスト / 右ロゴ の flex 横並び */
.header-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* 左カラム: テキスト系をまとめる */
.header-left {
  flex: 1;
  min-width: 0; /* 長い現場名がはみ出さないよう折り返し許可 */
}

/* 右カラム: ロゴを上下中央で大きく表示 */
.header-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-logo img {
  height: 64px;
  width: auto;
  display: block;
  /* multiply で白背景を透過させ、ロゴのみ浮かび上がらせる */
  mix-blend-mode: multiply;
}

.header-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: bold;
  letter-spacing: 0.14em;
  color: var(--brand);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.header-title {
  font-size: 1.6rem;
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--navy);
}
.header-sub {
  font-size: 0.75rem;
  color: var(--text-mid);
  margin-top: 0.25rem;
  letter-spacing: 0.05em;
}
.header-clock {
  margin-top: 0.85rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.clock-time {
  font-size: 3rem;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
}
.clock-date {
  font-size: 0.78rem;
  color: var(--text-mid);
  letter-spacing: 0.05em;
}

/* ── Content ────────────── */
.tab-body {
  padding: 1.25rem 1.1rem calc(1.25rem + var(--sb));
}

/* ── Section label ────────────── */
.sec-label {
  font-size: 0.68rem;
  font-weight: bold;
  color: var(--text-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
  border-left: 3px solid var(--brand);
  padding-left: 0.6rem;
}
.sec-label:first-child { margin-top: 0; }

/* ── Punch buttons ────────────── */
.punch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.punch-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 1.2rem 0.5rem;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  letter-spacing: 0.04em;
}
.punch-btn:active  { transform: scale(0.95); opacity: 0.85; }
.punch-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
/* 打刻済み: disabled より濃く、「済」バッジで視覚的に区別する */
.punch-btn.btn-done { opacity: 0.45; cursor: not-allowed; transform: none; position: relative; }
.punch-btn.btn-done::after {
  content: '済';
  position: absolute;
  top: 4px; right: 6px;
  font-size: 0.6rem;
  font-weight: bold;
  background: rgba(255,255,255,0.85);
  color: #374151;
  border-radius: 3px;
  padding: 0 3px;
  line-height: 1.5;
}
.punch-btn.btn-unavailable { opacity: 0.28; cursor: not-allowed; transform: none; position: relative; }
.punch-btn.btn-unavailable::after {
  content: '不可';
  position: absolute;
  top: 4px; right: 6px;
  font-size: 0.6rem;
  font-weight: bold;
  background: rgba(255,255,255,0.85);
  color: #6b7280;
  border-radius: 3px;
  padding: 0 3px;
  line-height: 1.5;
}
.p-icon  { font-size: 1.65rem; line-height: 1; }
.p-label { font-size: 1rem; font-weight: bold; }
.p-en    { font-size: 0.6rem; opacity: 0.6; letter-spacing: 0.1em; text-transform: uppercase; }

.btn-wake     { background: var(--brand); }
.btn-depart   { background: var(--brand-deep); }
.btn-arrive   { background: #27ae60; }
.btn-assemble { background: #e67e22; }
.btn-finish   {
  background: var(--navy2);
  grid-column: 1 / -1;
  flex-direction: row;
  gap: 0.7rem;
  padding: 1rem 1.5rem;
  border: 1px solid rgba(255,255,255,0.08);
}

/* ── Status ────────────── */
.status-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--surface);
  border-radius: 4px;
  border-left: 3px solid var(--border);
  padding: 0.75rem 1rem;
  margin-top: 0.85rem;
  min-height: 3rem;
}
.status-row.ok  { border-left-color: var(--ok); }
.status-row.err { border-left-color: var(--err); }
.status-row .s-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.2s;
}
.status-row.ok  .s-dot { background: var(--ok); }
.status-row.err .s-dot { background: var(--err); }
.status-row .s-txt {
  font-size: 0.84rem;
  color: var(--text-mid);
}
.status-row.ok  .s-txt { color: var(--ok); font-weight: bold; }
.status-row.err .s-txt { color: var(--err); font-weight: bold; }

/* ── 明日予定入力リマインダー ────────────── */
.plan-reminder {
  background: #fff7ed;
  border: 2px solid #fed7aa;
  border-left: 5px solid #f97316;
  border-radius: 6px;
  padding: 1rem 1.05rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 22px rgba(249, 115, 22, 0.16);
}
.plan-reminder-kicker {
  display: inline-flex;
  align-items: center;
  background: #f97316;
  color: #fff;
  border-radius: 3px;
  padding: 0.16rem 0.5rem;
  font-size: 0.68rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
}
.plan-reminder-title {
  color: #9a3412;
  font-size: 1.05rem;
  font-weight: bold;
  margin-bottom: 0.45rem;
  letter-spacing: 0.03em;
}
.plan-reminder-text {
  color: #7c2d12;
  font-size: 0.86rem;
  line-height: 1.7;
  margin-bottom: 0.6rem;
}
.plan-reminder-sites {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.plan-reminder-sites span {
  background: #ffedd5;
  color: #9a3412;
  border-radius: 4px;
  padding: 0.18rem 0.5rem;
  font-size: 0.74rem;
  font-weight: bold;
}
.plan-reminder-btn {
  width: 100%;
  border: none;
  border-radius: 4px;
  background: var(--navy);
  color: #fff;
  padding: 0.72rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
}

/* ── お知らせ ────────────── */
.guard-notices {
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-left: 5px solid var(--brand);
  border-radius: 6px;
  padding: 0.95rem 1rem;
  margin-bottom: 1rem;
}
.guard-notices-heading {
  color: var(--brand-deep);
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 0.65rem;
  letter-spacing: 0.04em;
}
.guard-notice-item {
  padding: 0.65rem 0;
  border-top: 1px solid #e5eef8;
}
.guard-notice-item:first-of-type {
  border-top: none;
  padding-top: 0;
}
.guard-notice-title {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: bold;
  line-height: 1.5;
}
.guard-notice-text {
  color: var(--text-mid);
  font-size: 0.82rem;
  line-height: 1.7;
  margin-top: 0.28rem;
  white-space: pre-wrap;
}
.guard-notice-link {
  display: inline-block;
  margin-top: 0.45rem;
  color: var(--brand-deep);
  font-size: 0.8rem;
  font-weight: bold;
  text-decoration: none;
}

/* ── Register ────────────── */
.reg-card {
  background: var(--surface);
  border-radius: 4px;
  border-top: 3px solid var(--brand);
  padding: 1.4rem 1.25rem;
}
.reg-desc {
  font-size: 0.84rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 1.1rem;
  letter-spacing: 0.05em;
}
.reg-input {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  margin-bottom: 0.75rem;
  outline: none;
  transition: border-color 0.15s;
  letter-spacing: 0.04em;
}
.reg-input:focus { border-color: var(--brand); }

/* 詳細情報フォームのラベル（reg-input を流用し、ラベルだけ追加） */
.det-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #555;
  margin: 0.75rem 0 0.25rem;
}

/* 入力欄の下に出す補足説明（健康診断 未実施時の案内など） */
.det-hint {
  font-size: 0.72rem;
  color: var(--text-light);
  margin: 0.25rem 0 0;
}

.btn-primary {
  width: 100%;
  padding: 0.9rem;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: opacity 0.15s;
}
.btn-primary:disabled { opacity: 0.38; cursor: not-allowed; }
.btn-primary:active   { opacity: 0.82; }

/* ── Pending ────────────── */
.pending-card {
  background: var(--surface);
  border-top: 3px solid var(--date);
  border-radius: 4px;
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.pending-icon  { font-size: 3rem; margin-bottom: 0.9rem; }
.pending-title { font-size: 1.1rem; font-weight: bold; margin-bottom: 0.6rem; letter-spacing: 0.04em; }
.pending-text  { font-size: 0.84rem; color: var(--text-mid); line-height: 1.8; letter-spacing: 0.05em; }

/* ── Calendar ────────────── */
.cal-hint {
  background: var(--brand-paler);
  border-left: 3px solid var(--brand);
  border-radius: 0 4px 4px 0;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}
.cal-hint strong { color: var(--text); }

/* 週次シフト提出の状態バナー */
.shift-banner {
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.9rem;
  font-weight: 600;
}
.shift-banner .shift-banner-sub { font-size: 0.82rem; font-weight: 500; }
/* 木16時〜: 促し（黄） */
.shift-banner.encourage { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }
/* 金〜: 必須（赤） */
.shift-banner.required  { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
/* 提出済み: 確認（緑） */
.shift-banner.done      { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
/* 通常期間: 控えめ */
.shift-banner.neutral   { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; font-weight: 500; }
.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 0.3rem;
}
.cal-dl {
  font-size: 0.62rem;
  font-weight: bold;
  text-align: center;
  color: var(--text-light);
  padding: 0.2rem 0;
  letter-spacing: 0.06em;
}
.cal-dl.sun { color: #e74c3c; }
.cal-dl.sat { color: var(--brand-deep); }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.28rem;
  margin-bottom: 1rem;
}
.cal-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  border: none;
  font-size: 0.78rem;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: #ccc;
  transition: background 0.12s, color 0.12s, transform 0.08s;
}
.cal-cell:active { transform: scale(0.88); }
.cal-cell.available {
  background: var(--brand);
  color: #fff;
}
.cal-cell.unavailable { background: var(--surface); color: #94a3b8; }
.cal-cell.locked      { background: #f8f8f8; color: #ddd; cursor: default; }
.cal-cell.locked.available { background: var(--brand-pale); color: #9cbdb0; cursor: default; }
.cal-cell.cal-placeholder { background: transparent; cursor: default; }
.cal-cell.today-cell  { outline: 2px solid var(--brand-deep); outline-offset: 1px; }
.cal-cell.sun-cell:not(.available):not(.locked) { color: #f87171; }
.cal-cell.sat-cell:not(.available):not(.locked) { color: var(--brand); }

.btn-submit-shift {
  width: 100%;
  padding: 0.9rem;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: opacity 0.15s;
  margin-bottom: 0.25rem;
}
.btn-submit-shift:disabled { opacity: 0.38; cursor: not-allowed; }
.btn-submit-shift:active   { opacity: 0.82; }

.confirm-box {
  background: var(--surface);
  border-top: 3px solid var(--ok);
  border-radius: 0 0 4px 4px;
  padding: 0.9rem 1rem;
  margin-top: 0.75rem;
}
.confirm-box-title {
  font-size: 0.72rem;
  font-weight: bold;
  color: var(--ok);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.confirm-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.confirm-chip {
  background: var(--brand-pale);
  color: var(--brand-deep);
  padding: 0.22rem 0.65rem;
  border-radius: 2px;
  font-size: 0.76rem;
  font-weight: bold;
  letter-spacing: 0.04em;
}

/* ── Shift cards ────────────── */
.shift-card {
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.8rem;
  border: 1px solid var(--border);
}
.shift-card-plan-missing {
  border-color: #fdba74;
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.12);
}
.shift-card-plan-missing .shift-card-inner {
  background: #fffaf5;
}
/* 当日シフトは左ボーダーとブランドカラーの薄い背景で強調 */
.shift-card-today {
  border-left: 4px solid var(--brand);
  background: var(--brand-paler);
}
.shift-card-stripe {
  height: 4px;
}
.shift-card-stripe.day   { background: var(--date); }
.shift-card-stripe.night { background: var(--navy2); }
/* 巡回現場（096）は紫系で統一（案件ボードの巡回チップと同系色） */
.shift-card-stripe.patrol { background: #7c3aed; }
.shift-card-inner { padding: 0.95rem 1.1rem 1.1rem; }
.shift-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
  gap: 0.55rem;
}
.shift-card-date {
  font-size: 0.75rem;
  color: var(--text-light);
  letter-spacing: 0.05em;
}
.shift-card-badges {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.shift-plan-alert {
  font-size: 0.62rem;
  font-weight: bold;
  padding: 0.16rem 0.55rem;
  border-radius: 2px;
  color: #9a3412;
  background: #ffedd5;
  letter-spacing: 0.06em;
}
.shift-type-tag {
  font-size: 0.62rem;
  font-weight: bold;
  padding: 0.16rem 0.55rem;
  border-radius: 2px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.shift-type-tag.day   { background: #fef3c7; color: #92400e; }
.shift-type-tag.night { background: #e2e8f0; color: #334155; }
.shift-type-tag.patrol { background: #ede9fe; color: #5b21b6; }
/* 巡回カード: 打刻・予定入力が不要であることの案内文 */
.patrol-note {
  font-size: 0.78rem;
  line-height: 1.5;
  color: #5b21b6;
  background: #f5f3ff;
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
}
.shift-card-site {
  font-size: 1.05rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
  letter-spacing: 0.03em;
}
/* 現場住所: 現場名と集合時間の間に表示 */
.shift-card-address {
  font-size: 0.8rem;
  color: var(--text-mid);
  margin-bottom: 0.3rem;
  line-height: 1.4;
}
.shift-card-time {
  font-size: 0.77rem;
  color: var(--text-mid);
  letter-spacing: 0.04em;
}
/* シフト確認カードの時刻表示: 集合＝赤太字で目立たせ、開始＝通常（見間違いによる遅刻防止） */
.shift-time-meet {
  color: #dc2626;
  font-weight: 800;
  font-size: 0.9rem;
}
.shift-time-start {
  margin-left: 0.9em;
}
/* v11: 同じ現場・同じ日・同じ区分に入る他の隊員名 */
.shift-card-coworkers {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-mid);
  line-height: 1.4;
}
/* 機能6後半: Google マップリンク */
.shift-card-map {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.45rem;
  font-size: 0.72rem;
  color: var(--brand-deep);
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 0.04em;
}
.shift-card-map:active { opacity: 0.7; }
.plan-divider {
  height: 1px;
  background: var(--border);
  margin: 0.85rem 0;
}
.plan-title {
  font-size: 0.65rem;
  font-weight: bold;
  color: var(--text-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}
.plan-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.plan-group { display: flex; flex-direction: column; gap: 0.2rem; }
.plan-label { font-size: 0.66rem; color: var(--text-light); font-weight: bold; letter-spacing: 0.06em; }
.plan-time-input {
  padding: 0.5rem 0.6rem;
  /* 起床/出発の予定時刻は入力欄だと分かりづらいという指摘があったため、
     枠線を太く濃いめにして背景も薄く付け、入力できる欄だと一目で分かるようにする */
  border: 2px solid #94a3b8;
  background: #f8fbfd;
  border-radius: 5px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
/* フォーカス時はブランド色の枠＋淡いリングで、今どこを入力しているか分かりやすくする */
.plan-time-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(12, 182, 213, 0.18);
}
.btn-plan-save {
  width: 100%;
  padding: 0.55rem;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: opacity 0.15s;
}
.btn-plan-save:disabled { opacity: 0.38; cursor: not-allowed; }
.btn-plan-save:active   { opacity: 0.8; }
.plan-saved {
  font-size: 0.74rem;
  color: var(--ok);
  font-weight: bold;
  text-align: center;
  margin-top: 0.38rem;
  letter-spacing: 0.06em;
  display: none;
}
/* 送信済み表示エリア */
.plan-status-area {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.4rem;
}
.plan-status-text {
  font-size: 0.82rem;
  color: #166534;
  font-weight: bold;
  margin-bottom: 0.35rem;
}
.plan-status-text span { font-weight: normal; color: #15803d; }
.btn-plan-change {
  width: 100%;
  padding: 0.4rem;
  background: #fff;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
}
.btn-plan-cancel {
  width: 100%;
  padding: 0.4rem;
  background: #f3f4f6;
  color: #6b7280;
  border: none;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
  margin-top: 0.35rem;
}

/* ── Header Nav（時計直下タブ） ────────────── */
.header-nav {
  display: flex;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}
.nav-btn {
  flex: 1;
  padding: 0.6rem 0.2rem;
  border: none;
  border-bottom: 3px solid transparent;
  background: none;
  font-size: 0.78rem;
  font-weight: bold;
  font-family: inherit;
  color: #bbb;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  letter-spacing: 0.04em;
  transition: color 0.15s, border-color 0.15s;
}
.nav-btn.active {
  color: var(--brand-deep);
  border-bottom-color: var(--brand);
}
.nav-icon { font-size: 1.3rem; line-height: 1.1; }

/* ── Site Selector (打刻前の現場選択UI) ────────────── */
/* 当日シフトが複数件あるときだけ表示される */
.site-selector {
  background: var(--surface);
  border-top: 3px solid var(--brand);
  border-radius: 4px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.site-selector-title {
  font-size: 0.7rem;
  font-weight: bold;
  color: var(--text-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}
/* 各現場を選択するボタン */
.site-option-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  margin-bottom: 0.4rem;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  letter-spacing: 0.03em;
}
.site-option-btn:last-child { margin-bottom: 0; }
/* 選択済み状態 */
.site-option-btn.selected {
  border-color: var(--brand);
  background: var(--brand-pale);
  color: var(--brand-deep);
}

/* ── Loading / Empty ────────────── */
.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 1.5rem;
  gap: 1rem;
}
.spinner {
  width: 1.8rem; height: 1.8rem;
  border: 2.5px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 0.82rem; color: var(--text-light); letter-spacing: 0.06em; }

/* LINE問い合わせボタン */
.line-contact-btn {
  display: block;
  margin: 1.5rem auto 0;
  width: fit-content;
  padding: 0.7rem 1.4rem;
  background: #06C755;
  color: #fff;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: bold;
  text-decoration: none;
  letter-spacing: 0.05em;
}
.line-contact-btn:active { opacity: 0.82; }

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-light);
}
.empty-icon { font-size: 2.5rem; margin-bottom: 0.6rem; }
.empty-text { font-size: 0.84rem; line-height: 1.7; letter-spacing: 0.04em; }

/* ── スマホ小画面向け（480px 以下）────────────── */
@media (max-width: 480px) {

  /* ヘッダー全体のパディングを詰める */
  .app-header {
    padding: calc(var(--st) + 0.75rem) 1rem 0;
  }

  /* ロゴを縮小してテキストエリアのスペースを確保 */
  .header-logo img {
    height: 40px;
  }

  /* 時計を少し小さくして縦幅を抑える */
  .clock-time {
    font-size: 2.2rem;
  }

  /* ヘッダータグ文字が折り返しで崩れないよう省略する */
  .header-tag {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ── PC 大画面向け（1280px 以上）────────────── */
@media (min-width: 1280px) {

  .app-header {
    padding: 0;
    border-bottom: 4px solid var(--brand);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  }

  /* header-inner: flex 構造を維持しつつ PC 用余白に拡張 */
  .header-inner {
    padding: 2rem 3rem 1.75rem;
    gap: 2rem;
    align-items: center;
  }

  /* 左カラム: テキストを PC サイズに */
  .header-tag   { font-size: 0.72rem; }
  .header-title { font-size: 2.4rem; }
  .header-sub   { font-size: 0.9rem; }

  /* 時計: 横並び・少し大きく */
  .header-clock {
    margin-top: 0.9rem;
    gap: 0.75rem;
  }
  .clock-time {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: -0.03em;
    line-height: 1;
  }
  .clock-date { font-size: 0.9rem; }

  /* 右カラム: ロゴを PC サイズに拡大 */
  .header-logo img {
    height: 100px;
    mix-blend-mode: multiply;
  }

  /* タブナビ */
  .header-nav { padding: 0 3rem; }
  .nav-btn { font-size: 0.9rem; padding: 0.8rem 2rem; flex: none; }
  .nav-icon { font-size: 1.2rem; }

  /* コンテンツエリア */
  .tab-body { max-width: 960px; margin: 0 auto; padding: 2rem 3rem; }
}

/* ── 終了打刻の残業確認モーダル（残業／定時の2択）────────────────── */
.ot-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.ot-modal.open { display: flex; }
.ot-modal-box {
  background: #fff;
  color: var(--text);
  border-radius: 14px;
  width: 100%;
  max-width: 360px;
  padding: 1.5rem 1.25rem 1.25rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  text-align: center;
}
.ot-modal-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.4rem; }
.ot-modal-msg   { font-size: 0.95rem; color: var(--text-mid); margin-bottom: 1.1rem; }
.ot-modal-btns  { display: flex; gap: 0.8rem; }
.ot-btn {
  flex: 1;
  padding: 1rem 0.5rem;
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
}
.ot-btn-teiji  { background: #27ae60; }  /* 定時 = 残業なし */
.ot-btn-zangyo { background: #e67e22; }  /* 残業あり */
.ot-btn-confirm { background: var(--navy2, #1a1a2e); width: 100%; margin-top: 0.75rem; }
.ot-minutes-row { margin-top: 1.1rem; text-align: left; }
.ot-minutes-label { display: block; font-size: 0.85rem; color: var(--text-mid); margin-bottom: 0.4rem; }
#ot-minutes-input {
  width: 100%;
  padding: 0.75rem;
  font-size: 1.1rem;
  border: 1px solid #ddd;
  border-radius: 10px;
  text-align: center;
}
.ot-error { color: #e74c3c; font-size: 0.85rem; margin-top: 0.5rem; min-height: 1em; }
.ot-cancel {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 0.7rem;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 0.9rem;
  cursor: pointer;
}
