:root {
  color-scheme: light;
  --bg-top: #0b1729;
  --bg-bottom: #1f5f5b;
  --panel-bg: rgba(255, 255, 255, 0.9);
  --panel-border: rgba(255, 255, 255, 0.32);
  --text-main: #14233a;
  --text-muted: #51617b;
  --status-idle: #2956d7;
  --status-loading: #9a5c00;
  --status-success: #0c7b54;
  --status-error: #b42318;
  --shadow: 0 18px 48px rgba(0, 24, 44, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.2), transparent 40%),
    linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.panel {
  width: min(100%, 420px);
  padding: 28px 22px;
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  background: var(--panel-bg);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.lead {
  margin: 12px 0 20px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
}

.status {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(20, 35, 58, 0.06);
  font-size: 14px;
  line-height: 1.5;
}

.status[data-state="idle"] {
  color: var(--status-idle);
}

.status[data-state="loading"] {
  color: var(--status-loading);
}

.status[data-state="success"] {
  color: var(--status-success);
}

.status[data-state="error"] {
  color: var(--status-error);
}

.turnstile {
  min-height: 78px;
  display: flex;
  justify-content: center;
}

.fallback {
  width: 100%;
  margin-top: 14px;
  padding: 14px 16px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #0d6f5d, #1b8e78);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.fallback:disabled {
  opacity: 0.72;
  cursor: default;
}

.fallback[hidden] {
  display: none;
}

.debug {
  margin: 18px 0 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(20, 35, 58, 0.08);
  color: var(--text-main);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

@media (max-width: 480px) {
  .panel {
    padding: 24px 18px;
    border-radius: 20px;
  }

  h1 {
    font-size: 24px;
  }
}
