/* ==========================================================================
   令和8年度 研修委員会 — Design System (inspired by Notion)
   see DESIGN.md
   ========================================================================== */

:root {
  /* ネイティブselect等のフォームコントロールをOSのダークモードに引きずられず常にライト描画
     （Android LINEアプリ内ブラウザでドロップダウンが黒背景・黒文字になり選択肢が見えない不具合の対策） */
  color-scheme: light;

  /* Color — Base */
  --color-bg: #ffffff;
  --color-bg-warm: #f6f5f4;
  --color-text: rgba(0, 0, 0, 0.95);
  --color-text-secondary: #615d59;
  --color-text-muted: #a39e98;

  /* Color — Accent */
  --color-accent: #0075de;
  --color-accent-hover: #005bab;
  --color-accent-focus: #097fe8;
  --color-badge-bg: #f2f9ff;
  --color-badge-text: #097fe8;

  /* Color — Brand */
  --color-navy: #213183;
  --color-line: #06c755;
  --color-line-hover: #05b34b;

  /* Borders & Shadows */
  --border-whisper: 1px solid rgba(0, 0, 0, 0.1);
  --shadow-card:
    rgba(0, 0, 0, 0.04) 0 4px 18px,
    rgba(0, 0, 0, 0.027) 0 2.025px 7.85px,
    rgba(0, 0, 0, 0.02) 0 0.8px 2.93px,
    rgba(0, 0, 0, 0.01) 0 0.175px 1.04px;
  --shadow-deep:
    rgba(0, 0, 0, 0.01) 0 1px 3px,
    rgba(0, 0, 0, 0.02) 0 3px 7px,
    rgba(0, 0, 0, 0.02) 0 7px 15px,
    rgba(0, 0, 0, 0.04) 0 14px 28px,
    rgba(0, 0, 0, 0.05) 0 23px 52px;

  /* Radius */
  --radius-micro: 4px;
  --radius-card: 12px;
  --radius-hero: 16px;
  --radius-pill: 9999px;
}

/* Reset
   ========================================================================== */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', -apple-system, system-ui, 'Segoe UI', 'Noto Sans JP',
    'Helvetica Neue', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  font-feature-settings: 'lnum', 'locl';
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Layout — Shell
   ========================================================================== */

.shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--color-bg);
}

.footer {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px;
  display: none;
}

/* ==========================================================================
   Intro screen (Screen 1)
   ========================================================================== */

.intro {
  min-height: 100vh;
  padding: 72px 32px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--color-bg);
}

.intro__eyebrow {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.33;
  letter-spacing: 0.125px;
  color: var(--color-badge-text);
  background: var(--color-badge-bg);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 40px;
}

.intro__title {
  font-size: 54px;
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -1.875px;
  color: var(--color-text);
  margin-bottom: 12px;
}

.intro__subtitle {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.125px;
  color: var(--color-text-secondary);
  margin-bottom: 56px;
  max-width: 360px;
}

.intro__mark {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-hero);
  background: var(--color-bg-warm);
  border: var(--border-whisper);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 64px;
  position: relative;
}

.intro__mark span {
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--color-text);
}

.intro__cta {
  width: 100%;
  max-width: 360px;
}

.intro__caption {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.43;
  color: var(--color-text-muted);
  margin-top: 16px;
}

/* ==========================================================================
   Alerts
   ========================================================================== */

.alert {
  width: 100%;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: var(--radius-micro);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 24px;
  text-align: left;
}

.alert--error {
  background: #fce9e4;
  color: #a0410a;
  border: 1px solid rgba(221, 91, 0, 0.18);
}

.alert--success {
  background: #e7f6ea;
  color: #186b2f;
  border: 1px solid rgba(26, 174, 57, 0.18);
}

.flash-wrap {
  padding: 12px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flash-wrap .alert {
  max-width: none;
  margin: 0 0 8px;
}

/* ==========================================================================
   Onboarding banner (初回プロフィール登録誘導)
   ========================================================================== */

.onboarding-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 16px 24px 0;
  padding: 16px;
  background: var(--color-badge-bg);
  border: 1px solid rgba(9, 127, 232, 0.18);
  border-radius: var(--radius-card);
}

