:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --bg-card: #141414;
  --border: #2a2a2a;
  --text: #e8e8e8;
  --text-secondary: #999999;
  --text-muted: #666666;
  --accent: #ffffff;
  --link: #a0a0ff;
  --highlight: #1c1c1e;
  --input-bg: #141414;
  --input-border: #2a2a2a;
  --placeholder: #777777;
  --radius: 24px;
  --radius-sm: 18px;
  --success: #6ecf8e;
  --error: #ff7a7a;
  --pending: #e5c558;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f4f4;
  --bg-card: #ffffff;
  --border: #d9d9d9;
  --text: #111111;
  --text-secondary: #333333;
  --text-muted: #666666;
  --accent: #111111;
  --link: #0055cc;
  --highlight: #fafafa;
  --input-bg: #ffffff;
  --input-border: #d9d9d9;
  --placeholder: #8a8a8a;
  --success: #1f7a45;
  --error: #b42318;
  --pending: #9a6700;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background-color: var(--accent);
  color: var(--bg);
  text-align: center;
  line-height: 40px;
  font-size: 20px;
  font-weight: 800;
  flex-shrink: 0;
}

.logo-text {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-toggle:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.shell {
  width: 100%;
  padding: 32px 16px;
}
.frame {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
}
.mark {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  margin: 0 auto 24px;
}
h1 {
  margin: 0 0 12px;
  text-align: center;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}
.lede {
  margin: 0 0 28px;
  text-align: center;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.form {
  display: grid;
  gap: 16px;
}
label span {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--text);
}
input, textarea {
  width: 100%;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  padding: 16px 18px;
  outline: none;
}
input::placeholder, textarea::placeholder {
  color: var(--placeholder);
}
input:focus, textarea:focus {
  border-color: var(--text-muted);
}
textarea {
  resize: vertical;
  min-height: 180px;
}
.actions {
  margin-top: 4px;
}
button {
  display: inline-block;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  padding: 18px 28px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
button:hover {
  opacity: 0.92;
}
button:disabled {
  opacity: 0.65;
  cursor: default;
}
.status {
  margin: 14px 0 0;
  min-height: 1.4em;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}
.status.success { color: var(--success); }
.status.error { color: var(--error); }
.status.pending { color: var(--pending); }
.fallback {
  margin: 28px 0 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--highlight);
}
.fallback p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.fallback a {
  color: var(--link);
  word-break: break-word;
}
.footnote {
  margin: 18px 12px 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
@media (max-width: 640px) {
  .shell { padding: 24px 16px; }
  .card { padding: 32px 22px; }
  h1 { font-size: 28px; }
}
