:root {
  color-scheme: dark;
  font: 14px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --bg: #100711;
  --panel: #190b1b;
  --panel-2: #211424;
  --line: #4a2942;
  --pink: #fa3b96;
  --muted: #bbaebe;
  --text: #fff;
  --danger: #ff9baf;
}
* { box-sizing: border-box; }
html, body { min-width: 280px; min-height: 100%; margin: 0; background: var(--bg); color: var(--text); }
html { overflow-x: clip; }
body { overflow-x: clip; background-image: radial-gradient(circle at 76% 0, #6a16422e, transparent 34%); -webkit-font-smoothing: antialiased; }
button, textarea, input { font: inherit; }
button { cursor: pointer; color: inherit; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:focus-visible, textarea:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
[hidden] { display: none !important; }

.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(18px, 5vw, 72px); border-bottom: 1px solid var(--line); background: #100711e8; backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 10; }
.brand { display: block; width: 170px; line-height: 0; }
.brand img { display: block; width: 100%; height: auto; }
.top-actions { display: flex; gap: 8px; }
.quiet, .account, .back-link, .change-preference { border: 0; background: transparent; color: var(--muted); padding: 9px 12px; }
.account { border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding-inline: 16px; }
.change-preference { color: var(--pink); padding-left: 0; font-weight: 700; }
.view { max-width: 1260px; margin: auto; }
.eyebrow { margin: 0 0 8px; color: var(--pink); font-size: 10px; font-weight: 800; letter-spacing: .2em; }

.preference-view { padding: clamp(54px, 10vh, 110px) 24px; }
.preference-view > h1, .intro h1, .mode-heading h1 { margin: 10px 0 18px; font-size: clamp(42px, 6vw, 76px); font-weight: 650; line-height: 1; letter-spacing: -.055em; }
.preference-view > p:not(.eyebrow), .intro > p:last-of-type, .mode-heading > div > p:last-child { color: var(--muted); font-size: 16px; }
.preference-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.preference-grid button { min-height: 220px; padding: 28px; text-align: left; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, #211123, #120913); transition: .2s; }
.preference-grid button:hover, .preference-grid button:focus-visible { transform: translateY(-5px); border-color: var(--pink); outline: none; }
.preference-grid span, .preference-grid b, .preference-grid small { display: block; }
.preference-grid span { color: var(--pink); font-size: 11px; letter-spacing: .14em; }
.preference-grid b { margin: 42px 0 6px; font-size: clamp(26px, 3vw, 40px); letter-spacing: -.04em; }
.preference-grid small { color: var(--muted); }

.selection { padding: 58px 24px 40px; }
.intro { max-width: 760px; }
.intro h1 em { color: var(--pink); font-style: normal; font-weight: inherit; }
.cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 40px; }
.character-card { min-width: 0; padding: 0; overflow: hidden; text-align: left; border: 1px solid var(--line); border-radius: 14px; background: #160c17; transition: .2s; }
.character-card:hover, .character-card:focus-visible { transform: translateY(-5px); border-color: var(--pink); outline: none; }
.portrait { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #241326; }
.portrait img, .profile-pane > img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.portrait::after { content: ""; position: absolute; inset: auto 0 0; height: 38%; background: linear-gradient(transparent, #160c17); }
.character-card .copy { padding: 16px; }
.character-card small { color: var(--pink); font-size: 10px; letter-spacing: .07em; }
.character-card h2 { margin: 4px 0 8px; font-size: 25px; line-height: 1.1; letter-spacing: -.035em; }
.character-card p { margin: 0; color: var(--muted); font-size: 12px; }
.custom-avatar-card { border-style: dashed; border-color: #8e4970; background: linear-gradient(155deg, #271126, #130914); }
.custom-avatar-visual { display: grid; place-items: center; background: radial-gradient(circle at 50% 44%, #fa3b9638, transparent 35%), linear-gradient(145deg, #291127, #120913); }
.custom-avatar-visual::after { height: 45%; background: linear-gradient(transparent, #160c17); }
.custom-avatar-orbit { position: absolute; width: 62%; aspect-ratio: 1; border: 1px solid #fa3b967d; border-radius: 50%; box-shadow: 0 0 50px #fa3b9638, inset 0 0 35px #7d2cff20; }
.custom-avatar-orbit::before, .custom-avatar-orbit::after { content: ""; position: absolute; inset: 12%; border: 1px solid #ffffff1c; border-radius: 50%; }
.custom-avatar-orbit::after { inset: 27%; background: #fa3b9617; }
.custom-avatar-plus { position: relative; z-index: 1; color: #fff; font-size: clamp(48px, 5vw, 72px); font-weight: 200; line-height: 1; text-shadow: 0 0 22px #fa3b96; }
.custom-avatar-visual > small { position: absolute; z-index: 2; bottom: 18px; color: #f2bed8; font-weight: 800; letter-spacing: .18em; }
.custom-avatar-card:hover .custom-avatar-orbit { border-color: var(--pink); transform: scale(1.04); }
.privacy { margin-top: 24px; color: var(--muted); font-size: 11px; }
.preference-tabs { display: flex; gap: 8px; margin-top: 24px; }
.preference-tabs button { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: 12px; }
.preference-tabs button:hover, .preference-tabs button.active { border-color: var(--pink); background: #fa3b9618; color: #fff; }

.mode-view { padding: 34px 24px 60px; }
.back-link { padding-left: 0; margin-bottom: 22px; }
.mode-heading { display: grid; grid-template-columns: 116px 1fr; align-items: center; gap: 24px; max-width: 900px; }
.mode-heading img { width: 116px; height: 150px; object-fit: cover; border: 1px solid var(--line); border-radius: 60px 60px 14px 14px; }
.mode-heading h1 { margin: 3px 0 8px; font-size: 48px; }
.mode-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 32px; }
.mode-card { min-height: 240px; padding: 28px; text-align: left; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); transition: .2s; }
.mode-card.realistic { grid-column: 1 / -1; background: linear-gradient(115deg, #1e0e20, #36132b); }
.mode-card:hover, .mode-card:focus-visible { transform: translateY(-3px); border-color: var(--pink); outline: none; }
.mode-card span { color: var(--pink); font-size: 10px; letter-spacing: .15em; }
.mode-card h2 { margin: 14px 0 8px; font-size: 38px; letter-spacing: -.04em; }
.mode-card p { max-width: 520px; color: var(--muted); }
.mode-card b { display: block; margin-top: 25px; font-size: 12px; }

.chat-view { width: calc(100% - 32px); max-width: 1260px; height: calc(100dvh - 96px); min-height: 560px; display: grid; grid-template-columns: 330px minmax(0, 1fr); margin-top: 24px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel); }
.profile-pane { position: relative; overflow: hidden; border-right: 1px solid var(--line); }
.profile-overlay { position: absolute; inset: auto 0 0; padding: 80px 24px 24px; background: linear-gradient(transparent, #100711f2); }
.profile-overlay p { margin: 4px 0; color: #d9cbd7; font-size: 12px; }
.profile-overlay h2 { margin: 0; font-size: 42px; letter-spacing: -.04em; }
.conversation { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.chat-bar { min-height: 74px; display: flex; align-items: center; gap: 14px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.icon-button { border: 0; background: transparent; padding: 9px; font-weight: 800; }
.chat-identity { flex: 1; min-width: 0; }
.chat-identity strong, .chat-identity span { display: block; }
.chat-identity span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.relationship { display: flex; align-items: center; gap: 9px; padding-left: 15px; border-left: 1px solid var(--line); }
.relationship > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--pink); color: #271324; font-weight: 800; }
.relationship small, .relationship b { display: block; }
.relationship small { color: var(--muted); font-size: 8px; letter-spacing: .12em; }
.relationship b { font-size: 11px; }
.feed { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 16px; padding: 26px clamp(18px, 5vw, 54px); scroll-padding-bottom: 24px; }
.bubble { max-width: min(78%, 620px); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.bubble.mine { position: relative; align-self: flex-end; padding: 11px 37px 11px 15px; border-radius: 16px 16px 3px 16px; background: #3a2035; }
.bubble.theirs { align-self: flex-start; padding: 11px 15px; border: 1px solid #3d263b; border-radius: 16px 16px 16px 3px; background: #241326; font-size: 15px; }
.bubble.typing { color: var(--muted); }
.message-ticks { position: absolute; right: 10px; bottom: 7px; color: #a78e9e; font-size: 10px; letter-spacing: -3px; }
.message-ticks.seen { color: var(--pink); }
.time-marker { align-self: center; margin: 6px 0 2px; color: #8f7d8c; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.photo-offer { align-self: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #2a1729; }
.photo-offer button { margin-left: 10px; padding: 8px 12px; border: 0; border-radius: 7px; background: var(--pink); color: #24101f; }
.chat-photo { position: relative; display: block; flex: 0 0 auto; align-self: flex-start; width: min(68%, 360px); aspect-ratio: 3 / 4; padding: 0; overflow: hidden; border: 1px solid #5e3153; border-radius: 16px 16px 16px 3px; background: #241326; box-shadow: 0 12px 34px #0006; cursor: zoom-in; }
.chat-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.chat-photo.load-error img { visibility: hidden; }
.chat-photo.load-error::after { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; color: var(--muted); content: "Photo unavailable. Tap to retry."; text-align: center; }
.chat-photo:hover { border-color: var(--pink); }
.signup-nudge { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 18px 10px; padding: 10px 14px; border: 1px solid #824260; border-radius: 10px; background: #2d1526; font-size: 12px; }
.signup-nudge button { border: 0; background: none; color: var(--pink); font-weight: 800; }
.composer { padding: 14px 18px 16px; border-top: 1px solid var(--line); }
.input-wrap { display: flex; padding: 7px; border: 1px solid #60405a; border-radius: 14px; background: var(--panel-2); }
.input-wrap:focus-within { border-color: var(--pink); box-shadow: 0 0 0 3px #fa3b9618; }
.input-wrap textarea { width: 100%; min-height: 41px; max-height: 120px; padding: 9px; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); }
.input-wrap button { width: 40px; height: 40px; align-self: flex-end; border: 0; border-radius: 10px; background: var(--pink); color: #24101f; font-weight: 900; }
.input-wrap button:disabled { opacity: .35; }
.composer > p { margin: 7px 3px 0; color: var(--muted); font-size: 10px; }
.error { margin-bottom: 8px; color: #ffc0d3; font-size: 12px; }
.error:empty { display: none; }

.sponsor-mobile { display: block; position: relative; flex: none; padding: 13px 7px 6px; border-top: 1px solid var(--line); background: #100711; }
.sponsor-mobile__label { position: absolute; z-index: 1; top: 1px; left: 11px; color: #8f7d8c; font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.sponsor-mobile__image { display: block; width: 100%; max-width: 640px; overflow: hidden; margin: 0 auto; padding: 0; border: 1px solid #4e283e; border-radius: 10px; background: #09090a; line-height: 0; }
.sponsor-mobile__image:hover, .sponsor-mobile__image:focus-visible { border-color: #d9937d; outline: none; }
.sponsor-mobile__image img { display: block; width: 100%; height: auto; aspect-ratio: 6.4 / 1; object-fit: cover; }
.sponsor-popup { width: min(600px, calc(100% - 24px)); max-width: none; padding: 0; overflow: visible; border: 0; background: transparent; color: #fff; }
.sponsor-popup::backdrop { background: #080308d9; backdrop-filter: blur(6px); }
.sponsor-popup__frame { position: relative; padding-top: 18px; }
.sponsor-popup__label { position: absolute; z-index: 2; top: 0; left: 4px; color: #d8c7d2; font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.sponsor-popup__close { position: absolute; z-index: 3; top: 25px; right: 9px; width: 38px; height: 38px; display: grid; place-items: center; padding: 0 0 3px; border: 1px solid #ffffff42; border-radius: 50%; background: #100711d9; color: #fff; font-size: 25px; line-height: 1; box-shadow: 0 5px 18px #0008; }
.sponsor-popup__creative { display: block; width: 100%; overflow: hidden; padding: 0; border: 1px solid #5e263b; border-radius: 14px; background: #09090a; line-height: 0; box-shadow: 0 32px 100px #000a; }
.sponsor-popup__creative:hover, .sponsor-popup__creative:focus-visible { border-color: #c20c21; outline: none; }
.sponsor-popup__creative img { display: block; width: 100%; height: auto; aspect-ratio: 6 / 5; }

.modal { width: 100%; max-width: 520px; padding: 20px; border: 0; background: transparent; }
.modal::backdrop, .photo-dialog::backdrop { background: #080308df; backdrop-filter: blur(7px); }
.modal-card { position: relative; padding: 34px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--text); box-shadow: 0 30px 90px #0009; }
.modal-card h2 { margin: 8px 0 12px; font-size: 38px; letter-spacing: -.04em; }
.modal-card > p:not(.eyebrow):not(.form-note) { color: var(--muted); }
.modal-card label:not(.toggle) { display: block; margin-top: 20px; color: var(--muted); font-size: 11px; }
.quiet-hours input { display: block; width: 100%; margin-top: 7px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); }
.primary, .secondary { width: 100%; margin-top: 13px; padding: 13px; border-radius: 10px; }
.primary { border: 0; background: var(--pink); color: #24101f; font-weight: 800; }
.secondary { border: 1px solid var(--line); background: transparent; }
.danger { color: var(--danger); }
.close { position: absolute; top: 13px; right: 13px; border: 0; background: none; color: var(--muted); font-size: 24px; }
.seal { width: 50px; height: 50px; display: grid; place-items: center; margin-bottom: 20px; border: 1px solid var(--pink); border-radius: 50%; color: var(--pink); }
.limit-modal .modal-card { background: radial-gradient(circle at 88% 4%, #7a1b5038, transparent 38%), var(--panel); }
.limit-modal .seal { border: 0; background: var(--pink); color: #25101f; }
.limit-modal h2 { max-width: 410px; }
.form-note { min-height: 17px; color: var(--muted); font-size: 11px; }
.auth-field input { display: block; width: 100%; margin-top: 7px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); }
.auth-field input:focus { border-color: var(--pink); outline: 0; box-shadow: 0 0 0 3px #fa3b9618; }
.auth-modal .error { min-height: 18px; margin: 12px 0 0; }
.auth-modal .form-note { margin: 14px 0 0; text-align: center; }
.toggle { display: flex; align-items: center; gap: 12px; margin: 22px 0 8px; }
.toggle input { width: 18px; height: 18px; accent-color: var(--pink); }
.quiet-hours { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.account-modal { max-width: 680px; }
.account-card { max-height: min(780px, calc(100dvh - 40px)); overflow-y: auto; background: radial-gradient(circle at 88% 3%, #7a1b5030, transparent 35%), var(--panel); }
.account-identity { display: flex; align-items: center; gap: 13px; padding: 15px; margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; background: #12091499; }
.account-avatar { width: 42px; height: 42px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--pink); color: #2b1021; }
.account-identity strong, .account-identity span { display: block; overflow-wrap: anywhere; }
.account-identity span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.account-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.account-stats > div { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #211124; }
.account-stats strong, .account-stats span { display: block; }
.account-stats strong { color: var(--pink); font-size: 24px; }
.account-stats span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.account-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-top: 28px; }
.account-section-heading h3 { margin: 0; font-size: 22px; }
.account-section-heading > span { color: var(--muted); font-size: 10px; text-align: right; }
.account-connections { display: grid; gap: 9px; margin-top: 12px; }
.account-connection { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #160b18; }
.account-connection:hover { border-color: var(--pink); }
.account-connection-open { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-width: 0; padding: 10px; text-align: left; border: 0; background: transparent; }
.account-connection-open img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; }
.account-connection-open strong, .account-connection-open small { display: block; }
.account-connection-open small { color: var(--muted); }
.account-connection-delete { align-self: stretch; min-width: 76px; padding: 10px 14px; border: 0; border-left: 1px solid var(--line); background: #2b111f; color: #ff9cba; font-size: 11px; font-weight: 800; }
.account-connection-delete:hover { background: #46152d; color: #ffd4e1; }
.account-memory-list { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 5px; margin: -3px 0 3px; }
.account-memory-list span { padding: 4px 7px; border-radius: 999px; background: #fa3b9615; color: #e8cbdc; font-size: 10px; }
.account-level { min-width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #fa3b9622; color: var(--pink); font-weight: 800; }
.account-empty { padding: 20px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; }
.account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.account-actions .secondary { margin-top: 0; }
.photo-dialog { width: calc(100% - 30px); max-width: 520px; padding: 0; border: 1px solid var(--line); background: #140814; color: var(--muted); }
.photo-dialog img { display: block; width: 100%; max-height: 75vh; object-fit: contain; }
.photo-dialog p { padding: 0 18px 12px; font-size: 11px; }
.photo-close { z-index: 2; width: 38px; height: 38px; border-radius: 50%; background: #100711cc; }
.install-tip { position: fixed; z-index: 20; right: 22px; bottom: 22px; width: min(360px, calc(100% - 44px)); padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #231124; box-shadow: 0 20px 60px #0009; }
.install-tip b, .install-tip span { display: block; }
.install-tip span { margin-top: 5px; color: var(--muted); font-size: 12px; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 10px 16px; border-radius: 999px; background: #fff; color: #24101f; box-shadow: 0 8px 30px #0008; font-size: 12px; }

@media (max-width: 1050px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .topbar { height: 58px; padding: 0 max(12px, env(safe-area-inset-left)) 0 max(12px, env(safe-area-inset-right)); }
  .brand { width: 136px; }
  .quiet { display: none; }
  .account { min-height: 40px; padding: 8px 14px; }
  .preference-view, .selection { padding: 30px 12px max(28px, env(safe-area-inset-bottom)); }
  .intro { max-width: 560px; }
  .preference-view > h1, .intro h1 { margin-block: 7px 12px; font-size: clamp(35px, 10.5vw, 46px); }
  .intro > p:last-of-type { margin: 0; font-size: 14px; line-height: 1.45; }
  .preference-grid { grid-template-columns: 1fr; gap: 10px; margin-top: 30px; }
  .preference-grid button { min-height: 128px; }
  .preference-grid b { margin: 22px 0 4px; }
  .preference-tabs { position: sticky; z-index: 5; top: 64px; gap: 6px; width: max-content; max-width: 100%; margin-top: 20px; padding: 5px; border: 1px solid #48263f; border-radius: 999px; background: #160b17e8; backdrop-filter: blur(14px); }
  .preference-tabs button { min-height: 38px; padding: 7px 14px; border-color: transparent; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 20px; }
  .character-card { border-radius: 12px; }
  .character-card:hover { transform: none; }
  .character-card:active { transform: scale(.985); border-color: var(--pink); }
  .character-card .copy { padding: 12px; }
  .character-card h2 { margin: 2px 0 6px; font-size: clamp(19px, 5.5vw, 24px); }
  .character-card p { display: -webkit-box; overflow: hidden; color: #c9b9c7; font-size: 11px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .privacy { margin: 18px 3px 0; font-size: 10px; line-height: 1.45; }
  .mode-view { padding: 15px 12px max(28px, env(safe-area-inset-bottom)); }
  .back-link { min-height: 44px; margin-bottom: 10px; }
  .mode-heading { grid-template-columns: 82px 1fr; gap: 15px; }
  .mode-heading img { width: 82px; height: 105px; }
  .mode-heading h1 { margin: 2px 0 6px; font-size: clamp(31px, 9vw, 40px); }
  .mode-heading > div > p:last-child { margin: 0; font-size: 13px; line-height: 1.4; }
  .mode-grid { grid-template-columns: 1fr; gap: 10px; margin-top: 22px; }
  .mode-card.realistic { grid-column: auto; }
  .mode-card { min-height: 0; padding: 18px; border-radius: 12px; }
  .mode-card:hover { transform: none; }
  .mode-card:active { transform: scale(.99); border-color: var(--pink); }
  .mode-card h2 { margin: 7px 0 4px; font-size: 29px; }
  .mode-card p { margin: 0; font-size: 12px; line-height: 1.45; }
  .mode-card b { margin-top: 12px; }
  .chat-view { width: 100%; height: calc(var(--app-height, 100dvh) - 58px); min-height: 300px; grid-template-columns: 1fr; margin: 0; border: 0; border-radius: 0; }
  .profile-pane { display: none; }
  .chat-bar { min-height: 60px; gap: 7px; padding: 6px max(5px, env(safe-area-inset-right)) 6px max(5px, env(safe-area-inset-left)); }
  .icon-button { min-width: 42px; min-height: 42px; padding: 8px; }
  .relationship { padding-left: 8px; }
  .relationship small { display: none; }
  .relationship > span { width: 34px; height: 34px; }
  .feed { gap: 10px; padding: 16px 11px; }
  .bubble { max-width: 88%; line-height: 1.5; }
  .bubble.mine, .bubble.theirs { padding-top: 9px; padding-bottom: 9px; }
  .bubble.theirs { font-size: 14px; }
  .chat-photo { width: min(82%, 320px); }
  .composer { flex: none; padding: 8px max(9px, env(safe-area-inset-right)); background: #190b1bf5; }
  .input-wrap { padding: 5px; border-radius: 18px; }
  .input-wrap textarea { min-height: 42px; max-height: 104px; padding: 9px 8px; font-size: 16px; line-height: 1.35; }
  .input-wrap button { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 13px; }
  .composer > p { overflow: hidden; margin-top: 5px; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
  .sponsor-mobile { padding: 13px max(7px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(7px, env(safe-area-inset-left)); }
  .sponsor-popup { width: min(600px, calc(100% - 18px)); }
  .sponsor-popup__creative { border-radius: 11px; }
  .modal { max-height: 100dvh; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); overflow-y: auto; }
  .modal-card { padding: 28px 20px; }
  .modal-card h2 { font-size: 34px; }
  .account-card { max-height: calc(100dvh - 24px); }
  .account-section-heading > span { display: none; }
  .account-connection-open { grid-template-columns: 46px minmax(0, 1fr) auto; }
  .account-connection-open img { width: 46px; height: 46px; }
  .account-connection-delete { min-width: 64px; padding-inline: 9px; }
  .account-actions { grid-template-columns: 1fr; }
  .limit-modal { margin: auto; }
  .signup-nudge { margin-inline: 10px; }
  .chat-identity span { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .install-tip { right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); width: calc(100% - 20px); padding: 17px; }
  .toast { bottom: max(14px, env(safe-area-inset-bottom)); max-width: calc(100% - 28px); text-align: center; }
}
@media (max-width: 390px) {
  .selection { padding-inline: 9px; }
  .cards { gap: 7px; }
  .character-card .copy { padding: 10px; }
  .character-card .copy p { -webkit-line-clamp: 1; }
  .relationship > div { display: none; }
  .mode-heading > div > p:last-child { display: none; }
  .chat-identity span { max-width: 72px; }
  .signup-nudge { justify-content: space-between; gap: 6px; padding: 8px 10px; }
}
@media (max-width: 760px) and (orientation: landscape) {
  .selection { padding-top: 22px; }
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mode-heading img { width: 66px; height: 82px; }
  .mode-heading { grid-template-columns: 66px 1fr; }
  .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-card { padding: 14px; }
  .mode-card p { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
