/* «Аренда без агента» — Telegram Mini App styles.
 * 1-to-1 prototype visual tokens, components, light & dark themes. */

:root {
  --bg: #F1F1EF;
  --surface: #FFFFFF;
  --surface-2: #F0F0EE;
  --line: #E1E1DE;
  --line-soft: #EAEAE7;
  --fg: #141414;
  --muted: #5E5E5B;
  --faint: #94948F;
  --ink: #141414;
  --ink-fg: #FFFFFF;
  --accent: #2347B5;
  --accent-hover: #1B3891;
  --accent-ink: #FFFFFF;
  --accent-soft: #E6EBF8;
  --good: #2D7A48;
  --good-soft: #E3F2E8;
  --warn: #A5650F;
  --warn-soft: #FBF0DD;
  --bad: #B4362E;
  --bad-soft: #FBE5E3;
  --star: #D99A06;
  --bezel: #1B1B1A;
  --scrim: rgba(20, 20, 20, 0.38);
  --shadow: rgba(20, 20, 20, 0.10);
  --display: "Onest", "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --r: 16px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212;
    --surface: #1C1C1B;
    --surface-2: #262625;
    --line: #323230;
    --line-soft: #2A2A29;
    --fg: #F1F1EF;
    --muted: #A9A9A4;
    --faint: #75756F;
    --ink: #F1F1EF;
    --ink-fg: #141414;
    --accent: #7D9BFF;
    --accent-hover: #9CB3FF;
    --accent-ink: #0E1430;
    --accent-soft: #1F2744;
    --good: #6CC08A;
    --good-soft: #1B2F22;
    --warn: #E0A54C;
    --warn-soft: #33281A;
    --bad: #EE7B72;
    --bad-soft: #3A2020;
    --star: #F2B533;
    --bezel: #000;
    --scrim: rgba(0, 0, 0, 0.55);
    --shadow: rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #121212;
  --surface: #1C1C1B;
  --surface-2: #262625;
  --line: #323230;
  --line-soft: #2A2A29;
  --fg: #F1F1EF;
  --muted: #A9A9A4;
  --faint: #75756F;
  --ink: #F1F1EF;
  --ink-fg: #141414;
  --accent: #7D9BFF;
  --accent-hover: #9CB3FF;
  --accent-ink: #0E1430;
  --accent-soft: #1F2744;
  --good: #6CC08A;
  --good-soft: #1B2F22;
  --warn: #E0A54C;
  --warn-soft: #33281A;
  --bad: #EE7B72;
  --bad-soft: #3A2020;
  --star: #F2B533;
  --bezel: #000;
  --scrim: rgba(0, 0, 0, 0.55);
  --shadow: rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}

button, input, select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

.nojs {
  max-width: 420px;
  margin: 40px auto;
  padding: 20px;
  background: var(--surface);
  border-radius: var(--r);
  text-align: center;
}

