:root {
  --bg: #000000;
  --bg2: #111113;
  --card: #1c1c1f;
  --card-hover: #222225;
  --text: #f5f5f8;
  --text2: rgba(245, 245, 248, 0.7);
  --text3: rgba(245, 245, 248, 0.44);
  --accent: #2e3b5e;
  --accent2: #4a3b5e;
  --border: rgba(255, 255, 255, 0.09);
  --r: 14px;
  --rs: 10px;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --topbar: 56px;
  --tabbar: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Top bar ── */
.app-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--topbar);
  padding: 0 16px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.app-logo {
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  color: var(--text);
}
.app-logo span { opacity: 0.85; }

.app-topbar-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  pointer-events: none;
}

.app-topbar-right { display: flex; align-items: center; gap: 8px; }

.app-topbar-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  text-decoration: none;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}
.app-topbar-action:hover { background: rgba(255, 255, 255, 0.1); }

/* ── Screens ── */
.app-screens {
  flex: 1;
  position: relative;
  overflow: hidden;
  margin-top: var(--topbar);
}

.app-screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.app-screen[hidden] { display: none; }

.screen-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px calc(var(--tabbar) + var(--safe-b) + 16px);
}

/* ── Tab bar ── */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: var(--tabbar);
  padding: 6px 0 calc(6px + var(--safe-b));
  background: rgba(10, 10, 12, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  background: none;
  color: var(--text3);
  font: inherit;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.tab svg { flex-shrink: 0; }
.tab.is-active { color: var(--text); }
.tab:focus-visible { outline: 2px solid rgba(255,255,255,0.5); outline-offset: -2px; border-radius: 8px; }

/* ── Home layout ── */
.home-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: 100%;
}

.feed-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 20px calc(var(--tabbar) + var(--safe-b) + 16px);
}

/* ── Filter sidebar (hidden on mobile, visible on desktop) ── */
.filter-sidebar {
  display: none;
}

.filter-sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px calc(var(--tabbar) + var(--safe-b) + 16px);
}

.filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.filter-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
}
.filter-clear {
  padding: 5px 10px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--text3);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}
.filter-clear:hover { background: rgba(255,255,255,0.1); color: var(--text2); }

.filter-group {
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.filter-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 0;
  border: none;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}
.filter-group-toggle svg { color: var(--text3); transition: transform 0.2s; }
.filter-group-toggle.is-collapsed svg { transform: rotate(-90deg); }

.filter-group-body {
  padding-bottom: 12px;
}
.filter-group-body:not(.is-open) { display: none; }

.filter-check,
.filter-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.82rem;
  color: var(--text2);
  cursor: pointer;
}
.filter-check:hover,
.filter-radio:hover { color: var(--text); }

.filter-check input,
.filter-radio input {
  accent-color: #0a84ff;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.filter-size-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.filter-size-btn {
  padding: 8px 4px;
  border: 1px solid var(--border);
  border-radius: var(--rs);
  background: rgba(255,255,255,0.03);
  color: var(--text2);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.filter-size-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.filter-size-btn.is-active {
  background: rgba(10,132,255,0.18);
  border-color: rgba(10,132,255,0.4);
  color: #0a84ff;
}

.filter-range {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.filter-range-field {
  flex: 1;
}
.filter-range-field label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text3);
  margin-bottom: 4px;
}
.filter-range-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--rs);
  background: rgba(255,255,255,0.03);
}
.filter-range-input-wrap span {
  font-size: 0.82rem;
  color: var(--text3);
  font-weight: 600;
}
.filter-range-input-wrap input {
  width: 100%;
  min-width: 0;
  border: none;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  outline: none;
}
.filter-range-input-wrap input::placeholder { color: var(--text3); }
.filter-range-input-wrap:focus-within { border-color: rgba(255,255,255,0.25); }
.filter-range-sep {
  font-size: 0.82rem;
  color: var(--text3);
  padding-bottom: 10px;
}

.filter-apply {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  border: none;
  border-radius: var(--r);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(46,59,94,0.3);
}
.filter-apply:hover { box-shadow: 0 6px 24px rgba(46,59,94,0.4); }

/* Filter active bar (chip tags) */
.filter-active-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--card);
}
.filter-active-bar[hidden] { display: none; }
.filter-active-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10,132,255,0.14);
  border: 1px solid rgba(10,132,255,0.25);
  color: #0a84ff;
  font-size: 0.7rem;
  font-weight: 700;
}
.filter-chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: rgba(10,132,255,0.25);
  color: #0a84ff;
  font-size: 0.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.filter-chip-x:hover { background: rgba(10,132,255,0.4); }
.filter-chips-clear {
  padding: 4px 10px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--text3);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.filter-chips-clear:hover { background: rgba(255,255,255,0.1); color: var(--text2); }

/* Mobile filter toggle */
.filter-toggle-mobile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: var(--text2);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}
.filter-toggle-mobile:hover { background: rgba(255,255,255,0.1); }