.onboarding-banner__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.onboarding-banner__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.onboarding-banner__body {
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--radius-micro);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.33;
  transition: background 0.12s ease, transform 0.12s ease,
    box-shadow 0.12s ease;
  border: 1px solid transparent;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent-focus);
  outline-offset: 2px;
}

.btn:active {
  transform: scale(0.98);
}

.btn--block {
  width: 100%;
}

.btn--primary {
  background: var(--color-accent);
  color: #ffffff;
}

.btn--primary:hover {
  background: var(--color-accent-hover);
}

.btn--line {
  background: var(--color-line);
  color: #ffffff;
  box-shadow: var(--shadow-card);
}

.btn--line:hover {
  background: var(--color-line-hover);
}

.btn--line__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #ffffff;
  border-radius: 3px;
  color: var(--color-line);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.btn--secondary {
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-text);
}

.btn--secondary:hover {
  background: rgba(0, 0, 0, 0.08);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
}

.btn--ghost:hover {
  text-decoration: underline;
}

.btn--disabled {
  background: var(--color-bg-warm);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.btn--disabled:active {
  transform: none;
}

/* ==========================================================================
   Top bar
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: var(--border-whisper);
}

.topbar__brand {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.33;
  color: var(--color-text);
  letter-spacing: -0.2px;
}

.topbar__user {
  display: inline-flex;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-bg-warm);
  border: var(--border-whisper);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
}

.avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ==========================================================================
   Greeting summary (mypage top)
   ========================================================================== */

.greeting {
  padding: 32px 24px 24px;
}

.greeting__label {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.greeting__name {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.23;
  letter-spacing: -0.625px;
  color: var(--color-text);
  margin-bottom: 12px;
}

.greeting__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.33;
  letter-spacing: 0.125px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-badge-bg);
  color: var(--color-badge-text);
}

.chip--muted {
  background: var(--color-bg-warm);
  color: var(--color-text-secondary);
}

/* ==========================================================================
   Divider
   ========================================================================== */

.divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  margin: 8px 24px;
}

/* ==========================================================================
   Section
   ========================================================================== */

.section {
  padding: 24px;
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.27;
  letter-spacing: -0.25px;
  color: var(--color-text);
}

.section__count {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.125px;
}

/* ==========================================================================
   Card list & Training card
   ========================================================================== */

.card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  background: var(--color-bg);
  border: var(--border-whisper);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 20px;
  transition: box-shadow 0.15s ease;
}

.card:hover {
  box-shadow: var(--shadow-deep);
}

.training-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.training-card__title-group {
  flex: 1;
  min-width: 0;
}

.training-card__number {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.125px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.training-card__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.3px;
  color: var(--color-text);
}

.training-card__theme {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.training-card__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--color-bg-warm);
  border-radius: 8px;
  margin-bottom: 16px;
}

.training-card__meta-row {
  display: flex;
  gap: 12px;
  font-size: 13px;
  line-height: 1.43;
}

.training-card__meta-row dt {
  min-width: 56px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.training-card__meta-row dd {
  color: var(--color-text);
  font-weight: 500;
}

.training-card__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.training-card--prep {
  opacity: 0.72;
}

.training-card--prep .training-card__meta {
  background: transparent;
  padding: 0 0 12px;
}

/* ==========================================================================
   Badge
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.33;
  letter-spacing: 0.125px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.badge--pending {
  background: #fef3e7;
  color: #dd5b00;
}

.badge--applied {
  background: #e7f6ea;
  color: #1aae39;
}

.badge--survey {
  background: var(--color-badge-bg);
  color: var(--color-badge-text);
}

.badge--done {
  background: #eaf4ef;
  color: #2a9d99;
}

.badge--prep {
  background: var(--color-bg-warm);
  color: var(--color-text-muted);
}

/* ==========================================================================
   Topbar — Page variant (with back button + stacked title)
   ========================================================================== */

.topbar--page {
  padding: 12px 16px;
  align-items: center;
}

.topbar__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-micro);
  color: var(--color-text);
  transition: background 0.12s ease;
}

