:root {
  --leiwa-ink: #173c40;
  --leiwa-teal: #176b63;
  --leiwa-teal-dark: #10544e;
  --leiwa-sand: #f4f4ef;
  --leiwa-border: #a9b8b2;
  /* Measured navbar height (about 73px at every width); the guest hero fills the rest. */
  --leiwa-header-height: 73px;
  /* Page tone behind white cards and inputs; strong enough for older users to see the edges. */
  --leiwa-page-bg: #dfe7e3;
  --bs-body-font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  --bs-body-color: var(--leiwa-ink);
  /* Bootstrap paints inputs, cards, tables and modals with --bs-body-bg: keep them white. */
  --bs-body-bg: #fff;
  --bs-secondary-color: #46524f;
  --bs-secondary-rgb: 70, 82, 79;
  --bs-link-color: var(--leiwa-teal);
  --bs-link-hover-color: var(--leiwa-teal-dark);
  --bs-border-color: var(--leiwa-border);
}

body {
  background-color: var(--leiwa-page-bg);
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  line-height: 1.8;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  touch-action: manipulation;
}

:focus-visible {
  outline: 3px solid #b46b13;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1100;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: #fff;
  color: var(--leiwa-ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--leiwa-border);
  background: #fff;
}

.navbar {
  --bs-navbar-color: var(--leiwa-ink);
  --bs-navbar-hover-color: var(--leiwa-teal);
  --bs-navbar-brand-color: var(--leiwa-ink);
  --bs-navbar-brand-hover-color: var(--leiwa-teal);
  padding-block: 0.85rem;
}

.navbar-brand {
  margin-right: 0.5rem;
  font-size: clamp(0.9rem, 3.7vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.025em;
  white-space: normal;
}

.navbar-toggler {
  min-height: 44px;
  padding: 0.3rem 0.5rem;
  border-color: var(--leiwa-border);
}

.navbar-nav {
  padding-top: 0.75rem;
}

.nav-link {
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 500;
}

.btn {
  --bs-btn-padding-x: 1.25rem;
  --bs-btn-padding-y: 0.65rem;
  --bs-btn-border-radius: 0.6rem;
  min-height: 48px;
  font-weight: 600;
}

.btn-lg {
  --bs-btn-padding-x: 1.5rem;
  --bs-btn-padding-y: 0.9rem;
  --bs-btn-font-size: 1rem;
  --bs-btn-border-radius: 0.6rem;
  min-height: 56px;
}

.form-control,
.form-select {
  min-height: 48px;
  font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--leiwa-teal);
  box-shadow: 0 0 0 0.25rem rgb(23 107 99 / 15%);
}

.form-label {
  font-weight: 600;
}

.guest-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--leiwa-header-height));
  min-height: calc(100svh - var(--leiwa-header-height));
  background: var(--leiwa-ink) url("/static/img/hero.webp") center / cover no-repeat;
  color: #fff;
}

.guest-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgb(11 35 39 / 90%), rgb(11 35 39 / 62%));
  content: "";
}

.guest-hero-inner {
  display: flex;
  width: 100%;
  flex: 1;
  align-items: center;
  padding-block: 4rem;
}

.hero-copy {
  max-width: 42rem;
}

.hero-eyebrow {
  margin-bottom: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.hero-eyebrow {
  color: #d8eee5;
}

.hero-copy h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(2rem, 5.2vw, 3.7rem);
  letter-spacing: 0.03em;
  line-height: 1.55;
}

.hero-description {
  margin-bottom: 2rem;
  color: #f0f5f2;
  line-height: 2;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.hero-note {
  margin-top: 1.5rem;
  margin-bottom: 0;
  color: #d8eee5;
  font-size: 0.8rem;
}

.site-footer {
  padding-block: 1.5rem;
  border-top: 1px solid var(--leiwa-border);
  background: #fff;
  font-size: 0.8rem;
}

.site-footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer a {
  margin-left: 0.5rem;
  text-underline-offset: 0.2em;
}

.modal-content {
  overflow: hidden;
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 1.5rem 5rem rgb(11 35 39 / 20%);
}

.modal-header,
.modal-body,
.modal-footer {
  padding: 1.25rem;
}

.modal-header {
  background: #f4f8f5;
}

.modal-footer {
  gap: 0.5rem;
}

.error-page {
  display: grid;
  min-height: 65vh;
  align-items: center;
  padding-block: 4rem;
}

.error-panel {
  max-width: 44rem;
  margin-inline: auto;
  text-align: center;
}

.error-code {
  margin-bottom: 0.5rem;
  color: var(--leiwa-teal);
  font-size: clamp(4rem, 16vw, 6rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.error-panel h1 {
  margin-bottom: 1rem;
  font-size: clamp(1.4rem, 4vw, 2rem);
}

.error-panel .btn {
  margin-top: 1rem;
}

@media (min-width: 576px) {
  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .hero-actions .btn {
    min-width: 12rem;
  }

  .site-footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (min-width: 992px) {
  .guest-hero-inner {
    padding-block: 5rem;
  }

  .guest-hero::before {
    background: linear-gradient(90deg, rgb(11 35 39 / 88%), rgb(11 35 39 / 28%));
  }
}

@media (min-width: 1200px) {
  .navbar-nav {
    padding-top: 0;
  }
}

.login-page main {
  display: flex;
  align-items: center;
  background: linear-gradient(rgb(11 35 39 / 72%), rgb(11 35 39 / 72%)), url("/static/img/hero.webp") center / cover no-repeat;
}

.login-page .card {
  background: #fff;
}

.customer-photo,
.customer-thumbnail {
  flex-shrink: 0;
  border: 1px solid var(--leiwa-border);
  border-radius: 0.75rem;
  background: #fff;
  object-fit: cover;
}

.customer-photo {
  width: 160px;
  height: 160px;
}

.customer-thumbnail {
  width: 64px;
  height: 64px;
}

.customer-list {
  min-width: 760px;
}

.photo-crop-stage {
  height: min(55vh, 440px);
  min-height: 240px;
  overflow: hidden;
  background: var(--leiwa-sand);
}

.photo-crop-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

/* Keep absolute screen-reader labels inside the horizontally scrolling table. */
.table-responsive {
  position: relative;
}

@media (max-width: 767.98px) {
  .customer-history,
  .customer-history tbody,
  .customer-history tr,
  .customer-history th,
  .customer-history td {
    display: block;
  }

  .customer-history thead {
    display: none;
  }

  .customer-history tr {
    margin-bottom: 1.5rem;
  }
}

.trip-records-table {
  min-width: 64rem;
}
