/* public.css — auth, onboarding, landing, settings forms. */

.auth-shell {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 24px 16px;
}
.auth-card { width: 100%; max-width: 400px; }
.auth-card .logo { text-align: center; margin-bottom: 24px; }
.auth-card h1 { text-align: center; margin-bottom: 4px; }
.auth-card .sub { text-align: center; color: var(--text-2); margin-bottom: 24px; }
.auth-links { text-align: center; margin-top: 20px; font-size: .9rem; color: var(--text-2); }

.logo-mark {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.4rem; color: var(--text);
}
.logo-mark .dot {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #f2a65a);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem;
}

.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--text-2); }
.check-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }

/* ---- landing ---- */
.hero {
  min-height: 82dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 32px 20px; gap: 20px;
}
.hero h1 { font-size: 2rem; max-width: 480px; }
.hero p { color: var(--text-2); max-width: 400px; }
.hero .fake-card {
  background: var(--card); box-shadow: var(--shadow); border-radius: 20px;
  padding: 18px 22px; font-size: .95rem; max-width: 320px;
  transform: rotate(-2deg);
  animation: float-in .6s var(--ease);
}
@keyframes float-in { from { opacity: 0; transform: rotate(-2deg) translateY(20px); } }

/* ---- onboarding ---- */
.onb { max-width: 440px; margin: 0 auto; padding: 24px 20px 48px; min-height: 100dvh; display: flex; flex-direction: column; }
.onb-step { display: none; flex: 1; flex-direction: column; animation: step-in .3s var(--ease); }
.onb-step.active { display: flex; }
@keyframes step-in { from { opacity: 0; transform: translateX(24px); } }
.onb h1 { margin-bottom: 6px; }
.onb .sub { color: var(--text-2); margin-bottom: 24px; }
.onb-actions { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 24px; }
.onb-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 20px; }
.onb-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--bg-3); transition: background .2s, transform .2s; }
.onb-dots span.on { background: var(--accent); transform: scale(1.2); }

.recovery-code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 1.3rem; letter-spacing: 1px; text-align: center;
  background: var(--bg-2); border: 1.5px dashed var(--line);
  padding: 18px; border-radius: 14px; margin: 16px 0; user-select: all;
}

.preset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.preset-grid .avatar { width: 100%; height: auto; aspect-ratio: 1; font-size: 1.3rem; cursor: pointer;
  border: 3px solid transparent; transition: transform .15s var(--ease), border-color .15s; }
.preset-grid .avatar:active { transform: scale(.92); }
.preset-grid .avatar.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.live-preview {
  border-radius: 20px; padding: 28px 20px; text-align: center; color: #fff;
  background: linear-gradient(160deg, var(--pv-accent, var(--accent)), color-mix(in srgb, var(--pv-accent, var(--accent)) 55%, #000));
  margin-bottom: 20px;
}
.live-preview .avatar { margin: 0 auto 10px; border: 3px solid rgba(255,255,255,.4); }
.live-preview .nm { font-weight: 700; font-size: 1.1rem; }
.live-preview .pr { opacity: .9; font-size: .95rem; margin-top: 6px; min-height: 1.4em; }

.share-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-2); border-radius: 14px; padding: 14px 16px;
  font-size: .95rem; margin: 16px 0; word-break: break-all;
}
.share-box .lnk { flex: 1; font-weight: 600; }

/* celebration burst */
.burst { position: relative; height: 0; }
.burst i {
  position: absolute; left: 50%; top: 0; width: 8px; height: 8px; border-radius: 2px;
  background: var(--accent); opacity: 0;
}
.burst.go i { animation: burst .9s var(--ease) forwards; }
@keyframes burst {
  0% { opacity: 1; transform: translate(0,0) rotate(0); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(540deg); }
}

/* ---- settings ---- */
.set-section { margin-bottom: 28px; }
.set-section h2 { font-size: 1rem; color: var(--text-2); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .03em; font-weight: 700; }
.set-card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.set-card .inner { padding: 18px; }
.set-row {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  border-bottom: 1px solid var(--line); min-height: 56px;
}
.set-row:last-child { border-bottom: 0; }
.set-row .grow { flex: 1; min-width: 0; }
.set-row .ttl { font-weight: 600; }
.set-row .sub2 { font-size: .82rem; color: var(--text-2); }

/* iOS-style switch */
.switch { position: relative; width: 50px; height: 30px; flex-shrink: 0; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; z-index: 2; cursor: pointer; margin: 0; }
.switch .tr {
  position: absolute; inset: 0; border-radius: 999px; background: var(--bg-3);
  transition: background .2s var(--ease);
}
.switch .tr::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .2s var(--ease);
}
.switch input:checked + .tr { background: var(--accent); }
.switch input:checked + .tr::after { transform: translateX(20px); }

.color-dots { display: flex; gap: 10px; flex-wrap: wrap; }
.color-dots button {
  width: 36px; height: 36px; border-radius: 50%; border: 3px solid transparent;
  transition: transform .15s var(--ease);
}
.color-dots button:active { transform: scale(.88); }
.color-dots button.sel { border-color: var(--text); }