.feed-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Home feed ── */
.feed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.feed-heading {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.feed-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text2);
  cursor: pointer;
}
.feed-refresh:hover { background: rgba(255, 255, 255, 0.1); }
.feed-refresh:disabled { opacity: 0.4; pointer-events: none; }

.feed-status {
  margin: 0 0 14px;
  font-size: 0.76rem;
  color: var(--text3);
}

.boot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* Boot card */
.boot-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  transition: background 0.15s;
}
.boot-card:hover { background: var(--card-hover); border-color: rgba(255,255,255,0.15); transform: translateY(-2px); }

.boot-card-img {
  position: relative;
  aspect-ratio: 1;
  background: linear-gradient(145deg, rgba(46,59,94,0.45), rgba(74,59,94,0.2));
  overflow: hidden;
}
.boot-card-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.boot-card-price {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0,0,0,0.72);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.boot-card-body { padding: 10px; }

.boot-card-brand {
  display: block;
  margin-bottom: 3px;
  color: var(--text3);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.boot-card-name {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
}
.boot-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}
.boot-card-chip {
  padding: 4px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text2);
  font-size: 0.64rem;
  font-weight: 700;
}
.boot-card-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px;
  border-radius: var(--rs);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  text-decoration: none;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
.boot-card-cta:hover { background: rgba(255,255,255,0.09); }

.boot-card-skeleton {
  aspect-ratio: 3/4;
  border-radius: var(--r);
  background: linear-gradient(145deg, rgba(46,59,94,0.18), rgba(28,28,31,0.5));
  border: 1px solid var(--border);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.boot-empty {
  grid-column: 1 / -1;
  padding: 32px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--r);
  text-align: center;
  color: var(--text2);
  font-size: 0.88rem;
}

/* ── Generic screen elements ── */
.screen-heading {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.screen-sub {
  margin: 0 0 18px;
  color: var(--text2);
  font-size: 0.88rem;
}

.screen-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--card);
  margin-bottom: 12px;
}
.screen-card strong { display: block; margin-bottom: 3px; font-size: 0.9rem; }
.screen-card span { color: var(--text2); font-size: 0.82rem; }

.screen-card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--rs);
  background: linear-gradient(135deg, rgba(46,59,94,0.5), rgba(74,59,94,0.3));
  color: var(--text);
}

.screen-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  border: none;
  border-radius: var(--r);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--text);
  text-decoration: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(46,59,94,0.3);
}
.screen-cta:disabled { opacity: 0.6; pointer-events: none; }
.screen-cta:hover { box-shadow: 0 10px 32px rgba(46,59,94,0.4); }

/* ── Sell screen ── */
.sell-page { max-width: 1000px; margin: 0 auto; }

.sell-header {
  padding: 24px 0 28px;
  text-align: center;
}
.sell-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(46,59,94,0.25), rgba(74,59,94,0.25));
  color: var(--text);
  margin-bottom: 14px;
}
.sell-header-title {
  margin: 0 0 6px;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.sell-header-sub {
  margin: 0 0 20px;
  color: var(--text2);
  font-size: 0.86rem;
}
.sell-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 4px;
}
.sell-step {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text3);
  transition: all 0.3s;
}
.sell-step.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
  color: #fff;
}
.sell-step.is-done {
  background: rgba(34,197,94,0.15);
  border-color: rgba(34,197,94,0.3);
  color: #22c55e;
}
.sell-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  font-weight: 800;
  font-size: 0.62rem;
}
.sell-step.is-active .sell-step-num { background: rgba(255,255,255,0.2); }
.sell-step.is-done .sell-step-num { background: rgba(34,197,94,0.3); }
.sell-step-label { font-weight: 600; }
.sell-step-line {
  width: 24px;
  height: 1.5px;
  background: var(--border);
  flex-shrink: 0;
}

.sell-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (min-width: 768px) {
  .sell-layout { flex-direction: row; gap: 24px; }
  .sell-col-left { flex: 1; min-width: 0; }
  .sell-col-right { flex: 1; min-width: 0; }
}

.sell-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 18px;
  transition: border-color 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}
.sell-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.sell-card:focus-within { border-color: rgba(74,59,94,0.4); box-shadow: 0 0 0 3px rgba(74,59,94,0.1); }
.sell-card:focus-within::before { opacity: 1; }
.sell-card-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
}
.sell-card-icon {
  flex-shrink: 0;
  opacity: 0.6;
}
.sell-card-hint {
  font-weight: 500;
  color: var(--text3);
  text-transform: none;
  letter-spacing: 0;
}

.sell-photos {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sell-photo-slot {
  border: 2px dashed rgba(255,255,255,0.12);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text3);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.2s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}
