:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #24292d;
  background: #fff;
  --accent: #315c64;
  --accent-dark: #264a51;
  --muted: #5e666c;
  --border: #d5dadd;
  --soft: #f3f6f6;
  --error: #8b3029;
}
* { box-sizing: border-box; }
html, body { max-width: 100%; }
body { margin: 0; }
[hidden] { display: none !important; }
header {
  min-height: 85px;
  padding: 14px max(24px, calc((100vw - 1060px) / 2));
  border-bottom: 1px solid #e9ebed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 14px;
}
.umi-brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.umi-brand img { width: 56px; height: 56px; object-fit: contain; flex-shrink: 0; }
.umi-brand span, .umi-brand strong, .umi-brand small { display: block; }
.umi-brand strong { font-weight: 650; }
.umi-brand small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.header-link, a { color: var(--accent); text-underline-offset: 3px; }
.header-link { flex-shrink: 0; font-weight: 600; }
main { max-width: 850px; margin: auto; padding: 30px 32px 40px; }
.step-indicator { display: flex; gap: 32px; color: #7a8388; font-size: 12px; margin-bottom: 24px; }
.step-indicator span { display: flex; align-items: center; gap: 7px; }
.step-indicator b { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid #bfc7cc; border-radius: 50%; font-size: 11px; }
.step-indicator [aria-current="step"] { color: var(--accent); font-weight: 700; }
.step-indicator [aria-current="step"] b { border-color: var(--accent); background: var(--accent); color: #fff; }
section { max-width: 760px; padding: 28px 0; }
.eyebrow { margin: 0 0 14px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: 1.2px; }
h1 { margin: 0 0 20px; font-size: 32px; font-weight: 650; letter-spacing: -.8px; line-height: 1.2; }
.intro { max-width: 650px; margin: 0 0 28px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.intro strong { overflow-wrap: anywhere; }
form { max-width: 460px; }
label { display: block; margin: 0 0 9px; font-size: 13px; font-weight: 600; }
input, button { font: inherit; }
input { width: 100%; min-height: 48px; padding: 12px; border: 1px solid #bfc7cc; border-radius: 4px; background: #fff; color: inherit; font-size: 16px; }
input:focus { outline: 2px solid #6c939a; outline-offset: 2px; }
input[aria-invalid="true"] { border-color: #a83c30; }
#code { max-width: 235px; font-size: 22px; font-weight: 650; letter-spacing: 8px; font-variant-numeric: tabular-nums; }
button, .button { min-height: 46px; padding: 12px 18px; border-radius: 4px; font-size: 14px; cursor: pointer; }
.button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.primary { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.primary:hover { background: var(--accent-dark); }
.secondary { border: 1px solid #bfc7cc; background: #fff; color: #30393d; }
.secondary:hover { background: #f4f5f6; }
.text-button { border: 0; background: transparent; color: var(--accent); padding: 10px 0; text-decoration: underline; text-underline-offset: 3px; }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible, a:focus-visible { outline: 3px solid #6c939a; outline-offset: 3px; }
form > .primary { margin-top: 22px; }
.hint { display: block; margin: 8px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.error { display: block; min-height: 20px; margin-top: 6px; color: #9a3027; font-size: 12px; line-height: 1.6; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 27px; }
#notice { margin-bottom: 20px; padding: 16px; border-left: 3px solid #a83c30; background: #fff5f3; color: var(--error); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.application-warning { max-width: 650px; margin: 0 0 28px; padding: 16px 18px; border-left: 4px solid #a56900; background: #fff7df; color: #5a4000; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.application-warning strong { font-weight: 700; }
.application-guidance { max-width: 650px; margin: -12px 0 24px; padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--soft); color: #43535b; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.application-guidance > strong { display: block; margin-bottom: 4px; color: #303d42; font-weight: 700; }
.application-guidance p { margin: 0; }
.application-guidance a { font-weight: 600; overflow-wrap: anywhere; }
.development-note { max-width: 460px; margin-top: 24px; padding: 14px 16px; border-left: 3px solid #9aa9af; background: #f3f5f6; color: #43535b; }
.development-note span { display: block; font-size: 12px; }
.development-note strong { display: block; margin-top: 5px; font-size: 24px; letter-spacing: 5px; }
.status-icon { width: 52px; height: 52px; margin-bottom: 24px; border-radius: 50%; }
.spinner { border: 4px solid #dce5e7; border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.support-note { max-width: 560px; margin: 28px 0 16px; padding: 16px; border-left: 3px solid var(--accent); background: var(--soft); color: #43535b; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
footer { margin-top: 32px; padding-top: 24px; border-top: 1px solid #e9ebed; color: var(--muted); font-size: 12px; line-height: 1.6; }
footer p { margin: 4px 0; }

@media (max-width: 650px) {
  header { min-height: 73px; padding: 12px 20px; gap: 12px; }
  .umi-brand { gap: 9px; }
  .umi-brand img { width: 48px; height: 48px; }
  .umi-brand strong { font-size: 12px; line-height: 1.35; }
  .umi-brand small { font-size: 11px; }
  .header-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; }
  main { padding: 24px 20px; }
  section { padding: 24px 0; }
  .step-indicator { justify-content: space-between; gap: 8px; max-width: 320px; margin-bottom: 16px; }
  h1 { font-size: 28px; }
  .intro { margin-bottom: 24px; line-height: 1.6; }
  .application-warning { margin-bottom: 24px; padding: 14px; font-size: 13px; line-height: 1.55; }
  .application-guidance { margin: -10px 0 22px; padding: 12px 14px; font-size: 12.5px; line-height: 1.5; }
  button, .button { min-height: 48px; }
  .actions { align-items: stretch; flex-direction: column; }
  .actions button { width: 100%; min-height: 48px; }
  .hint, label, .error { font-size: 14px; }
  #notice, .support-note, .development-note { padding: 14px; }
}

@media (max-width: 360px) {
  header { padding-inline: 16px; gap: 10px; }
  .umi-brand { gap: 8px; }
  .umi-brand img { width: 44px; height: 44px; }
  main { padding: 22px 16px 32px; }
  .step-indicator { font-size: 11px; }
  .step-indicator span { gap: 5px; }
  .step-indicator b { width: 22px; height: 22px; }
  section { padding: 22px 0; }
  h1 { font-size: 27px; }
  .application-guidance { padding-inline: 12px; }
  form > .primary { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 1.8s; }
}
