/* 橋口電工 現場日報 PWA design foundation.
 *
 * Load after style.css/shared-v15.css and before the v1.5.3 page modules.
 * This is the only global PWA theme: warm paper, opaque surfaces, readable
 * navy copy and accessible coral actions. Page modules own layout only;
 * pwa-operations-v158.css is reserved for neutral browser/function fixes. */
:root {
  --hd-paper: #fbf8f3;
  --hd-paper-strong: #fffdf9;
  --hd-paper-muted: #f5f1e9;
  --hd-navy: #0d315c;
  --hd-navy-soft: #49617b;
  --hd-coral: #b9492f;
  --hd-coral-hover: #a83f28;
  --hd-coral-soft: #faece7;
  --hd-blue: #2f8de1;
  --hd-green: #4f927d;
  --hd-border: #dedbd5;
  --hd-shadow: 0 7px 20px rgb(31 45 59 / 8%);
  --hd-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --hd-serif: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Noto Serif JP", "Noto Serif CJK JP", serif;
  --hd-safe-bottom: env(safe-area-inset-bottom, 0px);
}

html { background: var(--hd-paper); }

.auth-view {
  --bg: var(--hd-paper);
  --surface: var(--hd-paper-strong);
  --surface-2: var(--hd-paper-muted);
  --ink: var(--hd-navy);
  --sub: var(--hd-navy-soft);
  --line: var(--hd-border);
  --brand: var(--hd-navy);
  --accent: var(--hd-coral);
  --accent-soft: var(--hd-coral-soft);
  --success: #14543d;
  --success-soft: #e4f2e9;
  --amber: #694000;
  --amber-soft: #fff0d2;
  --danger: #842f2f;
  --danger-soft: #fde9e6;
  background: var(--hd-paper);
  color: var(--hd-navy);
  color-scheme: light;
  font-family: var(--hd-sans);
}

.auth-view button,
.auth-view input { font-family: var(--hd-sans); }

body:has(.app-view:not([hidden])) {
  background: var(--hd-paper);
  color: var(--hd-navy);
}

.app-view,
.app-view button,
.app-view input,
.app-view select,
.app-view textarea,
.app-view .bottom-nav,
.app-view .status-label,
.app-view .badge,
.app-view .chip,
.pwa-secondary-layer,
.pwa-secondary-layer button,
.pwa-secondary-layer input,
.pwa-secondary-layer select,
.pwa-secondary-layer textarea {
  font-family: var(--hd-sans);
}

.app-view {
  /*
   * Map both legacy and v1.5 page variables to one palette.  The old global
   * design sheet is deliberately not loaded, so these values are also the
   * stable contract used by home/fixed/foreman page modules.
   */
  --pwa-canvas: var(--hd-paper);
  --pwa-surface: var(--hd-paper-strong);
  --pwa-surface-muted: var(--hd-paper-muted);
  --pwa-navy: var(--hd-navy);
  --pwa-navy-soft: var(--hd-navy-soft);
  --pwa-ink: var(--hd-navy);
  --pwa-muted: #667483;
  --pwa-border: var(--hd-border);
  --pwa-coral: var(--hd-coral);
  --pwa-coral-deep: var(--hd-coral);
  --pwa-coral-soft: var(--hd-coral-soft);
  --pwa-font-mincho: var(--hd-sans);
  --pwa-sage: #5f8d75;
  --pwa-sage-soft: #e8f1eb;
  --pwa-danger: #a94a42;
  --pwa-danger-soft: #f9e8e5;
  --pwa-shadow-soft: var(--hd-shadow);
  --pwa-shadow-card: 0 4px 16px rgb(31 45 59 / 7%);
  /* style.css legacy tokens */
  --bg: var(--hd-paper);
  --surface: var(--hd-paper-strong);
  --surface-2: var(--hd-paper-muted);
  --brand: var(--hd-navy);
  --ink: var(--hd-navy);
  --sub: #667483;
  --line: var(--hd-border);
  --accent: #1766a6;
  --accent-soft: #eaf4fe;
  --success: #14543d;
  --success-soft: #e4f2e9;
  --amber: #694000;
  --amber-soft: #fff0d2;
  --warning: #694000;
  --danger: #842f2f;
  --danger-soft: #fde9e6;
  /* shared-v15.css tokens */
  --v15-navy: var(--hd-navy);
  --v15-text: var(--hd-navy);
  --v15-sub: #667483;
  --v15-line: var(--hd-border);
  --v15-card: var(--hd-paper-strong);
  --v15-blue: #1766a6;
  --v15-teal: #2f7258;
  min-height: 100dvh;
  color: var(--hd-navy);
  background:
    radial-gradient(circle at 12% 4%, rgb(255 255 255 / 92%), transparent 28rem),
    var(--hd-paper);
  padding-bottom: calc(82px + var(--hd-safe-bottom));
  color-scheme: light;
}