.sell-photo-slot:hover {
  border-color: rgba(74,59,94,0.5);
  background: rgba(74,59,94,0.08);
  color: var(--text2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.sell-photo-slot:active {
  transform: scale(0.97);
  box-shadow: none;
}

.sell-photo-main {
  aspect-ratio: 16/10;
  min-height: 180px;
}
.sell-photo-main span { font-size: 0.76rem; font-weight: 600; }

.sell-photo-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.sell-photo-add {
  aspect-ratio: 1;
}
.sell-photo-add span { font-size: 0.6rem; font-weight: 600; }

.sell-photo-slot.has-image {
  border-style: solid;
  border-color: rgba(52,199,89,0.4);
  overflow: hidden;
  padding: 0;
  box-shadow: 0 2px 12px rgba(34,197,94,0.15);
}
.sell-photo-slot.has-image:hover {
  border-color: rgba(52,199,89,0.6);
  box-shadow: 0 4px 20px rgba(34,197,94,0.25);
}
.sell-photo-slot.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.sell-photo-slot.has-image:hover img { transform: scale(1.05); }
.sell-photo-slot.has-image svg, .sell-photo-slot.has-image span { display: none; }

.sell-form {
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  overflow: hidden;
  transition: border-color 0.25s;
}
.sell-form:focus-within {
  border-color: rgba(74,59,94,0.3);
}

.sell-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  transition: background 0.2s;
  position: relative;
  overflow: hidden;
}
.sell-row + .sell-row { border-top: 1px solid var(--border); }
.sell-row[data-sell-picker] { cursor: pointer; }
.sell-row[data-sell-picker]:hover { background: rgba(255,255,255,0.04); }
.sell-row[data-sell-picker]:active { background: rgba(74,59,94,0.12); }
.sell-row[data-sell-picker] .sell-field-value svg {
  transition: transform 0.2s;
}
.sell-row[data-sell-picker]:hover .sell-field-value svg {
  transform: translateX(3px);
}
.sell-row[data-sell-picker]:active .sell-field-value svg {
  transform: translateX(1px) scale(0.9);
}

.sell-field-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

.sell-field-value {
  font-size: 0.84rem;
  color: var(--text2);
  text-align: right;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sell-field-placeholder { color: var(--text3); }
.sell-field-value:not(.sell-field-placeholder) {
  color: #22c55e;
  font-weight: 600;
}

.sell-input {
  flex: 1;
  min-width: 0;
  padding: 4px 0;
  border: none;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  text-align: right;
  outline: none;
  transition: color 0.2s;
}
.sell-input::placeholder { color: var(--text3); }
.sell-input:focus { color: #fff; }

.sell-price-wrap {
  display: flex;
  align-items: center;
  gap: 2px;
}
.sell-price-euro {
  font-size: 0.92rem;
  font-weight: 800;
  color: #22c55e;
}
.sell-input-price {
  width: 80px;
  flex: none;
}

.sell-hint {
  margin: 10px 0 0;
  font-size: 0.72rem;
  color: var(--text3);
  line-height: 1.4;
}

.sell-textarea {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  min-height: 140px;
  font: inherit;
  font-size: 0.84rem;
  color: var(--text);
  line-height: 1.55;
  outline: none;
  resize: vertical;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.sell-textarea::placeholder { color: var(--text3); }
.sell-textarea:focus {
  border-color: rgba(74,59,94,0.5);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 0 0 3px rgba(74,59,94,0.12);
}

.sell-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.25s, opacity 0.2s;
  box-shadow: 0 4px 16px rgba(34,197,94,0.3);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.sell-submit-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.2) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.sell-submit-btn:hover::after { opacity: 1; }
.sell-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(34,197,94,0.4);
}
.sell-submit-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(34,197,94,0.25);
}
.sell-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.sell-submit-content,
.sell-submit-loader {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spin-icon { animation: spin 1s linear infinite; }


/* ── Messages / Conversations ── */
.conv-list { display: grid; gap: 0; }

.conv-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 2px;
}
.conv-item:hover { background: rgba(255,255,255,0.04); }

.conv-av {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(46,59,94,0.65), rgba(74,59,94,0.45));
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 800;
  flex-shrink: 0;
  text-transform: uppercase;
  overflow: hidden;
}
.conv-av img { width: 100%; height: 100%; object-fit: cover; }

.conv-body { flex: 1; min-width: 0; }

.conv-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.conv-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-time {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text3);
  flex-shrink: 0;
}

