/* The phone on the home page: the WeLoop app's screens at their real size,
   393 x 852 points (iPhone 15 Pro), scaled down as a whole by --s.
   Every size, color and position below comes from the app on dev, read from
   the real screens rendered with flutter test, so keep them in points. */

.phone-scale {
  --s: 0.8;
  width: calc(417px * var(--s));
  height: calc(876px * var(--s));
}

.phone {
  /* The app's default theme; a look replaces these. */
  --p: #1fc265;
  --on-p: #326941;
  --surf: #0c0e10;
  --on-surf: #dfe4dc;
  --app-font: "Roboto";
  --r: 12px;

  position: relative;
  width: 417px;
  height: 876px;
  padding: 12px;
  transform: scale(var(--s));
  transform-origin: 0 0;
  border-radius: 68px;
  background: #050607;
  box-shadow:
    0 0 0 1.5px #2b2f34,
    inset 0 0 0 1.5px #1b1e22,
    0 50px 110px -24px rgba(0, 0, 0, 0.85),
    0 0 140px -30px color-mix(in srgb, var(--wash-a) 70%, transparent);
  user-select: none;
  -webkit-user-select: none;
}

.app {
  position: relative;
  width: 393px;
  height: var(--app-h, 852px);
  border-radius: 56px;
  overflow: hidden;
  isolation: isolate;
  background: var(--surf);
  color: var(--ink, #fff);
  font: 400 14px/1.43 var(--app-font), Roboto, system-ui, sans-serif;
  letter-spacing: 0.25px;
  transition: background 0.4s ease;
}

/* Resets at zero specificity, so each control's own class wins. */
:where(.app) button {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

:where(.app) input {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}

.ic {
  display: block;
  width: 24px;
  height: 24px;
  fill: currentColor;
  stroke: none;
  flex: none;
}

/* ------------------------------------------------------- iOS chrome */

.island {
  position: absolute;
  top: 11px;
  left: 50%;
  z-index: 60;
  width: 126px;
  height: 37px;
  margin-left: -63px;
  border-radius: 20px;
  background: #000;
}

.statusbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 59;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 34px 0 52px;
  color: #fff;
  font: 600 17px/1 -apple-system, "SF Pro Text", system-ui, sans-serif;
  letter-spacing: -0.3px;
  pointer-events: none;
}

.sb-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sb-signal {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.sb-signal i {
  width: 3px;
  border-radius: 1px;
  background: #fff;
}

.sb-signal i:nth-child(1) { height: 4px; }
.sb-signal i:nth-child(2) { height: 6px; }
.sb-signal i:nth-child(3) { height: 9px; }
.sb-signal i:nth-child(4) { height: 12px; }

.sb-wifi {
  width: 16px;
  height: 12px;
  background: #fff;
  clip-path: polygon(50% 100%, 0 32%, 12% 18%, 30% 8%, 50% 4%, 70% 8%, 88% 18%, 100% 32%);
}

.sb-battery {
  position: relative;
  width: 25px;
  height: 12px;
  padding: 2px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.sb-battery i {
  display: block;
  width: 80%;
  height: 100%;
  border-radius: 2px;
  background: #fff;
}

.sb-battery::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 3px;
  width: 2px;
  height: 4px;
  border-radius: 0 1px 1px 0;
  background: rgba(255, 255, 255, 0.45);
}

.home-bar {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 59;
  width: 134px;
  height: 5px;
  margin-left: -67px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.85);
  pointer-events: none;
}

/* ------------------------------------------------------------ screens */

.screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s 0.25s;
}

.screen.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease;
}

.scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

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

/* A look's backdrop behind the feed: its page, wash, artwork and pattern,
   rendered from the app's FeedBackdropLayer. It carries the wash, so the
   glow steps aside for it. */
.backdrop {
  position: absolute;
  inset: 0;
  background: var(--art, none) center top / cover no-repeat;
  pointer-events: none;
}

.app[data-art] .feed .glow {
  display: none;
}

/* A light look (Cream, Lilac, Mint): the status bar, the tabs and the
   chrome over the page go dark, as the app's do. */
.app[data-light] .statusbar,
.app[data-light] .topbar .search {
  color: var(--ink);
}

.app[data-light] .sb-signal i,
.app[data-light] .sb-wifi,
.app[data-light] .sb-battery i,
.app[data-light] .home-bar {
  background: var(--ink);
}

.app[data-light] .sb-battery {
  border-color: color-mix(in srgb, var(--ink) 45%, transparent);
}

.app[data-light] .tabs button:not(.on) {
  color: color-mix(in srgb, var(--ink) 70%, transparent);
  text-shadow: none;
}

/* The header glow behind the top of most screens. */
.glow {
  position: absolute;
  inset: 0 0 auto;
  height: 366px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--wash-a) 86%, transparent) 0%,
    color-mix(in srgb, var(--wash-a) 35%, transparent) 20%,
    color-mix(in srgb, var(--wash-b) 4%, transparent) 70%,
    transparent 90%
  );
  pointer-events: none;
}

.glow.tall {
  height: 426px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--wash-a) 86%, transparent) 0%,
    color-mix(in srgb, var(--wash-a) 51%, transparent) 20%,
    color-mix(in srgb, var(--wash-b) 16%, transparent) 60%,
    transparent 100%
  );
}