.pwa-secondary-layer,
.pwa-confirm-layer,
.v15-modal {
  --success: #14543d;
  --success-soft: #e4f2e9;
  --amber: #694000;
  --amber-soft: #fff0d2;
  --danger: #842f2f;
  --danger-soft: #fde9e6;
}

:is(.app-view, .pwa-secondary-layer, .pwa-confirm-layer, .v15-modal) :is(.pill, .badge, .chip) {
  -webkit-text-fill-color: currentColor;
  opacity: 1;
}

/* Semantic state colours are intentionally explicit.  iOS dark appearance
 * still evaluates :root media queries even though the PWA itself is a light
 * warm-paper design; keeping both foreground and background here prevents a
 * dark token from leaking into a light card.  -webkit-text-fill-color is
 * required because WebKit otherwise inherits it from attendance cards. */
:is(.app-view, .pwa-secondary-layer, .pwa-confirm-layer, .v15-modal) .status-label {
  border: 1px solid transparent;
  color: #384b5e;
  -webkit-text-fill-color: #384b5e;
  background: #edf0f2;
  opacity: 1;
}

:is(.app-view, .pwa-secondary-layer, .pwa-confirm-layer, .v15-modal) .status-label.approved,
:is(.app-view, .pwa-secondary-layer, .pwa-confirm-layer, .v15-modal) .status-label.complete,
:is(.app-view, .pwa-secondary-layer, .pwa-confirm-layer, .v15-modal) .status-label.left {
  border-color: #bad8c8;
  color: #14543d;
  -webkit-text-fill-color: #14543d;
  background: #e4f2e9;
}

:is(.app-view, .pwa-secondary-layer, .pwa-confirm-layer, .v15-modal) .status-label.working,
:is(.app-view, .pwa-secondary-layer, .pwa-confirm-layer, .v15-modal) .status-label.info {
  border-color: #bdd7ed;
  color: #0b4f82;
  -webkit-text-fill-color: #0b4f82;
  background: #e5f1fb;
}

:is(.app-view, .pwa-secondary-layer, .pwa-confirm-layer, .v15-modal) .status-label.pending,
:is(.app-view, .pwa-secondary-layer, .pwa-confirm-layer, .v15-modal) .status-label.missing_out,
:is(.app-view, .pwa-secondary-layer, .pwa-confirm-layer, .v15-modal) .status-label.unworked_review {
  border-color: #e7ca8c;
  color: #694000;
  -webkit-text-fill-color: #694000;
  background: #fff0d2;
}

:is(.app-view, .pwa-secondary-layer, .pwa-confirm-layer, .v15-modal) .status-label.rejected,
:is(.app-view, .pwa-secondary-layer, .pwa-confirm-layer, .v15-modal) .status-label.returned,
:is(.app-view, .pwa-secondary-layer, .pwa-confirm-layer, .v15-modal) .status-label.absence {
  border-color: #e6bab5;
  color: #842f2f;
  -webkit-text-fill-color: #842f2f;
  background: #fde9e6;
}