.conv-preview {
  font-size: 0.8rem;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.conv-unread .conv-name { color: var(--text); }
.conv-unread .conv-preview { color: var(--text); font-weight: 600; }
.conv-unread .conv-time { color: #0a84ff; }
.conv-selected { background: rgba(46,59,94,0.3) !important; }

.conv-badge {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #0a84ff;
  color: #fff;
  font-size: 0.56rem;
  font-weight: 800;
  flex-shrink: 0;
}

.conv-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.conv-empty {
  padding: 32px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--r);
  text-align: center;
  color: var(--text2);
  font-size: 0.88rem;
}

.conv-skeleton {
  height: 74px;
  border-radius: var(--rs);
  background: linear-gradient(145deg, rgba(46,59,94,0.12), rgba(28,28,31,0.4));
  border: 1px solid var(--border);
  margin-bottom: 4px;
  animation: pulse 1.6s ease-in-out infinite;
}

/* ── Messages layout ── */
.messages-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.conv-sidebar {
  width: 100%;
  overflow-y: auto;
  padding: 0 20px;
  flex-shrink: 0;
}
.chat-panel {
  display: none;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  border-left: 1px solid var(--border);
  background: var(--bg);
}
.chat-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text3);
  font-size: 0.9rem;
}
.chat-active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.chat-back-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
}
.chat-header-av {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(46,59,94,0.7), rgba(74,59,94,0.5));
  font-size: 0.72rem;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}
.chat-header-av img { width: 100%; height: 100%; object-fit: cover; }
.chat-header-name { font-size: 0.96rem; }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chat-msg {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.84rem;
  line-height: 1.45;
  word-wrap: break-word;
}
.chat-msg-me {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg-them {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.chat-msg-time {
  font-size: 0.62rem;
  color: var(--text3);
  margin-top: 3px;
}
.chat-msg-me .chat-msg-time { text-align: right; }
.chat-typing {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 20px;
  background: var(--bg2);
}
.typing-dots {
  display: flex;
  gap: 4px;
}
.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text3);
  animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}
.typing-label {
  font-size: 0.72rem;
  color: var(--text3);
  font-style: italic;
}
.chat-input-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 16px calc(12px + var(--safe-b));
  border-top: 1px solid var(--border);
  background: var(--card);
}
.chat-input-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
}
.chat-input {
  width: 100%;
  padding: 12px 18px;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.chat-input::placeholder { color: var(--text3); }
.chat-input:focus {
  border-color: rgba(74, 59, 94, 0.6);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 3px rgba(74, 59, 94, 0.15);
}
.chat-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 2px 8px rgba(46, 59, 94, 0.4);
}
.chat-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(46, 59, 94, 0.5);
}
.chat-send-btn:active {
  transform: scale(0.92);
  box-shadow: 0 1px 4px rgba(46, 59, 94, 0.3);
}
.chat-send-btn.has-text {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 2px 12px rgba(34, 197, 94, 0.35);
}
.chat-send-btn.has-text:hover {
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.45);
}

/* ── Orders ── */
.order-list { display: grid; gap: 12px; }
.order-demo { display: grid; gap: 12px; margin-bottom: 16px; }

.order-item {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--card);
}
.order-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.order-item-top strong { font-size: 0.9rem; }

.order-badge {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.order-badge-green { background: rgba(52,199,89,0.18); color: #34c759; border: 1px solid rgba(52,199,89,0.22); }
.order-badge-blue { background: rgba(10,132,255,0.16); color: #0a84ff; border: 1px solid rgba(10,132,255,0.2); }
.order-badge-orange { background: rgba(255,159,10,0.16); color: #ff9f0a; border: 1px solid rgba(255,159,10,0.2); }
.order-badge-red { background: rgba(255,59,48,0.14); color: #ff3b30; border: 1px solid rgba(255,59,48,0.2); }

.order-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
}
.order-item-row span { color: var(--text2); }
.order-item-clickable { cursor: pointer; transition: border-color 0.2s; }
.order-item-clickable:hover { border-color: rgba(255,255,255,0.2); }

/* ── Profile ── */
.profile-scroll { padding-top: 8px; }
.profile-page { margin: 0 auto; }

.profile-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  padding: 28px;
  margin-bottom: 28px;
}

.profile-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.profile-card-top-right { display: flex; gap: 8px; }

.profile-toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  color: var(--text2);
  cursor: pointer;
}
.profile-toolbar-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 16px;
}

.profile-av-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 12px;
}

.profile-card-right { }

.profile-av {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(46,59,94,0.7), rgba(74,59,94,0.5));
  color: var(--text);
  font-size: 1.6rem;
  font-weight: 800;
  overflow: hidden;
  border: 3px solid var(--border);
}
.profile-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-av-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--card);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  cursor: pointer;
}
.profile-av-edit:hover { opacity: 0.85; }

.profile-name { display: block; font-size: 1.4rem; font-weight: 800; margin-bottom: 3px; }
.profile-handle { display: block; color: var(--text3); font-size: 0.86rem; margin-bottom: 6px; }
.profile-bio { margin: 8px 0 0; color: var(--text2); font-size: 0.86rem; line-height: 1.5; max-width: 420px; }
.profile-bio:empty { display: none; }
.profile-email { display: block; color: var(--text3); font-size: 0.74rem; margin-top: 6px; }
.profile-email:empty { display: none; }
.profile-joined { display: block; color: var(--text3); font-size: 0.68rem; margin-top: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.profile-joined:empty { display: none; }

.profile-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 18px;
}

