@font-face { font-family: 'MonMetropol'; src: url('fonts/MonMetropol.ttf') format('truetype'); font-display: swap; }
:root {
  --plum: #6C0C74; --plum-d: #4E0754; --plum-l: #F4E9F5; --coral: #ED6D4E; --coral-l: #FDEDE8;
  --ink: #293040; --muted: #7D90AA; --line: #E6E9EE; --bg: #F5F6FA; --card: #fff; --ok: #1E8A5A; --warn: #B76E00; --bad: #C8323A;
  --r: 18px; --nav: 64px; --top: 56px;
}
* { box-sizing: border-box; }
html, body { margin: 0; overscroll-behavior-y: none; }
body { font: 15px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--ink); background: var(--bg); -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a, nav, .chip, .btn, label { -webkit-user-select: none; user-select: none; touch-action: manipulation; }
img { max-width: 100%; display: block; -webkit-user-drag: none; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.top { position: sticky; top: 0; z-index: 20; height: calc(var(--top) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 6px 0 12px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 2px; }
.brand { flex: 1; display: flex; align-items: center; }
.brand img { height: 42px; width: auto; }
.icon-btn { position: relative; border: 0; background: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; font-weight: 700; font-size: 13px; color: var(--plum); }
.badge { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--coral); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }
nav.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(var(--nav) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); }
nav.bottom a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: #A7ABAE; }
nav.bottom a.on { color: var(--plum); }
nav.bottom .badge { top: 6px; right: calc(50% - 22px); }
main { max-width: 760px; margin: 0 auto; padding: 14px 16px calc(var(--nav) + 30px); min-height: 70vh; }

