:root {
  --navy: #062f6f;
  --navy-dark: #041f49;
  --navy-soft: #eef4fb;
  --text: #18202a;
  --sub-text: #6f7780;
  --border: #e4e8ec;
  --background: #f5f7f9;
  --white: #ffffff;
  --east: #0b4d92;
  --west: #455766;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", "Noto Sans JP", sans-serif;
}
body { min-height: 100vh; }
button { font-family: inherit; }

.portal {
  width: 100%;
  max-width: 900px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--white);
  box-shadow: 0 0 40px rgba(20, 38, 60, .05);
}

.hero {
  position: relative;
  padding: 36px 38px 48px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #fff 0%, #fff 68%, #f3f7fb 100%);
}
.hero::after {
  content: "";
  position: absolute;
  width: 270px;
  height: 270px;
  right: -125px;
  bottom: -160px;
  border-radius: 50%;
  background: rgba(6, 47, 111, .055);
  pointer-events: none;
}
.logo-area {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  margin-bottom: 58px;
}
.main-logo {
  display: block;
  width: 215px;
  max-width: 68%;
  height: auto;
  object-fit: contain;
}
.hero-content { position: relative; z-index: 2; }
.hero-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .19em;
}
.hero-label::before { content: ""; width: 32px; height: 2px; background: var(--navy); }
.hero-title {
  margin: 0;
  font-size: 34px;
  line-height: 1.42;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--text);
}
.hero-title-company {
  display: block;
  margin-bottom: 3px;
  font-size: 16px;
  font-weight: 600;
  color: #4b5560;
}
.hero-description {
  margin-top: 19px;
  color: var(--sub-text);
  font-size: 14px;
  line-height: 1.85;
}

.selector-area { padding: 44px 38px 72px; }
.section { margin-bottom: 52px; }
.section:last-child { margin-bottom: 0; }
.section-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
.section-number {
  min-width: 30px;
  padding-top: 4px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}
.section-label {
  margin-bottom: 4px;
  color: #929ba5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
}
.section-title { font-size: 21px; font-weight: 700; color: var(--text); }

.department-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.department-button {
  position: relative;
  width: 100%;
  padding: 25px 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s, background .18s, color .18s, transform .18s, box-shadow .18s;
}
.department-button:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(20, 38, 60, .08); }
.department-button:active { transform: translateY(0); }
.department-english {
  margin-bottom: 8px;
  color: #929ba5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
}
.department-name { display: flex; align-items: center; justify-content: space-between; font-size: 23px; font-weight: 700; }
.department-arrow {
  display: flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f4f6f8;
  color: var(--navy);
  font-size: 16px;
  transition: background .18s, color .18s;
}
.department-button.east:hover { border-color: #abc5e1; }
.department-button.east.selected {
  border-color: var(--east);
  background: linear-gradient(135deg, #0b4d92, #06356c);
  color: #fff;
  box-shadow: 0 8px 24px rgba(11, 77, 146, .18);
}
.department-button.east.selected .department-english { color: rgba(255,255,255,.65); }
.department-button.east.selected .department-arrow { background: rgba(255,255,255,.15); color: #fff; }
.department-button.west:hover { border-color: #bfc8cf; }
.department-button.west.selected {
  border-color: var(--west);
  background: linear-gradient(135deg, #526675, #344552);
  color: #fff;
  box-shadow: 0 8px 24px rgba(69, 87, 102, .18);
}
.department-button.west.selected .department-english { color: rgba(255,255,255,.65); }
.department-button.west.selected .department-arrow { background: rgba(255,255,255,.15); color: #fff; }

.form-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.form-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 22px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: background .18s, padding-left .18s;
}
.form-button:last-child { border-bottom: none; }
.form-button:hover { padding-left: 28px; background: var(--navy-soft); }
.form-english { margin-bottom: 5px; color: #9aa3ac; font-size: 9px; font-weight: 700; letter-spacing: .17em; }
.form-name { color: var(--text); font-size: 17px; font-weight: 700; line-height: 1.5; }
.form-description { margin-top: 5px; color: var(--sub-text); font-size: 12px; line-height: 1.6; }
.form-arrow {
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f3f6f9;
  color: var(--navy);
  font-size: 16px;
  transition: background .18s, color .18s, transform .18s;
}
.form-button:hover .form-arrow { background: var(--navy); color: #fff; transform: translateX(2px); }

.active-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.97);
  box-shadow: 0 3px 14px rgba(20, 38, 60, .07);
  backdrop-filter: blur(10px);
}
.active-inner { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.active-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.active-logo { display: block; width: 130px; height: auto; flex-shrink: 0; }
.active-divider-line { width: 1px; height: 30px; flex-shrink: 0; background: var(--border); }
.active-info { min-width: 0; }
.active-department { margin-bottom: 2px; color: var(--navy); font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.active-form { overflow: hidden; color: var(--text); font-size: 14px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.change-button {
  flex-shrink: 0;
  padding: 9px 14px;
  border: 1px solid #ccd3da;
  border-radius: 6px;
  background: #fff;
  color: #35404a;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}
.change-button:hover { border-color: var(--navy); background: var(--navy); color: #fff; }

.form-area { display: none; position: relative; width: 100%; background: #fff; }
.form-frame { display: block; width: 100%; height: calc(100vh - 61px); min-height: 720px; border: none; background: #fff; }
.loading-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  min-height: 380px;
  background: rgba(255,255,255,.98);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.loading-overlay.show { display: flex; }
.loading-logo { width: 170px; margin-bottom: 24px; }
.loading-line { position: relative; width: 90px; height: 2px; overflow: hidden; background: #e5e8eb; }
.loading-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: var(--navy);
  animation: loading 1s ease-in-out infinite;
}
@keyframes loading { 0% { left: -55%; } 100% { left: 110%; } }
.loading-text { margin-top: 14px; color: #8b949d; font-size: 10px; font-weight: 700; letter-spacing: .16em; }

@media (max-width: 600px) {
  body { background: #fff; }
  .portal { max-width: none; box-shadow: none; }
  .hero { padding: 24px 18px 34px; }
  .logo-area { margin-bottom: 38px; }
  .main-logo { width: 190px; max-width: 74%; }
  .hero-label { font-size: 9px; }
  .hero-title { font-size: 27px; }
  .hero-title-company { margin-bottom: 5px; font-size: 14px; }
  .hero-description { margin-top: 15px; font-size: 13px; }
  .selector-area { padding: 32px 15px 50px; }
  .section { margin-bottom: 42px; }
  .section-head { margin-bottom: 18px; }
  .section-title { font-size: 19px; }
  .department-grid { gap: 9px; }
  .department-button { padding: 19px 14px; }
  .department-name { font-size: 20px; }
  .department-arrow { width: 29px; height: 29px; font-size: 14px; }
  .form-button { padding: 19px 15px; }
  .form-button:hover { padding-left: 15px; }
  .form-name { font-size: 16px; }
  .form-description { font-size: 11px; }
  .active-header { padding: 8px 9px; }
  .active-inner { gap: 8px; }
  .active-left { gap: 9px; }
  .active-logo { width: 92px; }
  .active-divider-line { height: 25px; }
  .active-department { font-size: 8px; }
  .active-form { font-size: 12px; }
  .change-button { padding: 8px 9px; font-size: 10px; }
  .form-frame { height: calc(100vh - 51px); min-height: 650px; }
  .loading-logo { width: 150px; }
}

@media (max-width: 380px) {
  .hero-title { font-size: 24px; }
  .department-name { font-size: 18px; }
  .active-logo { width: 78px; }
  .active-form { font-size: 11px; }
}
