:root {
  --bg: #eefaf8;
  --card: #ffffff;
  --line: #d5ebea;
  --main: #116b70;
  --main-dark: #0c5357;
  --text: #1d2a34;
  --danger: #d65757;
  --danger-soft: #fde8e8;
  --ok-soft: #e6f7ee;
  --info-soft: #e7f0ff;
  --select-soft: #fff8dc;
  --radius: 16px;
  --vehicle-own-damage-box-height-pdf: 35px;
  --vehicle-own-damage-box-height-editor: var(--vehicle-own-damage-box-height-pdf);
  --vehicle-own-damage-editor-width: 100mm;
  --vehicle-own-damage-editor-height: 200px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #edf9f7 0%, #f4fbff 100%);
  font-family: "UD Digi Kyokasho NP-R", "BIZ UDPGothic", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

h1,h2,h3,h4 { margin: 0 0 10px; line-height: 1.35; }
p { margin: 0 0 10px; }

.app-shell { max-width: 1280px; margin: 0 auto; padding: 12px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 4px 18px rgba(17, 107, 112, 0.06);
}

.header {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
}
.header-main {
  min-width: 0;
  flex: 1 1 auto;
}
.title-main {
  margin: 0;
  color: var(--main);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.18;
}
.meta-text { font-size: 0.92rem; color: #4a5b6a; }
.support-code-line {
  margin-top: 14px;
  margin-bottom: 0;
  font-size: 0.8rem;
  color: #738392;
  letter-spacing: 0.01em;
}
.header-login-user-badge {
  margin-left: 0;
  border: 1px solid #cbddea;
  background: #f4f9ff;
  color: #2a4f69;
  font-size: 0.86rem;
  font-weight: 700;
}
.header-meta-stack {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}
.header-org-line {
  margin: 0;
}
.header-org-value {
  font-weight: 700;
  color: #274c5f;
}
.header-org-line.is-pending {
  color: #6f8290;
}
.header-org-value.is-unset {
  font-weight: 500;
  color: #7b8d9b;
}
.header-user-context-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.header-login-summary-line,
.header-active-context-line {
  margin: 0;
}
.header-login-summary-line {
  color: #304d5f;
  font-weight: 600;
  line-height: 1.4;
}
.header-active-context-line {
  color: #2d5b37;
}
.header-active-context-label {
  color: #3d6771;
}
.header-active-context-value {
  font-weight: 700;
}
.header-active-context-status {
  color: #3e6c46;
}
.header-login-user-name,
.header-login-user-meta {
  white-space: nowrap;
}
.header-login-user-meta {
  color: #4a6473;
  margin-left: 4px;
  font-weight: 600;
}
.header-active-context-badge {
  border: 1px solid #cfe6d6;
  background: #f5fcf7;
  color: #2d5b37;
}

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

.header-side-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  min-width: 196px;
  min-height: 0;
  align-self: stretch;
  position: relative;
  margin-left: auto;
}
.header-side-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
}
.header-side-bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  width: 100%;
  margin-top: auto;
  gap: 4px;
}
.header-last-updated {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.2;
  color: #6b808c;
  white-space: nowrap;
}
.header-actions-row {
  justify-content: flex-end;
  gap: 8px;
}
.header-actions-row button {
  padding: 9px 13px;
  font-size: 0.92rem;
  border-radius: 12px;
}
.header-action-btn {
  min-height: 44px;
}
.header-action-btn-refresh {
  min-width: 96px;
  min-height: 40px;
  padding: 7px 11px;
  font-size: 0.86rem;
  font-weight: 700;
  border-color: #9fc0cc;
  background: #f7fbfd;
  box-shadow: 0 1px 0 rgba(29, 92, 112, 0.1);
}
.header-action-btn-refresh:hover {
  border-color: #7ea7b6;
  background: #edf5f9;
}
.header-guide-btn {
  min-width: 0;
}
.header-mobile-actions-menu {
  display: block;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  position: relative;
}
.header-mobile-actions-menu > summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  min-width: 86px;
  padding: 0 13px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #3f6674;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #c8d8df;
  border-radius: 12px;
  background: #fbfdfe;
  box-shadow: 0 1px 0 rgba(56, 93, 108, 0.08);
}
.header-mobile-actions-menu > summary::-webkit-details-marker {
  display: none;
}
.header-mobile-actions-menu[open] > summary {
  background: #f0f6f9;
  border-color: #abc4cf;
  box-shadow: 0 0 0 2px rgba(65, 118, 140, 0.1);
}
.header-mobile-actions-label {
  white-space: nowrap;
}
.header-mobile-actions-caption {
  display: none;
}
.header-actions-row-mobile-menu {
  margin-top: 0;
  padding: 9px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 244px;
  border: 1px solid #cfe0e7;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 26px rgba(28, 64, 81, 0.16);
  z-index: 80;
}
.header-menu-context-line {
  margin: 0;
  padding: 2px 2px 4px;
  color: #6a7f8b;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.3;
}
.header-menu-context-value {
  color: #486674;
  font-weight: 600;
}
.header-actions-row-mobile-menu .header-action-btn {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 10px;
  border-color: #d2e1e7;
  color: #456773;
  background: #ffffff;
  text-align: left;
}
.header-actions-row-mobile-menu .header-action-btn i {
  margin-right: 7px;
  color: #547281;
}
.header-actions-row-mobile-menu .header-action-btn-context {
  border-color: #c5dce4;
  background: #f6fbfd;
  color: #2f6271;
}
.header-actions-row-mobile-menu .header-action-btn-secondary {
  opacity: 0.98;
  font-weight: 700;
}
.header-actions-row-mobile-menu .header-action-btn-admin {
  border-color: #cedbe1;
  color: #49626f;
  background: #f9fcfd;
}
.header-actions-row-mobile-menu .header-action-btn-logout.header-action-btn {
  border-color: #e2c8cf;
  color: #864c58;
  background: #fff6f8;
}
.header-actions-row-mobile-menu .btn-soft-danger.header-action-btn {
  border-color: #e2c8cf;
  color: #864c58;
  background: #fff6f8;
}
.header-menu-refresh-mobile {
  display: none;
}