/* Glass, three strengths as in the app. */
.g-bar {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.g-btn {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.g-cam {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.circle {
  display: grid;
  place-items: center;
  border-radius: 50%;
}

/* Rounded-square avatars with initials: the app's fallback without a photo. */
.av {
  display: grid;
  place-items: center;
  width: 55px;
  height: 55px;
  border-radius: 12px;
  background: #18512b;
  color: #fff;
  font: 700 18px/1 Roboto, sans-serif;
  letter-spacing: 0;
  flex: none;
  position: relative;
  background-size: cover;
  background-position: center;
}

.av.ring {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--p) 30%, #031e0c);
}

.follow-dot {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 17.5px;
  height: 17.5px;
  border-radius: 50%;
  background: var(--p);
  color: var(--on-p);
}

.follow-dot .ic {
  width: 16px;
  height: 16px;
}

/* ------------------------------------------------------------ top bar */

.topbar {
  position: absolute;
  top: 59px;
  left: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  width: 361px;
  height: 53px;
  padding: 0 13px 0 18.5px;
  border-radius: 28px;
}

/* The app's spacing. If a look's font (or the browser's rendering) runs
   wider, home.js narrows the gaps and letter-spacing step by step, keeping
   the text size, so the tabs never run under the search button. */
.tabs {
  --tab-gap: 12.9px;
  --tab-ls: 0.8px;
  --tab-size: 12px;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  align-self: stretch;
  min-width: 0;
  gap: var(--tab-gap);
  margin-right: 6px;
  overflow: hidden;
}

.tabs button {
  font: 800 var(--tab-size)/17px var(--app-font), Roboto, sans-serif;
  letter-spacing: var(--tab-ls);
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.tabs button.on {
  position: relative;
  color: var(--p);
}

/* The faint glassy button the selected tab sits on (wl_feed_tabs.dart): as
   tall as LIVE beside it, reaching a little past the label. */
.tabs button.on::before {
  content: "";
  position: absolute;
  inset: -9px -8px;
  z-index: -1;
  border-radius: 17px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.topbar .search {
  flex: none;
  width: 36px;
  height: 36px;
  color: var(--on-surf);
}

.topbar .search .ic {
  width: 20px;
  height: 20px;
}

.livepill {
  flex: none;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  margin-left: 8px;
  padding: 0 10px 0 11px;
  border-radius: 17px;
  border: 1px solid #f44336 !important;
  background: linear-gradient(90deg, rgba(244, 67, 54, 0.35), rgba(244, 67, 54, 0.22), rgba(0, 0, 0, 0.08)) !important;
  font: 700 12px/16px Roboto, sans-serif;
  letter-spacing: 0.5px;
  color: #fff;
}

.livepill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
}

/* ------------------------------------------------------------ nav pill */

.navpill {
  position: absolute;
  left: 16px;
  bottom: 25px;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, 69px);
  align-items: center;
  width: 361px;
  height: 64px;
  padding: 0 7px;
  border-radius: 32px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.navpill button {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 44px;
  height: 44px;
  color: color-mix(in srgb, var(--on-surf) 75%, transparent);
}

.navpill button.on {
  color: var(--p);
}

.navpill .home-on,
.navpill .on .home-off {
  display: none;
}

.navpill .on .home-on {
  display: block;
}

.navpill .add {
  border-radius: 50%;
  background: var(--p);
  color: var(--on-p);
  box-shadow: 0 3px 8px color-mix(in srgb, var(--p) 35%, transparent);
}

.navpill .add .ic {
  width: 26px;
  height: 26px;
}

.navpill .me {
  width: 26px;
  height: 26px;
  border-radius: 12px;
  background: var(--me) center / cover, color-mix(in srgb, var(--p) 18%, #1a1d20);
}

.navpill .on .me {
  box-shadow: 0 0 0 2px var(--p);
}

/* Full-screen views have no nav pill. */
.app[data-screen="convo"] .navpill,
.app[data-screen="call"] .navpill,
.app[data-screen="live"] .navpill,
.app[data-screen="camera"] .navpill,
.app[data-screen="prefs"] .navpill,
.app[data-screen="appearance"] .navpill,
.app[data-screen="profile"] .navpill {
  transform: translateY(110px);
  opacity: 0;
  pointer-events: none;
}

/* --------------------------------------------------------------- feed */

.feed .scroll {
  padding-top: 122px;
  padding-bottom: 120px;
}

.feed[data-tab="Friends"] .stories {
  display: none;
}

.feed[data-tab="Friends"] .scroll {
  padding-top: 117px;
}

/* On Friends the bar's strip is filled, so the glow shows only below it. */
.feed[data-tab="Friends"] .pinned {
  position: absolute;
  inset: 0 0 auto;
  height: 115px;
  z-index: 5;
  background: var(--surf);
}

.stories {
  display: flex;
  gap: 12px;
  padding: 0 0 0 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.story {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 110px;
}

.story:first-child {
  margin-right: 4px;
}

.story-card {
  position: relative;
  width: 110px;
  height: 158px;
  border-radius: 12px;
  background: #18512b center / cover;
}

/* Your story: your picture, with the add badge. */
.story-card.me {
  background: var(--me) center / cover, color-mix(in srgb, var(--p) 18%, #1a1d20);
}

.story-card .plus {
  position: absolute;
  left: 40.5px;
  top: 121px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 12px;
  background: var(--p);
  color: var(--on-p);
}

.story-card .plus .ic {
  width: 20px;
  height: 20px;
}

.story small {
  height: 16px;
  margin-top: 1px;
  font: 700 11px/16px var(--app-font), Roboto, sans-serif;
  letter-spacing: 0.5px;
}

/* The unseen notifications under the stories (FeedNotificationChip): a 38pt
   rounded avatar with the kind on an accent badge, a red count when there's
   more than one, and the first name under it. */
.note-strip {
  padding-top: 2px;
}

.feed[data-tab="Friends"] .note-strip {
  display: none;
}

.note-new {
  display: block;
  padding: 4px 16px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.note-row {
  display: flex;
  height: 68px;
  padding: 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.note-chip {
  flex: 0 0 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 4px;
}

.note-av {
  position: relative;
}

.note-av .av {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 13px;
}

.note-type {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 11px;
  background: var(--p);
  border: 2px solid var(--surf);
  color: var(--on-primary, #fff);
}

.note-type .ic {
  width: 13px;
  height: 13px;
}

.note-count {
  position: absolute;
  top: -5px;
  right: -7px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #e53935;
  color: #fff;
  font: 800 11px/16px var(--app-font), Roboto, sans-serif;
  text-align: center;
}

.note-chip small {
  max-width: 60px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chips {
  display: flex;
  gap: 12px;
  padding: 7px 16px 14px;
}

.chip {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 33px;
  padding: 0 16px 0 17px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--on-surf) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--on-surf) 15%, transparent) !important;
  font: 600 13.5px/19px var(--app-font), Roboto, sans-serif;
  color: color-mix(in srgb, var(--on-surf) 70%, transparent);
}

.chip .ic {
  width: 16px;
  height: 16px;
}

.post {
  position: relative;
  padding: 17px 0 15px;
  margin-bottom: 16px;
  background: var(--surf);
}

.post-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 0 18px;
}

.post-head .name {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 400 16px/24px var(--app-font), Roboto, sans-serif;
  letter-spacing: 0.15px;
}

.post-head .name .ic {
  width: 14px;
  height: 14px;
  color: #ff0005;
}

.post-head time {
  margin-left: auto;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.post .caption {
  margin: 17px 5px 0 13px;
}

.post .caption b {
  font-weight: 400;
  color: var(--p);
}

.post .media {
  display: block;
  width: 393px;
  margin-top: 16px;
  max-height: 491px;
  object-fit: cover;
  aspect-ratio: 1;
}

.post .media.tall {
  aspect-ratio: 4 / 5;
}

.post .video {
  position: relative;
  display: block;
  margin-top: 16px;
}

.post .video .media {
  margin: 0;
}

.post .video .play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
}

.post .video .play::after {
  content: "";
  position: absolute;
  left: 25px;
  top: 19px;
  border: 13px solid transparent;
  border-left: 19px solid #fff;
  border-right: 0;
}

.actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
  padding: 0 24px 0 16px;
}

.actions .more {
  margin-right: auto;
}

.act {
  display: flex;
  align-items: center;
  gap: 4px;
  font: 400 11px/16px var(--app-font), Roboto, sans-serif;
  letter-spacing: 0.5px;
}

.act img {
  width: 22px;
  height: 22px;
}

.act.liked img {
  animation: pop 0.35s ease;
}

@keyframes pop {
  40% {
    transform: scale(1.35);
  }
}

/* Allowed sensitive posts arrive blurred when Blur is on. */
.post.veiled .caption,
.post.veiled .media {
  filter: blur(9px);
}

.post .reveal {
  position: absolute;
  left: 50%;
  top: 104px;
  z-index: 2;
  transform: translateX(-50%);
  height: 34px;
  padding: 0 16px;
  border-radius: 17px;
  font-weight: 600;
  white-space: nowrap;
}

.feed-end {
  padding: 4px 0 24px;
  text-align: center;
  font-size: 12px;
  color: color-mix(in srgb, var(--on-surf) 50%, transparent);
}

/* Post cards, from a look or a post style. Their outline, edge, glow and
   any decoration are drawn into .pshape from the app's own shapes
   (home.js: post shapes); the content sits in .pin, clipped to the outline
   and held clear of its edge. */
.app[data-cards] .post {
  margin: calc(var(--gap, 10px) / 2) 10px;
  padding: 0;
  background: none;
}

.app[data-cards] .posts {
  padding-top: calc(var(--gap, 10px) / 2);
}

.post .pshape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.app:not([data-cards]) .post .pshape,
.app:not([data-cards]) .post .psticker {
  display: none;
}

.post .pin {
  position: relative;
}

.app[data-cards] .post .pin {
  padding: var(--pin, 0);
}

.app[data-cards] .post .pin > :first-child {
  padding-top: 17px;
}

.app[data-cards] .post .actions {
  padding-bottom: 15px;
}

.app[data-cards] .post .media {
  width: 100%;
}

.app[data-cards][data-media-rounded] .post .media {
  border-radius: var(--media-r, 0);
}

/* A look's sticker, hanging off a corner of the card. */
.post .psticker {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

/* -------------------------------------------------------------- loops */

.loops .speed-pill {
  position: absolute;
  right: 16px;
  bottom: 120px;
  z-index: 5;
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
}

.loops .speed-pill[hidden] {
  display: none;
}

.loops .clip {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 393px;
  height: 100%;
  object-fit: cover;
  object-position: top;
  background: #2a241e;
}

.loops .fade {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 393px;
  height: 260px;
  background: linear-gradient(
    0deg,
    color-mix(in srgb, var(--surf) 78%, transparent) 0%,
    color-mix(in srgb, var(--surf) 59%, transparent) 20%,
    color-mix(in srgb, var(--surf) 39%, transparent) 40%,
    color-mix(in srgb, var(--surf) 20%, transparent) 60%,
    color-mix(in srgb, var(--surf) 8%, transparent) 80%,
    transparent 100%
  );
  pointer-events: none;
}

.loops .info {
  position: absolute;
  left: 16px;
  bottom: 105px;
  width: 314px;
  font-family: "IBM Plex Sans", sans-serif;
  letter-spacing: 0;
}

.loops .info b {
  font-size: 14px;
  font-weight: 700;
}

.loops .info b + span {
  margin-left: 8px;
  font-weight: 700;
  color: color-mix(in srgb, var(--on-surf) 82%, transparent);
}

.loops .info p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.35;
}

.loops .info p b {
  font-weight: 400;
  color: var(--p);
  font-size: 15px;
}

.rail {
  position: absolute;
  left: 336px;
  bottom: 150px;
  width: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font: 400 12px/16px "IBM Plex Sans", sans-serif;
  letter-spacing: 0;
}

.rail .av {
  width: 50px;
  height: 50px;
  margin-bottom: 15px;
}

.rail button {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rail .bub {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surf) 40%, transparent);
}

.rail .bub img {
  width: 22px;
  height: 22px;
}

.rail .bub .ic {
  width: 25px;
  height: 25px;
}

.rail small {
  margin: 0 0 9px;
  font-size: 12px;
}

.rail .liked img {
  animation: pop 0.35s ease;
}

.float-heart {
  position: absolute;
  z-index: 50;
  width: 40px;
  height: 40px;
  pointer-events: none;
  animation: float-up 1.1s ease-out forwards;
}

@keyframes float-up {
  to {
    transform: translate(-10px, -140px) scale(1.5);
    opacity: 0;
  }
}

/* ----------------------------------------------------------- chat list */

.inbox .scrim {
  position: absolute;
  inset: 0 0 auto;
  height: 207px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--wash-a) 40%, rgba(0, 0, 0, 0.66)), transparent);
  pointer-events: none;
}

.inbox .searchbox {
  position: absolute;
  left: 8px;
  top: 59px;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 377px;
  height: 50px;
  padding: 0 16px;
  border-radius: 14px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 16px;
  letter-spacing: 0.15px;
  color: color-mix(in srgb, var(--on-surf) 50%, transparent);
}

.inbox .searchbox .ic {
  color: color-mix(in srgb, var(--on-surf) 60%, transparent);
}

.inbox .filters {
  position: absolute;
  left: 8px;
  top: 119px;
  display: flex;
  gap: 8px;
}

.inbox .filters button {
  height: 34px;
  padding: 0 16px;
  border-radius: 18px;
  font: 600 13.5px/1 var(--app-font), Roboto, sans-serif;
  background: color-mix(in srgb, var(--on-surf) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--on-surf) 15%, transparent);
  color: color-mix(in srgb, var(--on-surf) 70%, transparent);
}

