/* Marketplace UI shares the site's white, charcoal and red identity. */
.marketplace-login-help { padding:18px; border:1px solid #e4e8ee; border-radius:12px; background:#fff; font-size:13px; }
.marketplace-login-help p { margin:8px 0 12px; color:#687487; line-height:1.6; }
.marketplace-public-grid { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; align-items: stretch; }
.marketplace-public-grid > .marketplace-empty { grid-column: 1 / -1; }
.marketplace-public-identity { display:grid; grid-template-columns:72px minmax(0,1fr); align-items:center; gap:15px; min-width:0; }
.marketplace-public-identity > div { min-width:0; }
.marketplace-card .marketplace-public-identity h3 { margin:0 0 5px; color:#202936; font-size:18px; line-height:1.25; overflow-wrap:anywhere; }
.marketplace-card .marketplace-public-identity h3 a { color:inherit; text-decoration:none; }
.marketplace-card .marketplace-public-identity h3 a:hover { color:#ba2743; }
.marketplace-card .marketplace-public-identity p { margin:0; color:#687487; font-size:13px; line-height:1.45; overflow-wrap:anywhere; }
.marketplace-public-avatar { flex:0 0 72px; width:72px; height:72px; aspect-ratio:1; display:grid; place-items:center; overflow:hidden; object-fit:cover; object-position:center; border-radius:18px; background:#fae9ed; color:#aa1933; font-size:20px; font-weight:750; }
.marketplace-skill-list { display:flex; flex-wrap:wrap; align-content:flex-start; gap:7px; min-height:38px; margin:14px 0 18px; }
.marketplace-skill-list span { display:inline-flex; align-items:center; gap:6px; max-width:100%; padding:6px 10px; border:1px solid #e6eaf0; border-radius:8px; color:#647085; font-size:11px; line-height:1.3; overflow-wrap:anywhere; }
.marketplace-skill-list :is(img,svg) { width:20px; height:20px; flex:0 0 20px; object-fit:contain; }
.marketplace-expert-card { display:flex; flex-direction:column; min-height:390px; padding:24px; }
.marketplace-expert-card > .marketplace-eyebrow,
.marketplace-expert-card > .marketplace-sponsored-label { min-height:14px; margin:0 0 18px; }
.marketplace-expert-card > p:not(.marketplace-eyebrow):not(.marketplace-sponsored-label) { margin:14px 0 0; color:#687487; font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
.marketplace-expert-card .marketplace-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; margin-top:auto; padding-top:18px; }
.marketplace-expert-card .marketplace-actions .marketplace-button { width:100%; min-width:0; min-height:38px; padding:8px 12px; border-radius:8px; font-size:12px; font-weight:650; letter-spacing:.01em; white-space:nowrap; transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease; }
.marketplace-expert-card .marketplace-actions .marketplace-button:hover { transform:translateY(-1px); box-shadow:0 5px 12px rgba(28,43,66,.09); }
.marketplace-expert-card .marketplace-actions .marketplace-button.is-primary:hover { box-shadow:0 6px 14px rgba(201,28,59,.2); }
.expert-card-flippable {
  cursor: pointer;
  transform-style: preserve-3d;
  will-change: transform;
}
.expert-card-flippable:focus-visible {
  outline: 2px solid #ef1118;
  outline-offset: 4px;
}
.expert-card-flippable.is-flipping {
  pointer-events: none;
  animation: expert-card-flip .52s cubic-bezier(.4, .05, .2, 1);
}
@keyframes expert-card-flip {
  0% { transform: perspective(900px) rotateY(0deg); }
  50% { transform: perspective(900px) rotateY(180deg); }
  100% { transform: perspective(900px) rotateY(360deg); }
}
.marketplace-profile-layout { display:grid; grid-template-columns:minmax(240px, .8fr) minmax(0, 1.4fr); gap:24px; margin-top:24px; align-items:start; }
.marketplace-profile-cover { height:190px; background:linear-gradient(110deg,#fbe8ed,#eef2f8); border-radius:18px 18px 0 0; overflow:hidden; }
.marketplace-profile-cover img { width:100%; height:100%; object-fit:cover; }
.marketplace-public-head { border-radius:0 0 18px 18px; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:20px; }
.marketplace-public-head h1 { margin:0; font-size:32px; line-height:1.2; color:#253044; }
.marketplace-public-head .marketplace-public-avatar { width:88px; height:88px; flex-basis:88px; font-size:26px; }
.marketplace-profile-layout dt { color:#788397; font-size:12px; margin-top:18px; }
.marketplace-profile-layout dd { margin:5px 0; color:#364257; font-size:14px; }
.marketplace-gallery { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:16px; }
.marketplace-gallery img { width:100%; max-height:460px; object-fit:contain; background:#f1f4f7; border:1px solid #e4e8ef; border-radius:14px; }
.marketplace-preserve-lines { white-space:pre-wrap; overflow-wrap:anywhere; }
.marketplace-card, .marketplace-public-head { overflow-wrap:anywhere; }
@media(max-width:950px){.marketplace-public-grid {grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:650px){.marketplace-public-grid,.marketplace-profile-layout {grid-template-columns:minmax(0,1fr);}.marketplace-public-head h1 {font-size:25px;}.marketplace-profile-cover{height:130px;}.marketplace-expert-card{min-height:350px;padding:22px;}}
@media (prefers-reduced-motion: reduce) {
  .expert-card-flippable.is-flipping { animation: none; }
}
.marketplace-page { background: #f7f8fa; color: #202936; }
.marketplace-shell { max-width: 1240px; margin: auto; padding: 32px 28px 72px; }
.marketplace-breadcrumb { display: flex; gap: 12px; color: #697587; font-size: 12px; margin-bottom: 26px; }
.marketplace-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 28px; }
.marketplace-eyebrow { color: #bd203d; font-size: 10px; letter-spacing: .13em; font-weight: 700; margin: 0 0 10px; }
.marketplace-heading h1 { margin: 0; font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -.04em; line-height: 1.2; }
.marketplace-heading p:not(.marketplace-eyebrow) { margin: 10px 0 0; color: #677386; font-size: 14px; line-height: 1.6; }
.marketplace-tabs { display: flex; gap: 8px 24px; flex-wrap: wrap; border-bottom: 1px solid #e0e5ec; margin-bottom: 28px; }
.marketplace-tabs a { display: inline-flex; padding: 15px 0; color: #687487; font-size: 13px; font-weight: 600; border-bottom: 2px solid transparent; }
.marketplace-tabs a[aria-current] { color: #202936; border-color: #c71b39; }
.marketplace-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 42px; padding: 10px 16px; border: 1px solid #dce1e8; border-radius: 9px; background: #fff; color: #364257; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.5; }
.marketplace-button:hover { border-color: #ba2743; color: #ba2743; }
.marketplace-button.is-primary { background: #c91c3b; border-color: #c91c3b; color: #fff; }
.marketplace-button:disabled { background: #f2f4f7; color: #778394; border-color: #e4e7ec; cursor: not-allowed; }
.marketplace-button:focus-visible, .marketplace-tabs a:focus-visible { outline: 2px solid #ba2743; outline-offset: 4px; }
.marketplace-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.marketplace-grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.marketplace-card { min-width: 0; padding: 26px; border: 1px solid #e5e8ee; border-radius: 16px; background: #fff; box-shadow: 0 4px 16px #25304404; }
.marketplace-card h2 { margin: 0 0 10px; font-size: 21px; line-height: 1.4; letter-spacing: -.025em; }
.marketplace-card h3 { margin: 0 0 10px; font-size: 16px; }
.marketplace-card p, .marketplace-card li { font-size: 13px; line-height: 1.7; color: #657186; }
.marketplace-card ul { padding-left: 18px; margin: 18px 0 24px; }
.marketplace-card .marketplace-price { color: #202936; font-size: 25px; font-weight: 650; letter-spacing: -.035em; margin: 18px 0 4px; }
.marketplace-muted { color: #697587; font-size: 12px; line-height: 1.6; }
.marketplace-note, .marketplace-service-notice { margin: 0 0 22px; padding: 16px 20px; border: 1px solid #ecdfc5; border-radius: 10px; background: #fffaf0; color: #795b27; font-size: 13px; line-height: 1.65; }
.marketplace-service-notice a { font-weight: 700; text-decoration: underline; }
.marketplace-service-notice { max-width: 1184px; margin: 18px auto; }
.marketplace-card label { display: grid; gap: 8px; margin: 16px 0; font-size: 12px; font-weight: 600; }
.marketplace-card input, .marketplace-card textarea, .marketplace-card select { width: 100%; min-height: 44px; padding: 11px 13px; border: 1px solid #dce2e9; border-radius: 8px; color: #28354a; background: #fff; font: inherit; font-size: 14px; }
.marketplace-card textarea { resize: vertical; line-height: 1.6; }
.marketplace-card :is(input,textarea,select):focus-visible { outline: 2px solid #c72a48; outline-offset: 2px; }
.marketplace-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.marketplace-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.marketplace-list { display: grid; gap: 16px; }
.marketplace-badge { display: inline-flex; padding: 5px 9px; border-radius: 6px; background: #f1f3f7; color: #647085; font-size: 11px; font-weight: 600; }
.marketplace-badge.is-pending { color: #896427; background: #fff5da; }
.marketplace-badge.is-live { color: #197653; background: #eaf7f0; }
.marketplace-empty { text-align: center; padding: 44px 24px; }
.marketplace-empty p { max-width: 520px; margin: 10px auto 22px; }
.marketplace-thumb { width: 100%; height: 190px; object-fit: contain; background: #f4f6f9; border-radius: 10px; margin-bottom: 18px; }
.marketplace-pipeline { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 24px; color: #687487; font-size: 12px; align-items: center; }
.marketplace-pipeline strong { color: #b8203c; }
.marketplace-lock { display: inline-flex; padding: 9px 12px; border-radius: 8px; background: #f9eef1; color: #a82a43; font-size: 12px; font-weight: 600; }
.marketplace-chat-locked { display: grid; gap: 9px; padding: 18px 26px 22px; border-top: 1px solid #f0d9df; background: linear-gradient(135deg,#fff 0%,#fff8f9 100%); }
.marketplace-chat-locked p { margin: 0; color: #687487; font-size: 13px; }
.marketplace-chat-locked .marketplace-button { margin: 8px 8px 0 0; }
.marketplace-chat-layout { display: grid; grid-template-columns: minmax(250px,.66fr) minmax(0,1.34fr); gap: 20px; align-items: start; }
.marketplace-inbox-list { min-height: 430px; }
.marketplace-inbox-people, .marketplace-inbox-threads { display: grid; gap: 6px; margin-top: 14px; }
.marketplace-inbox-people:empty { display: none; }
.marketplace-inbox-label { margin: 8px 0 2px; color: #8b95a6; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.marketplace-people-search input { width: 100%; margin: 14px 0 0; }
.marketplace-person-row { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 9px 10px; border: 1px solid transparent; border-radius: 12px; color: #253044; text-decoration: none; }
.marketplace-person-row:hover { background: #f7f9fc; border-color: #e6eaf0; }
.marketplace-person-row[aria-current="true"] { background: #fff0f3; border-color: #efc3cc; }
.marketplace-person-copy { min-width: 0; }
.marketplace-person-row b { display: block; font-size: 13.5px; }
.marketplace-person-row small { display: block; color: #687487; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marketplace-chat-avatar { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #fae9ed; color: #aa1933; font-size: 13px; font-weight: 700; }
.marketplace-chat-avatar.is-large { flex-basis: 52px; width: 52px; height: 52px; font-size: 17px; }
.marketplace-chat-avatar.is-large img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.marketplace-chat-peer { display: flex; align-items: center; gap: 12px; min-width: 0; }
.marketplace-chat-start { margin: 0; color: #8b95a6; font-size: 12.5px; text-align: center; }
.marketplace-contact-enquiry { margin-top: 20px; }
.marketplace-people-grid { align-items: stretch; }
.marketplace-person-card { display: flex; flex-direction: column; gap: 14px; }
.marketplace-person-card { min-height: 228px; padding: 22px; border-color: #e3e8f0; border-radius: 18px; background: linear-gradient(145deg, #fff 0%, #fbfcfe 72%, #fff8f9 100%); box-shadow: 0 10px 26px rgba(39,53,75,.07), inset 0 1px 0 #fff; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.marketplace-person-card:hover { transform: translateY(-2px); border-color: #ead0d6; box-shadow: 0 14px 30px rgba(39,53,75,.1), inset 0 1px 0 #fff; }
.marketplace-person-card .marketplace-badge { align-self: flex-start; }
.marketplace-person-identity { display: flex; align-items: center; gap: 13px; min-width: 0; }
.marketplace-person-identity > div { min-width: 0; }
.marketplace-person-identity h3 { margin: 3px 0 0; color: #202936; font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
.marketplace-person-identity p { margin: 5px 0 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.marketplace-person-type { color: #9a5362; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.marketplace-person-card.is-client-card .marketplace-chat-avatar.is-large { flex-basis: 60px; width: 60px; height: 60px; border: 1px solid #f1dce1; border-radius: 18px; background: linear-gradient(145deg, #fff1f3, #f9e5ea); color: #a91d39; font-size: 16px; box-shadow: inset 2px 2px 5px rgba(255,255,255,.95), 0 5px 12px rgba(94,42,56,.08); }
.marketplace-person-card.is-freelancer-card .marketplace-person-type { color: #687b9a; }
.marketplace-person-card .marketplace-actions { margin-top: auto; }
.marketplace-person-card .marketplace-actions .marketplace-button { flex: 1 1 130px; min-height: 42px; }
@media (max-width: 650px) { .marketplace-person-card { min-height: 206px; padding: 19px; } .marketplace-person-card .marketplace-actions { gap: 8px; } .marketplace-person-card .marketplace-actions .marketplace-button { flex-basis: 110px; padding-inline: 10px; } }
.marketplace-chat-window, .expert-floating-chat { --chat-accent: #68717d; --chat-accent-soft: #f1f3f5; --chat-accent-ink: #4f5965; }
.marketplace-chat-window { padding: 0; overflow: hidden; }
.marketplace-chat-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid #eef1f5; background: #fff; }
.marketplace-chat-header h2 { margin: 0 0 2px; font-size: 17px; }
.marketplace-chat-header .marketplace-chat-avatar { border-radius: 50%; }
.marketplace-chat-thread { display: flex; flex-direction: column; gap: 6px; min-height: 260px; max-height: 520px; overflow-y: auto; padding: 18px 20px 10px; background: #fff; }
.marketplace-chat-day { display: flex; align-items: center; gap: 12px; margin: 12px 0 6px; color: #8a93a0; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.marketplace-chat-day::before, .marketplace-chat-day::after { content: ''; height: 1px; flex: 1; background: #e6eaf0; }
.marketplace-chat-bubble { align-self: flex-start; max-width: 78%; }
.marketplace-chat-bubble header { display: flex; align-items: center; gap: 7px; margin: 0 0 4px 2px; color: #7d879a; font-size: 11px; }
.marketplace-chat-bubble header b { color: #2b3648; font-size: 12px; }
.marketplace-chat-bubble p { margin: 0; padding: 9px 15px; border-radius: 18px 18px 18px 6px; background: #f1f3f6; color: #1c2637; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.marketplace-chat-bubble.is-mine { align-self: flex-end; }
.marketplace-chat-bubble.is-mine p { border-radius: 18px 18px 6px 18px; background: var(--chat-accent); color: #fff; }
.marketplace-chat-avatar.is-tiny { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; background: var(--chat-accent-soft); color: var(--chat-accent-ink); font-size: 10px; }
.marketplace-chat-start { margin: 10px 0; color: #8b95a6; font-size: 12.5px; text-align: center; }
.marketplace-chat-quick { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 12px; }
.marketplace-chat-quick button { min-height: 34px; padding: 6px 14px; border: 2px solid var(--chat-accent); border-radius: 999px; background: #fff; color: var(--chat-accent-ink); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.marketplace-chat-quick button:hover { background: var(--chat-accent-soft); }
.marketplace-chat-composer { display: grid; gap: 8px; padding: 14px 20px 16px; border-top: 6px solid #edf0f4; background: #fff; }
.marketplace-chat-composer textarea { width: 100%; min-height: 62px; margin: 0; resize: none; padding: 14px 16px; border: 0; border-radius: 14px; background: #f3f1ee; color: #243149; font: inherit; font-size: 14px; }
.marketplace-chat-composer textarea:focus-visible { outline: 2px solid #9aa2ac; outline-offset: 2px; }
.marketplace-chat-tools { display: grid; grid-template-columns: repeat(4, 30px) 1fr auto; align-items: center; gap: 7px; }
.marketplace-chat-tool { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #3d3f43; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.marketplace-chat-tool:hover { background: #eef2f6; }
.marketplace-chat-composer [type="submit"] { min-width: 78px; min-height: 36px; margin: 0; padding: 8px 16px; border: 0; border-radius: 999px; background: #e5e7ea; color: #a0a2a5; font-size: 12px; font-weight: 800; }
.marketplace-chat-composer textarea:not(:placeholder-shown) + .marketplace-chat-tools [type="submit"] { background: var(--chat-accent); color: #fff; }
.marketplace-chat-composer [data-form-status] { min-height: 14px; margin: 0; color: #4b5d77; font-size: 10.5px; }
.marketplace-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.marketplace-message { border-bottom: 1px solid #e7ebf0; padding: 16px 0; }
.marketplace-message:last-child { border-bottom: 0; }
.marketplace-message p { white-space: pre-wrap; overflow-wrap: anywhere; }
.marketplace-message small { color: #7a8596; }
#marketplace-status { color: #a5243f; font-size: 13px; line-height: 1.65; }
.marketplace-footer { max-width: 1184px; margin: auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; border-top: 1px solid #e2e7ed; padding: 24px; color: #687487; font-size: 12px; }
.marketplace-workspace-tools { display: flex; gap: 10px; flex-wrap: wrap; padding: 18px 0; }
.marketplace-workspace-tools.is-freelancer-tools { display: grid; justify-items: start; gap: 10px; }
.marketplace-workspace-primary-actions, .marketplace-workspace-secondary-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.marketplace-workspace-secondary-actions { justify-self: start; }
.marketplace-workspace-tools .marketplace-button { font-size: 12px; }
.marketplace-profile-status { margin: 16px 0; padding: 15px 18px; border: 1px solid #e4e8ee; background: #fff; border-radius: 12px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; font-size: 12px; color: #606d80; }
.marketplace-software-details { margin-top: 26px; }
.marketplace-software-details ul { padding-left: 20px; }
.marketplace-software-details p { white-space: pre-line; }
.marketplace-sponsored { padding: 18px 0; }
.marketplace-sponsored-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.marketplace-sponsored .marketplace-card p { margin: 8px 0; }
.marketplace-sponsored-label { color: #786650; font-size: 10px; font-weight: 600; }
.boost-placement-card { display: grid; grid-template-columns: minmax(0,1fr) minmax(230px,.55fr); align-items: end; gap: 20px; margin-bottom: 18px; }
.boost-placement-card h2, .boost-checkout-summary h2 { margin: 0; }
.boost-placement-card .marketplace-muted { margin: 6px 0 0; }
.boost-plan-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: stretch; gap: 16px; }
.boost-plan-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid #e1e6ee; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.boost-plan-card.is-selected { border-color: #e11d35; box-shadow: 0 0 0 2px rgba(225,29,53,.12), 0 16px 34px rgba(28,39,59,.08); transform: translateY(-2px); }
.boost-plan-card h2 { margin: 2px 0 0; font-size: 20px; }
.boost-plan-price { margin: 8px 0 0; color: #1b263b; font-size: 32px; font-weight: 850; letter-spacing: -.04em; }
.boost-plan-card > .marketplace-muted { min-height: 32px; margin: 3px 0 12px; }
.boost-benefits { display: grid; gap: 9px; margin: 0 0 20px; padding: 15px 0 0; border-top: 1px solid #e8ecf2; list-style: none; }
.boost-benefits li { position: relative; padding-left: 23px; color: #4e5a6d; font-size: 12px; line-height: 1.45; }
.boost-benefits li::before { content: '✓'; position: absolute; left: 0; top: 0; color: #1c9a6b; font-weight: 900; }
.boost-plan-select { width: 100%; margin-top: auto; }
.boost-checkout-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; border-color: #e5e8ee; background: linear-gradient(110deg,#fff,#f8f9fb); }
.boost-checkout-summary .marketplace-muted { margin: 6px 0 0; }
.boost-checkout-summary [disabled] { cursor: not-allowed; opacity: .68; }
.boost-preview-grid { margin-top: 18px; }
.boost-placement-preview, .boost-benefit-summary { min-height: 190px; }
.boost-placement-preview h2, .boost-benefit-summary h2 { margin: 10px 0 7px; }
.boost-placement-preview .marketplace-sponsored-label { display: inline-flex; margin-top: 8px; padding: 6px 9px; border-radius: 999px; background: #f5f1e8; }
@media (max-width: 780px) { .boost-plan-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 560px) { .boost-plan-grid { grid-template-columns: minmax(0,1fr); } .boost-placement-card { grid-template-columns: 1fr; } .boost-checkout-summary { align-items: flex-start; flex-direction: column; } }
@media (max-width: 780px) { .marketplace-grid.three, .marketplace-sponsored-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 700px) { .marketplace-chat-layout { grid-template-columns: minmax(0,1fr); } .marketplace-inbox-list { min-height: auto; } }
@media (max-width: 560px) { .marketplace-shell { padding: 22px 16px 40px; } .marketplace-grid, .marketplace-grid.three, .marketplace-sponsored-grid { grid-template-columns: minmax(0,1fr); } .marketplace-card { padding: 22px; } .marketplace-tabs { gap: 0 18px; } .marketplace-tabs a { font-size: 12px; } .marketplace-card input, .marketplace-card textarea, .marketplace-card select { font-size: 16px; } .marketplace-chat-header, .marketplace-chat-thread, .marketplace-chat-composer, .marketplace-chat-locked { padding-left: 18px; padding-right: 18px; } .marketplace-chat-composer { grid-template-columns: minmax(0,1fr); } .marketplace-chat-bubble { max-width: 92%; } }
@media (max-width: 560px) {
  .marketplace-tabs {
    flex-wrap: nowrap;
    gap: 0 20px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }
  .marketplace-tabs a {
    flex: 0 0 auto;
    min-height: 46px;
    align-items: center;
    white-space: nowrap;
    scroll-snap-align: start;
  }
}

/* Floating chat drawer: shared by every page that loads marketplace-public.js. */
.expert-floating-chat {
  position: fixed;
  z-index: 50;
  right: 24px;
  bottom: 24px;
  width: min(370px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 32px));
  max-height: min(620px, calc(100vh - 32px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .95);
  border-radius: 20px;
  background: #f8fbff;
  box-shadow: 0 18px 42px rgba(25, 36, 58, .2), -7px -7px 18px rgba(255, 255, 255, .94);
}
.expert-floating-chat.is-minimized { max-height: 76px; }
.expert-floating-chat.is-minimized .expert-floating-body { display: none; }
.expert-floating-chat.is-locked { height: auto; }
.expert-floating-chat.is-expanded { width: min(520px, calc(100vw - 32px)); height: min(720px, calc(100vh - 32px)); }

.expert-floating-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-height: 56px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #19243a, #2d3e5d);
  color: #fff;
}
.expert-floating-person { display: flex; align-items: center; min-width: 0; gap: 10px; }
.expert-floating-avatar { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; overflow: hidden; border: 2px solid rgba(255,255,255,.68); border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 12px; font-weight: 800; }
.expert-floating-avatar img { width: 100%; height: 100%; object-fit: cover; }
.expert-floating-presence { display: flex; align-items: center; gap: 6px; }
.expert-floating-presence i { width: 6px; height: 6px; border-radius: 50%; background: #5be0a1; box-shadow: 0 0 0 3px rgba(91,224,161,.15); }
.expert-floating-header-actions { display: flex; align-items: center; gap: 6px; }

.expert-floating-header .marketplace-eyebrow { margin: 0; color: #ffb1b7; }
.expert-floating-header h2 { margin: 0; overflow: hidden; color: #fff; font-size: 16px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.expert-floating-header p:last-child { margin: 0; color: #d2dbea; font-size: 11px; }
.expert-floating-minimize,
.expert-floating-expand,
.expert-floating-close { width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255,255,255,.13); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.expert-floating-minimize { padding-bottom: 5px; font-size: 20px; }
.expert-floating-expand { padding-bottom: 4px; font-size: 17px; }
.expert-floating-body { display: flex; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; padding: 14px; }
.expert-floating-thread { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 9px; overflow: auto; padding: 2px 1px 12px; }
.expert-floating-day { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; color: #697385; font-size: 10px; font-weight: 800; letter-spacing: .16em; white-space: nowrap; }
.expert-floating-day::before, .expert-floating-day::after { content: ''; height: 1px; flex: 1; background: #dfe4eb; }
.expert-floating-bubble { align-self: flex-start; max-width: 87%; padding: 9px 11px; border-radius: 13px 13px 13px 4px; background: #fff; box-shadow: 3px 4px 10px rgba(93,112,138,.1); }
.expert-floating-bubble.is-mine { align-self: flex-end; border-radius: 13px 13px 4px 13px; background: #ef1118; color: #fff; }
.expert-floating-bubble p { margin: 0; font-size: 12px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.expert-floating-bubble small { display: block; margin-top: 5px; opacity: .7; font-size: 9px; }
.expert-floating-empty, .expert-floating-loading { margin: 3px 0 13px; color: #6f7e94; font-size: 12px; }
.expert-floating-quick-replies { display: flex; flex-wrap: wrap; gap: 8px; padding: 5px 0 12px; }
.expert-floating-quick-replies button { min-height: 34px; padding: 6px 14px; border: 1px solid #cfd4db; border-radius: 999px; background: #fff; color: #4f5965; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.expert-floating-quick-replies button:hover { background: #f1f3f5; }
.expert-floating-composer { display: grid; gap: 8px; padding-top: 11px; border-top: 6px solid #edf0f4; }
.expert-floating-composer textarea { width: 100%; min-height: 82px; resize: none; padding: 14px 15px; border: 0; border-radius: 14px; background: #f3f1ee; color: #243149; font: inherit; font-size: 14px; }
.expert-floating-composer textarea:focus-visible { outline: 2px solid #9aa2ac; outline-offset: 2px; }
.expert-floating-composer.is-locked textarea { color: #97999d; background: #f3f1ee; cursor: not-allowed; }
.expert-floating-composer-tools { display: grid; grid-template-columns: repeat(4, 30px) 1fr auto 30px; align-items: center; gap: 7px; padding-top: 4px; }
.expert-floating-tool { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #3d3f43; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.expert-floating-tool:hover { background: #eef2f6; }
.expert-floating-tool:disabled { opacity: .55; cursor: not-allowed; }
.expert-floating-send { min-width: 66px; min-height: 34px; padding: 7px 12px; border: 0; border-radius: 999px; background: #e5e7ea; color: #a0a2a5; font: inherit; font-size: 12px; font-weight: 800; cursor: not-allowed; }
.expert-floating-send:not(:disabled) { background: #68717d; color: #fff; cursor: pointer; }
.expert-floating-composer [data-expert-chat-status] { grid-column: 1 / -1; min-height: 15px; margin: 0; color: #4b5d77; font-size: 10px; }
.expert-floating-locked { padding: 8px 3px 3px; }
.expert-floating-locked h3 { margin: 8px 0 5px; color: #243149; font-size: 17px; }
.expert-floating-locked p { margin: 0 0 13px; color: #6f7e94; font-size: 12px; line-height: 1.5; }
.expert-floating-locked .marketplace-button { display: inline-flex; margin: 0 6px 6px 0; min-height: 35px; padding: 8px 12px; font-size: 10px; }

@media (max-width: 620px) { .expert-floating-chat { right: 16px; bottom: 16px; } }
/* The drawer is toggled with the hidden attribute, which display:flex above would otherwise override. */
.expert-floating-chat[hidden] { display: none; }

/* Messenger-style presentation for the compact profile chat. */
.expert-floating-chat {
  width: min(370px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 32px));
  max-height: min(620px, calc(100vh - 32px));
  border: 1px solid #dfe3e8;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(20, 31, 50, .22);
}
.expert-floating-chat.is-locked { height: min(620px, calc(100vh - 32px)); }
.expert-floating-header {
  align-items: center;
  min-height: 62px;
  padding: 10px 14px;
  border-bottom: 1px solid #e4e6eb;
  background: #fff;
  color: #111;
}
.expert-floating-person { align-items: center; gap: 8px; }
.expert-floating-avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 0;
  background: #e4e7ee;
  color: #20252d;
}
.expert-floating-header h2 { color: #111; font-size: 17px; }
.expert-floating-profile-chevron { margin-top: -5px; color: #a500ef; font-size: 24px; line-height: 1; }
.expert-floating-header-actions { gap: 4px; }
.expert-floating-minimize,
.expert-floating-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  color: #a500ef;
  font-size: 28px;
}
.expert-floating-minimize { padding-bottom: 7px; font-size: 26px; }
.expert-floating-body { padding: 0; background: #fff; }
.expert-floating-welcome-thread {
  justify-content: center;
  overflow: auto;
  padding: 16px 20px 24px;
  background: #fff;
}
.expert-floating-welcome { display: grid; justify-items: center; gap: 12px; text-align: center; }
.expert-floating-profile-photo {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  overflow: hidden;
  border-radius: 50%;
  background: #e4e7ee;
  color: #5b6780;
  font-size: 30px;
  font-weight: 800;
}
.expert-floating-profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.expert-floating-welcome h3 { margin: 0; color: #111; font-size: 24px; line-height: 1.15; }
.expert-floating-encryption { max-width: 305px; margin: 8px 0 0; color: #60656c; font-size: 15px; line-height: 1.4; }
.expert-floating-encryption a { color: #5b6572; font-weight: 700; text-decoration: none; }
.expert-floating-access-note { max-width: 320px; color: #6f7e94; font-size: 12px; line-height: 1.45; }
.expert-floating-access-note .marketplace-button { display: inline-flex; margin-top: 8px; min-height: 34px; padding: 8px 12px; font-size: 11px; }
.expert-floating-composer {
  display: block;
  padding: 10px 12px 12px;
  border-top: 1px solid #e4e6eb;
  background: #fff;
}
.expert-floating-composer-row { display: flex; align-items: center; gap: 2px; }
.expert-floating-composer textarea {
  flex: 1;
  width: auto;
  min-width: 0;
  min-height: 34px;
  max-height: 72px;
  resize: none;
  padding: 8px 9px;
  border: 0;
  border-radius: 18px;
  background: #f0f2f5;
  color: #1c1e21;
  font-size: 14px;
  line-height: 1.35;
}
.expert-floating-composer textarea:focus-visible { outline: 2px solid #9aa2ac; outline-offset: 1px; }
.expert-floating-composer.is-locked textarea { color: #9ca3af; background: #f0f2f5; cursor: not-allowed; }
.expert-floating-tool { width: 30px; height: 30px; color: #5b6572; background: transparent; font-size: 14px; }
.expert-floating-tool.expert-floating-gif { font-size: 10px; }
.expert-floating-like { color: #5b6572; }
.expert-floating-send {
  flex: 0 0 30px;
  min-width: 30px;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 50%;
  background: #68717d;
  color: #fff;
  font-size: 16px;
}
.expert-floating-send:disabled { opacity: .35; }
.expert-floating-composer [data-expert-chat-status] { min-height: 15px; margin: 5px 0 0; color: #4b5d77; font-size: 10px; }

/* Extra-small chat mode: keep only GIF, message input and send. */
.expert-floating-chat {
  width: min(310px, calc(100vw - 24px));
  height: min(440px, calc(100vh - 24px));
  max-height: min(440px, calc(100vh - 24px));
  right: 18px;
  bottom: 0;
}
.expert-floating-chat.is-locked { height: min(440px, calc(100vh - 24px)); }
.expert-floating-header { min-height: 50px; padding: 7px 10px; }
.expert-floating-avatar { flex-basis: 30px; width: 30px; height: 30px; font-size: 10px; }
.expert-floating-header h2 { font-size: 14px; }
.expert-floating-profile-chevron { font-size: 18px; }
.expert-floating-minimize,
.expert-floating-close { width: 26px; height: 26px; font-size: 21px; }
.expert-floating-minimize { padding-bottom: 5px; font-size: 19px; }
.expert-floating-welcome-thread { padding: 10px 12px 14px; }
.expert-floating-welcome { gap: 7px; }
.expert-floating-profile-photo { width: 70px; height: 70px; font-size: 20px; }
.expert-floating-welcome h3 { font-size: 18px; }
.expert-floating-encryption { max-width: 255px; margin-top: 3px; font-size: 11.5px; }
.expert-floating-composer { padding: 7px 8px 8px; }
.expert-floating-composer-row { gap: 4px; }
.expert-floating-composer textarea { min-height: 30px; padding: 6px 8px; font-size: 13px; }
.expert-floating-tool.expert-floating-gif { flex: 0 0 28px; width: 28px; height: 28px; font-size: 9px; }
.expert-floating-tool.expert-floating-emoji { flex: 0 0 28px; width: 28px; height: 28px; font-size: 17px; }
.expert-floating-send { flex-basis: 28px; min-width: 28px; width: 28px; height: 28px; min-height: 28px; font-size: 13px; }

/* Messenger-style message bubbles. */
.expert-floating-thread:not(.expert-floating-welcome-thread) { gap: 5px; padding: 12px 10px 14px; background: #fff; }
.expert-floating-bubble {
  align-self: flex-start;
  max-width: 78%;
  padding: 8px 11px 6px;
  border: 0;
  border-radius: 16px 16px 16px 5px;
  background: #f0f2f5;
  box-shadow: none;
  color: #1c1e21;
}
.expert-floating-bubble.is-mine {
  align-self: flex-end;
  border-radius: 16px 16px 5px 16px;
  background: #68717d;
  color: #fff;
}
.expert-floating-bubble p { font-size: 13px; line-height: 1.35; }
.expert-floating-bubble small { margin-top: 4px; font-size: 9px; opacity: .65; }
.expert-floating-bubble.is-mine small { color: rgba(255,255,255,.86); }

/* Match the ElvronAI red-and-white site theme. */
.expert-floating-header { border-bottom-color: #f0d9df; }
.expert-floating-avatar,
.expert-floating-profile-photo { background: #fae9ed; color: #aa1933; }
.expert-floating-profile-chevron,
.expert-floating-minimize,
.expert-floating-close { color: #c91c3b; }
.expert-floating-encryption a { color: #c91c3b; }
.expert-floating-composer textarea { background: #f7f8fa; }
.expert-floating-tool,
.expert-floating-tool.expert-floating-emoji { color: #c91c3b; }
.expert-floating-bubble.is-mine { background: #c91c3b; }
.expert-floating-send:not(:disabled) { background: #c91c3b; }

/* Polished neutral-gray chat theme. */
.expert-floating-chat {
  border-color: #d9dde3;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 12px 34px rgba(31, 41, 55, .18);
}
.expert-floating-header { border-bottom-color: #e5e7eb; }
.expert-floating-avatar,
.expert-floating-profile-photo { background: #e7eaee; color: #5b6572; }
.expert-floating-profile-chevron,
.expert-floating-minimize,
.expert-floating-close { color: #5b6572; }
.expert-floating-encryption a { color: #5b6572; }
.expert-floating-encryption { color: #656d78; }
.expert-floating-composer { border-top-color: #e5e7eb; }
.expert-floating-composer textarea { background: #f1f3f5; }
.expert-floating-tool,
.expert-floating-tool.expert-floating-emoji { color: #5b6572; }
.expert-floating-bubble.is-mine { background: #68717d; }
.expert-floating-send:not(:disabled) { background: #68717d; }

@media (max-width: 620px) {
  .expert-floating-chat { right: 16px; bottom: 16px; }
  .expert-floating-profile-photo { width: 92px; height: 92px; }
  .expert-floating-welcome h3 { font-size: 21px; }
}

/* Compact Messenger footprint. */
.expert-floating-chat {
  width: min(340px, calc(100vw - 32px));
  height: min(520px, calc(100vh - 32px));
  max-height: min(520px, calc(100vh - 32px));
}
.expert-floating-chat.is-locked { height: min(520px, calc(100vh - 32px)); }
.expert-floating-header { min-height: 56px; padding: 8px 12px; }
.expert-floating-avatar { flex-basis: 34px; width: 34px; height: 34px; font-size: 11px; }
.expert-floating-header h2 { font-size: 15px; }
.expert-floating-profile-chevron { font-size: 21px; }
.expert-floating-minimize,
.expert-floating-close { width: 30px; height: 30px; font-size: 24px; }
.expert-floating-minimize { padding-bottom: 6px; font-size: 22px; }
.expert-floating-welcome-thread { padding: 12px 16px 18px; }
.expert-floating-welcome { gap: 9px; }
.expert-floating-profile-photo { width: 84px; height: 84px; font-size: 24px; }
.expert-floating-welcome h3 { font-size: 20px; }
.expert-floating-encryption { max-width: 280px; margin-top: 5px; font-size: 13px; }
.expert-floating-composer { padding: 8px 9px 9px; }
.expert-floating-tool { width: 26px; height: 26px; font-size: 12px; }
.expert-floating-send { flex-basis: 26px; min-width: 26px; width: 26px; height: 26px; min-height: 26px; font-size: 14px; }

/* Final compact sizing. */
.expert-floating-chat {
  width: min(310px, calc(100vw - 24px));
  height: min(440px, calc(100vh - 24px));
  max-height: min(440px, calc(100vh - 24px));
  right: 18px;
  bottom: 0;
}
.expert-floating-chat.is-locked { height: min(440px, calc(100vh - 24px)); }
.expert-floating-header { min-height: 50px; padding: 7px 10px; }
.expert-floating-avatar { flex-basis: 30px; width: 30px; height: 30px; font-size: 10px; }
.expert-floating-header h2 { font-size: 14px; }
.expert-floating-profile-chevron { font-size: 18px; }
.expert-floating-minimize,
.expert-floating-close { width: 26px; height: 26px; font-size: 21px; }
.expert-floating-minimize { padding-bottom: 5px; font-size: 19px; }
.expert-floating-welcome-thread { padding: 10px 12px 14px; }
.expert-floating-welcome { gap: 7px; }
.expert-floating-profile-photo { width: 70px; height: 70px; font-size: 20px; }
.expert-floating-welcome h3 { font-size: 18px; }
.expert-floating-encryption { max-width: 255px; margin-top: 3px; font-size: 11.5px; }
.expert-floating-composer { padding: 7px 8px 8px; }
.expert-floating-composer-row { gap: 4px; }
.expert-floating-composer textarea { min-height: 30px; padding: 6px 8px; font-size: 13px; }
.expert-floating-tool.expert-floating-gif { flex: 0 0 28px; width: 28px; height: 28px; font-size: 9px; }
.expert-floating-tool.expert-floating-emoji { flex: 0 0 28px; width: 28px; height: 28px; font-size: 17px; }
.expert-floating-send { flex-basis: 28px; min-width: 28px; width: 28px; height: 28px; min-height: 28px; font-size: 13px; }
