/*
 * ============================================================
 *  TSMS — Unified Design System CSS  v3.0
 *  対応ページ: index / report / confirm / detail / ops /
 *              sales / settings / login / signup / auth-callback
 *  対応環境  : iOS Safari / Android Chrome / iPadOS / PWA
 * ============================================================
 */

/* ============================================================
   1. Google Fonts — Noto Sans JP
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

/* ============================================================
   2. Design Tokens (CSS Custom Properties)
   ============================================================ */
:root {
  /* ── ブランドカラー ── */
  --brand:        #58C2FF;
  --brand-dark:   #2580ED;
  --brand-dim:    rgba(88, 194, 255, 0.18);
  --modal-shell-border: #58C2FF;
  --modal-shell-shadow: 0 0 20px rgba(88, 194, 255, 0.20), 0 16px 48px rgba(0,0,0,.18);

  /* ── ライトモード (デフォルト) ── */
  --bg:           #F3F6F8;
  --surface-0:    #FFFFFF;
  --surface-1:    #FFFFFF;
  --surface-2:    #EEF3F6;
  --surface-3:    #E2E9EE;
  --border:       #D5DEE6;
  --border-light: #E8EEF3;
  --divider:      #DCE5EC;

  --text-primary:   #0F1720;
  --text-secondary: #344554;
  --text-muted:     #5B6D7C;
  --text-disabled:  #96A8B5;

  --accent:       #2580ED;
  --accent-hover: #1A6FD4;
  --accent-light: #D8EEFF;
  --link:         #187FBF;
  --selected-fill: linear-gradient(180deg, #28B857 0%, #168A3D 100%);
  --selected-fill-hover: linear-gradient(180deg, #31C562 0%, #1B9546 100%);
  --selected-border: #0E6F2E;
  --selected-text: #FFFFFF;
  --selected-ring: rgba(40, 184, 87, 0.34);
  --field-focus-border: #2A8CF0;
  --field-focus-bg: linear-gradient(180deg, #FFFFFF 0%, #EDF7FF 100%);
  --field-focus-ring: rgba(42, 140, 240, 0.24);

  --success:      #1EA44A;
  --success-bg:   #E8F8EE;
  --warning:      #E09000;
  --warning-bg:   #FFF8E1;
  --danger:       #D93025;
  --danger-bg:    #FDECEA;
  --info:         #58C2FF;

  --value-highlight: #E06C00;

  /* ── サイドメニュー ── */
  --menu-w: 280px;

  /* ── ヘッダー高さ ── */
  --header-h: 60px;

  /* ── ボトムナビ高さ ── */
  --bottom-nav-size-scale: 0.95;
  --bottom-nav-h: calc(60px * var(--bottom-nav-size-scale));
  --bottom-nav-safe-zone: 20px;
  --bottom-nav-label-size: calc(16px * var(--bottom-nav-size-scale));
  --bottom-nav-icon-size: calc(29px * var(--bottom-nav-size-scale));
  --bottom-nav-item-gap: 1px;
  --bottom-nav-item-pad-top: calc(6px * var(--bottom-nav-size-scale));
  --bottom-nav-item-pad-bottom: calc(7px * var(--bottom-nav-size-scale));
  --bottom-nav-active-glow: rgba(88, 194, 255, 0.56);
  --bottom-nav-surface: var(--surface-1);
  --bottom-nav-hover-surface: var(--surface-2);
  --more-sheet-surface: var(--surface-1);
  --more-sheet-item-surface: var(--surface-2);
  --more-sheet-item-hover-surface: var(--surface-3);

  /* ── 週カラー ── */
  --week-sat-bg:  #D8EEFF;
  --week-sun-bg:  #FDECEA;
  --weekend-text: #1d2a35;

  /* ── 無効セル ── */
  --disabled-bg:   #E2E8EE;
  --disabled-text: #6A7582;

  /* ── シャドウ ── */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.07);
  --shadow-lg:  0 8px 24px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.08);
  --shadow-overlay: 0 16px 48px rgba(0,0,0,.18);

  /* ── Radius ── */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

/* ── Unified Scale v1 (文字/余白/線/高さ) ── */
--font-2xs: 10px;
--font-xs:  12px;
--font-sm:  14px;
--font-md:  16px;
--font-lg:  18px;
--font-xl:  20px;
--font-2xl: 20px;
--font-3xl: 24px;
--font-4xl: 28px;
--font-5xl: 32px;

--space-1: 4px;
--space-2: 8px;
--space-3: 12px;
--space-4: 16px;

--line-thin: 1px;
--line-regular: 1.5px;
--line-strong: 2px;

--control-h-sm: 38px;
--control-h-md: 50px;
--control-h-lg: 58px;
--control-h-xl: 110px;
--choice-btn-ratio: 1.22 / 1;
--choice-btn-min-h: 72px;
--touch-min: 44px;
--radius-pill: 999px;

  /* ── Transition ── */
  --ease-default: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring:  0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ── Z-index ── */
  --z-header:     100;
  --z-menu:       1000;
  --z-menu-bg:    900;
  --z-bottom-nav: 1200;
  --z-more-sheet: 1300;
  --z-more-bg:    1250;
  --z-modal:      1400;
  --z-confirm:    1500;
}

/* ── ダークモード ── */
:root[data-theme="dark"] {
  --bg:           #0F1417;
  --surface-0:    #0C1014;
  --surface-1:    #151C20;
  --surface-2:    #1B242A;
  --surface-3:    #22303A;
  --border:       #2A353D;
  --border-light: #243039;
  --divider:      #263035;

  --text-primary:   #E6EEF3;
  --text-secondary: #B7C4CC;
  --text-muted:     #8A949A;
  --text-disabled:  #4D5A63;
  --bottom-nav-surface: #0e1a2d;
  --bottom-nav-hover-surface: #0a1630;
  --more-sheet-surface: #0e1a2d;
  --more-sheet-item-surface: #0a1630;
  --more-sheet-item-hover-surface: #132644;

  --accent:       #3B95F0;
  --accent-hover: #4DA3FF;
  --accent-light: #152A42;
  --link:         #58C2FF;
  --selected-fill: linear-gradient(180deg, #39D46C 0%, #1A9A45 100%);
  --selected-fill-hover: linear-gradient(180deg, #46E07A 0%, #21A94E 100%);
  --selected-border: #B7F5C8;
  --selected-text: #F7FFF9;
  --selected-ring: rgba(70, 224, 122, 0.38);
  --field-focus-border: #86D8FF;
  --field-focus-bg: linear-gradient(180deg, rgba(23, 48, 82, 0.98), rgba(12, 28, 51, 0.98) 100%);
  --field-focus-ring: rgba(134, 216, 255, 0.34);

  --success:      #28C35A;
  --success-bg:   #0D2518;
  --warning:      #FFBF40;
  --warning-bg:   #2A1F00;
  --danger:       #F35B53;
  --danger-bg:    #2A0F0D;
  --info:         #58C2FF;

  --value-highlight: #FFAA55;

  --week-sat-bg:  #1C3A52;
  --week-sun-bg:  #3A1A1A;
  --weekend-text: #E6F3FF;

  --disabled-bg:   #1E2A32;
  --disabled-text: #4D5E6A;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.25);
  --shadow-md:  0 4px 12px rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.25);
  --shadow-lg:  0 8px 24px rgba(0,0,0,.4), 0 4px 8px rgba(0,0,0,.3);
  --shadow-overlay: 0 16px 48px rgba(0,0,0,.5);
}

/* ============================================================
   2.5 Migrated Page-local CSS
   ============================================================ */
:where(.report-entry-page),
:where(.settings-report-legacy-page) {
  --legacy-page-text: #111;
  --legacy-page-muted: #666;
  --legacy-page-border: #999;
}

body:where(.report-entry-page),
body:where(.settings-report-legacy-page) {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 18px;
}

:where(.report-entry-page) .note {
  font-size: var(--font-sm);
  color: var(--legacy-page-muted);
  line-height: 1.35;
  margin: 8px 0;
}

:where(.report-entry-page) main .wf-panel {
  border: 0;
  background: transparent !important;
  margin: 8px 0;
  padding: 6px 0 2px;
}

:where(.report-entry-page) .wf-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: var(--font-2xl);
  margin: 0 0 8px 0;
  text-align: left;
}

:where(.report-entry-page) .wf-label::after {
  content: "";
  flex: 1 1 auto;
  border-top: 2px solid var(--legacy-page-border);
  opacity: .95;
}

:where(.report-entry-page) .wf-subnote {
  font-size: var(--font-sm);
  color: var(--legacy-page-muted);
  margin: -2px 0 8px 0;
}

:where(.report-entry-page) .wf-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

:where(.report-entry-page) .btn {
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid var(--legacy-page-border);
  background: #fff;
  border-radius: 0;
  padding: 14px 8px;
  font-size: var(--font-lg);
  min-height: 56px;
}

:where(.report-entry-page) .btn.is-selected {
  border: 2px solid #1A7A28;
  background: #1F9A33 !important;
  color: #fff !important;
}

:where(.report-entry-page) #btn_discount.is-selected,
:where(.report-entry-page) #btn_discount.is-selected:hover,
:where(.report-entry-page) #btn_discount.is-selected:active,
:where(.report-entry-page) #btn_discount.is-selected:focus-visible {
  border: 2px solid #1A7A28 !important;
  background: #1F9A33 !important;
  color: #fff !important;
}

:where(.report-entry-page) .wf-form {
  display: grid;
  gap: 10px;
}

:where(.report-entry-page) .wf-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

:where(.report-entry-page) .wf-field-label {
  font-size: var(--font-md);
  color: var(--legacy-page-muted);
}

:where(.report-entry-page) .input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 2px solid var(--legacy-page-border);
  border-radius: 0;
  padding: 14px 10px;
  font-size: 20px;
  min-height: 56px;
  background: #fff;
}

:where(.report-entry-page) .wf-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

:where(.report-entry-page) .wf-inline {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  gap: 8px;
  align-items: end;
}

:where(.report-entry-page) .wf-row > .btn,
:where(.report-entry-page) .wf-actions > .btn,
:where(.report-entry-page) .wf-inline > *,
:where(.report-entry-page) .wf-field > * {
  min-width: 0;
}

.is-hidden {
  display: none !important;
}

