:root {
  color-scheme: light;
  --navy: #17365d;
  --navy-dark: #102945;
  --blue-soft: #edf3f8;
  --paper: #ffffff;
  --background: #f4f6f8;
  --text: #1c2630;
  --muted: #64717d;
  --line: #dfe5ea;
  --shadow: 0 10px 30px rgba(17, 42, 70, 0.09);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
  background: linear-gradient(180deg, #edf2f6 0, var(--background) 240px);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

.portal-shell {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 24px 0 30px;
}

.hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 4px 18px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 15px;
  background: var(--navy);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-weight: 700;
  box-shadow: 0 7px 18px rgba(23, 54, 93, 0.25);
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .15em;
}

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.mission-card,
.section-card {
  margin-bottom: 15px;
  border: 1px solid rgba(23, 54, 93, .08);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.mission-card {
  padding: 22px 20px;
  text-align: center;
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: #fff;
}

.section-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  opacity: .75;
}

.mission-text {
  margin: 0;
  font-size: clamp(21px, 6vw, 28px);
  font-weight: 800;
  letter-spacing: .03em;
}

.section-card { padding: 19px; }

.section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 18px;
}

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

.application-button {
  display: flex;
  min-height: 86px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.application-button:active {
  transform: scale(.98);
  border-color: #a9baca;
  background: var(--blue-soft);
}

.application-icon { font-size: 25px; }

.culture-copy {
  margin: -3px 0 15px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.culture-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 17px;
  border-radius: 13px;
  background: var(--navy);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.culture-button span { font-size: 28px; font-weight: 300; }

.footer-note {
  margin: 18px 8px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.error-message {
  margin: 15px 0 0;
  padding: 12px;
  border-radius: 10px;
  background: #fff0f0;
  color: #a22121;
  font-size: 13px;
}

@media (max-width: 340px) {
  body { padding-left: 10px; padding-right: 10px; }
  .section-card { padding: 15px; }
  .application-button { font-size: 13px; }
}

@media (min-width: 700px) {
  .portal-shell { padding-top: 40px; }
  .application-button:hover {
    border-color: #a9baca;
    background: var(--blue-soft);
  }
}

.today-mvv-label {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  opacity: .82;
}

.line-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: -4px 0 15px;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9aa6b2;
}

.line-status[data-state="connected"] .status-dot { background: #19a463; }
.line-status[data-state="pending"] .status-dot { background: #d99b16; }
.line-status[data-state="error"] .status-dot { background: #cf3f3f; }
