:root {
  --bg: #100d14;
  --surface: rgba(29, 24, 34, 0.88);
  --surface-strong: #211b27;
  --surface-soft: #2a222f;
  --text: #fff8fb;
  --muted: #a89da9;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #ff6f91;
  --accent-soft: #ff9db4;
  --accent-deep: #e54e77;
  --gold: #ffd77a;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; touch-action: manipulation; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); overscroll-behavior: none; }
body { overflow-x: hidden; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
img, video { -webkit-user-drag: none; user-select: none; }
button, input, textarea { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }

.ambient { position: fixed; pointer-events: none; filter: blur(80px); opacity: .2; border-radius: 50%; z-index: 0; }
.ambient-one { width: 260px; height: 260px; background: #c33c78; right: -120px; top: -80px; }
.ambient-two { width: 220px; height: 220px; background: #6e3a9d; left: -140px; top: 45vh; }

.app-shell { position: relative; z-index: 1; max-width: 720px; min-height: 100vh; margin: 0 auto; padding: 18px 18px calc(100px + var(--safe-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 24px; }
.topbar h1 { margin: -2px 0 0; font: 700 31px/1 Georgia, serif; letter-spacing: -.5px; }
.eyebrow { margin: 0 0 7px; color: var(--accent-soft); font-size: 10px; font-weight: 800; letter-spacing: .17em; }
.balance-chip { display: inline-flex; align-items: center; gap: 7px; min-width: 72px; justify-content: center; padding: 10px 13px; border: 1px solid rgba(255, 215, 122, .22); border-radius: 999px; background: rgba(255, 215, 122, .1); color: var(--gold); }
.balance-chip strong { color: var(--text); font-size: 14px; }
.token-gem { font-size: 17px; }

.view { display: none; animation: view-in .25s ease; }
.view.active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.create-hero { position: relative; width: 100%; min-height: 132px; overflow: hidden; border: 1px solid rgba(255, 146, 174, .28); border-radius: 25px; padding: 24px; text-align: left; background: linear-gradient(120deg, #4f2338, #2a1b32 68%, #462139); box-shadow: 0 20px 48px rgba(0, 0, 0, .27); }
.create-hero::after { content: ""; position: absolute; width: 150px; height: 150px; right: -25px; top: -45px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.28), rgba(255,111,145,.2) 35%, transparent 70%); }
.create-hero:disabled { cursor: not-allowed; opacity: .62; filter: saturate(.55); box-shadow: none; }
.create-hero:disabled .create-orb { background: var(--surface-soft); color: var(--muted); box-shadow: none; font-size: 13px; }
.create-copy { display: flex; flex-direction: column; gap: 6px; position: relative; z-index: 1; max-width: 75%; }
.create-copy strong { font: 700 23px/1.1 Georgia, serif; }
.create-copy > span:last-child { color: #d7c7d1; font-size: 13px; line-height: 1.35; }
.create-kicker { color: var(--accent-soft); text-transform: uppercase; letter-spacing: .14em; font-size: 10px; font-weight: 800; }
.create-orb { position: absolute; z-index: 2; right: 24px; bottom: 24px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #23131a; font-size: 29px; font-weight: 300; box-shadow: 0 8px 26px rgba(255, 111, 145, .35); }

.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 30px 2px 15px; }
.section-heading h2 { margin: 0; font: 700 25px/1 Georgia, serif; }
.count-label { color: var(--muted); font-size: 12px; }
.catalog-heading-actions { display: flex; align-items: center; gap: 9px; }
.admin-add-model { padding: 8px 11px; border: 1px solid rgba(255,215,122,.25); border-radius: 11px; background: rgba(255,215,122,.1); color: var(--gold); font-size: 11px; font-weight: 750; }
.catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.girl-card { position: relative; min-height: 245px; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); text-align: left; box-shadow: 0 12px 35px rgba(0,0,0,.2); }
.girl-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.girl-card:active img { transform: scale(1.03); }
.girl-card::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, rgba(9,7,11,.92)); }
.girl-info { position: absolute; z-index: 1; inset: auto 14px 15px; }
.girl-info strong { display: block; font: 700 20px/1 Georgia, serif; margin-bottom: 5px; }
.girl-info span { display: block; color: #d6ccd2; font-size: 11px; line-height: 1.35; }
.girl-personality { position: absolute; z-index: 2; top: 11px; left: 11px; padding: 6px 9px; border-radius: 999px; background: rgba(15, 11, 18, .6); backdrop-filter: blur(10px); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.chat-list { display: flex; flex-direction: column; gap: 10px; }
.chat-row { width: 100%; display: grid; grid-template-columns: 59px 1fr auto; gap: 13px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); text-align: left; }
.chat-row img { width: 59px; height: 59px; object-fit: cover; border-radius: 17px; }
.chat-row-copy { min-width: 0; }
.chat-row-copy strong { display: block; font: 700 17px Georgia, serif; margin-bottom: 5px; }
.chat-row-copy span { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.chat-row-time { color: #766c78; font-size: 10px; }
.chat-mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: -2px 0 15px; padding: 5px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.035); }
.chat-mode-switch button { padding: 10px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 750; }
.chat-mode-switch button.active { background: var(--surface-strong); color: var(--text); box-shadow: 0 5px 14px rgba(0,0,0,.2); }
.monitor-search { display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.monitor-search > span { color: var(--accent-soft); font-size: 22px; }
.monitor-search input { width: 100%; height: 48px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; }
.monitor-note { margin: 9px 4px 14px; color: #786e7b; font-size: 10px; }
.monitor-row { grid-template-columns: 52px 1fr auto; }
.monitor-row img { width: 52px; height: 52px; }
.monitor-row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; color: #746a76; font-size: 9px; }
.monitor-row-meta b { color: #9a8f9c; font-size: 9px; font-weight: 650; }
.empty-state { text-align: center; color: var(--muted); padding: 70px 30px; }
.empty-state > span { display: block; color: var(--accent); font-size: 48px; }
.empty-state h3 { color: var(--text); font-family: Georgia, serif; margin: 15px 0 7px; }
.empty-state p { font-size: 13px; line-height: 1.5; margin-bottom: 22px; }

.user-profile-card { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-bottom: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.user-profile-avatar { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 17px; background: linear-gradient(145deg, rgba(255,111,145,.3), rgba(103,63,117,.35)); color: var(--accent-soft); font: 700 25px Georgia, serif; }
.user-profile-copy { min-width: 0; }
.user-profile-copy small, .user-profile-copy strong, .user-profile-copy > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-profile-copy small { margin-bottom: 4px; color: var(--accent-soft); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.user-profile-copy strong { font: 700 17px Georgia, serif; }
.user-profile-copy > span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.support-entry-button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 78px; height: 58px; padding: 6px 10px; border: 1px solid rgba(255,111,145,.2); border-radius: 16px; background: rgba(255,111,145,.09); color: var(--accent-soft); }
.support-entry-button > span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 9px; background: rgba(255,255,255,.06); font-size: 14px; font-weight: 800; }
.support-entry-button b { font-size: 9px; }

.wallet-card { position: relative; overflow: hidden; padding: 25px; border: 1px solid rgba(255, 215, 122, .17); border-radius: 26px; background: linear-gradient(135deg, #39263b, #211823 60%, #3b2633); }
.wallet-card::after { content: "✦"; position: absolute; right: 13px; top: -34px; font-size: 150px; color: rgba(255, 215, 122, .055); }
.wallet-balance { display: flex; align-items: center; gap: 12px; margin: 2px 0 5px; }
.wallet-balance span { color: var(--gold); font-size: 31px; }
.wallet-balance strong { font: 700 48px/1 Georgia, serif; }
.wallet-card > p:not(.eyebrow) { color: #c0b2bd; font-size: 12px; }
.cost-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 23px; }
.cost-row > span { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 11px; border-radius: 13px; background: rgba(255,255,255,.055); text-align: left; }
.cost-row i { display: grid; flex: 0 0 auto; place-items: center; width: 31px; height: 31px; border-radius: 10px; background: rgba(255,215,122,.09); color: var(--gold); font-size: 16px; font-style: normal; }
.cost-row b, .cost-row small { display: block; }
.cost-row b { color: var(--text); font-size: 11px; margin-bottom: 2px; }
.cost-row small { color: var(--muted); font-size: 9px; }
.wallet-heading { margin-top: 30px; }
.package-list { display: flex; flex-direction: column; gap: 10px; }
.package-card { position: relative; display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 18px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); text-align: left; }
.package-card.popular { border-color: rgba(255,111,145,.42); background: linear-gradient(100deg, rgba(255,111,145,.12), var(--surface)); }
.package-card strong { display: block; font: 700 20px Georgia, serif; }
.package-card span { color: var(--muted); font-size: 11px; }
.package-main { min-width: 0; }
.package-main > span { display: block; margin-top: 4px; }
.package-price { text-align: right; }
.package-price b { display: block; color: var(--text); font-size: 18px; }
.package-price > span { display: block; margin-top: 4px; color: var(--accent-soft); font-weight: 750; }
.popular-tag { position: absolute; right: 14px; top: -8px; padding: 4px 8px; border-radius: 999px; background: var(--accent); color: #28151c !important; font-size: 8px !important; font-weight: 900; letter-spacing: .08em; }
.payment-note { text-align: center; color: #756c77; font-size: 10px; margin-top: 18px; }
.legal-info { margin: 5px auto 0; text-align: center; }
.legal-info summary { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.025); color: #8f8490; cursor: pointer; font-size: 10px; font-weight: 650; list-style: none; }
.legal-info summary::-webkit-details-marker { display: none; }
.legal-info summary::before { content: "§"; color: var(--accent-soft); font: 700 13px Georgia, serif; }
.legal-info[open] summary { color: #c4b9c3; background: rgba(255,255,255,.04); }
.legal-info-links { display: flex; flex-direction: column; align-items: center; gap: 9px; margin-top: 11px; }
.legal-info-links a { color: var(--accent-soft); font-size: 11px; line-height: 1.35; text-underline-offset: 3px; }

.tabbar { position: fixed; z-index: 20; left: 50%; bottom: 10px; transform: translateX(-50%); display: grid; grid-template-columns: repeat(3, 1fr); width: min(calc(100% - 24px), 680px); padding: 7px 9px calc(7px + var(--safe-bottom)); border: 1px solid rgba(255,255,255,.1); border-radius: 23px; background: rgba(25, 20, 29, .86); backdrop-filter: blur(22px); box-shadow: 0 18px 45px rgba(0,0,0,.4); }
.tab { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #796f7c; font-size: 10px; font-weight: 700; padding: 5px; }
.tab.active { color: var(--accent-soft); }
.tab-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.screen-overlay { position: fixed; z-index: 40; top: 0; bottom: 0; left: 50%; display: flex; flex-direction: column; width: min(100%, 720px); height: 100vh; height: 100dvh; max-height: 100dvh; overflow: hidden; background: var(--bg); visibility: hidden; pointer-events: none; transform: translateX(calc(-50% + 110vw)); transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s linear .3s; }
.screen-overlay.open { visibility: visible; pointer-events: auto; transform: translateX(-50%); transition-delay: 0s; }
.overlay-header, .chat-header { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; padding: calc(12px + env(safe-area-inset-top, 0px)) 17px 12px; border-bottom: 1px solid var(--line); background: rgba(16,13,20,.9); backdrop-filter: blur(20px); }
.round-button { flex: 0 0 auto; display: grid; place-items: center; width: 39px; height: 39px; padding: 0 0 3px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); font-size: 30px; font-weight: 200; }
.progress-track { height: 4px; flex: 1; overflow: hidden; border-radius: 99px; background: var(--surface-soft); }
.progress-track span { display: block; height: 100%; width: 11%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-deep), var(--accent-soft)); transition: width .25s ease; }
.progress-label { color: var(--muted); font-size: 11px; }
.creator-content { overflow-y: auto; padding: 24px 18px calc(34px + var(--safe-bottom)); }
.creator-visual { display: none; }
.creator-visual img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; transition: opacity .2s ease; }
.creator-visual-shade { position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(14,10,17,.7)); }
.creator-badge { position: absolute; left: 14px; bottom: 14px; padding: 7px 10px; border-radius: 999px; background: rgba(20,14,23,.68); backdrop-filter: blur(10px); font-size: 10px; font-weight: 800; }
.creator-content > .eyebrow, .creator-content > h2, .creator-content > .creator-hint { text-align: center; }
.creator-content h2 { margin: 0; font: 700 27px/1.12 Georgia, serif; }
.creator-hint { max-width: 480px; color: var(--muted); font-size: 12px; line-height: 1.45; margin: 8px auto 24px; }
.creator-option-section + .creator-option-section { margin-top: 27px; }
.creator-option-section h3 { margin: 0 0 11px; font-size: 14px; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.option-card { position: relative; min-height: 0; aspect-ratio: 1 / 1; overflow: hidden; display: flex; align-items: flex-end; border: 1px solid var(--line); border-radius: 18px; padding: 0; background: var(--surface); text-align: left; }
.option-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 23%; opacity: .96; }
.option-card::after { content: ""; position: absolute; inset: 52% 0 0; background: linear-gradient(transparent, rgba(10,8,12,.94)); }
.option-card.option-modelId { aspect-ratio: 4 / 3; }
.option-card.option-modelId img { object-position: center 28%; }
.option-card.option-ageRange, .option-card.option-build, .option-card.option-breastSize { aspect-ratio: 3 / 4; }
.option-card.option-build img { object-fit: cover; object-position: center 38%; background: #201a25; }
.option-card.option-breastSize img { object-fit: cover; object-position: center 24%; background: #201a25; }
.option-card.option-eyeColor { aspect-ratio: 2 / 1; }
.option-card.option-eyeColor img { object-position: center; }
.option-card .option-label { position: relative; z-index: 2; width: 100%; padding: 13px; font-size: 12px; font-weight: 750; }
.option-card.symbolic { min-height: 105px; align-items: flex-end; background: linear-gradient(145deg, #302638, #1d1822); }
.option-card.symbolic::after { inset: 45% 0 0; }
.option-symbol { position: absolute !important; z-index: 1; inset: 8px 0 auto !important; width: 100% !important; padding: 0 !important; color: var(--accent-soft); font: 700 42px/1 Georgia, serif !important; text-align: center; opacity: .9; }
.option-symbol-personality { display: grid; place-items: center; height: 60px; font-family: inherit !important; font-size: 34px !important; }
.option-card.selected { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent), 0 0 24px rgba(255,111,145,.13); }
.option-card.selected::before { content: "✓"; position: absolute; z-index: 3; top: 9px; right: 9px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #28141c; font-size: 13px; font-weight: 900; }
.compact-options { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.compact-options .option-card { min-height: 76px; aspect-ratio: auto; justify-content: center; text-align: center; }
.compact-options .option-card::after { display: none; }
.compact-options .option-label { padding: 43px 4px 8px; font-size: 9px; }
.skin-swatch { display: block; width: 100%; height: 100%; border-radius: inherit; background: #d9aa91; }
.option-card .skin-swatch { position: absolute; inset: 0; border-radius: 0; }
.skin-pale { background: #f4d9ce; }
.skin-light { background: #e6bea9; }
.skin-medium { background: #c99070; }
.skin-tan { background: #ac704e; }
.skin-olive { background: #9c7457; }
.skin-brown { background: #74472f; }
.skin-dark { background: #432a21; }
.creator-next { margin-top: 24px; }
.primary-button:disabled { opacity: .42; box-shadow: none; }
.name-step, .description-step { margin-top: 20px; }
.name-step label, .description-step label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.description-step label span { float: right; color: #776d7a; }
.name-step input, .description-step textarea { width: 100%; padding: 16px; border: 1px solid var(--line); border-radius: 16px; outline: none; resize: vertical; background: var(--surface); color: var(--text); font-size: 16px; line-height: 1.45; }
.name-step input:focus, .description-step textarea:focus { border-color: var(--accent); }
.description-step > p { margin: 9px 2px 0; color: #817685; font-size: 11px; line-height: 1.45; }
.creator-review-intro { margin-bottom: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.creator-review-intro > span { color: var(--accent-soft); font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.creator-review-intro strong { display: block; margin-top: 5px; font: 700 24px Georgia, serif; }
.creator-review-intro p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.creator-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.creator-review-card { min-width: 0; min-height: 72px; display: flex; align-items: center; gap: 10px; overflow: hidden; padding: 8px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.creator-review-card > img, .creator-review-card > .skin-swatch, .creator-review-card > .review-symbol { flex: 0 0 auto; width: 55px; height: 55px; object-fit: cover; border-radius: 11px; }
.creator-review-card > .review-symbol { display: grid; place-items: center; background: var(--surface-soft); font-size: 24px; }
.creator-review-card > span:last-child { min-width: 0; }
.creator-review-card small, .creator-review-card strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.creator-review-card small { margin-bottom: 4px; color: var(--muted); font-size: 8px; }
.creator-review-card strong { font-size: 11px; white-space: nowrap; }
.primary-button, .secondary-button { width: 100%; border-radius: 15px; padding: 15px 18px; font-weight: 800; }
.primary-button { margin-top: 13px; border: 0; background: linear-gradient(135deg, var(--accent-soft), var(--accent)); color: #28141c; box-shadow: 0 9px 25px rgba(255,111,145,.22); }
.secondary-button { margin-top: 9px; border: 1px solid var(--line); background: var(--surface-soft); }

.chat-screen { z-index: 60; isolation: isolate; }
.chat-header { position: relative; z-index: 30; overflow: visible; }
.chat-header img { width: 43px; height: 43px; object-fit: cover; border-radius: 50%; border: 2px solid rgba(255,111,145,.45); }
.chat-avatar-button { flex: 0 0 auto; width: 43px; height: 43px; padding: 0; border: 0; border-radius: 50%; background: transparent; }
.chat-title { flex: 1; min-width: 0; }
.chat-title strong { display: block; font: 700 17px Georgia, serif; overflow: hidden; text-overflow: ellipsis; }
.chat-title span { display: flex; align-items: center; gap: 5px; margin-top: 3px; color: #8a7f8b; font-size: 9px; }
.chat-title i { width: 6px; height: 6px; border-radius: 50%; background: #72d69a; }
.balance-chip.compact { min-width: auto; padding: 8px 10px; font-size: 11px; }
.chat-menu-toggle { flex: 0 0 auto; width: 39px; height: 39px; padding: 0 0 7px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: #d9ced6; font-size: 18px; font-weight: 800; letter-spacing: 1px; line-height: 1; }
.chat-menu { position: absolute; z-index: 100; top: calc(68px + env(safe-area-inset-top, 0px)); right: 12px; width: 190px; overflow: hidden; padding: 6px; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: rgba(36,29,41,.99); box-shadow: 0 18px 45px rgba(0,0,0,.58); backdrop-filter: blur(22px); }
.chat-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; border: 0; border-radius: 11px; background: transparent; color: var(--text); text-align: left; font-size: 13px; }
.chat-menu button:active { background: rgba(255,255,255,.07); }
.chat-menu button span { width: 18px; color: var(--accent-soft); text-align: center; font-size: 17px; }
.chat-menu button.danger { color: #ff93a9; }
.chat-menu button.danger span { color: #ff7895; }
.messages { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 8px; padding: 18px 14px 12px; }
.message { max-width: 83%; padding: 11px 13px; border-radius: 17px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.message.user { align-self: flex-end; border-bottom-right-radius: 5px; background: linear-gradient(135deg, #e65b7f, #bd4269); color: white; }
.message.assistant { align-self: flex-start; border: 1px solid var(--line); border-bottom-left-radius: 5px; background: var(--surface-strong); }
.action-quote-text { display: block; padding-left: 10px; border-left: 3px solid rgba(255,255,255,.5); font-style: italic; }
.message.assistant .action-quote-text, .message-media .action-quote-text { border-left-color: var(--accent-soft); }
.message-plain-text { white-space: pre-wrap; font-style: normal; }
.message-plain-text.after-action { display: block; margin-top: 10px; }
.message-plain-text + .action-quote-text, .action-quote-text + .action-quote-text { margin-top: 10px; }
.message-media { width: min(88%, 360px); align-self: flex-start; padding: 5px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface-strong); }
.media-frame { position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 62vh; overflow: hidden; border-radius: 15px; background: #17121b; }
.media-frame img, .media-frame video { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s ease; }
.media-frame.loaded img, .media-frame.loaded video { opacity: 1; }
.media-loader { position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; background: linear-gradient(110deg, #17121b 8%, #241b28 18%, #17121b 33%); background-size: 220% 100%; animation: media-shimmer 1.35s linear infinite; transition: opacity .2s ease; }
.media-loader::after { content: ""; width: 25px; height: 25px; border: 2px solid rgba(255,255,255,.2); border-top-color: var(--accent-soft); border-radius: 50%; animation: media-spin .8s linear infinite; }
.media-frame.loaded .media-loader { opacity: 0; pointer-events: none; }
@keyframes media-shimmer { to { background-position-x: -220%; } }
@keyframes media-spin { to { transform: rotate(360deg); } }
.message-media video, .gallery-item video { background: #09070b; }
.expandable-photo { cursor: zoom-in; }
.message-media p { margin: 8px 8px 5px; color: #d5cad1; font-size: 11px; }
.starter-card { width: min(100%, 570px); margin: auto auto 2px; padding: 18px; border: 1px solid rgba(255,111,145,.2); border-radius: 23px; background: linear-gradient(145deg, rgba(57,35,54,.85), rgba(30,24,35,.95)); box-shadow: 0 18px 45px rgba(0,0,0,.22); }
.starter-card h3 { margin: 0; font: 700 23px/1.18 Georgia, serif; }
.starter-hint { margin: 8px 0 15px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.starter-options { display: flex; flex-direction: column; gap: 8px; }
.starter-options button { display: grid; grid-template-columns: 29px 1fr; gap: 8px; align-items: start; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.045); color: var(--text); text-align: left; }
.starter-options button span { color: var(--accent-soft); font: 700 10px/1.5 Georgia, serif; }
.starter-options button strong { font-size: 11px; font-weight: 560; line-height: 1.42; }
.starter-custom { width: 100%; margin-top: 10px; padding: 8px; border: 0; background: transparent; color: #a99ca8; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.typing { flex: 0 0 auto; align-self: flex-start; margin: 0 4px; width: max-content; padding: 10px 13px; border-radius: 14px; background: var(--surface-strong); }
.typing span { display: inline-block; width: 5px; height: 5px; margin: 0 2px; border-radius: 50%; background: var(--muted); animation: typing 1s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .15s; }.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity:.4; } 30% { transform: translateY(-4px); opacity:1; } }
.chat-composer { flex: 0 0 auto; padding: 8px 12px calc(10px + var(--safe-bottom)); border-top: 1px solid var(--line); background: rgba(16,13,20,.95); }
.media-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.media-actions button { flex: 1; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: #d3c7d0; font-size: 11px; }
.media-actions b { margin-left: 5px; color: var(--gold); font-size: 9px; }
.composer-row { display: flex; align-items: end; gap: 8px; }
.composer-row textarea { flex: 1; min-height: 44px; max-height: 110px; resize: none; outline: 0; border: 1px solid var(--line); border-radius: 17px; padding: 12px 14px; background: var(--surface); color: var(--text); font-size: 16px; }
.send-button { flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--accent); color: #2c151e; font-size: 23px; font-weight: 800; }

.gallery-screen, .profile-screen { z-index: 80; }
.gallery-header > div { min-width: 0; }
.gallery-header .eyebrow { margin-bottom: 4px; }
.gallery-header strong { display: block; overflow: hidden; font: 700 19px Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.gallery-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 14px calc(28px + var(--safe-bottom)); }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.gallery-item { position: relative; min-height: 215px; overflow: hidden; margin: 0; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.gallery-item img, .gallery-item video { display: block; width: 100%; height: 100%; min-height: 215px; max-height: 55vh; object-fit: cover; }
.gallery-item figcaption { position: absolute; right: 8px; bottom: 8px; padding: 4px 7px; border-radius: 999px; background: rgba(12,9,14,.65); color: #d9cfd6; font-size: 9px; backdrop-filter: blur(8px); }
.media-viewer { position: fixed; z-index: 140; inset: 0; display: grid; place-items: center; padding: calc(58px + env(safe-area-inset-top, 0px)) 0 calc(22px + var(--safe-bottom)); background: rgba(5,4,7,.97); }
.media-viewer img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; }
.media-viewer-close { position: absolute; z-index: 1; top: calc(10px + env(safe-area-inset-top, 0px)); right: 12px; display: grid; place-items: center; width: 42px; height: 42px; padding: 0 0 3px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: rgba(30,25,34,.9); color: white; font-size: 29px; font-weight: 250; }
.profile-header > div { min-width: 0; }
.profile-header .eyebrow { margin-bottom: 4px; }
.profile-header strong { display: block; overflow: hidden; font: 700 19px Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.profile-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 14px calc(35px + var(--safe-bottom)); }
.profile-carousel { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 25px; }
.profile-carousel::-webkit-scrollbar { display: none; }
.profile-photo { flex: 0 0 100%; height: min(67vh, 620px); min-height: 430px; scroll-snap-align: center; object-fit: cover; object-position: center 18%; border: 1px solid var(--line); border-radius: 25px; background: var(--surface); }
.profile-dots { display: flex; justify-content: center; gap: 6px; min-height: 7px; margin: 12px 0 20px; }
.profile-dots i { width: 6px; height: 6px; border-radius: 99px; background: #504653; transition: width .2s, background .2s; }
.profile-dots i.active { width: 18px; background: var(--accent); }
.profile-copy { padding: 5px 5px 20px; }
.profile-personality { display: inline-block; padding: 6px 9px; border-radius: 999px; background: rgba(255,111,145,.12); color: var(--accent-soft); font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.profile-copy h2 { margin: 11px 0 8px; font: 700 31px Georgia, serif; }
.profile-copy p { margin: 0; color: #c4b8c1; font-size: 14px; line-height: 1.65; white-space: pre-wrap; }
.profile-start-button { margin: 0 5px 20px; width: calc(100% - 10px); }
.profile-edit-button { margin: -10px 5px 20px; width: calc(100% - 10px); }
.catalog-editor-screen { z-index: 105; }
.catalog-editor-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 20px 18px calc(35px + var(--safe-bottom)); }
.catalog-editor-content > label, .catalog-editor-row label { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; color: #c8bbc5; font-size: 11px; font-weight: 700; }
.catalog-editor-content input, .catalog-editor-content textarea, .catalog-editor-content select { width: 100%; outline: 0; border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px; background: var(--surface); color: var(--text); font-size: 15px; resize: vertical; }
.catalog-editor-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.catalog-reference-section { margin: 4px 0 18px; padding: 14px; border: 1px solid rgba(255,111,145,.2); border-radius: 17px; background: rgba(255,111,145,.045); }
.catalog-reference-section > label { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; color: #c8bbc5; font-size: 10px; font-weight: 700; }
.catalog-reference-section input, .catalog-reference-section textarea { font-size: 12px; }
.catalog-reference-file input { padding: 9px; }
.catalog-reference-file input::file-selector-button { margin-right: 9px; padding: 7px 9px; border: 0; border-radius: 9px; background: rgba(255,111,145,.15); color: var(--accent-soft); font-weight: 800; }
.catalog-reference-upload { width: 100%; margin-top: 4px; }
.catalog-reference-status { display: block; min-height: 14px; margin-top: 9px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.catalog-reference-status.success { color: #8de0ac; }
.catalog-reference-status.error { color: #ff8fa9; }
.catalog-traits-section { margin: 4px 0 18px; padding: 14px; border: 1px solid rgba(255,215,122,.14); border-radius: 17px; background: rgba(255,215,122,.035); }
.catalog-traits-heading { margin-bottom: 13px; }
.catalog-traits-heading strong, .catalog-traits-heading span { display: block; }
.catalog-traits-heading strong { color: var(--gold); font-size: 13px; }
.catalog-traits-heading span { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.catalog-traits-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.catalog-traits-grid label { display: flex; min-width: 0; flex-direction: column; gap: 6px; color: #bcaeba; font-size: 9px; font-weight: 700; }
.catalog-traits-grid select { min-width: 0; padding: 10px 8px; font-size: 12px; }
.catalog-photos-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 7px 0 12px; }
.catalog-photos-heading strong, .catalog-photos-heading span { display: block; }
.catalog-photos-heading strong { font-size: 14px; }
.catalog-photos-heading span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.catalog-photos-heading button { width: auto; padding: 9px 12px; }
.catalog-photo-list { display: flex; flex-direction: column; gap: 9px; }
.catalog-photo-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.catalog-photo-row img { width: 54px; height: 68px; border-radius: 9px; object-fit: cover; background: var(--surface); }
.catalog-photo-row input { min-width: 0; font-size: 11px; }
.catalog-photo-actions { display: grid; grid-template-columns: repeat(2, 31px); gap: 4px; }
.catalog-photo-actions button { width: 31px; height: 31px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); }
.catalog-photo-actions .remove { grid-column: span 2; color: #ff8fa9; }
.catalog-photo-cover { position: absolute; margin: 5px; padding: 3px 5px; border-radius: 6px; background: rgba(9,7,11,.75); color: var(--gold); font-size: 7px; }
.catalog-save-button { width: 100%; margin-top: 20px; }
.monitor-screen { z-index: 90; }
.monitor-header > div { min-width: 0; }
.monitor-header .eyebrow { margin-bottom: 4px; }
.monitor-header strong { display: block; overflow: hidden; font: 700 17px Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.monitor-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 14px calc(30px + var(--safe-bottom)); }
.diagnostic-card { padding: 15px; border: 1px solid rgba(255,215,122,.15); border-radius: 21px; background: linear-gradient(145deg, #29222d, #1b171f); }
.diagnostic-heading { display: flex; align-items: center; gap: 12px; }
.diagnostic-heading img { width: 58px; height: 58px; border-radius: 17px; object-fit: cover; }
.diagnostic-heading h2 { margin: 0 0 5px; font: 700 20px Georgia, serif; }
.diagnostic-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.diagnostic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 15px 0; }
.diagnostic-grid > div { min-width: 0; padding: 9px; border-radius: 11px; background: rgba(255,255,255,.04); }
.diagnostic-grid span, .diagnostic-grid strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diagnostic-grid span { color: #807583; font-size: 8px; text-transform: uppercase; letter-spacing: .06em; }
.diagnostic-grid strong { margin-top: 4px; color: #ded3db; font-size: 10px; }
.diagnostic-card details { border-top: 1px solid var(--line); }
.diagnostic-card summary { padding: 12px 2px; color: #cdbfc9; cursor: pointer; font-size: 11px; }
.diagnostic-card pre { max-height: 290px; overflow: auto; margin: 0 0 12px; padding: 11px; border-radius: 11px; background: #100d14; color: #b8abb6; font: 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word; user-select: text; }
.monitor-conversation { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 21px; background: rgba(255,255,255,.018); }
.monitor-conversation .message-media { width: min(100%, 360px); max-width: 100%; }
.monitor-conversation .media-frame { max-height: min(60vh, 520px); }
.monitor-xavira-request { margin: 8px 5px 4px; padding: 9px; overflow: auto; border-radius: 10px; background: #100d14; color: #b8abb6; font: 9px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word; user-select: text; }
.monitor-xavira-request::before { content: "XAVIRA REQUEST"; display: block; margin-bottom: 6px; color: var(--gold); font: 750 8px/1.2 Inter, sans-serif; letter-spacing: .1em; }
.monitor-conversation .message.user { align-self: flex-end; }
.monitor-media.user { align-self: flex-end; }
.monitor-conversation-empty { color: var(--muted); font-size: 12px; text-align: center; }
.ticket-list-screen { z-index: 92; }
.support-screen { z-index: 98; }
.support-header > div { min-width: 0; }
.support-header .eyebrow { margin-bottom: 4px; }
.support-header strong { display: block; overflow: hidden; font: 700 18px Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.ticket-list-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 14px calc(30px + var(--safe-bottom)); }
.support-note { margin: 0 3px 14px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.ticket-row { grid-template-columns: 47px minmax(0, 1fr) auto; }
.ticket-avatar { display: grid; place-items: center; width: 47px; height: 47px; border-radius: 15px; background: linear-gradient(145deg, rgba(255,111,145,.2), rgba(103,63,117,.25)); color: var(--accent-soft); font: 700 17px Georgia, serif; }
.ticket-row.unread { border-color: rgba(255,111,145,.32); background: linear-gradient(105deg, rgba(255,111,145,.1), var(--surface)); }
.ticket-row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; color: var(--muted); font-size: 9px; }
.ticket-unread { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #2c151e; font-size: 9px; font-weight: 850; }
.support-messages { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 8px; padding: 18px 14px 12px; }
.support-empty { margin: auto; padding: 25px; color: var(--muted); text-align: center; }
.support-empty > span { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 15px; border-radius: 20px; background: rgba(255,111,145,.1); color: var(--accent-soft); font: 800 25px Georgia, serif; }
.support-empty h3 { margin: 0 0 7px; color: var(--text); font: 700 22px Georgia, serif; }
.support-empty p { max-width: 310px; margin: 0; font-size: 12px; line-height: 1.5; }
.support-message { max-width: 84%; padding: 10px 12px 7px; border-radius: 17px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.support-message.mine { align-self: flex-end; border-bottom-right-radius: 5px; background: linear-gradient(135deg, #e65b7f, #bd4269); color: white; }
.support-message.theirs { align-self: flex-start; border: 1px solid var(--line); border-bottom-left-radius: 5px; background: var(--surface-strong); }
.support-message time { display: block; margin-top: 4px; color: rgba(255,255,255,.52); font-size: 8px; text-align: right; }
.support-composer { flex: 0 0 auto; padding: 9px 12px calc(10px + var(--safe-bottom)); border-top: 1px solid var(--line); background: rgba(16,13,20,.97); }
.support-composer textarea { flex: 1; min-height: 44px; max-height: 120px; resize: none; outline: 0; border: 1px solid var(--line); border-radius: 17px; padding: 12px 14px; background: var(--surface); color: var(--text); font-size: 16px; }
.support-composer textarea:focus { border-color: rgba(255,111,145,.45); }
.danger-card { border-color: rgba(255,111,145,.25); }
.danger-symbol { color: #ff839e; background: rgba(255,76,113,.13); font-family: inherit; font-size: 27px; }
.danger-button { background: linear-gradient(135deg, #ff8ca6, #dc3f69); }

.modal-backdrop, .loading-overlay { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(7,5,9,.76); backdrop-filter: blur(11px); }
.modal-card { position: relative; width: min(100%, 390px); padding: 30px 23px 23px; border: 1px solid var(--line); border-radius: 25px; background: linear-gradient(145deg, #2b222f, #1b171f); text-align: center; box-shadow: 0 30px 70px rgba(0,0,0,.5); }
.modal-symbol { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 17px; border-radius: 22px; background: rgba(255,111,145,.13); color: var(--accent-soft); font: 800 19px Georgia, serif; }
.success-symbol { color: #83e4aa; background: rgba(76,190,120,.12); font-size: 27px; }
.modal-card h2 { margin: 0 0 10px; font: 700 25px Georgia, serif; }
.modal-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.modal-close { position: absolute; top: 10px; right: 12px; border: 0; background: none; color: var(--muted); font-size: 26px; }
.loading-overlay { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.pulse-heart { color: var(--accent); font-size: 70px; animation: pulse 1.2s infinite; }
.loading-overlay strong { margin-top: 12px; font: 700 23px Georgia, serif; }
.loading-overlay span { color: var(--muted); margin-top: 7px; font-size: 12px; }
@keyframes pulse { 50% { transform: scale(1.13); opacity: .65; } }
.toast { position: fixed; z-index: 130; left: 50%; bottom: calc(95px + var(--safe-bottom)); width: max-content; max-width: calc(100% - 40px); padding: 11px 15px; border: 1px solid var(--line); border-radius: 13px; background: #332936; box-shadow: 0 14px 35px rgba(0,0,0,.4); color: var(--text); font-size: 12px; text-align: center; opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 560px) {
  .catalog-grid { grid-template-columns: repeat(4, 1fr); }
  .girl-card { min-height: 270px; }
  .creator-option-section .option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creator-option-section .compact-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
