:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --text: #123042;
  --muted: #5b7286;
  --accent: #0d6efd;
  --accent-2: #1677ff;
  --border: #dbe6f0;
  --shadow: 0 24px 60px rgba(10, 30, 48, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f7fbff 0%, var(--bg) 100%);
  line-height: 1.6;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 2rem; background: rgba(255,255,255,0.9); backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(13,110,253,0.08);
}
.brand { font-size: 1.4rem; font-weight: 800; letter-spacing: 0.24em; line-height: 1.25; }
.brand-line-1,
.brand-line-2 {
  display: inline;
}
.route-arrow {
  display: inline-block;
  font-size: 1.12em;
  font-weight: 800;
  transform: scaleX(1.35);
}
.header-brand { display: flex; align-items: center; gap: 0.8rem; }
.logo { height: 3.5rem; width: auto; }
.logo-main { height: 3.5rem; }
.logo-secondary {
  width: 4.6rem;
  height: 4.6rem;
  object-fit: contain;
  object-position: center;
  background: #ffffff;
  border-radius: 1.15rem;
  overflow: hidden;
  flex-shrink: 0;
}
.topnav { display: flex; gap: 1.2rem; font-weight: 600; color: var(--muted); align-items: center; }
.login-button { padding: 0.55rem 1rem; border-radius: 999px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; box-shadow: 0 10px 24px rgba(13,110,253,0.16); }
.modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 24, 38, 0.56);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 100;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-dialog {
  position: relative;
  width: min(100%, 420px);
  background: white;
  border-radius: 1.2rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.modal-close { position: absolute; top: 0.8rem; right: 0.8rem; border: 0; background: transparent; font-size: 1.4rem; cursor: pointer; }
.app-notice-dialog {
  width: min(100%, 440px);
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  border: 1px solid var(--border);
}
.app-notice-title { margin: 0 0 0.6rem; }
.app-notice-text { margin: 0; color: var(--muted); font-size: 1.05rem; }
.app-notice-actions { margin-top: 1.2rem; display: flex; justify-content: center; }
.login-form { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 1rem; }
.login-form label { display: flex; flex-direction: column; gap: 0.4rem; font-weight: 600; color: var(--muted); }
.login-form input { padding: 0.8rem 0.9rem; border: 1px solid var(--border); border-radius: 0.8rem; font: inherit; }
.login-message { margin: 0; font-size: 0.95rem; color: #c0392b; }
.admin-panel { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.admin-panel[hidden] { display: none; }
.notice-editor { display: flex; flex-direction: column; gap: 0.6rem; width: 100%; margin-top: 0.6rem; }
.notice-editor label { font-weight: 700; color: var(--text); }
.notice-editor textarea, .timetable-editor textarea { width: 100%; padding: 0.8rem 1rem; border: 1px solid var(--border); border-radius: 0.9rem; font: inherit; resize: vertical; }
.timetable-editor { display: flex; flex-direction: column; gap: 0.6rem; width: 100%; margin-top: 1rem; }
.timetable-editor h4 { margin: 0; }
.timetable-editor label { font-weight: 700; color: var(--text); }
.timetable-category { margin-top: 1rem; }
.timetable-category h4 { margin: 0 0 0.6rem; font-size: 1rem; color: var(--accent); }
.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2rem; align-items: center;
  padding: 4rem 2rem 3rem; max-width: 1220px; margin: 0 auto;
}
.eyebrow { margin: 0 0 0.7rem; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); }
.hero h1, .hero h2 { margin: 0; }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }
.status-title { display: inline-flex; align-items: center; gap: 0.7rem; line-height: 1; }
.status-dot { width: 1rem; height: 1rem; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 0.22rem rgba(46, 204, 113, 0.2); display: inline-block; flex-shrink: 0; align-self: center; }
.hero h2 { margin-top: 0.2rem; font-size: clamp(1.5rem, 3vw, 2.3rem); color: var(--muted); }
.hero-departure-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 100%; }
.hero-timebox {
  display: inline-flex; align-items: center; gap: 1rem; margin: 1.5rem 0 1.6rem;
  padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: 1.25rem; box-shadow: var(--shadow);
}
.hero-schedule-button { margin-top: -0.1rem; margin-right: 3rem; }
.hero-copy.is-paused .hero-departure-row { justify-content: flex-start; gap: 1.9rem; }
.hero-copy.is-paused .hero-timebox { margin-right: 0; }
.hero-copy.is-paused .hero-schedule-button { margin-right: 0; transform: translateX(-0.9rem); }
.hero-copy.is-paused .countdown { color: var(--text); }
.time { font-size: clamp(3rem, 5vw, 4.3rem); font-weight: 800; color: var(--accent); }
.countdown { margin: 0; font-size: 1rem; font-weight: 700; color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 0.9rem 1.3rem; border-radius: 999px; font-weight: 700; transition: transform 180ms ease, box-shadow 180ms ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; box-shadow: 0 16px 36px rgba(13,110,253,0.2); }
.button.button-outline { background: #ffffff; color: var(--accent); border: 2px solid var(--accent); box-shadow: none; }
.button-centered { display: flex; width: fit-content; margin: 0.85rem auto 0; }
.hero-weather {
  background: linear-gradient(135deg, #eaf6ff 0%, #dff0ff 100%);
  border-radius: 2rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.weather-top { display: flex; justify-content: space-between; align-items: center; }
.weather-location { margin: 0 0 0.25rem; font-size: 0.95rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.16em; }
.weather-top h3 { margin: 0; font-size: 1.3rem; }
.weather-icon { font-size: 2.2rem; }
.weather-main { display: flex; flex-direction: column; gap: 0.2rem; }
.temp { font-size: 3rem; font-weight: 800; color: var(--text); }
.condition { margin: 0; font-size: 1rem; font-weight: 600; color: var(--muted); }
.weather-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }
.weather-details div { background: rgba(255,255,255,0.72); border-radius: 1rem; padding: 0.8rem; }
.weather-details span { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.3rem; }
.weather-details strong { font-size: 1rem; color: var(--text); }
.weather-updated { margin: 0.1rem 0 0; font-size: 0.86rem; color: var(--muted); }
.weather-updated strong { color: var(--text); font-weight: 700; }
.notice {
  max-width: 1120px; margin: 0 auto 2rem; padding: 1.2rem 1.5rem; background: var(--surface);
  border: 1px solid var(--border); border-left: 8px solid #f4b942; border-radius: 1rem; box-shadow: var(--shadow);
}
.notice p { margin: 0.25rem 0 0; color: var(--muted); }
.notice strong { font-size: 1.9rem; }
#noticeText { font-size: 1.3rem; line-height: 1.75; }
.section { max-width: 1120px; margin: 0 auto 3rem; padding: 2rem; }
.section-heading { margin-bottom: 1.25rem; }
.section-heading h2 { margin: 0; font-size: 1.9rem; }
.timetable-grid, .card-grid, .contact-grid { display: grid; gap: 1.2rem; }
.timetable-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.timetable-card, .info-card, .contact-card {
  background: var(--surface); padding: 1.4rem; border-radius: 1.2rem; border: 1px solid var(--border); box-shadow: var(--shadow);
}
.timetable-card ul { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; padding: 0; margin: 1rem 0 0; }
.timetable-card li { text-align: center; font-weight: 700; color: var(--muted); padding: 0.4rem; background: var(--surface-2); border-radius: 0.65rem; }
.timetable-card li.past-time { color: #a0aec0 !important; background: #edf2f7 !important; text-decoration: line-through !important; opacity: 0.6 !important; }
.card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.phone-contacts { margin: 0.8rem 0 0.55rem; display: grid; gap: 0.35rem; }
.phone-row { display: grid; grid-template-columns: 5.8rem 1fr; align-items: baseline; column-gap: 0.45rem; }
.phone-label { font-weight: 700; color: var(--text); }
.phone-number { color: var(--text); }
.store-links { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1rem; }
.store-links a, .store-links .store-link-disabled { display: inline-block; padding: 0.7rem 1rem; border-radius: 999px; background: var(--surface-2); font-weight: 700; }
.store-links .store-link-disabled { color: var(--text); border: 0; font: inherit; cursor: pointer; user-select: none; }
.map-link { display: inline-flex; align-items: center; gap: 0.45rem; margin-top: 0.95rem; padding: 0; border-radius: 0; background: transparent; color: inherit; font-weight: 700; box-shadow: none; transition: transform 180ms ease; }
.map-link:hover { transform: translateY(-2px); }
.map-link-label { font-size: 1rem; font-weight: 700; color: var(--accent); }
footer { padding: 1.5rem 2rem 2.5rem; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; }
.footer-logo { height: 2.5rem; width: auto; margin-top: 1rem; }
.map-link .map-icon { width: 4rem; height: 4rem; margin-top: 0; object-fit: contain; }
@media (max-width: 900px) {
  .hero,
  .timetable-grid,
  .card-grid,
  .contact-grid {
    grid-template-columns: 1fr;

  .phone-row {
    grid-template-columns: 5.1rem 1fr;
  }
  }

  .hero {
    padding-top: 2.2rem;
    gap: 1.4rem;
  }

  .hero-departure-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-schedule-button {
    margin-right: 0;
  }

  .hero-timebox {
    margin-bottom: 0.8rem;
  }

  .topbar {
    padding: 0.85rem 1rem;
  }

  .brand {
    font-size: 1.15rem;
    letter-spacing: 0.08em;
  }

  .logo {
    height: 3rem;
  }

  .logo-secondary {
    width: 3.8rem;
    height: 3.8rem;
  }
}

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
  }

  .header-brand {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem 0.7rem;
  }

  .logo {
    height: 2.5rem;
  }

  .logo-secondary {
    width: 3.25rem;
    height: 3.25rem;
  }

  .brand {
    flex: 0 0 100%;
    text-align: center;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    line-height: 1.2;
  }

  .brand-line-1,
  .brand-line-2 {
    display: block;
    white-space: nowrap;
  }

  .brand-line-2 {
    margin-top: 0.1rem;
  }

  .topnav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem 1rem;
    font-size: 0.96rem;
  }

  .section,
  .hero {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero {
    padding-top: 1.4rem;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-timebox {
    width: 100%;
    justify-content: center;
  }

  .time {
    font-size: clamp(2.35rem, 12vw, 3.2rem);
  }

  .weather-details {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .weather-updated {
    text-align: center;
  }

  .timetable-card ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #noticeText {
    font-size: 1.1rem;
    line-height: 1.6;
  }
}

@media (max-width: 420px) {
  .logo {
    height: 2.2rem;
  }

  .logo-secondary {
    width: 2.85rem;
    height: 2.85rem;
    border-radius: 0.9rem;
  }

  .brand {
    font-size: 0.82rem;
    letter-spacing: 0.01em;
  }

  .brand-line-2 {
    margin-top: 0.05rem;
  }

  .route-arrow {
    transform: scaleX(1.2);
    margin: 0 0.08rem;
  }

  .hero-timebox {
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem 0.9rem;
  }

  .countdown {
    font-size: 0.92rem;
  }

  .button.primary {
    width: 100%;
  }

  .timetable-card ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
