/* L’Enchère by Reyzee — light, mobile-first, Reyzee brand. Logical properties (inline-start/end) make RTL work automatically. */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --surface-3: #e7e7ea;
  --border: #e8e8eb;
  --border-strong: #d4d4d8;
  --text: #0a0a0a;
  --muted: #6b6b76;
  --accent: #E03E2D;          /* Reyzee red */
  --accent-hover: #CC3322;
  --accent-ink: #ffffff;
  --accent-text: #C2311F;     /* Reyzee red, readable on white */
  --accent-soft: #fdecea;
  --live: #E03E2D;
  --teal: #0e8f82;            /* zellige */
  --teal-soft: #ddf4f1;
  --success: #12924f;
  --success-soft: #e3f6eb;
  --danger: #d92d3f;
  --danger-soft: #fde9eb;
  --hover: rgba(22, 21, 26, .05);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(22, 21, 26, .05);
  --shadow: 0 1px 2px rgba(22, 21, 26, .04), 0 8px 24px rgba(22, 21, 26, .06);
  --shadow-lg: 0 24px 60px rgba(22, 21, 26, .16);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-brand: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --topbar-h: 64px;
  color-scheme: light;
}
[dir="rtl"] { --font: 'Cairo', 'Inter', system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 var(--font); min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 64px; /* mobile tab bar */
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-text); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: 1.15rem; font-weight: 750; letter-spacing: -.01em; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon { flex: none; display: block; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.pre { white-space: pre-line; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; align-items: flex-start; }
.row.gap, .gap { gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.center-y { align-items: center; }
.between { justify-content: space-between; }
.end { text-align: end; }
.pos { color: var(--success); }
.neg { color: var(--danger); }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 20px 16px 40px; }
.container.narrow { max-width: 680px; }
.page-title { margin-top: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1280px; margin: 0 auto; height: var(--topbar-h); display: flex; align-items: center; gap: 20px; padding: 0 16px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.28rem; letter-spacing: -.035em; flex: none; }
.logo:hover { color: var(--text); }
.primary-nav { display: flex; gap: 2px; flex: none; }
.primary-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--muted); transition: color .15s, background .15s; }
.primary-nav a:hover { color: var(--text); background: var(--hover); }
.primary-nav a.active { color: var(--text); background: var(--surface-2); }
.search { flex: 1; max-width: 460px; position: relative; margin-inline-start: auto; }
.search .icon { position: absolute; top: 50%; inset-inline-start: 14px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; border-radius: 999px; padding: 10px 16px; padding-inline-start: 42px; background: var(--surface-2); border-color: transparent; font-size: .92rem; }
.search input:focus { border-color: var(--border-strong); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.top-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.nav-link { padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: .92rem; }
.nav-link:hover { background: var(--hover); color: var(--text); }
.icon-btn { position: relative; display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; color: var(--text); padding: 9px; cursor: pointer; border-radius: 999px; font: 700 .78rem var(--font); }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.lang-btn span { letter-spacing: .04em; color: var(--muted); }
.icon-btn .dot { position: absolute; top: 3px; inset-inline-end: 2px; min-width: 18px; height: 18px; display: grid; place-items: center; background: var(--live); color: #fff; font-size: .62rem; font-weight: 800; border-radius: 999px; padding: 0 4px; border: 2px solid var(--surface); }
.avatar-btn { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; margin-inline-start: 6px; }
.avatar-btn .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border-strong); transition: box-shadow .15s; }
.avatar-btn:hover .avatar, .dropdown.open .avatar-btn .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--accent); }