.inbox .filters button.on {
  background: var(--p);
  border-color: var(--p);
  color: #000;
}

.inbox .rows {
  position: absolute;
  top: 168px;
  left: 0;
  right: 0;
}

.row {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 70.5px;
  padding: 9px 16px;
  text-align: left;
}

.row .av {
  width: 48px;
  height: 48px;
  margin: 2px 14px 2px 2px;
  font-size: 16px;
}

.row .presence {
  position: absolute;
  left: 56px;
  top: 44px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--p);
  box-shadow: 0 0 0 2px var(--surf);
}

.row .presence.idle {
  background: #ff9800;
}

.row .text {
  flex: 1;
  min-width: 0;
}

.row .text b {
  display: block;
  font: 600 15.5px/1.3 var(--app-font), Roboto, sans-serif;
  letter-spacing: 0;
}

.row .text span {
  display: flex;
  font-size: 13px;
  letter-spacing: 0;
  white-space: nowrap;
  color: color-mix(in srgb, var(--on-surf) 50%, transparent);
}

/* The preview gives way; the time after it always shows. */
.row .text span em {
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row .text small {
  flex: none;
}

.row .text small {
  font-size: 11px;
  line-height: 18px;
}

.row.unread .text b {
  font-weight: 700;
}

.row.unread .text span {
  color: var(--p);
  font-weight: 600;
}

.row .badge {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: 0 12px 0 8px;
  border-radius: 12px;
  background: var(--p);
  color: #fff;
  font: 700 11px/1 Roboto, sans-serif;
}

.row .cam {
  width: 21px;
  height: 21px;
  margin-left: 4px;
  color: color-mix(in srgb, var(--on-surf) 45%, transparent);
}

.row::after {
  content: "";
  position: absolute;
  left: 80px;
  right: 16px;
  bottom: 0;
  height: 0.5px;
  background: color-mix(in srgb, var(--on-surf) 7%, transparent);
}

/* -------------------------------------------------------- conversation */

.convo .chat-bg {
  position: absolute;
  inset: 0;
  background: var(--surf) center / cover no-repeat;
}

.convo .fx {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.convo .top-scrim {
  position: absolute;
  inset: 0 0 auto;
  height: 125px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.66), transparent);
  pointer-events: none;
}

.convo .back,
.prefs .back,
.appearance .back,
.profile .back {
  position: absolute;
  left: 10px;
  top: 67px;
  width: 48px;
  height: 48px;
  color: rgba(255, 255, 255, 0.8);
  z-index: 5;
}

.convo .back .ic,
.prefs .back .ic,
.appearance .back .ic,
.profile .back .ic {
  width: 26px;
  height: 26px;
}

.convo .call {
  position: absolute;
  top: 67px;
  width: 48px;
  height: 48px;
  color: rgba(255, 255, 255, 0.8);
  z-index: 5;
}

.convo .call.voice {
  left: 279px;
}

.convo .call.video {
  left: 335px;
}

.convo .who {
  position: absolute;
  left: 50%;
  top: 65px;
  z-index: 5;
  margin-left: -27px;
}