.profile-action-btn {
  padding: 9px 20px;
  border-radius: var(--rs);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}
.profile-action-btn:hover { background: rgba(255,255,255,0.1); }
.profile-action-edit {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
}
.profile-action-edit:hover { opacity: 0.9; background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.profile-action-stripe { color: #635bff; border-color: rgba(99,91,255,0.3); }
.profile-action-stripe:hover { background: rgba(99,91,255,0.1); }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.profile-stat {
  text-align: center;
  padding: 12px 6px;
  border-radius: var(--rs);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
}
.profile-stat strong { display: block; font-size: 1.35rem; font-weight: 800; margin-bottom: 3px; }
.profile-stat span { color: var(--text3); font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }

.profile-grid {
  display: grid;
  gap: 0;
  margin-bottom: 20px;
}
.profile-col { }

/* Username input prefix */
.auth-input-prefix {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--rs);
  background: rgba(255,255,255,0.04);
}
.auth-input-prefix span {
  color: var(--text3);
  font-size: 0.88rem;
  font-weight: 600;
}
.auth-input-prefix .auth-input:focus { background: none; }

/* Toggle switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  transition: background 0.25s;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.25s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.toggle input:checked + .toggle-slider { background: #34c759; }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

.profile-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text3);
  margin: 0 0 10px 2px;
}

/* ── Profile listings grid ── */
.profile-listings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.profile-listing-card {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--card);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s;
}
.profile-listing-card:hover { border-color: rgba(255,255,255,0.2); }
.profile-listing-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  background: rgba(255,255,255,0.03);
}
.profile-listing-info { padding: 10px 12px; }
.profile-listing-name { font-size: 0.82rem; font-weight: 700; display: block; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-listing-meta { font-size: 0.72rem; color: var(--text2); display: flex; gap: 8px; align-items: center; }
.profile-listing-price { font-weight: 800; color: var(--text); }
.profile-listing-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}
.profile-listing-active { background: rgba(52,199,89,0.15); color: #34c759; }
.profile-listing-sold { background: rgba(255,59,48,0.15); color: #ff3b30; }
.profile-listings-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px 16px;
  color: var(--text3);
  font-size: 0.84rem;
}

.profile-rows {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--card);
  overflow: hidden;
  margin-bottom: 20px;
}
.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  font-size: 0.86rem;
  cursor: pointer;
}
.profile-row + .profile-row { border-top: 1px solid var(--border); }
.profile-row:hover { background: rgba(255,255,255,0.03); }

.profile-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.profile-row-left svg { color: var(--text2); flex-shrink: 0; }

.profile-row-right {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text2);
  font-size: 0.82rem;
}

.profile-row-chevron { color: var(--text3); flex-shrink: 0; }

.profile-badge-active {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(52,199,89,0.15);
  color: #34c759;
  font-size: 0.66rem;
  font-weight: 700;
  border: 1px solid rgba(52,199,89,0.2);
}

.profile-legal {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.profile-legal a {
  color: var(--text3);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
}
.profile-legal a:hover { color: var(--text2); text-decoration: underline; }
.profile-legal-dot { color: var(--text3); font-size: 0.72rem; }

.profile-signout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px;
  border-radius: var(--r);
  border: 1px solid rgba(255,59,48,0.25);
  background: rgba(255,59,48,0.08);
  color: #ff3b30;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 14px;
}
.profile-signout:hover { background: rgba(255,59,48,0.14); }

.profile-copy {
  margin: 0 0 8px;
  text-align: center;
  color: var(--text3);
  font-size: 0.72rem;
}

/* ── Auth overlay ── */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px;
}
.auth-overlay[hidden] { display: none; }

.auth-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 24px 24px;
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: var(--text2);
  cursor: pointer;
}
.auth-close:hover { background: rgba(255,255,255,0.12); color: var(--text); }

.auth-logo {
  text-align: center;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.12em;
  color: var(--text);
  margin-bottom: 20px;
}
.auth-logo span { opacity: 0.85; }

.auth-tabs {
  display: flex;
  background: rgba(255,255,255,0.06);
  border-radius: var(--rs);
  padding: 3px;
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  padding: 9px 8px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--text3);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.auth-tab.is-active { background: rgba(255,255,255,0.1); color: var(--text); }

.auth-form[hidden] { display: none; }

.auth-field { margin-bottom: 14px; }

.auth-label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text2);
}

.auth-input {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--rs);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s;
}
.auth-input::placeholder { color: var(--text3); }
.auth-input:focus { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.07); }

.auth-error {
  margin: 0 0 10px;
  font-size: 0.76rem;
  color: #ff3b30;
  min-height: 1.1em;
}
.auth-error:empty { display: none; }

.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--r);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(46,59,94,0.3);
  transition: box-shadow 0.15s;
}
.auth-submit:hover { box-shadow: 0 8px 28px rgba(46,59,94,0.4); }
.auth-submit:disabled { opacity: 0.5; pointer-events: none; }