:where(.report-entry-page) .keypad {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

:where(.report-entry-page) .keypad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

:where(.report-entry-page) .key {
  border: 2px solid var(--legacy-page-border);
  border-radius: 0;
  background: #fff;
  min-height: 60px;
  font-size: var(--font-3xl);
}

:where(.report-entry-page) .key.small {
  font-size: var(--font-lg);
}

:where(.report-entry-page) .key-wide {
  grid-column: span 2;
}

:where(.report-entry-page) .key-tall {
  grid-row: span 2;
}

:where(.report-entry-page) .key-utility {
  font-size: var(--font-2xl);
}

:where(.report-entry-page) .key-submit {
  font-size: var(--font-xl);
  font-weight: 900;
  line-height: 1.15;
}

:where(.report-entry-page) .confirm-modal-bg {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgba(0,0,0,.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

:where(.report-entry-page) .confirm-modal-bg.show {
  display: flex;
}

:where(.report-entry-page) .confirm-modal-card {
  width: min(560px,100%);
  background: var(--surface-1,#fff);
  border: 2px solid var(--border,#ccc);
  padding: 14px;
}

:where(.report-entry-page) .confirm-modal-title {
  font-size: var(--font-3xl);
  font-weight: 900;
  margin: 0 0 10px;
}

:where(.report-entry-page) .confirm-modal-list {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
}

:where(.report-entry-page) .confirm-modal-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  font-size: var(--font-md);
  line-height: 1.4;
  border-bottom: 1px solid var(--border,#ddd);
  padding-bottom: 4px;
}

:where(.report-entry-page) .confirm-modal-key {
  color: var(--text-muted,#666);
  font-weight: 700;
}

:where(.report-entry-page) .confirm-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

:where(.report-entry-page) .submit-confirm-modal-card {
  width: min(560px,100%);
  border-radius: 16px;
  border: 1px solid #3d5f94;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(86,148,255,.18), rgba(10,21,44,0) 55%),
    linear-gradient(180deg, #0f1f42 0%, #0a1733 100%);
  box-shadow: 0 10px 28px rgba(0,0,0,.45), 0 0 0 1px rgba(126,167,235,.22) inset;
  padding: 12px;
}

:where(.report-entry-page) .submit-confirm-modal-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px;
  margin: 0 0 8px;
  padding: 2px 4px 10px;
  border-bottom: 1px solid rgba(135,168,220,.45);
}

:where(.report-entry-page) .submit-confirm-modal-step {
  margin: 0;
  color: #c8ddff;
  font-size: var(--font-xl);
  line-height: 1;
  font-weight: 900;
  letter-spacing: .01em;
}

:where(.report-entry-page) .submit-confirm-modal-card .confirm-modal-title {
  margin: 0;
  color: #eaf3ff;
  font-size: clamp(26px, 6vw, 28px);
  line-height: 1.1;
}

:where(.report-entry-page) .submit-confirm-modal-card .confirm-modal-list {
  border: 1px solid rgba(125,164,230,.34);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16,31,62,.86) 0%, rgba(13,26,52,.86) 100%);
  padding: 0 10px;
  gap: 0;
}

:where(.report-entry-page) .submit-confirm-modal-card .confirm-modal-item {
  grid-template-columns: 132px 1fr;
  gap: 10px;
  font-size: var(--font-md);
  line-height: 1.45;
  border-bottom: 1px solid rgba(125,164,230,.34);
  color: #e8f2ff;
  padding: 10px 0;
}

:where(.report-entry-page) .submit-confirm-modal-card .confirm-modal-item:last-child {
  border-bottom: 0;
}

:where(.report-entry-page) .submit-confirm-modal-card .confirm-modal-key {
  color: #bdd6fa;
  font-weight: 800;
}

:where(.report-entry-page) .submit-confirm-modal-card .confirm-modal-actions .btn {
  min-height: 58px;
  border-radius: 10px;
  font-size: var(--font-lg);
  font-weight: 900;
}

:where(.report-entry-page) .voice-input-modal-card {
  width: min(520px,100%);
  border-radius: 16px;
  border: 1px solid #3d5f94;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(86,148,255,.18), rgba(10,21,44,0) 55%),
    linear-gradient(180deg, #0f1f42 0%, #0a1733 100%);
  box-shadow: 0 10px 28px rgba(0,0,0,.45), 0 0 0 1px rgba(126,167,235,.22) inset;
  padding: 12px;
}

:where(.report-entry-page) .voice-input-modal-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px;
  margin: 0 0 8px;
  padding: 2px 4px 10px;
  border-bottom: 1px solid rgba(135,168,220,.45);
}

:where(.report-entry-page) .voice-input-modal-head .confirm-modal-title {
  margin: 0;
  color: #eaf3ff;
  font-size: clamp(24px, 6vw, 28px);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

:where(.report-entry-page) .voice-input-modal-step {
  margin: 0;
  color: #c8ddff;
  font-size: var(--font-xl);
  line-height: 1;
  font-weight: 900;
  letter-spacing: .01em;
}

:where(.report-entry-page) .voice-input-modal-body {
  border: 1px solid rgba(125,164,230,.34);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16,31,62,.86) 0%, rgba(13,26,52,.86) 100%);
  padding: 10px;
  margin: 0 0 12px;
  text-align: left;
}

:where(.report-entry-page) .voice-input-modal-prompt {
  margin: 0 0 8px;
  font-size: var(--font-md);
  color: #d3e6ff;
  font-weight: 900;
  line-height: 1.35;
}

:where(.report-entry-page) .voice-input-modal-status {
  margin: 0 0 8px;
  font-size: var(--font-sm);
  color: #bdd6fa;
  line-height: 1.3;
}

:where(.report-entry-page) .voice-input-modal-transcript {
  margin: 0;
  min-height: 44px;
  border: 1px solid rgba(125,164,230,.42);
  border-radius: 8px;
  background: rgba(11,23,44,.9);
  padding: 8px 10px;
  font-size: var(--font-md);
  color: #e8f2ff;
  line-height: 1.35;
  word-break: break-word;
  white-space: pre-wrap;
}

:where(.report-entry-page) .voice-input-modal-dynamic {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

:where(.report-entry-page) .voice-choice-guide,
:where(.report-entry-page) .voice-amount-guide {
  margin: 0;
  font-size: var(--font-sm);
  color: #bdd6fa;
  font-weight: 700;
}

:where(.report-entry-page) .voice-choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

:where(.report-entry-page) .voice-choice-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #4a6695 !important;
  background: linear-gradient(180deg, rgba(31,52,96,.95) 0%, rgba(17,33,67,.95) 100%) !important;
}

:where(.report-entry-page) .voice-choice-btn.is-selected {
  border-color: #62abff !important;
  background: linear-gradient(180deg, #2b7fe5 0%, #1e5fbb 100%) !important;
}

:where(.report-entry-page) .voice-choice-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border: 1px solid #7ea6df;
  border-radius: 999px;
  color: #d6e8ff;
  font-size: var(--font-md);
  font-weight: 900;
  line-height: 1;
  background: rgba(10,20,40,.75);
}

:where(.report-entry-page) .voice-choice-label {
  color: #f1f7ff;
  font-size: clamp(20px, 5.4vw, 24px);
  font-weight: 900;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

:where(.report-entry-page) .voice-amount-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
}

:where(.report-entry-page) .voice-amount-grid.single {
  grid-template-columns: 1fr;
}

:where(.report-entry-page) .voice-amount-box {
  border: 1px solid rgba(125,164,230,.42);
  border-radius: 10px;
  background: rgba(11,23,44,.9);
  padding: 10px;
}

:where(.report-entry-page) .voice-amount-box.active {
  border-color: #62abff;
  box-shadow: 0 0 0 1px rgba(98,171,255,.28) inset;
}

:where(.report-entry-page) .voice-amount-label {
  margin: 0 0 6px;
  font-size: var(--font-sm);
  color: #bdd6fa;
  font-weight: 700;
}

:where(.report-entry-page) .voice-amount-value {
  font-size: clamp(32px, 9.5vw, 40px);
  font-weight: 900;
  line-height: 1.05;
  text-align: right;
  color: #f2f8ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

:where(.report-entry-page) .voice-input-modal-actions {
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
}

:where(.report-entry-page) .voice-input-modal-actions.is-binary {
  grid-template-columns: repeat(2,minmax(0,1fr));
}

:where(.report-entry-page) .voice-input-modal-actions.is-single {
  grid-template-columns: 1fr;
}

:where(.report-entry-page) .voice-input-modal-actions .btn {
  min-height: 52px;
  border-radius: 10px;
  font-size: var(--font-lg);
  font-weight: 900;
}

:where(.report-entry-page) .voice-input-modal-actions .btn[hidden] {
  display: none !important;
}

:root[data-theme="light"] :where(.report-entry-page) .voice-input-modal-card {
  border-color: #9db9dd;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(76,134,230,.16), rgba(245,249,255,0) 60%),
    linear-gradient(180deg, #f5f9ff 0%, #ebf3ff 100%);
  box-shadow: 0 8px 24px rgba(16,39,79,.16), 0 0 0 1px rgba(135,172,224,.32) inset;
}

:root[data-theme="light"] :where(.report-entry-page) .voice-input-modal-head {
  border-bottom-color: rgba(120,156,208,.55);
}

:root[data-theme="light"] :where(.report-entry-page) .voice-input-modal-head .confirm-modal-title {
  color: #17345a;
}

:root[data-theme="light"] :where(.report-entry-page) .voice-input-modal-step {
  color: #2c4f7f;
}

:root[data-theme="light"] :where(.report-entry-page) .voice-input-modal-body {
  border-color: rgba(129,166,217,.5);
  background: linear-gradient(180deg, #f9fcff 0%, #eef5ff 100%);
}

:root[data-theme="light"] :where(.report-entry-page) .voice-input-modal-prompt {
  color: #1f3f68;
}

:root[data-theme="light"] :where(.report-entry-page) .voice-input-modal-status,
:root[data-theme="light"] :where(.report-entry-page) .voice-choice-guide,
:root[data-theme="light"] :where(.report-entry-page) .voice-amount-guide,
:root[data-theme="light"] :where(.report-entry-page) .voice-amount-label {
  color: #44638c;
}

:root[data-theme="light"] :where(.report-entry-page) .voice-input-modal-transcript,
:root[data-theme="light"] :where(.report-entry-page) .voice-amount-box,
:root[data-theme="light"] :where(.report-entry-page) .voice-choice-no {
  border-color: rgba(130,167,218,.62);
  background: #f8fbff;
  color: #26466f;
}

:root[data-theme="light"] :where(.report-entry-page) .voice-choice-btn {
  border-color: #93b4e0 !important;
  background: linear-gradient(180deg, #f8fbff 0%, #eaf2ff 100%) !important;
}

:root[data-theme="light"] :where(.report-entry-page) .voice-choice-label {
  color: #1e3e67;
}

:root[data-theme="light"] :where(.report-entry-page) .voice-choice-btn.is-selected {
  border-color: #3f88e6 !important;
  background: linear-gradient(180deg, #62a8ff 0%, #468ee7 100%) !important;
}

:root[data-theme="light"] :where(.report-entry-page) .voice-choice-btn.is-selected .voice-choice-label,
:root[data-theme="light"] :where(.report-entry-page) .voice-choice-btn.is-selected .voice-choice-no {
  color: #ffffff;
}

:root[data-theme="light"] :where(.report-entry-page) .voice-amount-value {
  color: #17345a;
}

:where(.settings-report-legacy-page) .settings-mode-banner {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 2px solid #9d1111;
  background: #d93025;
  color: #fff;
  font-size: var(--font-xl);
  font-weight: 900;
  text-align: center;
  letter-spacing: .04em;
}

:where(.settings-report-legacy-page) .settings-top-note {
  margin: 0 0 12px;
  font-size: var(--font-sm);
  color: #f7fbff;
  line-height: 1.6;
}

:where(.settings-report-legacy-page) .settings-save-stack {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

:where(.settings-report-legacy-page) .save-note {
  font-size: var(--font-sm);
  color: var(--legacy-page-muted);
  line-height: 1.5;
  white-space: pre-line;
  text-align: center;
}

:where(.settings-report-legacy-page) .editor-modal-bg {
  position: fixed;
  inset: 0;
  z-index: 1450;
  background: rgba(0,0,0,.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

:where(.settings-report-legacy-page) .editor-modal-bg.show {
  display: flex;
}

:where(.settings-report-legacy-page) .editor-modal-card {
  width: min(520px,100%);
  border-radius: 16px;
  border: var(--line-strong) solid var(--modal-shell-border);
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(86,148,255,.18), rgba(10,21,44,0) 55%),
    linear-gradient(180deg, #0f1f42 0%, #0a1733 100%);
  box-shadow: var(--modal-shell-shadow), 0 0 0 1px rgba(126,167,235,.22) inset;
  padding: 12px;
}

:where(.settings-report-legacy-page) .editor-modal-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px;
  margin: 0 0 8px;
  padding: 2px 4px 10px;
  border-bottom: 1px solid rgba(135,168,220,.45);
}

:where(.settings-report-legacy-page) .editor-modal-title {
  margin: 0;
  color: #eaf3ff;
  font-size: clamp(24px, 5.8vw, 28px);
  line-height: 1.1;
}

:where(.settings-report-legacy-page) .editor-modal-step {
  margin: 0;
  color: #c8ddff;
  font-size: var(--font-lg);
  line-height: 1;
  font-weight: 900;
  letter-spacing: .01em;
}

:where(.settings-report-legacy-page) .editor-modal-body {
  border: 1px solid rgba(125,164,230,.34);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16,31,62,.86) 0%, rgba(13,26,52,.86) 100%);
  padding: 10px;
  margin: 0 0 12px;
  text-align: left;
}

:where(.settings-report-legacy-page) .editor-modal-group {
  margin: 0 0 12px;
  display: grid;
  gap: 8px;
}

:where(.settings-report-legacy-page) .editor-modal-group:last-child {
  margin-bottom: 0;
}

:where(.settings-report-legacy-page) .editor-modal-label {
  font-size: var(--font-md);
  color: #bdd6fa;
  font-weight: 800;
}

:where(.settings-report-legacy-page) .input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(125,164,230,.42);
  border-radius: 8px;
  padding: 14px 10px;
  font-size: var(--font-xl);
  min-height: 56px;
  background: rgba(11,23,44,.9);
  color: #e8f2ff;
}

:where(.settings-report-legacy-page) .input:disabled {
  background: rgba(17,31,57,.75);
  color: #9fbbe4;
}

:where(.settings-report-legacy-page) .editor-modal-help {
  margin: 0;
  font-size: var(--font-sm);
  color: #bdd6fa;
  line-height: 1.5;
}

:where(.settings-report-legacy-page) #fieldEditorHelp {
  color: #f7fbff;
}

:where(.settings-report-legacy-page) .editor-check-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
}

:where(.settings-report-legacy-page) .editor-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  border: 1px solid rgba(125,164,230,.42);
  border-radius: 8px;
  padding: 0 12px;
  font-size: var(--font-md);
  font-weight: 800;
  background: rgba(11,23,44,.9);
  color: #e8f2ff;
}

:where(.settings-report-legacy-page) .editor-check input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #62abff;
}

:where(.settings-report-legacy-page) .editor-check.is-disabled {
  background: rgba(17,31,57,.75);
  color: #9fbbe4;
}

:where(.settings-report-legacy-page) .editor-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

:where(.settings-report-legacy-page) .editor-modal-actions .btn {
  min-height: 52px;
  border-radius: 10px;
  font-size: var(--font-lg);
  font-weight: 900;
}

:root[data-theme="light"] :where(.settings-report-legacy-page) .editor-modal-card {
  border-color: var(--modal-shell-border);
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(76,134,230,.16), rgba(245,249,255,0) 60%),
    linear-gradient(180deg, #f5f9ff 0%, #ebf3ff 100%);
  box-shadow: var(--modal-shell-shadow), 0 0 0 1px rgba(135,172,224,.32) inset;
}

:root[data-theme="light"] :where(.settings-report-legacy-page) .settings-top-note {
  color: #111111;
}

:root[data-theme="light"] :where(.settings-report-legacy-page) .editor-modal-head {
  border-bottom-color: rgba(120,156,208,.55);
}

:root[data-theme="light"] :where(.settings-report-legacy-page) .editor-modal-title {
  color: #17345a;
}

:root[data-theme="light"] :where(.settings-report-legacy-page) .editor-modal-step {
  color: #2c4f7f;
}

:root[data-theme="light"] :where(.settings-report-legacy-page) .editor-modal-body {
  border-color: rgba(129,166,217,.5);
  background: linear-gradient(180deg, #f9fcff 0%, #eef5ff 100%);
}

:root[data-theme="light"] :where(.settings-report-legacy-page) .editor-modal-label,
:root[data-theme="light"] :where(.settings-report-legacy-page) .editor-modal-help {
  color: #44638c;
}

:root[data-theme="light"] :where(.settings-report-legacy-page) #fieldEditorHelp {
  color: #17345a;
}

:root[data-theme="light"] :where(.settings-report-legacy-page) .input,
:root[data-theme="light"] :where(.settings-report-legacy-page) .editor-check {
  background: #ffffff;
  border-color: rgba(129,166,217,.55);
  color: #17345a;
}

:root[data-theme="light"] :where(.settings-report-legacy-page) .input:disabled,
:root[data-theme="light"] :where(.settings-report-legacy-page) .editor-check.is-disabled {
  background: #edf3fb;
  color: #587aa7;
}

@media (max-width: 420px) {
  :where(.report-entry-page) .wf-row,
  :where(.settings-report-legacy-page) .wf-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  :where(.report-entry-page) .btn,
  :where(.settings-report-legacy-page) .btn {
    font-size: var(--font-md);
    min-height: 52px;
    padding: 12px 6px;
  }
}

@media (min-width: 768px) {
  body:where(.report-entry-page),
  body:where(.settings-report-legacy-page) {
    font-size: var(--font-lg);
  }

  :where(.report-entry-page) .main,
  :where(.settings-report-legacy-page) .main {
    max-width: 880px;
    margin: 0 auto;
  }

  :where(.report-entry-page) .btn,
  :where(.settings-report-legacy-page) .btn {
    font-size: var(--font-lg);
    min-height: 64px;
  }

  :where(.report-entry-page) .input,
  :where(.settings-report-legacy-page) .input {
    font-size: var(--font-xl);
    min-height: 64px;
  }

  :where(.report-entry-page) .key {
    min-height: 72px;
    font-size: var(--font-3xl);
  }

  :where(.settings-report-legacy-page) .editor-check {
    min-height: 58px;
    font-size: var(--font-lg);
  }
}

/* ============================================================
   3. Base Reset & Body
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg) !important;
  color: var(--text-primary) !important;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans",
               "BIZ UDPGothic", Meiryo, sans-serif;
  font-size: var(--font-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + var(--bottom-nav-safe-zone));
}

a {
  color: var(--link);
  text-decoration: none;
  transition: opacity var(--ease-default);
}
a:hover { opacity: 0.78; }
a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

img, svg { display: block; max-width: 100%; }

button {
  cursor: pointer;
  font-family: inherit;
}
button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

input, select, textarea {
  font-family: inherit;
  color: var(--text-primary);
}
input::placeholder { color: var(--text-disabled); }
textarea::placeholder { color: var(--text-disabled); }

/* iOS safari input zoom 防止 */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="tel"],
select,
textarea {
  font-size: var(--font-2xl) !important;
}

/* ============================================================
   4. Typography Utilities
   ============================================================ */
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-accent    { color: var(--accent); }
.text-brand     { color: var(--brand); }
.text-highlight { color: var(--value-highlight); }
.text-success   { color: var(--success); }
.text-danger    { color: var(--danger); }

.font-bold   { font-weight: 700; }
.font-black  { font-weight: 900; }

/* ============================================================
   5. Layout: Container
   ============================================================ */
.main,
.container {
  padding: var(--space-3) 14px;
  max-width: 960px;
  margin: 0 auto;
}

/* ============================================================
   6. Header
   ============================================================ */
.tsms-header,
.header,
.app-header {
  position: sticky !important;
  top: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 14px 0 14px !important;
  font-weight: 900;
  font-size: var(--font-4xl);
  background: var(--surface-1) !important;
  border-bottom: var(--line-regular) solid var(--border) !important;
  color: var(--text-primary) !important;
  gap: 0;

  /* glass morphism: 軽くブラー */
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);

  /* iOS で半透明になるよう背景を少し透過 */
  background: rgba(var(--bg-rgb, 243, 246, 248), 0.92) !important;
}

:root[data-theme="dark"] .tsms-header,
:root[data-theme="dark"] .header {
  background: rgba(21, 28, 32, 0.92) !important;
}

/* ヘッダーアクション右寄せ */
.header-to-report,
.header-manual-edit {
  margin-left: auto;
  border: var(--line-regular) solid var(--border) !important;
  padding: 7px 12px !important;
  font-size: var(--font-md) !important;
  font-weight: 800;
  color: var(--text-primary) !important;
  text-decoration: none;
  line-height: 1.3;
  background: var(--surface-2) !important;
  border-radius: var(--radius-sm);
  transition: background var(--ease-default), border-color var(--ease-default);
  white-space: nowrap;
}

.header-to-report:hover,
.header-manual-edit:hover {
  background: var(--surface-3) !important;
  opacity: 1;
}

.header-manual-edit.active {
  background: var(--accent-light) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

.header-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ============================================================
   7. Hamburger Button
   ============================================================ */
.tsms-hamburger,
.hamburger {
  /* ボトムナビ使用時は非表示 */
  display: none !important;
}

/* ============================================================
   8. Side Menu (ハンバーガーメニュー)
   ============================================================ */
.tsms-menu,
.menu {
  position: fixed !important;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--menu-w);
  background: var(--surface-1) !important;
  border-right: var(--line-regular) solid var(--border) !important;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.28s;
  z-index: var(--z-menu);
  padding-top: var(--header-h);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: none;
}
.tsms-menu.open,
.menu.open {
  transform: translateX(0);
  box-shadow: var(--shadow-lg);
}

.tsms-menu a,
.menu a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light) !important;
  text-decoration: none;
  color: var(--text-primary) !important;
  font-size: var(--font-2xl);
  font-weight: 800;
  background: var(--surface-1) !important;
  transition: background var(--ease-default);
}
.tsms-menu a:hover,
.menu a:hover {
  background: var(--surface-2) !important;
  opacity: 1;
}
.tsms-menu a:last-child,
.menu a:last-child { border-bottom: none !important; }

