/* Signed-in shell and page components (also used by the public shop and help pages). */
#app { min-height: 100vh; display: grid; grid-template-columns: 264px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 16px; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 22px; }
.sidebar .brand { padding: 0 10px; }
.side-user { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line-2); transition: border-color 0.2s; }
.side-user:hover { border-color: var(--blush-2); }
.side-nav { display: grid; gap: 4px; }
.side-nav a, .side-bottom a, .side-bottom button { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; font-weight: 600; color: var(--ink-2); transition: all 0.18s; width: 100%; text-align: left; }
.side-nav a:hover, .side-bottom a:hover, .side-bottom button:hover { background: var(--bg); color: var(--ink); }
.side-nav a.active, .side-bottom a.active { background: var(--blush); color: var(--wine); }
.side-nav .count-badge { margin-left: auto; }
.side-bottom { margin-top: auto; display: grid; gap: 4px; }
.app-main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 90; display: flex; align-items: center; justify-content: space-between; height: 68px; padding: 0 clamp(16px, 3vw, 40px); background: rgb(246 242 233 / 82%); backdrop-filter: saturate(1.5) blur(14px); }
.mobile-brand { display: none; }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.top-orders { gap: 7px; white-space: nowrap; }
.balance-pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 14px; box-shadow: var(--shadow-sm); transition: border-color 0.2s; }
.balance-pill:hover { border-color: var(--blush-2); }
.bag-btn { position: relative; }
.bag-btn .count-badge { position: absolute; top: -4px; right: -4px; }
.top-avatar .avatar { cursor: pointer; }
#appView { padding: 12px clamp(16px, 3vw, 40px) 64px; width: 100%; max-width: 1240px; margin-inline: auto; flex: 1; outline: none; }
#app.wide #appView { max-width: 1400px; }

.tabbar { display: none; }

