:root {
  --bg: #14120f;
  --bg-alt: #1c1913;
  --bg-card: #221e17;
  --iron: #4a4740;
  --patina: #7c8f6a;
  --rust: #a8503a;
  --rust-bright: #c96a4f;
  --bone: #e8e2d4;
  --bone-dim: #a39c8c;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(1200px 600px at 50% -10%, #2a241c 0%, var(--bg) 55%);
  color: var(--bone);
  font-family: var(--font-body);
  line-height: 1.5;
}

a { color: var(--patina); text-decoration: none; }
a:hover { color: var(--bone); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(232, 226, 212, 0.08);
}
.topbar img { height: 36px; width: auto; }
.topbar nav { display: flex; gap: 0.75rem; align-items: center; }

.wrap {
  width: min(440px, calc(100% - 2rem));
  margin: 3rem auto 4rem;
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  margin-bottom: 0.35rem;
}
.sub {
  color: var(--bone-dim);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.sub.wishlist {
  margin-top: -0.75rem;
  margin-bottom: 1.25rem;
  color: var(--gold, #c9a24a);
  font-weight: 600;
}
.sub.wishlist a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card {
  background: var(--bg-card);
  border: 1px solid rgba(232, 226, 212, 0.1);
  border-radius: 4px;
  padding: 1.5rem;
}

label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  margin-bottom: 1rem;
  background: var(--bg);
  border: 1px solid var(--iron);
  border-radius: 3px;
  color: var(--bone);
  font-size: 1rem;
}
input:focus {
  outline: none;
  border-color: var(--patina);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 3px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn-primary {
  background: var(--rust);
  color: var(--bone);
}
.btn-primary:hover { background: var(--rust-bright); }
.btn-ghost {
  background: transparent;
  color: var(--bone);
  border: 1px solid var(--iron);
}
.btn-ghost:hover { border-color: var(--bone-dim); }
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.msg {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 3px;
  font-size: 0.9rem;
  display: none;
}
.msg.show { display: block; }
.msg.ok { background: rgba(124, 143, 106, 0.15); color: #b7c9a6; }
.msg.err { background: rgba(168, 80, 58, 0.18); color: #e0a090; }

.links {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--bone-dim);
}
.links a { margin: 0 0.25rem; }

.oauth {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(232, 226, 212, 0.08);
}
.oauth-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bone-dim);
  margin-bottom: 0.75rem;
  text-align: center;
}
.oauth-row {
  display: grid;
  gap: 0.5rem;
}
.oauth-row .btn { position: relative; }
.oauth-row .soon {
  position: absolute;
  right: 0.6rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bone-dim);
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  font-size: 0.75rem;
  margin-left: 0.35rem;
}
.badge-ok { background: rgba(124, 143, 106, 0.25); color: #b7c9a6; }
.badge-warn { background: rgba(168, 80, 58, 0.25); color: #e0a090; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--iron);
  border-radius: 3px;
  overflow: hidden;
  margin-right: 0.35rem;
}
.lang-switch button {
  background: transparent;
  border: 0;
  color: var(--bone-dim);
  font: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
}
.lang-switch button + button { border-left: 1px solid var(--iron); }
.lang-switch button:hover { color: var(--bone); }
.lang-switch button.active {
  background: rgba(124, 143, 106, 0.22);
  color: var(--bone);
}

.legal-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 0.82rem;
  color: var(--bone-dim);
  text-transform: none;
  letter-spacing: 0;
}
.legal-check input { margin-top: 0.2rem; flex-shrink: 0; }
.site-footer {
  border-top: 1px solid rgba(232, 226, 212, 0.08);
  padding: 1.25rem 1.5rem 1.75rem;
  text-align: center;
  margin-top: auto;
}
.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1rem;
  margin-bottom: 0.65rem;
}
.site-footer .footer-links a {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.site-footer .footer-links a:hover { color: var(--bone); }
.site-footer p {
  font-size: 0.72rem;
  color: var(--iron);
  margin: 0;
}
.stack { display: grid; gap: 1rem; }
.row-actions { display: grid; gap: 0.5rem; margin-top: 0.5rem; }