.nav-group-wrap {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}
.nav-top-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.nav-top-row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.nav-top-row-auto {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.nav-top-level-tabs {
  padding: 4px;
  border: 1px solid #d6e6eb;
  border-radius: 12px;
  background: #f7fbfd;
}
.nav-subsection-label {
  font-size: 0.76rem;
  color: #5b7380;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-top: 2px;
  margin-bottom: 1px;
  padding-left: 2px;
}
.nav-subsection-label.is-muted {
  color: #7b8e98;
}
.nav-pairs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.nav-pairs.is-muted-context {
  opacity: 0.84;
}
.nav-group-block {
  border: 1px solid #d5e9e8;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfefe 0%, #f6fcfc 100%);
  padding: 8px;
}
.nav-group-label {
  font-size: 0.8rem;
  color: #2f5f65;
  font-weight: 800;
  margin-bottom: 6px;
}
.nav-group-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.nav-group-wrap button,
.nav-group-wrap .btn {
  padding: 10px 12px;
  font-size: 0.93rem;
  border-radius: 12px;
}
.nav-btn {
  white-space: nowrap;
  min-height: 46px;
  border-width: 1.5px;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.nav-btn-top-level {
  min-height: 44px;
  font-weight: 700;
}
.nav-btn-sub-level {
  min-height: 46px;
}
.nav-btn-tab,
.nav-btn-primary,
.nav-btn-secondary,
.nav-btn-tertiary {
  border-color: #82aebd;
  background: #ffffff;
  color: #1f6171;
  box-shadow: 0 1px 0 rgba(21, 83, 104, 0.08);
}
.nav-btn-tab:hover,
.nav-btn-primary:hover,
.nav-btn-secondary:hover,
.nav-btn-tertiary:hover {
  background: #f3f9fc;
  border-color: #5e97a7;
  transform: translateY(-1px);
}

button, .btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 11px 14px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--main-dark);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
button:hover,
.btn:hover {
  transform: translateY(-1px);
}
button:active,
.btn:active {
  transform: translateY(0);
}
button:focus-visible,
.btn:focus-visible,
.header-mobile-actions-menu > summary:focus-visible,
.nav-btn:focus-visible {
  outline: 2px solid #2d89be;
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-main {
  background: linear-gradient(180deg, #178087 0%, #116b70 100%);
  color: #fff;
  border-color: #116b70;
  box-shadow: 0 4px 11px rgba(17, 107, 112, 0.2);
}
.btn-main:hover {
  background: linear-gradient(180deg, #13787d 0%, #0f5f64 100%);
  border-color: #0f5f64;
  box-shadow: 0 6px 14px rgba(16, 97, 102, 0.24);
}
.btn-outline-main {
  border-color: #7caab7;
  color: #1f6171;
  background: #f6fcfd;
  box-shadow: 0 1px 0 rgba(19, 90, 108, 0.08);
}
.btn-outline-main:hover {
  border-color: #5e97a7;
  background: #edf7fa;
}
.btn-ai-polish {
  border: 1.5px solid transparent;
  color: #0f2954;
  background:
    linear-gradient(180deg, #fbfdff 0%, #f0f7ff 100%) padding-box,
    linear-gradient(125deg, #7dd3fc 0%, #a78bfa 30%, #f472b6 58%, #f59e0b 78%, #34d399 100%) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 3px 10px rgba(88, 115, 187, 0.2);
}
.btn-ai-polish:hover {
  border-color: transparent;
  color: #0c2550;
  background:
    linear-gradient(180deg, #ffffff 0%, #edf5ff 100%) padding-box,
    linear-gradient(130deg, #67d4ff 0%, #9c8fff 28%, #ee6eb1 55%, #f6a61b 76%, #30d3a2 100%) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 6px 14px rgba(90, 114, 176, 0.24);
}
.btn-ai-polish:focus-visible {
  outline: 2px solid #2d89be;
  outline-offset: 2px;
  box-shadow:
    0 0 0 4px rgba(95, 142, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 5px 14px rgba(85, 111, 176, 0.24);
}
.btn-ai-polish:disabled,
.btn-ai-polish[aria-disabled='true'] {
  color: #5f6f89;
  border-color: #b5c8de;
  background:
    linear-gradient(180deg, #f6f9fc 0%, #ecf1f6 100%) padding-box,
    linear-gradient(125deg, #cad7e6 0%, #d4cde3 50%, #d9d3c6 100%) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}
.btn-danger { background: #b64343; border-color: #b64343; color: #fff; }
.btn-soft-danger { background: #fff2f4; border-color: #efc8d0; color: #8a3f50; }
.btn-soft-ok { background: var(--ok-soft); border-color: #bfe7ce; color: #1f6a3f; }
.btn-soft-info { background: #eef4ff; border-color: #c8dcff; color: #29589d; }

.active-nav {
  font-weight: 800;
}
.nav-btn.active-nav {
  border-color: #0f6266;
  background: linear-gradient(180deg, #168289 0%, #0f6266 100%);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(16, 97, 102, 0.24);
}
.nav-btn.active-nav:hover {
  border-color: #0c5357;
  background: linear-gradient(180deg, #13787d 0%, #0c5357 100%);
}
.nav-btn:not(.active-nav)[aria-current='false'] {
  opacity: 1;
}

main { margin-top: 12px; }

.route-back-control-wrap {
  margin: 0 0 10px;
}
.route-back-control-btn {
  width: 100%;
  min-height: 46px;
}
@media (min-width: 768px) {
  .route-back-control-btn {
    width: auto;
    min-width: 220px;
  }
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.home-hero-card {
  padding-top: 12px;
  padding-bottom: 12px;
}
.hero-title { font-size: 1.55rem; color: #104549; margin-bottom: 6px; }
.hero-desc { font-size: 0.97rem; color: #415565; margin-bottom: 0; }
.home-mobile-action-stack {
  display: none;
  margin-top: 8px;
}
.home-mobile-action-primary,
.home-mobile-action-secondary {
  display: grid;
  gap: 6px;
}
.home-mobile-action-btn {
  width: 100%;
}
.home-mobile-action-btn-admin {
  border: 1px solid #d8d4ff;
  background: #f8f7ff;
  color: #4a3ea1;
}
.mobile-route-assist {
  display: none;
}
.mobile-route-assist-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mobile-route-assist-btn {
  border: 1px solid #cfe0e4;
  background: #f8fcfd;
  color: #2f6070;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.74rem;
  font-weight: 600;
}
.mobile-route-assist-btn-home {
  border-color: #bed4df;
  background: #eef6fa;
  color: #28556a;
}
.home-dashboard-main {
  position: relative;
}

.home-dashboard-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 11;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(20px, 6vh, 72px) 16px 16px;
  border-radius: 12px;
  background: rgba(241, 248, 246, 0.72);
  backdrop-filter: blur(1.2px);
}

.home-dashboard-loading-card {
  width: min(92%, 350px);
  border: 1px solid #cee3df;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(22, 86, 92, 0.15);
  padding: 16px 20px;
  text-align: center;
}

.home-dashboard-loading-text {
  margin: 0;
  color: #1f5660;
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.home-dashboard-loading-dots {
  display: inline-flex;
  align-items: flex-end;
  margin-left: 2px;
}

.home-dashboard-loading-dot {
  display: inline-block;
  min-width: 0.3em;
  animation: home-dashboard-loading-dot-wave 1.2s ease-in-out infinite;
}

.home-dashboard-loading-dot.dot-1 {
  animation-delay: 0s;
}

.home-dashboard-loading-dot.dot-2 {
  animation-delay: 0.15s;
}

.home-dashboard-loading-dot.dot-3 {
  animation-delay: 0.3s;
}

.home-dashboard-loading-inline-note {
  margin: 0;
  color: #4d6673;
  font-size: 0.9rem;
}

@keyframes home-dashboard-loading-dot-wave {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@media (max-width: 767px) {
  .home-dashboard-loading-overlay {
    padding-top: clamp(16px, 4vh, 30px);
  }

  .home-dashboard-loading-card {
    width: min(94%, 300px);
    padding: 14px 16px;
  }

  .home-dashboard-loading-text {
    font-size: 0.98rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-dashboard-loading-dot {
    animation: none;
  }
}

.home-today-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.today-role-grid {
  display: grid;
  gap: 8px;
}
.today-role-card {
  border: 1px solid #d2e6e5;
  border-radius: 12px;
  background: #f8fcfc;
  padding: 10px;
}
.today-role-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.today-role-list {
  display: grid;
  gap: 5px;
  margin-top: 6px;
  margin-bottom: 6px;
}
.today-memo-card {
  display: grid;
  gap: 6px;
}
.today-memo-a4-sheet {
  position: relative;
  width: min(210mm, 100%);
  min-height: 297mm;
  margin: 0 auto;
  border: 1px solid #d3dde3;
  border-radius: 12px;
  background: #fff;
  padding: 14px;
}

.today-memo-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(20px, 6vh, 72px) 16px 16px;
  border-radius: inherit;
  background: rgba(242, 249, 246, 0.72);
  backdrop-filter: blur(1.4px);
}

.today-memo-loading-card {
  width: min(92%, 420px);
  max-width: calc(100% - 32px);
  box-sizing: border-box;
  border: 1px solid #cfe4df;
  border-radius: 15px;
  background: #ffffff;
  box-shadow: 0 9px 24px rgba(23, 89, 94, 0.14);
  padding: 18px 32px;
  text-align: center;
}

.today-memo-loading-text {
  margin: 0;
  color: #1f5660;
  font-size: 1.24rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.today-memo-loading-dots {
  display: inline-flex;
  align-items: flex-end;
  margin-left: 2px;
}

.today-memo-loading-dots .dot {
  display: inline-block;
  min-width: 0.3em;
  animation: today-memo-loading-dot-wave 1.25s ease-in-out infinite;
}

.today-memo-loading-dots .dot-1 {
  animation-delay: 0s;
}

.today-memo-loading-dots .dot-2 {
  animation-delay: 0.16s;
}

.today-memo-loading-dots .dot-3 {
  animation-delay: 0.32s;
}

@keyframes today-memo-loading-dot-wave {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@media (max-width: 767px) {
  .today-memo-loading-overlay {
    padding-top: clamp(16px, 4vh, 30px);
  }

  .today-memo-loading-card {
    width: min(95%, 360px);
    max-width: calc(100% - 24px);
    padding: 15px 20px;
  }

  .today-memo-loading-text {
    font-size: 1.12rem;
  }
}

.today-memo-a4-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  border-bottom: 2px solid #224a63;
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.today-memo-head-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.today-memo-nav-btn {
  min-width: 42px;
  padding: 8px 0;
  font-size: 1.05rem;
  font-weight: 800;
}
.today-memo-a4-date {
  color: #224a63;
  font-size: 0.98rem;
  font-weight: 700;
}
.today-memo-a4-date-wrap {
  position: relative;
}
.today-memo-date-link {
  border: none;
  background: transparent;
  color: #224a63;
  font-size: 0.98rem;
  font-weight: 700;
  padding: 2px 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
  border-radius: 6px;
}
.today-memo-date-link:hover {
  background: #eef5fb;
}
.today-memo-date-picker {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.today-memo-a4-sheet.memo-slide-forward {
  animation: memo-slide-forward 420ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}
.today-memo-a4-sheet.memo-slide-backward {
  animation: memo-slide-backward 420ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}
@keyframes memo-slide-forward {
  from { transform: translateX(34px); opacity: 0.25; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes memo-slide-backward {
  from { transform: translateX(-34px); opacity: 0.25; }
  to { transform: translateX(0); opacity: 1; }
}
.today-memo-field {
  border: 1px solid #cfdae2;
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  background: #fff;
}
.today-memo-field > label {
  display: block;
  margin: 0;
  padding: 8px 10px;
  border-bottom: 1px solid #cfdae2;
  background: #f2f7fb;
  color: #1a465e;
  font-weight: 800;
}
.today-memo-field > textarea {
  border: none;
  border-radius: 0;
  min-height: 92px;
}
.today-memo-field > textarea::placeholder {
  color: #8a98a7;
}
.today-memo-field:last-of-type > textarea {
  min-height: 120px;
}
.today-memo-history-box {
  border: 1px solid #d5e4ea;
  border-radius: 12px;
  padding: 12px;
  background: #f9fcff;
  margin-top: 8px;
}
.today-memo-history-title {
  margin: 0 0 8px;
  font-size: 0.96rem;
  font-weight: 700;
  color: #304d63;
}
.today-memo-history-note {
  margin: 0 0 8px;
  font-size: 0.84rem;
  color: #5f7281;
}
.today-memo-history-flow {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.today-memo-history-badge {
  display: block;
  width: 100%;
  border: 1px solid #cfdee7;
  background: #ffffff;
  color: #3f5c71;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.today-memo-history-arrow {
  display: none;
}
.today-memo-history-actions {
  margin-top: 10px;
}
.today-memo-history-toggle {
  padding: 7px 12px;
  font-size: 0.84rem;
  border-radius: 999px;
}
.today-memo-history-empty {
  color: #6a7a87;
  font-size: 0.9rem;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }

.section-title { font-size: 1.2rem; color: #134f53; margin-bottom: 8px; }
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.83rem;
  font-weight: 700;
  margin-right: 6px;
}
.badge-pending { background: #fff2ce; color: #7a5c1e; }
.badge-ok { background: var(--ok-soft); color: #1f6a3f; }
.badge-return { background: var(--danger-soft); color: #8a2d2d; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.hiyari-step4-incident-group { margin-top: 10px; }
.section-gap { margin-top: 14px; }
.compact-group { align-items: flex-start; }
.compact-input { width: min(150px, 45vw); }
.compact-input-xs { width: min(96px, 28vw); }
label { font-weight: 700; color: #27414f; }
.required { color: var(--danger); }

input, select, textarea {
  border: 1px solid #c9e1df;
  background: #fff;
  border-radius: 12px;
  padding: 11px;
  font-size: 1rem;
  width: 100%;
}
textarea { min-height: 88px; resize: vertical; }
.small-help { color: #61717f; font-size: 0.9rem; }

.hiyari-initial-card {
  display: block;
}
.hiyari-initial-base {
  width: 100%;
  max-width: 760px;
  min-width: 0;
  margin: 10px auto 0;
}
.hiyari-initial-center-zone {
  width: 100%;
  display: grid;
  place-items: center;
}
.hiyari-initial-step-block {
  width: min(100%, 460px);
  margin: 0 auto;
  display: grid;
  gap: 14px;
}
.hiyari-initial-grid {
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  justify-content: center;
  gap: 14px;
}
.hiyari-initial-group {
  width: 100%;
  max-width: 460px;
  min-width: 0;
  overflow-x: clip;
}
.hiyari-initial-datetime-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.hiyari-initial-datetime-shell {
  position: relative;
  width: 100%;
  min-height: 64px;
  border: 1px solid #c9e1df;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 46px;
  cursor: pointer;
}
.hiyari-initial-datetime-shell:focus-within,
.hiyari-initial-datetime-shell:focus-visible {
  outline: 3px solid rgba(17, 107, 112, 0.2);
  outline-offset: 1px;
}
.hiyari-initial-datetime-display {
  width: 100%;
  text-align: center;
  font-size: 1.38rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #173442;
  pointer-events: none;
}
.hiyari-initial-datetime-display.is-placeholder {
  font-size: 1rem;
  font-weight: 700;
  color: #5b7180;
}
.hiyari-initial-datetime-input.hiyari-initial-datetime-native-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  appearance: none;
  -webkit-appearance: none;
}
.hiyari-initial-next-row {
  justify-content: center;
  margin-top: 2px;
}
.hiyari-initial-next-btn {
  font-size: 1.05rem;
  padding: 12px 26px;
}

.legacy-note {
  margin-top: 6px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid #f0d4a0;
  border-radius: 10px;
  background: #fff8e8;
  color: #6b4b10;
  font-size: 0.88rem;
}

.facility-service-select-wrap {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #d6e8e7;
  border-radius: 12px;
  background: #f9fdfd;
}

.field-limit-note {
  margin-top: 4px;
  text-align: right;
  font-size: 0.76rem;
  color: #5e6c77;
  line-height: 1.2;
}

.collapsible-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fcfc;
  padding: 10px 12px;
}
.collapsible-panel > summary {
  cursor: pointer;
  font-weight: 800;
  color: #1c5960;
  list-style: none;
}
.collapsible-panel > summary::-webkit-details-marker { display: none; }
.collapsible-panel > summary::before {
  content: '▶';
  margin-right: 8px;
  font-size: 0.85rem;
}
.collapsible-panel[open] > summary::before { content: '▼'; }
.collapsible-panel .panel-body { margin-top: 10px; }

.optional-input-panel > summary {
  cursor: pointer;
  color: #1d6fd6;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}

.optional-input-panel > summary:hover {
  color: #1558ad;
}

.optional-input-panel .form-group + .form-group {
  margin-top: 14px;
}

.tag-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip {
  border-radius: 999px;
  padding: 9px 12px;
  border: 1px solid #b8d7d5;
  background: #f5fcfb;
  font-weight: 700;
  cursor: pointer;
}
.tag-chip.selected {
  border-color: var(--main);
  background: #daf2ef;
  color: #0f5a5e;
}

.tag-collapsible {
  width: 100%;
}

.tag-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.tag-check {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #b8d7d5;
  border-radius: 12px;
  background: #f5fcfb;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 700;
  color: #1f4f53;
}
.tag-check input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin: 0;
}
.tag-check.selected {
  border-color: var(--main);
  background: #daf2ef;
  color: #0f5a5e;
  box-shadow: 0 0 0 2px rgba(17, 107, 112, 0.12) inset;
}

.data-list { display: grid; gap: 10px; margin-top: 10px; }
.item-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 12px;
}
.item-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }

.place-settings-item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.place-settings-item-head {
  flex: 1;
  min-width: 0;
}
.place-settings-item-head b {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.place-settings-item-actions {
  margin-top: 0;
  margin-left: auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

.vehicle-settings-item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.vehicle-settings-item-main {
  flex: 1;
  min-width: 0;
}
.vehicle-settings-item-head {
  min-width: 0;
}
.vehicle-settings-item-head b,
.vehicle-settings-item-number {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.vehicle-settings-item-actions {
  margin-top: 0;
  margin-left: auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

.user-settings-item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.user-settings-item-main {
  flex: 1;
  min-width: 0;
}
.user-settings-item-head {
  min-width: 0;
}
.user-settings-item-head b {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.user-settings-item-actions {
  margin-top: 0;
  margin-left: auto;
  justify-content: flex-end;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.admin-subpage-header {
  align-items: center;
  gap: 12px;
}

.admin-subpage-title {
  margin-top: 0;
  margin-bottom: 0;
}

.admin-subpage-header > .btn-outline-main[data-action='admin-back-menu'] {
  margin-top: 0;
  margin-bottom: 0;
}

.admin-basic-settings-page-title,
.user-settings-page-title,
.staff-settings-page-title {
  font-size: 1.46rem;
  font-weight: 800;
  line-height: 1.28;
}

.user-settings-filter-box,
.staff-settings-filter-box {
  margin-top: 10px;
  border: 1px solid #d8e5ec;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fbfdff;
}

.user-settings-filter-toggle,
.staff-settings-filter-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 2px 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  text-align: left;
}

.user-settings-filter-toggle-title,
.staff-settings-filter-toggle-title {
  color: #134f53;
  font-size: 1.04rem;
  font-weight: 800;
  line-height: 1.3;
}

.user-settings-filter-toggle-meta,
.staff-settings-filter-toggle-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.user-settings-filter-chevron,
.staff-settings-filter-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1em;
  color: #3e6272;
  font-size: 0.82rem;
  font-weight: 800;
}

.user-settings-filter-content,
.staff-settings-filter-content {
  margin-top: 8px;
}

.user-settings-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 12px;
}

.user-settings-filter-grid .form-group {
  margin: 0;
}

.user-settings-filter-actions {
  margin-top: 10px;
  justify-content: flex-end;
}

.staff-settings-item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.staff-settings-item-main {
  flex: 1;
  min-width: 0;
}
.staff-settings-item-head {
  min-width: 0;
}
.staff-settings-item-head b {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.staff-settings-item-actions {
  margin-top: 0;
  margin-left: auto;
  justify-content: flex-end;
  flex-shrink: 0;
  flex-wrap: nowrap;
}
.staff-settings-item-actions > button {
  white-space: nowrap;
}

.staff-settings-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px 12px;
}

.staff-settings-filter-grid .form-group {
  margin: 0;
}

.staff-settings-filter-actions {
  margin-top: 10px;
  justify-content: flex-end;
}

.role-settings-item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.role-settings-item-main {
  flex: 1;
  min-width: 0;
}
.role-settings-item-head {
  min-width: 0;
}
.role-settings-item-head b {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.role-settings-item-actions {
  margin-top: 0;
  margin-left: auto;
  justify-content: flex-end;
  flex-shrink: 0;
  flex-wrap: wrap;
}

@media (hover: hover) and (pointer: fine) {
  .place-settings-item-card,
  .vehicle-settings-item-card,
  .user-settings-item-card,
  .staff-settings-item-card,
  .role-settings-item-card {
    transition: background-color 0.16s ease, border-color 0.16s ease;
  }

  .place-settings-item-card:hover,
  .vehicle-settings-item-card:hover,
  .user-settings-item-card:hover,
  .staff-settings-item-card:hover,
  .role-settings-item-card:hover {
    background: #f6fcf8;
    border-color: rgba(17, 121, 121, 0.35);
  }

  .route-home .item-card[data-action='open-hiyari-from-home'] {
    cursor: pointer;
    transition: background-color 0.16s ease;
  }
  .route-home .item-card[data-action='open-hiyari-from-home']:hover {
    background: #f6fcf8;
  }
}

@media (max-width: 1024px) {
  .admin-basic-settings-page-title,
  .user-settings-page-title,
  .staff-settings-page-title {
    font-size: 1.4rem;
    line-height: 1.3;
  }

  .user-settings-filter-grid,
  .staff-settings-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .admin-subpage-header {
    align-items: center;
  }

  .admin-basic-settings-page-title,
  .user-settings-page-title,
  .staff-settings-page-title {
    font-size: 1.32rem;
    line-height: 1.32;
  }

  .user-settings-filter-toggle,
  .staff-settings-filter-toggle {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .user-settings-filter-toggle-meta,
  .staff-settings-filter-toggle-meta {
    width: 100%;
    justify-content: flex-end;
  }

  .user-settings-item-card,
  .staff-settings-item-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .user-settings-item-main,
  .staff-settings-item-main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .user-settings-item-head,
  .user-settings-item-head b,
  .staff-settings-item-head,
  .staff-settings-item-head b {
    width: 100%;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  .user-settings-item-actions,
  .staff-settings-item-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
    align-self: stretch;
  }

  .staff-settings-item-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .staff-settings-item-actions > button {
    width: 100%;
    min-width: 0;
  }

  .role-settings-item-card {
    align-items: flex-start;
  }

  .role-settings-item-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  .admin-subpage-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .admin-subpage-header > .btn-outline-main[data-action='admin-back-menu'] {
    align-self: flex-start;
  }

  .admin-basic-settings-page-title,
  .user-settings-page-title,
  .staff-settings-page-title {
    font-size: 1.24rem;
    line-height: 1.34;
  }

  .user-settings-filter-toggle-title,
  .staff-settings-filter-toggle-title {
    font-size: 1rem;
  }

  .user-settings-filter-grid,
  .staff-settings-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .user-settings-filter-actions,
  .staff-settings-filter-actions {
    justify-content: stretch;
  }

  .user-settings-filter-actions > button,
  .staff-settings-filter-actions > button {
    width: 100%;
  }
}
.meta-row { color: #516676; font-size: 0.93rem; }
.hiyari-card-summary-main {
  width: 100%;
  min-width: 0;
}
.hiyari-card-date-status-row {
  align-items: center;
  gap: 10px;
}
.hiyari-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid #cfe0ea;
  border-radius: 999px;
  background: #f4f8fb;
  color: #3f5d70;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.hiyari-card-title-row {
  margin-top: 4px;
  gap: 10px;
}
.hiyari-card-title {
  font-size: 1rem;
  line-height: 1.45;
  color: #233747;
}
.hiyari-card-summary-text {
  margin-top: 3px;
}
.hiyari-card-context-row {
  margin-top: 4px;
}
.hiyari-card-management-sub {
  margin-top: 4px;
  font-size: 0.76rem;
  color: #7b8996;
}
.hiyari-card-summary-hint {
  margin-top: 8px;
  font-size: 0.82rem;
  color: #5e7483;
}
.item-date-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.item-datetime {
  color: #2a4e63;
  font-weight: 700;
}
.hash-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hash-tag {
  color: #1d6fd6;
  font-weight: 700;
  font-size: 0.9rem;
}
.writer-finder-box {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  border: 1px solid #cfe0ee;
  border-radius: 10px;
  background: #f7fbff;
  padding: 6px 10px;
  color: #2e4d64;
  font-size: 0.9rem;
}

.filter-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.hiyari-filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 10px 12px;
  align-items: start;
}
.hiyari-filter-row > * {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.hiyari-filter-row select,
.hiyari-filter-row input {
  min-height: 44px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.hiyari-filter-row input[type='month'] {
  width: 100%;
  min-width: 0;
}
.filter-row:not(.hiyari-filter-row) input[type='month'] {
  width: min(150px, 42vw);
}
.hiyari-filter-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 2px 0;
}
.hiyari-filter-footer .meta-text {
  margin: 0;
}
.hiyari-filter-footer .actions-row {
  margin-top: 0;
  margin-left: auto;
  align-items: center;
  justify-content: flex-end;
}
.hiyari-tools-panel {
  margin-top: 6px;
}
.hiyari-tools-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
  cursor: pointer;
  padding: 8px 10px;
  border: 1px solid #dbe9ee;
  border-radius: 12px;
  background: linear-gradient(180deg, #f6fbfc 0%, #f2f8fa 100%);
}
.hiyari-tools-summary::-webkit-details-marker {
  display: none;
}
.hiyari-tools-summary-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #c4d8e2;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(54, 92, 107, 0.08);
}
.hiyari-tools-summary-trigger-label {
  color: #2f5f6d;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.1;
}
.hiyari-tools-summary-chevron {
  color: #4c7081;
  font-size: 0.8rem;
  transition: transform 0.18s ease;
}
.hiyari-tools-panel[open] .hiyari-tools-summary-chevron {
  transform: rotate(180deg);
}
.hiyari-tools-summary-status {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
}
.hiyari-tools-status-chip {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #d4e4ea;
  background: #ffffff;
  color: #4f6a78;
  font-size: 0.75rem;
  font-weight: 700;
}
.hiyari-tools-summary:hover .hiyari-tools-summary-trigger {
  border-color: #9fc0cf;
  background: #f6fbff;
}
.hiyari-tools-summary:focus-visible {
  outline: 2px solid rgba(66, 126, 148, 0.34);
  outline-offset: 2px;
}
.hiyari-tools-body {
  display: block;
}
.hiyari-tools-panel[open] .hiyari-tools-body {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid #dce8ec;
  border-radius: 12px;
  background: #fbfdfd;
}
.hiyari-pdf-actions {
  margin-top: 12px;
}
.hiyari-pdf-action-btn {
  min-height: 38px;
  font-size: 0.88rem;
}
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ヒヤリハット一覧（カードUI） */
.hiyari-list-page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.hiyari-list-page-heading.is-ipad {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 10px;
  row-gap: 2px;
}
.hiyari-list-page-heading-main {
  min-width: 0;
  flex: 1 1 auto;
}
.hiyari-list-page-title-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hiyari-list-page-title {
  margin: 0;
}
.hiyari-list-title-info {
  position: relative;
  display: inline-block;
}
.hiyari-list-title-info > summary {
  list-style: none;
  cursor: pointer;
  width: 26px;
  height: 26px;
  border: 1px solid #c8d8df;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3f6674;
  background: #fbfdfe;
  font-size: 0.8rem;
}
.hiyari-list-title-info > summary::-webkit-details-marker {
  display: none;
}
.hiyari-list-title-info[open] > summary {
  background: #f0f6f9;
  border-color: #abc4cf;
}
.hiyari-list-title-info-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  min-width: 260px;
  max-width: min(380px, 74vw);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cfe0e6;
  background: #ffffff;
  color: #4c6674;
  font-size: 0.83rem;
  line-height: 1.5;
  box-shadow: 0 8px 18px rgba(20, 64, 84, 0.12);
}
.hiyari-list-lead {
  margin: 6px 0 10px;
  color: #4c6674;
  font-size: 0.93rem;
  line-height: 1.5;
}
.hiyari-list-page-heading-tools {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
}
.hiyari-list-page-heading-tools.is-ipad {
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.hiyari-list-page-heading.is-ipad .hiyari-list-page-heading-main {
  min-width: 0;
}
.hiyari-list-page-heading.is-ipad .hiyari-list-page-title-row {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
}
.hiyari-list-page-heading.is-ipad .hiyari-list-page-heading-tools {
  margin-left: 0;
  justify-self: end;
  align-self: start;
  justify-content: flex-start;
}
.hiyari-list-page-heading.is-ipad .hiyari-list-page-refresh-btn {
  min-height: 34px;
  min-width: 74px;
  padding: 5px 9px;
  font-size: 0.8rem;
}
.hiyari-list-page-heading.is-ipad .hiyari-list-page-last-updated {
  font-size: 0.72rem;
  line-height: 1.2;
}
.hiyari-list-page-last-updated {
  margin: 0;
  font-size: 0.78rem;
  color: #6b808c;
  white-space: nowrap;
}
.hiyari-list-page-refresh-btn {
  min-height: 38px;
  min-width: 78px;
  padding: 6px 10px;
  font-size: 0.83rem;
}
.hiyari-list-settings-menu > summary {
  min-height: 38px;
  min-width: 78px;
  padding: 0 10px;
  font-size: 0.84rem;
}
.app-shell-hiyari-list .nav-group-wrap {
  margin-top: 0;
}
.hiyari-tools-layout {
  display: grid;
  gap: 16px;
}
.hiyari-tools-block {
  border: 1px solid #dbe7eb;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fcfc 100%);
  padding: 16px;
}
.hiyari-tools-block-title {
  margin: 0 0 12px;
  font-size: 0.96rem;
  color: #1f5266;
}
.hiyari-tools-output-meta {
  margin: 0;
  color: #5c7381;
  font-size: 0.86rem;
  line-height: 1.55;
}

.hiyari-list-card {
  border: 1px solid #d5e3e9;
  background: #fff;
  border-radius: 14px;
  padding: 10px 11px;
  box-shadow: 0 1px 2px rgba(17, 67, 86, 0.03);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.hiyari-list-card:hover {
  border-color: #b6d2dc;
  box-shadow: 0 8px 22px rgba(18, 70, 95, 0.1);
}
.hiyari-list-card:focus-within {
  border-color: #5fa2b2;
  box-shadow: 0 0 0 3px rgba(54, 132, 153, 0.16);
}
.hiyari-list-card.detail-open {
  border-color: #8dc1cf;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbfd 100%);
}
.hiyari-list-card.is-editing-body {
  border-color: #6ea7b9;
  box-shadow: 0 0 0 3px rgba(68, 142, 164, 0.18);
}

.hiyari-card-summary-layout {
  display: grid;
  gap: 9px;
}
.hiyari-card-side {
  min-width: 0;
}
.hiyari-card-side-meta {
  border: 1px solid #dce8ee;
  border-radius: 12px;
  background: #f8fbfd;
  padding: 10px;
  display: grid;
  gap: 9px;
  align-content: start;
}
.hiyari-meta-block {
  display: grid;
  gap: 2px;
}
.hiyari-meta-label {
  margin: 0;
  color: #678292;
  font-size: 0.76rem;
  font-weight: 700;
}
.hiyari-meta-value {
  margin: 0;
  color: #1f4558;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.35;
}
.hiyari-meta-sub {
  margin: 0;
  color: #5a7281;
  font-size: 0.85rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.hiyari-card-open-badge {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid #9bc9d8;
  background: #eaf8fc;
  color: #0f5e78;
  font-size: 0.75rem;
  font-weight: 800;
}

.hiyari-card-side-main {
  display: grid;
  gap: 5px;
  align-content: start;
}
.hiyari-list-card-ipad {
  position: relative;
}
.hiyari-list-card-ipad .hiyari-card-side-main {
  padding-right: 96px;
}
.hiyari-list-card-ipad .hiyari-card-title-row-ipad {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.hiyari-list-card-ipad .hiyari-card-title-row-ipad .hiyari-card-title {
  flex: 1 1 auto;
  min-width: 0;
}
.hiyari-list-card-ipad .hiyari-card-title-row-ipad .hiyari-card-tag-row-inline {
  flex: 0 0 auto;
  max-width: 48%;
}
.hiyari-list-card-ipad .hiyari-card-ipad-top-actions {
  position: absolute;
  top: 10px;
  right: 11px;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
}
.hiyari-list-card-ipad .hiyari-action-minor-pdf-top {
  min-height: 28px;
  padding: 3px 8px;
  font-size: 0.72rem;
  border-radius: 9px;
}
.hiyari-list-card-ipad .hiyari-card-action-main-ipad {
  margin-top: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.hiyari-list-card-ipad .hiyari-action-minor-ipad-edit:only-child {
  grid-column: 1 / -1;
}
.hiyari-list-card-ipad .hiyari-action-toggle-row {
  margin-top: 6px;
  width: 100%;
  min-height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
}
.hiyari-card-title {
  margin: 0;
  color: #1f3342;
  font-size: 1.02rem;
  line-height: 1.42;
  font-weight: 800;
}
.hiyari-card-occurred-row {
  margin: 0;
  color: #31556b;
  font-size: 0.84rem;
  font-weight: 700;
}
.hiyari-card-summary-text {
  margin: 0;
  color: #465c6d;
  font-size: 0.92rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hiyari-card-context-row,
.hiyari-card-submeta-row {
  margin: 0;
  color: #4f6777;
  font-size: 0.84rem;
  line-height: 1.42;
}
.hiyari-card-submeta-row {
  color: #5b7280;
}
.hiyari-card-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 0;
}
.route-hiyari-list .hiyari-list-card-ipad .hiyari-card-side-main > .hiyari-card-tag-row {
  margin-bottom: 12px;
}
.hiyari-card-tag-row-inline {
  margin-top: 0;
  margin-bottom: 0;
  justify-content: flex-end;
}
.hiyari-card-tag-row .hash-tag {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  border-radius: 999px;
  border: 1px solid #d1e4ef;
  background: #f2f8fc;
  color: #1e6280;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 1px 7px;
}
.hiyari-muted-placeholder {
  color: #8a9baa;
  font-size: 0.84rem;
}

.hiyari-card-side-actions {
  border-left: 1px dashed #d8e4ea;
  padding-left: 10px;
  display: grid;
  gap: 7px;
  align-content: start;
}
.hiyari-card-action-main {
  margin-top: 0;
  display: grid;
  gap: 6px;
}
.hiyari-action-primary {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 700;
}
.hiyari-card-action-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hiyari-action-minor {
  min-height: 30px;
  padding: 4px 9px;
  font-size: 0.76rem;
  border-radius: 9px;
  font-weight: 600;
}
.hiyari-card-editing-hint {
  margin: 0;
  color: #6f8592;
  font-size: 0.76rem;
  line-height: 1.35;
}
.card-select-check {
  justify-self: start;
  margin-top: 0;
  min-height: 28px;
  padding: 4px 8px;
  font-size: 0.79rem;
  font-weight: 600;
}

.hiyari-body-editor-panel {
  margin-top: 10px;
  border: 1px solid #9dc4d1;
  border-radius: 14px;
  background: linear-gradient(180deg, #f6fcfe 0%, #ffffff 100%);
  padding: 11px;
}
.hiyari-body-editor-header {
  display: grid;
  gap: 3px;
  margin-bottom: 8px;
}
.hiyari-body-editor-title {
  margin: 0;
  color: #0f5f73;
  font-size: 1rem;
}
.hiyari-body-editor-target {
  margin: 0;
  color: #5b7582;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}
.hiyari-body-editor-textarea {
  width: 100%;
  min-height: 180px;
  border: 1px solid #b9d1dd;
  border-radius: 11px;
  background: #fff;
  padding: 12px;
  font-size: 0.94rem;
  line-height: 1.6;
  resize: vertical;
}
.hiyari-body-editor-actions {
  justify-content: flex-end;
}

.hiyari-card-detail-shell {
  margin-top: 10px;
  border: 1px solid #dbe9ef;
  border-radius: 12px;
  background: #fbfdfe;
  padding: 8px 9px;
  display: grid;
  gap: 8px;
}
.hiyari-detail-section {
  border: 1px solid #e3ebf0;
  border-radius: 11px;
  background: #ffffff;
  padding: 9px 11px;
}
.hiyari-detail-section-title {
  margin: 0 0 7px;
  color: #275365;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}
.hiyari-detail-grid {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
.hiyari-detail-grid > div {
  border: none;
  border-bottom: 1px solid #ebf1f5;
  background: transparent;
  padding: 5px 0;
}
.hiyari-detail-grid > div:last-child {
  border-bottom: none;
}
.hiyari-detail-grid dt {
  margin: 0;
  color: #5c7484;
  font-size: 0.74rem;
  font-weight: 700;
}
.hiyari-detail-grid dd {
  margin: 3px 0 0;
  color: #2a3f4f;
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (min-width: 768px) {
  .hiyari-tools-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    align-items: start;
    gap: 18px;
  }
  .hiyari-filter-row {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  }
  .hiyari-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hiyari-detail-grid-wide {
    grid-template-columns: 1fr;
  }
  .hiyari-detail-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hiyari-card-side-actions {
    border-left: none;
    border-top: 1px dashed #d8e4ea;
    padding-left: 0;
    padding-top: 10px;
  }
  .hiyari-card-action-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hiyari-card-action-main > * {
    width: 100%;
  }
}

@media (min-width: 1024px) {
  .hiyari-card-summary-layout {
    grid-template-columns: minmax(0, 1.9fr) minmax(220px, 0.95fr);
    gap: 10px;
    align-items: start;
  }
  .hiyari-card-side-actions {
    border-top: none;
    border-left: 1px dashed #d8e4ea;
    padding-top: 0;
    padding-left: 12px;
  }
  .hiyari-card-action-main {
    grid-template-columns: 1fr;
  }
  .hiyari-card-action-sub {
    justify-content: flex-start;
  }
  .hiyari-filter-row {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  }
}

@media (max-width: 960px) {
  .hiyari-list-page-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .hiyari-list-page-heading.is-ipad {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 8px;
    row-gap: 2px;
  }
  .hiyari-list-page-heading-tools {
    justify-content: flex-start;
    margin-left: 0;
  }
  .hiyari-list-page-heading-tools.is-ipad .hiyari-list-page-refresh-btn {
    min-width: 84px;
  }
  .hiyari-list-page-heading-tools.is-ipad .hiyari-list-page-last-updated {
    font-size: 0.74rem;
  }
  .hiyari-list-page-heading-tools.is-ipad {
    align-items: flex-end;
    justify-content: flex-start;
  }
  .hiyari-list-page-heading.is-ipad .hiyari-list-page-heading-tools {
    justify-self: end;
    align-self: start;
    align-items: flex-end;
  }
  .hiyari-list-page-heading.is-ipad .hiyari-list-page-title-row {
    align-items: center;
  }
}

.hiyari-master-detail {
  display: grid;
  gap: 12px;
}
.hiyari-master-list-pane,
.hiyari-master-detail-pane {
  min-width: 0;
}
.hiyari-master-list-pane {
  display: grid;
  gap: 8px;
  align-content: start;
}
.hiyari-master-list-item {
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  border-left-width: 1px;
}
.hiyari-master-select {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 11px 12px 10px;
  cursor: pointer;
  display: grid;
  gap: 5px;
}
.hiyari-master-select:focus-visible {
  outline: 2px solid rgba(44, 129, 154, 0.44);
  outline-offset: -2px;
}
.hiyari-master-list-item.selected {
  border-color: #86b7c8;
  border-left: 4px solid #2e7d9a;
  background: linear-gradient(180deg, #f7fcff 0%, #ffffff 100%);
}
.hiyari-master-list-item.selected .hiyari-master-select {
  padding-left: 9px;
}
.hiyari-master-list-item .hiyari-card-title {
  font-size: 1rem;
  line-height: 1.45;
}
.hiyari-master-list-item .hiyari-card-context-row,
.hiyari-master-list-item .hiyari-card-submeta-row,
.hiyari-master-list-item .hiyari-card-occurred-row {
  line-height: 1.5;
}
.hiyari-master-list-item .card-select-check {
  margin: 0 10px 10px;
}
.hiyari-detail-pane {
  border: 1px solid #c7d7df;
  border-radius: 14px;
  background: #ffffff;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(21, 72, 95, 0.1);
}
.hiyari-detail-pane-header {
  display: none;
}
.hiyari-detail-pane-title {
  margin: 0;
}
.hiyari-detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.hiyari-toolbar-btn {
  min-height: 28px;
  padding: 3px 8px;
  font-size: 0.74rem;
  color: #2b576d;
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.9);
}
.hiyari-toolbar-btn:hover {
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.9);
}
.hiyari-detail-pane-body {
  display: grid;
  gap: 10px;
  background: #ffffff;
  padding: 0 12px 12px;
  border-radius: 0 0 14px 14px;
}
.hiyari-detail-pane-body > :last-child {
  margin-bottom: 0;
}
.hiyari-detail-reading-header {
  margin: 0 -12px 8px;
  padding: 12px 12px 11px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px 14px 0 0;
  background: linear-gradient(180deg, #0f6870 0%, #135f71 100%);
  display: grid;
  gap: 5px;
}
.hiyari-detail-reading-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}
.hiyari-detail-reading-label {
  margin: 0;
  color: rgba(236, 249, 250, 0.82);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.hiyari-detail-reading-title {
  margin: 0;
  color: #f8ffff;
  font-size: 1.16rem;
  font-weight: 800;
  line-height: 1.42;
}
.hiyari-detail-reading-tools {
  justify-content: flex-end;
}
.hiyari-detail-reading-meta {
  margin: 0;
  color: rgba(235, 251, 252, 0.9);
  font-size: 0.84rem;
  line-height: 1.5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}
.hiyari-detail-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.hiyari-detail-meta-icon {
  width: 0.9em;
  height: 0.9em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.88;
}
.hiyari-detail-meta-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}
.hiyari-detail-reading-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.hiyari-detail-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(237, 252, 252, 0.52);
  background: rgba(255, 255, 255, 0.14);
  color: #f1fdff;
  font-size: 0.73rem;
  line-height: 1;
  padding: 4px 8px;
}
.hiyari-detail-reading-section {
  padding-top: 7px;
  border-top: 1px solid #e7eef2;
}
.hiyari-detail-reading-section-primary {
  border-top: none;
  padding-top: 2px;
}
.hiyari-detail-reading-section-title {
  margin: 0;
  color: #32596b;
  font-size: 0.8rem;
  font-weight: 700;
}
.hiyari-detail-reading-body {
  margin: 6px 0 0;
  color: #223744;
  font-size: 0.96rem;
  line-height: 1.72;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.hiyari-detail-reading-section-primary .hiyari-detail-reading-section-title {
  font-size: 0.86rem;
  color: #214f63;
}
.hiyari-detail-reading-section-primary .hiyari-detail-reading-body {
  margin-top: 8px;
  font-size: 1rem;
}
.hiyari-detail-reading-body.is-empty {
  color: #7f909e;
  font-size: 0.9rem;
}
@media (max-width: 960px) {
  .hiyari-detail-reading-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .hiyari-detail-reading-tools {
    justify-content: flex-start;
  }
  .hiyari-detail-reading-meta {
    gap: 4px 8px;
  }
}
.hiyari-detail-section-core {
  background: #fbfdff;
  border-color: #dce8ef;
}
.hiyari-detail-grid-core {
  gap: 6px;
}
.hiyari-detail-grid-core > div > dt {
  font-weight: 800;
}
.hiyari-detail-grid-core > div > dd,
.hiyari-detail-grid-core .hiyari-detail-grid-full .hiyari-detail-reading-body {
  font-weight: 700;
}
.hiyari-detail-grid-full {
  grid-column: 1 / -1;
}
.hiyari-detail-grid-full .hiyari-detail-reading-body {
  margin-top: 4px;
  font-size: 0.92rem;
}
.hiyari-detail-section-meta {
  background: #fcfdff;
  border-color: #e4ecf1;
}
.hiyari-detail-grid-meta dt {
  font-size: 0.72rem;
  color: #637989;
}
.hiyari-detail-grid-meta dd {
  font-size: 0.84rem;
  color: #304756;
}
.hiyari-detail-grid-compact {
  gap: 3px;
}
.hiyari-detail-section-subtle {
  background: #fcfdfe;
  border-color: #e7eef2;
}
.hiyari-detail-section-subtle .hiyari-detail-section-title {
  color: #4d6676;
  font-size: 0.84rem;
}
.hiyari-detail-section-subtle .hiyari-detail-grid-meta dt {
  color: #6c808e;
}
.hiyari-detail-section-subtle .hiyari-detail-grid-meta dd {
  color: #4a5e6c;
  font-size: 0.82rem;
}
.hiyari-detail-loading-state {
  margin-top: 10px;
  min-height: 230px;
  border: 1px solid #d7e8ef;
  border-radius: 12px;
  background: linear-gradient(180deg, #f5fafc 0%, #ffffff 100%);
  display: grid;
  place-items: center;
  padding: 22px 14px;
}
.hiyari-detail-loading-text {
  margin: 0;
  color: #295d73;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
}
.hiyari-loading-dots {
  display: inline-flex;
  gap: 3px;
  align-items: flex-end;
  min-width: 20px;
}
.hiyari-loading-dots > span {
  display: inline-block;
  line-height: 1;
  color: #2f6f84;
  opacity: 0.28;
  transform: translateY(0);
  animation: hiyari-loading-dot-wave 1.2s ease-in-out infinite;
}
.hiyari-loading-dots > span:nth-child(2) {
  animation-delay: 0.18s;
}
.hiyari-loading-dots > span:nth-child(3) {
  animation-delay: 0.36s;
}
@keyframes hiyari-loading-dot-wave {
  0%,
  60%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  30% {
    opacity: 0.92;
    transform: translateY(-2px);
  }
}
.hiyari-detail-pane-editor {
  border: 1px solid #bcd4dd;
  border-radius: 12px;
  background: #f9fcfd;
  padding: 10px;
}
.hiyari-detail-empty {
  border: 1px dashed #c7d8e0;
  border-radius: 12px;
  background: #fbfdff;
  padding: 18px 16px;
  color: #5d7280;
}
.hiyari-detail-empty h3 {
  margin: 0;
  font-size: 0.95rem;
  color: #4f6878;
}
.hiyari-detail-section-emphasis {
  border-color: #c8dbe6;
  background: #f9fcff;
}
.hiyari-missing-fields {
  border: 1px solid #e6edf2;
  border-radius: 10px;
  background: #fcfdff;
  padding: 7px 9px;
}
.hiyari-missing-fields > summary {
  cursor: pointer;
  color: #607584;
  font-size: 0.8rem;
  font-weight: 600;
}
.hiyari-missing-fields p {
  margin: 6px 0 0;
  color: #6f8290;
  font-size: 0.8rem;
}
.hiyari-pdf-select-mode-actions {
  align-items: center;
}

@media (min-width: 1100px) {
  .hiyari-master-detail {
    grid-template-columns: minmax(0, 40%) minmax(0, 60%);
    align-items: start;
    gap: 14px;
  }
  .hiyari-master-list-pane {
    position: sticky;
    top: 12px;
    align-self: start;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    overflow-x: hidden;
    overflow-anchor: none;
    padding-right: 4px;
    padding-bottom: 4px;
  }
  .hiyari-master-detail-pane {
    position: sticky;
    top: 12px;
    align-self: start;
  }
  .hiyari-detail-pane {
    max-height: none;
    overflow: visible;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hiyari-loading-dots > span {
    animation: none;
    opacity: 0.66;
    transform: none;
  }
}

.login-card-wrap {
  position: relative;
}

.login-screen .login-card-wrap {
  width: 100%;
  max-width: min(100%, 880px);
}

.login-screen .login-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.login-screen .login-grid > .card {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.login-screen [data-login-form='1'] {
  display: grid;
  gap: 12px;
}

.login-screen [data-login-form='1'] .form-group + .form-group {
  margin-top: 2px;
}

.login-screen [data-login-form='1'] .actions-row {
  margin-top: 0;
}

.login-screen .login-primary-action-row {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 0;
}

.login-screen .login-primary-btn {
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 14px 18px;
  font-size: 1.08rem;
  font-weight: 800;
}

.login-screen .login-helper-actions {
  width: 100%;
  margin-top: 2px;
  gap: 8px;
}

.login-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: inherit;
  background: rgba(240, 247, 250, 0.72);
  backdrop-filter: blur(1.5px);
}

.login-loading-card {
  width: min(100%, 420px);
  max-width: calc(100% - 32px);
  box-sizing: border-box;
  border: 1px solid #c7dfe7;
  border-radius: 14px;
  padding: 22px 34px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(21, 71, 110, 0.16);
  text-align: center;
}

.login-loading-spinner {
  display: inline-block;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 4px solid #d5e9ef;
  border-top-color: #116b70;
  animation: login-spinner-rotate 0.8s linear infinite;
}

.login-loading-title {
  margin: 12px 0 6px;
  font-size: 1.24rem;
  font-weight: 800;
  color: #1d4d64;
}

.login-loading-sub {
  margin: 0;
  font-size: 1rem;
  color: #4f6678;
}

@keyframes login-spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

.stage2-login-wrap {
  width: 100%;
  max-width: min(100%, 900px);
  margin: 18px auto 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.stage2-login-header {
  display: grid;
  gap: 6px;
}

.stage2-login-header .meta-text {
  margin-bottom: 0;
}

.stage2-login-header .stage2-error-text,
.stage2-login-header .stage2-info-text {
  margin: 8px 0 0;
}

.stage2-auth-card {
  width: 100%;
  max-width: min(100%, 860px);
  margin: 0 auto;
  padding: 24px 26px;
}

.stage2-auth-actions {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.stage2-auth-actions .btn-main,
.stage2-auth-actions .btn-outline-main,
.stage2-login-footer-actions button {
  min-height: 46px;
}

.stage2-auth-actions [data-stage2-pin-submit='1'] {
  width: min(100%, 540px);
  min-height: 60px;
  margin-inline: auto;
  font-size: 1.08rem;
  font-weight: 800;
}

.stage2-error-text,
.stage2-info-text {
  margin-top: 12px;
  border-radius: 10px;
  padding: 10px 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.stage2-error-text {
  color: #9a2f2f;
  background: #fff2f2;
  border: 1px solid #f0c7c7;
}

.stage2-info-text {
  color: #2e5e74;
  background: #edf8fd;
  border: 1px solid #c8e5f3;
}

.stage2-staff-form {
  display: grid;
  gap: 14px;
  margin-top: 6px;
}

.stage2-staff-form .form-group {
  margin-bottom: 0;
}

.stage2-staff-form label[for='stage2-staff-membership'],
.stage2-pin-group-label {
  font-size: 1.03rem;
  font-weight: 800;
  color: #16394b;
}

#stage2-staff-membership,
#stage2-facility-password,
#stage2-facility-login-id {
  width: 100%;
}

#stage2-staff-membership {
  min-height: 62px;
  padding: 10px 14px;
  font-size: 1.08rem;
  font-weight: 700;
}

.stage2-pin-group-wrap {
  display: grid;
  gap: 10px;
}

.stage2-pin-group-label {
  display: inline-block;
}

.stage2-pin-digit-group {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 78px));
  gap: 12px;
  justify-content: center;
}

.stage2-pin-digit-input {
  width: 100%;
  min-height: 72px;
  border-radius: 14px;
  border: 1px solid #c8d7e1;
  text-align: center;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0;
  touch-action: manipulation;
}

.stage2-pin-digit-input:focus {
  outline: 3px solid rgba(17, 107, 112, 0.25);
  outline-offset: 1px;
  border-color: #116b70;
}

.stage2-empty-candidates {
  margin: 0;
  border: 1px dashed #c9d8e0;
  border-radius: 12px;
  padding: 12px;
  color: #5f7380;
  background: #f8fcfe;
}

#stage2-staff-membership:focus,
#stage2-facility-password:focus,
#stage2-facility-login-id:focus {
  outline: 3px solid rgba(17, 107, 112, 0.25);
  outline-offset: 1px;
}

.stage2-login-footer-actions {
  margin-top: 18px;
  gap: 8px;
  flex-wrap: wrap;
  opacity: 0.92;
}

.stage2-demo-tools {
  margin-top: 14px;
  font-size: 0.94rem;
  opacity: 0.9;
}

.stage2-demo-tools > summary {
  color: #4c5f6f;
}

.header-stage2-operator-line {
  margin: 4px 0 0;
  color: #29586a;
  font-size: 0.9rem;
  line-height: 1.45;
}

.header-stage2-operator-name,
.header-stage2-operator-role {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.stage2-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 33, 43, 0.44);
  backdrop-filter: blur(1px);
  z-index: 1700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.stage2-loading-card {
  width: min(100%, 440px);
  border-radius: 14px;
  border: 1px solid #c2dbe6;
  background: #fff;
  box-shadow: 0 16px 36px rgba(14, 53, 74, 0.26);
  padding: 22px 20px;
  text-align: center;
}

.stage2-loading-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 4px solid #d5e9ef;
  border-top-color: #116b70;
  animation: login-spinner-rotate 0.8s linear infinite;
}

.stage2-loading-title {
  margin: 12px 0 6px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #1d4d64;
}

.stage2-loading-sub {
  margin: 0;
  color: #4f6678;
}

.stage2-loading-dots {
  display: inline-flex;
  align-items: flex-end;
  margin-left: 2px;
}

.stage2-loading-dots > span {
  display: inline-block;
  min-width: 0.3em;
  animation: stage2-loading-dot-wave 1.1s ease-in-out infinite;
}

.stage2-loading-dots > span:nth-child(2) {
  animation-delay: 0.14s;
}

.stage2-loading-dots > span:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes stage2-loading-dot-wave {
  0%,
  80%,
  100% {
    opacity: 0.38;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage2-loading-dots > span {
    animation: none;
    opacity: 0.78;
    transform: none;
  }
}

@media (min-width: 1200px) {
  .app-shell.login-screen {
    min-height: calc(100vh - 24px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 18px;
    padding-bottom: 24px;
  }

  .app-shell.login-screen .stage2-login-wrap {
    margin: 0 auto;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .app-shell.login-screen {
    min-height: calc(100vh - 24px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 96px;
    padding-bottom: 24px;
  }

  .app-shell.login-screen .stage2-login-wrap {
    margin: 0 auto;
  }
}

@media (max-width: 1199px) {
  .stage2-login-wrap {
    max-width: min(100%, 860px);
    gap: 12px;
  }

  .stage2-auth-card {
    max-width: min(100%, 820px);
    padding: 22px 22px;
  }
}

@media (max-width: 767px) {
  .app-shell.login-screen {
    min-height: auto;
    display: block;
  }

  .stage2-login-wrap {
    max-width: 100%;
    margin: 10px auto 12px;
    gap: 10px;
  }

  .stage2-auth-card {
    max-width: 100%;
    padding: 14px 12px;
  }

  .stage2-auth-actions .btn-main,
  .stage2-auth-actions .btn-outline-main,
  .stage2-login-footer-actions button {
    width: 100%;
  }

  .stage2-auth-actions [data-stage2-pin-submit='1'] {
    width: 100%;
    max-width: 100%;
    min-height: 56px;
    font-size: 1.02rem;
  }

  #stage2-staff-membership {
    min-height: 56px;
    font-size: 1rem;
  }

  .stage2-pin-digit-group {
    grid-template-columns: repeat(4, minmax(52px, 1fr));
    gap: 8px;
    justify-content: stretch;
  }

  .stage2-pin-digit-input {
    min-height: 54px;
    font-size: 1.25rem;
  }

  .stage2-login-footer-actions {
    margin-top: 12px;
  }

  .stage2-demo-tools {
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  .stage2-login-wrap {
    margin: 8px auto;
  }

  .stage2-loading-card {
    padding: 18px 14px;
  }

  .stage2-pin-digit-group {
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stage2-pin-digit-input {
    min-height: 50px;
    font-size: 1.15rem;
  }
}

.list-card-footer {
  justify-content: space-between;
  align-items: flex-end;
}
.hiyari-card-action-main {
  align-items: center;
}
.hiyari-card-detail-body table th,
.hiyari-card-detail-body table td {
  word-break: break-word;
  overflow-wrap: anywhere;
}
.admin-comment-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}
.admin-comment-status-badge.has-comment {
  color: #1e5d3c;
  background: #eaf8f1;
  border-color: #bfe8d2;
}
.admin-comment-status-badge.no-comment {
  color: #6b7280;
  background: #f3f4f6;
  border-color: #d9dde3;
}
.hiyari-admin-comment-box {
  border-color: #d8e4ec;
  background: #f9fbfd;
}
.hiyari-admin-comment-box.is-empty {
  background: #fbfcfd;
}
.hiyari-admin-comment-title {
  margin: 0;
  font-size: 0.88rem;
  color: #3a5f72;
}
.hiyari-admin-comment-content {
  margin: 7px 0 0;
  white-space: pre-wrap;
  color: #2a3f4f;
  font-size: 0.86rem;
  line-height: 1.55;
}
.hiyari-admin-comment-content.empty {
  color: #8393a1;
  font-size: 0.82rem;
}
.hiyari-admin-comment-popup {
  margin-top: 10px;
  border: 1px solid #c9ddef;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
  padding: 12px;
  box-shadow: 0 8px 20px rgba(20, 67, 113, 0.12);
}
.hiyari-admin-comment-popup-title {
  margin: 0 0 8px;
  color: #173f63;
  font-size: 1rem;
}
.hiyari-admin-comment-textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid #b7cde5;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
}
.hiyari-admin-comment-popup-actions {
  margin-top: 10px;
  justify-content: flex-end;
}
.admin-comment-cancel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(22, 38, 46, 0.35);
  backdrop-filter: blur(1px);
  z-index: 1200;
}
.admin-comment-cancel-layer {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  z-index: 1201;
}
.admin-comment-cancel-dialog {
  width: min(560px, calc(100vw - 24px));
  border-radius: 14px;
  border: 1px solid #c5d3e5;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(20, 38, 61, 0.2);
}
.admin-comment-cancel-message {
  margin: 0;
  padding: 12px 14px;
  background: linear-gradient(180deg, #f6fbff 0%, #edf5ff 100%);
  color: #2a3f55;
  font-weight: 700;
}
.admin-comment-cancel-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid #d5e0ee;
}
.admin-comment-cancel-btn {
  border: none;
  border-radius: 0;
  min-height: 46px;
  font-size: 0.92rem;
  font-weight: 800;
}
.admin-comment-cancel-btn + .admin-comment-cancel-btn {
  border-left: 1px solid #d5e0ee;
}
.admin-comment-cancel-btn.danger {
  background: #fff4f4;
  color: #9f2f36;
}
.admin-comment-cancel-btn.secondary {
  background: #f3f8ff;
  color: #1f4f82;
}
.card-select-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #b8d7d5;
  border-radius: 10px;
  background: #f5fcfb;
  padding: 6px 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #1f4f53;
}
.card-select-check input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin: 0;
}
.card-select-check.selected {
  border-color: var(--main);
  background: #daf2ef;
  color: #0f5a5e;
}

.admin-tab {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.admin-tab button { min-width: 130px; }

.admin-menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.menu-group-title { color: #1d585d; font-size: 1.05rem; font-weight: 800; margin-bottom: 8px; }
.menu-btn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.admin-menu-screen {
  background: linear-gradient(180deg, #fcfefe 0%, #f5fbfb 100%);
}
.admin-menu-screen .section-title {
  margin-bottom: 12px;
}
.admin-menu-screen .accordion-item {
  border: 1px solid #cfe4e3;
  border-radius: 14px;
  margin-bottom: 8px;
  overflow: hidden;
  background: #f6fbfb;
  box-shadow: 0 2px 10px rgba(20, 92, 98, 0.08);
}
.admin-menu-screen .accordion-btn {
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 0;
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 800;
  color: #114f53;
  font-size: 1.02rem;
  background: linear-gradient(90deg, #e9f4f4 0%, #f6fbfb 100%);
  border-left: 4px solid #7eb9b7;
}
.admin-menu-screen .accordion-btn::marker {
  color: #2f7477;
  font-size: 0.95em;
}
.admin-menu-screen .accordion-content {
  padding: 12px;
  border-top: 1px solid #d6e8e7;
  display: none;
  background: #ffffff;
}
.admin-menu-screen .menu-btn-grid .admin-menu-card {
  min-height: 74px;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid #cde0e4;
  background: linear-gradient(180deg, #f6fbfd 0%, #fafdff 100%);
  box-shadow: 0 1px 4px rgba(30, 73, 90, 0.08);
}
.admin-menu-screen .menu-btn-grid .admin-menu-card:hover {
  border-color: #9fc1ca;
  background: linear-gradient(180deg, #eef7fb 0%, #f8fcff 100%);
  box-shadow: 0 4px 12px rgba(30, 73, 90, 0.12);
}
.admin-menu-screen .menu-btn-grid .admin-menu-card:focus-visible {
  outline: 3px solid rgba(41, 116, 137, 0.28);
  outline-offset: 2px;
}
.admin-menu-card-body {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.admin-menu-card-title {
  display: block;
  font-size: 0.96rem;
  font-weight: 800;
  color: #1e4f63;
  line-height: 1.35;
}
.admin-menu-card-desc {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: #5d7382;
  line-height: 1.38;
}
.admin-menu-card-chevron {
  flex: 0 0 auto;
  color: #5b8091;
  font-size: 0.84rem;
}

.calendar-head { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
.calendar {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.calendar-day {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  min-height: 130px;
  background: #fff;
  cursor: pointer;
}
.calendar-day.today { background: var(--info-soft); }
.calendar-day.active { outline: 2px solid #e1c95b; background: var(--select-soft); }
.calendar-day .day-no { font-weight: 800; margin-bottom: 4px; }
.day-staff { background: #eff8ff; border-radius: 8px; padding: 4px 6px; margin-bottom: 5px; font-size: 0.86rem; }
.day-user { background: #eefbf0; border-radius: 8px; padding: 4px 6px; font-size: 0.82rem; }

.accordion-item { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; overflow: hidden; }
.accordion-btn { width: 100%; text-align: left; border: none; border-radius: 0; background: #fff; padding: 12px; font-weight: 800; color: #134f53; font-size: 1.02rem; }
.accordion-content { padding: 12px; border-top: 1px solid var(--line); display: none; }
.accordion-item.open .accordion-content,
.accordion-item[open] .accordion-content { display: block; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(22, 38, 46, 0.35);
  backdrop-filter: blur(1px);
  z-index: 999;
}
.modal-layer {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  z-index: 1000;
}
.modal {
  width: min(680px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 16px;
}
.modal-content {
  margin-top: 8px;
}
.modal[data-modal-kind="manual-refresh-loading"] {
  width: min(360px, calc(100vw - 24px));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
}
.modal[data-modal-kind="manual-refresh-loading"] .modal-title-row,
.modal[data-modal-kind="manual-refresh-loading"] .actions-row {
  display: none;
}
.modal[data-modal-kind="manual-refresh-loading"] .modal-content {
  margin-top: 0;
  width: 100%;
}
.manual-refresh-loading-text {
  margin: 0;
  color: #1f5660;
  font-size: 1.36rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.02em;
}
.manual-refresh-dots {
  display: inline-flex;
  align-items: flex-end;
  margin-left: 2px;
}
.manual-refresh-dots span {
  display: inline-block;
  min-width: 0.3em;
  animation: manual-refresh-dot-wave 1.05s ease-in-out infinite;
}
.manual-refresh-dots span:nth-child(2) {
  animation-delay: 0.12s;
}
.manual-refresh-dots span:nth-child(3) {
  animation-delay: 0.24s;
}
@keyframes manual-refresh-dot-wave {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}
.modal[data-modal-kind="hiyari-registration-confirm"] {
  width: min(980px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
}
.modal[data-modal-kind="hiyari-registration-confirm"] .modal-content {
  overflow: auto;
  max-height: calc(100vh - 220px);
}
.modal[data-modal-kind="hiyari-registration-confirm"] .actions-row {
  position: sticky;
  bottom: 0;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e3ebef;
  background: #fff;
  z-index: 1;
}
.modal[data-modal-kind="in-app-pdf-preview"] {
  width: min(1120px, calc(100vw - 20px));
  display: flex;
  flex-direction: column;
}
.modal[data-modal-kind="in-app-pdf-preview"] .modal-content {
  margin-top: 10px;
  max-height: calc(100vh - 140px);
  overflow: auto;
}
.in-app-pdf-preview-shell {
  display: grid;
  gap: 10px;
}
.in-app-pdf-preview-actions {
  justify-content: space-between;
}
.in-app-pdf-preview-frame-wrap {
  border: 1px solid #d8e7ea;
  border-radius: 12px;
  overflow: hidden;
  background: #f7fbfc;
}
.in-app-pdf-preview-iframe {
  width: 100%;
  height: min(78vh, 920px);
  border: 0;
  background: #fff;
}
.hiyari-registration-preview-wrap {
  margin-top: 10px;
  border: 1px solid #d8e7ea;
  border-radius: 12px;
  overflow: hidden;
  background: #f7fbfc;
}
.hiyari-registration-preview-iframe {
  width: 100%;
  min-height: 460px;
  border: 0;
  background: #fff;
}
@media (max-width: 768px) {
  .modal[data-modal-kind="hiyari-registration-confirm"] .modal-content {
    max-height: calc(100vh - 200px);
  }
  .hiyari-registration-preview-iframe {
    min-height: 320px;
  }
}
.modal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.modal-title-row .section-title {
  margin: 0;
}
.modal-close-icon {
  appearance: none;
  border: 1px solid #cfd8dc;
  background: #fff;
  color: #49616a;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.modal-close-icon:hover {
  background: #f4f8fa;
}
.accident-registered-primary-actions {
  justify-content: center;
}
.accident-registered-print-links {
  border-top: 1px solid #e3ebef;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.btn-link-print {
  border: none;
  background: transparent;
  color: #1e63d8;
  text-decoration: underline;
  padding: 0;
  font-weight: 600;
}
.btn-link-print:hover {
  color: #154aa6;
}

.toast-wrap { position: fixed; right: 12px; bottom: 12px; display: grid; gap: 8px; z-index: 1000; }
.toast { background: #173f43; color: #fff; border-radius: 12px; padding: 10px 12px; min-width: 220px; }

.inline-kpis { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.inline-kpis .badge { margin: 0; border: 1px solid #cbe3e1; background: #f3fbfa; color: #21565a; }
.header-kpis .badge {
  font-weight: 600;
}

.weekday-kpi-list {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.weekday-kpi-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #d8e9f2;
  border-radius: 10px;
  background: linear-gradient(90deg, #f7fbff 0%, #ffffff 100%);
  padding: 7px 8px;
}
.weekday-kpi-row.weekend {
  border-color: #d9e5f8;
  background: linear-gradient(90deg, #f4f8ff 0%, #ffffff 100%);
}
.weekday-kpi-row.zero {
  border-color: #e1e5ea;
  background: linear-gradient(90deg, #f5f6f8 0%, #fdfdfd 100%);
}
.weekday-kpi-row.zero .weekday-kpi-name,
.weekday-kpi-row.zero .weekday-kpi-value {
  color: #8a949d;
}
.weekday-kpi-row.zero .weekday-kpi-track {
  background: #eceff2;
}
.weekday-kpi-row.zero .weekday-kpi-fill {
  background: #c7cdd3;
}
.weekday-kpi-name {
  text-align: center;
  font-weight: 800;
  color: #205f84;
}
.weekday-kpi-track {
  height: 10px;
  border-radius: 999px;
  background: #eaf2f8;
  overflow: hidden;
}
.weekday-kpi-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #73bff5 0%, #2c88d6 100%);
  min-width: 6px;
}
.weekday-kpi-value {
  min-width: 3.2em;
  text-align: right;
  font-size: 0.9rem;
  font-weight: 700;
  color: #3d5566;
}

.tag-top-list {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.tag-top-row {
  display: grid;
  grid-template-columns: 24px minmax(54px, auto) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #d7e7db;
  border-radius: 10px;
  background: linear-gradient(90deg, #f6fcf7 0%, #ffffff 100%);
  padding: 7px 8px;
}
.tag-top-row.is-top {
  border-color: #bcdcc4;
  background: linear-gradient(90deg, #effaf1 0%, #ffffff 100%);
  box-shadow: 0 0 0 2px rgba(126, 177, 139, 0.12) inset;
}
.tag-top-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #dbeee0;
  color: #2a5a37;
  font-size: 0.74rem;
  font-weight: 800;
}
.tag-top-name {
  font-weight: 700;
  color: #2b4f34;
}
.tag-top-track {
  height: 10px;
  border-radius: 999px;
  background: #e8f3ea;
  overflow: hidden;
}
.tag-top-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8ad1a0 0%, #4caf6b 100%);
  min-width: 6px;
}
.tag-top-value {
  min-width: 3.2em;
  text-align: right;
  font-size: 0.9rem;
  font-weight: 700;
  color: #3f5e46;
}

.place-top-list {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.place-top-row {
  display: grid;
  grid-template-columns: 24px minmax(54px, auto) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #d9e3f3;
  border-radius: 10px;
  background: linear-gradient(90deg, #f6f9ff 0%, #ffffff 100%);
  padding: 7px 8px;
}
.place-top-row.is-top {
  border-color: #c5d6f4;
  background: linear-gradient(90deg, #eef4ff 0%, #ffffff 100%);
  box-shadow: 0 0 0 2px rgba(98, 136, 206, 0.12) inset;
}
.place-top-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #dce7fa;
  color: #2d4f8c;
  font-size: 0.74rem;
  font-weight: 800;
}
.place-top-name {
  font-weight: 700;
  color: #2d4c77;
}
.place-top-track {
  height: 10px;
  border-radius: 999px;
  background: #e9effa;
  overflow: hidden;
}
.place-top-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #9ebcf5 0%, #4e86e0 100%);
  min-width: 6px;
}
.place-top-value {
  min-width: 3.2em;
  text-align: right;
  font-size: 0.9rem;
  font-weight: 700;
  color: #405876;
}

.chart-card { min-height: 280px; }
.chart-wrap { position: relative; height: 220px; width: 100%; }

.empty-state {
  text-align: center;
  padding: 26px;
  background: #f8fcfc;
  border: 1px dashed #b9d7d5;
  border-radius: 14px;
}

.item-card.selected-row {
  border-color: #7ebec2;
  background: #f2fbfb;
  box-shadow: 0 0 0 2px rgba(51,161,168,0.14) inset;
}

.accident-layout {
  display: flex;
  align-items: stretch;
  gap: 0;
  --accident-left: 42%;
}
.accident-pane {
  min-width: 0;
}
.accident-pane-left {
  flex: 0 0 var(--accident-left);
}
.accident-pane-right {
  flex: 1 1 auto;
  min-width: 320px;
}

@media (min-width: 1100px) {
  .accident-pane-right {
    position: sticky;
    top: 20px;
    align-self: flex-start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
  }
}

.accident-splitter {
  position: relative;
  flex: 0 0 24px;
  cursor: col-resize;
  touch-action: none;
}
.accident-splitter::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #6aaeb2 0%, #2a767b 100%);
  border-radius: 999px;
}
.accident-splitter::after {
  content: '⋮⋮';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #2a767b;
  font-size: 0.86rem;
  letter-spacing: -2px;
  background: #eef8f8;
  border: 1px solid #c8e2e0;
  border-radius: 999px;
  padding: 3px 4px;
  line-height: 1;
}
body.accident-resizing {
  cursor: col-resize;
  user-select: none;
}

.accident-step-mobile-summary {
  display: none;
}

.accident-step-chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.accident-step-chip {
  border-radius: 999px;
  border: 1px solid #b8dedd;
  background: #fff;
  color: #1b5f63;
  font-size: 0.9rem;
  font-weight: 700;
  min-height: 42px;
  padding: 8px 14px;
  white-space: nowrap;
}

.accident-step-chip.active {
  background: #dff6f4;
  border-color: #58b2b7;
  color: #125055;
}

.accident-list-card-head {
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
}
.accident-list-card-head .badge {
  margin-right: 0;
  white-space: nowrap;
}
.accident-list-card-type {
  color: #1f495f;
  font-size: 1rem;
}
.accident-list-card-primary {
  color: #38596d;
  font-weight: 700;
}
.accident-list-case-id {
  color: #7a8895;
  font-size: 0.82rem;
}

.accident-misregistration-tab-row {
  flex-wrap: wrap;
  gap: 8px;
}

.accident-misregistration-row {
  display: grid;
  gap: 6px;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.accident-misregistration-card-head {
  align-items: center;
  gap: 8px;
}

.accident-misregistration-summary-card {
  display: grid;
  gap: 8px;
}

.accident-mobile-detail-cue {
  display: none;
}

.accident-page-loading,
.accident-detail-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  border-style: solid;
}

.accident-page-loading {
  min-height: 268px;
  padding: 28px 20px;
  border-color: #c4e0df;
  background: linear-gradient(180deg, #fafdff 0%, #f1fbfa 100%);
}

.accident-page-loading-spinner,
.accident-detail-loading-spinner {
  display: inline-block;
  border-radius: 999px;
  border-style: solid;
  border-color: #9ecfd0;
  border-top-color: #1f8185;
  animation: accident-loading-rotate 0.82s linear infinite;
}

.accident-page-loading-spinner {
  width: 42px;
  height: 42px;
  border-width: 4px;
}

.accident-page-loading-title {
  font-size: 1.32rem;
  font-weight: 800;
  color: #1d5f63;
  line-height: 1.45;
}

.accident-page-loading-sub {
  font-size: 1rem;
  color: #456878;
}

.accident-detail-loading {
  min-height: 220px;
  margin-top: 10px;
  padding: 24px 18px;
  border-color: #c8e0ef;
  background: linear-gradient(180deg, #f8fcff 0%, #f2f8fd 100%);
}

.accident-detail-loading-spinner {
  width: 34px;
  height: 34px;
  border-width: 3px;
}

.accident-detail-loading-title {
  font-size: 1.16rem;
  font-weight: 800;
  color: #1f4f67;
  line-height: 1.45;
}

.accident-detail-loading-sub {
  font-size: 0.95rem;
  color: #4e6577;
}

.accident-detail-error,
.accident-detail-pending {
  margin-top: 10px;
  text-align: center;
}

.accident-detail-error {
  border-color: #efcaca;
  background: linear-gradient(180deg, #fff9f9 0%, #fff3f3 100%);
}

.accident-detail-error-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: #8e2f2f;
}

.accident-detail-error-sub {
  margin: 6px 0 0;
  color: #6b4a4a;
}

.accident-detail-pending {
  border-color: #d3e2ed;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f7fd 100%);
}

.accident-detail-pending-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: #39566c;
}

@keyframes accident-loading-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.route-accident-list .accident-pane-left .accident-list-item-card {
  text-align: left;
}

.route-accident-list .accident-pane-left .accident-list-item-card .meta-row,
.route-accident-list .accident-pane-left .accident-list-item-card .accident-list-card-type,
.route-accident-list .accident-pane-left .accident-list-item-card .accident-list-case-id {
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.route-accident-list .accident-pane-left .accident-list-item-card .item-head {
  align-items: flex-start;
}

.accident-step-panel {
  border: 1px solid #d6eceb;
  border-radius: 16px;
  padding: 12px;
  background: #f7fcfc;
}

.accident-step-panel.theme-vehicle {
  border-color: #c8ddff;
  background: #f3f8ff;
}

.vehicle-sheet-grid {
  gap: 10px;
}

.vehicle-sheet-grid .form-group {
  background: #fff;
  border: 1px solid #b9c6da;
  border-radius: 0;
  padding: 8px;
}

.accident-step-panel.theme-infection {
  border-color: #f0d8af;
  background: #fff9ef;
}

.accident-report-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.accident-report-type-card {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px solid #d2e6e5;
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  min-height: 110px;
}

.accident-report-type-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.45;
}

.accident-report-type-card.selected {
  border-color: #d5a14f;
  background: #fff7e9;
  box-shadow: 0 0 0 2px rgba(213, 161, 79, 0.22) inset;
}

.accident-inline-note {
  margin-top: 12px;
  background: #fff;
}

.accident-inline-note.warning {
  border-color: #eccf93;
  background: #fff7e7;
}

.accident-template-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.accident-template-chip {
  border-radius: 999px;
  border: 1px solid #c8e2e0;
  background: #fff;
  min-height: 40px;
  padding: 7px 12px;
}

.accident-template-chip.active {
  background: #ddf4f2;
  border-color: #5eafb3;
  color: #0e5256;
}

.stepper-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stepper-row button {
  min-width: 36px;
  min-height: 36px;
  border-radius: 10px;
  padding: 0;
}

.stepper-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  font-weight: 700;
}

.stamp-config-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stamp-config-card {
  border: 1px solid #d3e8e6;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 6px;
}

.stamp-config-card input[type='number'] {
  width: 100%;
}

.accident-mini-card h4 {
  margin: 0 0 10px;
}

.accident-pdf-inline-wrap {
  margin-top: 10px;
  border: 1px solid #d9dede;
  border-radius: 14px;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
  background: #fff;
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.accident-pdf-preview-mobile-shell {
  margin-top: 10px;
}

.accident-pdf-preview-scroll-hint {
  display: none;
}

.accident-pdf-preview-document {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: 1 1 auto;
}

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

.accident-template-card {
  border: 1px solid #cfe4e2;
  border-radius: 14px;
  background: #fff;
  padding: 12px;
}

.accident-template-card.selected {
  border-color: #4aa7ac;
  background: #eefbfa;
  box-shadow: 0 0 0 2px rgba(74, 167, 172, 0.15) inset;
}

.accident-pdf-preview-wrap {
  margin-top: 12px;
  border: 1px solid #d8e7e6;
  border-radius: 14px;
  background: #fff;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.accident-pdf-a4 {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 5mm;
  box-sizing: border-box;
  background: #fff;
  color: #111;
  flex: 0 0 auto;
}

.accident-pdf-header {
  border: 2px solid #111;
  border-bottom: none;
  padding: 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 12px;
}

.accident-pdf-header h2 {
  margin: 0;
  font-size: 18px;
}

.accident-pdf-header .meta {
  font-size: 11px;
}

.accident-pdf-section {
  margin: 0;
}

.accident-pdf-section h3 {
  margin: 0;
  border: 1px solid #111;
  border-bottom: none;
  padding: 5px 6px;
  font-size: 12px;
}

.accident-pdf-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.accident-pdf-table th,
.accident-pdf-table td {
  border: 1px solid #111;
  padding: 5px;
  font-size: 11px;
  background: #fff;
  vertical-align: top;
  word-break: break-word;
}

.accident-pdf-table th {
  width: 28%;
  position: static;
  color: #000;
  background: #fff;
  font-weight: 700;
}

.accident-pdf-table .cell-lg {
  min-height: 56px;
}

.accident-pdf-table .cell-xl {
  min-height: 84px;
}

.supervisor-status-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.supervisor-status-top-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.supervisor-stamp-preview-wrap {
  margin-top: 8px;
}

.hq-supervisor-split-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hq-supervisor-split-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #b7d6d4;
  background: #f5fbfb;
  color: #1f5f63;
  font-size: 0.78rem;
  font-weight: 700;
}

.hq-supervisor-split-toggle:hover {
  background: #e9f5f4;
}

.hq-supervisor-split-toggle.is-active {
  border-color: #7ebec2;
  background: #dff4f3;
}

.hq-supervisor-split-toggle:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hq-supervisor-split-toggle-icon {
  font-size: 0.82rem;
  line-height: 1;
}

.supervisor-stamp-preview-wrap.with-floating-extra {
  margin-top: 40px;
}

.supervisor-stamp-grid {
  width: 100%;
  border: 1px solid #111;
  background: #fff;
}

.supervisor-stamp-grid-split-wrap {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.supervisor-stamp-grid-part {
  flex: var(--supervisor-part-flex, 1) 1 0;
}

.supervisor-stamp-columns {
  display: grid;
  grid-template-columns: repeat(var(--supervisor-columns, 14), minmax(0, 1fr));
}

.supervisor-stamp-column {
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  overflow: visible;
}

.supervisor-stamp-column + .supervisor-stamp-column {
  border-left: 1px solid #111;
}

.supervisor-stamp-cell {
  position: relative;
  box-sizing: border-box;
}

.supervisor-stamp-cell-toplike::before {
  content: '';
  display: block;
  padding-top: 25%;
}

.supervisor-stamp-cell-extra-floating {
  position: absolute;
  left: -1px;
  right: -1px;
  bottom: 100%;
  border: 1px solid #111;
  background: #fff;
  z-index: 2;
}

.supervisor-stamp-cell-extra-floating::before {
  content: '';
  display: block;
  padding-top: 25%;
}

.supervisor-stamp-cell-extra-floating + .supervisor-stamp-cell-toplike {
  border-top: none;
}


.supervisor-stamp-cell-toplike + .supervisor-stamp-cell-toplike,
.supervisor-stamp-cell-bottom {
  border-top: 1px solid #111;
}

.supervisor-stamp-top-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  padding: 2px;
}

/* A4プレビュー/印刷時は上段ラベルを小さくして1行表示を優先 */
.accident-pdf-inline-wrap .supervisor-stamp-top-label,
.accident-pdf-section .supervisor-stamp-top-label {
  font-size: 7px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0;
  padding: 1px;
}

.supervisor-stamp-column-selected {
  outline: 2px solid #d94a4a;
  outline-offset: -2px;
}

.supervisor-stamp-column-selected .supervisor-stamp-cell-toplike {
  background: #fff8da !important;
}

.supervisor-stamp-column-selected .supervisor-stamp-cell-bottom {
  background: #ffeaea !important;
}


.supervisor-stamp-grid button.supervisor-stamp-cell {
  width: 100%;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  background: #fff;
  color: inherit;
  cursor: pointer;
}

.supervisor-stamp-square {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
}


.supervisor-stamp-grid button.supervisor-stamp-cell.supervisor-stamp-cell-selected {
  background: #fff3c4 !important;
}
.supervisor-stamp-cell-selected {
  background: #fff3c4 !important;
}

.supervisor-stamp-selected-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: 700;
  color: #7a5a00;
  white-space: nowrap;
  pointer-events: none;
}

.supervisor-stamp-check-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  line-height: 1.2;
}

.supervisor-stamp-check-name {
  font-size: 10px;
  font-weight: 700;
}

.supervisor-stamp-check-date {
  font-size: 8px;
  margin-top: 2px;
}

.vehicle-supervisor-stamp-section {
  margin: 6px 0 10px;
}

.vehicle-supervisor-stamp-section .supervisor-stamp-grid {
  margin: 0;
}

.vehicle-supervisor-stamp-section .supervisor-stamp-cell-toplike::before {
  padding-top: 30%;
}

.vehicle-sheet-preview-wrap {
  border-radius: 0;
  border-color: #bcc7d1;
  background: #fff;
}

.vehicle-accident-sheet {
  border: none;
  margin: 0;
  background: #fff;
  color: #000;
}

.vehicle-accident-sheet * {
  color: #000 !important;
}

.vehicle-sheet-title-row {
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: none;
  padding: 4px 8px 3px;
}

.vehicle-sheet-title {
  width: 100%;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .04em;
}

.vehicle-sheet-title-meta {
  font-size: 10px;
}

.vehicle-sheet-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.vehicle-sheet-table th,
.vehicle-sheet-table td {
  border: 1px solid #000;
  padding: 3px 4px;
  font-size: 10.2px;
  vertical-align: top;
  white-space: pre-wrap;
  word-break: break-word;
  background: #fff;
}

.vehicle-sheet-table .section-label {
  width: 24px;
  text-align: center;
  font-weight: 700;
}

.vehicle-sheet-table .field-label {
  width: 120px;
  font-weight: 700;
}

.vehicle-top-info-table th,
.vehicle-top-info-table td {
  border: none;
  padding: 0 4px 1px;
  font-size: 9.6px;
}

.vehicle-top-info-table .field-label {
  width: 66px;
}

.vehicle-top-info-table td {
  padding-left: 0;
}

.vehicle-top-info-table .recorder-label {
  white-space: nowrap;
}

.vehicle-top-info-table .recorder-value-cell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 96px;
}

.vehicle-top-info-table .recorder-name {
  min-width: 0;
}

.vehicle-top-info-table .stamp-mark {
  display: inline-block;
  margin-left: 0;
  font-weight: 700;
  flex-shrink: 0;
}

.vehicle-sheet-table .subhead {
  text-align: center;
  font-weight: 700;
}

.vehicle-sheet-table .cell-lg {
  min-height: 38px;
}

.vehicle-sheet-table .cell-xl {
  min-height: 74px;
}

.vehicle-dual-block {
  display: grid;
  grid-template-columns: 45% 55%;
  border: 1px solid #000;
  border-top: none;
  min-height: 52mm;
}

.vehicle-left-col {
  border-right: 1px solid #000;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 52mm;
}

.vehicle-right-col {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 52mm;
}

.situation-left {
  display: flex;
  flex-direction: column;
}

.situation-caption,
.sketch-title {
  font-weight: 700;
  border-bottom: 1px solid #000;
  padding: 2px 4px;
  font-size: 9.6px;
}

.situation-ruled {
  flex: 1;
  position: relative;
  min-height: 32mm;
  overflow: hidden;
}

.situation-ruled::before {
  content: none;
}

.situation-text {
  position: relative;
  z-index: 1;
  min-height: 100%;
  padding: 2mm 4px;
  font-size: 9.6px;
  line-height: 1.35;
  white-space: pre-wrap;
}

.police-panel {
  border-bottom: 1px solid #000;
}

.police-grid {
  display: grid;
  grid-template-columns: 46px 1fr;
  min-height: 12mm;
}

.police-label {
  border-right: 1px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9.2px;
  font-weight: 700;
  padding: 2px 1px;
}

.police-content {
  display: grid;
  grid-template-rows: 1fr 1fr;
}

.police-top-row,
.police-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1px 4px;
  font-size: 8.8px;
}

.police-top-row {
  border-bottom: 1px solid #000;
}

.police-bottom-row {
  justify-content: flex-start;
}

.police-choice.active {
  font-weight: 700;
}

.police-choice-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  line-height: 1;
  padding: 0 2px;
}

.police-choice-circle.active::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.45em;
  height: 1.25em;
  border: 1px solid #000;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.police-class-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  line-height: 1;
  padding: 0 1px;
}

.police-class-choice.active::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.45em;
  height: 1.25em;
  border: 1px solid #000;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.police-station-inline {
  margin-left: 10px;
  text-align: right;
  white-space: nowrap;
  font-size: 9px;
}

.sketch-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sketch-canvas {
  flex: 1;
  min-height: 24mm;
  padding: 2px 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scene-sketch-image-wrap {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scene-sketch-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.scene-sketch-text {
  width: 100%;
  height: 100%;
  white-space: pre-wrap;
  font-size: 9px;
}

.scene-sketch-memo {
  border-top: 1px solid #000;
  font-size: 8.2px;
  line-height: 1.3;
  padding: 2px 4px;
}

.scene-sketch-editor-frame {
  width: 99mm;
  max-width: 100%;
}

.scene-sketch-editor-tools {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.scene-sketch-tool-btn {
  padding: 4px 10px;
  border: 1px solid #9aa3b2;
  border-radius: 4px;
  background: #fff;
  font-size: 12px;
}

.scene-sketch-tool-btn.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

.scene-sketch-editor-wrap {
  width: 100%;
  border: 1px solid #000;
  background: #fff;
  min-height: 37mm;
  padding: 3px 4px;
  box-sizing: border-box;
}

.scene-sketch-editor {
  width: 100%;
  height: 37mm;
  min-height: 37mm;
  display: block;
  touch-action: none;
}

.own-damage-editor-frame {
  width: min(100%, 700px);
  max-width: 700px;
}

.own-damage-editor-wrap {
  width: 100%;
  border: 1px solid #000;
  background: #fff;
  min-height: var(--vehicle-own-damage-box-height-editor);
  height: var(--vehicle-own-damage-box-height-editor);
  padding: 0;
  box-sizing: border-box;
}

#a-own-damage-wrap {
  position: relative;
  margin: 0;
  padding: 0;
  overflow: hidden;
  min-height: var(--vehicle-own-damage-editor-height);
  height: var(--vehicle-own-damage-editor-height);
}

#a-own-damage-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  display: block;
  touch-action: none;
  pointer-events: auto;
}

.own-damage-export-preview {
  margin-top: 8px;
}

#a-own-damage-export-preview-img {
  display: block;
  width: min(100%, var(--vehicle-own-damage-editor-width));
  max-width: var(--vehicle-own-damage-editor-width);
  min-height: var(--vehicle-own-damage-editor-height);
  height: var(--vehicle-own-damage-editor-height);
  border: 1px solid #cfd8dc;
  background: #fff;
  object-fit: contain;
  object-position: center center;
}

.own-damage-editor {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: block;
  touch-action: none;
}

.vehicle-type-wrap {
  display: grid;
  grid-template-columns: 20px 1fr;
  border-top: 1px solid #000;
  min-height: 22mm;
}

.vehicle-type-vertical {
  border-right: 1px dotted #000;
  font-size: 8.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  padding: 2px 0;
}

.vehicle-type-vertical span {
  display: inline-block;
}

.vehicle-type-main {
  display: grid;
  grid-template-rows: 5mm 1fr auto;
  min-height: 100%;
}

.vehicle-type-head-row {
  display: grid;
  grid-template-columns: 7fr 6fr;
  border-bottom: 1px solid #000;
  font-size: 8.6px;
  font-weight: 700;
}

.vehicle-type-head-row > span {
  display: flex;
  align-items: center;
  justify-content: center;
}

.vehicle-type-head-row .head-mutual {
  border-right: 1px dotted #000;
}

.vehicle-type-grid-row {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  min-height: 12mm;
  height: 100%;
  align-items: stretch;
}

.vehicle-type-cell {
  border-right: 1px dotted #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1px;
  padding: 1px 0;
  text-align: center;
  height: 100%;
}

.vehicle-type-cell:last-child {
  border-right: none;
}

.type-no {
  display: inline-flex;
  width: 12px;
  height: 12px;
  align-items: center;
  justify-content: center;
  font-size: 7.5px;
  line-height: 1;
}

.type-no.active {
  border: 1px solid #000;
  border-radius: 50%;
}

.type-label {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  font-size: 8.5px;
  line-height: 1;
  letter-spacing: 0.02em;
  writing-mode: vertical-rl;
  text-orientation: upright;
  white-space: nowrap;
}

.vehicle-class-other {
  border-top: 1px solid #000;
  padding: 2px 4px;
  font-size: 8.2px;
}

.vehicle-party-table,
.vehicle-damage-table,
.vehicle-casualty-table {
  margin: 0;
}

.vehicle-party-table .subhead,
.vehicle-damage-table .subhead {
  padding: 1px 0;
  font-size: 9.8px;
  line-height: 1.1;
}

.vehicle-party-table .subhead {
  padding: 0;
  height: 20px;
  line-height: 1;
  font-size: 11.2px;
  letter-spacing: 0.18em;
  text-align: center;
  vertical-align: middle;
}

.vehicle-party-table .party-cell {
  padding: 0 !important;
  vertical-align: top;
  white-space: normal !important;
  line-height: 0;
  font-size: 0;
}

.party-inner-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.party-inner-table th,
.party-inner-table td {
  border-left: 1px solid #000;
  border-right: 1px solid #000;
  border-top: 1px dotted #000;
  border-bottom: none;
  padding: 1px 3px;
  font-size: 9.5px;
  line-height: 1.16;
  vertical-align: middle;
  white-space: normal;
  word-break: break-word;
}

.party-inner-table th {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
  font-weight: 700;
  background: #fff;
  text-align: center;
  vertical-align: middle;
}

.party-inner-table tr:first-child th,
.party-inner-table tr:first-child td {
  border-top: none;
  height: 18px;
}

.party-inner-table tr:nth-child(2) th,
.party-inner-table tr:nth-child(2) td {
  height: 14px;
}

.party-inner-table tr:nth-child(n+3) th,
.party-inner-table tr:nth-child(n+3) td {
  height: 18px;
}

.party-inner-table tr:last-child th,
.party-inner-table tr:last-child td {
  border-bottom: none;
}

.counterpart-party-table tr:last-child th,
.counterpart-party-table tr:last-child td {
  border-bottom: 1px dotted #000;
}

.party-inner-table th:first-child,
.party-inner-table td:first-child {
  border-left: none;
}

.party-inner-table th:last-child,
.party-inner-table td:last-child {
  border-right: none;
}

.license-class-options {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  line-height: 1.2;
}

.license-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  padding: 0 2px;
  white-space: nowrap;
}

.license-option.active {
  border: 1px solid #000;
  border-radius: 999px;
  font-weight: 700;
}

.vehicle-damage-table .damage-cell {
  height: var(--vehicle-own-damage-box-height-pdf);
  min-height: var(--vehicle-own-damage-box-height-pdf);
  max-height: var(--vehicle-own-damage-box-height-pdf);
  vertical-align: top;
  padding: 1px 3px;
  overflow: hidden;
}

.damage-box {
  height: 100%;
  position: relative;
  overflow: hidden;
}

.damage-writing,
.damage-ruled {
  position: absolute;
  inset: 0;
  min-height: 0;
  padding: 2px;
  white-space: pre-wrap;
  word-break: break-word;
  background: none;
}

.damage-image-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.damage-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: fill;
  object-position: top left;
}

.own-damage-cell {
  overflow: hidden;
}

.own-damage-cell .damage-box,
.own-damage-cell .damage-image-wrap {
  overflow: hidden;
}

.own-damage-cell .damage-image {
  object-fit: contain;
  object-position: center center;
}

.own-damage-cell,
.counterpart-damage-cell {
  padding: 1px 3px !important;
}

.simple-car-shape {
  position: absolute;
  left: 36%;
  top: 56%;
  transform: translate(-50%, -50%);
  width: 102px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  pointer-events: none;
}

.simple-car-shape .car-tail {
  width: 10px;
  height: 13px;
  border: 1px solid #000;
  border-right: none;
}

.simple-car-shape .car-body {
  width: 62px;
  height: 13px;
  border: 1px solid #000;
  border-left: none;
  display: inline-block;
}

.simple-car-shape .car-head {
  width: 0;
  height: 0;
  border-top: 6.5px solid transparent;
  border-bottom: 6.5px solid transparent;
  border-left: 15px solid #000;
  margin-left: 2px;
}

.vehicle-casualty-table .casualty-side {
  padding: 0;
  vertical-align: top;
  white-space: normal !important;
  line-height: 0;
  font-size: 0;
}

.casualty-inner-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.casualty-inner-table th,
.casualty-inner-table td {
  border: 1px solid #000;
  padding: 0 2px;
  font-size: 8.8px;
  line-height: 1.08;
  vertical-align: middle;
  white-space: pre-wrap;
  word-break: break-word;
}

.casualty-inner-table tr:first-child th,
.casualty-inner-table tr:first-child td {
  border-top: none;
}

.casualty-inner-table tr:last-child th,
.casualty-inner-table tr:last-child td {
  border-bottom: none;
}

.casualty-inner-table th:first-child,
.casualty-inner-table td:first-child {
  border-left: none;
}

.casualty-inner-table th:last-child,
.casualty-inner-table td:last-child {
  border-right: none;
}

.casualty-inner-table .main-label {
  width: 54px;
  text-align: center;
  font-weight: 700;
}

.casualty-inner-table .main-label.no-box {
  border-right: none;
}

.casualty-inner-table .row-passengers .main-label,
.casualty-inner-table .row-passengers .value-cell {
  height: 16px;
}

.casualty-inner-table .row-passengers th,
.casualty-inner-table .row-passengers td {
  border-bottom: none;
}

.casualty-inner-table .row-passengers + tr th,
.casualty-inner-table .row-passengers + tr td {
  border-top: 1px solid #000;
}

.casualty-inner-table .row-level .main-label,
.casualty-inner-table .row-level .value-cell {
  height: 16px;
}

.casualty-inner-table .row-hospital-top > :not([rowspan]) {
  border-bottom: none;
}

.casualty-inner-table .row-hospital-bottom > * {
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
}

.casualty-inner-table .passenger-cell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

.casualty-inner-table .passenger-unit-inline {
  margin-left: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.casualty-inner-table .passenger-value {
  display: inline-block;
  min-width: 2.4ch;
  text-align: right;
}

.casualty-inner-table .yn-cell {
  width: 16px;
  min-width: 16px;
  height: 16px;
  text-align: center;
  padding: 0;
  line-height: 1;
  font-size: 8.2px;
  color: #555;
  font-weight: 400;
  position: relative;
}

.casualty-inner-table .yn-cell.active {
  color: #111;
  font-weight: 700;
}

.casualty-inner-table .yn-cell.active::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 1px solid #000;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.casualty-inner-table .sub-label {
  width: 50px;
  text-align: center;
  font-weight: 700;
}

.casualty-inner-table .value-cell {
  min-height: 10px;
}

.casualty-inner-table .unit-cell {
  width: 18px;
  text-align: center;
  font-weight: 700;
}

.casualty-inner-table tr:last-child th,
.casualty-inner-table tr:last-child td {
  padding-bottom: 0;
}

.manager-box {
  width: 98px;
  padding: 0 !important;
}

.manager-box-row {
  border-top: 1px solid #000;
  min-height: 22px;
  padding: 3px 4px;
  font-size: 9.6px;
}

.manager-box-row:first-child {
  border-top: none;
  font-weight: 700;
  text-align: center;
}

.manager-stamp {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vehicle-ruled-lines-table .ruled-line-cell {
  height: 16px;
  padding: 1px 4px;
  vertical-align: top;
  white-space: pre-wrap;
  word-break: break-word;
  border-top: none;
  border-bottom: 1px dotted #000;
  border-left: 1px solid #000;
  border-right: 1px solid #000;
}

.vehicle-ruled-lines-table.section-accident-response .ruled-line-cell {
  height: 10.7px;
  border-bottom: none;
}

.vehicle-ruled-lines-table.section-accident-response tr:first-child .ruled-line-cell {
  border-top: 1px solid #000;
}

.vehicle-ruled-lines-table.section-accident-response tr:last-child .ruled-line-cell {
  border-bottom: 1px solid #000;
}

.vehicle-ruled-lines-table.section-improvement .ruled-line-cell {
  height: 7.1px;
  border-bottom: none;
}

.vehicle-ruled-lines-table.section-improvement tr:first-child .ruled-line-cell {
  border-top: 1px solid #000;
}

.vehicle-ruled-lines-table.section-improvement tr:last-child .ruled-line-cell {
  border-bottom: 1px solid #000;
}

.vehicle-ruled-lines-table.section-improvement .ruled-line-cell.has-title {
  display: block;
}

.vehicle-ruled-lines-table.section-improvement .ruled-title {
  display: inline;
  margin-right: 8px;
  white-space: nowrap;
}

.vehicle-ruled-lines-table.section-improvement .ruled-value {
  display: inline;
  white-space: pre-wrap;
  word-break: break-word;
}

.vehicle-ruled-lines-table .ruled-line-cell.has-title {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.vehicle-ruled-lines-table .ruled-title {
  font-weight: 700;
  white-space: nowrap;
}

.vehicle-ruled-lines-table .ruled-value {
  flex: 1;
  min-width: 0;
}

.vehicle-ruled-lines-table .ruled-title-inline {
  font-weight: 700;
  margin-right: 8px;
}

.vehicle-ruled-lines-table.section-accident-response .ruled-line-cell.has-title {
  display: block;
}

.vehicle-ruled-lines-table.section-accident-response .ruled-line-cell.has-title::after {
  content: '';
  display: block;
  clear: both;
}

.vehicle-ruled-lines-table.section-accident-response .ruled-title {
  float: left;
  margin: 0 8px 0 0;
  white-space: nowrap;
  font-weight: 700;
}

.vehicle-ruled-lines-table.section-accident-response .ruled-value {
  display: block;
  margin: 0;
  padding: 0;
  white-space: pre-wrap;
}

.note-row {
  font-size: 9.6px;
  line-height: 1.35;
}

.corporate-pdf-form {
  border: none;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "MS PMincho", serif;
  color: #000;
  background: #fff;
}

.corporate-pdf-header {
  border: none;
  padding: 2px 8px 8px;
  position: relative;
}

.corporate-pdf-header h2 {
  margin: 0;
  font-size: 15.8px;
  text-align: center;
  letter-spacing: 0.055em;
}

.corporate-date {
  font-size: 10.4px;
  position: absolute;
  right: 8px;
  bottom: 3px;
  text-align: right;
}

.accident-pdf-table.corporate-table {
  border: none;
}

.corporate-table th,
.corporate-table td {
  padding: 4px 5px;
  font-size: 10px;
  line-height: 1.42;
  color: #000;
}

.corporate-table th {
  width: 24%;
  text-align: center;
  vertical-align: middle;
}

.corporate-prevention-cell {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.corporate-prevention-text {
  flex: 1;
  min-height: 100%;
}

.corporate-stamp-box {
  width: 80px;
  margin: 0 0 0 auto;
  border: 1px solid #000;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

.corporate-stamp-box .stamp-row {
  border-top: 1px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  padding: 1px 3px;
}

.corporate-stamp-box .stamp-row:first-child {
  border-top: none;
}

.corporate-stamp-box .stamp-done {
  flex: 1;
}

.corporate-stamp-box .stamp-date {
  min-height: 22px;
  justify-content: flex-start;
  padding-left: 5px;
}

.corporate-stamp-box .stamp-manager {
  height: 78px;
  min-height: 78px;
}

.corporate-note-row {
  border-top: 1px solid #000;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 7px;
  font-size: 9.5px;
}

.corporate-version {
  white-space: nowrap;
}

.corporate-inline-split {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.corporate-inline-name {
  flex: 1;
  display: flex;
  align-items: center;
}

.corporate-inline-service {
  min-width: 228px;
  border: 1px solid #000;
  display: inline-flex;
  align-items: center;
}

.corporate-inline-sex-age {
  min-width: 198px;
  border: 1px solid #000;
  display: inline-flex;
  align-items: center;
}

.corporate-inline-label {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-right: 1px solid #000;
  white-space: nowrap;
  font-size: 10px;
}

.corporate-inline-value {
  padding: 1px 7px;
}

.corporate-sex-choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 6px;
}

.corporate-sex-choice .sex-char {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  border: 1px solid transparent;
}

.corporate-sex-choice .sex-char.active {
  border-color: #000;
  border-radius: 50%;
}

.corporate-age {
  font-size: 10.4px;
}

.prefecture-pdf-form {
  border: none;
  color: #000;
  background: #fff;
  font-family: 'Yu Gothic', 'Hiragino Kaku Gothic ProN', sans-serif;
}

.prefecture-pdf-header {
  padding: 2px 6px 2px;
  text-align: center;
}

.prefecture-pdf-header-row {
  position: relative;
  min-height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prefecture-pdf-title {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.08em;
  font-weight: 400;
}

.prefecture-header-date {
  position: absolute;
  right: 0;
  bottom: 0;
  font-size: 9px;
  text-align: right;
  white-space: nowrap;
}

.prefecture-pdf-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border-top: none;
}

.prefecture-pdf-table th,
.prefecture-pdf-table td {
  border: 1px solid #000;
  padding: 4px 5px;
  font-size: 10px;
  line-height: 1.35;
  vertical-align: top;
  word-break: break-word;
  color: #000;
}

.prefecture-pdf-table th {
  font-weight: 400;
}

.prefecture-pdf-table th.label {
  width: 138px;
  font-weight: 400;
  background: #fff;
  color: #000;
}

.prefecture-address-cell {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.prefecture-pdf-table td.prefecture-address-compact-cell {
  padding: 0 6px;
}

.prefecture-postal-inline {
  border-bottom: 1px dashed #000;
  padding-bottom: 1px;
  min-height: 7px;
  font-size: 9.6px;
  line-height: 1.05;
}

.prefecture-address-inline {
  min-height: 10px;
  line-height: 1.1;
}

.prefecture-contact-grid {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 78px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  height: 100%;
}

.prefecture-pdf-table tr.prefecture-contact-row th.label {
  padding: 0 6px;
  line-height: 1.1;
  vertical-align: middle;
}

.prefecture-pdf-table td.prefecture-contact-cell {
  padding: 0;
}

.prefecture-contact-grid > span {
  padding: 1px 3px;
  display: flex;
  align-items: center;
  align-self: stretch;
  min-height: 14px;
  line-height: 1.1;
}

.prefecture-contact-grid > span + span {
  border-left: 1px solid #000;
}

.prefecture-contact-grid-shifted {
  grid-template-columns: minmax(0, 1fr) 78px minmax(0, 1fr);
}

.prefecture-contact-label {
  font-weight: 400;
}

.prefecture-gender-age-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.prefecture-gender-age-choice {
  font-size: 9.6px;
}

.prefecture-gender-age-text {
  white-space: nowrap;
  font-size: 9.6px;
}

.prefecture-pdf-table .cell-lg {
  min-height: 56px;
}

.prefecture-pdf-table .cell-xl {
  min-height: 84px;
}

.prefecture-pdf-table tr.prefecture-beneficiary-row th,
.prefecture-pdf-table tr.prefecture-beneficiary-row td {
  padding-top: 2px;
  padding-bottom: 2px;
  line-height: 1.1;
}

.prefecture-pdf-table tr.prefecture-category-row th,
.prefecture-pdf-table tr.prefecture-category-row td {
  padding-top: 2px;
  padding-bottom: 2px;
}

.prefecture-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 8px;
}

.prefecture-choice {
  padding: 0;
  min-height: 8px;
  display: inline-flex;
  align-items: center;
  font-size: 8.8px;
  line-height: 0.92;
  color: #000;
}

.prefecture-num {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  margin-right: 2px;
  line-height: 1;
  border: none;
  border-radius: 50%;
  font-size: 8.6px;
}

.prefecture-num.active {
  border: 1px solid #000;
}

.prefecture-other-line,
.prefecture-sub-line {
  margin-top: 3px;
  border-top: 1px dashed #777;
  padding-top: 2px;
  font-size: 9.1px;
  line-height: 1.05;
}

.prefecture-pdf-table tr.prefecture-abuse-row-wrap th,
.prefecture-pdf-table tr.prefecture-abuse-row-wrap td {
  padding-top: 2px;
  padding-bottom: 2px;
  line-height: 1.1;
}

.prefecture-abuse-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  line-height: 1;
}

.prefecture-abuse-choice {
  white-space: nowrap;
  font-size: 9.6px;
  color: #000;
  line-height: 1;
}

.prefecture-abuse-note {
  font-size: 8.8px;
  color: #000;
  text-align: right;
  line-height: 1.05;
}

.prefecture-abuse-choice .abuse-char {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid transparent;
  border-radius: 50%;
}

.prefecture-abuse-choice .abuse-char.active {
  border-color: #000;
}

.prefecture-note-row {
  border-top: 1px solid #000;
  padding: 4px 6px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
}

.prefecture-note-block {
  flex: 1;
  min-height: 16px;
}

.prefecture-note-small {
  color: #000;
  font-size: 8.6px;
  line-height: 1.35;
}

.prefecture-note-alert {
  color: #b50000;
  font-size: 9.6px;
  line-height: 1.4;
  margin-top: 2px;
}

.prefecture-version {
  font-size: 9.6px;
  white-space: nowrap;
}

.corporate-subline {
  margin-top: 3px;
  font-size: 9.6px;
  line-height: 1.3;
}

.stamp-cell {
  height: 42px;
  text-align: center;
  font-weight: 700;
}

table th, table td {
  border-bottom: 1px solid #e1eceb;
  padding: 9px;
  text-align: left;
  font-size: 0.93rem;
}
table th {
  background: #f1f9f9;
  color: #1e5a5d;
  position: sticky;
  top: 0;
}

input:focus, select:focus, textarea:focus, button:focus {
  outline: 3px solid rgba(17, 107, 112, 0.24);
  outline-offset: 1px;
}

.permission-error {
  text-align: center;
  padding: 30px;
  background: var(--danger-soft);
  border: 1px solid #f2c3c3;
  border-radius: var(--radius);
}

.print-only { display: none; }

@page {
  size: A4 portrait;
  margin: 10mm;
}

/* iPad含むタブレット幅で、Step7のA4プレビューを横スクロールなしで収める */
@media (max-width: 1180px) {
  .accident-pdf-preview-wrap {
    overflow-x: hidden;
    padding: 8px;
  }

  .accident-pdf-preview-wrap .accident-pdf-a4,
  .accident-pdf-inline-wrap .accident-pdf-a4 {
    width: 100%;
    max-width: 100%;
    min-height: auto;
    padding: 4mm;
  }
}

@media (min-width: 768px) and (max-width: 1180px) {
  .form-group.accident-datetime-group input {
    width: 50%;
    min-width: 0;
  }

  .form-group.accident-datetime-group {
    padding-right: 8px;
  }

  .route-hiyari-list .hiyari-list-card {
    border: 2px solid var(--main);
  }
  .route-hiyari-list .hiyari-list-card.hiyari-list-card-ipad .hiyari-card-side-main {
    padding-right: 112px;
  }
  .route-hiyari-list .hiyari-list-card.hiyari-list-card-ipad .hiyari-action-toggle-row {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 11px;
  }
  .route-hiyari-list .hiyari-list-card.hiyari-list-card-ipad .hiyari-card-ipad-top-actions .hiyari-action-minor-pdf-top,
  .route-hiyari-list .hiyari-list-card.hiyari-list-card-ipad .hiyari-card-ipad-top-actions [data-action='print-one'] {
    min-height: 34px;
    padding: 6px 11px;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 10px;
  }

  .route-hiyari-list .hiyari-tools-panel[open] .hiyari-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
  }

  .route-hiyari-list .hiyari-tools-panel[open] .hiyari-filter-row > * {
    min-width: 0;
    max-width: 100%;
  }

  .route-hiyari-list .hiyari-tools-panel[open] .hiyari-filter-row select,
  .route-hiyari-list .hiyari-tools-panel[open] .hiyari-filter-row input,
  .route-hiyari-list .hiyari-tools-panel[open] .hiyari-filter-row button {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .route-hiyari-list .hiyari-tools-panel[open] .hiyari-filter-row > input[type='month'] {
    grid-column: 1 / -1;
    justify-self: start;
    width: min(100%, 320px);
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .hiyari-initial-base {
    margin-top: 12px;
  }

  .hiyari-initial-step-block {
    width: min(100%, 500px);
  }

  .hiyari-initial-datetime-shell {
    min-height: 78px;
    padding: 14px 56px;
  }

  .hiyari-initial-datetime-display {
    font-size: clamp(1.4rem, 1.08rem + 0.72vw, 1.8rem);
    font-weight: 800;
  }

  .hiyari-initial-datetime-display.is-placeholder {
    font-size: 1.02rem;
    font-weight: 700;
  }
}

@media (max-width: 1100px) {
  .nav-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav-pairs { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  body {
    font-size: 16px;
    overflow-x: hidden;
  }
  .app-shell {
    padding: 8px;
    overflow-x: clip;
  }
  .login-loading-overlay {
    padding: 12px;
  }
  .login-loading-card {
    width: min(100%, 360px);
    max-width: calc(100% - 24px);
    padding: 16px 20px;
  }
  .login-loading-title {
    font-size: 1.12rem;
  }

  .login-loading-sub {
    font-size: 0.95rem;
  }

  .login-loading-spinner {
    width: 30px;
    height: 30px;
    border-width: 3.5px;
  }

  .login-screen .login-card-wrap {
    max-width: 100%;
  }
  .login-screen .login-grid > .card {
    max-width: 100%;
  }
  .card {
    padding: 10px;
    border-radius: 12px;
  }
  .grid-3, .grid-2, .form-grid, .admin-menu-grid, .menu-btn-grid, .accident-layout { grid-template-columns: 1fr; }
  .filter-row { grid-template-columns: 1fr; }
  .form-group,
  .form-group > * {
    min-width: 0;
  }
  .form-group input,
  .form-group select,
  .form-group textarea,
  .actions-row button {
    max-width: 100%;
  }
  .filter-row input[type='month'] {
    width: 100%;
    min-width: 0;
  }
  .item-card,
  .accident-pane button.item-card,
  .today-memo-a4-sheet {
    max-width: 100%;
    min-width: 0;
  }
  .hiyari-initial-base,
  .hiyari-initial-center-zone,
  .hiyari-initial-step-block,
  .hiyari-initial-grid,
  .hiyari-initial-group {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .hiyari-initial-base {
    margin-top: 10px;
  }
  .hiyari-initial-grid {
    grid-template-columns: minmax(0, 1fr);
    justify-content: center;
    gap: 12px;
  }
  .hiyari-initial-group {
    max-width: 100%;
  }
  .hiyari-initial-datetime-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .hiyari-initial-input-guide {
    margin: 0 0 4px;
    font-size: 0.78rem;
    color: #5f7381;
  }
  .hiyari-initial-datetime-shell {
    min-height: 56px;
    padding: 10px 42px;
  }
  .hiyari-initial-datetime-display {
    font-size: 1.2rem;
    font-weight: 800;
  }
  .hiyari-initial-datetime-display.is-placeholder {
    font-size: 0.92rem;
    font-weight: 700;
  }
  .hiyari-tools-panel {
    border: 1px solid #dce8ec;
    border-radius: 10px;
    background: #fbfdfd;
    overflow: hidden;
  }
  .hiyari-tools-panel > summary.hiyari-tools-summary {
    padding: 7px 8px;
    gap: 7px;
  }
  .hiyari-tools-panel > summary.hiyari-tools-summary .hiyari-tools-summary-trigger {
    padding: 5px 8px;
  }
  .hiyari-tools-panel > summary.hiyari-tools-summary .hiyari-tools-summary-trigger-label {
    font-size: 0.8rem;
  }
  .hiyari-tools-panel > summary.hiyari-tools-summary .hiyari-tools-summary-status {
    gap: 5px;
  }
  .hiyari-tools-panel > summary.hiyari-tools-summary .hiyari-tools-status-chip {
    font-size: 0.72rem;
    padding: 3px 7px;
  }
  .hiyari-tools-body {
    display: none;
  }
  .hiyari-tools-panel[open] .hiyari-tools-body {
    display: block;
    margin-top: 10px;
    padding: 12px;
    border: 1px solid #e1ebef;
    border-radius: 10px;
    background: #fcfefe;
  }
  .hiyari-filter-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 10px;
  }
  .hiyari-filter-footer .actions-row {
    margin-left: 0;
    justify-content: flex-start;
  }

  .header {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
    position: relative;
  }
  .title-main {
    font-size: 1.22rem;
    line-height: 1.2;
  }
  .header-meta-stack {
    gap: 4px;
    padding-right: 76px;
  }
  .header-org-line {
    font-size: 0.76rem;
    color: #6f8390;
  }
  .header-org-value {
    font-weight: 700;
    color: #486372;
  }
  .header-org-value.is-unset {
    font-weight: 600;
    color: #7a8f9d;
  }
  .header-login-summary-line {
    font-size: 0.9rem;
    color: #2b495b;
  }
  .header-login-user-joined {
    display: none;
  }
  .header-login-user-name {
    max-width: min(24ch, 62vw);
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
  }
  .header-login-user-role {
    font-weight: 700;
  }
  .header-active-context-line {
    font-size: 0.78rem;
    color: #2c5a38;
    padding: 5px 8px;
    border: 1px solid #d2e7d8;
    border-radius: 10px;
    background: #f6fcf8;
    width: fit-content;
    max-width: 100%;
  }
  .header-active-context-value {
    color: #2f5f39;
  }
  .header-side-actions {
    position: absolute;
    top: 6px;
    right: 10px;
    min-width: 0;
    min-height: 0;
    width: auto;
    margin-top: 0;
    z-index: 30;
    gap: 6px;
  }
  .header-side-top {
    width: auto;
    justify-content: flex-end;
  }
  .header-side-bottom {
    width: auto;
  }
  .header-last-updated {
    display: none;
  }
  .header-action-btn-refresh {
    display: none;
  }
  .header-mobile-actions-menu {
    margin-left: auto;
  }
  .header-mobile-actions-menu > summary {
    min-height: 44px;
    min-width: 58px;
    padding: 0 11px;
    font-size: 0.79rem;
    gap: 5px;
    border-radius: 11px;
    border-color: #cfdee4;
  }
  .header-mobile-actions-label {
    display: inline;
    font-size: 0.75rem;
    letter-spacing: 0.01em;
    color: #466a77;
  }
  .header-actions-row-mobile-menu {
    top: calc(100% + 6px);
    min-width: 204px;
    border-radius: 11px;
  }
  .header-actions-row-mobile-menu .header-action-btn {
    min-height: 44px;
    padding: 8px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 9px;
  }
  .header-actions-row-mobile-menu .header-action-btn-secondary {
    opacity: 0.96;
    font-weight: 600;
  }
  .header-actions-row-mobile-menu .header-action-btn-admin {
    border-color: #d8e3e8;
    color: #4f6772;
    background: #fbfcfd;
  }
  .header-actions-row-mobile-menu .btn-soft-danger.header-action-btn {
    border-color: #e6cdd1;
    color: #88535c;
    background: #fff8f9;
  }
  .header-menu-refresh-mobile {
    display: inline-flex;
  }
  .header-guide-btn {
    width: auto;
  }
  .nav-group-wrap .nav-btn-admin {
    border-color: #dbe6ea;
    background: #fafcfd;
    color: #6e828d;
    font-weight: 600;
  }
  .header-kpis {
    display: none;
  }

  .nav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-group-wrap {
    gap: 6px;
    margin-top: 8px;
  }
  .nav-group-wrap .nav-top-row,
  .nav-group-wrap .nav-top-row-auto {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .nav-group-wrap .nav-pairs {
    gap: 6px;
  }
  .nav-group-block {
    border: 1px solid #e3efee;
    border-radius: 10px;
    padding: 7px;
    background: #ffffff;
  }
  .nav-group-label {
    font-size: 0.73rem;
    margin-bottom: 4px;
    color: #49666f;
  }
  .nav-group-buttons { grid-template-columns: 1fr; }
  .nav-group-wrap .nav-btn {
    width: 100%;
    min-height: 34px;
    padding: 6px 8px;
    font-size: 0.8rem;
    border-radius: 10px;
  }
  .nav-group-wrap .nav-btn-primary {
    font-size: 0.84rem;
    box-shadow: 0 1px 0 rgba(12, 83, 87, 0.14);
  }
  .nav-group-wrap .nav-top-row .nav-btn,
  .nav-group-wrap .nav-top-row-auto .nav-btn {
    min-height: 30px;
    font-size: 0.74rem;
    font-weight: 600;
  }
  .nav-group-wrap {
    display: none;
  }
  .mobile-route-assist {
    display: block;
    margin-top: 6px;
    padding: 7px 8px;
    border-radius: 11px;
  }
  .mobile-route-assist-row {
    gap: 5px;
  }
  .mobile-route-assist-btn {
    min-height: 28px;
    padding: 4px 9px;
    font-size: 0.72rem;
  }
  .route-hiyari-list .mobile-route-assist-row {
    gap: 8px;
  }
  .route-hiyari-list .mobile-route-assist-btn {
    min-height: 38px;
    padding: 7px 12px;
    font-size: 0.86rem;
    font-weight: 700;
  }
  .route-hiyari-list .hiyari-list-page-title,
  .route-hiyari-list .title-main {
    font-size: 1.34rem;
    line-height: 1.24;
  }

  .home-mobile-action-stack {
    display: grid;
    gap: 7px;
    margin-bottom: 8px;
  }
  .home-mobile-action-stack + .hero {
    margin-top: 4px;
  }
  .home-mobile-action-primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .home-mobile-action-secondary {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .home-mobile-action-btn {
    min-height: 36px;
    border-radius: 10px;
    font-size: 0.81rem;
    font-weight: 700;
    padding: 7px 10px;
  }
  .home-mobile-action-btn-primary {
    min-height: 42px;
    font-size: 0.86rem;
    box-shadow: 0 2px 0 rgba(12, 83, 87, 0.14);
  }
  .home-mobile-action-btn-secondary {
    font-weight: 600;
    border-color: #cde1e3;
    color: #2d5d67;
    background: #f9fcfc;
  }
  .home-mobile-action-admin {
    display: none;
    margin-top: 4px;
    margin-bottom: 4px;
  }
  .home-mobile-action-btn-admin {
    min-height: 30px;
    font-size: 0.74rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 5px 10px;
  }

  .home-hero-card {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .hiyari-filter-row select,
  .hiyari-filter-row input {
    min-height: 35px;
    padding: 7px 9px;
    font-size: 0.8rem;
  }
  .hiyari-filter-row select[data-action='set-h-view'] {
    color: #607684;
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0.88;
  }
  .route-hiyari-list .data-list {
    overflow-x: hidden;
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }
  .route-hiyari-list .item-card {
    padding: 10px;
    border-radius: 11px;
  }
  .route-hiyari-list .hiyari-list-card {
    border: 2px solid var(--main);
  }
  .route-hiyari-list .hiyari-card-title {
    font-size: 0.95rem;
    line-height: 1.42;
  }
  .route-hiyari-list .hiyari-card-summary-text,
  .route-hiyari-list .hiyari-card-context-row,
  .route-hiyari-list .hiyari-card-submeta-row {
    font-size: 0.81rem;
    line-height: 1.36;
  }
  .route-hiyari-list .hiyari-list-card:not(.hiyari-list-card-ipad) .hiyari-card-side-main > .hiyari-card-submeta-row {
    display: none;
  }
  .route-hiyari-list .hiyari-status-badge {
    min-height: 22px;
    padding: 2px 8px;
    font-size: 0.73rem;
  }
  .route-hiyari-list .hiyari-card-action-main {
    width: 100%;
    gap: 5px;
  }
  .route-hiyari-list .hiyari-list-card:not(.hiyari-list-card-ipad) .hiyari-card-side-actions {
    padding-top: 14px;
    gap: 8px;
  }
  .route-hiyari-list .hiyari-list-card:not(.hiyari-list-card-ipad) .hiyari-action-primary {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 11px;
  }
  .route-hiyari-list .hiyari-list-card:not(.hiyari-list-card-ipad) .hiyari-action-primary::after {
    content: '▾';
    margin-left: auto;
    font-size: 1.45em;
    font-weight: 800;
    line-height: 1;
    display: inline-flex;
    align-items: center;
  }
  .route-hiyari-list .hiyari-list-card.detail-open:not(.hiyari-list-card-ipad) .hiyari-action-primary::after {
    content: '▴';
  }
  .route-hiyari-list .hiyari-list-card-ipad .hiyari-card-side-main {
    padding-right: 96px;
  }
  .route-hiyari-list .hiyari-list-card-ipad .hiyari-card-title-row-ipad .hiyari-card-tag-row-inline {
    max-width: 52%;
  }
  .route-hiyari-list .hiyari-action-primary {
    min-height: 32px;
    padding: 5px 9px;
    font-size: 0.77rem;
    border-radius: 10px;
  }
  .route-hiyari-list .hiyari-card-action-sub {
    gap: 5px;
  }
  .route-hiyari-list .hiyari-action-minor {
    min-height: 28px;
    padding: 3px 8px;
    font-size: 0.72rem;
    border-radius: 9px;
  }
  .route-hiyari-list .hiyari-list-card:not(.hiyari-list-card-ipad) .hiyari-card-action-main > [data-action='open-hiyari-body-editor'],
  .route-hiyari-list .hiyari-list-card:not(.hiyari-list-card-ipad) .hiyari-card-action-main > [data-action='print-one'],
  .route-hiyari-list .hiyari-list-card:not(.hiyari-list-card-ipad) .hiyari-card-action-main > button.hiyari-action-minor:disabled[title*='管理者または本人作成分のみ編集できます'] {
    display: none;
  }
  .route-hiyari-list .list-card-footer {
    align-items: stretch;
    gap: 7px;
  }
  .route-hiyari-list .card-select-check {
    align-self: flex-end;
  }
  .hiyari-filter-footer .meta-text {
    font-size: 0.82rem;
    color: #5f7381;
  }
  .hiyari-filter-footer .actions-row button {
    min-height: 30px;
    padding: 4px 9px;
    font-size: 0.74rem;
    font-weight: 600;
    border-radius: 10px;
  }
  .route-hiyari-list .hiyari-tools-panel > summary.hiyari-tools-summary {
    padding: 9px 10px;
  }
  .route-hiyari-list .hiyari-tools-panel > summary.hiyari-tools-summary .hiyari-tools-summary-trigger {
    min-height: 38px;
    padding: 7px 11px;
  }
  .route-hiyari-list .hiyari-tools-panel > summary.hiyari-tools-summary .hiyari-tools-summary-trigger-label {
    font-size: 0.9rem;
    font-weight: 700;
  }
  .route-hiyari-list .hiyari-filter-footer .actions-row button,
  .route-hiyari-list .hiyari-filter-footer .actions-row [data-action='reset-h-filters'],
  .route-hiyari-list .hiyari-filter-footer .actions-row [data-action='apply-h-filters'] {
    min-height: 38px;
    padding: 7px 12px;
    font-size: 0.86rem;
    font-weight: 700;
  }
  .route-hiyari-list .hiyari-pdf-actions {
    gap: 8px;
    align-items: stretch;
    flex-direction: column;
  }
  .route-hiyari-list .hiyari-pdf-action-btn {
    width: 100%;
    min-height: 38px;
    max-width: 100%;
    box-sizing: border-box;
    padding: 7px 12px;
    font-size: 0.84rem;
    font-weight: 700;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.35;
    justify-content: center;
    text-align: center;
  }
  .route-hiyari-list .hiyari-list-card:not(.hiyari-list-card-ipad) .hiyari-action-primary {
    min-height: 42px;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 700;
  }
  .hero-title {
    font-size: 1rem;
    margin-bottom: 3px;
  }
  .hero-desc {
    font-size: 0.79rem;
    line-height: 1.35;
  }

  .calendar-day { min-height: 104px; }
  .route-home .chart-card {
    min-height: 176px;
    padding: 7px 7px 5px;
  }
  .section-title {
    font-size: 1.03rem;
    margin-bottom: 6px;
  }
  .route-home .chart-card .section-title {
    font-size: 0.92rem;
    margin-bottom: 4px;
  }
  .route-home .chart-wrap {
    height: 124px;
    margin-bottom: 0;
  }
  .route-home .chart-wrap canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
  }
  .route-home section.grid-2[style],
  .route-home section.grid-3[style] {
    margin-top: 8px !important;
  }
  .accident-report-type-grid { grid-template-columns: 1fr; }
  .accident-report-type-card { min-height: 86px; }
  .accident-step-mobile-summary {
    display: block;
    margin-bottom: 8px;
    padding: 7px 10px;
    border: 1px solid #d4e9e8;
    border-radius: 10px;
    background: #f8fcfc;
    color: #2d5a6b;
    font-size: 0.82rem;
    font-weight: 700;
  }
  .accident-step-chip-row {
    display: none;
  }
  .accident-layout {
    display: flex;
  }
  .accident-pane-left,
  .accident-pane-right {
    min-width: 0;
  }
  .accident-splitter {
    display: block;
  }
  .hiyari-pdf-actions {
    margin-top: 3px;
    padding-top: 3px;
    border-top: 1px dashed #e4ecef;
    gap: 5px;
  }
  .hiyari-pdf-action-btn {
    min-height: 28px;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 10px;
    color: #5f7381;
    border-color: #dbe6ec;
    background: #fbfdff;
  }
  .hiyari-pdf-action-btn-primary {
    background: #f7fafd;
    color: #4b6678;
    border-color: #dbe5ed;
  }
  .hiyari-pdf-action-btn-primary:disabled {
    opacity: 0.42;
    background: #f7fafc;
    color: #8ea0ad;
    border-color: #e2e9ee;
  }
  .accident-list-item-card {
    padding: 10px;
  }
  .accident-list-card-type {
    font-size: 0.9rem;
    font-weight: 700;
  }
  .accident-list-card-primary {
    font-size: 0.9rem;
    line-height: 1.45;
  }
  .accident-list-case-id {
    font-size: 0.75rem;
    margin-top: 2px;
    overflow-wrap: anywhere;
  }
  .accident-list-card-head .badge {
    font-size: 0.73rem;
    padding: 2px 8px;
  }
}

@media (min-width: 768px) and (max-width: 1180px) {
  .route-accident-list .accident-pdf-preview-mobile-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .route-accident-list .accident-pdf-preview-scroll {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: visible;
    overflow-y: visible;
    justify-content: center;
    box-shadow: none;
  }

  .route-accident-list .accident-pdf-preview-scroll .accident-pdf-preview-document {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: 1 1 auto;
  }

  .route-accident-list .accident-pdf-preview-scroll .accident-pdf-a4 {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: auto;
    margin: 0 auto;
    flex: 1 1 auto;
  }
}

@media (max-width: 767px) {
  .route-accident-list .accident-layout {
    display: block;
  }

  .route-accident-list .accident-splitter {
    display: none;
  }

  .route-accident-list .accident-mobile-list-view,
  .route-accident-list .accident-mobile-detail-view,
  .route-accident-list .accident-mobile-detail-view > .card,
  .route-accident-list .accident-mobile-list-view > .card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .route-accident-list .accident-mobile-detail-view {
    overflow-x: hidden;
  }

  .route-accident-list .accident-mobile-back-btn {
    width: 100%;
    min-height: 46px;
    margin-bottom: 8px;
    box-sizing: border-box;
  }

  .route-accident-list .accident-mobile-detail-cue,
  .route-accident-misregistration-box .accident-mobile-detail-cue {
    display: inline-flex;
    margin-top: 8px;
    align-items: center;
    gap: 6px;
    color: #1e5f95;
    font-weight: 700;
    font-size: 0.88rem;
    line-height: 1.2;
  }

  .route-accident-misregistration-box .accident-mobile-back-btn {
    width: 100%;
    min-height: 46px;
    margin-bottom: 8px;
    box-sizing: border-box;
  }

  .route-accident-list .accident-pdf-preview-scroll-hint {
    display: block;
    margin: 0 0 8px;
    font-size: 0.86rem;
    line-height: 1.35;
    color: #2f6c57;
    font-weight: 600;
  }

  .route-accident-list .accident-pdf-preview-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    box-sizing: border-box;
    box-shadow: inset 10px 0 8px -10px rgba(17, 107, 112, 0.22), inset -10px 0 8px -10px rgba(17, 107, 112, 0.22);
  }

  .route-accident-list .accident-pdf-preview-scroll .accident-pdf-preview-document {
    width: max-content;
    min-width: max-content;
    max-width: none;
    flex: 0 0 auto;
  }

  .route-accident-list .accident-pdf-preview-scroll .accident-pdf-a4 {
    width: 210mm;
    min-width: 210mm;
    max-width: none;
    min-height: 297mm;
    flex: 0 0 auto;
    margin: 0;
  }

  .route-accident-list .accident-pdf-preview-scroll .accident-pdf-a4 table {
    max-width: none;
  }

  .route-accident-list .accident-pdf-preview-scroll .accident-pdf-a4 th,
  .route-accident-list .accident-pdf-preview-scroll .accident-pdf-a4 td {
    word-break: normal;
    overflow-wrap: normal;
  }
}

@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; inset: 0; background: #fff; }
}

/* HQ management screen */
.hq-root {
  display: grid;
  gap: 10px;
}
.hq-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.hq-tab-btn {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.9rem;
}
.hq-tab-btn.active {
  background: var(--main);
  border-color: var(--main);
  color: #fff;
}
.hq-card {
  display: grid;
  gap: 8px;
}
.hq-scope-notice {
  border: 1px solid #c8dcff;
  background: #edf4ff;
  border-radius: 10px;
  padding: 10px;
  color: #274f7f;
  font-size: 0.9rem;
}
.hq-facility-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.hq-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}
.hq-table th,
.hq-table td {
  border: 1px solid #d7e4e8;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 0.92rem;
}
.hq-table th {
  background: #f4fafb;
  color: #265d62;
}
.hq-inline-editor {
  background: #f8fcfd;
}
.hq-filter-row {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.hq-accident-card .supervisor-status-head h4 {
  margin: 0;
}
.hq-supervisor-format-grid {
  --hq-columns: 14;
  --hq-split-at: 7;
  display: grid;
  grid-template-columns: repeat(var(--hq-columns), minmax(0, 1fr));
  gap: 4px;
  margin-top: 8px;
}
.hq-supervisor-label-cell,
.hq-supervisor-empty-cell {
  min-height: 52px;
  border: 1px solid #d2dce5;
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.84rem;
  color: #26424f;
  position: relative;
}
.hq-supervisor-format-grid > :nth-child(var(--hq-split-at)) {
  box-shadow: 1px 0 0 0 #7a98b2;
}
.hq-supervisor-label-cell.selected {
  border-color: #1d6fd6;
  background: #e8f1ff;
}
.hq-cell-selected-text {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  color: #1d6fd6;
  font-weight: 700;
}
.hq-supervisor-draft-popup {
  margin-top: 8px;
  border: 1px dashed #8bb0d2;
  border-radius: 10px;
  padding: 10px;
  background: #f4f9ff;
}

.format-footer-preview-line {
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.format-footer-preview-line + .format-footer-preview-line {
  margin-top: 2px;
}

@media (max-width: 960px) {
  .hq-facility-grid {
    grid-template-columns: 1fr;
  }
  .hq-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