.auth-footer {
  margin: 16px 0 0;
  text-align: center;
  font-size: 0.68rem;
  color: var(--text3);
  line-height: 1.5;
}
.auth-footer a { color: var(--text2); text-decoration: underline; }

.auth-note {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text3);
}

/* ── Multi-step signup wizard ── */
.auth-wizard { position: relative; }

.wizard-header {
  text-align: center;
  margin-bottom: 16px;
}
.wizard-step-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text3);
  background: rgba(255,255,255,0.06);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.wizard-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.wizard-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
}
.wizard-bar {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.1);
  transition: background 0.4s, transform 0.3s;
}
.wizard-bar.is-done {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleY(1);
}
.wizard-bar.is-active {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  animation: barPulse 2s ease-in-out infinite;
}
@keyframes barPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.wizard-step {
  animation: wizardSlideIn 0.35s ease-out;
}
@keyframes wizardSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.wizard-nav {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
.wizard-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: var(--rs);
  background: transparent;
  color: var(--text2);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.wizard-back:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.2); }
.wizard-next {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Password rules */
.pass-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin-top: 4px;
}
.pass-rule {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text3);
  transition: color 0.2s;
}
.pass-rule.is-met { color: #22c55e; }
.pass-rule-icon { font-size: 0.6rem; }
.pass-rule.is-met .pass-rule-icon::after { content: ''; }

/* Auth field hints */
.auth-field-hint {
  margin: 4px 0 0;
  font-size: 0.72rem;
  line-height: 1.3;
}
.auth-field-hint.hint-ok { color: #22c55e; }
.auth-field-hint.hint-warn { color: #f97316; }
.auth-field-hint.hint-err { color: #ef4444; }
.auth-field-hint.hint-check { color: var(--text3); }

/* Phone verification */
.phone-verify-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.phone-verify-row .auth-input { flex: 1; margin-bottom: 0; }
.phone-send-btn, .phone-verify-btn {
  flex-shrink: 0;
  padding: 0 16px;
  border: none;
  border-radius: var(--rs);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s, background 0.2s;
}
.phone-send-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
}
.phone-send-btn:hover { opacity: 0.85; }
.phone-send-btn:disabled { opacity: 0.45; pointer-events: none; }
.phone-verify-btn {
  background: #22c55e;
  color: #fff;
}
.phone-verify-btn:hover { opacity: 0.85; }
.phone-verify-btn:disabled { opacity: 0.45; pointer-events: none; }
.otp-input {
  letter-spacing: 0.3em;
  font-size: 1.1rem !important;
  font-weight: 700;
  text-align: center;
}
.phone-verified-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--rs);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  font-size: 0.82rem;
  font-weight: 600;
  color: #22c55e;
  margin-bottom: 14px;
}
#recaptcha-container { margin-bottom: 8px; }

.auth-label { display: inline-flex; align-items: center; gap: 6px; }
.auth-label svg { opacity: 0.5; flex-shrink: 0; }
.auth-label-opt { font-weight: 400; color: var(--text3); font-size: 0.72rem; }

.auth-select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2.5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* Review step */
.review-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}
.review-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.review-row:last-child { border-bottom: none; }
.review-row-label { color: var(--text3); }
.review-row-value { color: var(--text); font-weight: 600; text-align: right; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }

.review-agree {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.76rem;
  color: var(--text2);
  line-height: 1.45;
  cursor: pointer;
}
.review-agree input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--accent2);
}
.review-agree a { color: var(--text); text-decoration: underline; }

.password-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.password-strength-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.password-strength-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
  width: 0%;
}
.password-strength-text {
  font-size: 0.68rem;
  white-space: nowrap;
}

.verify-icon {
  text-align: center;
  color: #4ade80;
  margin-bottom: 12px;
}
.verify-title {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 8px;
}
.verify-text {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.5;
  margin: 0 0 20px;
}

/* ── Settings overlay ── */
.settings-overlay {
  position: absolute;
  inset: 0;
  z-index: 80;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  animation: slideIn 0.22s ease-out;
}
.settings-overlay[hidden] { display: none; }

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.settings-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.settings-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.settings-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor: pointer;
}
.settings-back:hover { background: rgba(255,255,255,0.1); }

.settings-title { font-size: 0.94rem; font-weight: 700; color: var(--text); }
.settings-spacer { flex: 1; }

.settings-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px calc(var(--tabbar) + var(--safe-b) + 16px);
}

.settings-danger-rows { border-color: rgba(255,59,48,0.2); }

/* ── Picker overlay ── */
.picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.picker-overlay[hidden] { display: none; }

.picker-panel {
  width: 100%;
  max-width: 420px;
  max-height: 60vh;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.2s ease-out;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.picker-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
}

.picker-options {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 calc(16px + var(--safe-b));
}