h1, h2, .btn, .seg, .cat4, .tile .nm, .list-item .nm, nav.bottom { font-family: MonMetropol, system-ui, sans-serif; }
h1 { font-size: 22px; line-height: 1.25; margin: 4px 0 8px; }
h2 { font-size: 17px; margin: 22px 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
h2 a { font-size: 13px; color: var(--coral); }
p { margin: 0 0 10px; }
.muted { color: var(--muted); font-size: 13px; }
.pre { white-space: pre-line; overflow-wrap: anywhere; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 10px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wrap { flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 12px 18px; font-weight: 700; font-size: 15px; cursor: pointer; background: var(--plum); color: #fff; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; }
.btn.block { display: flex; width: 100%; }
.btn.coral { background: var(--coral); }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn.soft { background: var(--plum-l); color: var(--plum); }
.btn.danger { background: #fff; color: var(--bad); border: 1.5px solid #F2D0D2; }
.btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 11px; }
label.f, div.f { display: block; margin-bottom: 12px; }
label.f > span, div.f > span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
label.f > span i, div.f > span i { color: var(--coral); font-style: normal; }
.i { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 12px; background: #fff; outline: none; }
.i:focus { border-color: var(--plum); }
textarea.i { min-height: 100px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; margin: 6px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--plum); flex: none; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; background: #fff; cursor: pointer; }
.checks label:has(input:checked) { border-color: var(--plum); background: var(--plum-l); color: var(--plum); font-weight: 700; }
.checks input { accent-color: var(--plum); margin: 0; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 4px; margin-bottom: 12px; }
.seg button, .seg a { border: 0; background: none; padding: 9px 6px; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--muted); text-align: center; }
.seg .on { background: var(--plum); color: #fff; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card + .card { margin-top: 12px; }
.hello { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.hello h1 { margin: 0; font-size: 20px; }
.searchbar { display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 11px 14px; color: var(--muted); margin-bottom: 14px; }
.searchbar svg { width: 20px; height: 20px; }
.slides { display: grid; grid-auto-flow: column; grid-auto-columns: 88%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.slides::-webkit-scrollbar, .hscroll::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
.slides div { scroll-snap-align: center; aspect-ratio: 16/8; border-radius: var(--r); background: #ddd center/cover; }
.cats4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.cat4 { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 12px 4px 10px; text-align: center; font-size: 12.5px; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cat4 img { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.chip { flex: none; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--plum); color: #fff; border-color: var(--plum); }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: 158px; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.tile { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.tile .ph { aspect-ratio: 1; background: var(--plum-l) center/cover; display: grid; place-items: center; font-size: 38px; }
.tile .ph.wide { aspect-ratio: 4/3; }
.tile .tx { padding: 8px 10px 10px; display: grid; gap: 2px; }
.tile .nm { font-weight: 700; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price { font-weight: 800; color: var(--plum); }
.price s { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 4px; }
.sale { position: absolute; top: 8px; left: 8px; background: var(--coral); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.list-item { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px; margin-bottom: 8px; }
.list-item .av { width: 56px; height: 56px; border-radius: 14px; background: var(--plum-l) center/cover; flex: none; display: grid; place-items: center; font-size: 24px; }
.list-item .av.round { border-radius: 50%; }
.list-item .tx { flex: 1; min-width: 0; }
.list-item .nm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item.unread { border-color: var(--coral); background: #FFF8F6; }
.stars { color: #F5A623; letter-spacing: 1px; white-space: nowrap; font-size: 13px; }
.stars .n { color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--plum-l); color: var(--plum); margin: 0 4px 4px 0; }
.tag.coral { background: var(--coral-l); color: #C24A2E; } .tag.ok { background: #E1F5EC; color: var(--ok); } .tag.warn { background: #FFF2DC; color: var(--warn); } .tag.bad { background: #FBE4E5; color: var(--bad); }

.hero { margin: -14px -16px 0; aspect-ratio: 16/10; background: var(--plum-l) center/cover; display: grid; place-items: center; font-size: 64px; position: relative; }
@media (min-width: 760px) { .hero { margin: 0; border-radius: var(--r); } }
.hero.logo { background-size: contain; background-repeat: no-repeat; background-color: #fff; aspect-ratio: 16/8; }
.round-btn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.hero .round-btn { position: absolute; right: 12px; top: 12px; }
.round-btn.on svg { fill: var(--coral); stroke: var(--coral); }
.head { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-top: -24px; position: relative; }
@media (min-width: 760px) { .head { margin-top: 10px; } }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; margin: -14px -16px 0; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery div { scroll-snap-align: start; aspect-ratio: 1; background: var(--plum-l) center/cover; display: grid; place-items: center; font-size: 70px; }
/* laptops: one photo at a time, not wider than 460px, whole photo visible */
@media (min-width: 760px) {
  .sx-wrap:has(> .gallery) { max-width: min(460px, 62vh); margin: 0 auto; }
  .gallery { margin: 0; border-radius: var(--r); grid-auto-columns: 100%; }
  .gallery div { background-color: #fff; background-size: contain; background-repeat: no-repeat; border: 1px solid var(--line); border-radius: var(--r); }
  .hero { aspect-ratio: auto; height: min(300px, 40vh); }
  .post .imgs { max-width: 440px; }
}
[data-src], [data-viewone], .msg img { cursor: zoom-in; }
/* side-scrolling rows: arrows for mouse users */
.sx-wrap { position: relative; }
.sx-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.95); box-shadow: 0 2px 8px rgba(0,0,0,.15); font-size: 22px; line-height: 1; cursor: pointer; display: none; place-items: center; color: inherit; padding: 0 0 3px; }
.sx-btn.l { left: 4px; } .sx-btn.r { right: 4px; }
.sx-wrap:has(> .chips) .sx-btn { top: calc(50% - 8px); width: 28px; height: 28px; font-size: 18px; }
@media (hover: hover) and (pointer: fine) { .sx-btn:not([hidden]) { display: grid; } .gallery, .hscroll, .chips, .slides { cursor: grab; } }
.dragging { cursor: grabbing !important; user-select: none; }
.dragging * { pointer-events: none; }
/* full-screen photo viewer */
#pv { position: fixed; inset: 0; z-index: 95; background: rgba(10, 10, 12, .94); animation: pvIn .15s ease-out; }
@keyframes pvIn { from { opacity: 0; } to { opacity: 1; } }
.pv-track { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.pv-track::-webkit-scrollbar { display: none; }
.pv-slide { flex: 0 0 100%; height: 100%; display: grid; place-items: center; scroll-snap-align: center; padding: 56px 12px calc(24px + env(safe-area-inset-bottom)); }
.pv-slide img { max-width: min(100%, 1100px); max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px - env(safe-area-inset-bottom)); width: auto; height: auto; object-fit: contain; border-radius: 6px; user-select: none; }
.pv-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; color: #fff; font-weight: 600; pointer-events: none; }
.pv-x { pointer-events: auto; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 20px; cursor: pointer; }
.pv-a { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 30px; line-height: 1; padding-bottom: 4px; cursor: pointer; display: none; }
.pv-a.l { left: 16px; } .pv-a.r { right: 16px; }
@media (hover: hover) and (pointer: fine) { .pv-a:not([hidden]) { display: block; } .pv-track { cursor: grab; } }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; margin-top: 12px; }
.actions .btn { padding: 10px 4px; font-size: 12.5px; flex-direction: column; gap: 2px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.facts div { background: var(--plum-l); border-radius: 14px; padding: 10px; text-align: center; }
.facts b { display: block; color: var(--plum); font-size: 15px; }
.facts span { font-size: 11.5px; color: var(--muted); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; margin: 10px 0 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.notice { border-radius: var(--r); padding: 14px 16px; background: #FFF6E5; border: 1px solid #F8E0B5; margin: 0 0 12px; }
.notice.ok { background: #E9F7F0; border-color: #C3E8D5; }
.map { height: 200px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); margin: 10px 0; z-index: 0; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
.qty button { width: 38px; height: 38px; border: 0; background: none; font-size: 20px; cursor: pointer; }
.qty span { min-width: 30px; text-align: center; font-weight: 700; }
.sum { display: grid; gap: 6px; font-size: 14px; }
.sum div { display: flex; justify-content: space-between; }
.sum .tot { font-weight: 800; font-size: 17px; border-top: 1px solid var(--line); padding-top: 8px; }
.pics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.pic { aspect-ratio: 1; border-radius: 12px; background: var(--bg) center/cover; border: 1.5px dashed #ccc; position: relative; display: grid; place-items: center; cursor: pointer; color: var(--muted); font-size: 24px; }
.pic.has { border-style: solid; border-color: var(--line); }
.pic .x { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; border: 0; font-size: 12px; cursor: pointer; }
.imgpick { width: 110px; height: 110px; border-radius: 18px; background: var(--bg) center/cover; border: 1.5px dashed #ccc; display: grid; place-items: center; cursor: pointer; color: var(--muted); font-size: 13px; text-align: center; margin-bottom: 12px; }
.starpick { display: flex; gap: 4px; font-size: 34px; }
.starpick button { border: 0; background: none; cursor: pointer; color: #DDD; padding: 0; }
.starpick button.on { color: #F5A623; }

/* posts */
.post { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 14px 6px; margin-bottom: 12px; }
.post .who { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.av-s { width: 40px; height: 40px; border-radius: 50%; background: var(--plum-l) center/cover; display: grid; place-items: center; font-weight: 800; color: var(--plum); flex: none; }
.post .imgs { display: grid; gap: 4px; border-radius: 14px; overflow: hidden; margin: 8px 0; grid-template-columns: 1fr 1fr; }
.post .imgs.n1 { grid-template-columns: 1fr; }
.post .imgs div { aspect-ratio: 1; background: var(--bg) center/cover; }
.post .imgs.n1 div { aspect-ratio: 4/3; }
.post .bar { display: flex; gap: 4px; border-top: 1px solid var(--line); padding-top: 2px; margin-top: 6px; }
.act { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 9px 10px; border-radius: 10px; cursor: pointer; color: var(--muted); font-weight: 600; }
.act svg { width: 21px; height: 21px; }
.act.on { color: var(--coral); }
.act.on svg { fill: var(--coral); stroke: var(--coral); }
.cm { display: flex; gap: 10px; padding: 8px 0; }
.cm .bubble { background: var(--bg); border-radius: 14px; padding: 8px 12px; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding-top: 8px; }
.composer textarea { flex: 1; min-height: 44px; max-height: 120px; border-radius: 22px; padding: 11px 16px; }

/* chat */
.chat-wrap { display: flex; flex-direction: column; height: calc(100dvh - var(--top) - var(--nav) - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
.chat-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.msgs { flex: 1; overflow-y: auto; padding: 12px 2px; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 78%; padding: 9px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.msg.me { align-self: flex-end; background: var(--plum); color: #fff; border-color: var(--plum); border-bottom-right-radius: 6px; }
.msg.them { align-self: flex-start; border-bottom-left-radius: 6px; }
.msg img { border-radius: 10px; max-height: 260px; }
.msg time { display: block; font-size: 10.5px; opacity: .7; text-align: right; }

.menu { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 0 14px; margin-bottom: 12px; }
.menu a, .menu button { display: flex; align-items: center; gap: 12px; padding: 13px 2px; border: 0; border-bottom: 1px solid var(--line); background: none; width: 100%; text-align: left; cursor: pointer; font-weight: 600; }
.menu > :last-child { border-bottom: 0; }
.menu .badge { position: static; }
.landing { text-align: center; padding: 10px 0; }
.landing img { width: 180px; margin: 0 auto 10px; }
.terms { max-height: 46vh; overflow-y: auto; font-size: 13px; white-space: pre-line; background: var(--bg); border-radius: 12px; padding: 12px; }
.sheet-bg { position: fixed; inset: 0; background: rgba(20,10,25,.45); z-index: 40; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: #fff; border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 88vh; overflow-y: auto; animation: up .2s ease; max-width: 680px; margin: 0 auto; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet h3 { margin: 0 0 12px; font-size: 18px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav) + 18px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(10px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 60; opacity: 0; pointer-events: none; transition: .2s; max-width: calc(100% - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translateX(-50%); }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .e { font-size: 44px; margin-bottom: 6px; }
.spin { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--plum); border-radius: 50%; animation: sp .8s linear infinite; margin: 40px auto; }
@keyframes sp { to { transform: rotate(360deg); } }