.tsms-menu small,
.menu small {
  display: block;
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--text-muted) !important;
  margin-top: 1px;
  line-height: 1.3;
}

.tsms-menu-bg,
.menu-bg {
  position: fixed !important;
  inset: 0;
  background: rgba(10, 15, 20, 0.40) !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: var(--z-menu-bg);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.tsms-menu-bg.show,
.menu-bg.show {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   9. Bottom Navigation
   ============================================================ */
.tsms-bottom-nav {
  position: fixed !important;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-bottom-nav);
  display: grid !important;
  grid-template-columns: repeat(5, 1fr);
  background: var(--bottom-nav-surface) !important;
  border-top: var(--line-regular) solid var(--border) !important;
  padding-bottom: calc(env(safe-area-inset-bottom) + var(--bottom-nav-safe-zone));

  /* glass blur */
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);

  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
}

.tsms-bottom-nav a,
.tsms-bottom-nav button {
  appearance: none;
  -webkit-appearance: none;
  border: 0 !important;
  background: transparent !important;
  color: var(--text-disabled) !important;
  font: inherit;
  font-size: var(--bottom-nav-label-size);
  font-weight: 800;
  letter-spacing: -0.02em;
  padding: var(--bottom-nav-item-pad-top) 0 var(--bottom-nav-item-pad-bottom);
  min-height: max(var(--bottom-nav-h), var(--touch-min));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--bottom-nav-item-gap);
  text-decoration: none;
  transition: color var(--ease-default), background var(--ease-default), text-shadow var(--ease-default), box-shadow var(--ease-default);
  position: relative;
}

.tsms-bottom-nav a > span:last-child,
.tsms-bottom-nav button > span:last-child {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: -0.02em;
}

.tsms-bottom-nav a:hover,
.tsms-bottom-nav button:hover {
  color: var(--text-primary) !important;
  background: var(--bottom-nav-hover-surface) !important;
  opacity: 1;
}

/* アクティブタブ */
.tsms-bottom-nav .active {
  color: var(--brand) !important;
  background: transparent !important;
  box-shadow: none;
}

.tsms-bottom-nav .active > span:last-child {
  text-shadow: 0 0 10px var(--bottom-nav-active-glow);
}

.tsms-bottom-nav .active::before {
  content: none;
}

/* アイコン */
.tsms-bottom-nav .ico {
  width: var(--bottom-nav-icon-size);
  height: var(--bottom-nav-icon-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor !important;
  transition: transform var(--ease-spring), filter var(--ease-default);
}
.tsms-bottom-nav .ico svg {
  width: var(--bottom-nav-icon-size);
  height: var(--bottom-nav-icon-size);
  stroke: currentColor !important;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.tsms-bottom-nav .active .ico,
.tsms-bottom-nav .active .ico svg {
  filter: drop-shadow(0 0 8px var(--bottom-nav-active-glow));
}

.tsms-bottom-nav a:active .ico,
.tsms-bottom-nav button:active .ico {
  transform: scale(0.88);
}

/* More シート */
.tsms-more-sheet {
  position: fixed !important;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-more-sheet);
  background: var(--more-sheet-surface) !important;
  border-top: var(--line-regular) solid var(--border) !important;
  transform: translateY(110%);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-overlay);
}
.tsms-more-sheet.show {
  transform: translateY(0);
}

.tsms-more-sheet a {
  display: block;
  padding: 13px 14px;
  border: var(--line-regular) solid var(--border) !important;
  margin-top: 8px;
  text-decoration: none;
  color: var(--text-primary) !important;
  background: var(--more-sheet-item-surface) !important;
  font-weight: 800;
  font-size: var(--font-xl);
  border-radius: var(--radius-sm);
  transition: background var(--ease-default);
}
.tsms-more-sheet a:hover {
  background: var(--more-sheet-item-hover-surface) !important;
  opacity: 1;
}

.tsms-more-bg {
  position: fixed !important;
  inset: 0;
  background: rgba(10, 15, 20, 0.40) !important;
  opacity: 0;
  pointer-events: none;
  z-index: var(--z-more-bg);
  transition: opacity 0.22s ease;
}
.tsms-more-bg.show {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   10. Section / Card / Panel
   ============================================================ */
.section,
.card,
.panel,
.wf-panel,
.box,
.date-switcher {
  background: transparent !important;
  border: 0 !important;
  margin: 10px 0;
  padding: 4px 0 2px;
}

/* セクションタイトル */
.title,
.group-title,
.wf-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 900;
  font-size: var(--font-2xl);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted) !important;
  margin: 0 0 10px 0;
  padding: 0;
}
.title::after,
.group-title::after,
.wf-label::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--border);
  border: none !important;
  opacity: 1;
}

/* 詳細確認ページのタイトルは少し大きめに */
.main .title {
  font-size: var(--font-xl);
}

/* Note テキスト */
.note,
.wf-subnote {
  font-size: var(--font-sm) !important;
  color: var(--text-muted) !important;
  line-height: 1.5;
  margin: 4px 0 10px;
}

/* ============================================================
   11. Form Elements
   ============================================================ */
.input,
.wf-input,
select.input {
  width: 100%;
  box-sizing: border-box;
  border: var(--line-regular) solid var(--border) !important;
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-size: var(--font-2xl) !important;
  font-weight: 500;
  background: var(--surface-1) !important;
  color: var(--text-primary) !important;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--ease-default),
              box-shadow var(--ease-default);
  line-height: 1.4;
}
.input:focus,
select.input:focus {
  outline: none;
  border-color: var(--field-focus-border) !important;
  background: var(--field-focus-bg) !important;
  box-shadow: 0 0 0 4px var(--field-focus-ring), inset 0 0 0 1px var(--field-focus-border);
}
.input:disabled,
select.input:disabled {
  background: var(--surface-2) !important;
  color: var(--text-disabled) !important;
  cursor: not-allowed;
  opacity: 0.7;
}

/* select 右矢印 */
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235B6D7C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 18px !important;
  padding-right: 36px !important;
}

/* Field ラベル */
.field {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 10px 0;
  border-bottom: var(--line-thin) solid var(--border-light);
}
.field:last-of-type { border-bottom: none; padding-bottom: 4px; }

.label,
.wf-field-label {
  font-size: var(--font-md) !important;
  color: var(--text-muted) !important;
  font-weight: 700;
  line-height: 1.3;
}

/* ============================================================
   12. Buttons
   ============================================================ */
.btn,
.actionBtn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: var(--line-regular) solid var(--border) !important;
  border-radius: var(--radius-sm);
  background: var(--surface-2) !important;
  color: var(--text-primary) !important;
  font: inherit;
  font-size: var(--font-lg);
  font-weight: 800;
  padding: var(--space-3) 14px;
  min-height: var(--control-h-md);
  line-height: 1.3;
  cursor: pointer;
  transition: background var(--ease-default),
              border-color var(--ease-default),
              transform 0.1s,
              box-shadow var(--ease-default);
  text-align: center;
  white-space: normal;
  word-break: break-word;
}
.btn:hover,
.actionBtn:hover {
  background: var(--surface-3) !important;
  opacity: 1;
}
.btn:active,
.actionBtn:active {
  transform: scale(0.97);
  box-shadow: none;
}
.btn:disabled,
.actionBtn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}
.btn:focus-visible,
.actionBtn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* アクションメイン: 出庫/帰庫など大きいボタン */
.btn.action-main {
  min-height: 118px;
  font-size: var(--font-4xl);
  font-weight: 900;
}

/* Next / Primary ボタン */
.btn.next {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(37, 128, 237, 0.30);
}
.btn.next:hover {
  background: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
  box-shadow: 0 4px 14px rgba(37, 128, 237, 0.40);
  opacity: 1;
}

/* Danger ボタン */
.btn.danger {
  border-color: var(--danger) !important;
  color: var(--danger) !important;
  background: var(--danger-bg) !important;
}
.btn.danger:hover {
  background: var(--danger) !important;
  color: #fff !important;
  opacity: 1;
}

/* Reset Final ボタン */
.btn.reset-final {
  min-height: 128px;
  line-height: 1.4;
}
.btn.reset-final .warn {
  display: block;
  color: var(--danger);
  font-size: var(--font-sm);
  font-weight: 800;
  margin-top: 6px;
}

/* Wide ボタン */
.btn.wide { grid-column: 1 / -1; }

/* Small ボタン */
.btn.small,
.btn.btn-mini {
  font-size: var(--font-sm);
  font-weight: 700;
  min-height: var(--control-h-sm);
  padding: 7px 12px;
  border-width: var(--line-regular);
}

/* Actions グリッド */
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.actions[style*="grid-template-columns:1fr"] {
  grid-template-columns: 1fr;
}

/* Settings page: 1列 actions */
.section .actions:has(.btn:only-child) {
  grid-template-columns: 1fr;
}

/* ============================================================
   13. Detail Page — Key-Value Rows
   ============================================================ */
/* .line = 1行 */
.line {
  display: flex;
  gap: var(--space-3);
  padding: 8px 0;
  align-items: baseline;
  border-bottom: var(--line-thin) solid var(--border-light);
}
.line:last-child { border-bottom: none; }

.line.strong .k,
.line.strong .v { font-weight: 900; }

/* キー */
.k {
  flex: 0 0 auto;
  width: 150px;
  max-width: 55%;
  font-size: var(--font-md);
  font-weight: 700;
  color: var(--text-muted) !important;
  line-height: 1.4;
}

/* バリュー */
.v {
  flex: 1 1 auto;
  font-size: var(--font-2xl);
  font-weight: 800;
  text-align: right;
  color: var(--text-primary);
  word-break: break-all;
  white-space: normal;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.v.value-highlight {
  color: var(--value-highlight) !important;
  font-weight: 900;
}

/* 日付選択セレクト */
.date-switcher select {
  width: 100%;
  box-sizing: border-box;
  border: var(--line-regular) solid var(--border) !important;
  background: var(--surface-1) !important;
  padding: 11px 36px 11px 12px;
  font-size: var(--font-2xl) !important;
  border-radius: var(--radius-sm);
  color: var(--text-primary) !important;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235B6D7C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 18px !important;
}
.date-switcher select:focus {
  outline: none;
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px var(--brand-dim);
}

/* ============================================================
   14. Confirm Page — Entry Cards
   ============================================================ */
.entry-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px 0;
}
.entry-head::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--border);
  border: none !important;
}
.entry-head .label,
.time-text {
  font-weight: 900;
  font-size: 14px !important;
  color: var(--text-secondary) !important;
  white-space: nowrap;
}

.kv {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
  align-items: start;
  padding: 3px 0;
}
.kv .label {
  font-size: var(--font-sm) !important;
  color: var(--text-muted) !important;
  font-weight: 700;
}
.kv .value {
  font-size: var(--font-md);
  font-weight: 800;
  word-break: break-word;
  color: var(--text-primary);
}
.kv.payment-row .value {
  color: var(--value-highlight) !important;
  font-weight: 900;
}
.kv.amount-row .value {
  font-variant-numeric: tabular-nums;
}

.tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.tag {
  display: inline-block;
  border: var(--line-regular) solid var(--border) !important;
  padding: 3px 8px;
  font-size: var(--font-xs);
  font-weight: 900;
  line-height: 1.3;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  color: var(--text-secondary) !important;
}

/* Confirm/Detail の note テキスト */
.note.pre-wrap {
  white-space: pre-wrap;
  word-break: break-word;
}

.empty {
  padding: 32px 0;
  color: var(--text-muted);
  text-align: center;
  font-size: var(--font-lg);
}

/* Confirm card actions */
.actions.entry-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.wrap > .date-switcher,
.wrap > #cards {
  margin: 12px 14px;
}

/* ============================================================
   15. Ops Page — Break Sessions
   ============================================================ */
/* Key-value content in ops */
.content {
  display: grid;
  gap: 0;
}
.content .line {
  padding: 7px 0;
}

/* OpsのKはDetail.html版とは別に幅を調整 */
.main .content .k {
  width: 130px;
  font-size: var(--font-sm);
}
.main .content .v {
  font-size: var(--font-4xl);
  font-weight: 900;
}

/* Pill バッジ */
.pill {
  display: inline-block;
  border: var(--line-regular) solid var(--border) !important;
  padding: 4px 10px;
  font-size: var(--font-sm);
  font-weight: 900;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-secondary);
  transition: border-color var(--ease-default),
              color var(--ease-default),
              background var(--ease-default);
}

/* 休憩中 pill は強調 */
#v_breakState.is-break-active,
.pill.is-break-active,
#v_breakState[style*="border-color: rgb(51, 51, 51)"],
.pill[style*="border-color:#333"] {
  background: var(--warning-bg) !important;
  color: var(--warning) !important;
  border-color: var(--warning) !important;
}

/* Break history items */
.list { margin-top: 8px; }
.item {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  padding: 6px 0;
  border-bottom: var(--line-thin) solid var(--border-light);
}
.item:last-child { border-bottom: none; }
.item .idx {
  width: 32px;
  color: var(--text-muted) !important;
  font-size: var(--font-sm);
  flex-shrink: 0;
}
.item .txt {
  font-size: var(--font-md);
  font-weight: 700;
  color: var(--text-secondary);
}
.item .dur {
  margin-left: auto;
  font-size: var(--font-lg);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Sync meta */
.sync-meta {
  margin-top: 10px;
  font-size: var(--font-xs);
  color: var(--text-muted);
  text-align: right;
  line-height: 1.4;
}
.sync-meta.error {
  color: var(--danger) !important;
  font-weight: 700;
}

/* Bottom mini actions */
.bottom-mini-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

/* ============================================================
   16. Result Modal (Ops Page)
   ============================================================ */
.result-modal-bg {
  position: fixed !important;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(10, 15, 20, 0.55) !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.result-modal-bg.show {
  display: flex;
  animation: fadeIn 0.18s ease;
}

.result-modal-card {
  width: min(360px, 100%);
  background: var(--surface-1) !important;
  border: var(--line-strong) solid var(--modal-shell-border) !important;
  border-radius: var(--radius-lg);
  padding: 24px 18px 18px;
  text-align: center;
  box-shadow: var(--modal-shell-shadow);
  animation: slideUp 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.result-modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}
.result-modal-icon.success { background: var(--success); }
.result-modal-icon.error   { background: var(--danger);  }

.result-modal-message {
  margin: 0 0 18px;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.5;
  color: var(--text-primary);
}
.result-modal-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

/* ============================================================
   17. Custom Confirm Modal
   ============================================================ */
.tsms-confirm-overlay {
  z-index: var(--z-confirm);
}

.tsms-confirm-card {
  width: min(480px, 100%);
  text-align: left;
}

.tsms-confirm-title {
  font-size: var(--font-2xl);
  font-weight: 900;
  margin: 0 0 14px;
  color: var(--text-primary) !important;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-line;
}

.tsms-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tsms-confirm-card[data-mode="alert"] {
  width: min(420px, 100%);
}

.tsms-confirm-card[data-mode="alert"] .tsms-confirm-title {
  text-align: center;
}

.tsms-confirm-card[data-mode="alert"] .tsms-confirm-actions {
  grid-template-columns: 1fr;
}

/* ============================================================
   18. Sales Page — Table
   ============================================================ */
.table-wrap {
  border: var(--line-regular) solid var(--border) !important;
  border-radius: var(--radius-md);
  position: relative;
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100dvh - var(--header-h) - var(--bottom-nav-h) - var(--bottom-nav-safe-zone) - 120px - env(safe-area-inset-bottom));
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--surface-1) !important;
}

