/* Klova design system: frosted glass on a cool gradient. Shared by the landing page and the app. */
:root {
  --ink: #1d2433;
  --ink-2: #4c5670;
  --ink-3: #737c95;
  --accent: #3d6bff;
  --accent-press: #2f57e6;
  --accent-soft: rgba(61, 107, 255, .1);
  --green: #13a05f;
  --green-soft: rgba(19, 160, 95, .12);
  --red: #d63b4a;
  --red-soft: rgba(214, 59, 74, .1);
  --amber: #a35f00;
  --amber-soft: rgba(255, 170, 40, .14);
  --glass: rgba(255, 255, 255, .42);
  --glass-strong: rgba(255, 255, 255, .74);
  --edge: rgba(255, 255, 255, .85);
  --line: rgba(110, 120, 160, .2);
  --shadow: 0 18px 40px -18px rgba(52, 72, 140, .28);
  --shadow-sm: 0 8px 20px -12px rgba(52, 72, 140, .4);
  --font: "Times New Roman", Times, "Liberation Serif", serif;
  --font-display: "Instrument Serif", "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  /* motion: crisp and fast, no bounce. Enter = strong ease-out, on-screen movement = ease-in-out. */
  --ease: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --t-press: 140ms;
  --t-fast: 200ms;
  --t-view: 320ms;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
  font: 400 16.5px/1.55 var(--font); color: var(--ink); min-height: 100vh; -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background:
    radial-gradient(60% 55% at 0% 100%, rgba(120, 175, 255, .75), transparent 70%),
    radial-gradient(55% 60% at 100% 100%, rgba(165, 140, 255, .8), transparent 70%),
    radial-gradient(40% 40% at 55% 100%, rgba(110, 220, 230, .55), transparent 70%),
    linear-gradient(180deg, #eceff4 0%, #e4e9f2 55%, #d9e1f2 100%);
  background-color: #e4e9f2;
  background-attachment: fixed;
}
a { color: var(--accent); }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
svg { display: block; flex-shrink: 0; }
:focus-visible { outline: 3px solid rgba(61, 107, 255, .45); outline-offset: 2px; }

/* logo: a single Roblox stud on a blue tile */
.logo { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 30px; font-weight: 400; letter-spacing: 0; color: var(--ink); text-decoration: none; cursor: pointer; }
/* box-shadow, not filter: drop-shadow — a CSS filter here inside a backdrop-filter panel makes Safari/Chrome paint a black box at the page corner */
/* wordmark: italic serif filled with the orb's sky gradient (deepened so the light end still reads on glass) */
.logo .word { font-style: italic; font-size: 1.2em; line-height: 1; letter-spacing: -.01em; padding: .06em .08em .1em 0;
  background: linear-gradient(180deg, #5558e6 0%, #7178ee 45%, #9aa4f4 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mark { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; box-shadow: 0 4px 10px -2px rgba(92, 98, 230, .3); }

/* frosted surfaces */
.glass { background: var(--glass); border: 1.5px solid var(--edge); border-radius: 28px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9); }
.pane { background: var(--glass-strong); border: 1.5px solid var(--edge); border-radius: 28px; box-shadow: var(--shadow); }

/* buttons */
.btn, .go { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 24px;
  font: 500 15px/1 var(--font); text-decoration: none; text-align: center; cursor: pointer; border: 1.5px solid transparent;
  transition: transform var(--t-press) var(--ease), background var(--t-fast) ease, box-shadow var(--t-fast) ease, opacity var(--t-fast) ease; }
.btn:active, .go:active { transform: scale(.97); }
.btn:disabled, .go:disabled { opacity: .55; cursor: wait; }
.btn-primary, .go { background: var(--accent); color: #fff; box-shadow: 0 10px 22px -10px rgba(61, 107, 255, .7); }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover, .go:hover { background: #3462f7; } .btn-quiet:hover, .go.secondary:hover { background: #fff; } .chip:hover { background: rgba(255, 255, 255, .45); } }
.btn-quiet, .go.secondary { background: var(--glass-strong); color: var(--ink); border-color: var(--edge); box-shadow: var(--shadow-sm); }
.go.small, .btn-sm { min-height: 42px; padding: 0 18px; font-size: 14px; }
.go.danger { background: var(--red); box-shadow: none; }
.round { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--glass-strong); border: 1.5px solid var(--edge); flex-shrink: 0; transition: transform var(--t-press) var(--ease); }
.chip { height: 42px; padding: 0 16px; border-radius: 21px; font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap;
  border: 1.5px solid rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .22); transition: background var(--t-fast) ease, color var(--t-fast) ease, transform var(--t-press) var(--ease); }
.chip:active, .round:active { transform: scale(.97); }
.chip[aria-pressed=true] { background: var(--glass-strong); color: var(--ink); border-color: var(--edge); box-shadow: var(--shadow-sm); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 14px; font-size: 13px; font-weight: 500; background: var(--accent-soft); color: #2a4fd6; }
.pill.ok { background: var(--green-soft); color: #0b7a47; }
.pill.bad { background: var(--red-soft); color: #b22c3b; }

/* fields */
.field, textarea.field { width: 100%; min-height: 50px; padding: 0 18px; border-radius: 25px; background: var(--glass-strong); border: 1.5px solid var(--edge);
  font: 400 16px var(--font); color: var(--ink); outline: none; transition: border-color 150ms, box-shadow 150ms; }
textarea.field { padding: 14px 18px; border-radius: 20px; min-height: 96px; resize: vertical; line-height: 1.5; }
.field:focus { border-color: rgba(61, 107, 255, .6); box-shadow: 0 0 0 4px rgba(61, 107, 255, .12); }
.field::placeholder { color: var(--ink-3); }
label.f { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin: 0 0 6px 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin-top: 2px; flex-shrink: 0; }
.err { color: var(--red); font-size: 14px; min-height: 1em; white-space: pre-wrap; }
.err.ok { color: var(--green); }

/* painted art: pre-rendered images (a live SVG displacement filter here made Safari/Chrome paint a black box in the page corner) */
.art { position: absolute; inset: 0; background: #dfe6fb center / cover no-repeat; }
.a-tycoon { background-image: url("art/tycoon.webp"); }
.a-obby { background-image: url("art/obby.webp"); }
.a-sim { background-image: url("art/sim.webp"); }
.a-garden { background-image: url("art/garden.webp"); }

/* sheets (modals): scrim fades, card rises from just below. Closing is faster than opening. */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(40, 52, 90, .28);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade 220ms var(--ease) both; }
.modal > .card { width: min(460px, 100%); max-height: 92vh; overflow-y: auto; padding: 30px; border-radius: 30px; background: rgba(250, 252, 255, .9);
  border: 1.5px solid var(--edge); box-shadow: 0 40px 80px -30px rgba(40, 55, 120, .45); animation: rise 280ms var(--ease) both; }
.modal.closing { animation: fade-out 160ms ease-out both; }
.modal.closing > .card { animation: sink 160ms ease-out both; }
.modal h2 { font-family: var(--font-display); font-size: 32px; font-weight: 400; letter-spacing: 0; margin-bottom: 6px; }
.stack > * + * { margin-top: 12px; }
@keyframes fade { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes sink { to { opacity: 0; transform: translateY(6px) scale(.98); } }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 24px; background: rgba(120, 135, 180, .12); margin-bottom: 18px; }
.seg button { height: 40px; border-radius: 20px; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: background var(--t-fast) ease, color var(--t-fast) ease, box-shadow var(--t-fast) ease; }
.seg button[aria-pressed=true] { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

/* toasts enter from (and leave toward) the bottom edge they sit on */
.toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); z-index: 70; max-width: calc(100% - 32px); padding: 14px 20px; border-radius: 22px;
  background: rgba(255, 255, 255, .94); border: 1.5px solid var(--edge); box-shadow: var(--shadow); font-weight: 500;
  transform: translateX(-50%); animation: toast-in 320ms var(--ease) both; }
.toast.out { animation: toast-out 200ms ease-out both; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 24px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, 12px) scale(.98); } }

/* one-shot entrances; --i staggers siblings 40ms apart */
.enter { animation: enter var(--t-view) var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
.fade-in { animation: fade var(--t-fast) ease both; }

/* skeletons: soft left-to-right shimmer, replaced the moment real content arrives */
.sk { position: relative; overflow: hidden; display: block; background: rgba(120, 135, 180, .13); border-radius: 10px; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent); animation: shimmer 1.6s var(--ease-in-out) infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-line { height: 12px; margin: 10px 0; }
.sk-title { height: 26px; width: 55%; border-radius: 13px; }
.sk-thumb { aspect-ratio: 207 / 160; border-radius: 22px; }
.sk-pill { height: 28px; width: 90px; border-radius: 14px; }
.sk-btn { height: 48px; width: 200px; border-radius: 24px; }

/* buttons that are working: label fades out, a spinner takes its place */
.btn.loading, .go.loading, .send.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading > *, .send.loading > * { opacity: 0; }
.btn.loading::after, .go.loading::after, .send.loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn-quiet.loading::after { border-color: rgba(29, 36, 51, .2); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Continue with Google: white button with the Google "G", per Google's sign-in branding */
.gbtn { background: #fff; color: #1f1f1f; border-color: #dadce0; box-shadow: var(--shadow-sm); gap: 12px; font-size: 15.5px; }
.gbtn.loading::after { border-color: rgba(31, 31, 31, .2); border-top-color: #1f1f1f; }
@media (hover: hover) and (pointer: fine) { .gbtn:hover { background: #f8f9fb; } }

/* show/hide password */
.pw { position: relative; }
.pw .field { padding-right: 52px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); }
.pw-toggle:active { transform: translateY(-50%) scale(.94); }

/* Reduced motion: keep fades that explain state, drop movement and shimmer. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .enter, .modal > .card, .modal.closing > .card { animation-name: fade !important; }
  .toast { animation-name: fade !important; }
  .sk::after { animation: none; }
  *, *::before, *::after { transition-property: opacity, background-color, color, border-color !important; }
}
@media (prefers-reduced-transparency: reduce) { .glass, .pane, .modal > .card { background: #f4f7fc; } .modal { backdrop-filter: none; } }
