/* Paso Hub theme — gold on charcoal, matching the logo */
:root {
  --brand: #c9a227;      /* logo gold: buttons, highlights */
  --brand-d: #8a6a12;    /* dark gold: text links on white */
  --brand-l: #f8f1dc;    /* light gold tint */
  --ink: #161618;        /* charcoal: header, hero, footer */
  --ink-2: #2a2a2d;
  --ok: #0b6b47;
  --ok-l: #e8f5ee;
  --red: #d64045;
  --bg: #f6f5f2;
  --card: #fff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #e4e2dc;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.04);
  --gold: #e6c65c;       /* light gold for text on dark backgrounds */
  /* Theme slots — a colour theme only needs to override these and the ones above. */
  --accent: var(--gold);  /* highlight text on dark surfaces (chips, badges, price tags) */
  --on-brand: #1a1408;    /* text on brand-coloured buttons */
  --brand-hover: #b38f1f;
  --brand-rgb: 201, 162, 39;
  --logo-fg: var(--gold);
  --hdr-bg: var(--ink);
  --hdr-fg: #f2f2f2;
  --hdr-2: var(--ink-2);  /* search box and hover on the header */
  --hdr-line: #3a3a3d;
  --hdr-border: #000;
  --hero-bg: radial-gradient(circle at 85% 20%, #3a3220 0, transparent 45%), linear-gradient(120deg, var(--ink), #232326);
  --hero-fg: #f2f2f2;
  --hero-accent: var(--gold);
}
/* Plain, flat brand colours — no textures. */
.logo-text { color: var(--logo-fg); font-weight: 700; letter-spacing: .06em; }
.hero-tag { color: var(--hero-accent); }
.how-step b { color: var(--hero-accent); }
.price-tag { color: var(--accent); }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Inter, 'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; font-size: 15px; }
html[lang=bn] body { font-family: 'Hind Siliguri', Inter, system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1 { font-size: 1.5rem; margin: .2em 0 .6em; line-height: 1.25; }
h3 { font-size: 1.05rem; margin: 1.4em 0 .5em; }
main { min-height: 60vh; }
html, body { max-width: 100%; overflow-x: clip; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 640px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.xs { font-size: .72rem; }
.center { text-align: center; }
.mt { margin-top: 14px; }
.block { display: flex; width: 100%; }
.err { color: var(--red); font-size: .9rem; min-height: 1.2em; margin: .4em 0; }

/* ---------- header ---------- */
.header { background: var(--hdr-bg); border-bottom: 1px solid var(--hdr-border); position: sticky; top: 0; z-index: 20; color: var(--hdr-fg); }
.hdr { display: flex; align-items: center; gap: 14px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; text-transform: uppercase; white-space: nowrap; color: var(--brand); }
.logo-mark { width: 40px; height: 40px; border-radius: 9px; background: var(--ink-2); color: var(--brand); display: grid; place-items: center; font-size: 1.2rem; font-weight: 800; position: relative; overflow: hidden; flex: none; border: 1px solid var(--hdr-line); }
.logo-mark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; transform: scale(1.35); }
.search { flex: 1; display: flex; background: var(--hdr-2); border: 1px solid var(--hdr-line); border-radius: 999px; overflow: hidden; max-width: 560px; }
.search input { flex: 1; border: 0; background: transparent; color: var(--hdr-fg); padding: 10px 16px; outline: none; min-width: 0; border-radius: 0; }
.search input::placeholder { color: #9a9a9f; }
.search input:focus { outline: none; }
.search button { border: 0; background: transparent; padding: 0 14px; cursor: pointer; font-size: 1rem; }
.search:focus-within { border-color: var(--brand); }
/* Hurricane-lantern search button: the flame flickers gently and glows brighter on hover/focus. */
.search .search-btn { display: grid; place-items: center; padding: 0 12px; }
.lantern { display: block; overflow: visible; }
.lantern .flame { transform-box: fill-box; transform-origin: 50% 100%; filter: drop-shadow(0 0 1.5px #fff6dd) drop-shadow(0 0 3px rgba(255,214,140,.9)); animation: flicker 2.6s ease-in-out infinite; }
.lantern .glass { filter: drop-shadow(0 0 2px rgba(255,236,200,.35)); transition: filter .2s; }
.search-btn:hover .glass, .search:focus-within .glass { filter: drop-shadow(0 0 4px rgba(255,226,170,.85)); }
@keyframes flicker {
  0%, 100% { transform: scale(1, 1); opacity: 1; }
  30% { transform: scale(.94, 1.06); opacity: .9; }
  55% { transform: scale(1.04, .95); opacity: 1; }
  80% { transform: scale(.97, 1.03); opacity: .93; }
}
@media (prefers-reduced-motion: reduce) { .lantern .flame { animation: none; } }
.nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-link { padding: 8px 10px; border-radius: 8px; font-weight: 500; position: relative; white-space: nowrap; }
.nav-link:hover { background: var(--hdr-2); }
.dot { position: absolute; top: 6px; right: 4px; width: 8px; height: 8px; background: var(--red); border-radius: 50%; }
.lang { border: 1px solid var(--hdr-line); background: transparent; color: var(--hdr-fg); border-radius: 8px; padding: 6px 10px; cursor: pointer; font: inherit; font-size: .85rem; }
.lang:hover { border-color: var(--brand); }
@media (max-width: 720px) {
  .hdr { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .hide-sm { display: none; }
}
/* Small phones: tighten the header so logo, language, login and Sell fit on one line. */
@media (max-width: 480px) {
  .logo { font-size: 1rem; letter-spacing: .03em; gap: 8px; }
  .logo-mark { width: 34px; height: 34px; }
  .nav { gap: 4px; }
  .nav-link { padding: 6px; }
  .lang { padding: 5px 8px; font-size: .8rem; }
  .btn-sell { padding: 7px 11px; font-size: .9rem; }
  .hero h1 { font-size: 1.5rem; }
}
@media (max-width: 380px) {
  .hide-xs { display: none; }
  .logo { gap: 6px; letter-spacing: .01em; }
  .nav-link { padding: 6px 4px; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 10px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; transition: .15s; background: #eceae4; color: var(--text); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary, .btn-sell { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover, .btn-sell:hover { background: var(--brand-hover); }
.btn-sell { padding: 8px 16px; white-space: nowrap; }
.btn-ghost { background: #fff; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--text); }
.btn-danger-ghost { background: #fff; border-color: #f0c4c6; color: var(--red); }
.btn-lg { padding: 14px 22px; font-size: 1.05rem; }
.btn-sm { padding: 4px 10px; font-size: .8rem; }
.link { background: none; border: 0; color: var(--brand-d); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

/* ---------- hero ---------- */
.hero { background: var(--hero-bg); color: var(--hero-fg); border-bottom: 2px solid var(--brand); }
.hero-in { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; padding-top: 44px; padding-bottom: 44px; align-items: center; }
.hero h1 { font-size: 2.5rem; margin: 0 0 .3em; letter-spacing: .01em; line-height: 1.15; }
.hero p { opacity: .88; font-size: 1.05rem; max-width: 520px; }
.hero-tag { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 10px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero .btn-ghost { background: transparent; color: var(--hero-fg); border-color: rgba(var(--brand-rgb), .6); }
.hero .btn-ghost:hover { border-color: var(--brand); }
.how { display: grid; gap: 10px; }
.how-step { background: rgba(255,255,255,.05); border: 1px solid rgba(var(--brand-rgb), .25); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.how-step b { font-size: 1.02rem; }
.how-step span { font-size: .88rem; opacity: .85; }
@media (max-width: 820px) {
  .hero-in { grid-template-columns: 1fr; padding-top: 28px; padding-bottom: 28px; }
  .hero h1 { font-size: 1.7rem; }
}

/* ---------- Paso Hub services ---------- */
.services { display: flex; gap: 10px; overflow-x: auto; padding: 18px 0 4px; scrollbar-width: none; }
.svc { flex: none; width: 96px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); font-size: .82rem; font-weight: 600; text-align: center; }
.svc-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; background: var(--brand-l); }
.svc.on { outline: 2px solid var(--brand); }
.svc.soon { color: var(--muted); background: transparent; box-shadow: none; border: 1px dashed #cfcabd; }
.svc.soon .svc-ic { background: #eeece6; }

/* ---------- chips & filters ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 0 6px; }
/* On phones the categories scroll sideways in one row instead of wrapping. */
@media (max-width: 720px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
}
.chip { flex: none; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .9rem; white-space: nowrap; }
.chip:hover { border-color: var(--text); }
.chip.on { background: var(--ink); color: var(--accent); border-color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; }
.filters select, .filters input { width: auto; padding: 8px 10px; font-size: .88rem; }
.filters input[type=number] { width: 110px; }
.check { display: flex; align-items: center; gap: 6px; font-size: .88rem; }
.section-title { font-size: 1.15rem; margin: 22px 0 12px; }

/* ---------- grid & cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s; }
.card:hover { transform: translateY(-2px); }
.thumb { position: relative; aspect-ratio: 1; background: #eee; overflow: hidden; }
.thumb img, .thumb .ph { width: 100%; height: 100%; object-fit: cover; }
.ph { display: grid; place-items: center; font-size: 3.4rem; }
.thumb.sm { width: 64px; height: 64px; flex: none; border-radius: 8px; }
.thumb.sm .ph { font-size: 1.8rem; }
.price-tag { position: absolute; left: 0; bottom: 10px; background: rgba(22,22,24,.86); font-weight: 800; padding: 3px 12px 3px 8px; border-radius: 0 999px 999px 0; font-size: .95rem; }
.sold { position: absolute; top: 14px; left: -34px; transform: rotate(-45deg); background: var(--red); color: #fff; font-weight: 700; font-size: .72rem; padding: 3px 38px; letter-spacing: .1em; box-shadow: 0 2px 4px rgba(0,0,0,.2); }
.sold.big { top: 26px; left: -50px; font-size: 1rem; padding: 6px 60px; }
.card-body { padding: 8px 10px 12px; }
.card-title { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.empty { background: #fff; border-radius: var(--radius); padding: 40px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 14px; }

/* ---------- auctions ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.auc-tag { position: absolute; top: 8px; right: 8px; background: var(--ink); color: var(--accent); font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.card-auc { font-size: .78rem; color: var(--brand-d); font-weight: 600; margin-top: 2px; }
.card-body .badge { margin-top: 4px; display: inline-block; }
.auc-box { background: #fff; border: 2px solid var(--brand); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.auc-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.auc-price { font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.auc-right { text-align: right; }
.auc-time { font-size: 1.15rem; font-weight: 700; color: var(--red); font-variant-numeric: tabular-nums; }
.note { background: #f4f3ef; border-radius: 8px; padding: 9px 12px; font-size: .9rem; }
.note.ok { background: var(--ok-l); color: var(--ok); font-weight: 600; }
.note.warn { background: #fff4dc; color: #8a5a00; font-weight: 600; }
.bid-form .lbl { margin-top: 0; }
.bid-form p { margin: 6px 0 0; }
.bid-input { display: flex; gap: 8px; }
.bid-input input, .bid-input select { flex: 1; min-width: 0; }
.bids { background: #fff; border: 1px solid var(--line); border-radius: 10px; max-height: 260px; overflow-y: auto; }
.bid-row { display: grid; grid-template-columns: 1fr auto 90px; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: .9rem; align-items: center; }
.bid-row:last-child { border-bottom: 0; }
.bid-row .muted { text-align: right; }
.st-leading, .st-won, .st-bought { background: var(--ok-l); color: var(--ok); }
.st-outbid { background: #fff4dc; color: #8a5a00; }
.st-lost, .st-ended { background: #f1f1f1; color: #777; }

/* ---------- item page ---------- */
.item-page { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 32px; padding-top: 24px; align-items: start; }
.gallery { position: sticky; top: 84px; }
.main-img { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: #f0efea; }
.main-img img { width: 100%; height: 100%; object-fit: contain; }
.main-img .ph { width: 100%; height: 100%; font-size: 7rem; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; }
.thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; cursor: pointer; opacity: .6; border: 2px solid transparent; }
.thumbs img.on { opacity: 1; border-color: var(--brand); }
@media (max-width: 820px) { .item-page { grid-template-columns: 1fr; gap: 16px; } .gallery { position: static; } }
.item-title { font-size: 1.4rem; }
.item-price { font-size: 1.9rem; font-weight: 700; margin-bottom: 10px; }
.ship-note { font-size: .85rem; font-weight: 500; color: var(--muted); }
.stats { margin-bottom: 14px; }
.pill { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .88rem; cursor: pointer; }
.pill.on { border-color: #f0c4c6; background: #fff5f5; }
.safety { background: var(--brand-l); color: var(--brand-d); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: .85rem; margin-top: 14px; }
.desc { white-space: pre-wrap; background: #fff; border-radius: 10px; padding: 14px; border: 1px solid var(--line); }
.details { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; margin-top: 14px; font-size: .92rem; }
.details th, .details td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.details th { width: 40%; color: var(--muted); font-weight: 500; background: #faf9f6; }
.details a { color: var(--brand-d); }
.seller-box { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.seller-box:hover { border-color: var(--text); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--accent); display: grid; place-items: center; font-weight: 700; flex: none; text-transform: uppercase; }
.avatar.sm { width: 32px; height: 32px; font-size: .85rem; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.6rem; }
.badge-v { background: var(--brand); color: var(--on-brand); font-size: .72rem; padding: 2px 8px; border-radius: 999px; font-weight: 700; vertical-align: middle; }
.badge-s { background: var(--ink); color: var(--accent); font-size: .7rem; padding: 1px 6px; border-radius: 4px; }
.comments { display: flex; flex-direction: column; gap: 12px; }
.cmt { display: flex; gap: 10px; }
.cmt-text { background: #fff; border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; padding: 8px 12px; margin-top: 3px; white-space: pre-wrap; font-size: .92rem; }
.cmt-form { display: flex; gap: 8px; margin-top: 12px; align-items: flex-end; }
.cmt-form textarea, .cmt-form input { flex: 1; }

/* ---------- forms ---------- */
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(var(--brand-rgb), .35); border-color: var(--brand); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand); }
.card-form { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card-form.hl { border: 2px solid var(--brand); }
.card-form > h3:first-child, .card-form > h1:first-child { margin-top: 0; }
.lbl { display: block; font-weight: 600; font-size: .9rem; margin: 14px 0 6px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; gap: 0; } }
.auth { margin-top: 30px; }
.demo { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); line-height: 2; }
.photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ph-slot { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; }
.ph-slot img { width: 100%; height: 100%; object-fit: cover; }
.ph-slot button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; line-height: 1; }
.cover { position: absolute; left: 4px; top: 4px; background: var(--ink); color: var(--accent); font-size: .7rem; padding: 1px 6px; border-radius: 4px; }
.ph-add { aspect-ratio: 1; border: 2px dashed var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; font-size: 1.6rem; color: var(--muted); font-family: inherit; line-height: 1.2; }
.ph-add:hover { border-color: var(--brand); color: var(--brand-d); }
.fee-box, .summary { background: var(--bg); border-radius: 10px; padding: 12px 14px; margin-top: 14px; display: flex; flex-direction: column; gap: 6px; font-size: .92rem; }
.fee-box > div, .summary > div { display: flex; justify-content: space-between; gap: 10px; }
.earn, .tot { font-weight: 700; font-size: 1.05rem; border-top: 1px solid var(--line); padding-top: 6px; }
.pay-opts, .rate-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.rate-opts { margin-bottom: 10px; }
.pay, .rate { position: relative; cursor: pointer; }
.pay input, .rate input { position: absolute; opacity: 0; }
.pay span, .rate span { display: block; border: 2px solid var(--line); border-radius: 10px; padding: 12px; text-align: center; font-weight: 600; }
.pay input:checked + span, .rate input:checked + span { border-color: var(--brand); background: var(--brand-l); }
.pay input:focus-visible + span, .rate input:focus-visible + span { outline: 2px solid var(--brand); }

/* ---------- my page / orders ---------- */
.me-head { display: flex; align-items: center; gap: 16px; padding: 24px 0 8px; flex-wrap: wrap; }
.me-head h1 { margin: 0; }
.me-head p { margin: 6px 0 0; }
.balance { background: var(--ink); color: #f2f2f2; border-radius: var(--radius); padding: 10px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.balance .muted { color: #b0b0b5; }
.balance b { font-size: 1.3rem; color: var(--accent); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 16px 0 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; white-space: nowrap; border-bottom: 3px solid transparent; font-weight: 500; color: var(--muted); }
.tabs a.on { border-color: var(--brand); color: var(--text); }
.orders { display: flex; flex-direction: column; gap: 8px; }
.order-row { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); margin-bottom: 12px; }
.orders .order-row { margin-bottom: 0; }
.badge { font-size: .75rem; padding: 3px 9px; border-radius: 999px; font-weight: 600; white-space: nowrap; background: #eceae4; vertical-align: middle; }
.badge.act { background: var(--red); color: #fff; }
.st-paid { background: #fff4dc; color: #8a5a00; }
.st-shipped { background: #e3f0ff; color: #0b5cad; }
.st-completed, .st-available { background: var(--ok-l); color: var(--ok); }
.st-cancelled { background: #f1f1f1; color: #777; }
.st-sold { background: #fdecec; color: #b3262b; }
.steps { display: flex; list-style: none; padding: 0; margin: 0 0 18px; counter-reset: s; }
.steps li { flex: 1; text-align: center; font-size: .85rem; color: var(--muted); position: relative; padding-top: 34px; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 26px; height: 26px; border-radius: 50%; background: #dcd9d0; color: #fff; display: grid; place-items: center; font-weight: 700; z-index: 1; }
.steps li + li::after { content: ''; position: absolute; top: 12px; right: 50%; width: 100%; height: 3px; background: #dcd9d0; }
.steps li.done { color: var(--text); font-weight: 600; }
.steps li.done::before, .steps li.done::after { background: var(--brand); }
.chat { background: #fff; border-radius: var(--radius); padding: 14px; max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); }
.msg { max-width: 78%; }
.msg.mine { align-self: flex-end; text-align: right; }
.bubble { display: inline-block; background: var(--bg); padding: 8px 12px; border-radius: 14px; white-space: pre-wrap; text-align: left; }
.msg.mine .bubble { background: var(--ink); color: #f2f2f2; }
.history { font-size: .85rem; color: var(--muted); padding-left: 18px; }

/* ---------- admin ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; border-top: 3px solid var(--brand); }
.kpi b { font-size: 1.4rem; }
.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 640px; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.tbl th { background: #faf9f6; color: var(--muted); font-weight: 600; }
.tbl a { color: var(--brand-d); }
.tbl .tt { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: #c5c5ca; margin-top: 48px; padding: 32px 0 18px; font-size: .9rem; border-top: 2px solid var(--brand); }
.foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot p { max-width: 380px; }
.pays { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pays span { background: var(--ink-2); padding: 4px 10px; border-radius: 6px; font-weight: 600; font-size: .8rem; }
.copy { border-top: 1px solid var(--ink-2); margin-top: 20px; padding-top: 14px; font-size: .8rem; color: #8b8b90; }

/* ---------- misc ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #f2f2f2; border: 1px solid var(--brand); padding: 12px 20px; border-radius: 10px; opacity: 0; transition: .25s; z-index: 50; box-shadow: 0 6px 20px rgba(0,0,0,.2); max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.notfound { text-align: center; padding: 60px 16px; }

/* ---------- Mercari / Yahoo! Auctions–style home: category tabs, promo banners, category circles ---------- */
/* Colours stay the logo's black & gold. */
.cat-tabs { background: var(--hdr-bg); border-top: 1px solid var(--hdr-line); }
.cat-tabs-in { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; position: relative; }
.cat-tabs-in::-webkit-scrollbar { display: none; }
.cat-tabs a { flex: none; padding: 11px 9px 9px; font-weight: 600; font-size: .86rem; color: #b4b4b9; border-bottom: 3px solid transparent; white-space: nowrap; }
/* Wide screens: spread the tabs over the full width so every category is visible. */
@media (min-width: 1100px) { .cat-tabs-in { justify-content: space-between; } }
.cat-tabs a:hover { color: var(--hdr-fg); }
.cat-tabs a.on { color: var(--gold); border-color: var(--brand); }
.gallery { top: 124px; }

.banners { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 24px) / 3); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 18px 0 4px; }
.banners::-webkit-scrollbar { display: none; }
@media (max-width: 820px) { .banners { grid-auto-columns: 84%; } }
.banner { scroll-snap-align: start; min-height: 150px; border-radius: 14px; padding: 18px 20px; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; position: relative; overflow: hidden; }
.banner b { font-size: 1.45rem; line-height: 1.2; position: relative; }
.banner > span:last-child { font-size: .9rem; opacity: .95; position: relative; }
.bn-ic { position: absolute; right: 16px; top: 12px; font-size: 3.4rem; line-height: 1; opacity: .95; }
.banner::after { content: ''; position: absolute; right: -40px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.12); }
.banner:hover { filter: brightness(1.06); }
/* Banners alternate logo gold and charcoal. */
.b1 { background: linear-gradient(135deg, #e3bd45, #b38f1f); color: #1a1408; }
.b2 { background: radial-gradient(circle at 85% 20%, #3a3220 0, transparent 55%), linear-gradient(135deg, #2a2a2d, #161618); border: 1px solid #3a3420; }
.b3 { background: linear-gradient(135deg, #8a6a12, #5a4408); }
.b4 { background: radial-gradient(circle at 85% 20%, #3a3220 0, transparent 55%), linear-gradient(135deg, #232326, #111113); border: 1px solid #3a3420; }
.b2 b, .b4 b { color: var(--gold); }
.b1::after { background: rgba(255,255,255,.18); }

.cat-circles { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 14px 10px; }
@media (max-width: 980px) { .cat-circles { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.cat-c { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-weight: 600; font-size: .86rem; line-height: 1.25; }
.cat-ic { width: 100%; max-width: 96px; aspect-ratio: 1; border-radius: 50%; background: #ecebe6; border: 1px solid transparent; display: grid; place-items: center; font-size: 2.4rem; transition: transform .15s, border-color .15s; }
.cat-c:hover .cat-ic { border-color: var(--brand); }
.cat-c:hover .cat-ic { transform: scale(1.06); }
@media (max-width: 520px) { .cat-ic { font-size: 1.8rem; } .cat-c { font-size: .78rem; } }
.filters[hidden] { display: none; }

/* ---------- New / Used ---------- */
.cond-b { display: inline-block; font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 4px; margin-right: 6px; vertical-align: 1px; }
.cond-b.new { background: var(--ink); color: var(--gold); }
.cond-b.used { background: #ecebe6; color: #55524a; }
.cond-seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin: 16px 0 4px; }
.cond-seg a { padding: 6px 18px; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--muted); }
.cond-seg a.on { background: var(--ink); color: var(--gold); }

/* ---------- Coupons & Paso Coins ---------- */
.coupons { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.coupons::-webkit-scrollbar { display: none; }
.coupon { display: flex; background: #fff; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; min-height: 92px; position: relative; }
.cp-left { flex: 1; padding: 14px 16px; background: var(--ink); color: #f2f2f2; display: flex; flex-direction: column; justify-content: center; gap: 4px; border-right: 2px dashed #e6c65c66; }
.cp-left b { color: var(--gold); font-size: 1.3rem; line-height: 1.2; }
.cp-left span { font-size: .78rem; color: #c5c5ca; }
.cp-right { padding: 12px 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.cp-right code { font-weight: 800; letter-spacing: .06em; font-size: .9rem; }
.minus { color: #b3262b; font-weight: 600; }
.plus { color: var(--ok); }
.coins-check { margin: 6px 0 2px; }
.coin-note { background: var(--brand-l); border-radius: 8px; padding: 8px 12px; }
.coin-hero { display: flex; align-items: center; gap: 16px; background: var(--ink); color: #f2f2f2; border-radius: var(--radius); padding: 18px 22px; margin-bottom: 14px; }
.coin-hero b { display: block; font-size: 2rem; color: var(--gold); line-height: 1.1; }
.coin-hero .muted { color: #b0b0b5; }
.coin-big { font-size: 2.6rem; }
.coin-rules { margin: 0; padding-left: 4px; list-style: none; display: grid; gap: 6px; }
.coin-log { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.coin-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.coin-row:last-child { border-bottom: 0; }
.coin-row b { font-size: 1.05rem; }
a.balance:hover { outline: 2px solid var(--brand); }
.summary > div[hidden], .coins-check[hidden] { display: none; }