.convo .who .av {
  width: 54px;
  height: 54px;
  font-size: 17px;
}

.convo .who .presence {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--p);
  box-shadow: 0 0 0 2px var(--surf);
}

.convo .name-pill {
  position: absolute;
  left: 117.8px;
  top: 124px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 157px;
  height: 38px;
  border-radius: 20px;
  font: 600 17px/1 var(--chat-font, var(--app-font)), Roboto, sans-serif;
  letter-spacing: 0;
}

.convo .name-pill .ic {
  width: 15px;
  height: 15px;
  color: rgba(255, 255, 255, 0.5);
}

.messages {
  position: absolute;
  top: 172px;
  bottom: 98px;
  left: 0;
  right: 0;
  overflow-y: auto;
  padding: 0 15px 8px;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
  font-family: var(--chat-font, var(--app-font)), Roboto, sans-serif;
  font-weight: var(--chat-weight, 500);
}

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

.messages > :first-child {
  margin-top: auto;
}

.day {
  align-self: center;
  height: 26px;
  margin: 0 0 24px;
  padding: 0 12px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--on-surf) 8%, transparent);
  font: 600 11.5px/26px Roboto, sans-serif;
  color: color-mix(in srgb, var(--on-surf) 60%, transparent);
}

.msg {
  position: relative;
  max-width: 76%;
  padding: 10px 14px;
  border-radius: 20px;
  font-size: calc(15px * var(--chat-scale, 1));
  line-height: 19px;
  letter-spacing: 0;
  color: var(--chat-text, #fff);
  cursor: pointer;
  animation: msg-in 0.25s ease;
}

.msg.them {
  align-self: flex-start;
  background: var(--other, rgba(211, 232, 210, 0.6));
  border-bottom-left-radius: 6px;
}

.msg.me {
  align-self: flex-end;
  background: var(--own, rgba(50, 105, 65, 0.6));
  border-bottom-right-radius: 6px;
}

/* A run of messages from one person: 1px apart, touching corners at 5. */
.msg + .msg {
  margin-top: 1px;
}

.msg.them + .msg.me,
.msg.me + .msg.them,
.day + .msg {
  margin-top: 26px;
}

.msg.them:has(+ .msg.them) {
  border-bottom-left-radius: 5px;
}

.msg.them + .msg.them {
  border-top-left-radius: 5px;
}

.msg.me:has(+ .msg.me) {
  border-bottom-right-radius: 5px;
}

.msg.me + .msg.me {
  border-top-right-radius: 5px;
}

[data-shape="pill"] .msg {
  border-radius: 24px !important;
}

[data-shape="square"] .msg {
  border-radius: 6px !important;
}

[data-shape="tail"] .msg.me {
  border-radius: 20px 20px 0 20px !important;
}

[data-shape="tail"] .msg.them {
  border-radius: 20px 20px 20px 0 !important;
}

.msg:has(.react) {
  margin-bottom: 14px;
}

.msg .react {
  position: absolute;
  bottom: -14px;
  right: 8px;
  padding: 1px 6px;
  border-radius: 10px;
  background: #1c1f22;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 14px;
  line-height: 1.3;
  animation: pop 0.35s ease;
}

.msg.me .react {
  right: auto;
  left: 8px;
}

.msg.typing {
  letter-spacing: 3px;
  animation: blink 1s infinite;
}

@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes blink {
  50% {
    opacity: 0.4;
  }
}

.react-bar {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 3;
  display: flex;
  gap: 2px;
  padding: 5px 8px;
  border-radius: 24px;
  background: rgba(24, 26, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: msg-in 0.2s ease;
}

.msg.me .react-bar {
  left: auto;
  right: 0;
}

.react-bar button {
  font-size: 24px;
  line-height: 1;
  padding: 2px;
}

.ago {
  align-self: flex-start;
  height: 20px;
  margin: 12px 0 0 -5px;
  padding: 0 8px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--on-surf) 6%, transparent);
  font: 600 9.5px/20px Roboto, sans-serif;
  color: color-mix(in srgb, var(--on-surf) 55%, transparent);
}

.app[data-chat-light][data-screen="convo"] .statusbar {
  color: var(--chat-dark, #2b2420);
}

.app[data-chat-light][data-screen="convo"] .sb-signal i,
.app[data-chat-light][data-screen="convo"] .sb-wifi,
.app[data-chat-light][data-screen="convo"] .sb-battery i,
.app[data-chat-light][data-screen="convo"] .home-bar {
  background: #2b2420;
}

.app[data-chat-light] .convo .circle,
.app[data-chat-light] .convo .name-pill,
.app[data-chat-light] .convo .composer input,
.app[data-chat-light] .convo .composer .field .ic {
  color: var(--chat-text);
}

.app[data-chat-light] .convo .day,
.app[data-chat-light] .convo .ago {
  color: color-mix(in srgb, var(--chat-text) 60%, transparent);
}

.app[data-chat-light] .convo .composer input::placeholder {
  color: color-mix(in srgb, var(--chat-text) 55%, transparent);
}

.app[data-chat-light] .convo .composer {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.35));
}

.composer {
  position: absolute;
  left: 0;
  right: 0;
  height: 98px;
  bottom: 0;
  display: flex;
  gap: 8px;
  padding: 0 10px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
}

.composer .circle {
  width: 50px;
  height: 50px;
  color: rgba(255, 255, 255, 0.85);
}

.composer .field {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  height: 50px;
  padding: 0 8px 0 16px;
  border-radius: 24px;
}

.composer.typing .extra {
  display: none;
}

/* The field's own button: the mic while it's empty, send once typed in. */
.composer .act {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 17px;
}

.composer .act .ic + .ic,
.composer.typing .act .ic:first-child {
  display: none;
}

.composer.typing .act {
  background: var(--own, var(--p));
}

.composer.typing .act .ic + .ic {
  display: block;
  width: 18px;
  height: 18px;
  color: var(--on-primary, #fff);
}

.composer input {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  letter-spacing: 0;
}

.composer input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.composer .field .ic {
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, 0.7);
}

.composer .field + .circle {
  margin-left: 0;
}

/* Theme animations, drawn over the still artwork. */
.fx i {
  position: absolute;
  left: var(--x);
  top: 100%;
  width: 10px;
  height: 10px;
  font-style: normal;
  color: var(--fx);
  animation: rise var(--t) linear var(--d) infinite;
}

.fx[data-fx="hearts"] i::before {
  content: "♥";
  font-size: calc(20px * var(--z));
}

.fx[data-fx="petals"] i {
  top: -20px;
  width: calc(10px * var(--z));
  height: calc(14px * var(--z));
  border-radius: 80% 0 80% 0;
  background: var(--fx);
  animation-name: fall;
}

.fx[data-fx="embers"] i {
  width: calc(5px * var(--z));
  height: calc(5px * var(--z));
  border-radius: 50%;
  background: #ffcf8a;
  box-shadow: 0 0 8px 2px rgba(255, 160, 80, 0.7);
}

.fx[data-fx="bubbles"] i {
  width: calc(18px * var(--z));
  height: calc(18px * var(--z));
  border-radius: 50%;
  border: 1.5px solid var(--fx);
}

.fx[data-fx="stars"] i,
.fx[data-fx="fireflies"] i {
  top: calc(var(--y) * 1%);
  width: calc(4px * var(--z));
  height: calc(4px * var(--z));
  border-radius: 50%;
  background: var(--fx);
  animation-name: twinkle;
}