:is(.app-view, .pwa-secondary-layer, .pwa-confirm-layer, .v15-modal) .status-label.holiday_work,
:is(.app-view, .pwa-secondary-layer, .pwa-confirm-layer, .v15-modal) .status-label.company_holiday,
:is(.app-view, .pwa-secondary-layer, .pwa-confirm-layer, .v15-modal) .status-label.site_holiday {
  border-color: #e3c5a6;
  color: #6f3f18;
  -webkit-text-fill-color: #6f3f18;
  background: #faeddc;
}

:is(.app-view, .pwa-secondary-layer, .pwa-confirm-layer, .v15-modal) .status-label.cancelled,
:is(.app-view, .pwa-secondary-layer, .pwa-confirm-layer, .v15-modal) .status-label.not_entered {
  border-color: #cfd6dc;
  color: #384b5e;
  -webkit-text-fill-color: #384b5e;
  background: #edf0f2;
}

/* Body copy and controls stay in the compact system sans. A restrained serif
 * is reserved for brand marks, the large clock and true display headings. */
.app-view.app-view #pwa-home-v153,
.app-view.app-view #pwa-home-v153 button,
.app-view.app-view #pwa-home-brand-v153 button,
body[data-pwa-fixed-page] .app-view .tab-panel {
  font-family: var(--hd-sans);
}

.app-view .brand h1,
.app-view .brand small,
.app-view .app-header > div > h1,
.app-view .hp153-brand-copy,
.app-view .hp153-clock,
.app-view .hp153-site,
.app-view .v153-brand-line > span:nth-child(2),
.app-view .v153-title-line h1,
.app-view .pwa-photo-content h2,
.pwa-secondary-header h1 {
  font-family: var(--hd-serif);
}

.app-view button,
.app-view a,
.app-view input,
.app-view select,
.app-view textarea,
.app-view summary { -webkit-tap-highlight-color: transparent; }

.app-view button,
.app-view a,
.app-view summary {
  touch-action: manipulation;
}

.app-view button,
.app-view a[role="button"] { min-height: 44px; }

.app-view input,
.app-view select,
.app-view textarea {
  color: var(--hd-navy);
  background: var(--hd-paper-strong);
  border-color: var(--hd-border);
  color-scheme: light;
}

.app-view input::placeholder,
.app-view textarea::placeholder { color: #7d8896; opacity: 1; }

.app-view .card,
.app-view .list-card,
.app-view .timeline-card,
.app-view .mini-card,
.app-view .summary-card {
  color: var(--hd-navy);
  background: var(--hd-paper-strong);
  border-color: var(--hd-border);
  box-shadow: var(--hd-shadow);
}

.app-view .btn-primary,
.app-view .btn-out {
  color: #fff;
  -webkit-text-fill-color: #fff;
  background: linear-gradient(135deg, #b84e35, var(--hd-coral-hover));
  border-color: transparent;
}

/* Page modules may provide their own decorative coral. Interactive actions
 * use the darker brand coral so white labels remain WCAG AA (>= 5.02:1). */
.app-view.app-view .hp153-punch,
.app-view.app-view .work-sheet-card .sheet-actions .btn-primary,
.app-view.app-view .work-sheet-card .sheet-actions .btn-out,
.app-view.app-view #site-wizard .btn-primary,
.app-view.app-view #site-wizard .map-toolbar button.is-active,
.v15-modal-card.v15-modal-card .btn-primary,
.pwa-secondary-layer .pwa-page-primary.btn-primary {
  border-color: transparent !important;
  background: linear-gradient(135deg, #b84e35, var(--hd-coral-hover)) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.app-view .btn-secondary {
  color: var(--hd-navy);
  background: var(--hd-paper-strong);
  border-color: var(--hd-border);
}

.app-view .text-button,
.app-view .inline-action { color: var(--hd-navy); }

.app-view .bottom-nav {
  position: fixed;
  z-index: 70;
  inset: auto 0 0;
  transform: none;
  width: 100%;
  max-width: none;
  min-height: calc(78px + var(--hd-safe-bottom));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  gap: 0;
  padding: 7px max(8px, env(safe-area-inset-right, 0px)) var(--hd-safe-bottom) max(8px, env(safe-area-inset-left, 0px));
  border: 0;
  border-top: 1px solid #dedbd6;
  border-radius: 0;
  background: #fffdf9;
  box-shadow: 0 -4px 18px rgb(25 45 66 / 6%);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  contain: layout paint style;
  isolation: isolate;
  pointer-events: auto;
}

.app-view .bottom-nav button {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 64px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 5px 2px;
  border: 0;
  border-radius: 0;
  color: #677483;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  pointer-events: auto;
  touch-action: manipulation;
}

.app-view .bottom-nav svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.app-view .bottom-nav button[aria-selected="true"] {
  color: var(--hd-coral);
  background: transparent;
}

.app-view .bottom-nav button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 30px;
  height: 3px;
  border-radius: 999px;
  background: var(--hd-coral);
  transform: translateX(-50%);
}

.app-view .bottom-nav #nav-punch {
  color: #677483;
}

.app-view .bottom-nav #nav-punch[aria-selected="true"] {
  color: var(--hd-coral);
}

