/* V4 keeps the reference's three stylesheets. Additions cover flow controls and older WebKit. */
html, body { overflow-x: hidden; }
.skip { left: 0; top: 0; width: 1px; height: 1px; min-height: 0 !important; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { left: 12px; top: 8px; width: auto; height: auto; min-height: 44px !important; padding: 8px 12px; clip-path: none; white-space: normal; }
.modal-back, .match { top: 0; right: 0; bottom: 0; left: 0; }
.brand b, .auth-brand b { text-transform: lowercase; letter-spacing: .04em; }
img.country-flag, html.phone img.country-flag { position: static; top: auto; right: auto; bottom: auto; left: auto; display: inline-block; width: 20px; height: 14px; max-width: none; margin: 0 5px 0 0; border: 0; border-radius: 2px; box-shadow: none; object-fit: contain; object-position: center; opacity: 1; vertical-align: -2px; transform: none; }
html[dir='rtl'] img.country-flag { margin: 0 0 0 5px; }
.deck-wrap { position: relative; }
.click-dock { animation: none; }
html.phone body.no-dock-screen .click-dock { display: none; }
html.phone .swipe-actions { margin-top: 8px; }
html.phone .circle.like { width: 74px; height: 74px; }
html.phone .brand, html.phone .skip { min-height: 44px; }
html.phone .filters button, html.phone .step { min-height: 44px; }
.intro-card { position: relative; padding-top: 62px; }
.intro-card h2 { margin-right: 0; font-size: 1.2rem; line-height: 1.3; }
.splash-skip { position: absolute; top: 12px; right: 12px; min-height: 44px; padding: 10px 16px; font-size: 12px; }
#introBar { animation: none; }
.v4-close { position: absolute; z-index: 5; top: 10px; right: 10px; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(36,28,24,.1); border-radius: 50%; background: #fffdfb; color: #6d3542; font: 28px/1 Arial,sans-serif; cursor: pointer; }
.nudge-card { position: relative; max-height: calc(100vh - 32px); overflow-y: auto; }
.register-preparing { min-height: 104px; display: grid; align-items: center; padding: 18px 0; }
.v4-progress { height: 4px; border-radius: 2px; overflow: hidden; background: #efe6dc; }
.v4-progress > span { display: block; width: 100%; height: 100%; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg,#6d3542,#c4a574); }
#nudgeActs { min-height: 104px; }
.v4-chat-invite { position: fixed; z-index: 54; right: 20px; bottom: 20px; width: 350px; max-width: calc(100% - 24px); padding: 18px 48px 16px 18px; border-radius: 22px; background: #fffdfb; }
.v4-chat-invite .v4-close { top: 3px; right: 3px; background: transparent; border: 0; }
.v4-invite-label { color: #8a6239; font-size: 10px; letter-spacing: .1em; }
.v4-chat-invite h3 { font-size: 18px; line-height: 1.35; margin: 7px 0 14px; }
.v4-invite-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.v4-invite-actions .btn { min-height: 44px; padding: 10px 14px; font-size: 12px; }
body.has-chat-invite .click-dock { visibility: hidden; }
.v4-demo-notice { padding: 9px 12px; border: 1px solid rgba(196,165,116,.35); border-radius: 14px; font-size: 12px; line-height: 1.6; background: #fffdfb; color: #6f645c; }
html.phone #app, html.phone #splash, html.phone .tabbar { width: 100%; max-width: 430px; }
html.phone { scrollbar-width: none; }
html.phone::-webkit-scrollbar { width: 0; height: 0; }
html.phone #splash { min-height: 100vh; min-height: 100dvh; }
html.phone .deck { height: 390px; height: min(46vh,390px); height: min(46dvh,390px); }
html.phone .intro-card { height: 92vh; height: min(92dvh,780px); }
html.phone .v4-chat-invite { left: 50%; right: auto; bottom: calc(78px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: calc(100% - 24px); max-width: 406px; }
html.phone .btn, html.phone .chip, html.phone .country-bar button, html.phone .tabbar button { min-height: 44px; }
html.phone #langBtn { min-height: 44px; }
html.phone .rail-nav { min-width: 44px; min-height: 44px; }
html.phone .mate-rail button { min-height: 88px; }
html.phone .v4-close { min-height: 44px; }
html[dir='rtl'] .v4-close, html[dir='rtl'] .splash-skip { right: auto; left: 10px; }
html[dir='rtl'] .v4-chat-invite { padding: 18px 18px 16px 48px; }
html[dir='rtl'] .v4-progress > span { transform-origin: right; }
@media (max-height: 720px) {
  html.phone .deck-wrap { margin-top: 0; }
  html.phone #swipe .rail-box { margin-bottom: 0; }
  html.phone .mate-rail { padding: 4px 0; }
  html.phone .mate-rail button { min-height: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

html.phone footer.foot { display: block; padding: 16px 0 112px; }
html.phone footer.foot > div:not(:first-child), html.phone footer.foot > div:first-child > :not(#rights) { display: none; }
html.phone #rights { font-size: 12px; line-height: 1.6; }

/* Final iPhone handoff: ivory, wine and champagne match the approved page. */
#safariGate { padding: 16px; overflow-y: auto; }
#safariGate .safari-sheet { width: 100%; max-width: 360px; max-height: calc(100vh - 32px); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 22px; border-radius: 28px; text-align: left; }
.safari-brand { display: flex; align-items: center; margin-bottom: 18px; }
.safari-brand .theme-gate-logo { flex: 0 0 34px; margin: 0; }
.safari-brand .theme-gate-name { margin: 0 0 0 8px; font-size: 23px; letter-spacing: .02em; }
#safariLanguage { margin-left: auto; width: 112px; min-height: 44px; padding: 8px; border: 1px solid rgba(109,53,66,.12); border-radius: 12px; color: #6d3542; background: #fffdfb; font: inherit; font-size: 12px; }
.safari-portrait { height: 104px; margin-bottom: 18px; overflow: hidden; border-radius: 18px; background: #e9dfd4; }
.safari-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 31%; }
#safariTitle { font-family: var(--display); font-size: 25px; font-weight: 700; line-height: 1.4; }
#safariNote { margin-top: 10px; font-size: 14px; font-weight: 500; line-height: 1.7; }
#safariGate .safari-acts { margin-top: 20px; gap: 10px; }
#safariGate .safari-acts .btn { min-height: 52px; padding: 12px 14px; border-radius: 16px; line-height: 1.5; white-space: normal; }
#safariGate .safari-acts .btn-ghost { border: 1px solid rgba(109,53,66,.18); background: #fffdfb; color: #6d3542; }
.safari-feedback { margin: 14px 0 0; color: #6d3542; font-size: 13px; line-height: 1.7; }
#safariLink { margin-top: 10px; width: 100%; font-size: 14px; -webkit-user-select: text; user-select: text; }
.safari-why { margin-top: 12px; color: #7d7269; font-size: 11px; line-height: 1.6; }
.safari-why summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.safari-why p { margin: 0; }
html[dir='rtl'] #safariGate .safari-sheet { text-align: right; }
html[dir='rtl'] #safariLanguage { margin-left: 0; margin-right: auto; }
html[dir='rtl'] .safari-brand .theme-gate-name { margin-left: 0; margin-right: 8px; }
@media (max-height: 650px) {
  #safariGate .safari-sheet { padding: 18px; }
  .safari-brand { margin-bottom: 12px; }
  .safari-portrait { height: 72px; margin-bottom: 12px; }
  #safariTitle { font-size: 22px; }
  #safariGate .safari-acts { margin-top: 14px; }
}
