/*
 * WishSumo site styles: the palette signed off 2026-10-12 (logo sky + coral on deep navy, every text pair WCAG AA),
 * base type, buttons, header, footer, forms and the auth/tool page layout. Page-specific styles stay in each view.
 * Loaded through asset() so a change always gets a new URL past the Cloudflare cache.
 */
:root {
    --ink: #0B1620; --ink-2: #13212D; --line-dark: #22323F; --chip: #1C3445;
    --sky: #29B6E8; --sky-deep: #0A6E9C; --sky-deeper: #08587D;
    --coral: #FF5A5F; --coral-deep: #C8323F; --coral-tint: #FDECEE;
    --text: #15212B; --muted: #4D5B68; --muted-dark: #B8C4CE;
    --mist: #F3F6F8; --line: #E3E9EE; --white: #FFFFFF;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased; }
a { color: var(--sky-deep); }
a:hover { color: var(--sky-deeper); }
h1, h2, h3, p { margin: 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Scripts show and hide elements by toggling this class. */
.hidden { display: none !important; }
a:focus-visible, button:focus-visible, select:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }

/* Buttons */
.btn { display: inline-block; padding: 16px 28px; font: inherit; font-size: 17px; font-weight: 600; line-height: 1.2; border: 0; border-radius: 999px; text-decoration: none; text-align: center; cursor: pointer; }
.btn-sky { color: var(--ink); background: var(--sky); }
.btn-sky:hover { color: var(--ink); background: #4CC3EE; }
.btn-deep { color: var(--white); background: var(--sky-deep); padding: 12px 20px; font-size: 15px; }
.btn-deep:hover { color: var(--white); background: var(--sky-deeper); }
.btn-white { color: var(--ink); background: var(--white); }
.btn-white:hover { color: var(--ink); background: var(--mist); }
.btn-ghost { color: var(--text); background: var(--white); border: 1px solid var(--line); padding: 12px 20px; font-size: 15px; }
.btn-ghost:hover { color: var(--text); background: var(--mist); }
.btn-block { display: block; width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Header */
.nav { background: var(--white); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.nav img { height: 36px; width: auto; display: block; }
.nav nav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.nav .link { padding: 12px 14px; font-size: 15px; font-weight: 500; color: var(--text); text-decoration: none; }
.nav .link:hover, .nav .link[aria-current] { color: var(--sky-deep); }

/* Footer */
footer { background: var(--ink); color: var(--muted-dark); font-size: 14px; }
footer .wrap { padding-top: 32px; padding-bottom: 32px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
footer a { color: var(--muted-dark); }
footer a:hover { color: var(--white); }

/* Auth and tool pages (log in, sign up, password, Save window): one white card on navy. */
.auth { min-height: 100vh; background: var(--ink); display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 440px; background: var(--white); border-radius: 20px; padding: 36px 32px; display: flex; flex-direction: column; gap: 22px; }
.auth-logo { display: flex; justify-content: center; }
.auth-logo img { height: 44px; width: auto; display: block; }
.auth-head { display: flex; flex-direction: column; gap: 8px; text-align: center; }
.auth-head h1 { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.auth-head p { font-size: 15px; line-height: 1.6; color: var(--muted); }
.auth-foot { font-size: 14px; line-height: 1.6; color: var(--muted); text-align: center; }
.auth-foot a { font-weight: 600; }
.auth-legal { font-size: 13px; text-align: center; }
.auth-legal a { color: var(--muted); }

/* Forms */
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.label { font-size: 14px; font-weight: 600; color: var(--text); }
.hint { font-size: 13px; line-height: 1.5; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--text); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: var(--sky-deep); }
.input { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--white); border: 1px solid #C9D3DB; border-radius: 12px; padding: 12px 14px; }
.input::placeholder { color: #7A8794; }
.input:focus { outline: none; border-color: var(--sky-deep); box-shadow: 0 0 0 3px rgba(41, 182, 232, 0.35); }
.input:disabled { background: var(--mist); color: var(--muted); }
.alert { font-size: 14px; line-height: 1.5; border-radius: 12px; padding: 12px 14px; }
.alert-error { color: #9E1F2B; background: var(--coral-tint); border: 1px solid #F5C2C7; }
.alert-ok { color: #0B5A34; background: #E8F6EE; border: 1px solid #B9E2CA; }
.small-link { font-size: 14px; font-weight: 500; }

/* Save window (src/Views/save.php; save.js builds the photo-choice buttons) */
.save-photo { width: 128px; height: 128px; object-fit: contain; border: 1px solid var(--line); border-radius: 14px; background: var(--white); display: block; }
#save-image-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
#save-image-choices button { width: 56px; height: 56px; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--white); cursor: pointer; }
#save-image-choices button:hover { border-color: var(--sky-deep); }
#save-image-choices img { width: 100%; height: 100%; object-fit: contain; display: block; }
.photo-block:has(#save-image.hidden):has(#save-image-choices:empty) { display: none; }
.surprise-note { font-size: 13px; line-height: 1.5; color: var(--coral-deep); }
.actions { display: flex; gap: 10px; padding-top: 4px; }
.actions .btn { flex: 1 1 0; }
.done { display: flex; flex-direction: column; gap: 12px; text-align: center; }
.done-text { font-size: 18px; font-weight: 600; }

@media (max-width: 600px) {
    .nav .link { padding: 12px 8px; font-size: 14px; }
    .nav img { height: 30px; }
    .nav .wide-only { display: none; }
    .auth { align-items: flex-start; padding-top: 24px; }
    .auth-card { padding: 28px 20px; }
}

/* Legal pages */
.legal { padding: 56px 0 88px; }
.legal .narrow { display: flex; flex-direction: column; gap: 18px; }
.legal h1 { font-size: clamp(32px, 4.5vw, 44px); line-height: 1.15; letter-spacing: -0.02em; }
.legal h2 { font-size: 22px; line-height: 1.3; margin-top: 22px; }
.legal p, .legal li { font-size: 17px; line-height: 1.7; }
.legal ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.legal .dated { color: var(--muted); font-size: 15px; }