/* スクロールバーをスタイリッシュに */
.table-wrap::-webkit-scrollbar {
  height: 4px;
}
.table-wrap::-webkit-scrollbar-track {
  background: var(--surface-2);
}
.table-wrap::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

table {
  width: max-content;
  min-width: 580px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: var(--font-xs);
  color: var(--text-primary);
}

th, td {
  border: 1px solid var(--border-light) !important;
  padding: 4px 3px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.table-wrap thead th {
  background: var(--surface-2) !important;
  color: var(--text-muted) !important;
  font-weight: 900;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  position: sticky;
  top: 0;
  z-index: 3;
  box-shadow: 0 1px 0 var(--border-light), 0 6px 12px rgba(15, 23, 32, 0.08);
}

th {
  background: var(--surface-2) !important;
  color: var(--text-muted) !important;
  font-weight: 900;
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

/* 曜日カラー */
td.date.sat {
  background: var(--week-sat-bg) !important;
  color: var(--weekend-text);
  font-weight: 800;
}
td.date.sun,
td.date.holiday {
  background: var(--week-sun-bg) !important;
  color: var(--weekend-text);
  font-weight: 800;
}

/* 合計行 */
.sum-row td {
  background: #42B8C9 !important;
  color: #fff !important;
  font-weight: 900;
  border: 1.5px solid #2A9DAD !important;
}
:root[data-theme="dark"] .sum-row td {
  background: #1A5A66 !important;
  color: var(--text-primary) !important;
}

/* 無効セル */
td.muted,
.muted .target-input {
  background: var(--disabled-bg) !important;
  color: var(--disabled-text) !important;
}

/* テーブル内 input */
.target-input,
.manual-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border) !important;
  border-radius: 3px;
  padding: 3px 3px;
  font-size: var(--font-xs);
  text-align: right;
  background: var(--surface-1) !important;
  color: var(--text-primary) !important;
  font-weight: 700;
  transition: border-color var(--ease-default);
}
.manual-input.time { text-align: center; }
.target-input:focus,
.manual-input:focus {
  outline: none;
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 2px var(--brand-dim);
}
.target-input:disabled {
  background: var(--disabled-bg) !important;
  color: var(--disabled-text) !important;
}

/* シフトボタン */
.shift-btn {
  appearance: none;
  -webkit-appearance: none;
  border: none !important;
  color: #fff;
  font-weight: 900;
  border-radius: 4px;
  padding: 4px 2px;
  min-height: 28px;
  width: 100%;
  font-size: var(--font-xs);
  cursor: pointer;
  transition: filter var(--ease-default), transform 0.1s;
  font-family: inherit;
}
.shift-btn:hover  { filter: brightness(1.1); }
.shift-btn:active { transform: scale(0.95); }
.shift-btn:disabled { opacity: 0.52; filter: grayscale(0.3); cursor: not-allowed; }

.s-work     { background: #1DA843; }
.s-holiday  { background: #E09000; color: #fff; }
.s-absence  { background: #D64545; }
.s-part     { background: #187FBF; }
.s-furidashi{ background: #1DA843; }
.s-furikyu  { background: #E09000; color: #fff; }

/* panel label (sales.html) */
.panel .label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-sm);
  color: var(--text-muted) !important;
  margin: 0 0 8px 0;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.panel .label::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--border);
  border: none !important;
}

/* ============================================================
   19. Settings Page
   ============================================================ */
.main .section .field {
  padding: 10px 0;
  border-bottom: var(--line-thin) solid var(--border-light);
}
.main .section .field:last-of-type {
  border-bottom: none;
}

/* ============================================================
   20. Login / Signup Page
   ============================================================ */
/* ログイン・新規登録はヘッダー下に中央配置 */
.main[style*="justify-content:center"],
.auth-main {
  padding: 14px;
  max-width: 520px;
  margin: 0 auto;
}

.brand {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 0 4px;
}
.brand-main {
  font-weight: 900;
  font-size: 42px;
  letter-spacing: 0.05em;
  line-height: 1;
  color: var(--text-primary);
}
.brand-cache {
  text-align: center;
  font-size: var(--font-2xs);
  line-height: 1.2;
  color: var(--text-muted);
  margin-top: 2px;
}

/* セクションボックス (login / signup) */
.section[class="section"],
main > .section {
  border: var(--line-regular) solid var(--border) !important;
  background: var(--surface-1) !important;
  border-radius: var(--radius-md);
  margin: 10px 0;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.section .title {
  font-weight: 900;
  font-size: var(--font-xl) !important;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-primary) !important;
  margin: 0 0 12px;
}
.section .title::after {
  display: none;
}

/* Login/Signup page btn */
.section .btn,
.main > .section .btn {
  width: 100%;
  min-height: var(--control-h-md);
  font-size: var(--font-2xl);
  font-weight: 900;
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(37,128,237,.28);
}
.section .btn:hover {
  background: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
  opacity: 1;
}
.section .btn.secondary {
  background: var(--surface-2) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
  box-shadow: none;
  margin-top: 10px;
}

/* msg ボックス */
.msg {
  margin-top: 12px;
  border: var(--line-regular) solid var(--border) !important;
  border-radius: var(--radius-sm);
  background: var(--surface-2) !important;
  padding: 10px 12px;
  white-space: pre-wrap;
  font-size: var(--font-md);
  line-height: 1.55;
  min-height: 44px;
  color: var(--text-secondary);
}

/* row リンク */
.row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
  align-items: center;
  font-size: var(--font-lg);
  font-weight: 700;
}

/* muted テキスト (signup) */
.muted {
  font-size: var(--font-md);
  color: var(--text-muted) !important;
  line-height: 1.55;
  margin: 0 0 8px;
}

/* ============================================================
   21. Auth Callback / index Page
   ============================================================ */
/* index ページのドキュメント */
.doc-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 8px 0 12px;
  font-size: var(--font-4xl);
  font-weight: 900;
  line-height: 1.3;
  color: var(--text-primary);
}
.doc-head::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--border);
}

.doc-title-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.doc-title {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  color: var(--brand);
  letter-spacing: 0.06em;
}
.doc-updated {
  font-size: var(--font-lg);
  color: var(--text-muted);
  font-weight: 600;
}
.doc-body {
  font-size: var(--font-xl);
  line-height: 1.7;
  color: var(--text-secondary);
}
.doc-body p { margin: 0 0 10px; }

.guide-list {
  margin: 10px 0 0 0;
  padding: 0;
  list-style: none;
}
.guide-list > li {
  margin: 0;
  padding: 12px 0;
  border-bottom: var(--line-thin) solid var(--border-light);
  font-size: var(--font-xl);
  font-weight: 700;
  color: var(--text-primary);
}
.guide-list > li:last-child { border-bottom: none; }
.subline {
  display: block;
  margin: 0.4em 0 0 1.1em;
  font-size: var(--font-md);
  font-weight: 500;
  color: var(--text-muted);
}

.contact { margin-top: 20px; font-size: 15px; }
.sign {
  margin-top: 8px;
  text-align: right;
  font-weight: 700;
  font-size: var(--font-md);
  color: var(--text-muted);
}
.sign-actions {
  margin-top: 6px;
  text-align: right;
}

/* ログアウトミニボタン */
.logout-mini {
  appearance: none;
  -webkit-appearance: none;
  border: var(--line-regular) solid var(--border) !important;
  background: var(--surface-2) !important;
  color: var(--text-primary) !important;
  padding: 5px 10px;
  font: inherit;
  font-size: var(--font-sm);
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--ease-default);
}
.logout-mini:hover {
  background: var(--surface-3) !important;
}

/* ============================================================
   22. Cache Version Display
   ============================================================ */
[aria-label="cache-version"] {
  font-size: 10px !important;
  line-height: 1.3;
  color: var(--text-muted) !important;
  text-align: right;
  margin: 6px 12px calc(var(--bottom-nav-h) + 10px + env(safe-area-inset-bottom) + var(--bottom-nav-safe-zone));
  opacity: 0.78;
  pointer-events: none;
  user-select: text;
}

/* ============================================================
   23. Report Page — Specific
   ============================================================ */
/* report.html のパネル */
main .wf-panel {
  border: 0 !important;
  background: transparent !important;
  margin: 10px 0;
  padding: 6px 0 2px;
}
.wf-label {
  font-size: var(--font-md);
  font-weight: 900;
  color: var(--text-muted) !important;
}
.wf-label::after {
  height: 1px;
  background: var(--border);
  border: none !important;
}

.wf-row {
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.wf-row > .btn {
  width: 100%;
  aspect-ratio: var(--choice-btn-ratio);
  height: auto;
  min-height: var(--choice-btn-min-h);
  padding: 8px 6px;
  align-self: stretch;
}

.wf-row > .btn .btn-label {
  display: grid;
  justify-items: center;
  align-content: center;
  inline-size: min(100%, 4em);
  margin: 0 auto;
  font-size: calc(var(--font-lg) - 1px);
  text-align: center;
  word-break: normal;
  overflow-wrap: normal;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.wf-row > .btn .btn-label-line {
  display: block;
  inline-size: 100%;
  text-align: center;
  white-space: nowrap;
}

.wf-row > .btn .btn-label.is-balanced-4plus1 .btn-label-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  justify-content: center;
}

.wf-row > .btn .btn-label.is-balanced-4plus1 .btn-label-char {
  display: block;
  text-align: center;
}

.wf-row > .btn .btn-label.is-balanced-4plus1 .btn-label-line.is-single-char .btn-label-char {
  grid-column: 2 / span 2;
  justify-self: center;
}

.wf-row > .btn.is-label-long .btn-label {
  font-size: var(--font-md);
}

.wf-row > .btn.is-label-xlong .btn-label {
  font-size: calc(var(--font-md) - 1px);
  line-height: 1.1;
}

/* 乗車種別・支払方法などのボタングループ */
button[data-group] {
  appearance: none;
  -webkit-appearance: none;
  border: var(--line-regular) solid var(--border) !important;
  border-radius: var(--radius-sm);
  background: var(--surface-2) !important;
  color: var(--text-secondary) !important;
  font: inherit;
  font-size: var(--font-lg);
  font-weight: 700;
  padding: 9px 6px;
  min-height: 46px;
  cursor: pointer;
  transition: background var(--ease-default),
              border-color var(--ease-default),
              color var(--ease-default),
              box-shadow var(--ease-default),
              transform 0.1s;
  text-align: center;
  word-break: break-word;
  line-height: 1.3;
}
button[data-group]:hover {
  background: var(--surface-3) !important;
}
.btn.is-selected,
.actionBtn.is-selected,
button[data-group].is-selected {
  background: var(--selected-fill) !important;
  border-color: var(--selected-border) !important;
  color: var(--selected-text) !important;
  font-weight: 900;
  box-shadow:
    0 0 0 3px var(--selected-ring) !important,
    0 10px 18px rgba(10, 84, 34, 0.20) !important,
    inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}
.btn.is-selected:hover,
.actionBtn.is-selected:hover,
button[data-group].is-selected:hover {
  background: var(--selected-fill-hover) !important;
  border-color: var(--selected-border) !important;
  color: var(--selected-text) !important;
  opacity: 1;
}
button[data-group]:active {
  transform: scale(0.96);
}

/* 「次へ」ボタン等 */
.btn[id*="btn"] {
  /* 既存のスタイルを維持 */
}

/* Report page: key ボタン */
.key,
.key.small {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--line-regular) solid var(--border) !important;
  border-radius: var(--radius-sm);
  background: var(--surface-2) !important;
  color: var(--text-primary) !important;
  font: inherit;
  font-size: var(--font-lg);
  font-weight: 700;
  min-height: 44px;
  padding: 8px 6px;
  cursor: pointer;
  transition: background var(--ease-default);
  text-align: center;
}
.key.small {
  font-size: var(--font-sm);
  min-height: var(--control-h-sm);
}
.key:active,
.key.small:active {
  transform: scale(0.95);
}

/* ============================================================
   24. Animations
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* ============================================================
   25. Responsive — Small Mobile (≤ 375px)
   ============================================================ */
@media (max-width: 375px) {
  html, body { font-size: var(--font-md); }

  .tsms-header,
  .header { font-size: var(--font-lg); }

  .header-to-report,
  .header-manual-edit {
    font-size: var(--font-sm) !important;
    padding: 6px 8px !important;
  }

  .k { width: 120px; font-size: var(--font-sm); }
  .v { font-size: var(--font-md); }

  .main .content .k { width: 110px; }
  .main .content .v { font-size: var(--font-lg); }

  .btn { font-size: var(--font-md); min-height: 46px; padding: 10px 10px; }
  .btn.action-main { min-height: 118px; font-size: var(--font-lg); }
  .btn.reset-final { min-height: 128px; }

  .actions { gap: 8px; }

  .kv { grid-template-columns: 80px 1fr; }
  .kv .value { font-size: var(--font-md); }

  .tsms-bottom-nav a,
  .tsms-bottom-nav button {
    --bottom-nav-label-size: calc(15px * var(--bottom-nav-size-scale));
    --bottom-nav-icon-size: calc(28px * var(--bottom-nav-size-scale));
    --bottom-nav-item-gap: 1px;
    --bottom-nav-item-pad-top: calc(7px * var(--bottom-nav-size-scale));
    --bottom-nav-item-pad-bottom: calc(8px * var(--bottom-nav-size-scale));
    min-height: calc(54px * var(--bottom-nav-size-scale));
  }
}

/* ============================================================
   26. Responsive — Standard Mobile (376px ～ 767px)
   ============================================================ */
@media (min-width: 376px) and (max-width: 767px) {
  .k { width: 140px; }
  .v { font-size: var(--font-lg); }
  .main .content .v { font-size: var(--font-xl); }
  .btn.action-main { min-height: 124px; font-size: var(--font-xl); }
  .btn.reset-final { min-height: 136px; }
}

/* ============================================================
   27. Responsive — Tablet / iPad (768px ～ 1023px)
   ============================================================ */
@media (min-width: 768px) {
  html, body { font-size: var(--font-md); }

  .main,
  .container { padding: 16px 20px; }

  /* ヘッダー */
  .tsms-header,
  .header { font-size: var(--font-xl); height: 64px; }

  /* テーブル key/value */
  .k { width: 170px; font-size: var(--font-md); }
  .v { font-size: var(--font-xl); }

  /* Detail の v */
  .main .content .k { width: 160px; }
  .main .content .v { font-size: var(--font-3xl); }

  /* Actions グリッド */
  .actions { grid-template-columns: 1fr 1fr 1fr 1fr; }
  .btn.wide { grid-column: auto; }
  .btn.action-main { min-height: 132px; font-size: var(--font-xl); }
  .btn.reset-final { min-height: 144px; }

  /* ボトムナビ: タブレットで少し広く */
  .tsms-bottom-nav a,
  .tsms-bottom-nav button {
    --bottom-nav-label-size: calc(17px * var(--bottom-nav-size-scale));
    --bottom-nav-icon-size: calc(31px * var(--bottom-nav-size-scale));
  }

  /* セクション */
  .section,
  .card,
  .panel { margin: 12px 0; }

  /* Sales テーブル */
  table { font-size: var(--font-xs); }
  th, td { padding: 5px 4px; }
}

/* ============================================================
   28. Responsive — iPad Pro / Desktop (1024px+)
   ============================================================ */
@media (min-width: 1024px) {
  .main,
  .container { padding: 20px 24px; max-width: 1080px; }

  .tsms-header,
  .header { height: 68px; font-size: 22px; }

  .k { width: 190px; }
  .v { font-size: var(--font-xl); }

  .btn { font-size: var(--font-lg); }
  .btn.action-main { min-height: 136px; font-size: var(--font-xl); }
  .btn.reset-final { min-height: 148px; }

  /* Sales page: テーブルをフル幅に */
  .table-wrap { width: 100%; }
  table { min-width: 100%; }
}

/* ============================================================
   29. Safe Area Insets (iPhone X+, Dynamic Island)
   ============================================================ */
.tsms-header,
.header {
  padding-top: env(safe-area-inset-top);
  height: calc(var(--header-h) + env(safe-area-inset-top));
}

/* ただし sticky で top:0 のとき上部の safe area は自動 */
.tsms-header { padding-top: 0; height: var(--header-h); }

