:root {
  --ink: #17202a;
  --paper: #f7f4ec;
  --mist: #e7edf0;
  --mountain: #1f3d4a;
  --meadow: #2f7d5b;
  --sun: #f0b84f;
  --stamp: #d96b4b;
  --sky: #8fb8cc;
  --white: #fffdf8;
  --shadow: 0 24px 70px rgb(23 32 42 / 14%);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: linear-gradient(180deg, var(--paper), #eef4ef); }
a { color: inherit; }
.skip-link { position: absolute; left: 1rem; top: -4rem; padding: .7rem 1rem; background: var(--ink); color: white; z-index: 10; }
.skip-link:focus { top: 1rem; }
.shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 56px; }
.hero, .checkpoint, .metrics, .stamp-section, .coach, .team-wall { margin: 18px 0; }
.hero { min-height: 420px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: end; gap: 24px; padding: 56px; color: var(--white); background: linear-gradient(135deg, var(--mountain), #17313a 62%, #10242c); box-shadow: var(--shadow); }
.eyebrow { margin: 0 0 .7rem; font-size: .78rem; font-weight: 800; letter-spacing: 0; text-transform: uppercase; color: var(--stamp); }
.hero .eyebrow { color: var(--sun); }
h1, h2, p { word-break: keep-all; overflow-wrap: anywhere; }
h1 { margin: 0; max-width: 780px; font-size: 4.75rem; line-height: .98; letter-spacing: 0; }
h2 { margin: 0; font-size: 2.25rem; letter-spacing: 0; }
.hero__lead { max-width: 620px; font-size: 1.2rem; line-height: 1.65; color: rgb(255 253 248 / 86%); }
.status-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.status-strip span { min-width: 180px; padding: 12px 14px; border: 1px solid rgb(255 255 255 / 18%); border-radius: 8px; background: rgb(255 253 248 / 10%); }
.status-strip strong, .status-strip em { display: block; letter-spacing: 0; }
.status-strip strong { margin-bottom: .35rem; color: rgb(255 253 248 / 64%); font-size: .78rem; font-style: normal; text-transform: uppercase; }
.status-strip em { color: var(--white); font-style: normal; font-weight: 850; }
.passport-card { min-height: 260px; display: flex; flex-direction: column; justify-content: flex-end; gap: .45rem; padding: 28px; border: 1px solid rgb(255 255 255 / 24%); border-radius: 8px; background: rgb(255 255 255 / 12%); backdrop-filter: blur(18px); }
.passport-card__label { margin: 0; color: var(--sun); font-weight: 800; letter-spacing: 0; text-transform: uppercase; }
.passport-card strong { font-size: 2rem; }
.passport-card span, .passport-card small { color: rgb(255 253 248 / 82%); }
.checkpoint, .metrics, .stamp-section, .team-wall { padding: 36px 0; border-top: 1px solid rgb(31 61 74 / 14%); }
.section-heading { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 22px; }
.section-heading p:last-child { margin: 0; color: rgb(23 32 42 / 68%); line-height: 1.6; }
.stage-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stage { display: flex; gap: 14px; min-width: 0; padding: 18px; border-radius: 8px; background: var(--white); border: 1px solid rgb(31 61 74 / 10%); }
.stage__marker { width: 18px; height: 18px; margin-top: 3px; flex: 0 0 auto; border-radius: 50%; background: var(--mist); box-shadow: inset 0 0 0 4px white; }
.stage--done .stage__marker { background: var(--meadow); }
.stage--active .stage__marker { background: var(--sun); }
.stage--attention .stage__marker { background: var(--stamp); }
[data-state="passport_issued"] .hero { background: linear-gradient(135deg, var(--meadow), var(--mountain) 62%, #10242c); }
[data-state="oauth_pending"] .hero { background: linear-gradient(135deg, #24475a, var(--mountain) 64%, #10242c); }
[data-state="sync_attention"] .hero, [data-state="error"] .hero { background: linear-gradient(135deg, #6d2f27, var(--stamp) 58%, #2a1614); }
[data-state="sync_attention"] .stage--active .stage__marker, [data-state="error"] .stage--active .stage__marker { background: var(--stamp); }
.stage strong { display: block; margin-bottom: .45rem; }
.stage p { margin: 0; color: rgb(23 32 42 / 66%); line-height: 1.5; font-size: .94rem; }
.metric-grid, .stamp-grid, .team-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card, .stamp, .team-summary article, .region-row { background: var(--white); border: 1px solid rgb(31 61 74 / 10%); border-radius: 8px; padding: 20px; }
.metric-card span, .team-summary span, .stamp span { color: rgb(23 32 42 / 62%); font-weight: 700; }
.metric-card strong, .team-summary strong { display: block; margin-top: .75rem; font-size: 2rem; letter-spacing: 0; }
.stamp { min-height: 166px; display: flex; flex-direction: column; justify-content: space-between; border-style: dashed; transform: rotate(-1.4deg); }
.stamp:nth-child(2n) { transform: rotate(1.2deg); }
.stamp strong { margin: .7rem 0; font-size: 1.35rem; color: var(--mountain); }
.stamp p { margin: 0; color: var(--stamp); font-weight: 800; }
.empty-state { min-height: 140px; display: flex; flex-direction: column; justify-content: center; gap: .55rem; padding: 20px; border: 1px dashed rgb(31 61 74 / 18%); border-radius: 8px; background: rgb(255 253 248 / 72%); color: rgb(23 32 42 / 68%); }
.empty-state strong { color: var(--mountain); font-size: 1.05rem; }
.empty-state p { margin: 0; line-height: 1.55; }
.stamp-grid .empty-state, .region-list .empty-state { grid-column: 1 / -1; }
.coach { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; padding: 36px; background: var(--mountain); color: var(--white); }
.coach p:last-child { font-size: 1.25rem; line-height: 1.65; color: rgb(255 253 248 / 86%); }
.next-action { display: flex; flex-direction: column; justify-content: center; gap: .5rem; min-height: 140px; padding: 22px; border-radius: 8px; text-decoration: none; background: var(--sun); color: var(--ink); }
.next-action[aria-disabled="true"] { background: rgb(255 253 248 / 16%); color: rgb(255 253 248 / 72%); border: 1px solid rgb(255 255 255 / 18%); cursor: default; }
.next-action span { font-size: 1.25rem; font-weight: 900; }
.next-action small { line-height: 1.5; }
.team-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 14px; }
.region-list { display: grid; gap: 10px; }
.region-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; align-items: center; }
.region-row div { display: flex; justify-content: space-between; gap: 12px; }
.region-row__bar { height: 12px; border-radius: 999px; background: var(--mist); overflow: hidden; }
.region-row__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sky), var(--meadow)); }

@media (max-width: 860px) {
  .shell { width: min(100% - 20px, 720px); padding-top: 10px; }
  .hero, .coach { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding: 30px 22px; }
  h1 { font-size: 3rem; }
  h2 { font-size: 1.85rem; }
  .passport-card { min-height: 210px; }
  .stage-list, .metric-grid, .stamp-grid { grid-template-columns: 1fr; }
  .team-summary { grid-template-columns: 1fr 1fr; }
  .region-row { grid-template-columns: 1fr; }
  .region-row div { flex-wrap: wrap; }
}

@media (max-width: 520px) {
  h1 { font-size: 2.55rem; }
  h2 { font-size: 1.6rem; }
  .team-summary { grid-template-columns: 1fr; }
  .metric-card strong, .team-summary strong { font-size: 1.85rem; }
}