.picker-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font: inherit;
}
.picker-option + .picker-option { border-top: 1px solid var(--border); }
.picker-option:hover { background: rgba(255,255,255,0.04); }
.picker-option.is-selected { color: #0a84ff; font-weight: 700; }
.picker-option.is-selected::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0a84ff;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: calc(var(--tabbar) + var(--safe-b) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 300;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(50,50,56,0.95);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  white-space: nowrap;
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Confirm overlay ── */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px;
}
.confirm-overlay[hidden] { display: none; }

.confirm-panel {
  width: 100%;
  max-width: 320px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px 20px;
  text-align: center;
}
.confirm-panel h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 800;
}
.confirm-panel p {
  margin: 0 0 20px;
  color: var(--text2);
  font-size: 0.84rem;
  line-height: 1.4;
}
.confirm-actions {
  display: flex;
  gap: 10px;
}
.confirm-cancel,
.confirm-danger {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: var(--rs);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}
.confirm-cancel {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}
.confirm-cancel:hover { background: rgba(255,255,255,0.14); }
.confirm-danger {
  background: rgba(255,59,48,0.18);
  color: #ff3b30;
}
.confirm-danger:hover { background: rgba(255,59,48,0.28); }

/* ── Boot detail overlay ── */
.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 270;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 16px;
  overflow-y: auto;
}
.detail-overlay[hidden] { display: none; }
.detail-panel {
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  position: relative;
}
.detail-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.6);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.detail-close:hover { background: rgba(0,0,0,0.8); }
.detail-body { display: flex; flex-direction: column; }
@media (min-width: 700px) {
  .detail-body { flex-direction: row; }
  .detail-images { width: 50%; flex-shrink: 0; }
  .detail-info { flex: 1; }
}
.detail-images {
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
@media (min-width: 700px) {
  .detail-images { border-bottom: none; border-right: 1px solid var(--border); min-height: 400px; }
}
.detail-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.detail-images-gallery {
  display: flex;
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.detail-images-gallery img {
  min-width: 100%;
  scroll-snap-align: start;
  aspect-ratio: 1;
  object-fit: cover;
}
.detail-image-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.detail-image-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
}
.detail-image-dot.active { background: #fff; }
.detail-no-image {
  color: var(--text3);
  font-size: 0.84rem;
}
.detail-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.detail-brand {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text3);
}
.detail-name {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.25;
}
.detail-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.detail-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
}
.detail-delivery {
  font-size: 0.78rem;
  color: var(--text3);
}
.detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.detail-chip {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text2);
}
.detail-desc {
  font-size: 0.86rem;
  color: var(--text2);
  line-height: 1.55;
  margin: 0;
}
.detail-desc:empty { display: none; }
.detail-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.detail-spec {
  padding: 10px 12px;
  border-radius: var(--rs);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
}
.detail-spec-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
  display: block;
  margin-bottom: 2px;
}
.detail-spec-val {
  font-size: 0.86rem;
  font-weight: 700;
}
.detail-seller {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s;
}
.detail-seller:hover { border-color: rgba(255,255,255,0.2); }
.detail-seller-av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(46,59,94,0.7), rgba(74,59,94,0.5));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}
.detail-seller-av img { width: 100%; height: 100%; object-fit: cover; }
.detail-seller-info { flex: 1; min-width: 0; }
.detail-seller-name { font-size: 0.86rem; font-weight: 700; display: block; }
.detail-seller-sub { font-size: 0.72rem; color: var(--text3); }
.detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.detail-buy-btn {
  flex: 1;
  padding: 13px;
  border: none;
  border-radius: var(--r);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}
.detail-buy-btn:hover { opacity: 0.9; }
.detail-msg-btn {
  flex: 1;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}
.detail-msg-btn:hover { background: rgba(255,255,255,0.1); }

/* ── User profile overlay ── */
.user-profile-view {
  padding: 28px;
  text-align: center;
}
.user-profile-av {
  width: 80px;
  height: 80px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(46,59,94,0.7), rgba(74,59,94,0.5));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  overflow: hidden;
  border: 3px solid var(--border);
}
.user-profile-av img { width: 100%; height: 100%; object-fit: cover; }
.user-profile-name { font-size: 1.2rem; font-weight: 800; display: block; margin-bottom: 4px; }
.user-profile-handle { color: var(--text3); font-size: 0.82rem; display: block; margin-bottom: 8px; }
.user-profile-bio { color: var(--text2); font-size: 0.84rem; line-height: 1.45; max-width: 360px; margin: 0 auto 16px; }
.user-profile-bio:empty { display: none; }
.user-profile-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
}
.user-profile-stat strong { display: block; font-size: 1.1rem; font-weight: 800; }
.user-profile-stat span { font-size: 0.64rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.user-profile-listings {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  text-align: left;
  margin-top: 16px;
}
.user-profile-listings .profile-listing-card { cursor: default; }

/* ── Checkout overlay ── */
.checkout-body { padding: 28px; }
.checkout-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 20px;
  text-align: center;
}
.checkout-summary {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: rgba(255,255,255,0.03);
  padding: 16px;
  margin-bottom: 20px;
}
.checkout-item-name { font-weight: 700; font-size: 0.92rem; margin-bottom: 4px; }
.checkout-item-brand { font-size: 0.74rem; color: var(--text3); margin-bottom: 10px; }
.checkout-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  padding: 4px 0;
}
.checkout-line-label { color: var(--text2); }
.checkout-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}
.checkout-line-total { font-weight: 800; font-size: 0.92rem; }
.checkout-card-row {
  display: flex;
  gap: 8px;
}
.checkout-total {
  text-align: center;
  font-size: 0.86rem;
  color: var(--text2);
  margin: 12px 0 4px;
}
.checkout-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text2);
  margin: 10px 0 14px;
  line-height: 1.45;
}
.checkout-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text3);
  margin-top: 10px;
}