.dropdown { position: relative; }
.menu { display: none; position: absolute; top: calc(100% + 10px); inset-inline-start: 0; min-width: 270px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; }
.menu-sm { min-width: 180px; }
.menu-end { inset-inline-start: auto; inset-inline-end: 0; }
.dropdown.open .menu { display: block; animation: menuIn .14s ease-out; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px); } }
.menu a, .menu .menu-item { display: flex; align-items: center; gap: 11px; width: 100%; text-align: start; padding: 10px 12px; border-radius: 11px; background: none; border: 0; color: var(--text); font: 500 .92rem var(--font); cursor: pointer; }
.menu a .icon, .menu .menu-item .icon { color: var(--muted); }
.menu a:hover, .menu .menu-item:hover, .menu a.active { background: var(--surface-2); color: var(--text); }
.menu a:hover .icon { color: var(--text); }
.menu a.active .icon { color: var(--accent-text); }
.menu .menu-head { padding: 10px 12px; gap: 12px; }
.menu-head span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.menu-head small { color: var(--muted); font-size: .8rem; }
.menu .menu-wallet { margin: 2px 0; background: var(--accent-soft); }
.menu .menu-wallet:hover { background: #fbdcd8; }
.menu .menu-wallet .icon { color: var(--accent-text); }
.menu .menu-wallet strong { color: var(--accent-text); font-size: .88rem; }
.menu-sep { height: 1px; background: var(--border); margin: 6px 8px; }

/* ---------- avatars & thumbs ---------- */
.avatar { border-radius: 50%; object-fit: cover; background: var(--surface-3); flex: none; }
.avatar.xs { width: 22px; height: 22px; }
.avatar.sm { width: 34px; height: 34px; }
.avatar.md { width: 48px; height: 48px; }
.avatar.lg { width: 72px; height: 72px; }
.avatar.xl { width: 108px; height: 108px; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--accent); }
.thumb { width: 56px; height: 56px; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface-3); flex: none; }
.thumb.sm { width: 40px; height: 40px; }
.thumb.lg { width: 120px; height: 120px; margin-bottom: 8px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 18px; border-radius: 999px; border: 1px solid transparent; background: var(--surface-2); color: var(--text); font: 700 .93rem var(--font); cursor: pointer; transition: transform .08s, background .15s, box-shadow .15s, opacity .15s; white-space: nowrap; text-decoration: none; }
.btn:hover { color: var(--text); background: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 4px 14px rgba(224, 62, 45, .28); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: #2c2a32; color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { background: var(--hover); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #fbd5d9; color: var(--danger); }
.btn-live { background: var(--live); color: #fff; box-shadow: 0 4px 14px rgba(240, 40, 74, .3); }
.btn-live:hover { background: #d81e3e; color: #fff; }
.btn-sm { padding: 7px 13px; font-size: .82rem; }
.btn-lg { padding: 14px 26px; font-size: 1.03rem; }
.btn-block { width: 100%; margin-top: 8px; }

/* ---------- forms ---------- */
input, select, textarea { width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 11px 13px; font: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent-hover); box-shadow: 0 0 0 4px var(--accent-soft); }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--accent-hover); box-shadow: none; }
input[type="file"] { padding: 8px; background: var(--surface-2); }
.field { display: block; margin: 0 0 15px; border: 0; padding: 0; }
.field > span, .field > legend { display: block; font-weight: 650; font-size: .87rem; margin-bottom: 6px; padding: 0; }
.hint { display: block; color: var(--muted); font-size: .8rem; margin-top: 5px; }
.error { display: block; color: var(--danger); font-size: .82rem; margin-top: 5px; }
.check { display: flex; gap: 9px; align-items: center; margin: 10px 0; cursor: pointer; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); margin-bottom: 8px; cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; }
.radio-card:has(input:checked) { border-color: var(--accent-hover); background: var(--accent-soft); }
.radio-card span { display: flex; flex-direction: column; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
form.inline { display: inline-flex; gap: 4px; align-items: center; }
form.inline input, form.inline select { padding: 6px 9px; width: auto; }
.forgot { display: block; text-align: end; margin: -6px 0 10px; color: var(--muted); }

/* ---------- cards & layout ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.section { margin: 30px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.section-head a { font-weight: 600; font-size: .9rem; }
.empty { text-align: center; padding: 40px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--muted); background: var(--surface); }
.empty .btn { margin-top: 6px; }
.auth-card { margin-top: 28px; padding: 32px; box-shadow: var(--shadow); }
.auth-card h1 { margin-bottom: 4px; }

/* ---------- pills, chips, tabs, badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 7px; font-size: .74rem; font-weight: 800; letter-spacing: .02em; }
.pill-live { background: var(--live); color: #fff; text-transform: uppercase; }
.pill-dark { background: rgba(10, 10, 12, .62); color: #fff; backdrop-filter: blur(6px); }
.live-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(240, 40, 74, .6); animation: pulse 1.6s infinite; vertical-align: middle; }
.live-dot.sm { width: 7px; height: 7px; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(240, 40, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(240, 40, 74, 0); } }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 15px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: .87rem; display: inline-block; box-shadow: var(--shadow-sm); transition: border-color .15s; }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active { background: var(--text); color: #fff; border-color: var(--text); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 12px 0 20px; overflow-x: auto; }
.tab { padding: 11px 14px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-color: var(--text); }
.tab .count { background: var(--live); color: #fff; border-radius: 999px; padding: 0 6px; font-size: .72rem; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.badge-confirmed, .badge-pending, .badge-scheduled { background: var(--accent-soft); color: var(--accent-text); }
.badge-shipped, .badge-live, .badge-running { background: var(--teal-soft); color: var(--teal); }
.badge-delivered, .badge-approved, .badge-sold, .badge-active { background: var(--success-soft); color: var(--success); }
.badge-cancelled, .badge-rejected, .badge-unsold { background: var(--danger-soft); color: var(--danger); }

/* ---------- flash & toast ---------- */
.flashes { max-width: 1280px; margin: 14px auto 0; padding: 0 16px; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 10px; border: 1px solid var(--border); background: var(--surface); transition: opacity .4s; font-weight: 500; }
.flash.out { opacity: 0; }
.flash-success { border-color: #bfe6cf; background: var(--success-soft); color: #0b5e33; }
.flash-error { border-color: #f6c3c9; background: var(--danger-soft); color: #9b1726; }
.flash-info { border-color: #f5c6c0; background: var(--accent-soft); color: #8f2417; }
.toasts { position: fixed; z-index: 100; top: calc(var(--topbar-h) + 14px); inset-inline-end: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; width: min(400px, calc(100vw - 32px)); }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 11px; width: 100%; background: var(--surface); color: var(--text); padding: 13px 12px 13px 14px; border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-weight: 550; font-size: .92rem; line-height: 1.4; animation: toastIn .28s cubic-bezier(.2, .9, .3, 1.2); transition: opacity .3s, transform .3s; }
.toast > span { flex: 1; padding-top: 1px; }
.toast > .icon { margin-top: 1px; }
.toast-success > .icon { color: var(--success); }
.toast-error > .icon { color: var(--danger); }
.toast-info > .icon { color: var(--accent-text); }
.toast-success { box-shadow: inset 3px 0 0 var(--success), var(--shadow-lg); }
.toast-error { box-shadow: inset 3px 0 0 var(--danger), var(--shadow-lg); }
.toast-info { box-shadow: inset 3px 0 0 var(--accent-hover), var(--shadow-lg); }
[dir="rtl"] .toast-success { box-shadow: inset -3px 0 0 var(--success), var(--shadow-lg); }
[dir="rtl"] .toast-error { box-shadow: inset -3px 0 0 var(--danger), var(--shadow-lg); }
[dir="rtl"] .toast-info { box-shadow: inset -3px 0 0 var(--accent-hover), var(--shadow-lg); }
.toast-close { background: none; border: 0; color: var(--muted); padding: 2px; border-radius: 6px; cursor: pointer; display: grid; }
.toast-close:hover { background: var(--surface-2); color: var(--text); }
.toast.out { opacity: 0; transform: translateX(12px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.97); } }

/* inline notices */
.notice { display: flex; gap: 11px; align-items: flex-start; padding: 13px 15px; border-radius: 12px; margin-bottom: 14px; font-size: .92rem; font-weight: 550; line-height: 1.45; border: 1px solid; }
.notice > .icon { margin-top: 1px; }
.notice-info { background: var(--accent-soft); border-color: #f5c6c0; color: #8f2417; }
.notice-success { background: var(--success-soft); border-color: #bfe6cf; color: #0b5e33; }
.notice-error { background: var(--danger-soft); border-color: #f6c3c9; color: #9b1726; }

/* confirmation dialog */
.confirm-modal { text-align: center; width: min(400px, 92vw); padding: 28px 24px 22px; }
.confirm-modal[open] { animation: modalIn .22s cubic-bezier(.2, .9, .3, 1.15); }
.confirm-modal::backdrop { animation: fadeIn .2s ease-out; }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes fadeIn { from { opacity: 0; } }
.confirm-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.confirm-icon.danger { background: var(--danger-soft); color: var(--danger); }
.confirm-title { font-size: 1.15rem; margin-bottom: 6px; }
.confirm-msg { color: var(--muted); margin-bottom: 0; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: #c0202f; color: #fff; }

/* loading buttons */
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::after { content: ''; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-color: var(--accent-ink) var(--accent-ink) transparent transparent; animation: spin .7s linear infinite; }
.btn-ghost.is-loading::after, .btn-outline.is-loading::after, .btn.is-loading:not(.btn-primary)::after { border-color: var(--text) var(--text) transparent transparent; }
.btn-danger-solid.is-loading::after, .btn-live.is-loading::after { border-color: #fff #fff transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* image picker */
.dropzone { position: relative; display: grid; place-items: center; border: 1.5px dashed var(--border-strong); border-radius: 16px; background: var(--surface-2); cursor: pointer; overflow: hidden; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent-hover); background: var(--accent-soft); }
.dz-square { aspect-ratio: 1; max-width: 300px; }
.dz-portrait { aspect-ratio: 3 / 4; max-width: 260px; }
.dz-round { width: 132px; height: 132px; border-radius: 50%; }
.dz-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
.dz-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.dropzone.has-image .dz-preview { display: block; }
.dropzone.has-image { border-style: solid; border-color: var(--border); }
.dz-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px; text-align: center; color: var(--muted); }
.dz-empty .icon { color: var(--accent-text); }
.dz-empty strong { color: var(--text); font-size: .9rem; }
.dz-empty small { font-size: .78rem; }
.dz-round .dz-empty strong, .dz-round .dz-empty small { display: none; }
.dropzone.has-image .dz-empty { display: none; }
.dz-change { position: absolute; bottom: 10px; display: none; align-items: center; gap: 6px; background: rgba(22, 21, 26, .75); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: .8rem; font-weight: 650; backdrop-filter: blur(6px); }
.dropzone.has-image .dz-change { display: inline-flex; }
.dz-round .dz-change { bottom: 8px; padding: 5px 9px; font-size: 0; gap: 0; }

/* password reveal */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-inline-end: 46px; }
.pw-toggle { position: absolute; top: 50%; inset-inline-end: 6px; transform: translateY(-50%); background: none; border: 0; color: var(--muted); padding: 7px; border-radius: 8px; cursor: pointer; display: grid; }
.pw-toggle:hover { color: var(--text); background: var(--surface-2); }

/* styled selects */
select { appearance: none; -webkit-appearance: none; padding-inline-end: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236f6b75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
[dir="rtl"] select { background-position: left 12px center; }

/* empty states, FAQ, pager */
.empty-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--surface-2); color: var(--muted); margin-bottom: 12px; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--muted); transition: transform .2s; }
.faq[open] summary .icon { transform: rotate(180deg); }
.pager { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 26px 0 6px; }
.pager .muted { font-weight: 600; font-size: .9rem; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; padding: 40px 36px; margin: 6px 0 24px; border-radius: 28px; overflow: hidden; border: 1px solid var(--border);
  background: radial-gradient(900px 380px at 0% -10%, #fde3df, transparent 60%),
              radial-gradient(700px 320px at 100% 110%, #fff0e6, transparent 60%), var(--surface); box-shadow: var(--shadow); }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); letter-spacing: -.04em; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 520px; }
.hero-art { display: flex; justify-content: center; }
.hero-phone { position: relative; width: 220px; aspect-ratio: 9 / 16; border-radius: 30px; border: 7px solid #0a0a0a; box-shadow: var(--shadow-lg), 0 30px 80px rgba(224, 62, 45, .25); color: #fff;
  background: radial-gradient(120% 70% at 50% 0%, #E03E2D 0%, rgba(224, 62, 45, .35) 45%, transparent 75%), linear-gradient(180deg, #2a0d09, #050505); padding: 14px; display: flex; flex-direction: column; justify-content: space-between; transform: rotate(-3deg); }
.hero-bid { background: rgba(0, 0, 0, .5); backdrop-filter: blur(6px); border-radius: 14px; padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; }
.hero-bid small { grid-column: 1 / -1; color: #eee; }
.hero-bid strong { font-size: 1.3rem; }
.hero-bid span { color: var(--accent); font-weight: 800; font-size: 1.2rem; }

/* ---------- show & product grids ---------- */
.grid-shows { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 18px; }
.show-card { display: block; }
.show-card:hover { color: var(--text); }
.show-card:hover .show-thumb img { transform: scale(1.04); }
.show-thumb { position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; background: var(--surface-3); box-shadow: var(--shadow); }
.show-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.show-thumb .pill { position: absolute; top: 9px; inset-inline-start: 9px; }
.show-meta { padding: 9px 2px; }
.seller-line { display: flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 650; }
.show-title { font-weight: 600; font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; color: #3a3840; }
.show-admin .row { margin-top: -4px; }

.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 18px; }
.product-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; }
.product-card:hover { color: var(--text); box-shadow: var(--shadow); transform: translateY(-2px); }
.product-thumb { position: relative; aspect-ratio: 1; background: var(--surface-2); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb .pill { position: absolute; top: 9px; inset-inline-start: 9px; }
.product-meta { padding: 11px 13px 13px; }
.product-title { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-price { display: flex; gap: 4px; align-items: baseline; flex-wrap: wrap; }

.seller-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.seller-chip { flex: none; width: 124px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 16px 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-weight: 650; font-size: .88rem; box-shadow: var(--shadow-sm); }

.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.how-n { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 800; margin-bottom: 12px; }

/* ---------- profile ---------- */
.profile-head { display: flex; gap: 22px; align-items: flex-start; padding: 24px 0 6px; flex-wrap: wrap; }
.profile-head h1 { margin-bottom: 2px; }
.verified { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--teal); color: #fff; font-size: .75rem; vertical-align: middle; }
.stats { display: flex; gap: 18px; flex-wrap: wrap; margin: 10px 0; }
.stars { color: #e3a000; font-weight: 700; letter-spacing: 1px; }
.bio { max-width: 640px; }

/* ---------- product page ---------- */
.product-page { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; margin-top: 10px; }
.product-media { padding: 0; overflow: hidden; }
.product-media img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.price-big { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; margin: 14px 0 2px; }
.seller-box { display: flex; gap: 12px; align-items: center; margin-top: 22px; }

/* ---------- lists & tables ---------- */
.list { padding: 0; overflow: hidden; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item.unread { background: var(--accent-soft); }
.list-item.review { align-items: flex-start; }
.list-item.review p { margin: 4px 0; }
a.list-item:hover { background: var(--surface-2); color: var(--text); }
.list-item small.muted { white-space: nowrap; }
.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 12px 14px; text-align: start; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 650; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafafa; }
.table .end { text-align: end; }
.table tr.banned td { opacity: .5; }
.table.kv td { padding: 10px 0; background: none; }
.table.kv tr.total td { font-weight: 800; font-size: 1.05rem; }
.wallet-form input[name="amount"] { width: 80px; }
.wallet-form input[name="note"] { width: 100px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.stat strong { font-size: 1.55rem; letter-spacing: -.02em; }
a.stat:hover { border-color: var(--accent-hover); color: var(--text); }

.wallet-hero { text-align: center; padding: 36px 18px; background: linear-gradient(135deg, #fde3df, #fff0e6); border: 0; }
.wallet-amount { font-size: 2.8rem; font-weight: 800; letter-spacing: -.03em; margin: 4px 0 8px; }

.stepper { display: flex; list-style: none; padding: 0; margin: 0 0 20px; counter-reset: s; }
.stepper li { flex: 1; text-align: center; position: relative; color: var(--muted); font-size: .85rem; font-weight: 650; padding-top: 36px; counter-increment: s; }
.stepper li::before { content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); }
.stepper li.done { color: var(--text); }
.stepper li.done::before { background: var(--accent); color: transparent; }
.stepper li.done::after { content: ''; position: absolute; top: 9px; left: 50%; width: 11px; height: 6px; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: translateX(-50%) rotate(-45deg); }
.order-item { display: flex; gap: 16px; align-items: center; }
.actions-card form, .card.actions form { margin-bottom: 8px; }
.rating-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; margin-bottom: 10px; }
.rating-input input { display: none; }
.rating-input label { font-size: 1.9rem; color: var(--surface-3); cursor: pointer; }
.rating-input input:checked ~ label, .rating-input label:hover, .rating-input label:hover ~ label { color: #f2b200; }

.sell-hero { padding: 18px 0 6px; }
.perks { list-style: none; padding: 0; display: grid; gap: 10px; font-weight: 600; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin: 10px 0 0; }

/* ---------- error & install pages ---------- */
.error-page { text-align: center; padding: 70px 10px; }
.error-code { font-size: 5.5rem; font-weight: 800; letter-spacing: -.05em; line-height: 1; background: linear-gradient(135deg, var(--accent-hover), var(--live)); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 10px; }
.error-detail { text-align: start; background: var(--surface-2); padding: 12px; border-radius: 10px; overflow-x: auto; font-size: .8rem; }
.install-page { padding-bottom: 40px; }
.install-head { display: flex; gap: 16px; align-items: center; margin: 28px 0 20px; }
.install-head h1 { margin: 0; }
.install-head p { margin: 0; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checks li { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; }
.checks li.ok { color: var(--success); }
.checks li.ko { color: var(--danger); }
.checks li.warn { color: var(--accent-text); }
.install-page h2 { margin-top: 18px; }

/* ---------- footer & tab bar ---------- */
.footer { border-top: 1px solid var(--border); margin-top: 60px; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 28px; padding-top: 44px; padding-bottom: 26px; }
.footer-grid h4 { margin: 4px 0 12px; font-size: .76rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.footer-grid > div:not(.footer-brand) { display: flex; flex-direction: column; gap: 10px; font-size: .92rem; }
.footer-brand p { margin-top: 12px; max-width: 340px; font-size: .9rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; padding-top: 18px; padding-bottom: 28px; border-top: 1px solid var(--border); color: var(--muted); font-size: .84rem; }
.tabbar { position: fixed; bottom: 0; inset-inline: 0; z-index: 40; display: none; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; color: var(--muted); }
.tabbar a.active { color: var(--text); }
.tabbar span { font-size: .66rem; font-weight: 650; }
.tab-plus { display: grid; place-items: center; width: 36px; height: 27px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); }

/* ---------- live room (the video stage stays dark, like every live app) ---------- */
.live-page { padding-bottom: 0; }
.live-main { max-width: 1280px; margin: 0 auto; padding: 16px; }
.live-room { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 20px; align-items: start; }
.stage {
  --text: #fff; --muted: #c4c2cc; --border: rgba(255, 255, 255, .14); --surface-3: #2c2b33;
  position: relative; height: calc(100vh - var(--topbar-h) - 32px); min-height: 520px; aspect-ratio: 9 / 16; max-width: 100%; justify-self: center;
  border-radius: 24px; overflow: hidden; background: #0b0b0e; color: var(--text); box-shadow: var(--shadow-lg);
}
.video { position: absolute; inset: 0; }
.video-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(18px) brightness(.45); transform: scale(1.1); }
.video video.stream { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video video.mirror { transform: scaleX(-1); }
.video-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 20px; font-size: 1.05rem; }
.video-msg strong { font-size: 1.3rem; }
.audio-btn { position: absolute; top: 76px; left: 50%; transform: translateX(-50%); z-index: 5; }

.stage-top { position: absolute; top: 0; inset-inline: 0; display: flex; gap: 8px; align-items: center; padding: 12px; background: linear-gradient(rgba(0, 0, 0, .6), transparent); z-index: 3; }
.stage-top .btn-ghost { background: rgba(255, 255, 255, .14); border-color: transparent; color: #fff; }
.host { display: flex; gap: 8px; align-items: center; min-width: 0; }
.host:hover { color: #fff; }
.host span { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.host small { color: #ddd; font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.rt-dot { width: 7px; height: 7px; border-radius: 50%; background: #8a8894; display: inline-block; }
.rt-dot.on { background: #2fe08a; box-shadow: 0 0 0 3px rgba(47, 224, 138, .25); }

.chat-overlay { position: absolute; inset-inline-start: 0; bottom: 150px; width: 78%; max-height: 38%; overflow-y: auto; padding: 0 12px; z-index: 2; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(transparent, #000 25%); mask-image: linear-gradient(transparent, #000 25%); display: flex; flex-direction: column; gap: 6px; }
.chat-overlay::-webkit-scrollbar { display: none; }
.msg { font-size: .86rem; line-height: 1.35; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); display: flex; gap: 6px; align-items: flex-start; animation: msgIn .2s ease-out; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } }
.msg strong { flex: none; color: #ddd; }
.msg span { word-break: break-word; }
.msg-host strong { color: var(--accent); }
.msg-system { background: rgba(0, 0, 0, .45); border-radius: 9px; padding: 5px 10px; color: var(--accent); font-weight: 600; align-self: flex-start; text-shadow: none; }

.stage-bottom { position: absolute; bottom: 0; inset-inline: 0; padding: 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .78) 35%); z-index: 3; display: flex; flex-direction: column; gap: 8px; }
.auction-bar { display: flex; gap: 10px; align-items: center; background: rgba(255, 255, 255, .96); color: #16151a; border-radius: 18px; padding: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.auction-bar.winning { box-shadow: 0 0 0 2px #2fe08a, 0 10px 30px rgba(0, 0, 0, .35); }
.auction-bar.bump { animation: bump .35s ease-out; }
@keyframes bump { 40% { transform: scale(1.03); } }
.auction-img { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; flex: none; background: #eee; }
.auction-info { flex: 1; min-width: 0; }
.auction-title { font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auction-sub { font-size: .76rem; color: #6f6b75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auction-price { text-align: end; display: flex; flex-direction: column; line-height: 1.15; }
.auction-price small { font-size: .68rem; color: #6f6b75; }
.auction-price strong { font-size: 1.12rem; }
.timer { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent-text); }
.timer.urgent { color: var(--live); animation: blink .5s steps(2) infinite; }
@keyframes blink { 50% { opacity: .55; } }
.auction-result { text-align: center; font-weight: 800; padding: 11px; border-radius: 14px; background: #2c2b33; animation: pop .3s ease-out; }
.auction-result.won { background: #2fe08a; color: #052914; }
.auction-result.sold { background: var(--accent); color: var(--accent-ink); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }

.bid-row { display: flex; gap: 8px; align-items: center; }
.chat-form { flex: 1; min-width: 0; }
.chat-form input { border-radius: 999px; background: rgba(255, 255, 255, .14); border-color: transparent; color: #fff; padding: 11px 15px; box-shadow: none; }
.chat-form input::placeholder { color: rgba(255, 255, 255, .65); }
.bid-btn { padding: 12px 20px; font-size: 1rem; box-shadow: 0 6px 22px rgba(224, 62, 45, .5); }
.bid-custom { padding: 12px 13px; background: rgba(255, 255, 255, .14); color: #fff; border: 0; }
.bid-custom:hover { background: rgba(255, 255, 255, .22); color: #fff; }

.side { display: flex; flex-direction: column; max-height: calc(100vh - var(--topbar-h) - 32px); overflow-y: auto; }
.side h1 { font-size: 1.3rem; }
.studio-opts { margin: 12px 0 6px; align-items: center; }
.studio-opts select { width: auto; padding: 6px 10px; margin-inline-start: 6px; }
.shop { flex: 1; }
.shop-list { display: flex; flex-direction: column; }
.shop-item { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.shop-item:last-child { border-bottom: 0; }
.shop-item.sold { opacity: .5; }
.shop-item.on-air { background: var(--accent-soft); border-radius: 12px; padding-inline: 8px; }
.shop-title { font-weight: 650; font-size: .9rem; }

.modal { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 20px; padding: 24px; width: min(360px, 92vw); box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(22, 21, 26, .45); backdrop-filter: blur(2px); }
.modal input { font-size: 1.4rem; font-weight: 700; text-align: center; margin-bottom: 14px; }

/* ---------- icons in components ---------- */
[dir="rtl"] .icon-arrow-left, [dir="rtl"] .icon-arrow-right { transform: scaleX(-1); }
.inline-icon { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: .9rem; padding: 6px 0; }
.back-link:hover { color: var(--text); }
.chip { display: inline-flex; align-items: center; gap: 7px; }
.chip .icon { color: var(--muted); }
.chip.active .icon { color: var(--accent); }
.pill .icon { opacity: .95; }
.pill-sep { width: 1px; height: 10px; background: rgba(255, 255, 255, .45); margin: 0 2px; }
.live-dot.white { background: #fff; box-shadow: none; animation: blink 1.2s steps(2) infinite; }
.verified { width: auto; height: auto; background: none; color: var(--teal); display: inline-flex; }
.rating { display: inline-flex; align-items: center; gap: 4px; }
.rating .icon { color: #f2b200; }
.stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.stars .on { color: #f2b200; }
.stars .off { color: var(--surface-3); }
.rating-input label { display: inline-flex; color: var(--surface-3); }
.rc-title { display: inline-flex; align-items: center; gap: 8px; }
.rc-title .icon { color: var(--accent-text); }
.perks li { display: flex; align-items: center; gap: 12px; }
.perk-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.big-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 12px; }
.h-icon { display: flex; align-items: center; gap: 9px; }
.h-icon .icon { color: var(--accent-text); }
.cat-icon-cell .icon { color: var(--accent-text); }
.shop-meta { display: inline-flex; align-items: center; gap: 5px; }
.sd-badge { display: inline-flex; align-items: center; gap: 3px; background: #fdecea; color: #b52a1b; border-radius: 6px; padding: 1px 6px; font-weight: 700; font-size: .7rem; }
.audio-btn, .bid-btn, .auction-result { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.auction-result { display: flex; }
.btn .icon { margin-inline-start: -2px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hide-md { display: none; }
}
@media (max-width: 980px) {
  .primary-nav { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .live-room { grid-template-columns: 1fr; }
  .side { max-height: none; }
  .product-page { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .tabbar { display: flex; }
  .hide-sm { display: none; }
  .hero { grid-template-columns: 1fr; padding: 28px 20px; border-radius: 22px; }
  .hero-art { display: none; }
  .how-grid, .grid-3, .checks { grid-template-columns: 1fr; }
  .grid-shows { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid-products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .live-main { padding: 0; }
  .stage { height: calc(100dvh - var(--topbar-h)); min-height: 0; width: 100%; aspect-ratio: auto; border-radius: 0; }
  .side { padding: 14px 16px 80px; }
  .chat-overlay { bottom: 140px; }
}
@media (max-width: 480px) {
  .hide-xs { display: none; }
  .search input { padding-top: 9px; padding-bottom: 9px; }
  .logo span { display: none; }
  .topbar-inner { gap: 10px; }
  .lang-btn span { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .stepper li { font-size: .74rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .auth-card { padding: 24px 18px; }
}

/* ---------- brand wordmark ---------- */
.logo { font-family: var(--font-brand); }
.wordmark { display: inline-flex; align-items: baseline; gap: 7px; line-height: 1; white-space: nowrap; }
.wm-name { font-family: var(--font-brand); font-weight: 700; font-size: 1.32rem; letter-spacing: -.045em; color: var(--text); }
.wm-by { font-family: var(--font-brand); font-size: .74rem; font-weight: 600; color: var(--muted); letter-spacing: -.01em; }
.footer .wm-name { font-size: 1.2rem; }
h1, h2, .price-big, .wallet-amount, .error-code, .stat strong { font-family: var(--font-brand); }
[dir="rtl"] h1, [dir="rtl"] h2 { font-family: var(--font); }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-phone .pill { align-self: flex-start; }
.search { min-width: 0; }
@media (max-width: 760px) {
  .top-actions .btn-primary.btn-sm { display: none; }   /* sign-up lives in the hero CTA + login page on phones */
  .lang-btn span { display: none; }
  .hero .row { flex-wrap: wrap; }
}
.show-title { color: #27272a; }

/* ---------- legal pages, support ---------- */
.legal { padding: 32px clamp(18px, 4vw, 40px); line-height: 1.7; }
.legal h1 { margin-bottom: 4px; }
.legal h2 { font-size: 1.05rem; margin: 26px 0 8px; }
.legal p { color: #3f3f46; margin-bottom: .7em; }
.footer-legal { display: inline-flex; gap: 16px; flex-wrap: wrap; }
.footer-legal a:hover { color: var(--text); }
.contact-card .row { margin: 6px 0 4px; }
.legal-links { margin: 14px 0 0; }
.check a { text-decoration: underline; text-underline-offset: 2px; }
/* ---------- live room: video layering, readability ---------- */
.video-poster { z-index: 0; }
.video video.stream { z-index: 1; }
.video-msg { z-index: 2; }
.video.has-stream .video-poster { display: none; }          /* never cover the live video */
.msg-system { color: #fff; background: rgba(224, 62, 45, .9); text-shadow: none; }
.stage-back, .stage-rail, .sheet-head, .sheet-backdrop { display: none; }

/* ---------- live room on phones: full screen, action rail, bottom sheet ---------- */
@media (max-width: 760px) {
  body.live-page { overflow: hidden; height: 100dvh; padding-bottom: 0; }
  .live-page .topbar, .live-page .tabbar { display: none; }
  .live-page .toasts { top: calc(12px + env(safe-area-inset-top)); }
  .live-page .live-main { padding: 0; }
  .live-page .stage { height: 100dvh; border-radius: 0; box-shadow: none; }
  .stage-top { padding-top: calc(10px + env(safe-area-inset-top)); gap: 8px; }
  .stage-back { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(0, 0, 0, .4); color: #fff; flex: none; }
  .stage-back:hover { color: #fff; }
  .host small { max-width: 120px; }
  .stage-bottom { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .chat-overlay { width: 74%; bottom: calc(150px + env(safe-area-inset-bottom)); }

  .stage-rail { display: flex; flex-direction: column; gap: 14px; position: absolute; right: 10px; bottom: calc(170px + env(safe-area-inset-bottom)); z-index: 4; }
  .rail-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; color: #fff; font: 600 .68rem var(--font); cursor: pointer; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
  .rail-ico { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(0, 0, 0, .42); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .rail-btn:active .rail-ico { transform: scale(.94); }
  .rail-count { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 800; display: grid; place-items: center; border: 2px solid rgba(0, 0, 0, .25); }

  .sheet-backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 10, 10, .5); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .25s; }
  .live-room .side {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 84dvh; overflow-y: auto; overscroll-behavior: contain;
    background: var(--bg); border-radius: 22px 22px 0 0; padding: 0 14px calc(18px + env(safe-area-inset-bottom));
    box-shadow: 0 -18px 50px rgba(0, 0, 0, .25); transform: translateY(105%); transition: transform .3s cubic-bezier(.2, .9, .3, 1);
  }
  .live-room.sheet-open .side { transform: none; }
  .live-room.sheet-open .sheet-backdrop { opacity: 1; pointer-events: auto; }
  .sheet-head { display: flex; justify-content: center; position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 10px 0 6px; margin: 0 -14px 8px; }
  .sheet-handle { width: 42px; height: 5px; border-radius: 999px; background: var(--border-strong); margin-top: 4px; }
  .sheet-close { position: absolute; right: 10px; top: 6px; background: var(--surface-2); border: 0; color: var(--text); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
  .live-room .side .card { margin-bottom: 12px; }
}
/* ---------- live room polish ---------- */
.bid-btn.is-winning, .bid-btn.is-winning:disabled { background: #12924f; color: #fff; opacity: 1; box-shadow: 0 6px 22px rgba(18, 146, 79, .45); }
.bid-custom { display: inline-flex; align-items: center; gap: 6px; }
.host { min-width: 0; flex: 0 1 auto; }
.host strong { display: block; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
  .bid-row { gap: 8px; }
  .bid-row .chat-form { flex: 1 1 auto; min-width: 96px; }
  .bid-custom { width: 46px; height: 46px; padding: 0; justify-content: center; border-radius: 50%; flex: none; }
  .bid-custom span { display: none; }                 /* icon-only on phones, label stays as aria-label */
  .bid-btn { flex: 0 1 auto; padding: 12px 18px; }
  .stage-top .btn-sm { padding: 6px 11px; font-size: .78rem; flex: none; }
  .host strong { max-width: 96px; }
  .host small { max-width: 96px; }
}
/* custom bid is an icon button everywhere (label kept for screen readers); chat keeps a usable width */
.bid-row .chat-form { flex: 1 1 auto; min-width: 110px; }
.bid-custom { width: 46px; height: 46px; padding: 0; justify-content: center; border-radius: 50%; flex: none; }
.bid-custom span { display: none; }
.bid-btn { flex: 0 1 auto; }
/* ---------- app feel: touch, press states, transitions ---------- */
html { -webkit-tap-highlight-color: transparent; touch-action: manipulation; -webkit-text-size-adjust: 100%; }
button, .btn, .chip, .tab, .tabbar a, .rail-btn, .menu a, .menu-item { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.btn, .chip, .icon-btn, .rail-ico, .tabbar a, .product-card, .show-card, .seller-chip, .list-item, .radio-card { transition: transform .12s ease, background-color .15s, box-shadow .15s, border-color .15s, opacity .15s; }
.btn:active, .chip:active, .icon-btn:active, .tabbar a:active, .seller-chip:active, .radio-card:active { transform: scale(.96); }
.product-card:active, .show-card:active, a.list-item:active { transform: scale(.985); }
.rail-btn:active .rail-ico { transform: scale(.9); }
.tabbar a:active .icon { transform: scale(.9); }

/* hover effects only where a real pointer exists — no "stuck" hover after a tap on phones */
@media (hover: none) {
  a:hover { color: inherit; }
  .btn:hover { background: var(--surface-2); }
  .btn-primary:hover { background: var(--accent); }
  .btn-ghost:hover { background: var(--surface); }
  .btn-danger:hover { background: var(--danger-soft); }
  .product-card:hover { transform: none; box-shadow: var(--shadow-sm); }
  .show-card:hover .show-thumb img { transform: none; }
  .chip:hover { border-color: var(--border); }
  .primary-nav a:hover, .icon-btn:hover, .nav-link:hover { background: none; }
}

/* iOS zooms into inputs smaller than 16px — keep forms steady on phones */
@media (max-width: 760px) {
  input, select, textarea { font-size: 16px; }
}

/* smooth page-to-page transitions (header stays put, content cross-fades) */
@view-transition { navigation: auto; }
.topbar { view-transition-name: topbar; }
.tabbar { view-transition-name: tabbar; }
::view-transition-old(root) { animation: vt-out .16s ease both; }
::view-transition-new(root) { animation: vt-in .2s ease both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }

body.live-page { overscroll-behavior: none; }
.install-btn { align-self: flex-start; margin-top: 4px; }

/* host controls on the video (flip camera, mic) — on every screen size */
.stage-rail { display: flex; flex-direction: column; gap: 14px; position: absolute; right: 10px; bottom: 170px; z-index: 4; }
.rail-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; color: #fff; font: 600 .68rem var(--font); cursor: pointer; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.rail-ico { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(0, 0, 0, .42); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.rail-btn.is-off .rail-ico { background: rgba(224, 62, 45, .85); }
.rail-btn:disabled { opacity: .6; }
.rail-btn[data-sheet-open] { display: none; }          /* desktop: the side column is visible, no sheet */
@media (max-width: 760px) {
  .rail-btn[data-sheet-open] { display: flex; }
  .stage-rail { bottom: calc(170px + env(safe-area-inset-bottom)); }
}
.stage-golive { align-self: center; box-shadow: 0 10px 30px rgba(224, 62, 45, .5); animation: pop .3s ease-out; }