.topbar__back:hover {
  background: rgba(0, 0, 0, 0.05);
}

.topbar__title {
  flex: 1;
  text-align: center;
  line-height: 1.3;
}

.topbar__eyebrow {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.125px;
}

.topbar__heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.2px;
}

.topbar__spacer {
  display: inline-block;
  width: 36px;
  flex-shrink: 0;
}

/* ==========================================================================
   Stepper
   ========================================================================== */

.stepper-wrap {
  padding: 24px 24px 8px;
}

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

.stepper__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.stepper__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-bg-warm);
  border: var(--border-whisper);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.stepper__item--active .stepper__dot {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 117, 222, 0.12);
}

.stepper__item--done .stepper__dot {
  background: var(--color-badge-bg);
  border-color: var(--color-badge-bg);
  color: var(--color-accent);
}

.stepper__label {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.125px;
  white-space: nowrap;
}

.stepper__item--active .stepper__label {
  color: var(--color-text);
  font-weight: 600;
}

.stepper__line {
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.stepper__line--done {
  background: var(--color-accent);
  opacity: 0.4;
}

/* ==========================================================================
   Form
   ========================================================================== */

.form {
  padding: 8px 24px 24px;
}

/* Topbar 直後に form/content-stack が来るページ（stepper がない）は上余白を広げる */
.topbar + .form,
.topbar + .content-stack {
  padding-top: 24px;
}

.form-section + .form-section {
  margin-top: 24px;
}

.form-section__head {
  margin-bottom: 20px;
}

.form-section__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.25px;
  color: var(--color-text);
  margin-bottom: 6px;
}

.form-section__sub-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.15px;
  color: var(--color-accent);
  margin-bottom: 4px;
  padding-top: 4px;
}


.form-section__hint {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 12px;
}

.field {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field--half {
  grid-column: span 1;
}

.field__label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.field__label-text {
  flex: 1;
  min-width: 0;
}

.field__required {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 33px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.125px;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: #fce9e4;
  color: #dd5b00;
}

.field__input,
.field__textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-micro);
  padding: 10px 12px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.field__input:hover,
.field__textarea:hover {
  border-color: rgba(0, 0, 0, 0.25);
}

.field__input:focus,
.field__textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0, 117, 222, 0.12);
}

.field__input::placeholder,
.field__textarea::placeholder {
  color: var(--color-text-muted);
}

/* ドロップダウンの選択肢を明示（color-schemeを無視する一部Android WebView向けの保険） */
select.field__input option {
  background-color: #ffffff;
  color: var(--color-text);
}

.field__textarea {
  min-height: 120px;
  resize: vertical;
}

.field__help {
  font-size: 12px;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.field__error {
  font-size: 12px;
  line-height: 1.4;
  color: #dd5b00;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.field__error::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background: #dd5b00;
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.field__input:has(+ .field__error),
.field__input.is-invalid,
.field__textarea:has(+ .field__error) {
  border-color: #dd5b00;
}

/* ==========================================================================
   Form actions
   ========================================================================== */

.form-actions {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  gap: 10px;
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-top: var(--border-whisper);
  z-index: 20;
}

/* Reserve space so content isn't hidden behind fixed form-actions.
   明示クラスを使用（:has() 非対応の古いAndroid WebViewでも余白が確実に効く） */
.shell--has-actions {
  padding-bottom: 96px;
}

.btn--grow {
  flex: 1;
}

/* Field number chip (Q1, Q2, A1...) */
.field__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 26px;
  height: 22px;
  padding: 0 6px;
  background: var(--color-badge-bg);
  color: var(--color-badge-text);
  border-radius: var(--radius-micro);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.125px;
}

.field__number--muted {
  background: var(--color-bg-warm);
  color: var(--color-text-muted);
}

/* ==========================================================================
   Content stack (shared vertical container)
   ========================================================================== */

.content-stack {
  padding: 8px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ==========================================================================
   Review (confirm / detail)
   ========================================================================== */

.review {
  background: var(--color-bg);
  border: var(--border-whisper);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

.review__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.2px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: var(--border-whisper);
}

.review__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: var(--border-whisper);
}

.review__head .review__title {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.review__edit {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-badge-bg);
  transition: background 0.12s ease;
}

.review__edit:hover {
  background: rgba(9, 127, 232, 0.18);
}

.review__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.review__row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.review__row dt {
  color: var(--color-text-muted);
  font-weight: 500;
}

.review__row dd {
  color: var(--color-text);
  font-weight: 500;
}

/* dt が長文の質問ラベルになるケース（研修後アンケートの星評価など）。
   2 カラムでは dt が窮屈に折り返されるため、縦積みにする。 */
.review__row--block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.review__row--block dt {
  font-size: 14px;
}

.review__row--block dd {
  margin: 0;
}

.review__qa {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review__qa-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review__qa-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.review__qa-answer {
  background: var(--color-bg-warm);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-micro) var(--radius-micro) 0;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--color-text);
  white-space: pre-wrap;
  word-break: break-word;
}