/* Page scaffolding */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 12px 0 28px; flex-wrap: wrap; }
.page-title { font-size: clamp(36px, 5vw, 54px); line-height: 1; margin: 6px 0 10px; letter-spacing: -0.025em; }
.page-head p.muted { max-width: 560px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.grid { display: grid; gap: 20px; }
.grid.creators { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid.products { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 18px; }
.grid.has-empty { grid-template-columns: 1fr; }
.two-col { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 20px; align-items: start; }
.btn-link { color: var(--wine); font-weight: 700; }

/* Creator cards */
.creator { position: relative; display: grid; gap: 14px; justify-items: start; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); cursor: pointer; transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s; }
.creator:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--blush-2); }
.creator.is-locked { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.creator-foot .btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.creator-save { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); background: var(--surface-2); transition: all 0.2s; }
.creator-save:hover { color: var(--wine); background: var(--blush); }
.creator-save.on { color: var(--wine); background: var(--blush); }
.creator-save.on svg { fill: currentColor; }
.creator-main { min-width: 0; max-width: 100%; }
.creator-main h3 { font-size: 18px; letter-spacing: -0.01em; }
.creator-stats { display: flex; gap: 16px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.creator-stats span { display: inline-flex; align-items: center; gap: 5px; }
.creator-foot { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 2px; }
.creator-foot .btn { flex: 1 1 auto; min-width: 0; padding: 0 12px; }
.creator-foot .tag { flex: none; }

/* Profile */
.profile-hero { overflow: hidden; }
.cover { height: 160px; background: radial-gradient(circle at 20% 20%, #a13a63, transparent 55%), linear-gradient(135deg, var(--wine), var(--wine-3)); }
.profile-head { display: flex; align-items: flex-end; gap: 20px; padding: 0 clamp(20px, 3vw, 36px); margin-top: -56px; flex-wrap: wrap; }
.profile-head .avatar.xl { border-width: 5px; box-shadow: var(--shadow); }
.profile-head > .grow { padding-bottom: 8px; min-width: 220px; }
.profile-actions { padding-bottom: 10px; gap: 8px; }
.profile-body { padding: 20px clamp(20px, 3vw, 36px) 30px; display: grid; gap: 16px; }
.stat-row { display: flex; gap: 22px; }
.stat-row button { color: var(--ink-2); font-size: 15px; }
.stat-row button:hover { color: var(--wine); }
.stat-row b { color: var(--ink); font-size: 18px; margin-right: 3px; }
.bio { font-size: 16.5px; max-width: 640px; white-space: pre-wrap; overflow-wrap: anywhere; }
.story { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); line-height: 1.7; }
.locked-profile { padding: clamp(32px, 6vw, 72px) 24px; display: grid; gap: 14px; justify-items: center; text-align: center; background: radial-gradient(circle at 50% 0, var(--blush), transparent 60%), var(--surface); }
.lock-orb { width: 84px; height: 84px; border-radius: 28px; display: grid; place-items: center; background: linear-gradient(135deg, var(--wine), var(--wine-2)); color: #fff; box-shadow: 0 16px 40px rgb(122 33 66 / 35%); margin-bottom: 6px; }
.perks { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; color: var(--ink-2); text-align: left; }
.perks li { display: flex; gap: 10px; align-items: center; }
.perks .ico { color: var(--wine); }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 660px; }
.gallery-item { position: relative; aspect-ratio: 1; min-width: 0; border-radius: 14px; overflow: hidden; background: var(--bg-2); }
.gallery-open { display: block; width: 100%; height: 100%; cursor: pointer; }
.gallery-open img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.gallery-open:hover img { transform: scale(1.06); }
.gallery-open:focus-visible { outline: 3px solid var(--wine); outline-offset: -3px; }
.gallery-viewer-overlay { align-items: center; padding: 16px; }
.gallery-viewer-overlay .dialog.wide { width: min(100%, 720px); max-height: calc(100dvh - 32px); border-radius: 24px; padding: 48px 16px 16px; overflow: auto; }
.gallery-viewer-image { height: min(70dvh, 620px); min-height: 160px; background: var(--bg-2); border-radius: 16px; overflow: hidden; touch-action: pan-y; }
.gallery-viewer-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gallery-viewer-controls { display: flex; align-items: center; justify-content: center; gap: 22px; padding-top: 12px; }
.gallery-counter { min-width: 52px; text-align: center; color: var(--ink-2); font-size: 14px; font-weight: 700; }
.photo-del { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgb(0 0 0 / 60%); color: #fff; display: grid; place-items: center; }
.avatar-edit { position: relative; border-radius: 50%; flex: none; }
.avatar-edit > span { position: absolute; right: 2px; bottom: 6px; width: 34px; height: 34px; border-radius: 50%; background: var(--wine); color: #fff; display: grid; place-items: center; border: 3px solid #fff; }
.code-card { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: clamp(22px, 3vw, 34px); border-radius: var(--r-xl); background: linear-gradient(135deg, var(--wine), var(--wine-2) 60%, var(--wine-3)); color: #fff; box-shadow: 0 20px 50px rgb(122 33 66 / 28%); }
.code-big { font-size: clamp(30px, 5vw, 48px); letter-spacing: 0.06em; font-weight: 700; margin-top: 4px; }
.quick-links { padding: 6px; }
.quick-links a { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; font-weight: 600; transition: background 0.18s; }
.quick-links a span { flex: 1; }
.quick-links a:hover { background: var(--bg); }
.quick-links .ico:first-child { color: var(--wine); }
.danger-zone { border-color: #f2d3d8; }

/* Chat */
.chat-shell { display: grid; grid-template-columns: 360px 1fr; gap: 16px; height: calc(100vh - 68px - 36px); min-height: 520px; }
.chat-list, .chat-room { display: flex; flex-direction: column; overflow: hidden; min-height: 0; min-width: 0; }
.chat-list-head { padding: 18px 18px 12px; }
.chat-list-body { overflow-y: auto; flex: 1; padding: 6px 8px 12px; }
.convo { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; cursor: pointer; transition: background 0.15s; }
.convo:hover { background: var(--surface-2); }
.convo.active { background: var(--blush); }
.convo .grow > div { gap: 8px; }
.convo .grow span.truncate { font-size: 13.5px; }
.room-head { display: flex; flex: none; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); z-index: 1; }
.room-back { display: none; }
.messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px; display: flex; flex-direction: column; gap: 6px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.messages > * { flex-shrink: 0; }
.day { align-self: center; font-size: 12px; font-weight: 700; color: var(--ink-3); background: var(--bg-2); padding: 4px 12px; border-radius: 99px; margin: 12px 0 6px; }
.bubble { max-width: min(74%, 520px); padding: 10px 14px 6px; border-radius: 20px 20px 20px 6px; background: #fff; border: 1px solid var(--line); align-self: flex-start; overflow-wrap: anywhere; box-shadow: var(--shadow-sm); animation: bubble 0.25s var(--ease); }
.bubble > span { white-space: pre-wrap; }
.bubble.mine { align-self: flex-end; background: var(--wine); color: #fff; border-color: var(--wine); border-radius: 20px 20px 6px 20px; }
.bubble small { display: flex; align-items: center; justify-content: flex-end; gap: 5px; font-size: 11px; margin-top: 3px; white-space: nowrap; }
.bubble small time { opacity: 0.75; }
.message-receipt { display: inline-flex; flex: none; align-items: center; color: #eed9e1; }
.message-receipt.is-read { color: #77d8ff; }
.message-receipt .ico { display: block; margin: 0; }
.bubble.pending { opacity: 0.65; }
.bubble.failed { background: var(--danger-bg); border-color: #f2c5cc; color: var(--danger); }
@keyframes bubble { from { opacity: 0; transform: translateY(6px) scale(0.98); } }
.composer { display: flex; flex: none; align-items: flex-end; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--surface); }
.composer textarea { flex: 1; min-width: 0; resize: none; border: 1.5px solid var(--line); border-radius: 22px; padding: 11px 16px; min-height: 44px; max-height: 140px; outline: none; font-size: 16px; line-height: 1.4; background: var(--surface-2); transition: border-color 0.2s; overflow-y: auto; scrollbar-width: none; }
.composer textarea::-webkit-scrollbar { display: none; }
.composer button, .room-head > button, .room-head .avatar { flex-shrink: 0; }
body.chat-view #appView { padding-bottom: 12px; }
body.chat-view .chat-shell { height: calc(var(--chat-viewport-height, 100dvh) - 92px); min-height: 0; grid-template-columns: 300px minmax(0, 1fr); }
.composer textarea:focus { border-color: var(--wine); background: #fff; }

/* Shop */
.product { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; cursor: pointer; transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s; }
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--blush-2); }
.product-media { position: relative; aspect-ratio: 1 / 1.08; background: linear-gradient(160deg, #f7f1e6, var(--bg-2)); overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform 0.6s var(--ease); }
.product:hover .product-media img { transform: scale(1.05); }
.product-cat { position: absolute; left: 10px; top: 10px; padding: 3px 10px; border-radius: 999px; background: rgb(255 255 255 / 92%); backdrop-filter: blur(6px); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.product-photo-count { position: absolute; right: 10px; top: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 999px; background: rgb(20 10 14 / 78%); color: #fff; font-size: 11px; font-weight: 800; backdrop-filter: blur(6px); }
.soldout { position: absolute; right: 10px; bottom: 10px; background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.product-info { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-info h3 { font-size: 15.5px; line-height: 1.3; letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-desc { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }
.product-go { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--blush); color: var(--wine); transition: all 0.2s; }
.product:hover .product-go { background: var(--wine); color: #fff; transform: rotate(45deg); }
.price { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.price.big { font-size: 32px; }
.img-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: var(--ink-3); background: var(--bg-2); }
.shop-toolbar { flex-wrap: nowrap; }
.shop-toolbar .chips { min-width: 0; flex: 1; }
.shop-bag { flex: none; }
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.pdp-gallery { position: sticky; top: 90px; min-width: 0; }
.pdp-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: linear-gradient(160deg, #f7f1e6, var(--bg-2)); }
.pdp-media img { width: 100%; height: 100%; object-fit: cover; }
.pdp-thumbnails { display: flex; gap: 10px; overflow-x: auto; padding: 12px 2px 2px; scrollbar-width: thin; }
.pdp-thumb { width: 66px; height: 76px; flex: 0 0 66px; border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: var(--bg-2); transition: border-color .18s, transform .18s; }
.pdp-thumb:hover { transform: translateY(-2px); }
.pdp-thumb.on { border-color: var(--wine); }
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-product-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.admin-product-image { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg-2); }
.admin-product-image img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.admin-product-image span { display: block; padding: 7px 8px; font-size: 11px; font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-product-image button { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgb(20 10 14 / 82%); color: #fff; }
.admin-product-image button:hover { background: var(--wine); }
.printed { position: absolute; left: 16px; bottom: 16px; min-width: 138px; background: linear-gradient(135deg, #16070d, #4c1027); border: 1px solid rgb(255 255 255 / 36%); color: #fff; padding: 11px 16px; border-radius: 14px; display: grid; gap: 3px; box-shadow: 0 10px 24px rgb(12 2 7 / 42%); text-shadow: 0 1px 1px rgb(0 0 0 / 35%); }
.printed span { font-size: 10px; color: #f8dce7; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.printed b { font-size: 18px; color: #fff; letter-spacing: .04em; }
.empty-profile-content { min-height: 130px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 24px; border: 1px dashed var(--line); border-radius: 20px; color: var(--ink-2); text-align: left; }
.empty-profile-content > svg { color: var(--wine); flex: 0 0 auto; }
.empty-profile-content b { display: block; font-size: 14px; }
.empty-profile-content p { margin: 4px 0 0; color: var(--ink-3); font-size: 13px; }
.size { min-width: 56px; height: 48px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; transition: all 0.18s; }
.size:hover { border-color: var(--ink-3); }
.size.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); height: 54px; }
.stepper button { width: 46px; height: 100%; display: grid; place-items: center; border-radius: 999px; color: var(--ink-2); }
.stepper button:hover { color: var(--wine); }
.stepper output { min-width: 28px; text-align: center; font-weight: 700; }
.stepper.sm { height: 38px; }
.stepper.sm button { width: 34px; }

/* Bag & checkout */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.summary { position: sticky; top: 90px; }
.cart-item { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line-2); }
.cart-item:last-child { border-bottom: 0; }
.cart-thumb { width: 92px; height: 112px; border-radius: 16px; overflow: hidden; flex: none; background: var(--bg-2); }
.cart-thumb.sm { width: 52px; height: 62px; border-radius: 12px; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.address { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border: 1.5px solid var(--line); border-radius: 18px; cursor: pointer; transition: all 0.2s; }
.address:hover { border-color: var(--blush-2); }
.address.on { border-color: var(--wine); background: var(--blush); }
.address input { accent-color: var(--wine); width: 18px; height: 18px; margin-top: 4px; }
.sum-row { display: flex; justify-content: space-between; padding: 12px 0; }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 16px; font-size: 18px; font-weight: 800; }
.success { padding: clamp(36px, 6vw, 72px) 24px; display: grid; gap: 14px; justify-items: center; text-align: center; max-width: 620px; margin: 24px auto; }
.success-check { width: 88px; height: 88px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; animation: pop 0.5s var(--ease); }
.order { display: grid; gap: 14px; }
.order-items { display: grid; gap: 12px; padding: 12px 0; border-block: 1px solid var(--line-2); }

/* Wallet */
.wallet-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 20px; margin-bottom: 20px; }
.balance-card { border-radius: var(--r-xl); padding: clamp(24px, 3vw, 36px); color: #fff; background: radial-gradient(circle at 90% 0, rgb(255 255 255 / 16%), transparent 45%), linear-gradient(135deg, var(--wine), var(--wine-2) 55%, var(--wine-3)); box-shadow: 0 24px 60px rgb(122 33 66 / 30%); display: grid; gap: 22px; align-content: space-between; min-height: 230px; }
.balance-top { display: flex; justify-content: space-between; align-items: center; color: #f0cdd9; font-weight: 600; font-size: 14px; }
.balance-top span:first-child { display: inline-flex; gap: 8px; align-items: center; }
.balance-amt { font-size: clamp(44px, 7vw, 72px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.balance-split { display: flex; gap: 28px; flex-wrap: wrap; }
.balance-split small { display: block; color: #f0cdd9; font-size: 12.5px; }
.balance-split b { font-size: 17px; }
.ledger { display: grid; }
.ledger-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.ledger-row:last-child { border-bottom: 0; }
.ledger-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-2); color: var(--ink-2); flex: none; }
.ledger-ico.ok { background: var(--ok-bg); color: var(--ok); }
.ledger-ico.warn { background: var(--warn-bg); color: var(--warn); }
.pos { color: var(--ok); }
.neg { color: var(--ink); }
.wallet-page .wallet-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.wallet-page .two-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.wallet-page .wallet-grid > *, .wallet-page .two-col > *, .wallet-page .card, .wallet-page .ledger, .wallet-page .ledger-row > .grow { min-width: 0; }
.wallet-page .notice { align-items: flex-start; }
.wallet-page .notice > span { min-width: 0; overflow-wrap: anywhere; }
.wallet-page .notice > .ico { flex-shrink: 0; margin-top: 2px; }
.wallet-page .ledger-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; }
.wallet-page .ledger-row:not(:has(.ledger-ico)) { grid-template-columns: minmax(0, 1fr) auto; }
.wallet-page .ledger-row:not(:has(.ledger-ico)) > button { grid-column: 2; justify-self: end; }
.wallet-page .ledger-row > .mono { white-space: nowrap; font-size: clamp(12px, 1.4vw, 15px); }
.wallet-page .ledger-row .faint { overflow-wrap: anywhere; }
.wallet-page form .input-wrap { min-width: 0; }
.wallet-page .balance-top { flex-wrap: wrap; gap: 10px; }
.wallet-page .balance-amt { overflow-wrap: anywhere; }
.wallet-page .balance-split { gap: 16px 24px; }

@media (max-width: 1080px) {
  .wallet-page .two-col, .wallet-page .wallet-grid { grid-template-columns: minmax(0, 1fr); }
  .two-col, .wallet-grid, .checkout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .pdp-gallery { position: relative; top: auto; }
  .chat-shell { grid-template-columns: 300px 1fr; }
}
@media (max-width: 860px) {
  body.chat-view { overflow: hidden; }
  body.chat-view #appView { position: fixed; top: 60px; left: 0; margin: 0; padding: 0; max-width: none; height: calc(var(--chat-viewport-height, 100dvh) - 60px - 86px - var(--safe-b)); }
  body.chat-view .chat-shell { height: 100%; min-height: 0; grid-template-columns: minmax(0, 1fr); margin: 0; gap: 0; }
  body.chat-view .chat-shell .card { border-radius: 0; border-inline: 0; }
  body.chat-keyboard #appView { height: calc(var(--chat-viewport-height, 100dvh) - 60px); }
  body.chat-keyboard .tabbar { display: none; }
  #app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-brand { display: inline-flex; }
  .topbar { height: 60px; }
  #appView { padding-bottom: calc(96px + var(--safe-b)); }
  .tabbar { position: fixed; z-index: 120; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px; background: rgb(255 255 255 / 90%); backdrop-filter: blur(18px) saturate(1.6); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow-lg); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 8px 0 6px; border-radius: 20px; font-size: 11px; font-weight: 600; color: var(--ink-3); transition: all 0.2s; }
  .tabbar a.active { color: var(--wine); background: var(--blush); }
  .tab-ico { position: relative; display: inline-grid; }
  .tab-ico .count-badge { position: absolute; top: -6px; right: -10px; min-width: 17px; height: 17px; font-size: 10px; }
  .balance-pill span { max-width: 80px; overflow: hidden; text-overflow: ellipsis; }
  .topbar-actions { gap: 8px; }
  .top-orders { padding-inline: 12px; }
  .shop-bag { display: none; }
  .chat-shell { grid-template-columns: 1fr; height: calc(100dvh - 60px - 120px - var(--safe-b)); min-height: 420px; }
  .chat-shell .chat-room { display: none; }
  .chat-shell.has-room .chat-list { display: none; }
  .chat-shell.has-room .chat-room { display: flex; }
  .room-back { display: inline-grid; }
  .pdp { grid-template-columns: 1fr; }
  .pdp-gallery { max-width: 440px; width: 100%; margin-inline: auto; }
  .pdp-media { aspect-ratio: 1 / 1.05; }
  #toasts { bottom: calc(96px + var(--safe-b)); }
  .profile-head { margin-top: -48px; }
  .page-head { margin-bottom: 20px; }
}

/* A separate administrator session uses the public root without exposing the
   member navigation or any ordinary creator-account controls. */
#public.admin-shell .site-header,
#public.admin-shell .site-footer { display: none; }
#public.admin-shell #publicView { min-height: 100vh; padding: 44px max(20px, calc((100vw - 1280px) / 2)); }
@media (max-width: 700px) { #public.admin-shell #publicView { padding: 26px 16px; } }
@media (max-width: 560px) {
  .wallet-page .card-pad { padding: 18px; }
  .wallet-page form.row { flex-wrap: wrap; }
  .wallet-page form .input-wrap { flex-basis: 100%; }
  .wallet-page form > button { width: 100%; }
  .wallet-page .ledger-row > .mono { font-size: 13px; }
  .wallet-page .balance-amt { font-size: clamp(30px, 9vw, 48px); }
  .room-head { padding: 10px 8px; gap: 5px; }
  .room-head .avatar { width: 34px; height: 34px; }
  .room-head .btn-icon { width: 36px; min-width: 36px; padding: 0; }
  .messages { padding: 12px; }
  .top-orders { width: 40px; height: 40px; padding: 0; justify-content: center; }
  .top-orders span { display: none; }
  .toolbar > .grow, .toolbar > .input-wrap { flex: 1 1 100%; max-width: none !important; }
  .grid.creators { grid-template-columns: 1fr; }
  .grid.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product { border-radius: 18px; }
  .product-media { aspect-ratio: 1 / 1; }
  .product-info { padding: 10px 12px 12px; }
  .product-info h3 { font-size: 13.5px; }
  .product-desc { display: none; }
  .product-foot { padding-top: 6px; }
  .product-go { width: 28px; height: 28px; }
  .price { font-size: 15px; }
  .product-cat { left: 8px; top: 8px; font-size: 10px; padding: 2px 8px; }
  .product-photo-count { right: 8px; top: 8px; font-size: 10px; padding: 3px 7px; }
  .form-grid { grid-template-columns: 1fr; }
  .cart-thumb { width: 76px; height: 92px; }
  .profile-head > .grow { min-width: 0; flex-basis: 100%; }
  .profile-actions { width: 100%; flex-wrap: nowrap; }
  .profile-actions .btn:not(.btn-icon) { flex: 1; padding: 0 12px; }
  .profile-head h1 { font-size: 32px !important; }
  .chat-shell { margin-inline: -16px; gap: 0; }
  .chat-shell .card { border-radius: 0; border-inline: 0; }
  .bubble { max-width: 86%; }
  .code-card { flex-direction: column; align-items: flex-start; }
  .state { padding: 40px 12px; }
}

/* Social links */
.social-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card .social-grid { grid-template-columns: 1fr; }
.social-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 20px; background: var(--surface); transition: transform 0.2s var(--ease), box-shadow 0.2s, border-color 0.2s; flex-wrap: wrap; }
.social-card.linked { background: linear-gradient(135deg, #fff, var(--surface-2)); }
.social-card.off { border-style: dashed; background: transparent; }
a.social-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--blush-2); }
.social-ico { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; flex: none; color: #fff; box-shadow: 0 6px 16px rgb(30 21 25 / 14%); }
.social-ico.ig, .social-chip.ig { background: linear-gradient(45deg, #f9a03f, #dd2a7b 50%, #8134af 80%, #515bd4); }
.social-ico.in, .social-chip.in { background: #0a66c2; }
.social-ico.x, .social-chip.x { background: #111; }
.social-card.off .social-ico { background: var(--bg-2); color: var(--ink-3); box-shadow: none; }
.social-name { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.social-handle { display: block; font-size: 13.5px; color: var(--ink-2); max-width: 100%; }
.social-card.off .social-handle { color: var(--ink-3); }
.social-go { color: var(--ink-3); transition: transform 0.2s, color 0.2s; }
a.social-card:hover .social-go { color: var(--wine); transform: translate(2px, -2px); }
.social-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.social-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.social-chip { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; transition: transform 0.2s var(--ease), box-shadow 0.2s; box-shadow: 0 6px 16px rgb(30 21 25 / 16%); }
.social-chip:hover { transform: translateY(-3px) scale(1.05); }
@media (max-width: 560px) {
  .social-actions { width: 100%; min-width: 0; margin-left: 0; }
  .social-actions .btn { flex: 1 1 auto; min-width: 0; }
  .social-card { min-width: 0; }
}

/* Verified seal */
.vbadge { display: inline-flex; vertical-align: -0.18em; color: #1d8cf8; filter: drop-shadow(0 2px 5px rgb(29 140 248 / 40%)); flex: none; }
.vbadge svg { display: block; }

/* Profile hero */
.p-hero { overflow: hidden; border-radius: 32px; }
.p-cover {
  position: relative; height: 210px; overflow: hidden;
  background:
    radial-gradient(circle at 12% 20%, #c24b78 0, transparent 45%),
    radial-gradient(circle at 88% 10%, #e8a4bd 0, transparent 38%),
    linear-gradient(135deg, var(--wine), var(--wine-2) 55%, var(--wine-3));
}
.p-cover::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgb(255 255 255 / 16%) 1.2px, transparent 1.2px); background-size: 18px 18px; mask-image: linear-gradient(120deg, #000 0, transparent 75%); }
.p-cover::after { content: attr(data-code); position: absolute; right: 22px; bottom: 82px; font: 700 clamp(40px, 9vw, 96px)/1 var(--display); letter-spacing: 0.04em; color: rgb(255 255 255 / 16%); white-space: nowrap; pointer-events: none; }
.is-verified .p-cover { background:
    radial-gradient(circle at 12% 20%, #c24b78 0, transparent 45%),
    radial-gradient(circle at 90% 0, #3b8cff 0, transparent 40%),
    linear-gradient(135deg, var(--wine), var(--wine-2) 55%, #2a0b25); }
.p-ribbon { position: absolute; top: 18px; left: 20px; z-index: 1; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 9px; border-radius: 999px; color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: 0.03em; background: rgb(255 255 255 / 16%); backdrop-filter: blur(10px); border: 1px solid rgb(255 255 255 / 30%); }
.p-ribbon .vbadge { filter: none; color: #5db0ff; }
.p-head { display: flex; align-items: flex-end; gap: 22px; padding: 0 clamp(20px, 3.4vw, 40px); margin-top: -70px; position: relative; flex-wrap: wrap; }
.p-avatar { position: relative; flex: none; padding: 5px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); }
.p-avatar .avatar.xl { --s: 124px; border: 0; box-shadow: none; }
.is-verified .p-avatar { background: transparent; box-shadow: none; padding: 6px; }
.is-verified .p-avatar::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, #1d8cf8, #7a2142, #f2b34a, #1d8cf8); animation: ring 8s linear infinite; box-shadow: 0 10px 30px rgb(29 140 248 / 30%); }
.is-verified .p-avatar > .avatar, .is-verified .p-avatar > .avatar-edit { position: relative; border-radius: 50%; box-shadow: 0 0 0 4px #fff; background-clip: padding-box; }
@keyframes ring { to { transform: rotate(360deg); } }
.p-avatar .avatar-edit { display: block; }
.p-avatar .avatar-edit > span { right: auto; left: 2px; bottom: 4px; }
.p-seal { position: absolute; right: -4px; bottom: 2px; width: 38px; height: 38px; display: grid; place-items: center; background: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); z-index: 2; }
.p-seal .vbadge { filter: none; }
.p-id { flex: 1; min-width: 240px; align-self: flex-start; margin-top: 82px; }
.p-name { font-size: clamp(32px, 4.4vw, 46px); line-height: 1.04; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.p-name .vbadge { vertical-align: -0.08em; }
.id-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--bg-2); font-size: 13px; }
.id-chip b { color: var(--wine); letter-spacing: 0.06em; }
.p-actions { gap: 8px; align-self: flex-start; margin-top: 84px; }
.p-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 24px clamp(20px, 3.4vw, 40px) 0; }
.p-stat { display: grid; gap: 2px; justify-items: center; padding: 14px 8px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--line-2); text-align: center; transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s; }
button.p-stat:hover { transform: translateY(-2px); border-color: var(--blush-2); background: var(--blush); }
.p-stat b { font-size: 24px; letter-spacing: -0.02em; line-height: 1.1; }
.p-stat span { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.is-verified .p-stat.static { background: linear-gradient(135deg, #e8f0fd, #f6ecff); border-color: #d3e2fb; }
.is-verified .p-stat.static b { color: #1d6fd8; }
.p-body { display: grid; gap: 18px; padding: 22px clamp(20px, 3.4vw, 40px) 32px; }
.trust { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 22px; flex-wrap: wrap; background: linear-gradient(135deg, #eaf3ff, #f4edff); border: 1px solid #d3e2fb; }
.trust .grow { min-width: 200px; }
.trust-ico { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #1d8cf8, #6a4cff); box-shadow: 0 8px 18px rgb(29 140 248 / 32%); flex: none; }
.trust b { font-size: 15.5px; color: #12315f; }
.trust p { font-size: 13.5px; color: #3b557f; margin-top: 1px; }
.trust.nudge { background: linear-gradient(135deg, var(--blush), #fff6ea); border-color: var(--blush-2); }
.trust.nudge .trust-ico { background: linear-gradient(135deg, var(--wine), #c24b78); box-shadow: 0 8px 18px rgb(122 33 66 / 28%); }
.trust.nudge b { color: var(--wine-2); } .trust.nudge p { color: var(--ink-2); }
.bio { font-size: 17px; line-height: 1.65; max-width: 680px; padding-left: 16px; border-left: 3px solid var(--blush-2); }

/* Reference-inspired profile: editorial cover, floating portrait, icon-first links and gallery. */
.p-reference { overflow: visible; border: 0; background: transparent; box-shadow: none; }
.p-reference .p-cover { height: 238px; border-radius: 32px 32px 0 0; box-shadow: 0 16px 40px rgb(72 15 38 / 16%); }
.p-reference .p-cover::after { bottom: 92px; }
.p-ref-card { position: relative; z-index: 1; margin: -66px 14px 0; padding: 76px clamp(22px, 4vw, 54px) 34px; border: 1px solid var(--line); border-radius: 30px; background: var(--surface); box-shadow: var(--shadow-lg); text-align: center; }
.p-ref-avatar { position: absolute; top: -66px; left: 50%; width: 132px; height: 132px; padding: 5px; transform: translateX(-50%); border-radius: 50%; background: #fff; box-shadow: 0 12px 28px rgb(47 13 27 / 24%); }
.p-ref-avatar .avatar.xl { --s: 122px; border: 0; box-shadow: none; }
.p-ref-avatar .avatar-edit { display: block; }
.p-ref-avatar .avatar-edit > span { left: auto; right: 1px; bottom: 2px; }
.p-ref-avatar .p-seal { right: -8px; bottom: 3px; }
.p-ref-identity { display: grid; justify-items: center; gap: 5px; }
.p-reference .p-name { font-size: clamp(30px, 4vw, 44px); line-height: 1.06; }
.p-ref-code { color: var(--ink-2); font-size: 15px; font-weight: 700; letter-spacing: .015em; }
.p-ref-subline { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.p-ref-bio { max-width: 620px; margin-top: 10px; }
.p-ref-bio .bio { padding: 0; border: 0; text-align: center; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.p-ref-bio .faint { font-size: 14px; }
.p-ref-socials { display: flex; justify-content: center; margin-top: 18px; }
.p-ref-socials .social-chips { justify-content: center; }
.p-ref-socials .social-chip { width: 46px; height: 46px; border-radius: 16px; }
.p-ref-actions { display: flex; justify-content: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.p-ref-actions .btn { min-width: 142px; }
.p-ref-actions .btn-icon { min-width: 46px; }
.p-ref-nudge { margin-top: 20px; text-align: left; }
.p-ref-nudge .trust { box-shadow: none; }
.profile-reference-gallery { display: grid; gap: 14px; margin: 22px auto 0; max-width: 720px; padding: clamp(18px, 3vw, 26px); border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow-sm); }
.profile-reference-gallery .gallery { max-width: none; }
.profile-reference-gallery .gallery-item { border-radius: 16px; }

/* Account profile — mirrors the compact, grouped profile reference on small screens and expands cleanly on web. */
.account-profile-page { max-width: 720px; margin: 0 auto 26px; }
.account-profile-heading { margin-bottom: 14px; }
.account-profile-heading .page-title { margin: 0; }
.account-identity-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 25px; background: linear-gradient(135deg, var(--surface), var(--surface-2)); box-shadow: var(--shadow-sm); }
.account-avatar { display: block; flex: none; }
.account-avatar .avatar.xl { --s: 74px; border: 0; box-shadow: none; }
.account-avatar > span { right: -1px; bottom: 0; }
.account-identity-copy { min-width: 0; }
.account-identity-copy h2 { margin: 0; font-size: clamp(19px, 3vw, 24px); line-height: 1.15; overflow-wrap: anywhere; }
.account-identity-copy > p { margin: 3px 0 5px; color: var(--ink-2); font: 700 12px/1.2 var(--mono); letter-spacing: .055em; }
.account-verified { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 5px 9px; background: var(--ok-bg); color: var(--ok); font-size: 11px; font-weight: 800; }
.account-edit { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 13px; color: var(--wine); background: var(--blush); transition: transform .2s var(--ease), background .2s; }
.account-edit:hover { transform: translateY(-2px); background: var(--blush-2); }
.account-settings-group { margin-top: 24px; }
.account-settings-group > h2 { margin: 0 0 10px 2px; font-size: 15px; letter-spacing: -.01em; }
.account-settings-card { overflow: hidden; border: 1px solid var(--line); border-radius: 23px; background: var(--surface); box-shadow: var(--shadow-sm); }
.account-setting { width: 100%; min-height: 74px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 16px; color: var(--ink); text-align: left; border: 0; border-bottom: 1px solid var(--line-2); background: transparent; transition: background .2s; }
.account-setting:last-child { border-bottom: 0; }
button.account-setting { cursor: pointer; }
.account-setting:hover { background: var(--surface-2); }
.account-setting-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; background: var(--blush); color: var(--wine); }
.account-setting > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.account-setting b { font-size: 14px; }
.account-setting small { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-setting > svg { color: var(--ink-3); }
.visibility-control, .consent-check { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.visibility-control { padding: 11px 12px; margin: 0 0 14px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface-2); cursor: pointer; }
.visibility-control input, .consent-check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--wine); flex: none; }
.visibility-control span { display: grid; gap: 2px; }
.visibility-control b { color: var(--ink); font-size: 13px; }
.visibility-control small { color: var(--ink-3); font-size: 12px; }
.consent-check { padding: 2px 1px; }
.consent-check a { color: var(--wine); font-weight: 700; text-decoration: underline; }
.traffic-bars { min-height: 118px; display: flex; align-items: end; gap: 9px; padding: 10px 8px 0; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface-2); }
.traffic-bar { flex: 1; min-width: 0; display: grid; justify-items: center; align-items: end; gap: 4px; }
.traffic-bar i { width: min(100%, 28px); min-height: 4px; border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg, var(--wine-2), var(--wine)); }
.traffic-bar-value { min-height: 16px; color: var(--ink-2); font-size: 11px; }
.traffic-bar small { margin-bottom: 7px; color: var(--ink-3); font-size: 10px; }
.admin-users-table { min-width: 760px; }
.admin-user-row { display: grid; grid-template-columns: 120px minmax(140px, 1fr) minmax(200px, 1.3fr) 90px 150px; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.admin-user-row:last-child { border-bottom: 0; }
.admin-user-row.head { color: var(--ink-3); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; background: var(--surface-2); }
.admin-user-row > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
@media (max-width: 760px) { .admin-users-table { overflow-x: auto; } }

/* Visitor profile uses the same simple identity card; chat is deliberately its only action. */
.visitor-profile-page { max-width: 720px; margin-inline: auto; }
.visitor-profile-card { display: grid; justify-items: center; gap: 9px; padding: 38px clamp(20px, 5vw, 48px) 30px; border: 1px solid var(--line); border-radius: 30px; background: linear-gradient(160deg, var(--surface), var(--surface-2)); box-shadow: var(--shadow); text-align: center; }
.visitor-avatar { position: relative; padding: 5px; border-radius: 50%; background: #fff; box-shadow: 0 12px 26px rgb(47 13 27 / 18%); }
.visitor-avatar .avatar.xl { --s: 104px; border: 0; box-shadow: none; }
.visitor-avatar .p-seal { right: -8px; bottom: 0; }
.visitor-profile-copy { min-width: 0; }
.visitor-profile-copy h1 { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 6px 0 0; font: 700 clamp(26px, 4vw, 38px)/1.12 var(--display); letter-spacing: -.025em; overflow-wrap: anywhere; }
.visitor-profile-copy h1 .vbadge { vertical-align: initial; }
.visitor-profile-copy > p { margin: 5px 0 0; color: var(--ink-2); font: 700 12px/1.2 var(--mono); letter-spacing: .06em; }
.visitor-bio { max-width: 540px; margin-top: 12px; color: var(--ink-2); font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.visitor-socials { margin-top: 9px; }
.visitor-socials .social-chips { justify-content: center; }
.visitor-message { min-width: min(100%, 250px); margin-top: 12px; }

/* Discover, profile unlock and conversation surfaces. */
.discover-reference { max-width: 760px; margin: auto; }
.discover-reference .toolbar { padding: 10px; border: 1px solid var(--line); border-radius: 20px; background: #fbf7ef; }
.discover-reference .grid.creators { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 4px 16px; border: 1px solid var(--line); border-radius: 22px; background: #fbf7ef; }
.discover-list-title { margin: 22px 4px 10px; font-size: 16px; }
.discover-reference .creator { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 13px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.discover-reference .creator:last-child { border-bottom: 0; }
.discover-reference .creator:hover { transform: none; box-shadow: none; }
.discover-reference .creator .avatar { --s: 52px; width: 52px; height: 52px; }
.discover-reference .creator-main h3 { font-size: 14px; }
.discover-reference .creator-main .faint { font-size: 12px; }
.discover-reference .creator-foot { width: auto; margin: 0; }
.discover-reference .creator-foot .btn { flex: none; }
.discover-reference .creator-save { position: static; width: 34px; height: 34px; }
.locked-reference { max-width: 720px; margin-inline: auto; }
.locked-cover { height: 180px; border-radius: 30px 30px 0 0; background: linear-gradient(135deg, #6b2639, #19090d); }
.locked-reference-card { position: relative; margin: -44px 12px 0; padding: 64px 24px 30px; border: 1px solid var(--line); border-radius: 28px; background: #fbf7ef; box-shadow: var(--shadow); text-align: center; }
.locked-reference-avatar { position: absolute; top: -46px; left: 50%; display: grid; place-items: center; width: 92px; height: 92px; transform: translateX(-50%); border: 4px solid #fbf7ef; border-radius: 50%; color: #fff; background: #2b2021; }
.locked-reference-card h1 { font-size: 28px; }
.locked-description { max-width: 400px; margin: 16px auto 20px; color: var(--ink-2); }
.unlock-reference-overlay .dialog { background: #faf6ec; }
.unlock-grip { width: 42px; height: 4px; margin: -10px auto 18px; border-radius: 5px; background: #cfc9c0; }
.unlock-price { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.unlock-price > div:first-child { display: grid; }
.unlock-price strong { font-size: 29px; }
.unlock-price span { font-size: 13px; }
.unlock-code { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 18px; color: #fff; background: var(--wine); }
.unlock-split { display: grid; grid-template-columns: 1fr 1fr; margin-top: 18px; border-radius: 18px; background: #f2e5d0; }
.unlock-split > div { display: grid; gap: 4px; justify-items: center; padding: 16px; text-align: center; }
.unlock-split > div + div { border-left: 1px solid #ddcdb7; }
.unlock-split b { font-size: 23px; color: var(--wine); }
.unlock-split span { font-size: 12px; }
.chat-room .room-head, .chat-room .composer { color: #fff; background: #171113; border-color: #34262b; }
.chat-room .room-head a, .chat-room .room-head button { color: #fff; }
.chat-room .messages { background: #120e10; }
.chat-room .day { color: #c7bbb9; }
.chat-room .bubble { background: #f8f6f2; border-color: #f8f6f2; color: #251a1d; }
.chat-room .bubble.mine { background: #f2e3cc; border-color: #f2e3cc; color: #251a1d; }
.chat-room .message-receipt { color: #7c6d66; }
.chat-room .message-receipt.is-read { color: #1686bd; }
.chat-safety-note { display: flex; gap: 9px; align-items: flex-start; padding: 12px; margin-bottom: 12px; border-radius: 12px; background: #2b2223; color: #f2ebe3; font-size: 12px; }
.chat-safety-note svg { color: #e9cdb1; flex: none; }
.chat-room .composer { position: relative; }
.chat-room .composer textarea { color: #fff; background: #302729; border-color: #403436; }
.chat-room .composer textarea:focus { background: #302729; }
.composer-emoji { width: 40px; height: 44px; flex: none; display: grid; place-items: center; color: #e9d7c0; }
.emoji-picker { position: absolute; bottom: calc(100% + 8px); left: 12px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 8px; border: 1px solid #51464a; border-radius: 15px; background: #302729; box-shadow: var(--shadow-lg); }
.emoji-picker[hidden] { display: none; }
.emoji-picker button { width: 38px; height: 38px; border-radius: 10px; font-size: 22px; }
.emoji-picker button:hover { background: #51464a; }
.wallet-page .balance-card { background: radial-gradient(circle at 90% 0, #6b2639, transparent 45%), linear-gradient(135deg, #211317, #110d0f); }
.wallet-page .balance-amt { color: #f3dfc3; }
.wallet-page .ledger-ico.ok { background: #f3e6d2; color: var(--wine); }

/* The conversation owns the viewport; the list retains site navigation. */
body.chat-room-view .topbar, body.chat-room-view .tabbar { display: none; }
body.chat-room-view #appView { padding-top: 0; }
body.chat-room-view .chat-shell { height: calc(var(--chat-viewport-height, 100dvh) - 12px); }
.chat-list { background: radial-gradient(circle at 100% 0, #6b2639, transparent 48%), linear-gradient(135deg, #211317, #110d0f); color: #fff; border-color: #352127; }
.chat-list-title { display: flex; align-items: center; gap: 10px; }
.chat-shop-back { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #f5e5d0; background: rgb(255 255 255 / 8%); }
.chat-list .input { color: #fff; background: #302226; border-color: #5a3b43; }
.chat-list .input::placeholder { color: #c4b4b4; }
.chat-list .input-wrap > .ico { color: #dbc7c2; }
.chat-list .convo:hover, .chat-list .convo.active { background: rgb(255 255 255 / 10%); }
.chat-list .convo .muted, .chat-list .convo .faint, .chat-list .state p { color: #d1bdba; }
.chat-room .room-head, .chat-room .composer { background: linear-gradient(115deg, #3b1824, #171013 72%); }
.chat-room .messages { background: radial-gradient(circle at 100% 0, #45202b, transparent 45%), linear-gradient(135deg, #211317, #110d0f); }
@media (max-width: 640px) {
  .p-reference .p-cover { height: 184px; border-radius: 24px 24px 0 0; }
  .p-reference .p-cover::after { right: 14px; bottom: 62px; font-size: 38px; }
  .p-ref-card { margin: -52px 0 0; padding: 62px 18px 24px; border-radius: 25px; }
  .p-ref-avatar { top: -53px; width: 106px; height: 106px; }
  .p-ref-avatar .avatar.xl { --s: 96px; }
  .p-reference .p-name { font-size: 30px; }
  .p-ref-actions { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
  .p-ref-actions .btn { min-width: 0; padding-inline: 12px; }
  .account-profile-page .p-ref-actions { display: flex; justify-content: center; }
  .account-profile-page .p-ref-actions .btn { flex: 0 1 auto; min-width: 156px; }
  .profile-reference-gallery { margin-top: 16px; border-radius: 22px; padding: 14px; }
  .account-profile-page { margin-bottom: 18px; }
  .account-identity-card { padding: 14px; border-radius: 21px; gap: 11px; }
  .account-avatar .avatar.xl { --s: 62px; }
  .account-setting { min-height: 68px; padding-inline: 13px; }
  .account-setting-icon { width: 35px; height: 35px; border-radius: 11px; }
  .visitor-profile-card { padding: 28px 18px 23px; border-radius: 24px; }
  .visitor-avatar .avatar.xl { --s: 88px; }
  .discover-reference .creator { grid-template-columns: 42px minmax(0, 1fr) auto auto; gap: 8px; }
  .discover-reference .creator .avatar { width: 42px; height: 42px; }
  .discover-reference .creator-foot .btn { min-height: 34px; padding: 0 10px; }
}
@media (max-width: 640px) {
  .p-cover { height: 150px; }
  .p-cover::after { right: 14px; bottom: 62px; font-size: 34px; }
  .p-head { margin-top: -62px; flex-direction: column; align-items: flex-start; gap: 14px; }
  .p-avatar .avatar.xl { --s: 104px; }
  .p-id { min-width: 0; width: 100%; margin-top: 0; }
  .p-actions { width: 100%; flex-wrap: nowrap; margin-top: 0; }
  .trust .social-chips { width: 100%; padding-left: 62px; }
  .p-actions .btn:not(.btn-icon) { flex: 1; padding: 0 12px; }
  .p-stats { gap: 8px; }
  .p-stat b { font-size: 20px; }
  .p-stat { padding: 12px 4px; }
}

@media (max-width: 860px) {
  body.chat-room-view #appView { top: 0; height: var(--chat-viewport-height, 100dvh); padding: 0; }
  body.chat-room-view .chat-shell { height: 100%; }
  body.chat-room-view .composer { padding-bottom: max(12px, var(--safe-b)); }
}