/* Bottom nav の safe area は padding-bottom で対応済み */

/* ============================================================
   30. Focus Styles (Accessibility)
   ============================================================ */
*:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
*:focus:not(:focus-visible) {
  outline: none;
}

/* ============================================================
   31. Print (印刷時はナビゲーションを非表示)
   ============================================================ */
@media print {
  .tsms-bottom-nav,
  .tsms-menu,
  .tsms-menu-bg,
  .menu,
  .menu-bg,
  .tsms-header,
  .header { display: none !important; }

  body {
    padding-bottom: 0 !important;
    font-size: 12pt;
    color: #000 !important;
    background: #fff !important;
  }

  .main, .container {
    padding: 0;
    max-width: 100%;
  }

  .table-wrap {
    overflow: visible !important;
    border: 1px solid #999 !important;
  }
  table { min-width: 100%; }
}

/* ============================================================
   32. Theme Overrides (既存コードの !important を確実に上書き)
   ============================================================ */

/* ヘッダー類の背景・ボーダーを CSS 変数で統一 */
.tsms-header,
.header,
.app-header {
  background: var(--surface-1) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

/* カード・パネル類 */
.card,
.wf-panel,
.section,
.date-switcher,
.menu,
.tsms-menu,
.box {
  background: transparent !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

/* メニューのみ背景あり */
.tsms-menu,
.menu {
  background: var(--surface-1) !important;
}

/* muted テキスト */
.note,
.wf-field-label,
.label,
.k,
.idx,
.desc,
.wf-subnote {
  color: var(--text-muted) !important;
}

/* サブメニュー small */
.menu small,
.tsms-menu small {
  color: var(--text-muted) !important;
}

/* ハンバーガー span */
.hamburger span,
.tsms-hamburger span {
  background: var(--brand) !important;
}

/* overlay bg */
.menu-bg,
.tsms-menu-bg {
  background: rgba(10, 15, 20, 0.42) !important;
}

/* ============================================================
   33. Dark Mode — Additional Overrides
   ============================================================ */
:root[data-theme="dark"] .table-wrap {
  background: var(--surface-1) !important;
}

:root[data-theme="dark"] .table-wrap thead th {
  background: var(--surface-2) !important;
  color: var(--text-muted) !important;
  box-shadow: 0 1px 0 rgba(42, 53, 61, 0.95), 0 8px 16px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] th {
  background: var(--surface-2) !important;
  color: var(--text-muted) !important;
}

:root[data-theme="dark"] .shift-btn.s-work     { background: #176E30; }
:root[data-theme="dark"] .shift-btn.s-holiday  { background: #9A6200; }
:root[data-theme="dark"] .shift-btn.s-absence  { background: #922E2E; }
:root[data-theme="dark"] .shift-btn.s-part     { background: #0E5585; }
:root[data-theme="dark"] .shift-btn.s-furidashi{ background: #176E30; }
:root[data-theme="dark"] .shift-btn.s-furikyu  { background: #9A6200; }

:root[data-theme="dark"] .doc-title {
  color: var(--brand);
}

:root[data-theme="dark"] .result-modal-icon.success { background: #156E32; }
:root[data-theme="dark"] .result-modal-icon.error   { background: #922E2E; }

:root[data-theme="dark"] select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A949A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
}
:root[data-theme="dark"] .date-switcher select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A949A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
}

/* ============================================================
   34. Scrollbar (Webkit) — global
   ============================================================ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============================================================
   35. Overscroll behavior
   ============================================================ */
html {
  overscroll-behavior-y: none;
}
.tsms-menu,
.menu {
  overscroll-behavior: contain;
}

/* ============================================================
   END OF FILE
   ============================================================ */


/* ============================================================
   Unified Rule v1: 最小タップ領域の保証
   ============================================================ */
button, .btn, .actionBtn {
  min-height: max(var(--touch-min), 38px);
}

/* ============================================================
   Unified Rule v2: Product Typography (全ページ統一)
   ============================================================ */
.group-title,
.wf-label,
.title,
.panel .label,
.auth-title {
  font-size: var(--font-2xl) !important;
  font-weight: 900 !important;
  color: var(--text-primary) !important;
  line-height: 1.35 !important;
  letter-spacing: 0.01em;
}

.group-title,
.wf-label,
.title,
.panel .label {
  margin: 0 0 var(--space-3) 0 !important;
  gap: var(--space-2) !important;
}

.group-title::after,
.wf-label::after,
.title::after,
.panel .label::after,
.entry-head::after {
  border-top: var(--line-regular) solid var(--border) !important;
  opacity: 0.95 !important;
}

.note,
.wf-subnote,
.auth-note,
.wf-field-label,
.entry-head .label,
.kv .label,
.k,
.field .label {
  font-size: var(--font-md) !important;
  color: var(--text-muted) !important;
  line-height: 1.35 !important;
}

.v,
.kv .value,
.input,
select,
.key {
  font-size: var(--font-2xl) !important;
  line-height: 1.35 !important;
}

.key.small {
  font-size: var(--font-lg) !important;
  line-height: 1.2 !important;
}

/* ============================================================
   Unified App Shell (opt-in)
   主要業務画面の箱・ボタン・入力・ヘッダーを共通化
   ============================================================ */
.page-block-unified .main {
  max-width: 960px !important;
  margin: 0 auto !important;
  padding: 8px 12px 12px !important;
  display: grid;
  gap: 0 !important;
}

.page-block-unified.page-main-wide .main { max-width: 1080px !important; }
.page-block-unified.page-main-xl .main { max-width: 1220px !important; }

.page-block-unified .main > #cards {
  margin: 0;
  display: grid;
  gap: 0;
}

.page-block-unified .main .card,
.page-block-unified .main .section,
.page-block-unified .main .panel,
.page-block-unified main .wf-panel,
.page-block-unified .date-switcher {
  margin: 10px 0 !important;
  padding: 4px 0 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.page-block-unified .main .section-boxed,
.page-block-unified .date-switcher.section-boxed {
  margin: 0 !important;
  padding: 10px !important;
  border: var(--line-strong) solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  background: var(--surface-1) !important;
}

.page-block-unified .title,
.page-block-unified .group-title,
.page-block-unified .wf-label,
.page-block-unified .panel .label {
  margin: 0 0 var(--space-3) 0 !important;
  gap: var(--space-2) !important;
  font-size: var(--font-2xl) !important;
  font-weight: 900 !important;
  line-height: 1.35 !important;
  color: var(--text-primary) !important;
  letter-spacing: 0.01em !important;
  text-transform: none !important;
}

.page-block-unified .title::after,
.page-block-unified .group-title::after,
.page-block-unified .wf-label::after,
.page-block-unified .panel .label::after,
.page-block-unified .entry-head::after {
  border-top: var(--line-regular) solid var(--border) !important;
  opacity: 0.95 !important;
  background: none !important;
}

.page-block-unified .wf-subnote,
.page-block-unified .note,
.page-block-unified .save-note {
  margin: 0 0 var(--space-2) 0;
  line-height: 1.5;
}

.page-block-unified .btn,
.page-block-unified .actionBtn {
  border: var(--line-strong) solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  background: var(--surface-2) !important;
  color: var(--text-primary) !important;
  min-height: var(--control-h-md);
  padding: 10px 12px;
  font-size: var(--font-lg) !important;
  font-weight: 900;
}

.page-block-unified .btn.action-main,
.page-block-unified .actionBtn.action-main {
  min-height: 118px !important;
  font-size: var(--font-4xl) !important;
}

.page-block-unified .btn.reset-final {
  min-height: 128px !important;
}

@media (min-width: 376px) and (max-width: 767px) {
  .page-block-unified .btn.action-main,
  .page-block-unified .actionBtn.action-main {
    min-height: 124px !important;
    font-size: var(--font-xl) !important;
  }

  .page-block-unified .btn.reset-final {
    min-height: 136px !important;
  }
}

@media (min-width: 768px) {
  .page-block-unified .btn.action-main,
  .page-block-unified .actionBtn.action-main {
    min-height: 132px !important;
    font-size: var(--font-xl) !important;
  }

  .page-block-unified .btn.reset-final {
    min-height: 144px !important;
  }
}

@media (min-width: 1024px) {
  .page-block-unified .btn.action-main,
  .page-block-unified .actionBtn.action-main {
    min-height: 136px !important;
    font-size: var(--font-xl) !important;
  }

  .page-block-unified .btn.reset-final {
    min-height: 148px !important;
  }
}

.page-block-unified .btn.next {
  border-color: #8ad0ff !important;
  color: #fff !important;
  background: linear-gradient(180deg, #78c5ff, #3f9bff) !important;
  box-shadow: 0 4px 14px rgba(45, 140, 255, 0.35);
}

.page-block-unified .input,
.page-block-unified select.input,
.page-block-unified .date-switcher select,
.page-block-unified .target-input,
.page-block-unified .manual-input,
.page-block-unified .key {
  border: var(--line-strong) solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  background: var(--surface-2) !important;
  color: var(--text-primary) !important;
}

.page-block-unified .key {
  min-height: var(--control-h-md);
  font-size: var(--font-4xl) !important;
}

.page-block-unified .key.small {
  font-size: var(--font-lg) !important;
}

.page-block-unified .tsms-header,
.page-block-unified .header {
  border-bottom: var(--line-strong) solid var(--border) !important;
  background: var(--surface-1) !important;
  color: var(--text-primary) !important;
  font-size: var(--font-xl);
}

.page-block-unified .header-to-report,
.page-block-unified .header-manual-edit {
  border: var(--line-strong) solid var(--border) !important;
  border-radius: var(--radius-sm);
  background: var(--surface-2) !important;
  color: var(--text-primary) !important;
  font-size: var(--font-lg) !important;
  min-height: var(--touch-min);
  padding: 6px 10px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.page-block-unified .header-actions {
  gap: var(--space-2);
}

.page-block-unified .tsms-menu,
.page-block-unified .menu {
  border-right: var(--line-strong) solid var(--border) !important;
  background: var(--surface-1) !important;
}

.page-block-unified .tsms-menu a,
.page-block-unified .menu a {
  border-bottom: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  background: var(--surface-2) !important;
}

.page-block-unified .tsms-menu small,
.page-block-unified .menu small {
  color: var(--text-muted) !important;
}

:root[data-theme="dark"] .page-block-unified .tsms-header,
:root[data-theme="dark"] .page-block-unified .header {
  background: linear-gradient(180deg, rgba(22,42,76,.95), rgba(10,22,47,.95)) !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.3);
}

:root[data-theme="dark"] .page-block-unified .tsms-hamburger span,
:root[data-theme="dark"] .page-block-unified .hamburger span {
  background: #e3efff !important;
}

:root[data-theme="dark"] .page-block-unified .main .card,
:root[data-theme="dark"] .page-block-unified .main .section,
:root[data-theme="dark"] .page-block-unified .main .panel,
:root[data-theme="dark"] .page-block-unified main .wf-panel,
:root[data-theme="dark"] .page-block-unified .date-switcher {
  background: transparent !important;
  box-shadow: none !important;
}

:root[data-theme="dark"] .page-block-unified .main .section-boxed,
:root[data-theme="dark"] .page-block-unified .date-switcher.section-boxed {
  background: linear-gradient(180deg, rgba(19,38,70,.95), rgba(8,20,42,.95)) !important;
  box-shadow: 0 10px 26px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.08) !important;
}

:root[data-theme="dark"] .page-block-unified .btn:not(.next):not(.danger):not(.is-selected),
:root[data-theme="dark"] .page-block-unified .actionBtn:not(.danger):not(.is-selected),
:root[data-theme="dark"] .page-block-unified .input,
:root[data-theme="dark"] .page-block-unified select.input,
:root[data-theme="dark"] .page-block-unified .date-switcher select,
:root[data-theme="dark"] .page-block-unified .target-input,
:root[data-theme="dark"] .page-block-unified .manual-input,
:root[data-theme="dark"] .page-block-unified .key {
  background: linear-gradient(180deg, rgba(16,33,62,.9), rgba(9,20,39,.9)) !important;
  color: #eaf3ff !important;
  border-color: #4e709f !important;
}

:root[data-theme="dark"] .page-block-unified .btn.is-selected,
:root[data-theme="dark"] .page-block-unified .actionBtn.is-selected,
:root[data-theme="dark"] .page-block-unified button[data-group].is-selected {
  background: var(--selected-fill) !important;
  color: var(--selected-text) !important;
  border-color: var(--selected-border) !important;
  box-shadow:
    0 0 0 3px var(--selected-ring) !important,
    0 12px 24px rgba(0, 0, 0, 0.34) !important,
    inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

:root[data-theme="dark"] .page-block-unified .btn.is-selected:hover,
:root[data-theme="dark"] .page-block-unified .actionBtn.is-selected:hover,
:root[data-theme="dark"] .page-block-unified button[data-group].is-selected:hover {
  background: var(--selected-fill-hover) !important;
}

:root[data-theme="dark"] .page-block-unified .input:focus,
:root[data-theme="dark"] .page-block-unified select.input:focus,
:root[data-theme="dark"] .page-block-unified .date-switcher select:focus,
:root[data-theme="dark"] .page-block-unified .target-input:focus,
:root[data-theme="dark"] .page-block-unified .manual-input:focus {
  border-color: var(--field-focus-border) !important;
  background: var(--field-focus-bg) !important;
  box-shadow:
    0 0 0 4px var(--field-focus-ring) !important,
    inset 0 0 0 1px var(--field-focus-border) !important;
}

:root[data-theme="dark"] .page-block-unified .title::after,
:root[data-theme="dark"] .page-block-unified .group-title::after,
:root[data-theme="dark"] .page-block-unified .wf-label::after,
:root[data-theme="dark"] .page-block-unified .panel .label::after,
:root[data-theme="dark"] .page-block-unified .entry-head::after {
  border-top-color: #4e709f !important;
}

:root[data-theme="dark"] .page-block-unified .tsms-menu,
:root[data-theme="dark"] .page-block-unified .menu {
  background: linear-gradient(180deg, rgba(19,38,70,.96), rgba(8,20,42,.96)) !important;
}

:root[data-theme="dark"] .page-block-unified .tsms-menu a,
:root[data-theme="dark"] .page-block-unified .menu a {
  background: linear-gradient(180deg, rgba(16,33,62,.9), rgba(9,20,39,.9)) !important;
  border-bottom-color: rgba(107,142,197,.45) !important;
  color: #ecf3ff !important;
}

:root[data-theme="dark"] .page-block-unified .tsms-menu small,
:root[data-theme="dark"] .page-block-unified .menu small {
  color: #a9c0e1 !important;
}

:root[data-theme="dark"] .page-block-unified .header-to-report,
:root[data-theme="dark"] .page-block-unified .header-manual-edit {
  background: linear-gradient(180deg, rgba(16,33,62,.9), rgba(9,20,39,.9)) !important;
  color: #ecf3ff !important;
  border-color: #4e709f !important;
}

/* ============================================================
   28. Shared State Display
   ============================================================ */
.state-inline,
.state-note,
.state-field,
.state-meta {
  --state-color: var(--text-muted);
  --state-border-color: var(--border);
  --state-bg-color: transparent;
  --state-dot-halo: rgba(91, 109, 124, 0.14);
  transition:
    color var(--ease-default),
    border-color var(--ease-default),
    background var(--ease-default),
    box-shadow var(--ease-default);
}

[data-state-tone="neutral"] {
  --state-color: var(--text-muted);
  --state-border-color: var(--border);
  --state-bg-color: transparent;
  --state-dot-halo: rgba(91, 109, 124, 0.14);
}

[data-state-tone="info"] {
  --state-color: var(--accent);
  --state-border-color: var(--accent);
  --state-bg-color: var(--accent-light);
  --state-dot-halo: var(--brand-dim);
}

[data-state-tone="success"] {
  --state-color: var(--success);
  --state-border-color: var(--success);
  --state-bg-color: var(--success-bg);
  --state-dot-halo: rgba(30, 164, 74, 0.18);
}

[data-state-tone="warning"] {
  --state-color: var(--warning);
  --state-border-color: var(--warning);
  --state-bg-color: var(--warning-bg);
  --state-dot-halo: rgba(224, 144, 0, 0.18);
}

[data-state-tone="error"] {
  --state-color: var(--danger);
  --state-border-color: var(--danger);
  --state-bg-color: var(--danger-bg);
  --state-dot-halo: rgba(217, 48, 37, 0.18);
}

:root[data-theme="dark"] [data-state-tone="neutral"] {
  --state-bg-color: rgba(27, 36, 42, 0.42);
  --state-dot-halo: rgba(138, 148, 154, 0.16);
}

:root[data-theme="dark"] [data-state-tone="info"] {
  --state-bg-color: rgba(16, 39, 68, 0.82);
  --state-dot-halo: rgba(88, 194, 255, 0.22);
}

:root[data-theme="dark"] [data-state-tone="success"] {
  --state-dot-halo: rgba(40, 195, 90, 0.22);
}

:root[data-theme="dark"] [data-state-tone="warning"] {
  --state-dot-halo: rgba(255, 191, 64, 0.22);
}

:root[data-theme="dark"] [data-state-tone="error"] {
  --state-dot-halo: rgba(243, 91, 83, 0.22);
}

.state-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--state-color) !important;
  vertical-align: middle;
}

.state-inline::before,
.state-meta::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--state-border-color);
  box-shadow: 0 0 0 3px var(--state-dot-halo);
  flex: 0 0 auto;
}

.state-note {
  display: block;
  padding: 10px 12px !important;
  border-left: 4px solid var(--state-border-color) !important;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--state-bg-color) !important;
  color: var(--state-color) !important;
  line-height: 1.6;
  text-align: left !important;
  white-space: pre-line;
}

.state-field,
.page-block-unified .input.state-field {
  display: flex;
  align-items: center;
  min-height: var(--control-h-md);
  padding: 10px 12px !important;
  border: var(--line-regular) solid var(--state-border-color) !important;
  background: var(--state-bg-color) !important;
  color: var(--state-color) !important;
  box-shadow: inset 4px 0 0 0 var(--state-border-color);
  font-weight: 800;
}

.state-field[data-state-tone="neutral"],
.page-block-unified .input.state-field[data-state-tone="neutral"] {
  color: var(--text-secondary) !important;
}

.state-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--state-color) !important;
  font-weight: 800;
}

/* ============================================================
   29. HTML Style Extraction
   認証系 / TOP / ops / sales の埋め込み style を CSS に集約
   ============================================================ */
body.auth-flow-page {
  background: var(--bg);
  color: var(--text-primary);
}

body.auth-flow-page .auth-main {
  max-width: 520px;
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-2);
}

body.auth-flow-page .auth-card {
  border: var(--line-regular) solid var(--border) !important;
  background: var(--surface-1) !important;
  border-radius: var(--radius-md);
  padding: var(--space-3) !important;
  margin: 0 !important;
  box-shadow: var(--shadow-sm);
}

body.auth-flow-page .auth-title {
  margin: 0 0 var(--space-2);
  font-size: var(--font-3xl);
  line-height: 1.35;
  font-weight: 900;
  color: var(--text-primary);
  text-transform: none;
  letter-spacing: 0;
}

body.auth-flow-page .brand {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 18px 0 0;
}

body.auth-flow-page .brand-main {
  font-weight: 900;
  font-size: clamp(42px, 10vw, 48px);
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--text-primary);
}

