:root {
  --red: #E10600; --red-d: #B30500; --red-l: #FFEBEA; --ink: #161616; --muted: #6B6B6B; --line: #ECECEC; --bg: #F6F6F6; --card: #fff;
  --gold: #FFB400; --r: 16px; --nav: 62px; --top: 54px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.5 Roboto, system-ui, -apple-system, 'Segoe UI', 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; }
img { max-width: 100%; display: block; }
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: var(--top); padding: 0 8px 0 14px; padding-top: env(safe-area-inset-top); background: var(--red); color: #fff; display: flex; align-items: center; }
.brand { display: flex; align-items: center; gap: 8px; flex: 1; font-size: 18px; letter-spacing: .02em; font-weight: 400; }
.brand b { font-weight: 900; }
.brand img { width: 34px; height: 28px; object-fit: contain; background: #fff; border-radius: 8px; padding: 2px; }
.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: inherit; }
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: 1px; font-size: 11px; color: var(--muted); }
nav.bottom a.on { color: var(--red); }
nav.bottom a.plus b { width: 44px; height: 34px; border-radius: 12px; background: var(--red); color: #fff; display: grid; place-items: center; }
nav.bottom a.plus svg { width: 22px; height: 22px; stroke-width: 2.4; }
.badge { position: absolute; top: 5px; left: calc(50% + 4px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; font-style: normal; }
main { max-width: 680px; margin: 0 auto; padding: 0 0 calc(var(--nav) + 28px); min-height: calc(100vh - var(--top)); }
.pad { padding: 14px 16px; }

h1 { font-size: 22px; line-height: 1.25; margin: 4px 0 8px; }
h2 { font-size: 16px; margin: 20px 0 10px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); font-size: 13px; }
.pre { white-space: pre-line; overflow-wrap: anywhere; }
.center { text-align: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 700; font-size: 14px; cursor: pointer; background: var(--red); color: #fff; letter-spacing: .02em; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; }
.btn.block { display: flex; width: 100%; }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn.soft { background: var(--red-l); color: var(--red-d); }
.btn.sm { padding: 7px 12px; font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > .grow, .grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 10px; }
label.f, div.f { display: block; margin-bottom: 14px; }
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(--red); 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(--red); }
textarea.i { min-height: 120px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 8px 0 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--red); flex: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card + .card { margin-top: 12px; }

/* feed */
.tabs { position: sticky; top: var(--top); z-index: 10; background: #fff; border-bottom: 1px solid var(--line); display: flex; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: 1 0 auto; padding: 12px 14px 10px; text-align: center; font-weight: 700; font-size: 14px; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--red); border-color: var(--red); }
.filters { display: flex; gap: 8px; padding: 10px 16px; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.feed { display: grid; gap: 10px; padding: 0 0 10px; }
@media (min-width: 680px) { .feed { padding: 0 0 10px; } }

.rv { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 16px 6px; }
@media (min-width: 680px) { .rv { border: 1px solid var(--line); border-radius: var(--r); } }
.rv-head { display: flex; align-items: center; gap: 10px; }
.av { width: 40px; height: 40px; border-radius: 50%; background: var(--red-l) center/cover; display: grid; place-items: center; font-weight: 700; color: var(--red-d); flex: none; font-size: 16px; }
.av.lg { width: 84px; height: 84px; font-size: 32px; }
.rv-user { font-weight: 700; }
.rv .stars { margin: 10px 0 4px; }
.stars { color: var(--gold); font-size: 22px; letter-spacing: 2px; line-height: 1; white-space: nowrap; }
.stars.sm { font-size: 14px; letter-spacing: 1px; }
.stars .off { color: #DADADA; }
.rv-biz { font-size: 18px; font-weight: 700; margin: 6px 0 4px; display: inline-block; }
.rv-biz:hover { color: var(--red); }
.meta { display: grid; gap: 3px; font-size: 13.5px; color: #3c3c3c; margin-bottom: 8px; }
.meta div { display: flex; gap: 8px; align-items: flex-start; }
.meta svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--muted); }
.rv-text { font-size: 15px; white-space: pre-line; overflow-wrap: anywhere; }
.rv-text.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.photos { display: grid; gap: 4px; margin: 10px 0 4px; border-radius: 12px; overflow: hidden; }
.photos.n1 { grid-template-columns: 1fr; }
.photos.n2 { grid-template-columns: 1fr 1fr; }
.photos.n3, .photos.n4 { grid-template-columns: 1fr 1fr; }
.photos div { background: var(--bg) center/cover; aspect-ratio: 4/3; cursor: zoom-in; }
.photos.n1 div { aspect-ratio: 16/10; }
.photos.n3 div:first-child { grid-column: span 2; aspect-ratio: 16/8; }
.rv-foot { display: flex; align-items: center; gap: 2px; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 2px; }
.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: 500; font-size: 14px; }
.act:active { background: var(--bg); }
.act svg { width: 21px; height: 21px; }
.act.on { color: var(--red); }
.act.on svg { fill: var(--red); stroke: var(--red); }
.save-btn.on svg { fill: var(--ink); stroke: var(--ink); }
.adbox { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 16px; min-height: 100px; }
.adbox .muted { font-size: 11px; }

/* business */
.biz-hero { background: #fff; padding: 18px 16px; border-bottom: 1px solid var(--line); }
.big-rating { font-size: 44px; font-weight: 900; line-height: 1; }
.dist { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.dist div { display: grid; grid-template-columns: 14px 1fr 28px; gap: 8px; align-items: center; }
.dist i { display: block; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.dist i b { display: block; height: 100%; background: var(--gold); }
.list-item { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.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(--red); background: #FFF8F8; }
.score { font-weight: 900; font-size: 18px; color: var(--ink); background: #FFF5DA; border-radius: 10px; padding: 4px 8px; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; gap: 10px; align-items: center; font-weight: 500; font-size: 13.5px; line-height: 1.25; cursor: pointer; text-align: left; }
.cat .e { font-size: 24px; }
.cat.on { border-color: var(--red); background: var(--red-l); }

/* comments */
.cm { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.cm:first-child { border-top: 0; }
.cm .av { width: 34px; height: 34px; font-size: 13px; }
.cm .bubble { background: var(--bg); border-radius: 14px; padding: 8px 12px; }
.cm .bubble b { font-size: 13.5px; }
.cm .tools { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin: 4px 0 0 4px; }
.cm .tools button { border: 0; background: none; padding: 0; color: inherit; cursor: pointer; font-size: 12px; font-weight: 700; }
.cm .tools button.on { color: var(--red); }
.composer { position: sticky; bottom: calc(var(--nav) + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); padding: 10px 16px; display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 42px; max-height: 120px; border-radius: 22px; padding: 10px 14px; }

/* write form */
.starpick { display: flex; gap: 6px; font-size: 40px; line-height: 1; margin: 2px 0 4px; }
.starpick button { border: 0; background: none; cursor: pointer; color: #DADADA; padding: 0; }
.starpick button.on { color: var(--gold); }
.pics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.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: 26px; }
.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; }

/* profile */
.prof { background: #fff; padding: 18px 16px; border-bottom: 1px solid var(--line); text-align: center; }
.prof .av { margin: 0 auto 8px; }
.prof .nums { display: flex; justify-content: center; gap: 28px; margin: 10px 0 4px; }
.prof .nums b { display: block; font-size: 20px; }
.menu { background: #fff; border-radius: var(--r); border: 1px solid var(--line); padding: 0 14px; margin: 12px 16px; }
.menu a, .menu button { display: flex; align-items: center; gap: 12px; padding: 14px 2px; border: 0; border-bottom: 1px solid var(--line); background: none; width: 100%; text-align: left; cursor: pointer; font-size: 15px; }
.menu > :last-child { border-bottom: 0; }
.landing { text-align: center; padding: 26px 20px 10px; }
.landing img { width: 230px; margin: 0 auto 12px; }
.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(0,0,0,.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: 16px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 86vh; 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; }
.sheet .opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; font-size: 15px; cursor: pointer; text-align: left; }
.sheet .opt:last-child { border-bottom: 0; }
.viewer { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.92); display: grid; place-items: center; }
.viewer img { max-width: 100%; max-height: 100%; }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav) + 18px); 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: 40px 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(--red); border-radius: 50%; animation: sp .8s linear infinite; margin: 40px auto; }
@keyframes sp { to { transform: rotate(360deg); } }

/* feel like a native app */
html, body { overscroll-behavior-y: none; }
button, a, nav, .tabs, .chip, .btn, label { -webkit-user-select: none; user-select: none; touch-action: manipulation; }
img { -webkit-user-drag: none; }
.is-app body { -webkit-touch-callout: none; }
