@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/Poppins-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

:root {
  --mist: #f6f5f2;
  --paper: #ffffff;
  --ink: #0b0b0c;
  --muted: #6b6b73;
  --line: #e7e4dd;
  --pink: #e0195f;
  --pink-dark: #b2134f;
  --pink-soft: #ffe4ee;
  --green: #0f7b52;
  --radius: 20px;
  --shadow: 0 18px 40px rgba(11, 11, 12, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--mist);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .display { font-family: "Poppins", system-ui, sans-serif; letter-spacing: -.03em; margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.skip {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

.demo-banner {
  background: var(--ink); color: #f4f2ee; font-size: 12.5px;
  padding: 8px 18px; display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap;
}
.demo-banner a { color: #ffb5cf; }
.demo-banner b { color: #fff; }

.topbar {
  min-height: 66px;
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 12px 20px; background: rgba(246, 245, 242, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand img { width: 132px; height: 42px; object-fit: contain; }
.topnav { display: flex; gap: 4px; margin-left: auto; }
.navlink {
  border: 0; background: transparent; padding: 8px 12px; border-radius: 999px;
  font-weight: 600; font-size: 14.5px; color: #3f3f46;
}
.navlink:hover { background: #ece9e2; }
.navlink[aria-current="true"] { background: var(--ink); color: #fff; }
.count {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  margin-left: 3px; border-radius: 999px; background: var(--pink); color: #fff; font-size: 11px; font-weight: 700;
}
.top-actions { display: flex; align-items: center; gap: 10px; }
.role-chip { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; background: var(--pink-soft); color: var(--pink-dark); padding: 5px 10px; border-radius: 999px; }
.install-btn {
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 13px;
}
.install-btn:hover { background: var(--ink); color: #fff; }
.icon-btn { display: none; border: 1px solid var(--line); background: var(--paper); border-radius: 12px; width: 42px; height: 42px; font-size: 18px; }

main { max-width: 1180px; margin: 0 auto; padding: 22px 20px 110px; }
.tabbar { display: none; }

/* generic */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 13px 22px; font-weight: 700; font-size: 15px;
  text-decoration: none; transition: transform .12s ease, background .12s ease;
}
.btn:active { transform: scale(.98); }
.btn-pink { background: var(--pink); color: #fff; }
.btn-pink:hover { background: var(--pink-dark); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-ghost { background: #efede7; color: var(--ink); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 11px; font-size: 12.5px; font-weight: 600; background: #efede7; color: #3f3f46; }
.pill.pink { background: var(--pink-soft); color: var(--pink-dark); }
.pill.green { background: #e3f5ec; color: var(--green); }
.pill.ink { background: var(--ink); color: #fff; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.hr { height: 1px; background: var(--line); margin: 18px 0; border: 0; }

/* welcome */
.welcome { max-width: 960px; margin: 6px auto 0; }
.welcome .hero-copy { text-align: center; padding: 26px 0 10px; }
.welcome h1 { font-size: clamp(34px, 6vw, 62px); line-height: .98; }
.welcome h1 em { font-style: normal; color: var(--pink); }
.welcome p.lead { max-width: 560px; margin: 14px auto 0; color: #52525b; font-size: 17px; }
.roles { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); margin-top: 30px; }
.role-card {
  text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 6px; min-height: 150px; transition: border-color .15s, transform .15s;
}
.role-card:hover { border-color: var(--pink); transform: translateY(-2px); }
.role-card .glyph { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--pink-soft); color: var(--pink-dark); font-size: 19px; margin-bottom: 8px; }
.role-card b { font-family: "Poppins", sans-serif; font-size: 17px; }
.role-card span { color: var(--muted); font-size: 13.5px; }
.welcome .demo-note { text-align: center; margin-top: 26px; color: var(--muted); font-size: 13px; }

/* browse */
.screen-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 6px 0 16px; }
.kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.screen-head h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1; }
.searchrow { display: flex; gap: 10px; margin-bottom: 12px; }
.searchbox {
  flex: 1; display: flex; align-items: center; gap: 10px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 999px; padding: 12px 18px;
}
.searchbox input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 15px; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.results { color: var(--muted); font-size: 13.5px; margin: 0 0 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.listing-card {
  position: relative;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-align: left; padding: 0; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s;
}
.listing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.listing-card .shot { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #e9e6df; }
.listing-card .shot img { width: 100%; height: 100%; object-fit: cover; }
.listing-card .badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; }
.listing-card .body { padding: 14px 15px 16px; display: flex; flex-direction: column; gap: 4px; }
.price { font-family: "Poppins", sans-serif; font-weight: 800; font-size: 24px; letter-spacing: -.04em; }
.price small { font-family: inherit; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.listing-card h3 { font-size: 15.5px; line-height: 1.3; }
.listing-card .meta { color: var(--muted); font-size: 13px; }
.heart {
  position: absolute; right: 10px; top: 10px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.92); display: grid; place-items: center; font-size: 17px; color: var(--ink);
}
.heart[aria-pressed="true"] { color: var(--pink); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty b { display: block; font-family: "Poppins", sans-serif; color: var(--ink); font-size: 19px; margin-bottom: 6px; }

/* detail */
.detail { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 26px; align-items: start; }
.gallery { position: relative; border-radius: var(--radius); overflow: hidden; background: #ddd9d2; }
.gallery .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery .track::-webkit-scrollbar { display: none; }
.gallery img { width: 100%; flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.94); font-size: 18px; }
.gallery .prev { left: 12px; } .gallery .next { right: 12px; }
.gallery .dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; gap: 5px; justify-content: center; }
.gallery .dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.55); border: 0; padding: 0; }
.gallery .dot[aria-current="true"] { background: #fff; }
.detail .panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.detail h1 { font-size: clamp(24px, 3vw, 34px); line-height: 1.08; margin: 6px 0 8px; }
.specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0; }
.spec { background: var(--mist); border-radius: 14px; padding: 10px; text-align: center; font-size: 12px; color: var(--muted); }
.spec b { display: block; font-family: "Poppins", sans-serif; font-size: 17px; color: var(--ink); }
.desc { color: #3f3f46; white-space: pre-line; }
.music { display: flex; align-items: center; gap: 12px; background: var(--mist); border-radius: 999px; padding: 10px 14px; margin: 16px 0; }
.music .play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; }
.inspection { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.inspection:first-of-type { border-top: 0; }
.detail-actions { display: flex; gap: 10px; margin-top: 16px; }
.detail-actions .btn { flex: 1; }
.source-note { font-size: 12.5px; color: var(--muted); margin-top: 12px; }

/* swipe */
.swipe-wrap { max-width: 460px; margin: 0 auto; }
.deck { position: relative; height: 520px; margin-top: 4px; }
.swipe-card {
  position: absolute; inset: 0; border-radius: 26px; overflow: hidden; background: #ddd;
  box-shadow: var(--shadow); touch-action: pan-y; user-select: none; will-change: transform;
}
.swipe-card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.swipe-card .shade { position: absolute; inset: auto 0 0 0; height: 55%; background: linear-gradient(transparent, rgba(0,0,0,.78)); }
.swipe-card .info { position: absolute; left: 18px; right: 18px; bottom: 18px; color: #fff; }
.swipe-card .info h3 { font-size: 23px; line-height: 1.15; margin-top: 4px; }
.swipe-card .info .meta { color: rgba(255,255,255,.82); font-size: 13px; }
.stamp { position: absolute; top: 26px; padding: 8px 14px; border: 3px solid; border-radius: 10px; font-family: "Poppins", sans-serif; font-weight: 800; letter-spacing: .08em; opacity: 0; text-transform: uppercase; }
.stamp.save { left: 22px; color: #7dffb2; border-color: #7dffb2; transform: rotate(-12deg); }
.stamp.pass { right: 22px; color: #ff8eae; border-color: #ff8eae; transform: rotate(12deg); }
.actions { display: flex; justify-content: center; gap: 16px; margin-top: 18px; }
.round { width: 58px; height: 58px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); font-size: 20px; display: grid; place-items: center; }
.round.primary { background: var(--pink); color: #fff; border-color: var(--pink); }
.progress { text-align: right; font-size: 13px; color: var(--muted); }
.end { text-align: center; padding: 60px 20px; }

/* messages */
.threads { display: grid; gap: 10px; }
.thread { display: flex; gap: 12px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px; text-align: left; width: 100%; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-family: "Poppins", sans-serif; flex: 0 0 auto; }
.chat { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 90px; }
.bubble { max-width: 78%; padding: 11px 14px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.bubble.me { align-self: flex-end; background: var(--ink); color: #fff; border-color: var(--ink); }
.bubble .time { display: block; font-size: 11px; opacity: .6; margin-top: 3px; }
.composer { position: fixed; bottom: 76px; left: 0; right: 0; display: flex; gap: 8px; padding: 10px 16px; background: var(--mist); border-top: 1px solid var(--line); max-width: 1180px; margin: 0 auto; }
.composer input { flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 12px 16px; font-size: 15px; background: var(--paper); }
.composer button { border: 0; border-radius: 50%; width: 46px; height: 46px; background: var(--pink); color: #fff; font-size: 17px; }

/* profile + dashboards */
.profile-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.profile-head { display: flex; gap: 14px; align-items: center; }
.profile-head .avatar { width: 62px; height: 62px; font-size: 20px; }
.profile-head h2 { font-size: 24px; }
.rows { display: grid; gap: 10px; margin-top: 16px; }
.row { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 15px 16px; text-align: left; width: 100%; }
.row b { font-size: 15px; } .row span { display: block; color: var(--muted); font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px; text-align: center; }
.stat b { display: block; font-family: "Poppins", sans-serif; font-size: 26px; }
.stat span { color: var(--muted); font-size: 12px; }
.queue { display: grid; gap: 12px; }
.queue-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.queue-head { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.queue-card h3 { font-size: 17px; margin: 6px 0 4px; }
.queue-actions { display: flex; gap: 8px; margin-top: 12px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: end center; background: rgba(11,11,12,.45); }
.sheet { width: 100%; max-width: 520px; background: var(--paper); border-radius: 24px 24px 0 0; padding: 18px 18px 24px; max-height: 88vh; overflow: auto; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-head h2 { font-size: 22px; }
.channel { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; border: 0; background: transparent; padding: 12px 4px; border-top: 1px solid var(--line); }
.channel:first-of-type { border-top: 0; }
.channel .glyph { width: 40px; height: 40px; border-radius: 12px; background: var(--mist); display: grid; place-items: center; font-size: 18px; }
.channel b { display: block; font-size: 15px; } .channel span { color: var(--muted); font-size: 12.5px; }
.channel .go { margin-left: auto; color: var(--muted); }

/* toast */
#toast {
  position: fixed; left: 50%; top: 78px; bottom: auto; transform: translate(-50%, -12px);
  background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 13.5px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 90; max-width: 90vw;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .detail { grid-template-columns: 1fr; }
  .roles { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .demo-banner { font-size: 11.5px; text-align: center; }
  .topbar { padding: 10px 14px; }
  .topnav { display: none; position: absolute; left: 14px; right: 14px; top: 64px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 8px; flex-direction: column; z-index: 50; }
  .topnav.open { display: flex; }
  .icon-btn { display: grid; place-items: center; }
  main { padding: 16px 14px 120px; }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; justify-content: space-around;
    background: rgba(255,255,255,.97); border-top: 1px solid var(--line); padding: 8px 4px 14px;
  }
  .tab { border: 0; background: transparent; display: grid; gap: 2px; justify-items: center; font-size: 17px; color: #52525b; padding: 4px 10px; border-radius: 12px; }
  .tab span { font-size: 10.5px; font-weight: 600; }
  .tab[aria-current="true"] { color: var(--pink); }
  .composer { bottom: 74px; }
  .deck { height: 460px; }
  .grid { grid-template-columns: 1fr; }
  .specs { grid-template-columns: repeat(2, 1fr); }
  .detail-actions { position: sticky; bottom: 78px; background: var(--mist); padding: 8px 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
