/* Shared auth / paywall — dark theme (Wow Image macOS + web) */
:root {
  color-scheme: dark;
  --bg: #0f0f0f;
  --card: #1a1a1a;
  --card-border: #333;
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --hint: #737373;
  --input-bg: #262626;
  --input-border: #404040;
  --gold: #d4a012;
  --gold-hover: #e6b422;
  --info-bg: rgba(212, 160, 18, 0.14);
  --info-border: rgba(212, 160, 18, 0.4);
  --info-text: #e8c96a;
  --error-bg: rgba(248, 113, 113, 0.12);
  --error-border: rgba(248, 113, 113, 0.35);
  --error-text: #fca5a5;
  --success-bg: rgba(74, 222, 128, 0.1);
  --success-border: rgba(74, 222, 128, 0.35);
  --success-text: #86efac;
}

* { box-sizing: border-box; }

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding:
    max(32px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    max(48px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
}

.card {
  max-width: 460px;
  width: 100%;
  min-width: 0;
  background: var(--card);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  border: 1px solid var(--card-border);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.brand img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.brand-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  font-size: 28px;
  line-height: 1.15;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-align: center;
}

.sub {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.5;
}

.sub code {
  font-size: 12px;
  background: var(--input-bg);
  color: var(--gold);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--input-border);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, transform 0.04s;
}

.btn:hover { background: #333; }
.btn:active { transform: scale(0.99); }
.btn:disabled { opacity: 0.5; cursor: wait; }

.btn-primary {
  background: var(--gold);
  color: #0f0f0f;
  border-color: var(--gold);
}

.btn-primary:hover { background: var(--gold-hover); }

.btn-price { font-size: 20px; letter-spacing: -0.02em; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--muted);
}

input {
  width: 100%;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  margin: 0 0 12px;
  background: var(--input-bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input::placeholder { color: var(--hint); }

input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 160, 18, 0.2);
}

input:read-only {
  background: var(--card);
  color: var(--muted);
}

.hint {
  font-size: 12px;
  color: var(--hint);
  margin: -6px 0 14px;
  line-height: 1.4;
}

.status {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
}

.status.info {
  background: var(--info-bg);
  color: var(--info-text);
  border: 1px solid var(--info-border);
}

.status.success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.status.error {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
}

.status.error a {
  color: #fde68a;
  text-decoration: underline;
}

footer {
  margin-top: 24px;
  font-size: 12px;
  color: var(--hint);
  text-align: center;
  line-height: 1.6;
  max-width: 100%;
}

footer a {
  color: var(--muted);
  text-decoration: underline;
  word-break: break-word;
}

footer a:hover { color: var(--text); }

.foot-nav { margin: 0 0 6px; color: var(--muted); }

.foot-legal {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 8px;
}

.top-nav {
  width: 100%;
  max-width: 460px;
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 600;
}

.top-nav a {
  color: var(--muted);
  text-decoration: none;
}

.top-nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

.hidden { display: none !important; }

/* In macOS app WebView (?app=1) — hide web-only nav */
body.embed .top-nav { display: none; }

body.embed { padding-top: max(20px, env(safe-area-inset-top)); }
