:root {
  /* Tokens come from nightcap-theme.css, which also handles dark mode. */
  --paper: var(--nc-bg);
  --card: var(--nc-surface);
  --ink: var(--nc-text);
  --muted: var(--nc-muted);
  --accent: var(--nc-accent);
  --line: var(--nc-line-strong);
  --serif: var(--nc-serif);
  font-family: var(--nc-sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  line-height: 1.6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
}
[hidden] {
  display: none !important;
}
button,
input {
  font: inherit;
}
button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
h1,
h2,
p {
  margin: 0;
}
button {
  touch-action: manipulation;
}
.site-header {
  max-width: 1240px;
  margin: auto;
  padding: 34px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.wordmark {
  font-family: var(--serif);
  font-size: 36px;
  letter-spacing: -1.5px;
  display: flex;
  align-items: center;
  line-height: 1;
}
.wordmark svg {
  width: 26px;
  height: 26px;
  margin-right: 12px;
}
.wordmark span {
  color: var(--accent);
}
nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13px;
  color: var(--muted);
}
nav a {
  padding: 12px 0;
}
#languageToggle {
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 13px;
}
.auth-layout {
  max-width: 1100px;
  margin: 28px auto 36px;
  padding: 0 48px;
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 90px;
  align-items: center;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.19em;
  line-height: 1.6;
  font-weight: 600;
  color: var(--accent);
}
.evening-intro {
  max-width: 450px;
}
.evening-intro h1 {
  white-space: pre-line;
  font: 600 56px/1.22 var(--serif);
  letter-spacing: -2px;
  margin: 24px 0;
}
.intro-copy {
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
  max-width: 330px;
}
.evening-scene {
  position: relative;
  max-width: 350px;
  margin-top: 20px;
}
.evening-scene svg {
  width: 100%;
  display: block;
}
.evening-scene .scene-sky { fill: var(--nc-raised); }
.evening-scene .scene-shade { fill: var(--nc-hill-1); opacity: 0.25; }
.evening-scene .scene-moon { fill: var(--nc-moon); }
.evening-scene .scene-hill-1 { fill: var(--nc-hill-1); }
.evening-scene .scene-hill-2 { fill: var(--nc-hill-2); }
.evening-scene .scene-hill-3 { fill: var(--nc-hill-3); }
.evening-scene .scene-glint { stroke: var(--nc-moon); }
.evening-scene .scene-star { stroke: var(--nc-moon); }
.evening-scene > span {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: #fff8ef;
  white-space: nowrap;
}
.auth-card {
  padding: 32px 36px 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: none;
  min-width: 0;
}
.mode-switch {
  display: flex;
  border-radius: 12px;
  padding: 4px;
  background: var(--nc-raised);
  gap: 4px;
  margin-bottom: 28px;
}
.mode-switch button {
  min-height: 42px;
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 13px;
  border-radius: 9px;
  color: var(--muted);
}
.mode-switch [aria-pressed="true"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: none;
}
.card-eyebrow {
  font-size: 11px;
}
.auth-card h2 {
  font: 600 32px/1.25 var(--serif);
  letter-spacing: -0.7px;
  margin: 10px 0 12px;
}
.auth-description {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 26px;
}
.google-button,
.primary-button,
.secondary-button {
  width: 100%;
  min-height: 48px;
  border-radius: var(--nc-radius-control);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.google-button {
  border: 1px solid var(--line);
  background: var(--card);
}
.google-button svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
.primary-button {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--nc-on-accent);
  justify-content: space-between;
}
.primary-button > span:last-child {
  font-size: 23px;
  line-height: 1;
}
.secondary-button {
  border: 1px solid var(--line);
  background: transparent;
}
.primary-button:not(:disabled):hover {
  background: var(--nc-accent-hover);
}
.secondary-button:not(:disabled):hover,
.google-button:not(:disabled):hover {
  background: var(--nc-warm-soft);
}
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
  margin: 22px 0;
}
.divider:before,
.divider:after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
label {
  display: block;
  font-size: 13px;
  margin: 0 0 8px;
  font-weight: 500;
}
input {
  display: block;
  min-width: 0;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--nc-line-strong);
  border-radius: var(--nc-radius-control);
  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.5;
  background: var(--card);
  color: var(--ink);
  outline: none;
  scroll-margin-block: 24px;
}
input::placeholder {
  color: var(--nc-muted);
  opacity: 0.7;
}
input:focus {
  border-color: var(--nc-warm);
  box-shadow: 0 0 0 3px var(--nc-focus);
}
input[aria-invalid="true"] {
  border-color: var(--nc-danger);
  box-shadow: 0 0 0 3px var(--nc-danger-soft);
}
input:disabled {
  opacity: 0.7;
}
.field-hint {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  margin: 9px 0 22px;
}
.delivery-address {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
#sentEmail {
  font-size: 13px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.text-button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  white-space: nowrap;
  padding: 4px 0 4px 8px;
}
.code-input {
  font-size: 23px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3em;
  text-align: center;
  padding-inline: 12px;
}
.resend-button {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
details {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  list-style: none;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
summary::-webkit-details-marker {
  display: none;
}
summary:before {
  content: "+";
  font-size: 17px;
}
details[open] summary:before {
  content: "−";
}
details .field-hint {
  margin-top: 4px;
}
#inviteLogin {
  margin-top: 14px;
}
.form-message {
  margin-top: 16px;
  white-space: pre-line;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.8;
}
.form-message:empty {
  display: none;
}
.form-message[data-kind="error"] {
  color: var(--nc-danger);
  background: var(--nc-danger-soft);
  border: 1px solid var(--nc-danger-soft);
  border-radius: 10px;
  padding: 12px;
}
.form-message[data-kind="success"] {
  color: var(--nc-success);
}
.form-message[data-kind="busy"] {
  color: var(--accent);
}
.sync-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin-top: 24px;
}
.sync-note svg {
  width: 12px;
  height: 14px;
  flex-shrink: 0;
}
.ios-download-note { margin: 14px 0 0; text-align: center; font-size: 12px; }
.ios-download-note a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
footer {
  display: flex;
  justify-content: center;
  gap: 13px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 18px;
}
footer a {
  min-height: 38px;
  display: flex;
  align-items: center;
}
footer > span {
  align-self: center;
}
.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 22px;
  line-height: 1.7;
}
.spinner {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.page-note {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-align: center;
  margin: 0 20px 24px;
  color: var(--muted);
}
.no-script {
  max-width: 440px;
  margin: 20px auto;
  padding: 20px;
  color: var(--nc-danger);
}
@media (max-width: 1000px) {
  .auth-layout {
    gap: 40px;
    grid-template-columns: 1fr 410px;
  }
  .evening-intro h1 {
    white-space: pre-line;
    font-size: 42px;
  }
}
@media (max-width: 760px) {
  .site-header {
    padding: 18px 24px;
  }
  .wordmark {
    font-size: 30px;
  }
  .wordmark svg {
    width: 23px;
    height: 23px;
    margin-right: 9px;
  }
  nav {
    gap: 18px;
  }
  .auth-layout {
    display: block;
    max-width: 480px;
    margin: 20px auto 24px;
    padding: 0 20px;
  }
  .evening-intro {
    display: none;
  }
  .auth-card {
    padding: 26px 26px 20px;
    border-radius: 24px;
  }
  .auth-card h2 {
    font-size: 32px;
  }
  .mode-switch {
    margin-bottom: 25px;
  }
  .page-note {
    margin-bottom: 20px;
  }
  .auth-description {
    margin-bottom: 24px;
  }
}
@media (max-width: 360px) {
  .site-header {
    padding: 16px 18px;
  }
  nav {
    gap: 10px;
  }
  .auth-layout {
    padding: 0 14px;
    margin-top: 8px;
  }
  .auth-card {
    padding: 23px 20px 16px;
  }
  .code-input {
    letter-spacing: 0.25em;
  }
  .auth-card h2 {
    font-size: 29px;
  }
  .wordmark {
    font-size: 27px;
  }
}
@media (max-height: 600px) and (max-width: 760px) {
  .auth-layout {
    margin-top: 4px;
  }
  .auth-card {
    padding-top: 20px;
  }
  .mode-switch {
    margin-bottom: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
  * {
    scroll-behavior: auto !important;
  }
}

.action-arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-feedback:has(.form-message:not(:empty)) {
  margin: 12px 0 16px;
}
.form-feedback .form-message {
  margin: 0;
}

#googleOneTapButton { display: flex; justify-content: center; min-height: 44px; }
#googleOneTap[inert] { opacity: .55; }
.google-button.google-alternative { margin-top: 10px; font-size: 12px; min-height: 44px; background: transparent; border-color: transparent; }
.google-alternative svg { display: none; }