.app-view .bottom-nav #nav-punch::before { content: none; }
.app-view .bottom-nav #nav-punch svg {
  width: 25px;
  height: 25px;
  stroke: currentColor;
}
.app-view .bottom-nav #nav-punch span {
  display: inline;
  color: currentColor;
}

/* The legacy global button rule is more specific than the home punch button.
 * Keep the approved coral control white instead of inheriting navy text. */
.app-view .hp153-punch,
.app-view .hp153-punch b,
.app-view .hp153-punch span,
.app-view .hp153-punch svg {
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.app-view .sheet,
.pwa-confirm-layer,
.v15-modal { color-scheme: light; }

.app-view .sheet {
  max-width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgb(17 35 49 / 66%);
  padding-bottom: var(--hd-safe-bottom);
}

.app-view .sheet-card,
.pwa-confirm-card,
.v15-modal-card {
  color: var(--hd-navy);
  background: var(--hd-paper-strong);
}

.app-view .sheet-card {
  max-height: min(88dvh, 760px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-color: var(--hd-border);
  -webkit-overflow-scrolling: touch;
}

.app-view .sheet-actions {
  position: sticky;
  bottom: 0;
  background: var(--hd-paper-strong);
}

.pwa-confirm-layer,
.v15-modal {
  background: rgb(17 35 49 / 66%);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.pwa-confirm-layer[hidden],
.app-view .sheet[hidden],
.v15-modal[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* The product uses the warm-paper presentation even when iOS itself is in
 * dark mode. Neutralize the remaining hard-coded legacy dark surfaces so a
 * navy card can never sit behind navy text. */
@media (prefers-color-scheme: dark) and (prefers-color-scheme: light) {
  .app-view {
    color-scheme: light;
  }

  .app-view .status-card,
  .app-view .bottom-nav,
  .app-view #tab-history .segments {
    border-color: var(--hd-border);
    background: var(--hd-paper-strong);
    color: var(--hd-navy);
  }

  .app-view .time-grid div {
    border-color: var(--hd-border);
    background: #f5f1e9;
  }

  .app-view .day-guidance {
    border-color: #c8d9df;
    background: #eef5f6;
    color: #285f6c;
  }

  .app-view .day-guidance.holiday {
    border-color: #ead5b6;
    background: #fff4df;
    color: #79561e;
  }

  .app-view .sheet-actions {
    background: linear-gradient(180deg, transparent, var(--hd-paper-strong) 18%);
  }

  .v15-modal-card,
  .v15-modal-card .list-card {
    color-scheme: light;
    border-color: var(--hd-border);
    background: var(--hd-paper-strong);
    color: var(--hd-navy);
  }

  .v15-modal-head h2,
  .v15-modal-card .v15-field > span {
    color: var(--hd-navy);
  }

  .v15-modal-head button,
  .v15-modal-card .btn-secondary {
    border-color: var(--hd-border);
    background: var(--hd-paper-strong);
    color: var(--hd-navy);
  }

  .v15-modal-card .v15-field input,
  .v15-modal-card .v15-field select,
  .v15-modal-card .v15-field textarea {
    color-scheme: light;
    border-color: var(--hd-border);
    background: var(--hd-paper-strong);
    color: var(--hd-navy);
    -webkit-text-fill-color: var(--hd-navy);
  }
}

/* Reusable photo primitives used by the experience bridge. Page-specific
 * v1.5.3 modules may refine their dimensions, but not their colour contract. */
.app-view .pwa-photo,
.app-view .pwa-photo-hero,
.app-view .pwa-photo-home,
.app-view .pwa-photo-history,
.app-view .pwa-photo-sites,
.app-view .pwa-photo-notifications {
  position: relative;
  isolation: isolate;
  min-height: 156px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 65%);
  border-radius: 24px;
  background-color: #d8d3c7;
  background-image:
    linear-gradient(180deg, rgb(18 40 57 / 4%), rgb(18 40 57 / 56%)),
    var(--pwa-photo-url, linear-gradient(135deg, #d8d3c7, #9caeaa));
  background-position: center;
  background-size: cover;
  color: #fff;
  box-shadow: var(--hd-shadow);
}

.app-view .pwa-photo-content {
  position: absolute;
  z-index: 1;
  right: 18px;
  bottom: 17px;
  left: 18px;
  padding: 10px 12px;
  border: 1px solid rgb(255 255 255 / 86%);
  border-radius: 14px;
  background: #fffdf9;
  color: var(--hd-navy);
  box-shadow: 0 6px 18px rgb(13 49 92 / 14%);
}

.app-view .pwa-photo-content h2,
.app-view .pwa-photo-content p { color: var(--hd-navy); }

.app-view .pwa-photo-toolbar {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
}

.app-view .pwa-photo-change {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgb(255 255 255 / 72%);
  border-radius: 999px;
  background: #183550;
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.app-view .pwa-site-card-image {
  width: calc(100% + 34px);
  height: 128px;
  margin: -17px -17px 14px;
  border-radius: 20px 20px 0 0;
  background: #d8d3c7 var(--pwa-photo-url, linear-gradient(135deg, #d8d3c7, #9caeaa)) center / cover no-repeat;
}

.app-view .pwa-site-photo-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.app-view .pwa-site-photo-controls .pwa-site-photo-edit {
  position: static;
  min-height: 44px;
  padding: 8px 13px;
}

.app-view .pwa-site-photo-controls small,
.app-view .pwa-site-photo-message {
  color: var(--hd-navy-soft);
  font-size: 11px;
}

/* Independent menu/profile/help pages live outside .app-view, so their shell
 * is provided here now that the competing v1.5.2 global theme is not loaded. */
html.pwa-secondary-open,
body.pwa-secondary-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.pwa-secondary-layer {
  position: fixed;
  z-index: 80;
  inset: 0;
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--hd-paper);
  color: var(--hd-navy);
  color-scheme: light;
  -webkit-overflow-scrolling: touch;
}

.pwa-secondary-layer[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.pwa-secondary-header {
  position: sticky;
  z-index: 3;
  top: 0;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 10px;
  min-height: calc(72px + env(safe-area-inset-top));
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  border-bottom: 1px solid var(--hd-border);
  background: var(--hd-paper);
}

.pwa-secondary-back {
  width: 46px;
  height: 46px;
  border: 1px solid var(--hd-border);
  border-radius: 50%;
  background: var(--hd-paper-strong);
  color: var(--hd-navy);
  font-size: 28px;
}

.pwa-secondary-header div { min-width: 0; text-align: center; }
.pwa-secondary-header small { display: block; color: var(--hd-coral); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.pwa-secondary-header h1 { margin: 2px 0 0; color: var(--hd-navy); font-size: 20px; line-height: 1.2; }

.pwa-secondary-content {
  width: min(100%, 560px);
  min-height: calc(100dvh - 72px - env(safe-area-inset-top));
  margin: 0 auto;
  padding: 18px 17px calc(32px + env(safe-area-inset-bottom));
}

.pwa-menu-hero,
.pwa-profile-card,
.pwa-version-hero,
.pwa-punch-detail-hero,
.pwa-contact-card,
.pwa-detail-list,
.pwa-faq-list details,
.pwa-menu-list,
.pwa-menu-card {
  border: 1px solid var(--hd-border);
  background: var(--hd-paper-strong);
  color: var(--hd-navy);
  box-shadow: var(--hd-shadow);
}

.pwa-menu-hero,
.pwa-profile-card,
.pwa-version-hero,
.pwa-punch-detail-hero,
.pwa-contact-card { border-radius: 22px; }

.pwa-menu-hero {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 17px;
}

.pwa-menu-avatar,
.pwa-profile-avatar {
  display: grid;
  border-radius: 50%;
  background: linear-gradient(135deg, #b84e35, var(--hd-coral-hover));
  color: #fff;
  font-weight: 800;
  place-items: center;
}

.pwa-menu-avatar { width: 58px; height: 58px; font-size: 22px; }
.pwa-menu-hero small { color: var(--hd-navy-soft); font-size: 11px; }
.pwa-menu-hero h2 { margin: 2px 0 0; color: var(--hd-navy); font-size: 19px; }
.pwa-menu-hero button { min-height: 44px; border: 0; background: transparent; color: var(--hd-coral); font-weight: 800; }

.pwa-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.pwa-menu-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 16px;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 9px;
  min-height: 84px;
  padding: 13px;
  border-radius: 18px;
  text-align: left;
  text-decoration: none;
}

.pwa-menu-card > span {
  grid-row: 1 / 3;
  display: grid;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--hd-coral-soft);
  color: var(--hd-coral);
  font-weight: 800;
  place-items: center;
}

.pwa-menu-card b { align-self: end; color: var(--hd-navy); font-size: 14px; }
.pwa-menu-card small { align-self: start; overflow: hidden; color: var(--hd-navy-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pwa-menu-card i { grid-column: 3; grid-row: 1 / 3; color: #768392; font-size: 21px; font-style: normal; }

.pwa-menu-list,
.pwa-detail-list {
  overflow: hidden;
  margin-top: 14px;
  border-radius: 20px;
}

.pwa-menu-list > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 11px 15px;
  border: 0;
  border-bottom: 1px solid #eee9df;
  background: transparent;
  color: var(--hd-navy);
  text-align: left;
}

.pwa-menu-list > button:last-child { border-bottom: 0; }
.pwa-menu-list > button.is-danger { color: #9e3e37; }
.pwa-menu-list b,
.pwa-menu-list small { display: block; }
.pwa-menu-list small { margin-top: 3px; color: var(--hd-navy-soft); font-size: 10px; }
.pwa-menu-list i { color: #768392; font-style: normal; }

.pwa-page-intro,
.pwa-page-note { color: var(--hd-navy-soft); font-size: 13px; line-height: 1.7; }
.pwa-page-note { margin: 14px 3px; }

.pwa-profile-card { padding: 24px 18px; text-align: center; }
.pwa-profile-avatar { width: 74px; height: 74px; margin: 0 auto 12px; font-size: 27px; }
.pwa-profile-card h2 { margin: 0; color: var(--hd-navy); }
.pwa-profile-card > span { display: inline-block; margin-top: 8px; padding: 5px 10px; border-radius: 999px; background: var(--hd-coral-soft); color: #a93424; font-size: 11px; font-weight: 800; }

.pwa-detail-list > div { display: grid; grid-template-columns: 38% minmax(0, 1fr); gap: 12px; padding: 14px 16px; border-bottom: 1px solid #eee9df; }
.pwa-detail-list > div:last-child { border-bottom: 0; }
.pwa-detail-list dt { color: var(--hd-navy-soft); }
.pwa-detail-list dd { margin: 0; color: var(--hd-navy); text-align: right; overflow-wrap: anywhere; }

.pwa-faq-list { display: grid; gap: 9px; }
.pwa-faq-list details { border-radius: 16px; }
.pwa-faq-list summary { min-height: 52px; padding: 15px; color: var(--hd-navy); font-weight: 800; cursor: pointer; }
.pwa-faq-list p { margin: 0; padding: 0 15px 16px; color: var(--hd-navy-soft); line-height: 1.75; }

.pwa-page-primary { width: 100%; min-height: 52px; margin-top: 15px; }
.pwa-contact-card { padding: 22px; text-align: center; }
.pwa-contact-card > span { display: grid; width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; background: var(--hd-coral-soft); color: var(--hd-coral); font-size: 25px; font-weight: 800; place-items: center; }
.pwa-contact-card h2 { margin: 0; color: var(--hd-navy); }
.pwa-contact-card p { color: var(--hd-navy-soft); line-height: 1.75; }

.pwa-version-hero,
.pwa-punch-detail-hero { padding: 24px 18px; text-align: center; }
.pwa-version-hero small,
.pwa-punch-detail-hero small { color: var(--hd-coral); font-weight: 800; letter-spacing: .1em; }
.pwa-version-hero h2,
.pwa-punch-detail-hero h2 { margin: 5px 0 8px; color: var(--hd-navy); }
.pwa-version-hero .brand-mark { display: block; width: 68px; height: 68px; margin: 0 auto 12px; background: url('/icons/icon-192.png') center / cover no-repeat; }

.pwa-time-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 14px 0; }
.pwa-time-pair > div { padding: 16px; border: 1px solid var(--hd-border); border-radius: 18px; background: var(--hd-paper-strong); text-align: center; }
.pwa-time-pair small,
.pwa-time-pair b { display: block; }
.pwa-time-pair small { color: var(--hd-navy-soft); }
.pwa-time-pair b { margin-top: 3px; color: var(--hd-navy); font-size: 24px; }

.pwa-confirm-layer {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
}

.pwa-confirm-card {
  width: min(100%, 420px);
  padding: 25px;
  border: 1px solid var(--hd-border);
  border-radius: 24px;
  text-align: center;
  box-shadow: 0 20px 55px rgb(0 0 0 / 24%);
}

.pwa-confirm-icon { display: grid; width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 50%; background: #eaf0f4; color: var(--hd-navy); font-size: 26px; place-items: center; }
.pwa-confirm-card h2 { margin: 0; color: var(--hd-navy); }
.pwa-confirm-card p { color: var(--hd-navy-soft); line-height: 1.7; }
.pwa-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.pwa-confirm-actions .btn { min-height: 52px; }

.v15-modal-card {
  color-scheme: light;
  border-color: var(--hd-border);
  background: var(--hd-paper-strong);
}

.v15-modal-head h2,
.v15-modal-card .v15-field > span { color: var(--hd-navy); }
.v15-modal-head button,
.v15-modal-card .btn-secondary { border-color: var(--hd-border); background: var(--hd-paper-muted); color: var(--hd-navy); }

@media (min-width: 700px) {
  .app-view .bottom-nav {
    left: 50%;
    width: min(100%, 680px);
    transform: translateX(-50%);
    border-right: 1px solid var(--hd-border);
    border-left: 1px solid var(--hd-border);
  }
}

@media (prefers-contrast: more) {
  .app-view,
  .pwa-secondary-layer {
    --pwa-border: #8a9196;
    --pwa-muted: #485b69;
  }
}

@supports not (height: 100dvh) {
  .app-view,
  .app-view .sheet,
  .pwa-secondary-layer { min-height: -webkit-fill-available; }
}