.fx[data-fx="fireflies"] i {
  box-shadow: 0 0 10px 3px var(--fx);
  animation-name: drift;
}

.fx[data-fx="rain"] i {
  top: -30px;
  width: 1.5px;
  height: 22px;
  background: rgba(200, 220, 255, 0.45);
  animation-name: fall;
  animation-duration: calc(var(--t) / 4);
}

.fx[data-fx="confetti"] i {
  top: -20px;
  width: 7px;
  height: 11px;
  border-radius: 2px;
  background: hsl(var(--h) 90% 65%);
  animation-name: fall;
}

.fx[data-fx="snow"] i {
  top: -20px;
  width: calc(6px * var(--z));
  height: calc(6px * var(--z));
  border-radius: 50%;
  background: var(--fx);
  animation-name: fall;
  animation-duration: calc(var(--t) * 1.6);
}

.fx[data-fx="orbs"] i {
  top: calc(var(--y) * 1%);
  width: calc(34px * var(--z));
  height: calc(34px * var(--z));
  border-radius: 50%;
  background: radial-gradient(circle, var(--fx), transparent 70%);
  animation-name: drift;
  animation-duration: calc(var(--t) * 1.5);
}

.fx[data-fx="shapes"] i {
  width: calc(14px * var(--z));
  height: calc(14px * var(--z));
  border: 1.5px solid var(--fx);
  border-radius: calc(var(--h) * 0.02px);
}

@keyframes rise {
  to {
    transform: translate(20px, -900px) rotate(30deg);
  }
}

@keyframes fall {
  to {
    transform: translate(-30px, 900px) rotate(240deg);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.15;
    transform: scale(0.7);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0);
    opacity: 0.2;
  }
  50% {
    transform: translate(28px, -34px);
    opacity: 1;
  }
}

/* ------------------------------------------------------- notifications */

.alerts h3 {
  position: absolute;
  left: 8px;
  top: 63px;
  margin: 0;
  font: 400 16px/24px var(--app-font), Roboto, sans-serif;
  letter-spacing: 0.15px;
}

.alerts .list {
  position: absolute;
  top: 104px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.alerts h4 {
  margin: 8px 16px 14px;
  font: 500 14px/20px var(--app-font), Roboto, sans-serif;
  letter-spacing: 0.1px;
}

.alerts h4 + .note {
  margin-top: 0;
}

.alerts h4:not(:first-child) {
  margin-top: 26px;
}

.note {
  display: flex;
  align-items: center;
  width: 351px;
  height: 54px;
  margin: 0 0 10px 21px;
  padding: 5px 15px 5px 18px;
  border-radius: 12px;
  background: rgba(158, 158, 158, 0.12);
  text-align: left;
}

.note .ic {
  width: 18px;
  height: 18px;
  margin-right: 26px;
}

.note span {
  flex: 1;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.1px;
}

.note span em {
  display: block;
  font-style: normal;
  color: rgba(255, 255, 255, 0.71);
}

.note time {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.71);
}

/* -------------------------------------------------------------- camera */

.camera .viewfinder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.92);
}

.camera .close,
.camera .side button {
  width: 44px;
  height: 44px;
}

.camera .close {
  position: absolute;
  left: 20px;
  top: 67px;
}

.camera .close .ic {
  width: 22px;
  height: 22px;
}

.camera .side {
  position: absolute;
  left: 329px;
  top: 67px;
  display: grid;
  gap: 16px;
}

.camera .library {
  position: absolute;
  left: 20px;
  bottom: 236px;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 91px;
  height: 36px;
  padding: 0 12px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.28);
  border: 0.8px solid rgba(255, 255, 255, 0.15) !important;
  font: 600 12px/1 Outfit, sans-serif;
  letter-spacing: 0;
}

.camera .library .ic {
  width: 18px;
  height: 18px;
}

.camera .zoom {
  position: absolute;
  left: 160.5px;
  bottom: 236px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 72px;
  height: 36px;
  border-radius: 17px;
  background: rgba(0, 0, 0, 0.28);
  font: 700 10.5px/1 Roboto, sans-serif;
  letter-spacing: 0;
}

.camera .zoom .on {
  display: grid;
  place-items: center;
  width: 26px;
  height: 28px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--p) 22%, transparent);
  color: var(--p);
  font-size: 11px;
}

.camera .shutter {
  position: absolute;
  left: 159.5px;
  bottom: 136px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 4px solid #fff !important;
  display: grid;
  place-items: center;
}

.camera .shutter i {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.camera .shutter:active i {
  transform: scale(0.9);
}

.camera .modes {
  position: absolute;
  left: 12px;
  bottom: 35px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  width: 369px;
  height: 46px;
  padding: 0 5px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.camera .modes button {
  height: 36px;
  border-radius: 13px;
  font: 500 13.5px/1 Outfit, sans-serif;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.6);
}

.camera .modes button.on {
  background: var(--p);
  color: #000;
  font-weight: 700;
}

/* ------------------------------------------------------------- profile */

.profile .cover {
  position: absolute;
  left: 0;
  top: 0;
  width: 393px;
  height: 426px;
  object-fit: cover;
}

.profile .cover-fade {
  position: absolute;
  left: 0;
  top: 0;
  width: 393px;
  height: 426px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    color-mix(in srgb, var(--surf) 2%, transparent) 30%,
    var(--surf) 90%
  );
}

.profile .scroll {
  padding-bottom: 110px;
}

.profile .head {
  position: relative;
  padding-top: 268px;
  text-align: center;
}

.profile .head h3 {
  margin: 0;
  font: 800 21px/28px var(--app-font), Roboto, sans-serif;
  letter-spacing: -0.2px;
}

.profile .handle {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
}

.profile .stats {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 4px;
  height: 33px;
}

.profile .stats span {
  display: flex;
  flex-direction: column;
  padding: 0 16px;
  font-size: 11.5px;
  line-height: 1.2;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
}

.profile .stats b {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}

.profile .stats i {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.12);
}

.profile .btns,
.profile .bio,
.profile .feed-end {
  position: relative;
}

.profile .btns {
  display: flex;
  gap: 10px;
  margin-top: 17px;
  padding: 0 22px;
}

.profile .btns button {
  flex: 1;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13.5px;
  font-weight: 700;
}

.profile .btns .dots {
  flex: 0 0 46px;
  display: grid;
  place-items: center;
}

.profile .btns .dots .ic {
  width: 22px;
  height: 22px;
}

.profile .bio {
  margin: 19px 28px 26px;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.85);
}

.ptabs {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 42px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 47px;
  padding: 4px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 0.8px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.ptabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 13px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
}

.ptabs button.on {
  background: var(--p);
  color: #fff;
  font-weight: 700;
}

.ptabs .ic {
  width: 15px;
  height: 15px;
}

/* -------------------------------------------------------------- prefs */

.prefs {
  background:
    radial-gradient(60% 45% at 5% 10%, color-mix(in srgb, var(--p) 22%, transparent), transparent 70%),
    radial-gradient(55% 40% at 100% 85%, color-mix(in srgb, var(--p) 14%, transparent), transparent 70%),
    var(--surf);
}