/* ── Responsive ── */
@media (min-width: 600px) {
  .boot-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .boot-grid { grid-template-columns: repeat(3, 1fr); }
  .screen-scroll { padding-left: 32px; padding-right: 32px; }
  [data-screen="sell"] > .screen-scroll { max-width: 900px; margin: 0 auto; }
  [data-screen="profile"] > .screen-scroll { max-width: none; }
  .profile-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .profile-listings-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .profile-card { display: flex; gap: 32px; align-items: flex-start; }
  .profile-header { align-items: flex-start; text-align: left; flex: 1; min-width: 0; }
  .profile-card-right { display: flex; flex-direction: column; gap: 16px; flex-shrink: 0; width: 280px; }
  .profile-actions { justify-content: flex-start; }
  .profile-bio { max-width: none; }

  /* messages: sidebar + chat panel side by side */
  .conv-sidebar { width: 380px; border-right: 1px solid var(--border); }
  .chat-panel { display: flex; }
  .chat-back-btn { display: none !important; }

  /* sell page max-width override */
  [data-screen="sell"] > .screen-scroll { max-width: 1040px; }

  .filter-sidebar {
    display: flex;
    flex-direction: column;
    width: 260px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    background: var(--bg2);
  }

  .filter-toggle-mobile { display: none; }

  .feed-main { padding-left: 28px; padding-right: 28px; }
}

@media (min-width: 1200px) {
  .boot-grid { grid-template-columns: repeat(4, 1fr); }
  .filter-sidebar { width: 280px; }
  .feed-main { padding-left: 36px; padding-right: 36px; }
}

@media (min-width: 1500px) {
  .boot-grid { grid-template-columns: repeat(5, 1fr); }
}

/* —— Download hero banner —— */
.dl-hero {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 24px;
  animation: fadeIn 0.3s ease-out;
}
.dl-hero.is-hidden { display: none; }
.dl-hero-inner {
  max-width: 420px;
  text-align: center;
}
.dl-hero-title {
  margin: 0 0 12px;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.dl-hero-sub {
  margin: 0 0 28px;
  color: var(--text2);
  font-size: 0.95rem;
  line-height: 1.5;
}
.dl-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}
.dl-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  padding: 16px 24px;
  background: #fff;
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 14px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dl-hero-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 30px rgba(255,255,255,0.15);
}
.dl-hero-btn:active { transform: scale(0.98); }
.dl-hero-dismiss {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 0.88rem;
  cursor: pointer;
  padding: 8px 16px;
  font-family: inherit;
}
.dl-hero-dismiss:hover { color: var(--text2); }

/* —— Sticky download bar (bottom) —— */
.dl-sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 400;
  padding: 0 16px calc(var(--safe-b, 0px));
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.95) 30%);
  pointer-events: none;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.dl-sticky.is-visible {
  transform: translateY(0);
  pointer-events: auto;
}
.dl-sticky-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 0 14px;
}
.dl-sticky-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dl-sticky-name {
  font-size: 0.95rem;
  font-weight: 700;
}
.dl-sticky-tag {
  font-size: 0.78rem;
  color: var(--text3);
}
.dl-sticky-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  background: #fff;
  color: #000;
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: 10px;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.dl-sticky-btn:hover { transform: scale(1.03); }
.dl-sticky-btn:active { transform: scale(0.97); }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 899px) {
  .conv-sidebar.chat-open { display: none; }
  .chat-panel.chat-open {
    display: flex;
    position: absolute;
    inset: 0;
    z-index: 50;
    background: var(--bg);
  }
  .chat-panel.chat-open .chat-back-btn { display: flex; }

  .filter-sidebar {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .filter-sidebar.is-open {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
  }
  .filter-sidebar.is-open .filter-sidebar-scroll {
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    background: var(--card);
    border-radius: 20px 20px 0 0;
    border: 1px solid var(--border);
    border-bottom: none;
    animation: slideUp 0.2s ease-out;
    padding-bottom: calc(16px + var(--safe-b));
  }
}
