@font-face {
  font-family: "Be Vietnam Pro";
  src: url("../fonts/BeVietnamPro-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Be Vietnam Pro";
  src: url("../fonts/BeVietnamPro-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Be Vietnam Pro";
  src: url("../fonts/BeVietnamPro-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Be Vietnam Pro";
  src: url("../fonts/BeVietnamPro-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f3eee4;
  --bg-deep: #e8e0d2;
  --surface: #fffdf8;
  --ink: #1a2420;
  --ink-2: #4a5550;
  --ink-3: #6e7973;
  --line: #e7e0d3;
  --line-2: #d9d1c3;
  --primary: #1b6b54;
  --primary-2: #145544;
  --primary-soft: #e3f2eb;
  --primary-soft-2: #cfe6db;
  --clay: #b85a32;
  --gold: #e8c36a;
  --gift: #1b7a4a;
  --gift-bg: #e8f6ee;
  --heart: #c44536;
  --heart-soft: #fdecea;
  --zalo: #0068ff;
  --zalo-soft: #e8f1ff;
  --danger: #b42318;
  --shadow: 0 10px 28px rgba(26, 36, 32, 0.1);
  --shadow-sm: 0 2px 8px rgba(26, 36, 32, 0.06);
  --radius: 16px;
  --tab-h: 72px;
  --fab: 62px;
  --font: "Be Vietnam Pro", "Noto Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: #cfc4b3;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 16px;
  color: inherit;
}
button { cursor: pointer; border: 0; background: none; }
img { display: block; max-width: 100%; }

.device {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.app {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 540px) {
  body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 16px;
    background:
      radial-gradient(ellipse at top, #e7ddd0 0%, #cfc4b3 55%, #b9ad9b 100%);
  }
  .device {
    min-height: 0;
    padding: 0;
  }
  .app {
    width: 390px;
    height: 844px;
    min-height: 844px;
    border-radius: 36px;
    box-shadow:
      0 0 0 12px #2b2622,
      0 0 0 14px #5a524a,
      0 40px 80px rgba(30, 24, 18, 0.35);
    overflow: hidden;
  }
}

/* ---------- top bars ---------- */
.topbar {
  flex: 0 0 auto;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: var(--bg);
  position: relative;
  z-index: 5;
}
.topbar.solid {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}
.brand-text { min-width: 0; }
.brand-name {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--primary-2);
}
.brand-sub {
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 500;
  margin-top: 1px;
}

.area-btn {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 8px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 15px;
  min-height: 42px;
  box-shadow: var(--shadow-sm);
  max-width: 100%;
}
.area-btn svg { width: 18px; height: 18px; color: var(--primary); flex: 0 0 auto; }
.area-btn .chev { width: 16px; height: 16px; color: var(--ink-3); }

.search-wrap {
  margin-top: 12px;
  position: relative;
}
.search-wrap input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  padding: 0 16px 0 44px;
  outline: none;
  font-size: 16px;
  box-shadow: var(--shadow-sm);
}
.search-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27, 107, 84, 0.18);
}
.search-wrap .ico {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--ink-3);
  pointer-events: none;
}
.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--ink-3);
  display: none;
  align-items: center;
  justify-content: center;
}
.search-wrap.has-query .search-clear { display: flex; }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px 8px;
  scrollbar-width: none;
  flex: 0 0 auto;
  background: var(--bg);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chip.on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.chip.gift.on {
  background: var(--gift);
  border-color: var(--gift);
}

/* ---------- scroll area ---------- */
.main {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tab-h) + 20px + env(safe-area-inset-bottom, 0px));
}
.main.no-tab {
  padding-bottom: 24px;
}
.feed-note {
  margin: 4px 16px 8px;
  font-size: 13.5px;
  color: var(--ink-3);
}

/* ---------- listing ---------- */
.feed { padding: 0 12px 16px; }
.card {
  display: flex;
  gap: 14px;
  padding: 12px;
  background: var(--surface);
  border-radius: 18px;
  margin-bottom: 10px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  min-height: 112px;
  width: 100%;
  text-align: left;
  align-items: stretch;
}
.card:active { transform: scale(0.992); }
.thumb {
  width: 104px;
  height: 104px;
  border-radius: 14px;
  flex: 0 0 104px;
  overflow: hidden;
  position: relative;
  background: var(--bg-deep);
}
.thumb img, .thumb svg, .thumb .ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.badge-sold, .badge-gift {
  position: absolute;
  left: 6px;
  top: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.badge-sold { background: rgba(26, 36, 32, 0.78); color: #fff; }
.badge-gift { background: var(--gift); color: #fff; }
.card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 2px 0;
}
.card-title {
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card.sold .card-title { color: var(--ink-3); }
.price {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-2);
  letter-spacing: -0.02em;
}
.price.gift { color: var(--gift); }
.card.sold .price {
  color: var(--ink-3);
  text-decoration: line-through;
  font-size: 16px;
}
.meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-3);
  padding-top: 6px;
}
.hearts {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--ink-3);
  font-weight: 500;
}
.hearts svg { width: 15px; height: 15px; }