.prefs .top-scrim,
.appearance .top-scrim {
  position: absolute;
  inset: 0 0 auto;
  height: 131px;
  z-index: 3;
  background: linear-gradient(180deg, #000, transparent);
  pointer-events: none;
}

.prefs .bottom-scrim {
  position: absolute;
  inset: auto 0 0;
  height: 140px;
  z-index: 3;
  background: linear-gradient(0deg, #000 40%, transparent);
  pointer-events: none;
}

.prefs .title,
.appearance .title {
  position: absolute;
  left: 76px;
  top: 77px;
  z-index: 5;
  margin: 0;
  font: 700 16px/24px var(--app-font), Roboto, sans-serif;
}

.prefs .scroll {
  padding: 137px 16px 170px;
}

.blur-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 20px;
}

.blur-card div {
  flex: 1;
}

.blur-card b {
  display: block;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

.blur-card small {
  display: block;
  font-size: 12px;
  line-height: 17px;
  color: rgba(255, 255, 255, 0.55);
}

.switch {
  position: relative;
  width: 74px;
  height: 32px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  font: 700 11px/30px Roboto, sans-serif;
  text-align: right;
  padding: 0 12px !important;
  color: rgba(255, 255, 255, 0.75) !important;
  transition: background 0.2s ease;
}

.switch::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #000;
  transition: transform 0.2s ease;
}

.switch[aria-checked="true"] {
  background: var(--p);
  text-align: left;
  color: #fff !important;
}

.switch[aria-checked="true"]::before {
  transform: translateX(42px);
  background: #fff;
}

.prefs .note-text {
  margin: 25px 4px 21px;
  font-size: 12px;
  line-height: 17px;
  color: rgba(255, 255, 255, 0.55);
}

.cat {
  padding: 12px 4px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.cat-top b {
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

.level {
  padding: 4px 10px;
  border-radius: 20px;
  font: 600 11px/1.2 Roboto, sans-serif;
  color: var(--lv);
  background: color-mix(in srgb, var(--lv) 18%, transparent);
}

.cat p {
  margin: 4px 0 8px;
  font-size: 12px;
  line-height: 17px;
  color: rgba(255, 255, 255, 0.55);
}

.cat input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: calc(100% - 40px);
  height: 30px;
  margin: 0 20px;
  background: transparent;
  cursor: pointer;
}

.cat input::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  /* Six stops, the unset part of the track, then the green-to-red ramp. */
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.45) 1.5px, transparent 2px) -2px 0 / 20% 100% repeat-x,
    linear-gradient(90deg, transparent var(--fill), #2e3032 var(--fill)),
    linear-gradient(90deg, #2e9e5b, #ffb300 50%, #e53935);
}

.cat input::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
}

.cat input::-moz-range-progress {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #2e9e5b, var(--lv));
}

.cat input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--lv);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--lv) 14%, transparent);
}

.cat input::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: var(--lv);
}

.ends {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}

.prefs .actions-row {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 34px;
  z-index: 5;
  display: flex;
  gap: 12px;
}

.prefs .actions-row button {
  flex: 1;
  height: 45px;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 500;
}

.prefs .cancel {
  border: 1px solid var(--p) !important;
}

.prefs .save {
  background: var(--p) !important;
  color: #fff;
}

/* --------------------------------------------------------- appearance */

.appearance .title {
  font-size: 20px;
  font-weight: 800;
  top: 75px;
}

.appearance .seg {
  position: absolute;
  right: 12px;
  top: 71px;
  z-index: 5;
  display: flex;
  padding: 3px;
  border-radius: 20px;
}

