/* Step 1 — a calm welcome, built from the selected ivory/charcoal design. */
:root {
  color-scheme: light;
  --entry-bg: #f6f3ed;
  --entry-ink: #171816;
  --entry-muted: #66645f;
  --entry-olive: #70735a;
  --entry-line: #dedcd3;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-synthesis: none;
  color: var(--entry-ink);
  background: var(--entry-bg);
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:disabled { cursor: wait; opacity: .6; }
[hidden] { display: none !important; }
img, svg { display: block; }
h1, h2, p { margin: 0; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--entry-olive);
  outline-offset: 5px;
}

.entry-shell {
  width: min(100%, 1240px);
  min-height: 100svh;
  margin-inline: auto;
  padding: max(30px, env(safe-area-inset-top)) 64px max(14px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
.entry-header { display: flex; align-items: center; justify-content: flex-end; min-height: 44px; }
.entry-explore { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: 17px; }
.entry-explore svg { width: 22px; height: 22px; transition: transform .18s ease; }
.entry-explore:hover svg { transform: translateX(3px); }
.entry-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(56px, 8vw, 112px);
  padding-block: 40px;
}
.entry-art { width: min(100%, 404px); justify-self: center; }
.entry-art svg { width: 100%; height: auto; }
.entry-content { width: 100%; max-width: 450px; }
.entry-content h1 { font-size: clamp(50px, 5.9vw, 78px); line-height: 1.06; letter-spacing: -.06em; }
.entry-content h1 span, .entry-content h1 strong { display: block; }
.entry-content h1 span { font-weight: 300; }
.entry-content h1 strong { font-weight: 700; letter-spacing: -.045em; }
.entry-copy { margin-top: 20px; font-size: 18px; line-height: 1.6; letter-spacing: -.025em; color: var(--entry-muted); }
.entry-account, .entry-signed-in { margin-top: 38px; }
.entry-google, .entry-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 60px;
  padding: 12px 18px;
  border: 1px solid var(--entry-ink);
  border-radius: 18px;
  background: var(--entry-ink);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.4;
  transition: background .18s ease, transform .18s ease;
}
.entry-google:not(:disabled):hover, .entry-primary:hover { background: #303229; }
.entry-google:not(:disabled):active, .entry-primary:active { transform: scale(.985); }
.entry-google-icon { flex: 0 0 34px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; }
.entry-google-icon svg { width: 24px; height: 24px; }
.entry-login { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 5px; margin-top: 12px; color: var(--entry-muted); font-size: 14px; line-height: 1.5; }
.entry-login button, .entry-signed-in > button { min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: var(--entry-ink); font-size: inherit; text-decoration: underline; text-underline-offset: 4px; }
.entry-login button { font-weight: 600; }
.entry-signed-in { display: grid; gap: 14px; text-align: center; }
.entry-signed-in > span { font-size: 17px; font-weight: 500; overflow-wrap: anywhere; }
.entry-signed-in > button { justify-self: center; color: var(--entry-muted); font-size: 14px; }
.entry-footer { display: flex; align-items: center; justify-content: center; gap: 15px; color: var(--entry-muted); font-size: 12px; }
.entry-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.entry-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.auth-message:empty { display: none; }
.auth-message { margin-top: 12px; color: #555b40; font-size: 13px; line-height: 1.5; text-align: center; overflow-wrap: anywhere; }

/* Existing Google registration form, using the same visual language. */
.registration-dialog {
  width: min(460px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--entry-line);
  border-radius: 26px;
  background: var(--entry-bg);
  color: var(--entry-ink);
  box-shadow: 0 24px 80px #17181624;
}
.registration-dialog::backdrop { background: #17181666; backdrop-filter: blur(6px); }
.registration-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #ece9e1; color: var(--entry-ink); font-size: 28px; }
.registration-mark { margin-bottom: 24px; }
.registration-mark img { width: 27px; height: 34px; }
.registration-kicker { margin-bottom: 9px; color: #62654f; font-size: 10px; font-weight: 600; letter-spacing: .16em; }
.registration-dialog h2 { margin-bottom: 12px; max-width: 330px; font-size: 30px; font-weight: 600; line-height: 1.15; letter-spacing: -.045em; }
.registration-intro { margin-bottom: 24px; color: var(--entry-muted); font-size: 14px; line-height: 1.55; }
.registration-intro strong { color: var(--entry-ink); overflow-wrap: anywhere; font-weight: 500; }
.registration-form { display: grid; gap: 8px; }
.registration-form label { font-size: 13px; line-height: 1.5; font-weight: 600; }
.registration-form input { width: 100%; min-width: 0; min-height: 50px; margin-bottom: 10px; padding: 12px 14px; border: 1px solid #d7d5cb; border-radius: 12px; background: #fffdf9; color: var(--entry-ink); font-size: 16px; }
.registration-form input:focus { border-color: var(--entry-olive); }
.registration-form input::placeholder { color: #79766e; }
.registration-privacy { margin: 2px 0 10px; color: var(--entry-muted); font-size: 12px; line-height: 1.6; }
.registration-privacy a { color: var(--entry-ink); text-decoration: underline; text-underline-offset: 3px; }
.registration-form .auth-message { margin: 0 0 4px; text-align: left; }
.registration-form .btn { width: 100%; min-height: 52px; padding: 12px 18px; border: 0; border-radius: 14px; background: var(--entry-ink); color: white; font-weight: 600; }
.registration-form .btn:not(:disabled):hover { background: #303229; }

@media (max-width: 900px) {
  .entry-shell { max-width: 460px; padding: max(24px, env(safe-area-inset-top)) 26px max(12px, env(safe-area-inset-bottom)); }
  .entry-explore { font-size: 15px; gap: 8px; }
  .entry-body { display: flex; flex-direction: column; justify-content: center; gap: 28px; padding-block: 26px 12px; }
  .entry-art { flex-shrink: 0; width: min(74vw, 30svh, 288px); }
  .entry-content { max-width: none; }
  .entry-content h1 { font-size: clamp(40px, 13vw, 56px); line-height: 1.05; letter-spacing: -.055em; }
  .entry-copy { margin-top: 12px; font-size: clamp(15px, 4.2vw, 18px); line-height: 1.55; }
  .entry-account, .entry-signed-in { margin-top: 28px; }
  .entry-google, .entry-primary { min-height: 56px; padding: 10px 12px; font-size: 16px; gap: 12px; }
  .entry-google-icon { width: 32px; height: 32px; flex-basis: 32px; }
  .entry-google-icon svg { width: 22px; height: 22px; }
  .entry-login { margin-top: 8px; font-size: 13px; }
  .registration-dialog { padding: 26px 22px; }
}

@media (max-width: 900px) and (max-height: 740px) {
  .entry-shell { padding-top: max(12px, env(safe-area-inset-top)); }
  .entry-body { gap: 20px; padding-top: 14px; }
  .entry-art { width: min(66vw, 26svh, 220px); }
  .entry-content h1 { font-size: clamp(38px, 11.5vw, 46px); }
  .entry-copy { font-size: 15px; }
  .entry-account, .entry-signed-in { margin-top: 22px; }
}

@media (max-width: 900px) and (max-height: 640px) {
  .entry-body { gap: 16px; padding-block: 10px 6px; }
  .entry-art { width: min(60vw, 22svh); }
  .entry-copy { margin-top: 8px; }
  .entry-account, .entry-signed-in { margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