/* App shell */
.phone {
  max-width: 480px;
  margin: 0 auto;
  height: 100dvh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tgbar {
  flex: none;
  display: grid;
  grid-template-columns: 76px 1fr 76px;
  align-items: center;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 12px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
  z-index: 5;
}

.tgbar .cl {
  all: unset;
  cursor: pointer;
  color: var(--accent);
  font-size: 14.5px;
  font-weight: 500;
}

.tgbar .tt {
  text-align: center;
  line-height: 1.2;
}

.tgbar .tt b {
  display: block;
  font: 600 15px var(--body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tgbar .tt span {
  font-size: 11.5px;
  color: var(--faint);
}

.ctry {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted) !important;
}

.flag {
  width: 16px;
  height: 11px;
  border-radius: 2px;
  flex: none;
  box-shadow: 0 0 0 0.5px var(--line);
}

.tgbar .mo {
  justify-self: end;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
}

.scr {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.scr::-webkit-scrollbar {
  display: none;
}

.tabs {
  flex: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface);
  border-top: 1px solid var(--line-soft);
  padding: 6px 6px calc(14px + env(safe-area-inset-bottom, 0px));
}

.tabs button {
  all: unset;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: var(--faint);
  padding: 4px 0;
  border-radius: 12px;
}

.tabs button svg {
  width: 22px;
  height: 22px;
}

.tabs button[aria-current="page"] {
  color: var(--accent);
  font-weight: 500;
}

.tabs button:focus-visible {
  outline: 2px solid var(--accent);
}

/* Feed */
.fhead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
  padding: 12px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.frow {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -14px;
  padding: 0 14px;
}

.frow::-webkit-scrollbar {
  display: none;
}

.fchip {
  all: unset;
  cursor: pointer;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg);
  white-space: nowrap;
}

.fchip.on {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

.fchip.ic {
  background: var(--ink);
  color: var(--ink-fg);
}

.fchip:focus-visible {
  outline: 2px solid var(--accent);
}

.fmeta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.fmeta b {
  color: var(--fg);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  50% { opacity: 0.3; }
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 10px 18px;
}

.hint {
  background: var(--surface);
  border-radius: var(--r);
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.45;
}

.hint p {
  margin: 0;
  flex: 1;
}

.hint b {
  font-weight: 600;
}

.x {
  all: unset;
  cursor: pointer;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--faint);
  flex: none;
  font-size: 17px;
}

.x:hover {
  background: var(--surface-2);
  color: var(--fg);
}

.card {
  background: var(--surface);
  border-radius: var(--r);
  padding: 13px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}

.card:focus-visible {
  outline: 2px solid var(--accent);
}

.ctop {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.loc {
  font-weight: 600;
  font-size: 14px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ago {
  font: 12px var(--mono);
  color: var(--faint);
  white-space: nowrap;
}

.ago.fresh {
  color: var(--good);
}

.tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.tag {
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  white-space: nowrap;
}

.tag.own {
  background: var(--good-soft);
  color: var(--good);
  font-weight: 500;
}

.tag.rent {
  background: var(--warn-soft);
  color: var(--warn);
}

.tag.fresh {
  background: var(--warn-soft);
  color: var(--warn);
  font-weight: 500;
}

.tag.free {
  background: var(--good-soft);
  color: var(--good);
  font-weight: 500;
}

.tag.ph {
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.price {
  font: 700 19px/1.2 var(--display);
  font-variant-numeric: tabular-nums;
}

.price small {
  font: 400 13px var(--body);
  color: var(--muted);
}

.price.na {
  font: 500 14px var(--body);
  color: var(--faint);
}

.txt {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--fg);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cblur {
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 0 2px;
  white-space: nowrap;
}

.src {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
  padding-top: 9px;
  min-width: 0;
}

.src svg {
  flex: none;
  color: var(--faint);
}

.blur {
  filter: blur(4.5px);
  user-select: none;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.src .rev {
  color: var(--fg);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.src .sp {
  flex: 1;
}

.openb {
  all: unset;
  cursor: pointer;
  flex: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 6px 13px;
  border-radius: 999px;
  white-space: nowrap;
}

.openb:hover {
  background: var(--accent-hover);
}

.openb.done {
  background: var(--good-soft);
  color: var(--good);
}

.openb:focus-visible {
  outline: 2px solid var(--fg);
}

.prob {
  all: unset;
  cursor: pointer;
  flex: none;
  font: 700 12px var(--display);
  letter-spacing: 0.03em;
  color: var(--fg);
  background: var(--surface-2);
  padding: 6px 11px;
  border-radius: 999px;
}

.prob:hover {
  background: var(--line);
}

.prob:focus-visible {
  outline: 2px solid var(--accent);
}

.deadb {
  flex: none;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--bad);
  background: var(--bad-soft);
  padding: 5px 11px;
  border-radius: 999px;
}

.more {
  all: unset;
  cursor: pointer;
  align-self: center;
  font-size: 13px;
  color: var(--muted);
  padding: 8px 14px;
}

/* Detail screen */
.dhead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 6px;
}

.back {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 14.5px;
  font-weight: 500;
  padding: 4px 6px;
  border-radius: 10px;
}

.back:focus-visible {
  outline: 2px solid var(--accent);
}

.dbody {
  padding: 0 10px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.box {
  background: var(--surface);
  border-radius: var(--r);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.box h2 {
  font: 700 19px/1.25 var(--display);
  margin: 0;
  text-wrap: balance;
}

.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  font-size: 13px;
  margin: 0;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  min-width: 0;
}

.full {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-line;
}

.who {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  font-size: 13.5px;
}

.who .k {
  color: var(--muted);
  font-size: 12.5px;
}

.who .v {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lockbox {
  border: 1.5px solid var(--accent);
  background: var(--surface);
}

.lockhd {
  display: flex;
  gap: 10px;
  align-items: center;
}

.lockic {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex: none;
}

.lockhd b {
  font-weight: 600;
}

.lockhd p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}

.btn {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  text-align: center;
}

.btn.pri {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn.pri:hover {
  background: var(--accent-hover);
}

.btn.sec {
  background: var(--surface-2);
  color: var(--fg);
}

.btn.sec:hover {
  background: var(--line);
}

.btn.ghost {
  color: var(--muted);
  font-weight: 500;
  padding: 8px;
}

.btn.ghost:hover {
  color: var(--fg);
}

.btn:focus-visible {
  outline: 2px solid var(--fg);
}

.okline {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--good-soft);
  color: var(--good);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
}

.cred {
  font-size: 12.5px;
  color: var(--muted);
}

/* Bottom sheets */
.ov {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: var(--scrim);
  display: flex;
  align-items: flex-end;
  animation: ovIn 0.18s ease-out;
}

@keyframes ovIn {
  from { opacity: 0; }
}

.sheet {
  width: 100%;
  max-height: 88%;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 8px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: up 0.22s ease-out;
}

@keyframes up {
  from { transform: translateY(30px); }
}

.grab {
  width: 38px;
  height: 5px;
  border-radius: 9px;
  background: var(--line);
  align-self: center;
  margin-bottom: 2px;
}

.shd {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shd b {
  font: 700 18px var(--display);
}

.grp {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.grp > span {
  font: 500 10.5px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--faint);
}

.opts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.opt {
  all: unset;
  cursor: pointer;
  font-size: 13.5px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--fg);
}

.opt[aria-pressed="true"] {
  background: var(--ink);
  color: var(--ink-fg);
}

.opt:focus-visible {
  outline: 2px solid var(--accent);
}

.rng {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
}

.rng b {
  font-variant-numeric: tabular-nums;
}

input[type=range] {
  width: 100%;
  accent-color: var(--accent);
  margin: 0;
}

.tog {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  cursor: pointer;
}

.tog small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.sw {
  appearance: none;
  flex: none;
  width: 40px;
  height: 24px;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  cursor: pointer;
  margin: 0;
  transition: background 0.2s;
  accent-color: var(--accent);
}

.sw::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 2px var(--shadow);
  transition: transform 0.2s;
}

.sw:checked {
  background: var(--accent);
}

.sw:checked::after {
  transform: translateX(16px);
}

/* Packs & Pro */
.sumrow {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface-2);
  border-radius: 14px;
  padding: 12px 14px;
}

.sumrow b {
  display: block;
  font-weight: 600;
}

.sumrow span {
  font-size: 12.5px;
  color: var(--muted);
}

.packs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pk {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
}

.pk:focus-visible {
  outline: 2px solid var(--accent);
}

.pk[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.pk .rd {
  grid-row: span 2;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line);
  box-sizing: border-box;
}

.pk[aria-pressed="true"] .rd {
  border: 5px solid var(--accent);
}

.pk b {
  font-weight: 600;
}

.pk .pr {
  font: 700 17px var(--display);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.pk span {
  font-size: 12.5px;
  color: var(--muted);
}

.pk .per {
  text-align: right;
}

.pk .best {
  font-size: 11px;
  font-weight: 600;
  color: var(--good);
  background: var(--good-soft);
  padding: 1px 8px;
  border-radius: 999px;
  margin-left: 6px;
}

.prorow {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--ink-fg);
}

.prorow:focus-visible {
  outline: 2px solid var(--accent);
}

.prorow div {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
}

.prorow b {
  display: block;
  font-size: 14px;
}

.prorow .pr {
  font: 700 16px var(--display);
  white-space: nowrap;
}

.prorow .probadge {
  align-self: center;
}

.prorow div span {
  display: block;
  opacity: 0.75;
}

.probadge {
  font: 700 12px var(--display);
  letter-spacing: 0.04em;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 3px 10px;
  border-radius: 999px;
  align-self: flex-start;
}

.plan {
  background: var(--ink);
  color: var(--ink-fg);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan .pp {
  font: 700 30px/1 var(--display);
  font-variant-numeric: tabular-nums;
}

.plan .pp small {
  font: 400 14px var(--body);
  opacity: 0.7;
}

.plan ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13.5px;
}

.plan li {
  display: flex;
  gap: 8px;
}

.plan li::before {
  content: "✓";
  font-weight: 700;
  opacity: 0.8;
}

.plan .btn.pri {
  background: var(--accent);
  color: var(--accent-ink);
}

.cmp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cmp div {
  background: var(--surface);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12.5px;
  color: var(--muted);
}

.cmp b {
  font: 600 16px var(--display);
  color: var(--fg);
}

.legal {
  font-size: 11.5px;
  color: var(--faint);
  text-align: center;
  line-height: 1.4;
  margin: 0;
}

.legal a {
  color: var(--accent);
  text-decoration: underline;
}

/* Tabs: Opened & Profile */
.ptitle {
  font: 700 22px var(--display);
  margin: 0;
  padding: 16px 14px 4px;
}

.list {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--r);
  margin: 10px;
}

.li {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--line-soft);
}

.li:first-child {
  border-top: 0;
}

.li:focus-visible {
  outline: 2px solid var(--accent);
}

.li b {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.li span {
  font-size: 12.5px;
  color: var(--muted);
}

.li .r {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.empty {
  padding: 34px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.empty .ei {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--faint);
}

.empty h3 {
  font: 700 17px var(--display);
  margin: 0;
}

.empty p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  max-width: 32ch;
}

.psec {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 10px 0;
}

.psec > span {
  font: 500 10.5px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--faint);
  padding: 0 6px;
}

.subst {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.pill {
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  white-space: nowrap;
}

.pill.a {
  background: var(--accent-soft);
  color: var(--accent);
}

.pill.g {
  background: var(--good-soft);
  color: var(--good);
}

/* Onboarding */
.onb {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px 18px 22px;
  background: var(--bg);
  touch-action: pan-y;
}

.onbtop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 30px;
}

.dots {
  display: flex;
  gap: 6px;
}

.dots i {
  width: 6px;
  height: 6px;
  border-radius: 9px;
  background: var(--line);
  transition: width 0.25s, background 0.25s;
}

.dots i.on {
  width: 22px;
  background: var(--accent);
}

.skip {
  all: unset;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 10px;
}

.skip:hover {
  color: var(--fg);
}

.skip:focus-visible {
  outline: 2px solid var(--accent);
}

.ill {
  flex: 1;
  min-height: 0;
  border-radius: 24px;
  background: linear-gradient(to bottom, #ABD0FE 0%, #CCE1FC 45%, #E9F0FA 80%, #F1F4F9 100%);
  color: #141414;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 18px;
  overflow: hidden;
  position: relative;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0.3; transform: translateY(6px); }
}

.onbtx {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 130px;
}

.onbtx h2 {
  font: 700 24px/1.15 var(--display);
  margin: 0;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.onbtx p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}

.onbnav {
  display: flex;
  gap: 8px;
}

.onbnav .btn.sec {
  flex: 0 0 52px;
  padding: 11px 0;
}

/* Onboarding illustration elements */
.tb {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  color: #141414;
  font: 500 11.5px/1.2 var(--body);
  padding: 4px 9px 4px 4px;
  border-radius: 13px 13px 13px 3px;
  box-shadow: 0 6px 16px rgba(30, 50, 110, 0.22), 0 0 0 1px rgba(30, 50, 110, 0.04);
  white-space: nowrap;
  z-index: 3;
}

.tb i {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  color: #FFFFFF;
  font: 600 9.5px/19px var(--display);
  text-align: center;
  font-style: normal;
  flex: none;
}

.tb em {
  font-style: normal;
  font-size: 8.5px;
  color: #8FA0BE;
  margin-left: 2px;
}

.tbrand {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -1px -13px 3px;
  padding: 0 13px 8px;
  border-bottom: 1px solid #EAEAE7;
  color: #2347B5;
  font: 700 13.5px/1.1 var(--display);
  white-space: nowrap;
}

.tbrand em {
  font-style: normal;
  margin-left: auto;
  display: flex;
}

.tbrand .flag {
  width: 18px;
  height: 12px;
}

.tstack {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 4%;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.tstack > i {
  display: block;
  height: 7px;
  margin-top: -1px;
  background: #FFFFFF;
  border: 1px solid #D9E2F3;
  border-top: 0;
  border-radius: 0 0 10px 10px;
}

.tstack > i:nth-child(2) { background: #FBFCFE; }
.tstack > i:nth-child(3) { background: #F5F7FC; }
.tstack > i:nth-child(4) { background: #EEF2FA; }

.tcard {
  position: relative;
  z-index: 1;
  width: 100%;
  background: #FFFFFF;
  color: #141414;
  border-radius: 14px;
  padding: 9px 13px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 10px 26px rgba(30, 50, 110, 0.16);
  text-align: left;
}

.tcard b {
  font: 600 14px var(--body);
}

.ttags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.ttags span {
  font-size: 10.5px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #F0F0EE;
  color: #5E5E5B;
}

.ttags .g {
  background: #E3F2E8;
  color: #2D7A48;
  font-weight: 500;
}

.tcard strong {
  font: 700 17px var(--display);
}

.tcard strong small {
  font: 400 12px var(--body);
  color: #5E5E5B;
}

.trow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tbtn {
  background: #2347B5;
  color: #FFFFFF;
  font: 600 12px/1 var(--body);
  padding: 7px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.m2s {
  width: 100%;
  max-width: 290px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.m2 {
  background: #FFFFFF;
  color: #141414;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 6px 18px rgba(30, 50, 110, 0.14);
}

.m2 .loc {
  font-size: 13px;
  color: #141414;
}

.m2 .ago {
  font-size: 11px;
  color: #94948F;
}

.m2 .tag {
  font-size: 10.5px;
  padding: 1px 8px;
  background: #F0F0EE;
  color: #5E5E5B;
}

.m2 .tag.k {
  background: #E6EBF8;
  color: #2347B5;
  font-weight: 500;
}

.m2 .tag.own {
  background: #E3F2E8;
  color: #2D7A48;
  font-weight: 500;
}

.m2 .price {
  font: 700 15px var(--display);
  color: #141414;
}

.m2 .price small {
  font: 400 11.5px var(--body);
  color: #5E5E5B;
}

.m3 {
  width: 100%;
  max-width: 290px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.m3 .m2 {
  width: 100%;
}

.c3 {
  width: 100%;
  background: #FFFFFF;
  color: #141414;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 6px 18px rgba(30, 50, 110, 0.14);
}

.c3h {
  display: flex;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid #EAEAE7;
  padding-bottom: 7px;
  margin-bottom: 2px;
}

.c3h i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #E8743B;
  color: #FFFFFF;
  font: 600 12px/26px var(--display);
  text-align: center;
  font-style: normal;
}

.c3h b {
  display: block;
  font-size: 13px;
}

.c3h span {
  font-size: 11px;
  color: #94948F;
}

.cb {
  align-self: flex-start;
  max-width: 85%;
  background: #F0F0EE;
  color: #141414;
  font-size: 12px;
  line-height: 1.35;
  padding: 6px 10px;
  border-radius: 12px 12px 12px 3px;
}

.cb.me {
  align-self: flex-end;
  background: #2347B5;
  color: #FFFFFF;
  border-radius: 12px 12px 3px 12px;
}

.cb em {
  font-style: normal;
  font-size: 9px;
  opacity: 0.65;
  margin-left: 6px;
}

.lock {
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lclock {
  font: 600 38px/1 var(--display);
  color: #FFFFFF;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(30, 60, 140, 0.25);
}

.ldate {
  font: 500 13px var(--body);
  color: #FFFFFF;
  opacity: 0.9;
  margin: 3px 0 12px;
  text-shadow: 0 1px 6px rgba(30, 60, 140, 0.25);
}

.nts {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nt {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.9);
  color: #141414;
  border-radius: 16px;
  padding: 7px 11px;
  box-shadow: 0 6px 18px rgba(30, 50, 110, 0.14);
  backdrop-filter: blur(6px);
}

.nic {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #2347B5;
  display: grid;
  place-items: center;
  font-size: 15px;
}

.nt > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nh {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  color: #5E5E5B;
}

.nh b {
  font-weight: 600;
  color: #5E5E5B;
}

.nh em {
  font-style: normal;
  color: #94948F;
}

.nb {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ns {
  font-size: 12px;
  color: #5E5E5B;
}

.pickwrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 8px;
}

.pickwrap .pick {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pickwrap .pick .opts {
  justify-content: flex-start;
}

.pickwrap .pick .grp > span {
  text-align: left;
}

.pickwrap .pick .opt {
  background: var(--surface);
  color: var(--fg);
  padding: 8px 14px;
  font-size: 14px;
}

.pickwrap .pick .opt[aria-pressed="true"] {
  background: var(--ink);
  color: var(--ink-fg);
}

/* Photos & Gallery */
.gal {
  position: relative;
  margin: -13px -14px 0;
  border-radius: var(--r) var(--r) 0 0;
  overflow: hidden;
  background: var(--surface-2);
}

.box > .gal {
  margin: -14px -14px 0;
}

.gstrip {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.gstrip::-webkit-scrollbar {
  display: none;
}

.gstrip .ph {
  flex: 0 0 100%;
  scroll-snap-align: start;
  aspect-ratio: 16/10;
  display: block;
  cursor: zoom-in;
  border: 0;
  padding: 0;
  background: none;
}

.gstrip .ph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gcount {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(10, 10, 10, 0.6);
  color: #FFFFFF;
  font: 500 11.5px var(--mono);
  padding: 2px 9px;
  border-radius: 999px;
  pointer-events: none;
}

/* Native photo viewer dialog */
dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(0, 0, 0, 0.75);
}

.viewer {
  border: 0;
  padding: 0;
  margin: 0;
  max-width: 100vw;
  max-height: 100dvh;
  width: 100vw;
  height: 100dvh;
  background: #0B0B0B;
  color: #FFFFFF;
  position: fixed;
  inset: 0;
  z-index: 25;
}

.viewer[open] {
  display: flex;
  flex-direction: column;
}

.vtop {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 12px 10px;
}

.vtop b {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vtop .vc {
  font: 500 12.5px var(--mono);
  opacity: 0.75;
}

.vx {
  all: unset;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

.vx:focus-visible {
  outline: 2px solid #FFFFFF;
}

.viewer .gstrip {
  flex: 1;
  align-items: center;
}

.viewer .gstrip .ph {
  cursor: default;
  aspect-ratio: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
}

.viewer .gstrip .ph img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.vthumbs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 12px;
  scrollbar-width: none;
}

.vthumbs::-webkit-scrollbar {
  display: none;
}

.vthumbs button {
  all: unset;
  cursor: pointer;
  flex: 0 0 54px;
  height: 38px;
  border-radius: 7px;
  overflow: hidden;
  opacity: 0.5;
  outline: 2px solid transparent;
}

.vthumbs button[aria-current="true"] {
  opacity: 1;
  outline-color: #FFFFFF;
}

.vthumbs button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vbot {
  padding: 6px 14px calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vbot p {
  margin: 0;
  font-size: 12.5px;
  opacity: 0.7;
  text-align: center;
}

/* Status indicator dot */
.stl {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.stl i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}

.stl.g i { background: var(--good); }
.stl.g { color: var(--good); }
.stl.y i { background: var(--warn); }
.stl.r i { background: var(--bad); }
.stl.r { color: var(--bad); font-weight: 500; }

/* Toast */
.toast {
  position: absolute;
  left: 50%;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 20;
  background: var(--ink);
  color: var(--ink-fg);
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 13.5px;
  white-space: nowrap;
  box-shadow: 0 8px 24px var(--shadow);
}

/* Legal pages (/terms, /privacy) */
.legal-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.legal-draft {
  background: var(--warn-soft);
  color: var(--warn);
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}

.legal-doc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px 20px;
}

.legal-doc h1 {
  margin-top: 0;
  font: 700 24px var(--display);
}

.legal-doc h2 {
  margin: 22px 0 8px;
  font: 700 17px var(--display);
}

.legal-doc a {
  color: var(--accent);
}