.appearance .seg button {
  height: 30px;
  padding: 0 14px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.appearance .seg .on {
  background: var(--p);
  color: #000;
}

.appearance .scroll {
  padding: 120px 12px 110px;
}

.preview {
  position: relative;
  width: 154px;
  height: 330px;
  margin: 0 auto;
  border-radius: 24px;
  border: 4px solid #050607;
  box-shadow: 0 0 0 1px #2b2f34, 0 20px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  background: var(--surf);
}

.preview-inner {
  position: absolute;
  left: 0;
  top: 0;
  width: 393px;
  height: 852px;
  transform: scale(0.3716);
  transform-origin: 0 0;
  pointer-events: none;
}

.preview-inner .screen {
  opacity: 1;
  visibility: visible;
}

.appearance .row-btns {
  display: flex;
  justify-content: space-between;
  margin: 14px 4px 0;
}

.appearance .row-btns button {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.appearance .row-btns .ic {
  width: 14px;
  height: 14px;
}

.appearance .apply {
  background: color-mix(in srgb, var(--p) 28%, transparent) !important;
  border-color: color-mix(in srgb, var(--p) 50%, transparent) !important;
}

.appearance h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 24px 4px 12px;
  font: 800 20px/1.2 var(--app-font), Roboto, sans-serif;
  letter-spacing: 0;
}

.appearance h4 .ic {
  width: 20px;
  height: 20px;
  color: var(--p);
}

.appearance h4 small {
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 600;
}

.save-theme {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  margin-left: auto;
  padding: 0 14px;
  border-radius: 18px;
  background: var(--p) !important;
  color: #fff;
  font: 700 15px/1 var(--app-font), Roboto, sans-serif;
}

.save-theme .ic {
  width: 18px;
  height: 18px;
  color: #fff !important;
}

.hint {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  padding: 18px 20px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
}

.hint .ic {
  color: rgba(255, 255, 255, 0.7);
}

.looks-card {
  padding: 16px;
  border-radius: 20px;
}

.looks-card header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.looks-card header .tile {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
}

.looks-card header b {
  display: block;
  font-size: 16px;
}

.looks-card header small {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.look-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.look-tiles button {
  display: block;
  text-align: left;
}

.look-tiles .sw {
  height: 64px;
  border-radius: 14px;
}

.look-tiles .sw-name {
  margin-top: 5px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.atabs {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 42px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 47px;
  padding: 4px;
  border-radius: 18px;
}

.atabs button {
  border-radius: 13px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
}

.atabs .on {
  background: var(--p);
  color: #000;
  font-weight: 700;
}

/* Advanced has no tabs; it's its own page, as in the app. */
.appearance.advanced .atabs {
  display: none;
}

.appearance [data-palette][aria-checked="true"] .sw,
.my-theme .sw {
  border-color: #fff;
}

/* My Themes: saved looks, each with a remove button. */
.my-themes {
  margin-bottom: 22px;
}

.my-themes:empty {
  display: none;
}

.my-theme {
  position: relative;
  display: block;
}

.my-theme > button:first-child {
  width: 100%;
}

.hint[hidden] {
  display: none;
}

.my-theme .sw-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.my-theme .del {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 16px;
  line-height: 1;
}

/* Fonts, grouped, each name in its own face. */
.font-group {
  display: block;
  margin: 14px 2px 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

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

.font-list button {
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.07);
  font-size: 16px;
  line-height: 1.15;
  color: #fff;
}

.font-list [aria-checked="true"] {
  border-color: var(--p);
  background: color-mix(in srgb, var(--p) 18%, transparent);
}

/* Advanced: colour dots, post style chips, corners. */
.adv + h4 {
  margin-top: 22px;
}

.adv-row + .adv-row {
  margin-top: 14px;
}

.adv-row > b,
.adv-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dots button,
.dots .any {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.dots [aria-checked="true"],
.dots .any.on {
  box-shadow: 0 0 0 2px var(--surf), 0 0 0 4px #fff;
}

.dots .any {
  display: grid;
  place-items: center;
  background: var(--c, transparent) conic-gradient(#f43f5e, #fbc02d, #1fc265, #22d3ee, #6366f1, #a855f7, #f43f5e);
  cursor: pointer;
}

.dots .any.on {
  background: var(--c);
}

.dots .any .ic {
  width: 16px;
  height: 16px;
  color: #fff;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.6));
}

.dots .any input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

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

.style-chips button {
  height: 32px;
  padding: 0 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.style-chips [aria-checked="true"] {
  background: var(--p);
  color: var(--on-p);
}

.adv-more {
  display: block;
  margin: 8px 2px 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.adv-label.corners {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 0;
}

.adv-label.corners span {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
}

.adv-label.corners input {
  flex: 1 0 100%;
  margin-top: 8px;
  accent-color: var(--p);
}

.adv-label.corners input:disabled {
  opacity: 0.35;
}

/* --------------------------------------------------------------- calls */

.screen.call {
  background: #000;
}

.call-remote,
.call-shade,
.call-top,
.call-tools,
.selfview,
.call-person,
.call-intro {
  display: none;
}

.call[data-state="video"] .call-remote,
.call[data-state="video"] .call-shade,
.call[data-state="video"] .call-top,
.call[data-state="video"] .call-tools,
.call[data-state="video"] .selfview,
.call[data-state="outgoing"] .call-person,
.call[data-state="voice"] .call-person,
.call[data-state="intro"] .call-intro {
  display: block;
}

.call-remote {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.call-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.87), transparent 45%, transparent 55%, rgba(0, 0, 0, 0.87));
  pointer-events: none;
}

.call .back {
  position: absolute;
  left: 16px;
  top: 67px;
  z-index: 7;
  width: 48px;
  height: 48px;
  color: rgba(255, 255, 255, 0.8);
}

.call .back .ic {
  width: 26px;
  height: 26px;
}

.call[data-state="intro"] .back,
.call[data-state="intro"] .call-controls,
.call[data-state="intro"] .end-call {
  display: none;
}

.call-person {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(227px + (var(--app-h, 852px) - 852px) * 0.55);
  text-align: center;
}

.call-person .av.big {
  width: 128px;
  height: 128px;
  margin: 0 auto 24px;
  font-size: 40px;
}

.call-person b,
.call-top b {
  display: block;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.43;
}

.call-person span,
.call-top span {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
}

.call-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 80px;
  z-index: 3;
  text-align: center;
}

.call-top span {
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.call-tools {
  position: absolute;
  left: 347px;
  top: 67px;
  z-index: 4;
}

.mini-glass {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: rgba(255, 255, 255, 0.85);
}

.mini-glass .ic {
  width: 20px;
  height: 20px;
}

/* Your camera: your picture, in the corner; tap to swap with theirs. */
.selfview {
  position: absolute;
  left: 289px;
  top: 157px;
  z-index: 4;
  width: 96px;
  height: 132px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  background: var(--me) center / cover, color-mix(in srgb, var(--p) 18%, #1a1d20) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.call.flipped .selfview {
  transform: scaleX(-1);
}

.call.cam-off .selfview {
  background: #1a1d20 !important;
}

.call.swapped .selfview {
  left: 0;
  top: 0;
  z-index: 0;
  width: 393px;
  height: 852px;
  border-radius: 0;
  border: 0 !important;
}

.call.swapped .call-remote {
  left: 289px;
  top: 157px;
  z-index: 4;
  width: 96px;
  height: 132px;
  border-radius: 16px;
}

.call-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 173px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 22px;
}

.ctl {
  display: none !important;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75) !important;
}

.call[data-state="outgoing"] [data-ctl="mute"],
.call[data-state="outgoing"] [data-ctl="speaker"],
.call[data-state="voice"] [data-ctl="mute"],
.call[data-state="voice"] [data-ctl="speaker"],
.call[data-state="voice"] [data-ctl="video"],
.call[data-state="video"] .call-controls [data-ctl="mute"],
.call[data-state="video"] .call-controls [data-ctl="camera"],
.call[data-state="video"] .call-controls [data-ctl="flip"] {
  display: flex !important;
}

.ctl .circle {
  width: 58px;
  height: 58px;
  color: #fff;
}

.ctl .ic {
  width: 24px;
  height: 24px;
}

.ctl i {
  display: contents;
  font-style: normal;
}

.ctl .on,
.ctl.on .off {
  display: none;
}

.ctl.on .on {
  display: contents;
}

.ctl.on .circle {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.82)) !important;
  border-color: #fff !important;
  color: #000;
}

.end-call {
  position: absolute;
  left: 164.5px;
  bottom: 82px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 0, 5, 0.95), rgba(255, 0, 5, 0.85), rgba(255, 0, 5, 0.7)) !important;
  border: 1.2px solid rgba(255, 255, 255, 0.3) !important;
  color: #fff;
}

.end-call .ic {
  width: 27px;
  height: 27px;
}

/* The beta intro. */
.call-intro {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: var(--surf);
  text-align: center;
}

.intro-hero {
  position: absolute;
  left: 0;
  right: 0;
  top: 70px;
  height: 110px;
}

.intro-glow {
  position: absolute;
  left: 142px;
  top: 0;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--p) 35%, transparent), transparent 70%);
}

.intro-main {
  position: absolute;
  left: 158px;
  top: 16px;
  color: var(--p);
}

.intro-main .ic {
  width: 76px;
  height: 76px;
}

.sat {
  position: absolute;
  color: color-mix(in srgb, var(--p) 22%, transparent);
}

.sat .ic {
  width: 26px;
  height: 26px;
}

.s1 { left: 119px; top: 11px; }
.s2 { left: 255px; top: 11px; }
.s3 { left: 263px; top: 60px; }

.beta-pill {
  position: absolute;
  left: 153px;
  top: 183px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 86px;
  height: 31px;
  border-radius: 20px;
  font: 800 12px/1 Roboto, sans-serif;
  letter-spacing: 1.6px;
  color: var(--p);
}

.beta-pill .ic {
  width: 15px;
  height: 15px;
}

.call-intro h3 {
  position: absolute;
  left: 0;
  right: 0;
  top: 226px;
  margin: 0;
  font: 800 27px/1.15 var(--app-font), Roboto, sans-serif;
}

.intro-sub {
  position: absolute;
  left: 20px;
  top: 265px;
  width: 353px;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.72);
}

.intro-card {
  position: absolute;
  left: 20px;
  top: 323px;
  width: 353px;
  padding: 16px 16px 4px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.07) !important;
  text-align: left;
}

.intro-row {
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
}

.intro-ic {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--p) 16%, transparent);
  color: var(--p);
}

.intro-ic .ic {
  width: 20px;
  height: 20px;
}

.intro-row b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.intro-row small {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.62);
}

.start-call {
  position: absolute;
  left: 20px;
  bottom: 98px;
  width: 353px;
  height: 54px;
  border-radius: 16px;
  background: var(--p) !important;
  color: #000;
  font-size: 16px;
  font-weight: 700;
}

.not-now {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 70px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7) !important;
}

/* In the chat: the note a finished call leaves, and the bar back to one
   that's still going. */
.call-note {
  align-self: center;
  margin: 18px 0 6px;
  padding: 6px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--on-surf) 8%, transparent);
  font: 600 12px/1.3 Roboto, sans-serif;
  color: color-mix(in srgb, var(--on-surf) 70%, transparent);
}

.call-bar {
  position: absolute;
  left: 15px;
  right: 15px;
  top: 172px;
  z-index: 6;
  height: 36px;
  border-radius: 18px;
  background: var(--p) !important;
  color: #000;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.call-bar[hidden] {
  display: none;
}

