
/* Marketplace UX refresh — public storefront and responsive component polish */
:root {
  --mp-ink: #171923;
  --mp-muted: #687084;
  --mp-line: #e4e7ef;
  --mp-surface: #fff;
  --mp-tint: #f7f8fc;
  --mp-violet: #580ef6;
  --mp-blue: #61bdf6;
  --mp-radius: 20px;
}
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
::selection { background: #580ef624; color: var(--mp-ink); }
.wrap { width: min(1180px, calc(100% - 44px)); }
.header { z-index: 50; }
.nav { min-height: 78px; gap: 22px; }
.navlinks { gap: clamp(12px, 1.65vw, 25px); }
.navlinks a { font-size: .88rem; font-weight: 620; transition: color .18s ease; }
.nav-cta, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 12px 18px; font-weight: 750; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.btn { text-decoration: none; }
.btn:focus-visible, .nav-cta:focus-visible, .market-card-save:focus-visible { outline: 3px solid #61bdf6; outline-offset: 3px; }
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 475px; display: flex; align-items: center; }
.hero:after { content: ""; position: absolute; z-index: -1; width: 420px; height: 420px; right: 5%; top: 5%; border: 1px solid #ffffff1c; border-radius: 50%; box-shadow: 0 0 0 55px #ffffff08, 0 0 0 110px #ffffff05; pointer-events: none; }
.hero-content { width: min(1180px, calc(100% - 44px)); padding-top: 76px; padding-bottom: 76px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #ffffff2c; border-radius: 99px; background: #ffffff0b; font-weight: 800; letter-spacing: .12em; }
.hero h1 { max-width: 800px; margin: 22px 0 18px; font-size: clamp(2.8rem, 6.5vw, 5.2rem); line-height: .99; letter-spacing: -.065em; font-weight: 820; }
.hero p { max-width: 590px; font-size: clamp(1rem, 1.8vw, 1.18rem); line-height: 1.75; color: #e0e5f5; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .btn { min-height: 50px; padding-inline: 21px; }
.hero-note { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; font-size: .82rem; }
.hero-note span { display: inline-flex; align-items: center; gap: 8px; }
.hero-note span:before { content: "✓"; display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: #61bdf629; color: #a9e0ff; font-weight: 900; }
.section { padding-top: clamp(58px, 7vw, 92px); padding-bottom: clamp(58px, 7vw, 92px); }
.section-head h2, .split-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.65rem); line-height: 1.1; letter-spacing: -.05em; margin: 10px 0 12px; }
.section-head p, .split-head p { max-width: 570px; line-height: 1.75; }
.categories { gap: 18px; }
.home-category-card { min-height: 210px; padding: 25px; display: flex; flex-direction: column; align-items: flex-start; gap: 15px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.home-category-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px #26387314; }
.category-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: #580ef610; color: #580ef6; }
.home-category-card h3 { font-size: 1.2rem; letter-spacing: -.025em; margin-bottom: 6px; }
.home-category-card p { margin: 0 0 12px; line-height: 1.6; }
.work { padding-top: clamp(58px, 7vw, 88px); padding-bottom: clamp(58px, 7vw, 88px); }
.work-grid { gap: 18px; }
.work-card { min-height: 250px; padding: 25px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.work-icon { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid #ffffff26; background: #ffffff12; border-radius: 14px; }
.work-card h3 { font-size: 1.2rem; letter-spacing: -.025em; margin: 0 0 8px; }
.work-card p { line-height: 1.7; margin: 0; }
.split-head { align-items: end; gap: 24px; margin-bottom: 28px; }
.split-head > div { max-width: 720px; }
.split-head .btn { flex: 0 0 auto; }
.market-grid { gap: 20px; }
.market-card { position: relative; overflow: hidden; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.market-card:hover { transform: translateY(-4px); }
.market-card-image { aspect-ratio: 1.34 / 1; overflow: hidden; }
.market-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.market-card:hover .market-card-image img { transform: scale(1.035); }
.market-card-body { padding: 19px; }
.market-card h3 { font-size: 1.04rem; line-height: 1.4; letter-spacing: -.025em; margin: 10px 0 8px; }
.market-card-category { font-size: .72rem; font-weight: 750; letter-spacing: .035em; }
.market-card-bottom { gap: 10px; align-items: end; }
.market-card-price { font-size: 1.08rem; }
.market-card-save { top: 12px; right: 12px; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #ffffffb5; border-radius: 50%; background: #ffffffed; color: #35334b; box-shadow: 0 4px 14px #11182718; }
.market-card-save[aria-pressed="true"] { color: #580ef6; background: #f2edff; }
.market-empty { border: 1px dashed #ccd3e2; border-radius: 20px; background: linear-gradient(135deg,#fff,#f7f7ff); padding: clamp(28px, 5vw, 55px); }
.market-empty h3 { font-size: clamp(1.35rem, 3vw, 2rem); letter-spacing: -.04em; }
.home-benefits-section { background: #f7f8fc; border-block: 1px solid #e9ebf3; }
.home-benefit-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.home-benefit { min-width: 0; padding: 26px; background: #fff; border: 1px solid var(--mp-line); border-radius: 19px; box-shadow: 0 8px 25px #1c23400a; }
.home-benefit-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #f0ebff; color: var(--mp-violet); margin-bottom: 24px; }
.home-benefit-index { display: block; color: #6850c5; font-size: .68rem; font-weight: 850; letter-spacing: .13em; }
.home-benefit h3 { margin: 10px 0; color: var(--mp-ink); font-size: 1.25rem; letter-spacing: -.035em; }
.home-benefit p { min-height: 76px; color: var(--mp-muted); line-height: 1.72; font-size: .92rem; }
.home-benefit a { display: inline-flex; align-items: center; gap: 9px; margin-top: 12px; color: var(--mp-violet); font-weight: 760; font-size: .87rem; text-decoration: none; }
.home-benefit a:hover { gap: 13px; }
.home-assurance-band { background: #171923; color: #fff; padding: 28px 0; }
.home-assurance-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.home-assurance-grid > div { display: flex; align-items: center; gap: 13px; min-width: 0; }
.home-assurance-mark { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border: 1px solid #ffffff2a; border-radius: 13px; background: #ffffff12; color: #9bdcff; }
.home-assurance-grid strong, .home-assurance-grid small { display: block; }
.home-assurance-grid strong { font-size: .9rem; }
.home-assurance-grid small { margin-top: 4px; color: #c4c9d8; font-size: .78rem; line-height: 1.5; }
.home-faq-section { display: grid; grid-template-columns: minmax(220px,.8fr) minmax(0,1.2fr); gap: clamp(35px,7vw,90px); align-items: start; }
.home-faq-intro h2 { font-size: clamp(1.9rem,3.7vw,2.8rem); letter-spacing: -.055em; line-height: 1.08; margin: 12px 0; }
.home-faq-intro p { color: var(--mp-muted); line-height: 1.7; margin-bottom: 22px; }
.home-faq-list { border-top: 1px solid var(--mp-line); }
.home-faq-list details { border-bottom: 1px solid var(--mp-line); padding: 0; }
.home-faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px 0; color: var(--mp-ink); font-weight: 750; cursor: pointer; list-style: none; }
.home-faq-list summary::-webkit-details-marker { display: none; }
.home-faq-list summary span { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: #f0ebff; color: var(--mp-violet); font-size: 1.15rem; transition: transform .2s ease; }
.home-faq-list details[open] summary span { transform: rotate(45deg); }
.home-faq-list details p { color: var(--mp-muted); line-height: 1.8; padding: 0 35px 21px 0; margin: -2px 0 0; max-width: 680px; }
.cta { margin-top: 0; padding: clamp(48px,7vw,82px) 22px; text-align: center; }
.cta h2 { font-size: clamp(2rem,4.5vw,3.3rem); line-height: 1.05; letter-spacing: -.055em; max-width: 780px; margin: 13px auto; }
.cta p { max-width: 570px; margin: 0 auto 25px; line-height: 1.7; }
.footer { padding-top: 58px; }
:where(input, select, textarea) { max-width: 100%; }
:where(input:not([type=checkbox]):not([type=radio]), select, textarea) { border-radius: 10px; }
@media (max-width: 900px) {
  .nav { gap: 12px; }
  .navlinks { gap: 12px; }
  .navlinks a { font-size: .82rem; }
  .hero { min-height: 420px; }
  .home-benefit-grid { grid-template-columns: 1fr 1fr; }
  .home-benefit:last-child { grid-column: 1 / -1; }
  .home-benefit p { min-height: auto; }
}
@media (max-width: 680px) {
  .wrap, .hero-content { width: min(100% - 32px, 1180px); }
  .nav { min-height: 68px; }
  .hero { min-height: 0; }
  .hero-content { padding-top: 65px; padding-bottom: 58px; }
  .hero h1 { font-size: clamp(2.55rem, 12vw, 4rem); }
  .hero .actions { align-items: stretch; flex-direction: column; max-width: 340px; }
  .hero .actions .btn { width: 100%; }
  .hero-note { display: grid; gap: 9px; }
  .section { padding-top: 54px; padding-bottom: 54px; }
  .split-head { align-items: flex-start; flex-direction: column; }
  .split-head .btn { width: 100%; }
  .home-benefit-grid { grid-template-columns: 1fr; }
  .home-benefit:last-child { grid-column: auto; }
  .home-assurance-grid { grid-template-columns: 1fr; gap: 19px; }
  .home-faq-section { grid-template-columns: 1fr; gap: 28px; }
  .home-faq-intro .btn { width: auto; }
  .market-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .market-card-body { padding: 13px; }
  .market-card h3 { font-size: .93rem; }
  .market-card-bottom { align-items: flex-start; flex-wrap: wrap; }
  .market-sales-count { font-size: .68rem; }
  .market-card-price { font-size: .96rem; }
  .market-card-image { aspect-ratio: 1 / .9; }
  .home-category-card { min-height: 0; }
}
@media (max-width: 390px) {
  .market-grid { grid-template-columns: 1fr; }
  .market-card-image { aspect-ratio: 1.4 / 1; }
  .home-benefit { padding: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Phase 2 — consistent visual system across catalogue, content, forms and customer area */
:root {
  --mp-page: #f7f8fc;
  --mp-card: #ffffff;
  --mp-soft: #f0f2f9;
  --mp-shadow: 0 14px 40px rgba(22, 28, 52, .07);
  --mp-shadow-hover: 0 20px 48px rgba(22, 28, 52, .12);
  --mp-focus: #61bdf6;
}
html[data-theme="dark"] {
  --mp-ink: #f2f4fb;
  --mp-muted: #a8b0c4;
  --mp-line: #303749;
  --mp-surface: #171c29;
  --mp-tint: #202637;
  --mp-page: #111623;
  --mp-card: #191f2e;
  --mp-soft: #222a3c;
  --mp-shadow: 0 14px 40px rgba(0, 0, 0, .2);
  --mp-shadow-hover: 0 20px 48px rgba(0, 0, 0, .32);
}

/* Shared page headings and content widths */
.public-page-navigation { padding-top: 18px; }
.refined-page-heading, .refined-heading-actions, .tutorial-page-heading { margin-bottom: 26px; }
.refined-page-heading h1, .tutorial-page-heading h1, .contact-hero h1, .about-hero h1,
.custom-website-heading h1, .auth-story h1, .customer-page h1, .wallet-page h1,
.account-profile-page h1, .tickets-page h1, .ticket-detail-page h1 {
  letter-spacing: -.045em;
  line-height: 1.08;
  text-wrap: balance;
}
.eyebrow { font-size: .7rem; font-weight: 820; letter-spacing: .13em; }
.platform-card, .contact-form-card, .auth-form-panel, .auth-story-card, .tutorial-card,
.order-list-card, .orders-list-card, .ticket-list-card, .ticket-create, .wallet-funding-card,
.wallet-history-card, .profile-form-card, .customer-panel, .customer-order, .customer-metric {
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-radius);
  box-shadow: var(--mp-shadow);
}
.platform-card, .contact-form-card, .auth-form-panel, .auth-story-card, .customer-panel,
.wallet-funding-card, .wallet-history-card, .profile-form-card { background: var(--mp-card); }

/* Marketplace catalogue */
.market-hero { position: relative; overflow: hidden; }
.market-hero-inner { gap: clamp(24px, 5vw, 68px); }
.market-hero h1 { max-width: 760px; font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.02; letter-spacing: -.06em; text-wrap: balance; }
.market-hero p { max-width: 610px; line-height: 1.8; }
.market-hero-badge { border-radius: 20px; box-shadow: 0 18px 50px #080b1d20; }
.market-catalog { padding-top: clamp(36px, 5vw, 62px); }
.market-catalog-heading, .market-popular-heading { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin: 0 0 22px; }
.market-catalog-heading h2, .market-popular-heading h2 { margin: 8px 0 0; letter-spacing: -.04em; }
.market-result-count { color: var(--mp-muted); font-size: .85rem; font-weight: 700; white-space: nowrap; }
.catalog-toolbar { gap: 18px; padding: 16px; border: 1px solid var(--mp-line); border-radius: 18px; background: var(--mp-card); box-shadow: 0 7px 22px #1c234008; }
.catalog-toolbar form { gap: 9px; }
.catalog-toolbar .search, .catalog-toolbar select, .mobile-market-search input { min-height: 44px; border: 1px solid var(--mp-line); background: var(--mp-card); color: var(--mp-ink); }
.filters { gap: 8px; }
.filter { border: 1px solid var(--mp-line); border-radius: 999px; padding: 9px 14px; font-size: .82rem; font-weight: 700; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.filter:hover, .filter.active { border-color: var(--mp-violet); }
.market-empty { color: var(--mp-ink); background: var(--mp-card); box-shadow: var(--mp-shadow); }
.market-empty p { color: var(--mp-muted); line-height: 1.75; }
.market-empty a { display: inline-flex; margin-top: 10px; font-weight: 750; text-decoration: none; }
.pagination-wrap { display: flex; justify-content: center; margin-top: 32px; }
.mobile-filter-dialog { width: min(560px, calc(100% - 24px)); max-height: min(86dvh, 760px); padding: 0; border: 1px solid var(--mp-line); border-radius: 24px; background: var(--mp-card); color: var(--mp-ink); box-shadow: 0 28px 90px #10142638; }
.mobile-filter-dialog::backdrop { background: #1116239c; backdrop-filter: blur(4px); }
.mobile-filter-dialog form { padding: 22px; }
.mobile-filter-field { display: grid; gap: 10px; margin: 22px 0; font-weight: 750; }
.mobile-filter-field select { min-height: 46px; padding: 10px 12px; border: 1px solid var(--mp-line); border-radius: 10px; background: var(--mp-card); color: var(--mp-ink); }
.mobile-filter-categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mobile-filter-categories label { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--mp-line); border-radius: 11px; font-size: .85rem; }
.mobile-sheet-actions { display: flex; gap: 10px; margin-top: 26px; }
.mobile-sheet-actions > * { flex: 1; }

/* Product details */
.market-product-page { padding-top: clamp(22px, 4vw, 44px); padding-bottom: clamp(54px, 7vw, 90px); }
.market-product-layout { align-items: start; gap: clamp(26px, 4vw, 54px); }
.market-product-gallery, .market-product-purchase, .market-product-details { min-width: 0; }
.market-product-cover { overflow: hidden; border-radius: 22px; background: var(--mp-soft); }
.gallery-slide img { display: block; width: 100%; height: auto; object-fit: contain; }
.gallery-thumbnail { overflow: hidden; border-radius: 12px; border: 2px solid transparent; }
.gallery-thumbnail[aria-pressed="true"] { border-color: var(--mp-violet); }
.refined-product-info, .market-product-details, .market-review-section { border-radius: var(--mp-radius); }
.refined-product-info { position: sticky; top: 24px; }
.market-product-page :where(h1, h2, h3) { letter-spacing: -.035em; }
.market-product-page :where(p, li) { line-height: 1.75; }
.market-product-page :where(button, a, input, select, textarea):focus-visible { outline: 3px solid var(--mp-focus); outline-offset: 3px; }

/* About, contact and custom service pages */
.about-hero, .contact-hero, .custom-website-page .custom-website-heading { isolation: isolate; }
.about-hero, .contact-hero { overflow: hidden; }
.about-hero-visual, .contact-hero-mark, .custom-website-hero-icon { filter: saturate(.95); }
.about-intro, .about-offerings, .about-revamp, .contact-page, .custom-website-page { color: var(--mp-ink); }
.about-value-grid, .about-offering-grid, .service-benefits { gap: 16px; }
.about-value-grid > *, .about-offering-grid > *, .service-benefit { min-width: 0; border: 1px solid var(--mp-line); border-radius: 18px; background: var(--mp-card); box-shadow: 0 8px 26px #1c234008; }
.contact-layout, .service-layout, .custom-service-layout { align-items: start; gap: clamp(22px, 4vw, 42px); }
.contact-form-card, .contact-aside, .contact-support-card, .service-form, .custom-project-form { min-width: 0; }
.contact-info, .contact-method { border: 1px solid var(--mp-line); border-radius: 14px; padding: 14px; }
.contact-method { transition: border-color .18s ease, transform .18s ease; }
.contact-method:hover { border-color: #b7a5ff; transform: translateY(-2px); }
.platform-form { display: grid; gap: 18px; }
.platform-form-row, .service-field-grid { gap: 14px; }
.platform-field { min-width: 0; display: grid; gap: 8px; }
.platform-field label, .mobile-filter-field > span { color: var(--mp-ink); font-size: .86rem; font-weight: 750; }
.platform-field :where(input, select, textarea), .platform-form :where(input, select, textarea), .service-form :where(input, select, textarea), .custom-project-form :where(input, select, textarea) {
  width: 100%; min-width: 0; min-height: 46px; padding: 11px 13px; border: 1px solid var(--mp-line); border-radius: 11px; background: var(--mp-card); color: var(--mp-ink); box-shadow: none; transition: border-color .18s ease, box-shadow .18s ease;
}
.platform-field textarea, .platform-form textarea, .service-form textarea, .custom-project-form textarea { min-height: 130px; resize: vertical; }
.platform-field :where(input, select, textarea):focus, .platform-form :where(input, select, textarea):focus, .service-form :where(input, select, textarea):focus, .custom-project-form :where(input, select, textarea):focus { border-color: #9277ff; box-shadow: 0 0 0 4px #580ef614; outline: 0; }
.field-error { color: #c12c45; font-size: .82rem; line-height: 1.5; }
.platform-form-actions, .custom-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.platform-form-actions .btn, .custom-form-actions .btn { min-width: 150px; }

/* Authentication */
.auth-screen { min-height: min(850px, calc(100dvh - 100px)); padding-block: clamp(28px, 5vw, 64px); }
.auth-shell { align-items: stretch; gap: clamp(18px, 3vw, 36px); }
.auth-story, .auth-form-panel { min-width: 0; border-radius: 24px; }
.auth-story { padding: clamp(25px, 4vw, 48px); }
.auth-story h1 { font-size: clamp(2rem, 4.2vw, 3.35rem); }
.auth-story-card { padding: 18px; }
.auth-form-panel { padding: clamp(22px, 4vw, 40px); }
.auth-form-panel .wallet-form { gap: 17px; }
.auth-switch { line-height: 1.7; }
.auth-form-panel input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--mp-violet); }

/* Tutorials and learning library */
.tutorial-page { padding-top: clamp(30px, 5vw, 58px); }
.tutorial-page-heading { max-width: 820px; }
.tutorial-page-heading h1 { font-size: clamp(2.25rem, 5vw, 4rem); }
.tutorial-grid { gap: 18px; }
.tutorial-grid > *, .tutorial-carousel > * { min-width: 0; }
.tutorial-page :where(.platform-card, .tutorial-locked, .tutorial-unavailable) { border-radius: 18px; }
.tutorial-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--mp-muted); font-size: .83rem; }
.tutorial-description { line-height: 1.85; }
.tutorial-player { overflow: hidden; border-radius: 18px; background: #10131b; }
.tutorial-player video, .tutorial-player iframe { display: block; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; }
.tutorial-rating-form { border-top: 1px solid var(--mp-line); padding-top: 22px; }
.tutorial-star-input { display: flex; flex-wrap: wrap; gap: 8px; }

/* Customer dashboard and account pages */
.customer-page, .dashboard-page, .account-profile-page, .wallet-page, .tickets-page, .ticket-detail-page { color: var(--mp-ink); }
.customer-page .section, .dashboard-page .section { padding-top: clamp(28px, 4vw, 46px); padding-bottom: clamp(42px, 6vw, 72px); }
.customer-shell, .customer-main { min-width: 0; }
.customer-metrics { gap: 14px; }
.customer-metric { padding: 18px; background: var(--mp-card); }
.customer-metric-copy, .customer-metric-total { min-width: 0; overflow-wrap: anywhere; }
.customer-panel { padding: clamp(18px, 2.8vw, 26px); }
.customer-panel-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.customer-order { padding: 15px; background: var(--mp-card); }
.customer-order-main { min-width: 0; }
.customer-order :where(h2, h3, p, span) { overflow-wrap: anywhere; }
.customer-actions, .customer-action-grid, .app-quick-actions { gap: 12px; }
.customer-action-grid > *, .customer-actions > *, .app-quick-actions > * { min-width: 0; }
.customer-empty, .ticket-empty, .wallet-history-empty { padding: clamp(24px, 4vw, 40px); border: 1px dashed var(--mp-line); border-radius: 18px; background: var(--mp-card); text-align: center; }
.customer-empty p, .ticket-empty p, .wallet-history-empty p { color: var(--mp-muted); line-height: 1.7; }
.customer-pagination, .ticket-pagination { display: flex; justify-content: center; margin-top: 24px; }
.mobile-order-card { display: grid; gap: 12px; }
.mobile-order-copy, .mobile-order-side { min-width: 0; overflow-wrap: anywhere; }

/* Wallet, payments and receipts */
.wallet-columns, .wallet-detail-grid { align-items: start; gap: clamp(18px, 3vw, 28px); }
.wallet-balance, .customer-wallet-hero { border-radius: 22px; }
.wallet-funding-card, .wallet-history-card { padding: clamp(18px, 3vw, 28px); }
.wallet-mini-stats { gap: 12px; }
.wallet-mini-stats > * { min-width: 0; }
.wallet-history-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.funding-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--mp-line); }
.funding-row:last-child { border-bottom: 0; }
.funding-row-right { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.funding-status { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; padding: 6px 10px; border-radius: 999px; font-size: .73rem; font-weight: 800; overflow-wrap: anywhere; }
.wallet-detail-card, .wallet-confirm-card { min-width: 0; padding: clamp(18px, 3vw, 28px); }
.wallet-detail-list { display: grid; gap: 0; margin: 20px 0; }
.wallet-detail-list > div { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(0, 1.3fr); gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--mp-line); }
.wallet-detail-list dt { color: var(--mp-muted); font-size: .82rem; }
.wallet-detail-list dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-weight: 700; }
.payment-copy { margin-left: 6px; padding: 5px 9px; border: 1px solid var(--mp-line); border-radius: 8px; background: var(--mp-soft); color: var(--mp-ink); font-size: .75rem; font-weight: 750; }
.payment-upload { display: grid; gap: 8px; justify-items: start; padding: 18px; border: 1px dashed var(--mp-line); border-radius: 13px; cursor: pointer; }
.payment-upload:hover { border-color: #9277ff; }
.payment-file-input { max-width: 100%; }
.crypto-qr-wrap { display: grid; justify-items: center; gap: 12px; padding: 18px; border-radius: 16px; background: var(--mp-soft); text-align: center; }
.crypto-qr-wrap canvas { max-width: 100%; height: auto; }
.receipt-document { max-width: 980px; margin-inline: auto; border: 1px solid var(--mp-line); border-radius: 20px; background: var(--mp-card); box-shadow: var(--mp-shadow); }
.receipt-top, .receipt-metadata, .receipt-table-row, .receipt-totals > div { gap: 16px; }
.receipt-metadata { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.receipt-metadata > div { min-width: 0; overflow-wrap: anywhere; }

/* Support tickets and profile */
.ticket-toolbar, .ticket-overview, .ticket-list-heading { gap: 12px; }
.ticket-toolbar { display: flex; align-items: center; flex-wrap: wrap; }
.ticket-search { min-width: min(260px, 100%); }
.ticket-list-card { padding: 16px; background: var(--mp-card); }
.ticket-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ticket-row-main { min-width: 0; flex: 1; }
.ticket-row-main :where(h2, h3, p, span) { overflow-wrap: anywhere; }
.ticket-detail-layout { align-items: start; gap: 20px; }
.ticket-conversation { min-width: 0; }
.ticket-messages { display: grid; gap: 16px; }
.ticket-message { max-width: min(100%, 760px); }
.ticket-message-body { overflow-wrap: anywhere; line-height: 1.75; }
.ticket-reply-form { position: sticky; bottom: 12px; padding: 16px; border: 1px solid var(--mp-line); border-radius: 16px; background: var(--mp-card); box-shadow: var(--mp-shadow); }
.profile-sections { gap: 18px; }
.profile-form-card { padding: clamp(18px, 3vw, 28px); }
.profile-identity { min-width: 0; }
.profile-avatar, .profile-photo-preview { flex-shrink: 0; }
.profile-photo-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* General accessibility, overflow and smaller-screen tuning */
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid var(--mp-focus); outline-offset: 3px; }
:where(img, video, iframe, canvas, svg) { max-width: 100%; }
:where(.platform-card, .market-card, .customer-panel, .ticket-list-card, .wallet-history-card) { overflow-wrap: anywhere; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; opacity: .65; }
@media (max-width: 900px) {
  .refined-product-info { position: static; }
  .receipt-metadata { grid-template-columns: 1fr 1fr; }
  .customer-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wallet-detail-grid, .wallet-columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .market-hero-inner { align-items: flex-start; }
  .market-hero-badge { max-width: 100%; }
  .market-catalog-heading, .market-popular-heading { align-items: flex-start; flex-direction: column; }
  .catalog-toolbar { padding: 12px; }
  .mobile-filter-categories { grid-template-columns: 1fr; }
  .mobile-sheet-actions { flex-direction: column-reverse; }
  .market-product-layout { grid-template-columns: minmax(0, 1fr); }
  .market-product-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .contact-layout, .service-layout, .custom-service-layout { grid-template-columns: minmax(0, 1fr); }
  .auth-shell { grid-template-columns: minmax(0, 1fr); }
  .auth-story { display: none; }
  .auth-form-panel { width: 100%; }
  .customer-metrics { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .customer-panel-heading { align-items: flex-start; }
  .wallet-detail-list > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .receipt-metadata { grid-template-columns: minmax(0, 1fr); }
  .receipt-top { align-items: flex-start; flex-direction: column; }
  .ticket-row { align-items: flex-start; }
  .ticket-toolbar > *, .ticket-search { width: 100%; min-width: 0; }
  .platform-form-actions, .custom-form-actions { align-items: stretch; flex-direction: column; }
  .platform-form-actions .btn, .custom-form-actions .btn { width: 100%; }
}
@media (max-width: 390px) {
  .customer-metrics { grid-template-columns: minmax(0, 1fr); }
  .market-grid { grid-template-columns: minmax(0, 1fr); }
  .market-card-image { aspect-ratio: 1.4 / 1; }
  .market-product-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .receipt-document { border-radius: 12px; }
}
@media print {
  .header, .footer, .public-page-navigation, .receipt-actions, .mobile-bottom-nav, .app-shell, .public-theme-toggle { display: none !important; }
  body, .receipt-document { color: #111 !important; background: #fff !important; box-shadow: none !important; }
  .receipt-document { border: 0 !important; }
}
