:root {
  color-scheme: light;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --blue: #155dfc;
  --blue-dark: #0d47d9;
  --ink: #171717;
  --muted: #6b7280;
  --line: rgba(23, 23, 23, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: #f4f7fb;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

button {
  font: inherit;
}

.maintenance-shell {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: max(28px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  background:
    linear-gradient(rgba(21, 93, 252, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 93, 252, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, #ffffff 0, #f4f7fb 58%);
  background-size: 32px 32px, 32px 32px, auto;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(8px);
  pointer-events: none;
}

.ambient-left {
  top: 8%;
  left: -120px;
  width: 360px;
  height: 360px;
  background: rgba(21, 93, 252, 0.09);
}

.ambient-right {
  right: -100px;
  bottom: 3%;
  width: 300px;
  height: 300px;
  background: rgba(72, 187, 145, 0.08);
}

.maintenance-card {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 28px 80px rgba(26, 49, 92, 0.12), 0 4px 16px rgba(26, 49, 92, 0.06);
  padding: 34px 42px 36px;
  text-align: center;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
  text-align: left;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #2e74ff, #0d47d9);
  box-shadow: 0 8px 18px rgba(21, 93, 252, 0.24);
}

.brand-mark svg {
  width: 27px;
  height: 27px;
  fill: #fff;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-size: 14px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  color: #8a8f98;
  font-size: 11px;
  font-weight: 500;
}

.status-visual {
  position: relative;
  display: grid;
  width: 116px;
  height: 116px;
  margin: 30px auto 18px;
  place-items: center;
}

.status-orbit {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(21, 93, 252, 0.12);
}

.status-orbit-outer {
  inset: 0;
  animation: breathe 2.4s ease-in-out infinite;
}

.status-orbit-inner {
  inset: 14px;
  border-color: rgba(21, 93, 252, 0.18);
  background: rgba(21, 93, 252, 0.035);
}

.status-icon {
  position: relative;
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 1px solid rgba(21, 93, 252, 0.13);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(21, 93, 252, 0.13);
}

.status-icon svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  animation: rotate 6s linear infinite;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  background: #edf3ff;
  color: var(--blue-dark);
  padding: 6px 11px;
  font-size: 11px;
  font-weight: 700;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(21, 93, 252, 0.1);
  animation: pulse 1.8s ease-in-out infinite;
}

h1 {
  margin: 15px 0 10px;
  font-size: clamp(24px, 5vw, 30px);
  line-height: 1.3;
  letter-spacing: -0.045em;
}

.description {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: -0.015em;
}

.progress {
  height: 4px;
  margin: 27px 0 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef7;
}

.progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #155dfc, #72a0ff);
  animation: progress 1.8s ease-in-out infinite;
}

.check-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8a8f98;
  font-size: 12px;
}

.check-status strong {
  color: #525866;
  font-size: 12px;
}

.retry-button {
  display: flex;
  width: 100%;
  height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  border: 0;
  border-radius: 13px;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(21, 93, 252, 0.2);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: transform 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.retry-button:hover {
  background: var(--blue-dark);
  box-shadow: 0 10px 22px rgba(21, 93, 252, 0.26);
  transform: translateY(-1px);
}

.retry-button:active {
  transform: translateY(0);
}

.retry-button:focus-visible {
  outline: 3px solid rgba(21, 93, 252, 0.24);
  outline-offset: 3px;
}

.retry-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.retry-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.retry-button.is-loading svg {
  animation: rotate 0.8s linear infinite;
}

.notice {
  margin: 13px 0 0;
  color: #a0a5ae;
  font-size: 11px;
  line-height: 1.5;
}

footer {
  position: absolute;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #9aa1ad;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.035em;
}

.footer-divider {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: #c4c9d1;
}

@keyframes progress {
  0% { transform: translateX(-115%); }
  55% { transform: translateX(120%); }
  100% { transform: translateX(240%); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.86); }
}

@keyframes breathe {
  0%, 100% { opacity: 0.55; transform: scale(0.94); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes rotate {
  to { transform: rotate(360deg); }
}

@media (max-width: 560px) {
  .maintenance-shell {
    align-items: center;
    padding-inline: 16px;
  }

  .maintenance-card {
    border-radius: 22px;
    padding: 26px 22px 28px;
  }

  .brand {
    padding-bottom: 18px;
  }

  .status-visual {
    margin-top: 22px;
  }

  .description br {
    display: none;
  }

  footer {
    position: fixed;
  }
}

@media (max-height: 700px) {
  .maintenance-shell {
    align-items: flex-start;
  }

  .maintenance-card {
    margin-bottom: 42px;
  }

  .status-visual {
    width: 94px;
    height: 94px;
    margin: 20px auto 12px;
  }

  .status-orbit-inner {
    inset: 10px;
  }

  .progress {
    margin-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