/* ---------------------------------------------------------------- live */

.live .clip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live .shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent 22%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 45%);
  pointer-events: none;
}

.live .hearts {
  position: absolute;
  right: 16px;
  top: 52px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.live .hearts .ic {
  width: 18px;
  height: 18px;
  color: rgba(255, 0, 5, 0.71);
}

.live .host {
  position: absolute;
  left: 10px;
  top: 85px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.live .host .av {
  width: 31.5px;
  height: 31.5px;
  border-radius: 10px;
  font-size: 11px;
}

.live .host b {
  display: block;
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
}

.live .host small {
  display: flex;
  gap: 15px;
  font-size: 10.8px;
  line-height: 14px;
}

.live .close {
  position: absolute;
  right: 10px;
  top: 99px;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  display: grid;
  place-items: center;
}

.live .close .ic {
  width: 25px;
  height: 25px;
}

.live .gifters {
  position: absolute;
  left: 10px;
  top: 135px;
  display: flex;
  gap: 10px;
}

.live .gifter {
  position: relative;
}

.live .gifter .av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 10px;
}

.live .gifter small {
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
  min-width: 16px;
  padding: 0 4px;
  border-radius: 6px;
  background: #ff9800;
  font: 700 8px/12px Roboto, sans-serif;
  text-align: center;
}

.live .comments {
  position: absolute;
  left: 10px;
  right: 80px;
  bottom: 104px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.live .hide {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}

.live .hide .ic {
  width: 20px;
  height: 20px;
}

.live .comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 221px;
  overflow: hidden;
  justify-content: flex-end;
}

.live .comment-list.hidden-list {
  visibility: hidden;
}

.live .comment {
  display: flex;
  gap: 10px;
  animation: msg-in 0.3s ease;
}

.live .comment .av {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 10px;
}

.live .comment span {
  font-size: 13px;
  line-height: 17px;
}

.live .comment span b {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
}

.live .bar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 37px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.live .bar input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--p);
  background: color-mix(in srgb, var(--surf) 35%, transparent);
  font-size: 17px;
  letter-spacing: 0;
}

.live .bar input::placeholder {
  color: #fff;
}

.live .bar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  letter-spacing: 0;
}

.live .bar .circle {
  width: 40px;
  height: 40px;
  color: var(--p);
}

.live .bar .circle .ic {
  width: 22px;
  height: 22px;
}

.gift-burst {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  pointer-events: none;
  opacity: 0;
}

.gift-burst img {
  width: 150px;
  height: 150px;
  filter: drop-shadow(0 12px 32px rgba(255, 200, 80, 0.6));
}

.gift-burst span {
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.45);
  font-weight: 700;
}

.gift-burst.go {
  animation: gift 2.2s ease forwards;
}

@keyframes gift {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(60px);
  }
  18% {
    opacity: 1;
    transform: scale(1.12);
  }
  28% {
    transform: scale(1);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-40px);
  }
}

/* -------------------------------------------------------------- sheets */

.sheet-layer {
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

.sheet-dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.54);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: calc(var(--app-h, 852px) - 150px);
  padding: 10px 16px 44px;
  border-radius: 12px 12px 0 0;
  background: color-mix(in srgb, var(--surf) 72%, transparent);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  transform: translateY(105%);
  transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1);
  overflow-y: auto;
  scrollbar-width: none;
}

.sheet-layer.open {
  pointer-events: auto;
}

.sheet-layer.open .sheet-dim {
  opacity: 1;
}

.sheet-layer.open .sheet {
  transform: none;
}

.grab {
  display: block;
  width: 35px;
  height: 4.5px;
  margin: 0 auto 16px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.35);
}

.sheet h4 {
  margin: 0 0 14px;
  font: 700 18px/1.2 var(--app-font), Roboto, sans-serif;
  letter-spacing: 0;
}

.gift-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 8px;
}

.gift-grid button {
  text-align: center;
}

.gift-card {
  position: relative;
  display: grid;
  place-items: center;
  height: 94px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.gift-card img {
  width: 64px;
  height: 64px;
}

.gift-card b {
  position: absolute;
  left: 0;
  top: 0;
  padding: 2px 8px;
  border-radius: 12px 0 12px 0;
  background: var(--surf);
  font-size: 12px;
}

.price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
}

.price .ic,
.balance .ic {
  width: 14px;
  height: 14px;
  color: #ffc107;
}

.balance {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 26px;
  font-size: 12px;
  font-weight: 600;
}

.balance b {
  font-size: 14px;
}

.balance button {
  margin-left: auto;
  height: 26px;
  padding: 0 12px;
  border-radius: 13px;
  background: var(--on-p) !important;
  font-size: 11px;
  font-weight: 700;
}

.menu-list button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: 52px;
  padding: 0 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  font-size: 15px;
  text-align: left;
}

.menu-list .ic {
  width: 22px;
  height: 22px;
  color: var(--p);
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.theme-grid button {
  height: 74px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 13px;
  font-weight: 600;
  border: 2px solid transparent !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.theme-grid button span {
  font-size: 22px;
}

.theme-grid [aria-checked="true"] {
  border-color: #fff !important;
}

/* --------------------------------------------------------------- toast */

.toast {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 112px;
  z-index: 55;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(20, 22, 24, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: 0;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.toast a {
  color: var(--p);
  font-weight: 700;
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .fx {
    display: none;
  }
}

/* A tap hint in the phone tour: a pulsing ring on something to try. */
.m-spot {
  position: absolute;
  z-index: 58;
  width: 0;
  height: 0;
  transform-origin: 0 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.m-spot.show {
  opacity: 1;
}

.m-spot i {
  position: absolute;
  left: -26px;
  top: -26px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--p) 55%, transparent);
  animation: spot 1.4s ease-out infinite;
}

.m-spot span {
  position: absolute;
  top: 34px;
  left: 0;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  color: #0b0d10;
  font: 700 13px/1 Roboto, sans-serif;
  letter-spacing: 0;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.m-spot.above span {
  top: auto;
  bottom: 34px;
}

@keyframes spot {
  0% {
    transform: scale(0.7);
    opacity: 1;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

/* The look dock (phone tour, Looks): looks over the For You feed on a
   blurred strip that fades in from above. */
.look-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 96px;
  z-index: 41;
  height: 118px;
  padding-top: 26px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0.3s;
}

.app.show-dock .look-dock {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* The gradient blur: strongest at the bottom, gone at the top. */
.look-dock::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--surf) 70%, transparent) 55%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  -webkit-mask: linear-gradient(180deg, transparent, #000 40%);
  mask: linear-gradient(180deg, transparent, #000 40%);
}

.dock-row {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.dock-row::-webkit-scrollbar {
  display: none;
}

.dock-row button {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 58px;
}

/* A little tile of the look's artwork, as the chat themes are shown. */
.dock-sw {
  position: relative;
  display: block;
  width: 46px;
  height: 60px;
  border-radius: 10px;
  background: var(--sw-art, none) center top / cover, linear-gradient(180deg, var(--sw-a), var(--sw-bg));
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, border-color 0.2s ease;
}

.dock-row [aria-checked="true"] .dock-sw {
  border-color: #fff;
  transform: scale(1.08);
}

.dock-name {
  font: var(--sw-w) 11.5px/1.2 var(--sw-font), Roboto, sans-serif;
  letter-spacing: 0;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}