body.auth-flow-page .brand-sub {
  font-size: var(--font-lg);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

body.login-page #cacheVersionInline.brand-cache {
  display: block;
  text-align: center !important;
  margin: 0 0 2px !important;
  font-size: var(--font-sm) !important;
  line-height: 1.2;
  color: var(--text-muted);
  opacity: 0.8;
  min-height: 0;
}

body.login-page .auth-card .field,
body.signup-page .auth-card .field,
body.reset-password-page .auth-card .field {
  border-bottom: 0;
  padding: 0;
  margin: 0 0 var(--space-3);
}

body.login-page .auth-card .label,
body.signup-page .auth-card .label,
body.reset-password-page .auth-card .label {
  font-size: var(--font-md) !important;
}

body.login-page .auth-card .input,
body.signup-page .auth-card .input,
body.reset-password-page .auth-card .input {
  font-size: var(--font-2xl) !important;
}

body.login-page .auth-card .btn,
body.signup-page .auth-card .btn,
body.reset-password-page .auth-card .btn {
  width: 100%;
}

body.login-page .auth-msg,
body.signup-page .auth-msg,
body.reset-password-page .auth-msg,
body.auth-callback-page .auth-status {
  margin-top: var(--space-3);
  border: var(--line-regular) solid var(--border);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  white-space: pre-wrap;
  font-size: var(--font-lg);
  line-height: 1.45;
  min-height: 44px;
}

body.login-page .auth-links,
body.signup-page .auth-links,
body.reset-password-page .auth-links {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-3);
  flex-wrap: wrap;
  font-size: var(--font-lg);
}

body.login-page .auth-links {
  align-items: center;
}

body.signup-page .auth-muted,
body.reset-password-page .auth-muted {
  font-size: var(--font-md);
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 0 var(--space-3);
}

body.signup-page .auth-consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0 0 var(--space-3);
  font-size: var(--font-md);
  color: var(--text-secondary);
  line-height: 1.45;
}

body.signup-page .auth-consent input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

body.reset-password-page .auth-request {
  display: grid;
  gap: var(--space-2);
}

body.reset-password-page .auth-request.hide {
  display: none;
}

body.reset-password-page .auth-recovery {
  margin-top: var(--space-3);
  border: var(--line-regular) solid var(--border);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  display: none;
  gap: var(--space-2);
}

body.reset-password-page .auth-recovery.show {
  display: grid;
}

body.auth-callback-page .auth-main {
  max-width: 720px;
}

body.auth-callback-page .auth-note {
  margin: 0;
  font-size: var(--font-md);
  color: var(--text-muted);
  line-height: 1.45;
}

body.auth-callback-page .auth-actions,
body.signup-check-email-page .auth-actions {
  display: flex;
  flex-wrap: wrap;
}

body.auth-callback-page .auth-actions {
  gap: var(--space-2);
  margin-top: var(--space-3);
}

body.auth-callback-page .auth-actions .btn,
body.signup-check-email-page .auth-actions .btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
}

body.auth-callback-page .auth-actions .btn {
  min-width: 160px;
}

body.signup-check-email-page .auth-main {
  max-width: 620px;
}

body.signup-check-email-page .auth-card {
  display: grid;
  gap: 12px;
}

body.signup-check-email-page .auth-title,
body.signup-check-email-page .auth-muted,
body.signup-check-email-page .mail-title {
  margin: 0;
}

body.signup-check-email-page .auth-muted {
  color: var(--text-secondary);
  font-size: var(--font-md);
  line-height: 1.5;
}

body.signup-check-email-page .mail-box {
  border: var(--line-regular) solid var(--border);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: grid;
  gap: 8px;
}

body.signup-check-email-page .mail-title {
  font-size: var(--font-xl);
  font-weight: 800;
}

body.signup-check-email-page .mail-link {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 700;
}

body.signup-check-email-page .auth-steps {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  line-height: 1.6;
  color: var(--text-primary);
}

body.signup-check-email-page .auth-actions {
  gap: 10px;
  margin-top: 2px;
}

body.sales-page .table-wrap td {
  padding: 3px 2px;
}

body.sales-page .table-wrap .target-input,
body.sales-page .table-wrap .manual-input {
  box-sizing: border-box;
  display: block;
  width: calc(100% - 6px);
  max-width: 64px;
  margin: 0 auto;
  font-size: 12px !important;
  line-height: 1.2;
  padding: 3px 2px;
}

body.sales-page .table-wrap .manual-input.time {
  max-width: 58px;
  text-align: center;
}

body.ops-page .ops-stack-gap {
  margin-top: 12px;
}

body.ops-page .ops-break-timer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: var(--line-regular) solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--surface-1) 0%, var(--surface-2) 100%);
  box-shadow: var(--shadow-sm);
}

body.ops-page .ops-break-timer-label {
  font-size: var(--font-md);
  font-weight: 800;
  color: var(--text-secondary);
  line-height: 1.3;
}

body.ops-page .ops-timer-value {
  font-weight: 900;
  font-size: clamp(24px, 6.4vw, 30px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
}

body.ops-page #btn_depart,
body.ops-page #btn_return,
body.ops-page #btn_breakStart,
body.ops-page #btn_breakEnd {
  line-height: 1.15;
}

@media (max-width: 520px) {
  body.ops-page .ops-break-timer {
    padding: 14px 16px;
  }

  body.ops-page .ops-break-timer-label {
    font-size: var(--font-sm);
  }
}

body.ops-page #btn_reset.reset-final {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  line-height: 1.2;
}

body.ops-page #btn_reset .reset-main {
  display: block;
  font-size: clamp(24px, 5.8vw, 28px) !important;
  font-weight: 900;
  line-height: 1.15;
}

body.ops-page #btn_reset .warn {
  display: block;
  font-size: clamp(16px, 4vw, 18px) !important;
  font-weight: 900;
  line-height: 1.25;
  max-width: 92%;
}

body.index-page {
  --bg: #F3F6F8;
  --surface-1: #FFFFFF;
  --surface-2: #EEF3F6;
  --border: #D5DEE6;
  --text-primary: #0F1720;
  --text-secondary: #344554;
  --text-muted: #5B6D7C;
  --accent: #2580ED;
  --work: #1c9b2d;
  --holiday: #f0ad00;
  --danger: #d64545;
  background: var(--bg);
  color: var(--text-primary);
  padding-bottom: 78px;
}

:root[data-theme="dark"] body.index-page {
  --bg: #0F1417;
  --surface-1: #0e1a2d;
  --surface-2: #0a1630;
  --border: #2f4d77;
  --text-primary: #ecf3ff;
  --text-secondary: #b6c8e6;
  --text-muted: #89a3c7;
  --accent: #4da3ff;
  --work: #1c9b2d;
  --holiday: #f0ad00;
  --danger: #d64545;
}

body.index-page .header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 60px;
  border-bottom: var(--line-strong) solid var(--border);
  background: var(--surface-1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0 14px;
  font-weight: 900;
}

:root[data-theme="dark"] body.index-page .header {
  background: linear-gradient(180deg, rgba(22,42,76,.95), rgba(10,22,47,.95));
  box-shadow: 0 10px 24px rgba(0,0,0,.3);
}

body.index-page .header-title {
  font-size: clamp(32px, 7.8vw, 40px);
  line-height: 1;
  letter-spacing: 0.02em;
}

body.index-page .header-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: var(--font-md);
  color: var(--text-secondary);
  font-weight: 700;
  text-align: right;
}

body.index-page .main {
  max-width: 760px !important;
  margin: 0 auto !important;
  padding: var(--space-3) 14px !important;
  display: grid;
  gap: var(--space-3) !important;
}

body.index-page .card {
  border: var(--line-strong) solid var(--border) !important;
  background: var(--surface-1) !important;
  border-radius: var(--radius-md) !important;
  padding: var(--space-3) !important;
}

body.index-page .dispatch-card {
  padding-bottom: var(--space-3) !important;
}

:root[data-theme="dark"] body.index-page .card {
  background: linear-gradient(180deg, rgba(19,38,70,.95), rgba(8,20,42,.95)) !important;
  box-shadow: 0 10px 26px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.08) !important;
}

body.index-page .group-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-3) !important;
  font-size: var(--font-3xl) !important;
  font-weight: 900;
  line-height: 1.35 !important;
}

body.index-page .group-title::after {
  border-top: var(--line-regular) solid var(--border) !important;
}

body.index-page .calendar-head .group-title {
  margin: 0 !important;
}

body.index-page .group-note {
  margin: 0 0 var(--space-2);
  font-size: var(--font-md);
  color: var(--text-muted);
  font-weight: 700;
}

body.index-page .swipe-track {
  --swipe-progress: 0;
  --swipe-progress-pct: 0%;
  --swipe-progress-tail: 14%;
  --swipe-glow-x: 28px;
  --swipe-glow-opacity: .18;
  --swipe-glow-scale: .985;
  --swipe-inset-blur: 10px;
  --swipe-outer-blur: 8px;
  --swipe-handle-glow: 6px;
  --swipe-fill: rgba(255, 214, 102, .26);
  --swipe-glow-core: rgba(255, 247, 201, .96);
  --swipe-glow-mid: rgba(255, 214, 92, .58);
  --swipe-glow-edge: rgba(255, 255, 255, 0);
  position: relative;
  min-height: var(--control-h-lg);
  border: var(--line-strong) solid var(--border);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 4px;
  overflow: hidden;
  touch-action: pan-y;
  isolation: isolate;
}

body.index-page .swipe-track::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(90deg,
      var(--swipe-fill) 0%,
      rgba(255, 238, 180, .58) var(--swipe-progress-pct),
      rgba(255, 255, 255, 0) var(--swipe-progress-tail)),
    radial-gradient(circle at var(--swipe-glow-x) 50%,
      var(--swipe-glow-core) 0%,
      var(--swipe-glow-mid) 20%,
      rgba(255, 224, 117, .32) 38%,
      var(--swipe-glow-edge) 68%);
  opacity: var(--swipe-glow-opacity);
  transform: scale(var(--swipe-glow-scale));
  transition: opacity .12s ease, transform .12s ease;
  box-shadow:
    inset 0 0 var(--swipe-inset-blur) rgba(255, 236, 167, .24),
    0 0 var(--swipe-outer-blur) rgba(255, 216, 102, .28);
}

:root[data-theme="dark"] body.index-page .swipe-track {
  --swipe-fill: rgba(111, 198, 255, .26);
  --swipe-glow-core: rgba(231, 247, 255, .98);
  --swipe-glow-mid: rgba(100, 191, 255, .7);
  --swipe-glow-edge: rgba(255, 255, 255, 0);
  background: linear-gradient(90deg, rgba(20,40,74,.92), rgba(62,118,194,.55));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}

body.index-page .swipe-track.locked {
  border-color: var(--accent);
}

body.index-page .swipe-track.locked .swipe-label {
  left: 12px;
  right: 12px;
  text-align: center;
}

body.index-page .swipe-label {
  position: absolute;
  left: 70px;
  right: 12px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  font-size: var(--font-4xl);
  font-weight: 900;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

:root[data-theme="dark"] body.index-page .swipe-label {
  color: #e3efff;
}

body.index-page .swipe-handle {
  position: absolute;
  left: 4px;
  top: 50%;
  z-index: 2;
  width: 50px;
  height: 50px;
  border: var(--line-strong) solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: var(--font-3xl);
  font-weight: 900;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  touch-action: none;
  transform: translate3d(0,-50%,0);
  box-shadow:
    0 0 var(--swipe-handle-glow) rgba(255, 215, 110, .28),
    0 6px 14px rgba(0,0,0,.12);
}

:root[data-theme="dark"] body.index-page .swipe-handle {
  background: linear-gradient(180deg, #78c5ff, #3f9bff);
  border-color: #8ad0ff;
  box-shadow: 0 4px 14px rgba(45,140,255,.45);
}

body.index-page .swipe-track.dragging .swipe-handle {
  transition: none !important;
}

body.index-page .swipe-handle .swipe-icon,
body.index-page .swipe-handle .swipe-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

body.index-page .swipe-handle .swipe-icon svg {
  stroke: #ffffff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.index-page .calendar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-2);
}

body.index-page .calendar-month {
  margin: 0;
  font-size: var(--font-3xl);
  font-weight: 900;
  color: var(--text-secondary);
}

body.index-page .calendar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

body.index-page .calendar-nav-btn {
  appearance: none;
  width: 34px;
  height: 34px;
  border: var(--line-strong) solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-primary);
  font: inherit;
  font-size: var(--font-3xl);
  line-height: 1;
  font-weight: 900;
  display: grid;
  place-items: center;
  cursor: pointer;
}

:root[data-theme="dark"] body.index-page .calendar-nav-btn {
  background: linear-gradient(180deg, rgba(16,33,62,.9), rgba(9,20,39,.9));
}

body.index-page .calendar-week,
body.index-page .calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

body.index-page .calendar-week span {
  text-align: center;
  font-size: var(--font-md);
  color: var(--text-muted);
  font-weight: 800;
}

body.index-page .calendar-day {
  border: var(--line-regular) solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font: inherit;
  font-size: var(--font-md);
  font-weight: 800;
  color: var(--text-primary);
  padding: 3px;
}

:root[data-theme="dark"] body.index-page .calendar-day {
  background: linear-gradient(180deg, rgba(15,31,58,.9), rgba(9,20,40,.9));
}

body.index-page .calendar-day.empty {
  border-style: dashed;
  opacity: .35;
}

body.index-page .calendar-day.today {
  border-color: var(--accent);
}

:root[data-theme="dark"] body.index-page .calendar-day.today {
  box-shadow: 0 0 0 2px rgba(88,194,255,.18), 0 0 14px rgba(65,148,255,.35);
}

body.index-page .shift-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;
}