.empty {
  text-align: center;
  padding: 48px 28px;
  color: var(--ink-2);
}
.empty .big { font-size: 42px; margin-bottom: 10px; }
.empty h3 { margin: 0 0 8px; font-size: 18px; }
.empty p { margin: 0; color: var(--ink-3); font-size: 15px; line-height: 1.5; }

/* ---------- tab bar + FAB ---------- */
.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  z-index: 20;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
  position: relative;
  min-height: 56px;
}
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--primary); }
.badge {
  position: absolute;
  top: 8px;
  transform: translateX(12px);
  background: var(--heart);
  color: #fff;
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.fab {
  position: absolute;
  right: 18px;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 14px);
  width: var(--fab);
  height: var(--fab);
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(27, 107, 84, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
  border: 3px solid #fffdf8;
}
.fab svg { width: 30px; height: 30px; }
.fab:active { transform: scale(0.96); background: var(--primary-2); }
.fab-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ---------- nav header (subpages) ---------- */
.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
}
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  color: var(--ink);
}
.icon-btn:active { background: var(--bg-deep); }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn.on { color: var(--heart); }
.nav-title {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  padding-right: 44px;
  letter-spacing: -0.02em;
}
.nav.has-right .nav-title { padding-right: 0; }

/* ---------- detail ---------- */
.carousel {
  position: relative;
  background: #1a2420;
  aspect-ratio: 1 / 0.82;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.slide {
  min-width: 100%;
  height: 100%;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide .ph, .slide img, .slide svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.dots span {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: rgba(255,255,255,0.4);
}
.dots span.on { background: #fff; width: 18px; }

.detail-body { padding: 18px 18px 8px; }
.detail-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-2);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.detail-price.gift { color: var(--gift); }
.detail-title {
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.detail-loc {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.detail-loc svg { width: 16px; height: 16px; color: var(--primary); }
.detail-desc {
  margin: 16px 0 8px;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
}

.seller {
  margin: 16px 18px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary-2);
  background: var(--primary-soft);
  flex: 0 0 52px;
  font-size: 18px;
}
.seller h3 { margin: 0; font-size: 16.5px; font-weight: 700; }
.uytin {
  margin-top: 3px;
  font-size: 13.5px;
  color: var(--ink-2);
  font-weight: 500;
}
.star { color: #d4a017; }

.cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 8px 18px 24px;
}
.btn {
  min-height: 52px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  text-decoration: none;
}
.btn svg { width: 20px; height: 20px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { background: var(--primary-2); }
.btn-zalo { background: var(--zalo); color: #fff; }
.btn-zalo:active { filter: brightness(0.92); }
.btn-ghost {
  background: var(--surface);
  border: 1.5px solid var(--line-2);
  color: var(--ink);
}
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* ---------- compose ---------- */
.form { padding: 8px 16px 24px; }
.photos {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: none;
}
.photos::-webkit-scrollbar { display: none; }
.photo-slot {
  width: 92px;
  height: 92px;
  border-radius: 14px;
  flex: 0 0 92px;
  border: 1.5px dashed var(--line-2);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}
.photo-slot.add { color: var(--primary); border-color: var(--primary-soft-2); background: var(--primary-soft); }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot .x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(26,36,32,0.75);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 6px;
  color: var(--ink-2);
}
.field input[type="text"],
.field input[type="tel"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  border: 1.5px solid var(--line-2);
  background: var(--surface);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
  min-height: 50px;
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27, 107, 84, 0.16);
}
.price-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.price-row .field-grow { flex: 1; }
.toggle {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1.5px solid var(--line-2);
  background: var(--surface);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-2);
  min-height: 50px;
  margin-top: 24px;
}
.toggle.on {
  background: var(--gift-bg);
  border-color: var(--gift);
  color: var(--gift);
}
.hint { font-size: 13px; color: var(--ink-3); margin: -6px 0 14px; }
.sticky-cta {
  position: sticky;
  bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}

/* ---------- messages ---------- */
.thread {
  display: flex;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  background: transparent;
  align-items: center;
}
.thread:active { background: var(--surface); }
.thread .avatar { width: 50px; height: 50px; flex-basis: 50px; font-size: 17px; }
.thread-body { flex: 1; min-width: 0; }
.thread-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}
.thread-top h3 { margin: 0; font-size: 16px; font-weight: 700; }
.thread-top time { font-size: 12px; color: var(--ink-3); flex: 0 0 auto; }
.thread-preview {
  margin: 3px 0 0;
  font-size: 14px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thread-item {
  font-size: 12.5px;
  color: var(--primary);
  font-weight: 600;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thread-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  flex: 0 0 48px;
  background: var(--bg-deep);
}
.thread-thumb .ph, .thread-thumb svg, .thread-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.unread .thread-preview { color: var(--ink); font-weight: 600; }

/* chat */
.chat-head-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.chat-head-item .mini {
  width: 36px; height: 36px; border-radius: 8px; overflow: hidden; flex: 0 0 36px; background: var(--bg-deep);
}
.chat-head-item .mini .ph, .chat-head-item .mini svg, .chat-head-item .mini img { width:100%;height:100%;object-fit:cover; }
.chat-head-item p { margin: 0; font-size: 13px; color: var(--ink-3); }
.chat-head-item strong { display: block; font-size: 14px; }

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bubble {
  max-width: 80%;
  padding: 10px 13px;
  border-radius: 18px;
  font-size: 16px;
  line-height: 1.45;
  word-wrap: break-word;
}
.bubble.them {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}
.bubble.me {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.bubble time {
  display: block;
  font-size: 11px;
  opacity: 0.7;
  margin-top: 4px;
}

.quick {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 14px 6px;
  scrollbar-width: none;
  flex: 0 0 auto;
  background: var(--bg);
}
.quick::-webkit-scrollbar { display: none; }
.quick button {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--primary-2);
}

.composer {
  display: flex;
  gap: 8px;
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 1px solid var(--line);
  flex: 0 0 auto;
}
.composer input {
  flex: 1;
  height: 46px;
  border: 1.5px solid var(--line-2);
  border-radius: 999px;
  padding: 0 16px;
  outline: none;
  background: var(--bg);
}
.composer input:focus { border-color: var(--primary); }
.send-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
}
.send-btn:disabled { opacity: 0.4; }
.send-btn svg { width: 20px; height: 20px; }

.chat-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.app.chat-mode { background: #efeae0; }

/* ---------- profile ---------- */
.profile-hero {
  padding: 8px 18px 18px;
  text-align: center;
}
.avatar.lg {
  width: 84px;
  height: 84px;
  font-size: 28px;
  margin: 0 auto 12px;
}
.profile-hero h2 { margin: 0; font-size: 22px; font-weight: 700; }
.profile-hero p { margin: 6px 0 0; color: var(--ink-2); font-size: 14.5px; }
.login-box {
  margin: 8px 16px 16px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.login-box h3 { margin: 0 0 6px; font-size: 18px; }
.login-box p { margin: 0 0 14px; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }

.ptabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  margin: 0 16px 12px;
  background: var(--bg-deep);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
}
.ptab {
  height: 42px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink-3);
}
.ptab.on { background: var(--surface); color: var(--primary-2); box-shadow: var(--shadow-sm); }

.mini-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.mini-actions .btn { min-height: 40px; font-size: 14px; padding: 0 10px; flex: 1; }

.demo-banner {
  margin: 0 16px 12px;
  padding: 10px 12px;
  background: #fff6de;
  border: 1px solid #ead8a0;
  color: #6a5316;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
}

/* ---------- sheets / modal ---------- */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 36, 32, 0.45);
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  max-height: 78%;
  overflow-y: auto;
  animation: up 0.22s ease;
}
@keyframes up {
  from { transform: translateY(24px); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}
.grab {
  width: 40px;
  height: 4px;
  background: var(--line-2);
  border-radius: 99px;
  margin: 4px auto 12px;
}
.sheet h2 { margin: 0 16px 12px 4px; font-size: 20px; }
.option {
  width: 100%;
  text-align: left;
  padding: 14px 12px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 52px;
}
.option:active, .option.on { background: var(--primary-soft); color: var(--primary-2); }
.check { color: var(--primary); font-size: 20px; }

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--tab-h) + 86px);
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
  z-index: 60;
  max-width: 86%;
  text-align: center;
  box-shadow: var(--shadow);
  animation: fadein 0.2s ease;
}
@keyframes fadein { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

.hidden { display: none !important; }

/* placeholder illustration */
.ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.ph .emo {
  font-size: 46px;
  line-height: 1;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12));
}
.ph.lg .emo { font-size: 88px; }
.ph .blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.35;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