.review__qa-answer--muted {
  border-left-color: rgba(0, 0, 0, 0.15);
  color: var(--color-text-secondary);
}

.review__note {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: -6px 0 14px;
}

/* ==========================================================================
   Compare (申込時 vs 研修後 の比較表示)
   ========================================================================== */

.compare-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.compare {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.compare__item {
  padding: 14px;
  border-radius: var(--radius-card);
  border: var(--border-whisper);
}

.compare__item--before {
  background: #faf9f8;
}

.compare__item--after {
  background: var(--color-bg);
  box-shadow: var(--shadow-card);
}

.compare__stage {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.125px;
  color: var(--color-text-muted);
  background: rgba(0, 0, 0, 0.04);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}

.compare__item--after .compare__stage {
  background: var(--color-badge-bg);
  color: var(--color-badge-text);
}

.compare__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.compare__body {
  font-size: 13px;
  line-height: 1.7;
  color: var(--color-text);
  white-space: pre-wrap;
  word-break: break-word;
}

.compare__body--muted {
  color: var(--color-text-secondary);
  font-size: 12px;
}

.compare__arrow {
  display: flex;
  justify-content: center;
  color: var(--color-text-muted);
  padding: 2px 0;
}

/* ==========================================================================
   Status banner (detail screen)
   ========================================================================== */

.status-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-card);
  background: var(--color-bg-warm);
  border: var(--border-whisper);
}

.status-banner--success {
  background: #edf7ef;
  border-color: rgba(26, 174, 57, 0.2);
}

.status-banner p {
  font-size: 13px;
  color: var(--color-text);
  font-weight: 500;
}

/* ==========================================================================
   Result screen (complete)
   ========================================================================== */

.result {
  min-height: 100vh;
  padding: 72px 32px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.result__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 24px;
}

.result__icon--success {
  background: #e7f6ea;
  color: #1aae39;
}

.result__icon--note {
  background: var(--color-badge-bg);
  color: var(--color-accent);
}

.result__title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.27;
  letter-spacing: -0.5px;
  color: var(--color-text);
  margin-bottom: 12px;
}

.result__message {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
}

.result__card {
  width: 100%;
  max-width: 360px;
  background: var(--color-bg-warm);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.result__card-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.result__card-row dt {
  color: var(--color-text-muted);
  font-weight: 500;
}

.result__card-row dd {
  color: var(--color-text);
  font-weight: 600;
  text-align: left;
}

.result__caption {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: 40px;
  max-width: 320px;
}

.result__cta {
  width: 100%;
  max-width: 360px;
}

/* ==========================================================================
   Rating (star radio group)
   ========================================================================== */

.rating-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.rating-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--color-bg);
  border: var(--border-whisper);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.rating-row__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rating {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
}

.rating input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  opacity: 0;
}

.rating__star {
  cursor: pointer;
  color: rgba(0, 0, 0, 0.12);
  transition: color 0.12s ease, transform 0.12s ease;
  padding: 2px;
  border-radius: var(--radius-micro);
  line-height: 0;
}

.rating__star:hover,
.rating__star:hover ~ .rating__star {
  color: #f5b400;
}

.rating input:checked ~ .rating__star {
  color: #f5b400;
}