body.index-page .shift-dot.work {
  background: var(--work);
}

body.index-page .shift-dot.holiday {
  background: var(--holiday);
}

body.index-page .shift-dot.absence {
  background: var(--danger);
}

body.index-page .calendar-info {
  margin: var(--space-2) 0 0;
  border: var(--line-thin) solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: var(--space-2);
  font-size: var(--font-md);
  color: var(--text-secondary);
}

:root[data-theme="dark"] body.index-page .calendar-info {
  background: linear-gradient(180deg, rgba(14,30,55,.88), rgba(10,22,42,.88));
}

body.index-page .event-list {
  display: grid;
  gap: var(--space-2);
}

body.index-page .event-btn {
  appearance: none;
  border: var(--line-strong) solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-primary);
  font: inherit;
  width: 100%;
  min-height: var(--control-h-md);
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

:root[data-theme="dark"] body.index-page .event-btn {
  background: linear-gradient(180deg, rgba(16,33,62,.9), rgba(9,20,39,.9));
}

body.index-page .event-time {
  min-width: 56px;
  font-size: var(--font-lg);
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

body.index-page .event-label {
  flex: 1;
  min-width: 0;
}

body.index-page .event-venue {
  font-weight: 900;
}

body.index-page .event-arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: var(--font-3xl);
  line-height: 1;
}

:root[data-theme="dark"] body.index-page .event-arrow {
  color: #7fb9ff;
}

body.index-page .event-empty {
  border: var(--line-strong) dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-secondary);
  padding: var(--space-2);
  font-size: var(--font-md);
}

body.index-page .modal-bg {
  position: fixed;
  inset: 0;
  z-index: 1600;
  background: rgba(0,0,0,.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

body.index-page .modal-bg.show {
  display: flex;
}

body.index-page .modal {
  width: min(560px, 100%);
  max-height: 70dvh;
  overflow: auto;
  border: var(--line-strong) solid var(--modal-shell-border);
  border-radius: var(--radius-md);
  background: var(--surface-1);
  padding: var(--space-3);
  box-shadow: var(--modal-shell-shadow);
}

:root[data-theme="dark"] body.index-page .modal {
  background: linear-gradient(180deg, rgba(19,38,70,.96), rgba(10,24,45,.96));
}

body.index-page .modal h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--font-3xl);
}

body.index-page .modal p {
  margin: 0 0 var(--space-2);
  font-size: var(--font-lg);
  color: var(--text-secondary);
}

body.index-page .modal-kv {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 6px var(--space-2);
  margin: 0 0 var(--space-2);
}

body.index-page .modal-k {
  margin: 0;
  font-size: var(--font-md);
  line-height: 1.5;
  font-weight: 900;
  color: var(--text-secondary);
}

body.index-page .modal-v {
  margin: 0;
  font-size: var(--font-md);
  line-height: 1.5;
  color: var(--text-primary);
  word-break: break-word;
}

body.index-page .modal-flyer-wrap {
  margin: 0 0 var(--space-2);
  border: var(--line-thin) solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
}

body.index-page .modal-flyer {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #fff;
}

body.index-page .modal-link {
  color: var(--accent);
  font-weight: 800;
}

body.index-page .modal .btn {
  appearance: none;
  width: 100%;
  min-height: var(--touch-min);
  border: var(--line-strong) solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: var(--font-2xl);
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 460px) {
  body.index-page .header-title {
    font-size: clamp(30px, 7.5vw, 32px);
  }

  body.index-page .header-meta {
    font-size: var(--font-sm);
  }

  body.index-page .main {
    gap: var(--space-2) !important;
  }

  body.index-page .group-title,
  body.index-page .swipe-label {
    font-size: var(--font-3xl) !important;
  }
}

:where(.confirm-page) .actions.entry-actions .actionBtn {
  flex: 0 0 auto;
  min-height: 32px;
  width: auto;
  padding: 6px 10px;
  font-size: var(--font-md);
  line-height: 1.15;
}

:where(.confirm-page) .confirm-summary-modal-card,
:where(.report-entry-page) .report-submit-confirm-modal-card {
  width: min(460px, 100%);
  padding: 20px 18px;
  text-align: left;
}

:where(.confirm-page) .confirm-summary-modal-card {
  --confirm-summary-modal-title-size: var(--font-3xl);
  --confirm-summary-modal-subtitle-size: var(--font-md);
  --confirm-summary-modal-countdown-size: var(--font-md);
  --confirm-summary-modal-label-size: var(--font-md);
  --confirm-summary-modal-value-size: var(--font-xl);
  --confirm-summary-modal-emphasis-size: var(--font-5xl);
}

:where(.confirm-page) .confirm-summary-modal-head,
:where(.report-entry-page) .report-submit-confirm-modal-head {
  display: grid;
  gap: 4px;
  margin-bottom: var(--space-2);
}

:where(.confirm-page) .confirm-summary-modal-title {
  margin: 0;
  font-size: var(--confirm-summary-modal-title-size);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.08;
  white-space: nowrap;
}

:where(.confirm-page) .confirm-summary-modal-subtitle {
  margin: 0;
  font-size: var(--confirm-summary-modal-subtitle-size);
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1.2;
  white-space: nowrap;
}

:where(.confirm-page) .confirm-summary-modal-countdown {
  margin: 0;
  font-size: var(--confirm-summary-modal-countdown-size);
  font-weight: 800;
  color: var(--value-highlight);
  line-height: 1.15;
  white-space: nowrap;
}

:where(.confirm-page) .confirm-summary-modal-list,
:where(.report-entry-page) .report-submit-confirm-modal-list {
  display: grid;
  gap: 0;
}

:where(.confirm-page) .confirm-summary-modal-list .line {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: baseline;
  column-gap: var(--space-3);
}

:where(.report-entry-page) .report-submit-confirm-modal-list .line {
  align-items: flex-start;
}

:where(.confirm-page) .confirm-summary-modal-list .line[hidden],
:where(.report-entry-page) .report-submit-confirm-modal-list .line[hidden] {
  display: none !important;
}

:where(.confirm-page) .confirm-summary-modal-list .v {
  font-size: var(--confirm-summary-modal-value-size) !important;
  font-weight: 900;
  line-height: 1.15 !important;
  min-width: 0;
  max-width: 100%;
  justify-self: end;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

:where(.confirm-page) .confirm-summary-modal-list .k {
  font-size: var(--confirm-summary-modal-label-size) !important;
  font-weight: 800;
  color: var(--text-muted) !important;
  line-height: 1.2 !important;
  min-width: 0;
  white-space: nowrap;
}

:where(.confirm-page) .confirm-summary-modal-list .v .value-number.emphasis,
:where(.report-entry-page) .report-submit-confirm-modal-list .v .value-number.emphasis {
  font-size: calc(var(--font-2xl) + 8px);
  line-height: 1;
}

:where(.confirm-page) .confirm-summary-modal-list .v .value-number.emphasis {
  font-size: var(--confirm-summary-modal-emphasis-size);
}

:where(.confirm-page) .result-modal-bg {
  transition:
    background 0.24s ease,
    backdrop-filter 0.24s ease,
    -webkit-backdrop-filter 0.24s ease;
}

:where(.confirm-page) .result-modal-bg.is-goal-transfering {
  background: rgba(10, 15, 20, 0.18) !important;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

:where(.confirm-page) .confirm-summary-modal-card {
  transform-origin: center center;
  will-change: transform, opacity, filter, clip-path;
  overflow: hidden;
  clip-path: inset(0 round var(--radius-lg));
}

:where(.confirm-page) .confirm-summary-modal-card.is-goal-transfer-shrinking,
:where(.confirm-page) .confirm-summary-modal-card.is-goal-transfer-done {
  pointer-events: none;
  border-color: rgba(183, 227, 255, 0.72) !important;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.98) 0 16%, rgba(142, 226, 255, 0.96) 30%, rgba(83, 138, 255, 0.88) 52%, rgba(18, 28, 54, 0.94) 76%, rgba(18, 28, 54, 0.12) 100%) !important;
  box-shadow:
    0 0 0 1px rgba(205, 235, 255, 0.18),
    0 0 30px rgba(109, 204, 255, 0.44),
    0 0 56px rgba(79, 118, 255, 0.34) !important;
}

:where(.confirm-page) .confirm-summary-modal-card.is-goal-transfer-shrinking {
  animation: confirmSummaryModalToOrb var(--goal-transfer-modal-to-orb-ms, 260ms) cubic-bezier(0.18, 0.82, 0.24, 1) both;
}

:where(.confirm-page) .confirm-summary-modal-card.is-goal-transfer-reduced-motion.is-goal-transfer-shrinking {
  animation: confirmSummaryModalToOrbReduced var(--goal-transfer-modal-to-orb-ms, 170ms) linear both;
}

:where(.confirm-page) .confirm-summary-modal-card.is-goal-transfer-shrinking .confirm-summary-modal-head,
:where(.confirm-page) .confirm-summary-modal-card.is-goal-transfer-shrinking .confirm-summary-modal-list {
  animation: confirmSummaryModalContentToOrb var(--goal-transfer-modal-to-orb-ms, 260ms) cubic-bezier(0.24, 0.82, 0.3, 1) both;
  transform-origin: center center;
  will-change: opacity, transform, filter;
}

:where(.confirm-page) .confirm-summary-modal-card.is-goal-transfer-done {
  animation: none !important;
  opacity: 0;
  transform: scale(0.1) translateY(0);
  filter: brightness(1.52) saturate(1.18) blur(1.4px);
  border-radius: 999px;
  clip-path: inset(44% 44% round 999px);
}

:where(.confirm-page) .confirm-summary-modal-card.is-goal-transfer-done .confirm-summary-modal-head,
:where(.confirm-page) .confirm-summary-modal-card.is-goal-transfer-done .confirm-summary-modal-list {
  opacity: 0;
}

:where(.confirm-page) .confirm-goal-transfer-layer {
  --goal-transfer-modal-to-orb-ms: 260ms;
  --goal-transfer-flight-ms: 420ms;
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-modal) + 1);
  pointer-events: none;
  opacity: 0;
}

:where(.confirm-page) .confirm-goal-transfer-layer.is-active {
  opacity: 1;
}

:where(.confirm-page) .confirm-goal-transfer-orb {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--goal-transfer-size, 24px);
  height: var(--goal-transfer-size, 24px);
  border-radius: 999px;
  opacity: 0;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.99) 0 20%, rgba(255, 255, 255, 0.82) 28%, rgba(129, 235, 255, 0.96) 48%, rgba(79, 118, 255, 0.9) 68%, rgba(79, 118, 255, 0) 84%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.26),
    0 0 24px rgba(87, 214, 255, 0.6),
    0 0 44px rgba(79, 118, 255, 0.5);
  transform: translate3d(var(--goal-transfer-start-x, 0), var(--goal-transfer-start-y, 0), 0) scale(0.1);
  will-change: transform, opacity, filter;
  filter: saturate(1.12) brightness(1.04);
}

:where(.confirm-page) .confirm-goal-transfer-orb.is-preflight {
  animation: confirmGoalOrbForm var(--goal-transfer-modal-to-orb-ms, 260ms) cubic-bezier(0.2, 0.84, 0.26, 1) both;
}

:where(.confirm-page) .confirm-goal-transfer-orb.is-flight-active {
  animation: confirmGoalTransferFlight var(--goal-transfer-flight-ms, 420ms) cubic-bezier(0.18, 0.9, 0.28, 1) both;
}

:where(.confirm-page) .confirm-goal-transfer-layer.is-reduced-motion .confirm-goal-transfer-orb.is-preflight {
  animation: confirmGoalOrbFormReduced var(--goal-transfer-modal-to-orb-ms, 170ms) linear both;
}

:where(.confirm-page) .confirm-goal-transfer-layer.is-reduced-motion .confirm-goal-transfer-orb.is-reduced-journey {
  animation: confirmGoalTransferReducedJourney var(--goal-transfer-journey-ms, 390ms) linear both;
}

:where(.confirm-page) .confirm-goal-transfer-layer.is-reduced-motion .confirm-goal-transfer-orb.is-flight-active {
  animation: confirmGoalTransferFlightReduced var(--goal-transfer-flight-ms, 220ms) linear both;
}

