/* UIUX01 candidate patch — loaded after the live CSS. Uses only the approved brand tokens from brand.css.
   Every rule is additive or a minimum-size floor; nothing here changes prices, routes or behaviour. */

:root {
  --ux-gap: clamp(16px, 4vw, 32px);
  --ux-card: #fff;
  --ux-ok: #2f6b45;
  --ux-ok-bg: #edf5ef;
  --ux-soon: #7a5a1c;
  --ux-soon-bg: #f6efe0;
}

/* ---------- 1. App launch bar (replaces the retired 9px preview banner, same slot) ---------- */
.ux-appbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px;
  min-height: 44px; padding: 8px 16px; background: var(--brand-ink); color: #f7f1e6;
  font: 500 13px/1.45 var(--sans); text-decoration: none; text-align: center;
}
.ux-appbar strong { font-weight: 700; color: #fff; }
.ux-appbar .ux-dot { width: 7px; height: 7px; border-radius: 50%; background: #d7b46a; box-shadow: 0 0 0 3px #d7b46a33; }
.ux-appbar .ux-sep { opacity: .5; }
.ux-appbar .ux-soon { color: #d9cdb8; }
.ux-appbar .ux-go { color: #e8c983; font-weight: 700; margin-left: 4px; white-space: nowrap; }
.ux-appbar:hover .ux-go, .ux-appbar:focus-visible .ux-go { text-decoration: underline; text-underline-offset: 3px; }
.ux-appbar:focus-visible { outline: 3px solid var(--brand-focus); outline-offset: -3px; }
@media (max-width: 420px) { .ux-appbar .ux-sep, .ux-appbar .ux-soon { display: none; } }

/* ---------- 2. Store entry (home App panel, footer) ---------- */
.ux-store-mini { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 6px; }
.ux-badge { display: inline-flex; align-items: center; min-height: 44px; border-radius: 9px; }
.ux-badge img { display: block; height: 40px; width: auto; }
.ux-badge-play img { height: 60px; margin: -10px; }
.ux-badge:focus-visible { outline: 3px solid var(--brand-focus); outline-offset: 3px; }
.ux-soon-pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px;
  border: 1px dashed #c9b998; border-radius: 9px; color: var(--brand-ink); background: var(--brand-paper);
  font: 600 13px/1.2 var(--sans);
}
.ux-soon-pill em { font-style: normal; font-weight: 700; color: var(--ux-soon); background: var(--ux-soon-bg); border-radius: 99px; padding: 3px 8px; font-size: 12px; }

/* ---------- 3. Footer (all marketing pages) ---------- */
.ux-footer { background: #f3eee5; border-top: 1px solid var(--brand-line); margin-top: 48px; color: var(--brand-ink); }
.ux-footer-in { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 32px; padding-top: 44px; padding-bottom: 28px; }
.ux-footer .wordmark { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; min-height: 44px; }
.ux-footer .brand-logo { width: 40px; height: auto; }
.ux-footer .brand-name { font: 700 18px/1 var(--sans); letter-spacing: .02em; }
.ux-f-brand p { margin: 10px 0 0; color: var(--brand-muted); font-size: 14px; line-height: 1.6; max-width: 30ch; }
.ux-f-col h2 { margin: 0 0 10px; font: 700 13px/1.3 var(--sans); letter-spacing: .06em; color: var(--brand-gold); text-transform: uppercase; }
.ux-f-col ul { list-style: none; margin: 0; padding: 0; }
.ux-f-col li a { display: flex; align-items: center; min-height: 40px; color: var(--brand-ink); text-decoration: none; font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; }
.ux-f-col li a:hover { color: var(--brand-gold); text-decoration: underline; text-underline-offset: 3px; }
.ux-f-col a:focus-visible { outline: 3px solid var(--brand-focus); outline-offset: 2px; border-radius: 6px; }
.ux-f-base { border-top: 1px solid var(--brand-line); padding-top: 14px; padding-bottom: 22px; margin: 0 auto; color: var(--brand-muted); font-size: 13px; }
@media (max-width: 900px) { .ux-footer-in { grid-template-columns: 1fr 1fr; } .ux-f-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .ux-footer-in { grid-template-columns: 1fr; gap: 22px; padding-top: 32px; } }

/* ---------- 4. Readability floor on real reading text (illustration mock-ups keep their scale) ---------- */
.evp-selectors label, .evp-card-tag, .evp-product-en, .evp-eyebrow, .evp-section-kicker, .evp-cycle-row > p,
.evp-review small, .evp-referral b { font-size: max(12px, 1em) !important; }
.evp-fee-note, .evp-fee-note small, .evp-features li > span, .evp-referral p, .evp-tax, .evp-choice,
.evp-alternative, .evp-table, .evp-review, .evp-disclosure p, .evp-disclosure small, .evp-disclosure nav,
.evp-context > .evp-fine, .evp-addon-footer, .evp-addon-right small { font-size: 13px !important; line-height: 1.6; }
.evp-disclosure nav a { display: inline-flex; align-items: center; min-height: 40px; }
.ux-terms-ver { color: var(--brand-muted); }
.ux-inline-app { font-weight: 700; color: var(--brand-gold); }
#main.home-v2 .plan .who small, #main.home-v2 .pair span i, #main.home-v2 .out .tag { font-size: 12.5px; }
.tlink { min-height: 44px; display: inline-flex; align-items: center; }
.evp-contact-details a { display: inline-flex; align-items: center; min-height: 40px; }

/* ---------- 5. Download page ---------- */
.ux-download main { padding-bottom: 8px; }
.ux-dl-hero { padding-top: clamp(28px, 6vw, 72px); padding-bottom: 8px; }
.ux-dl-hero h1 { font: 800 clamp(34px, 5.4vw, 60px)/1.12 var(--sans); letter-spacing: -.01em; margin: 10px 0 14px; max-width: 18ch; overflow-wrap: break-word; hyphens: auto; }
.ux-lead { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.7; color: var(--brand-muted); max-width: 62ch; margin: 0; }
.ux-roles { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; margin-top: 28px; }
.ux-role { border: 1px solid var(--brand-line); border-radius: var(--brand-radius); padding: 22px; background: var(--ux-card); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ux-role h2 { margin: 0; font: 700 19px/1.35 var(--sans); }
.ux-role p { margin: 0 0 6px; color: var(--brand-muted); line-height: 1.65; font-size: 15px; }
.ux-role-owner { background: var(--brand-ink); color: #fff; border-color: var(--brand-ink); }
.ux-role-owner p { color: #e3dccf; }
.ux-role-guest { background: var(--brand-wash); }
.ux-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 12px; font: 700 15px/1.2 var(--sans); text-decoration: none; text-align: center; }
.ux-btn-primary { background: #d7b46a; color: #2a2318; }
.ux-btn-primary:hover { background: #e2c27e; }
.ux-btn-dark { background: var(--brand-ink); color: #fff; }
.ux-btn-ghost { border: 1px solid var(--brand-line); color: var(--brand-ink); background: var(--brand-paper); }
.ux-btn:focus-visible, .ux-link:focus-visible { outline: 3px solid var(--brand-focus); outline-offset: 3px; }
.ux-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--brand-gold); font-weight: 700; text-decoration: none; }
.ux-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.ux-stores { padding-top: 48px; scroll-margin-top: 16px; }
.ux-stores-head h2, .ux-steps h2, .ux-faq h2 { font: 800 clamp(24px, 3vw, 34px)/1.25 var(--sans); margin: 0 0 8px; }
.ux-stores-head p { margin: 0; color: var(--brand-muted); line-height: 1.6; }
.ux-store-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.ux-store { position: relative; border: 1px solid var(--brand-line); border-radius: 18px; padding: 22px; background: var(--ux-card); display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto 1fr; column-gap: 18px; row-gap: 8px; min-height: 220px; box-shadow: var(--brand-shadow); }
.ux-store header { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ux-store-name { font: 800 22px/1.2 var(--sans); }
.ux-state { font: 700 12.5px/1 var(--sans); padding: 6px 10px; border-radius: 99px; white-space: nowrap; }
.ux-store.is-live .ux-state { background: var(--ux-ok-bg); color: var(--ux-ok); }
.ux-store.is-soon .ux-state { background: var(--ux-soon-bg); color: var(--ux-soon); }
.ux-store > p { grid-column: 1; margin: 0; color: var(--brand-muted); line-height: 1.6; font-size: 15px; }
.ux-store > .ux-badge, .ux-store > .ux-btn { grid-column: 1; align-self: start; justify-self: start; }
.ux-store > .ux-badge img { height: 50px; }
.ux-store > .ux-badge-play img { height: 76px; margin: -13px; }
.ux-store.is-soon { background: repeating-linear-gradient(135deg, #fffdf9 0 14px, #fbf7ef 14px 28px); border-style: dashed; box-shadow: none; }
.ux-qr { grid-column: 2; grid-row: 2 / 4; margin: 0; text-align: center; width: 150px; }
.ux-qr img { display: block; width: 132px; height: 132px; margin: 0 auto; padding: 8px; background: #fff; border: 1px solid var(--brand-line); border-radius: 12px; }
.ux-qr figcaption { font-size: 12.5px; line-height: 1.45; color: var(--brand-muted); margin-top: 8px; }
.ux-qr-mock span { display: block; width: 132px; height: 132px; margin: 0 auto; border-radius: 12px; border: 1px dashed #c9b998; background: repeating-linear-gradient(45deg, #f4efe5 0 6px, #fff 6px 12px); }
.ux-fine { margin: 14px 0 0; font-size: 13px; line-height: 1.6; color: var(--brand-muted); max-width: 80ch; }

.ux-steps { padding-top: 56px; }
.ux-steps ol { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ux-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 18px; border-radius: var(--brand-radius); background: var(--brand-wash); }
.ux-steps li b { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-ink); color: #fff; font: 700 15px/1 var(--sans); }
.ux-steps li span { font: 700 16px/1.4 var(--sans); padding-top: 5px; }
.ux-steps li small { display: block; font: 400 14px/1.55 var(--sans); color: var(--brand-muted); margin-top: 4px; }
.ux-steps-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 18px 0 0; }
.ux-steps-cta > span { color: var(--brand-muted); }

.ux-faq { padding-top: 56px; padding-bottom: 24px; max-width: 860px; }
.ux-faq details { border-bottom: 1px solid var(--brand-line); }
.ux-faq summary { cursor: pointer; min-height: 56px; display: flex; align-items: center; font: 700 16px/1.45 var(--sans); list-style: none; padding: 8px 32px 8px 0; position: relative; }
.ux-faq summary::-webkit-details-marker { display: none; }
.ux-faq summary::after { content: "+"; position: absolute; right: 4px; font-size: 22px; color: var(--brand-gold); }
.ux-faq details[open] summary::after { content: "–"; }
.ux-faq summary:focus-visible { outline: 3px solid var(--brand-focus); outline-offset: 2px; border-radius: 6px; }
.ux-faq details p { margin: 0 0 16px; color: var(--brand-muted); line-height: 1.7; }
.ux-download .ev-showcase { margin-top: 56px; }
.ux-download .ev-download-actions a:not(.ev-showcase-cta) { min-height: 44px; display: inline-flex; align-items: center; }

@media (max-width: 760px) {
  .ux-roles, .ux-store-grid, .ux-steps ol { grid-template-columns: 1fr; }
  .ux-store { grid-template-columns: 1fr; min-height: 0; }
  .ux-qr, .ux-qr-mock { display: none; } /* phones tap the badge; QR is for desktop */
  .ux-role .ux-btn { width: 100%; }
}

/* ---------- 6. Long words (fi/fr/vi) and line breaking ---------- */
:lang(fi) .ux-download h1, :lang(fi) .ux-role h2, :lang(fr) .ux-role h2 { hyphens: auto; }
:lang(ja) .ux-download, :lang(ja) .ux-footer { line-break: strict; }
:lang(ko) .ux-download, :lang(ko) .ux-footer { word-break: keep-all; }

@media (prefers-reduced-motion: reduce) { .ux-appbar .ux-dot { box-shadow: none; } }

/* ---------- 7. Narrow header (≤380px): language select was truncated to “繁體▾”; login already lives in the mobile menu ---------- */
@media (max-width: 380px) {
  .header .login-btn { display: none; }
  .header .site-languages, .header .language-menu { flex: none; }
  .header .header-actions .language-menu { min-width: 118px; }
  .header .header-actions .language-menu select { min-width: 118px; width: 118px; font-size: 13px; padding: 9px 24px 9px 10px; }
}

/* ---------- 8. Download hero: owner card goes straight to the official App Store (UIUX01 v1.1) ---------- */
.ux-role-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 4px; }
.ux-btn-ios { gap: 10px; }
.ux-btn-ios svg { flex: none; }
.ux-link-light { color: #f0d79e; }
@media (max-width: 760px) { .ux-role-cta { flex-direction: column; align-items: stretch; } .ux-role-cta .ux-link { justify-content: center; } }
