:root {
  --bg: #000;
  --bar: #000;
  --line: #262626;
  --text: #f5f5f5;
  --muted: #a8a8a8;
  --card: #121212;
  --ring: conic-gradient(from 180deg, #f9ce34, #ee2a7b, #6228d7, #f9ce34);
  --ok: #22c55e;
  --max: 470px;
  --font-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji";
  --font-device: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI",
    Roboto, "SamsungOne", "Samsung Sans", "MiSans", "HarmonyOS Sans", "OPPO Sans", "vivo Sans",
    Helvetica, Arial, sans-serif, var(--font-emoji);
  --font: var(--font-device);
  --fs-11: 11px;
  --fs-12: 12px;
  --fs-13: 13px;
  --fs-15: 15px;
  --fs-16: 16px;
  --fs-17: 17px;
  --fs-20: 20px;
  --fs-22: 22px;
  --lh-11: 13px;
  --lh-12: 16px;
  --lh-13: 16px;
  --lh-15: 18px;
  --lh-16: 21px;
  --lh-17: 24px;
  --lh-20: 24px;
  --lh-22: 26px;
  --fw: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
}

html[lang="zh-Hans"] {
  --font: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei UI", "Microsoft YaHei", "MiSans", "HarmonyOS Sans SC", "HarmonyOS Sans",
    "OPPO Sans", "vivo Sans", "SamsungOne", "Noto Sans SC", "Noto Sans CJK SC",
    "Source Han Sans SC", "Droid Sans Fallback", Roboto, "Segoe UI", Helvetica, Arial,
    sans-serif, var(--font-emoji);
}
html[lang="ko"] {
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "SamsungOne", "Samsung Sans", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR",
    Roboto, "Segoe UI", Helvetica, Arial, sans-serif, var(--font-emoji);
}
html[lang="th"] {
  --font: system-ui, -apple-system, BlinkMacSystemFont, Thonburi, "Leelawadee UI", Leelawadee,
    "Noto Sans Thai", Sarabun, Roboto, "Segoe UI", Helvetica, Arial, sans-serif, var(--font-emoji);
}
html[lang="vi"], html[lang="en"] {
  --font: var(--font-device);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%; background: #0b0b0b;
  font-family: var(--font);
  font-size: var(--fs-15);
  font-weight: var(--fw);
  line-height: var(--lh-15);
  letter-spacing: -0.15px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

#app { min-height: 100vh; }
.shell {
  width: min(var(--max), 100%);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  padding-bottom: 76px;
  position: relative;
}

.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 14px;
  background: rgba(0,0,0,.92);
  border-bottom: 1px solid var(--line);
}
.searchwrap {
  position: sticky; top: 56px; z-index: 29;
  padding: 8px 14px;
  background: #000;
}
.searchwrap input {
  width: 100%; background: #1a1a1a; border: 0; border-radius: 10px; padding: 10px 12px;
  font-size: var(--fs-16); line-height: var(--lh-16); letter-spacing: 0;
}
.searchwrap input::placeholder { color: #6e6e6e; }
.cats {
  position: sticky; top: 56px; z-index: 28;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: #000; border-bottom: 1px solid var(--line);
}
.searchwrap + .cats { top: 108px; }
.cats button {
  border: 0; background: none; cursor: pointer;
  color: var(--muted); font-size: var(--fs-12); line-height: var(--lh-12);
  font-weight: var(--fw); letter-spacing: 0;
  padding: 10px 3px 9px; white-space: normal;
}
.cats button.on {
  color: #fff; font-weight: var(--fw-semibold);
  box-shadow: inset 0 -2px 0 #fff;
}
.brand { font-weight: var(--fw-bold); font-size: var(--fs-22); line-height: var(--lh-22); letter-spacing: 0; white-space: nowrap; }
.brand b { font-weight: var(--fw-bold); }
.top-right { display: flex; align-items: center; gap: 10px; }
.icon-btn, .ghost, .btn {
  border: 0; cursor: pointer; background: none;
}
.icon-btn {
  position: relative; width: 36px; height: 36px; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn svg { width: 24px; height: 24px; display: block; }
.icon-btn .dot {
  position: absolute; top: 5px; right: 5px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #ff3040; border: 1.5px solid #000;
  pointer-events: none;
}
.icon-btn.on { color: #f5f5f5; }
.pill {
  font-size: var(--fs-12); line-height: var(--lh-12); letter-spacing: 0;
  color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px;
}

.stories {
  display: flex; gap: 12px; overflow-x: auto;
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.stories::-webkit-scrollbar { display: none; }
.story { flex: 0 0 74px; text-align: center; color: var(--text); position: relative; }
.story .ring {
  width: 66px; height: 66px; margin: 0 auto 6px; padding: 2px;
  border-radius: 50%; background: var(--ring);
}
.story.agency .ring { background: linear-gradient(135deg, #f5d76e, #c9a227); }
.story.off .ring { background: #333; }
.story img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 2px solid #000; }
.story span { display: block; font-size: var(--fs-12); line-height: var(--lh-12); letter-spacing: 0; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tile .badge {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  font-size: var(--fs-11); line-height: var(--lh-11); letter-spacing: 0;
  background: rgba(0,0,0,.7); border-radius: 6px; padding: 2px 6px;
}
.tile.blur img { filter: blur(10px); transform: scale(1.08); }
.tile .lock-cap {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-12); line-height: var(--lh-12); letter-spacing: 0;
  text-shadow: 0 1px 4px #000;
}
.link { color: #0095f6; font-size: var(--fs-15); line-height: var(--lh-15); }

.contacts {
  position: relative; margin: 16px 0 8px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; overflow: hidden;
}
.c-head { font-size: var(--fs-13); line-height: var(--lh-13); letter-spacing: 0; color: var(--muted); margin-bottom: 8px; }
.c-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-top: 1px solid var(--line); font-size: var(--fs-15); line-height: var(--lh-15);
}
.c-row span { color: var(--muted); }
.c-row b { font-weight: var(--fw-semibold); word-break: break-all; text-align: right; }
.contacts.locked .c-row b { filter: blur(6px); user-select: none; }
.contacts .lock {
  position: absolute; inset: 0; background: rgba(0,0,0,.72);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.contacts .lock p { margin: 0; }
.story img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 2px solid #000; }
.story span { display: block; font-size: var(--fs-12); line-height: var(--lh-12); letter-spacing: 0; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.explore {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  padding-bottom: 24px;
}
.ad-banner {
  grid-column: 1 / -1;
  position: relative;
  display: block;
  min-height: 112px;
  background: #1a1a1a;
  overflow: hidden;
}
.ad-banner img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  display: block;
}
.ad-banner .ad-tag {
  position: absolute; left: 10px; top: 10px;
  background: rgba(0,0,0,.62); color: #fff;
  font-size: var(--fs-11); line-height: var(--lh-11);
  border-radius: 4px; padding: 3px 6px;
}
.ad-banner .ad-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 12px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,.78));
  font-size: var(--fs-15); line-height: var(--lh-15); font-weight: var(--fw-semibold);
}
.shop-list { padding: 0 0 24px; }
.search-lead {
  margin: 4px 14px 10px;
}
.shop-card {
  display: grid; grid-template-columns: 96px 1fr; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  color: inherit;
}
.shop-card img, .shop-ph {
  width: 96px; height: 72px; object-fit: cover; border-radius: 10px; background: #1a1a1a;
}
.shop-card b { display: block; font-size: var(--fs-15); line-height: var(--lh-15); }
.shop-card small { display: block; margin-top: 4px; color: var(--muted); font-size: var(--fs-12); }
.shop-card p { margin: 6px 0 0; color: #ddd; font-size: var(--fs-13); line-height: var(--lh-13); }
.tile { position: relative; aspect-ratio: 1; background: #111; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile .cap {
  position: absolute; left: 6px; bottom: 6px;
  font-size: var(--fs-12); line-height: var(--lh-12); letter-spacing: 0; font-weight: var(--fw-semibold);
  text-shadow: 0 1px 4px #000;
}

.tabs {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(var(--max), 100%);
  height: 58px; display: grid; grid-template-columns: repeat(5, 1fr);
  background: #000; border-top: 1px solid var(--line); z-index: 40;
}
.tabs a {
  display: flex; align-items: center; justify-content: center; color: #f5f5f5;
}
.tabs a.active { opacity: 1; }
.tabs a:not(.active) { opacity: .55; }
.tabs svg { width: 24px; height: 24px; }

.searchbar {
  display: flex; gap: 8px; padding: 10px 14px; align-items: center;
}
.hint.empty { padding: 24px 16px; text-align: center; }
.searchbar.geo {
  display: grid; grid-template-columns: 1fr 1fr 42px; gap: 6px;
}
.searchbar.geo select { min-width: 0; font-size: var(--fs-15); line-height: var(--lh-15); letter-spacing: 0; }
.searchbar.geo .locate {
  grid-column: 3; grid-row: 1 / -1;
  width: 100%; min-height: 44px; padding: 0;
  background: #1a1a1a; border: 0; border-radius: 10px;
  color: #f5f5f5; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.searchbar.geo .locate svg { width: 22px; height: 22px; }
.searchbar.geo .locate.on { color: #0095f6; }
.searchbar.geo .locate.busy { opacity: .55; }
.searchbar.geo .locate.busy svg { animation: hfspin .9s linear infinite; }
@keyframes hfspin { to { transform: rotate(360deg); } }
.mapwrap {
  position: relative;
  margin: 0 0 8px;
  border-bottom: 1px solid var(--line);
  background: #0d0d0d;
}
#hfMap {
  width: 100%;
  height: 280px;
}
.map-tools {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 52px);
}
.map-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 32px; padding: 0 10px;
  background: rgba(18,18,18,.92); color: #f5f5f5;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: var(--fs-12); line-height: var(--lh-12); font-weight: var(--fw-semibold);
  cursor: pointer; text-decoration: none;
}
.map-btn svg { width: 16px; height: 16px; }
.map-hint {
  margin: 0; padding: 6px 14px 10px;
  color: var(--muted); font-size: var(--fs-11); line-height: var(--lh-11);
}
.map-pin {
  width: 36px; height: 36px; padding: 0; border: 2px solid #fff;
  border-radius: 50%; overflow: hidden; background: #111; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.map-pin img { width: 100%; height: 100%; object-fit: cover; }
.map-pin.agent, .map-pin.shop { border-color: #f5d76e; }
.map-me {
  width: 16px; height: 16px; border-radius: 50%;
  background: #0095f6; border: 2px solid #fff;
  box-shadow: 0 0 0 6px rgba(0,149,246,.25);
}
.maplibregl-popup-content {
  background: #1a1a1a; color: #f5f5f5; border-radius: 12px;
  padding: 10px 12px; box-shadow: 0 8px 24px rgba(0,0,0,.45);
}
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: #1a1a1a; }
.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: #1a1a1a; }
.maplibregl-ctrl-attrib { font-size: 10px; }
.map-pop { min-width: 132px; }
.map-pop b { display: block; font-size: var(--fs-15); line-height: var(--lh-15); }
.map-pop span { display: block; color: var(--muted); font-size: var(--fs-12); line-height: var(--lh-12); margin: 4px 0 8px; }
.map-pop a { color: #0095f6; font-size: var(--fs-12); font-weight: var(--fw-semibold); margin-right: 8px; }
.lang {
  background: transparent; border: 0; max-width: 96px; padding: 4px 0;
  font-size: var(--fs-13); line-height: var(--lh-13); letter-spacing: 0; color: var(--text);
}
.searchbar input, .searchbar select, .composer input {
  flex: 1; background: #1a1a1a; border: 0; border-radius: 10px; padding: 10px 12px;
  font-size: var(--fs-16); line-height: var(--lh-16); letter-spacing: 0;
}
.tile .cap small { display: block; font-size: var(--fs-11); line-height: var(--lh-11); opacity: .88; font-weight: var(--fw); }
.hint.coming { color: #f9ce34; }
.apply-form label {
  display: block; font-size: var(--fs-12); line-height: var(--lh-12); letter-spacing: 0; color: var(--muted); margin: 12px 0 4px;
}
.apply-form input, .apply-form select {
  width: 100%; background: #1a1a1a; border: 0; border-radius: 10px; padding: 10px 12px;
  font-size: var(--fs-16); line-height: var(--lh-16); letter-spacing: 0;
}
.apply-form .btn { width: 100%; margin-top: 16px; }
.apply-list { margin-top: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 14px 10px; scrollbar-width: none; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--line); background: transparent;
  color: var(--text); border-radius: 8px; padding: 6px 10px; cursor: pointer;
  font-size: var(--fs-13); line-height: var(--lh-13); letter-spacing: 0; font-weight: var(--fw-semibold);
}
.chip.on { background: #f5f5f5; color: #000; }
.search-panel { padding: 0 14px 8px; background: #000; }
.suggest, .s-chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 0 0 10px;
  scrollbar-width: none;
}
.suggest::-webkit-scrollbar, .s-chips::-webkit-scrollbar { display: none; }
.suggest-chip {
  flex: 0 0 auto; border: 0; background: #1a1a1a; color: #ddd;
  border-radius: 999px; padding: 7px 12px; cursor: pointer;
  font-size: var(--fs-13); line-height: var(--lh-13);
}
.s-range { margin: 0 0 10px; }
.s-range-h {
  display: flex; justify-content: space-between; align-items: baseline;
  color: var(--muted); font-size: var(--fs-12); line-height: var(--lh-12);
}
.s-range-h b { color: var(--text); font-weight: var(--fw-semibold); }
.range-wrap { position: relative; height: 28px; margin-top: 2px; }
.range-track, .range-fill {
  position: absolute; left: 0; right: 0; top: 13px; height: 3px;
  border-radius: 99px; background: #333; pointer-events: none;
}
.range-fill { right: auto; background: #f5f5f5; }
.range-wrap input[type="range"] {
  position: absolute; left: 0; top: 0; width: 100%; height: 28px; margin: 0;
  background: none; appearance: none; -webkit-appearance: none;
}
.range-wrap.dual input[type="range"] { pointer-events: none; }
.range-wrap:not(.dual) input[type="range"] { pointer-events: auto; }
.range-wrap input[type="range"]::-webkit-slider-runnable-track { height: 3px; background: transparent; }
.range-wrap input[type="range"]::-moz-range-track { height: 3px; background: transparent; }
.range-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.5);
  margin-top: -7px; cursor: pointer;
}
.range-wrap input[type="range"]::-moz-range-thumb {
  pointer-events: auto; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 0; cursor: pointer;
}
.sec-h {
  grid-column: 1 / -1;
  margin: 0; padding: 14px 14px 10px; background: #000;
  font-size: var(--fs-15); line-height: var(--lh-15); font-weight: var(--fw-semibold);
}

.profile { padding: 16px 16px 24px; }
.who { display: grid; grid-template-columns: 92px 1fr; gap: 16px; align-items: center; }
.who img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; }
.who h1 { margin: 0; font-size: var(--fs-20); line-height: var(--lh-20); letter-spacing: 0; font-weight: var(--fw-bold); }
.who p { margin: 6px 0 0; color: var(--muted); font-size: var(--fs-13); line-height: var(--lh-13); letter-spacing: 0; }
.bio { margin: 14px 0; font-size: var(--fs-15); line-height: var(--lh-15); color: #ddd; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn {
  background: #0095f6; color: #fff; border-radius: 8px; padding: 10px 12px;
  font-size: var(--fs-15); line-height: var(--lh-15); letter-spacing: 0; font-weight: var(--fw-semibold);
}
.btn.gray { background: #363636; }
.hint { color: var(--muted); font-size: var(--fs-12); line-height: var(--lh-12); letter-spacing: 0; margin: 10px 0 0; }

.inbox { display: flex; flex-direction: column; min-height: calc(100vh - 134px); }
.thread { display: flex; gap: 12px; padding: 12px 14px; align-items: center; border-bottom: 1px solid var(--line); }
.thread img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.thread.on { background: #111; }
.chat { display: flex; flex-direction: column; flex: 1; }
.msgs { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.thread b { font-size: var(--fs-15); line-height: var(--lh-15); font-weight: var(--fw-semibold); letter-spacing: 0; }
.bubble { max-width: 75%; padding: 8px 12px; border-radius: 18px; background: #262626; font-size: var(--fs-15); line-height: var(--lh-15); }
.bubble.me { margin-left: auto; background: #3797f0; }
.composer { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }

.plans { display: flex; flex-direction: column; gap: 10px; padding: 8px 14px 24px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.plan.featured { border-color: #f5f5f5; }
.price { font-size: var(--fs-22); line-height: var(--lh-22); letter-spacing: 0; font-weight: var(--fw-bold); margin: 6px 0 10px; }
.price small { font-size: var(--fs-13); line-height: var(--lh-13); letter-spacing: 0; color: var(--muted); font-weight: var(--fw); }
.kicker { color: var(--muted); font-size: var(--fs-12); line-height: var(--lh-12); text-transform: uppercase; letter-spacing: .08em; }
.page { padding: 16px 14px 8px; }
.page h1 { margin: 0 0 8px; font-size: var(--fs-22); line-height: var(--lh-22); letter-spacing: 0; font-weight: var(--fw-bold); }

.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); display: none;
  align-items: flex-end; justify-content: center; z-index: 80;
}
.modal.show { display: flex; }
.dialog {
  width: min(var(--max), 100%); background: #1a1a1a; border-radius: 16px 16px 0 0;
  padding: 18px 16px 28px;
}
.pay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }

.gate {
  position: fixed; inset: 0; background: #000; z-index: 100;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px;
}
.toast {
  position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%);
  background: #1a1a1a; border: 1px solid var(--line); padding: 8px 12px; border-radius: 8px;
  display: none; z-index: 90; font-size: var(--fs-13); line-height: var(--lh-13); letter-spacing: 0;
}
.ghost { color: var(--muted); padding: 8px; }
footer.tiny { display: none; }

.fav-tabs { padding: 4px 14px 10px; }
.fav-list { padding: 0 0 24px; }
.fav-row {
  padding: 12px 14px 14px;
  border-bottom: 1px solid var(--line);
}
.fav-who {
  display: grid; grid-template-columns: 52px 1fr; gap: 12px;
  align-items: center; color: inherit; text-decoration: none;
}
.fav-who img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.fav-who b { display: block; font-size: var(--fs-15); line-height: var(--lh-15); }
.fav-who small { display: block; margin-top: 4px; color: var(--muted); font-size: var(--fs-12); line-height: var(--lh-12); }
.fav-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }

.lab { padding: 16px 14px 32px; }
.lab h1 { margin: 6px 0 8px; font-size: var(--fs-22); line-height: var(--lh-22); letter-spacing: 0; font-weight: var(--fw-bold); }
.lab .card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px; margin: 12px 0;
}
.lab input, .dialog input, .dialog select, .dialog textarea, .profile input, .profile select, .profile textarea, .admin-shell input {
  width: 100%; background: #111; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; margin: 8px 0;
  font-size: var(--fs-16); line-height: var(--lh-16); letter-spacing: 0;
}
.dialog textarea, .profile textarea { min-height: 72px; resize: vertical; }
.login-dialog {
  max-height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#profileModal { align-items: stretch; }
#profileModal .dialog {
  border-radius: 0;
  min-height: 100dvh;
  max-height: 100dvh;
}
.profile-edit { padding: 8px 16px 36px; }
.profile-geo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.purpose-group { margin: 10px 0; }
.purpose-group h4 {
  margin: 0 0 6px; color: var(--muted);
  font-size: var(--fs-12); line-height: var(--lh-12); font-weight: var(--fw-semibold);
}
.purpose-list { display: flex; flex-wrap: wrap; gap: 6px; }
.purpose-list label {
  display: inline-flex; align-items: center; gap: 4px;
  background: #111; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 10px; font-size: var(--fs-12); line-height: var(--lh-12); cursor: pointer;
}
.purpose-list label.on { background: #f5f5f5; color: #000; border-color: #f5f5f5; }
.purpose-list input { width: 14px; height: 14px; margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; align-items: center; }
.tag-label {
  color: var(--muted);
  font-size: var(--fs-13); line-height: var(--lh-13); font-weight: var(--fw-semibold);
  margin-right: 2px;
}
.tag {
  background: #222; border-radius: 999px; padding: 3px 8px;
  font-size: var(--fs-11); line-height: var(--lh-11); color: #ddd;
}
.tile-tags {
  position: absolute; left: 6px; top: 6px; right: 6px;
  font-size: 11px; line-height: 13px; font-weight: 600;
  text-shadow: 0 1px 4px #000; color: #fff;
}
.ascii-pass {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.lab pre, #labLog {
  background: #111; border-radius: 8px; padding: 10px;
  overflow: auto; font-size: 12px; color: #86efac; white-space: pre-wrap;
}

@media (min-width: 900px) {
  body { background: #000; }
  .shell { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

.ig-verified {
  display: inline-flex; width: 15px; height: 15px; margin: 0 2px -2px;
  vertical-align: middle;
}
.ig-verified svg { width: 100%; height: 100%; display: block; }
.ig-verified.on-story {
  position: absolute; right: 6px; bottom: 18px; width: 16px; height: 16px;
  margin: 0; background: #000; border-radius: 50%;
}
.ig-verified.on-avatar {
  position: absolute; right: 2px; bottom: 2px; width: 20px; height: 20px;
  margin: 0; background: #000; border-radius: 50%;
}
.who-photo { position: relative; }
.who-photo img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; }
.cap .ig-verified { width: 13px; height: 13px; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 4px; }
.seg .chip { text-align: center; }
.agree {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 10px 0 8px; color: var(--muted);
  font-size: var(--fs-12); line-height: var(--lh-12);
}
.agree input { width: 18px; height: 18px; margin: 1px 0 0; flex: 0 0 auto; }
.legal-box {
  max-height: 140px; overflow: auto;
  background: #111; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; margin: 8px 0;
  color: var(--muted); font-size: var(--fs-12); line-height: 1.55;
  text-align: left;
}
.legal-box.short { max-height: none; }
.gate .legal-box { margin: 0 auto 18px; max-width: 40ch; }
.auth-switch {
  margin: 12px 0 0; color: var(--muted);
  font-size: var(--fs-13); line-height: var(--lh-13); text-align: center;
}
button.link, a.link {
  background: none; border: 0; padding: 0; margin: 0;
  color: #f5f5f5; font: inherit; font-weight: var(--fw-semibold);
  cursor: pointer; text-decoration: none;
}
.photo-pick {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; margin: 8px 0 12px; min-height: 120px;
  background: #111; border: 1px dashed var(--line); border-radius: 12px;
  padding: 12px; cursor: pointer; color: var(--muted);
  font-size: var(--fs-13); line-height: var(--lh-13);
}
.photo-pick img {
  width: 96px; height: 96px; object-fit: cover; border-radius: 12px;
  background: #000;
}
.form-h {
  margin: 16px 0 8px; padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-16); line-height: var(--lh-16); font-weight: var(--fw-semibold);
}
.field-label {
  margin: 10px 0 0; color: var(--muted);
  font-size: var(--fs-12); line-height: var(--lh-12);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gender-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 4px; }
.gender-card {
  display: flex; align-items: center; justify-content: center;
  min-height: 72px; border-radius: 12px; border: 1px solid var(--line);
  background: #111; color: var(--muted); font-size: var(--fs-13); text-align: center;
}
.gender-card.on { background: #f5f5f5; color: #000; border-color: #f5f5f5; }
.facts {
  margin: 10px 0 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.facts div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-bottom: 1px solid var(--line);
  font-size: var(--fs-13); line-height: var(--lh-13);
}
.facts div:last-child { border-bottom: 0; }
.facts span { color: var(--muted); }
.facts b { font-weight: var(--fw-semibold); text-align: right; }
.code-wrap { margin-top: 8px; }
.admin-row {
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.admin-row small { display: block; margin-top: 4px; color: var(--muted); font-size: var(--fs-12); }
.admin-shell { padding-bottom: 24px; }
.photo-grid { padding-bottom: 8px; }
.photo-cell { background: #000; display: flex; flex-direction: column; min-width: 0; }
.photo-cell .tile { aspect-ratio: 1; }
.like-bar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 8px 8px 10px; background: #000;
  font-size: var(--fs-12); line-height: var(--lh-12); color: var(--muted);
}
.like-btn, .like-heart {
  background: none; border: 0; padding: 0; margin: 0;
  color: #f5f5f5; font-size: 18px; line-height: 1; cursor: pointer;
}
.like-heart { cursor: default; opacity: .85; }
.like-btn.on, .like-heart.on { color: #ed4956; }
.like-count { color: #f5f5f5; font-weight: var(--fw-semibold); }
.like-unit { color: var(--muted); }
.like-who-list { max-height: 40vh; overflow: auto; margin: 12px 0; }
.like-who-list div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
  font-size: var(--fs-15); line-height: var(--lh-15);
}
.like-who-list span { color: var(--muted); font-size: var(--fs-12); line-height: var(--lh-12); }
.act-head h1, .act-page h1 { margin: 0 0 4px; }
.act-list { padding: 4px 0 24px; }
.act-row {
  display: grid; grid-template-columns: 44px 1fr 22px;
  gap: 12px; align-items: center;
  width: 100%; padding: 10px 16px;
  color: inherit; text-align: left;
}
.act-row.new { background: rgba(0, 149, 246, .08); }
.act-row img, .act-ph {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #1a1a1a;
}
.act-ph { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.act-ph svg { width: 22px; height: 22px; }
.act-row p { margin: 0; font-size: var(--fs-15); line-height: var(--lh-15); }
.act-row p b { font-weight: var(--fw-semibold); }
.act-row span { display: block; margin-top: 2px; color: var(--muted); font-size: var(--fs-12); line-height: var(--lh-12); }
.act-row svg { width: 18px; height: 18px; color: var(--muted); }
.act-empty {
  padding: 72px 28px; text-align: center; color: var(--muted);
}
.act-empty svg { width: 72px; height: 72px; margin: 0 auto 16px; }
.act-empty p {
  margin: 0 0 8px; color: var(--text);
  font-size: var(--fs-20); line-height: var(--lh-20); font-weight: var(--fw-semibold);
}
.act-empty small { font-size: var(--fs-13); line-height: var(--lh-13); }
.thread-list { border-bottom: 1px solid var(--line); }
.thread .preview {
  color: var(--muted); font-size: var(--fs-12); line-height: var(--lh-12);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.thread.unread b { font-weight: var(--fw-bold); }
.chat-head {
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  font-size: var(--fs-15); line-height: var(--lh-15); font-weight: var(--fw-semibold);
}
.composer { flex-direction: column; align-items: stretch; gap: 6px; }
.composer-row { display: flex; gap: 8px; width: 100%; }
.composer-row input { flex: 1; }
.msg-modes {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 0 2px 2px;
}
.msg-mode {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--line); background: transparent;
  border-radius: 999px; padding: 5px 10px;
  font-size: var(--fs-12); line-height: var(--lh-12); color: var(--muted);
}
.msg-mode svg { width: 12px; height: 12px; }
.msg-mode.on { background: #f5f5f5; color: #000; border-color: #f5f5f5; }
.msg-mode.locked { opacity: .42; }
.msg-mode-hint { margin: 0; flex: 1 0 100%; }
.bubble { position: relative; }
.bubble .msg-lock { display: inline-flex; margin-right: 6px; vertical-align: -2px; }
.bubble .msg-lock svg { width: 12px; height: 12px; }
.bubble.burned {
  background: transparent; border: 1px dashed var(--line); color: var(--muted);
  text-align: center;
}
.bubble.burned small { display: block; margin-top: 4px; font-size: var(--fs-12); }
.bubble.burn-wait {
  width: 100%; max-width: 75%;
  background: #111; border: 1px solid var(--line);
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text); cursor: pointer;
}
.bubble.burn-wait svg { width: 16px; height: 16px; color: #ed4956; }
.burn-view {
  position: fixed; inset: 0; z-index: 96;
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 24px; background: #000;
  text-align: center;
}
.burn-view.show { display: flex; }
.burn-view p {
  margin: 0; max-width: 18em;
  font-size: var(--fs-22); line-height: var(--lh-22); font-weight: var(--fw-semibold);
}
.burn-timer { margin-top: 20px; color: #ed4956; font-size: var(--fs-13); letter-spacing: .08em; }