:where(.confirm-page) .confirm-goal-card {
  --goal-stage-main: #eef3fb;
  --goal-stage-accent: #c9d3e2;
  --goal-stage-glow: rgba(255, 255, 255, 0.18);
  --goal-fill-bg: linear-gradient(90deg, #d7e0ed 0%, #edf3fa 54%, #ffffff 100%);
  position: relative;
  overflow: visible;
  margin: 12px 0 10px !important;
  padding: 18px 18px 16px !important;
  border: 1px solid rgba(117, 163, 255, 0.58) !important;
  border-radius: 22px !important;
  background: linear-gradient(180deg, #101827 0%, #121b31 48%, #0b1020 100%) !important;
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.34) !important,
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important,
    0 0 0 1px rgba(121, 171, 255, 0.14) !important;
  color: #f4f8ff !important;
  isolation: isolate;
}

:where(.confirm-page) .confirm-goal-card[data-goal-stage="blue"] {
  --goal-stage-main: #5dd0ff;
  --goal-stage-accent: #386bff;
  --goal-stage-glow: rgba(88, 194, 255, 0.48);
  --goal-fill-bg: linear-gradient(90deg, #2f6dff 0%, #43acff 55%, #b8f5ff 100%);
}

:where(.confirm-page) .confirm-goal-card[data-goal-stage="yellow"] {
  --goal-stage-main: #ffd84a;
  --goal-stage-accent: #ff9800;
  --goal-stage-glow: rgba(255, 211, 74, 0.48);
  --goal-fill-bg: linear-gradient(90deg, #ff9d00 0%, #ffd84a 52%, #fff3b2 100%);
}

:where(.confirm-page) .confirm-goal-card[data-goal-stage="green"] {
  --goal-stage-main: #48f38d;
  --goal-stage-accent: #1fb86f;
  --goal-stage-glow: rgba(72, 243, 141, 0.46);
  --goal-fill-bg: linear-gradient(90deg, #139b66 0%, #45ef8a 50%, #dcffe8 100%);
}

:where(.confirm-page) .confirm-goal-card[data-goal-stage="red"] {
  --goal-stage-main: #ff5878;
  --goal-stage-accent: #ffb248;
  --goal-stage-glow: rgba(255, 88, 120, 0.52);
  --goal-fill-bg: linear-gradient(90deg, #ff3c5b 0%, #ff7a47 42%, #ffd25d 100%);
}

:where(.confirm-page) .confirm-goal-card[data-goal-stage="rainbow"] {
  --goal-stage-main: #ffffff;
  --goal-stage-accent: #ff48d9;
  --goal-stage-glow: rgba(255, 255, 255, 0.58);
  --goal-fill-bg: linear-gradient(90deg, #4fd6ff 0%, #4f76ff 18%, #ffd84a 36%, #54f485 54%, #ff5878 72%, #ff63f1 88%, #4fd6ff 100%);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.36) !important,
    inset 0 1px 0 rgba(255, 255, 255, 0.11) !important,
    0 0 0 1px rgba(255, 255, 255, 0.16) !important;
}

:where(.confirm-page) .confirm-goal-head,
:where(.confirm-page) .confirm-goal-values,
:where(.confirm-page) .confirm-goal-meta {
  position: relative;
  z-index: 1;
}

:where(.confirm-page) .confirm-goal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

:where(.confirm-page) .confirm-goal-copy {
  display: grid;
  gap: 2px;
}

:where(.confirm-page) .confirm-goal-eyebrow,
:where(.confirm-page) .confirm-goal-title,
:where(.confirm-page) .confirm-goal-note {
  margin: 0;
}

:where(.confirm-page) .confirm-goal-eyebrow {
  color: rgba(219, 233, 255, 0.74);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

:where(.confirm-page) .confirm-goal-title {
  color: #f7fbff;
  font-size: clamp(24px, 6vw, 28px);
  font-weight: 900;
  line-height: 1.04;
}

:where(.confirm-page) .confirm-goal-stage,
:where(.confirm-page) .confirm-goal-percent,
:where(.confirm-page) .confirm-goal-meta-chip {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 10, 21, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 18px var(--goal-stage-glow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

:where(.confirm-page) .confirm-goal-stage {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--goal-stage-main);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-shadow: 0 0 12px var(--goal-stage-glow);
  white-space: nowrap;
}

:where(.confirm-page) .confirm-goal-values {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

:where(.confirm-page) .confirm-goal-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

:where(.confirm-page) .confirm-goal-current,
:where(.confirm-page) .confirm-goal-target {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  min-width: 0;
}

:where(.confirm-page) .confirm-goal-current {
  color: #ffffff;
  font-size: clamp(32px, 8vw, 42px);
  font-weight: 900;
  line-height: 0.96;
}

:where(.confirm-page) .confirm-goal-target {
  color: rgba(229, 239, 255, 0.82);
  font-size: clamp(20px, 5vw, 24px);
  font-weight: 800;
  line-height: 1;
}

:where(.confirm-page) .confirm-goal-unit,
:where(.confirm-page) .confirm-goal-separator {
  font-size: 0.58em;
  opacity: 0.9;
}

:where(.confirm-page) .confirm-goal-percent {
  flex: 0 0 auto;
  min-width: 88px;
  padding: 9px 12px;
  border-radius: 18px;
  color: #f6fbff;
  font-size: clamp(20px, 4.8vw, 24px);
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

:where(.confirm-page) .confirm-goal-track-wrap {
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
}

:where(.confirm-page) .confirm-goal-track {
  position: relative;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(166, 198, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(3, 8, 15, 0.9), rgba(12, 22, 39, 0.94)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent);
  box-shadow:
    inset 0 10px 18px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  overflow: visible;
}

:where(.confirm-page) .confirm-goal-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  max-width: 100%;
  border-radius: inherit;
  background: var(--goal-fill-bg);
  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.24),
    0 0 26px var(--goal-stage-glow);
}

:where(.confirm-page) .confirm-goal-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.02) 38%, transparent 75%);
  border-radius: inherit;
  mix-blend-mode: screen;
}

:where(.confirm-page) .confirm-goal-flare {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0, var(--goal-stage-main) 42%, transparent 74%);
  transform: translate(-50%, -50%) scale(0.62);
  opacity: 0;
  pointer-events: none;
}

:where(.confirm-page) .confirm-goal-flare.is-active {
  animation: confirmGoalFlareBurst 0.72s ease-out both;
}

:where(.confirm-page) .confirm-goal-shot {
  position: absolute;
  top: -32px;
  left: 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(6, 12, 24, 0.92);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.34),
    0 0 18px var(--goal-stage-glow);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transform: translate(calc(var(--goal-shot-from-pct, 12%) - 50%), 18px) scale(0.84);
  pointer-events: none;
}

:where(.confirm-page) .confirm-goal-shot.is-active {
  animation: confirmGoalShotFlight 1.1s cubic-bezier(0.2, 0.88, 0.32, 1) both;
}

:where(.confirm-page) .confirm-goal-shot.is-negative {
  border-color: rgba(255, 109, 145, 0.55);
  background: rgba(56, 14, 27, 0.95);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.34),
    0 0 18px rgba(255, 90, 120, 0.44);
}

:where(.confirm-page) .confirm-goal-marker {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: var(--goal-marker-pct);
  width: 1px;
  background: rgba(255, 255, 255, 0.22);
  opacity: 0.75;
  transform: translateX(-50%);
}

:where(.confirm-page) .confirm-goal-thresholds {
  display: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
  color: rgba(223, 235, 255, 0.76);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

:where(.confirm-page) .confirm-goal-thresholds span {
  text-align: center;
}

:where(.confirm-page) .confirm-goal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
}

:where(.confirm-page) .confirm-goal-meta-chip {
  display: inline-grid;
  gap: 2px;
  min-width: 116px;
  padding: 8px 12px;
  border-radius: 16px;
  color: #f6fbff;
}

:where(.confirm-page) .confirm-goal-meta-label {
  color: rgba(219, 232, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

:where(.confirm-page) .confirm-goal-meta-value {
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.1;
}

:where(.confirm-page) .confirm-goal-note {
  position: relative;
  z-index: 1;
  color: rgba(231, 240, 255, 0.82);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

:where(.confirm-page) .confirm-goal-card.is-goal-animating .confirm-goal-track {
  box-shadow:
    inset 0 10px 18px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 24px var(--goal-stage-glow);
}

:where(.confirm-page) .confirm-goal-card[data-goal-stage="rainbow"] .confirm-goal-fill {
  background-size: 200% 100%;
  animation: confirmGoalRainbowFlow 1.7s linear infinite;
}

@keyframes confirmGoalShotFlight {
  0% {
    opacity: 0;
    transform: translate(calc(var(--goal-shot-from-pct, 12%) - 50%), 22px) scale(0.82);
  }
  14% {
    opacity: 1;
  }
  72% {
    opacity: 1;
    transform: translate(calc(var(--goal-shot-to-pct, 68%) - 50%), -2px) scale(1.04);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--goal-shot-to-pct, 68%) - 50%), -18px) scale(0.92);
  }
}

@keyframes confirmGoalFlareBurst {
  0% {
    opacity: 0.12;
    transform: translate(-50%, -50%) scale(0.5);
  }
  38% {
    opacity: 0.98;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.6);
  }
}

@keyframes confirmGoalRainbowFlow {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 200% 50%;
  }
}

@keyframes confirmSummaryModalToOrb {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: brightness(1) saturate(1);
    border-radius: var(--radius-lg);
    clip-path: inset(0 round var(--radius-lg));
  }
  38% {
    opacity: 1;
    transform: scale(0.88) translateY(-2px);
    filter: brightness(1.04) saturate(1.02);
    border-radius: 28px;
    clip-path: inset(4% 6% round 28px);
  }
  72% {
    opacity: 0.92;
    transform: scale(0.38) translateY(-4px);
    filter: brightness(1.26) saturate(1.14);
    border-radius: 999px;
    clip-path: inset(25% 31% round 999px);
  }
  100% {
    opacity: 0;
    transform: scale(0.12) translateY(0);
    filter: brightness(1.58) saturate(1.24) blur(2px);
    border-radius: 999px;
    clip-path: inset(44% 44% round 999px);
  }
}

@keyframes confirmSummaryModalContentToOrb {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
  44% {
    opacity: 0.54;
    transform: scale(0.88);
    filter: blur(0.8px);
  }
  100% {
    opacity: 0;
    transform: scale(0.34);
    filter: blur(6px);
  }
}

@keyframes confirmGoalOrbForm {
  0% {
    opacity: 0.18;
    transform: translate3d(var(--goal-transfer-start-x, 0), var(--goal-transfer-start-y, 0), 0) scale(0.12);
    filter: saturate(1.24) brightness(1.58) blur(2px);
  }
  38% {
    opacity: 0.46;
    transform: translate3d(var(--goal-transfer-start-x, 0), var(--goal-transfer-start-y, 0), 0) scale(0.24);
    filter: saturate(1.26) brightness(1.5) blur(1.4px);
  }
  68% {
    opacity: 0.94;
    transform: translate3d(var(--goal-transfer-start-x, 0), var(--goal-transfer-start-y, 0), 0) scale(0.76);
    filter: saturate(1.22) brightness(1.38) blur(0.65px);
  }
  84% {
    opacity: 1;
    transform: translate3d(var(--goal-transfer-start-x, 0), var(--goal-transfer-start-y, 0), 0) scale(1.18);
    filter: saturate(1.18) brightness(1.24) blur(0.35px);
  }
  100% {
    opacity: 1;
    transform: translate3d(var(--goal-transfer-start-x, 0), var(--goal-transfer-start-y, 0), 0) scale(1.04);
    filter: saturate(1.14) brightness(1.12) blur(0);
  }
}

@keyframes confirmGoalTransferFlight {
  0% {
    opacity: 1;
    transform: translate3d(var(--goal-transfer-start-x, 0), var(--goal-transfer-start-y, 0), 0) scale(1.04);
  }
  18% {
    opacity: 1;
    transform: translate3d(var(--goal-transfer-start-x, 0), calc(var(--goal-transfer-start-y, 0) - 10px), 0) scale(1.2);
  }
  68% {
    opacity: 1;
    transform: translate3d(var(--goal-transfer-end-x, 0), calc(var(--goal-transfer-end-y, 0) - 14px), 0) scale(1.16);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--goal-transfer-end-x, 0), var(--goal-transfer-end-y, 0), 0) scale(0.34);
  }
}

@keyframes confirmSummaryModalToOrbReduced {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: brightness(1) saturate(1);
    border-radius: var(--radius-lg);
    clip-path: inset(0 round var(--radius-lg));
  }
  56% {
    opacity: 0.58;
    transform: scale(0.54) translateY(-3px);
    filter: brightness(1.12) saturate(1.08);
    border-radius: 38px;
    clip-path: inset(22% 28% round 999px);
  }
  100% {
    opacity: 0;
    transform: scale(0.18) translateY(0);
    filter: brightness(1.4) saturate(1.16) blur(1px);
    border-radius: 999px;
    clip-path: inset(44% 44% round 999px);
  }
}

@keyframes confirmGoalOrbFormReduced {
  0% {
    opacity: 0;
    transform: translate3d(var(--goal-transfer-start-x, 0), var(--goal-transfer-start-y, 0), 0) scale(0.28);
    filter: saturate(1.08) brightness(0.96) blur(6px);
  }
  44% {
    opacity: 0.84;
    transform: translate3d(var(--goal-transfer-start-x, 0), var(--goal-transfer-start-y, 0), 0) scale(0.84);
    filter: saturate(1.16) brightness(1.18) blur(1.8px);
  }
  100% {
    opacity: 1;
    transform: translate3d(var(--goal-transfer-start-x, 0), var(--goal-transfer-start-y, 0), 0) scale(1.02);
    filter: saturate(1.12) brightness(1.08) blur(0);
  }
}

@keyframes confirmGoalTransferFlightReduced {
  0% {
    opacity: 1;
    transform: translate3d(var(--goal-transfer-start-x, 0), var(--goal-transfer-start-y, 0), 0) scale(1.02);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--goal-transfer-end-x, 0), var(--goal-transfer-end-y, 0), 0) scale(0.42);
  }
}

@keyframes confirmGoalTransferReducedJourney {
  0% {
    opacity: 0;
    transform: translate3d(var(--goal-transfer-start-x, 0), var(--goal-transfer-start-y, 0), 0) scale(0.28);
    filter: saturate(1.08) brightness(0.96) blur(6px);
  }
  30% {
    opacity: 1;
    transform: translate3d(var(--goal-transfer-start-x, 0), var(--goal-transfer-start-y, 0), 0) scale(1.02);
    filter: saturate(1.12) brightness(1.08) blur(0);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--goal-transfer-end-x, 0), var(--goal-transfer-end-y, 0), 0) scale(0.42);
    filter: saturate(1.08) brightness(1) blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  :where(.confirm-page) .confirm-summary-modal-card.is-goal-transfer-shrinking,
  :where(.confirm-page) .confirm-goal-transfer-orb.is-flight-active {
    animation: none !important;
  }
}

@media (max-width: 420px) {
  :where(.confirm-page) .confirm-goal-card {
    padding: 16px 16px 14px !important;
    border-radius: 20px !important;
  }

  :where(.confirm-page) .confirm-goal-head,
  :where(.confirm-page) .confirm-goal-values {
    gap: 8px;
  }

  :where(.confirm-page) .confirm-goal-title {
    font-size: clamp(22px, 6.6vw, 26px);
  }

  :where(.confirm-page) .confirm-goal-stage {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 12px;
  }

  :where(.confirm-page) .confirm-goal-current {
    font-size: clamp(28px, 8vw, 36px);
  }

  :where(.confirm-page) .confirm-goal-target {
    font-size: clamp(18px, 5vw, 22px);
  }

  :where(.confirm-page) .confirm-goal-percent {
    min-width: 80px;
    padding: 8px 10px;
    font-size: clamp(18px, 5vw, 22px);
  }

  :where(.confirm-page) .confirm-goal-track {
    height: 24px;
  }

  :where(.confirm-page) .confirm-goal-shot {
    top: -28px;
    padding: 5px 8px;
  }

  :where(.confirm-page) .confirm-goal-meta-chip {
    min-width: 104px;
    padding: 7px 10px;
  }
}

/* Keep the report submit modal on the shared shell while isolating typography. */
:where(.report-entry-page) .report-submit-confirm-modal-card {
  --report-submit-confirm-title-size: clamp(26px, 6vw, 28px);
  --report-submit-confirm-subtitle-size: clamp(18px, 4.2vw, 20px);
  --report-submit-confirm-label-size: clamp(16px, 4.1vw, 18px);
  --report-submit-confirm-value-size: clamp(20px, 4.8vw, 22px);
  --report-submit-confirm-button-size: clamp(18px, 4.4vw, 20px);
  border: var(--line-strong) solid var(--modal-shell-border) !important;
  border-radius: var(--radius-lg);
}

:where(.report-entry-page) .report-submit-confirm-modal-title {
  margin: 0;
  font-size: var(--report-submit-confirm-title-size);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.08;
  white-space: nowrap;
}

:where(.report-entry-page) .report-submit-confirm-modal-subtitle {
  margin: 0;
  font-size: var(--report-submit-confirm-subtitle-size);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.18;
  white-space: nowrap;
}

:where(.report-entry-page) .report-submit-confirm-modal-list .k {
  font-size: var(--report-submit-confirm-label-size) !important;
  font-weight: 800;
  color: var(--text-muted) !important;
  line-height: 1.2;
  white-space: nowrap;
}

:where(.report-entry-page) .report-submit-confirm-modal-list .v {
  font-size: var(--report-submit-confirm-value-size) !important;
  font-weight: 900;
  color: var(--text-primary);
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  line-height: 1.2 !important;
}

:where(.report-entry-page) .report-submit-confirm-modal-actions {
  margin-top: var(--space-2);
}

:where(.report-entry-page) .report-submit-confirm-modal-actions .btn {
  min-height: 58px !important;
  border-radius: 10px;
  font-size: var(--report-submit-confirm-button-size) !important;
  font-weight: 900;
}

:where(.detail-page) .main .section {
  display: grid;
  gap: var(--space-2);
}

:where(.detail-page) .line {
  align-items: flex-start;
}

:where(.detail-page) .v {
  white-space: nowrap;
}

:where(.detail-page) .v .value-number.emphasis {
  font-size: calc(var(--font-2xl) + 8px);
  line-height: 1;
}

:where(.report-entry-page) .confirm-modal-card,
:where(.report-entry-page) .result-modal-card {
  border: var(--line-strong) solid var(--modal-shell-border);
  border-radius: var(--radius-md);
  box-shadow: var(--modal-shell-shadow);
}

:where(.report-entry-page) .confirm-modal-title {
  font-size: var(--font-3xl);
}

:where(.report-entry-page) .confirm-modal-item {
  grid-template-columns: 118px 1fr;
  font-size: var(--font-lg);
  padding-bottom: 6px;
}

:where(.report-entry-page) .confirm-modal-actions {
  gap: var(--space-2);
}

:where(.report-entry-page) .result-modal-message {
  font-size: var(--font-3xl);
}