.rating input:focus-visible + .rating__star {
  outline: 2px solid var(--color-accent-focus);
  outline-offset: 2px;
}

/* Read-only star display (confirm screen) */

.score-display {
  display: inline-flex;
  gap: 2px;
  color: rgba(0, 0, 0, 0.12);
}

.score-display__star.is-filled {
  color: #f5b400;
}

/* ==========================================================================
   Reflect (survey step 2 — previous answer + new answer pair)
   ========================================================================== */

.reflect-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.reflect {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: var(--color-bg);
  border: var(--border-whisper);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.reflect__prev {
  padding: 12px 14px;
  background: var(--color-bg-warm);
  border-radius: var(--radius-micro);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reflect__prev-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.125px;
}

.reflect__prev-answer {
  font-size: 12px;
  line-height: 1.7;
  color: var(--color-text);
  font-style: normal;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ==========================================================================
   Survey accent (amber topbar line)
   ========================================================================== */

.shell--survey .topbar--survey {
  border-bottom-color: rgba(245, 180, 0, 0.3);
}

.shell--survey .stepper__item--active .stepper__dot {
  background: #f5b400;
  border-color: #f5b400;
  box-shadow: 0 0 0 4px rgba(245, 180, 0, 0.18);
}

.shell--survey .stepper__item--done .stepper__dot {
  background: #fff5d6;
  color: #c69000;
}

.shell--survey .stepper__item--active .stepper__label {
  color: var(--color-text);
}

.shell--survey .stepper__line--done {
  background: #f5b400;
  opacity: 0.4;
}

/* ==========================================================================
   User menu (avatar dropdown)
   ========================================================================== */

.user-menu {
  position: relative;
}

.user-menu__trigger {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  border-radius: 50%;
  transition: box-shadow 0.12s ease;
}

.user-menu__trigger::-webkit-details-marker {
  display: none;
}

.user-menu__trigger:hover {
  box-shadow: 0 0 0 3px rgba(0, 117, 222, 0.1);
}

.user-menu[open] .user-menu__trigger {
  box-shadow: 0 0 0 3px rgba(0, 117, 222, 0.15);
}

.user-menu__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  background: var(--color-bg);
  border: var(--border-whisper);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-deep);
  padding: 8px;
  z-index: 100;
  animation: user-menu-in 0.12s ease;
}

@keyframes user-menu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.user-menu__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  border-bottom: var(--border-whisper);
  margin-bottom: 6px;
}

.user-menu__identity {
  min-width: 0;
  flex: 1;
}

.user-menu__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu__sub {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.3;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-micro);
  transition: background 0.1s ease;
}

.user-menu__item:hover {
  background: var(--color-bg-warm);
}

.user-menu__item--danger {
  color: #dd5b00;
}

.user-menu__item--danger:hover {
  background: #fce9e4;
}

/* Larger avatar variant */
.avatar--lg {
  width: 44px;
  height: 44px;
  font-size: 16px;
}

/* ==========================================================================
   Profile — Account card (read-only LINE info)
   ========================================================================== */

.account-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--color-bg-warm);
  border-radius: var(--radius-card);
}

.account-card__info {
  min-width: 0;
  flex: 1;
}

.account-card__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.account-card__sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip--line {
  background: #e7f6ea;
  color: #06883d;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chip--line svg {
  color: var(--color-line);
}

/* ==========================================================================
   Birthday row (year / month / day selects)
   ========================================================================== */

.birthday-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.birthday-row__field {
  flex: 1;
  min-width: 70px;
  padding-right: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20' fill='none' stroke='%23615d59' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5l5 -5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  appearance: none;
  -webkit-appearance: none;
}

.birthday-row__field[name="birthday_year"] {
  flex: 1.3;
}

.birthday-row__sep {
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
}

/* ==========================================================================
   Phone row (3 segmented inputs)
   ========================================================================== */

.phone-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.phone-row__input {
  text-align: center;
}

.phone-row__input:first-child {
  max-width: 80px;
}

.phone-row__input:not(:first-child) {
  flex: 1;
  max-width: 110px;
}

.phone-row__sep {
  color: var(--color-text-muted);
  font-weight: 500;
}
