
:root {
  color-scheme: light;
  --app-bg: #fbfafb;
  --hero-base: #f5f5f5;
  --tile: #fbf7fa;
  --surface: #ffffff;
  --surface-soft: #fbf7fa;
  --text: #141619;
  --muted: #687684;
  --faint: #bdc5cd;
  --line: #f5f5f5;
  --purple: #7949dd;
  --deep-purple: #220e4c;
  --purple-soft: #ded3f7;
  --danger: #fb3457;
  --success: #1fc16b;
  --shadow: 0 1px 8px rgba(20,22,25,.08);
  --nav-shadow: 0 1px 15px rgba(20,22,25,.14);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --app-bg: #141412;
  --hero-base: #181816;
  --tile: #20201e;
  --surface: #20201e;
  --surface-soft: #282824;
  --text: #f2e8d8;
  --muted: #b7ab9b;
  --faint: #756d61;
  --line: #343025;
  --purple: #d6a84f;
  --deep-purple: #9a7129;
  --purple-soft: #3b3020;
  --danger: #d25b55;
  --success: #78a05c;
  --shadow: 0 1px 10px rgba(0,0,0,.34);
  --nav-shadow: 0 -6px 24px rgba(0,0,0,.46);
}
.nexture-symbols {

  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  background: #ece8ef;
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  color: var(--text);
}
button, textarea { font: inherit; }
button { color: inherit; }
.phone-shell {
  position: relative;
  width: 375px;
  height: 813px;
  overflow: hidden;
  background: var(--app-bg);
  border-radius: 30px;
  box-shadow: 0 18px 60px rgba(26,17,38,.14);
  isolation: isolate;
}
.app-scroll {
  position: absolute;
  inset: 0 0 82px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  overscroll-behavior: contain;
  background: var(--app-bg);
}
.app-scroll::-webkit-scrollbar,
.neighbor-strip::-webkit-scrollbar { display: none; }

.hero {
  position: relative;
  height: 385px;
  background: var(--hero-base);
  overflow: hidden;
}
.tile { position: absolute; background: var(--tile); border-radius: 15px; }
.tile-a { left: 0; top: 0; width: 186px; height: 119px; }
.tile-b { left: 189px; top: 0; width: 186px; height: 119px; }
.tile-c { left: 0; top: 121px; width: 186px; height: 168px; }
.tile-d { left: 189px; top: 121px; width: 186px; height: 168px; }
.tile-e { left: 0; top: 291px; width: 187.5px; height: 92px; border-radius: 15px 15px 15px 0; }
.tile-f { left: 187.5px; top: 291px; width: 187.5px; height: 92px; border-radius: 15px 15px 0 15px; }
.purple-glow {
  position: absolute; width: 81px; height: 125px; left: 147px; top: 38px;
  background: #926be3; filter: blur(100px); pointer-events: none;
}
.topbar {
  position: absolute; left: 16px; top: 60px; width: 343px; height: 40px;
  display: flex; justify-content: space-between; align-items: center;
}
.topbar-left, .topbar-actions { display: flex; align-items: center; }
.topbar-left { gap: 8px; width: 76px; }
.topbar-actions { gap: 4px; width: 128px; }
.icon-plain, .round-control, .avatar-button {
  padding: 0; border: 0; background: transparent; cursor: pointer;
}
.hamburger { width: 28px; height: 24px; display: grid; place-items: center; }
.hamburger svg { width: 24px; height: 24px; }
.brand { position: relative; width: 40px; height: 40px; border-radius: 8px; background: var(--purple); display: block; }
.brand::before {
  content:""; position:absolute; width: 20px; height: 20px; left: 10px; top: 10px;
  background: #fff; border-radius: 1px;
  clip-path: polygon(0 32%,32% 32%,32% 0,100% 0,100% 68%,68% 68%,68% 100%,0 100%);
}
.round-control {
  position: relative; width: 40px; height: 40px; border-radius: 999px;
  display: grid; place-items: center; background: var(--surface); box-shadow: 0 2px 4px rgba(0,0,0,.04);
}
.round-control svg { width: 20px; height: 20px; }
.notification-button svg { width: 20px; height: 20px; }
.notification-dot { position: absolute; width: 6px; height: 6px; right: 7px; top: 10px; border-radius: 50%; background: var(--danger); }
.avatar-button { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; }
.avatar-button img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero-main {
  position: absolute; left: 16px; top: 142px; width: 343px; height: 127px;
  display: flex; justify-content: space-between; align-items: center; gap: 28px;
}
.hero-copy { width: 158px; height: 125px; display: flex; flex-direction: column; gap: 10px; }
.eyebrow { margin: 0; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--purple); }
.hero-copy h1 { margin: 0; font-size: 30px; line-height: 1.1; font-weight: 400; letter-spacing: -.45px; }
.hero-copy h1 strong { color: var(--purple); font-weight: 700; }
.spark-panel { width: 155px; height: 127px; display: flex; flex-direction: column; gap: 5px; }
.add-spark {
  width: 155px; height: 48px; padding: 10px 12px; border: 0; border-radius: 8px; cursor: pointer;
  background: linear-gradient(95.12deg, var(--purple-soft) 0%, color-mix(in srgb, var(--surface) 85%, var(--purple-soft)) 100%);
  display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 700;
}
.small-plus { position: relative; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); flex: 0 0 auto; }
.small-plus svg { width: 18px; height: 18px; }
.composer-plus svg { width: 24px; height: 24px; }
.nav-create svg { width: 28px; height: 28px; }
.spark-grid { display: flex; gap: 5px; height: 74px; }
.spark-card {
  position: relative; width: 75px; height: 74px; border: 0; border-radius: 8px; overflow: hidden; padding: 0; cursor: pointer;
  background: linear-gradient(180deg, transparent 50%, rgba(18,18,18,.38) 100%), var(--spark-image) center/cover no-repeat;
}
.spark-card span { position: absolute; left: 6px; bottom: 6px; color: #fff; font-size: 10px; line-height: 13px; font-weight: 700; }

.composer-bar {
  position: absolute; left: 16px; top: 311px; width: 343px; height: 52px;
  display: flex; justify-content: space-between; align-items: center; padding: 8px 8px 8px 15px;
  border: 0; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); cursor: pointer;
  color: var(--muted); font-size: 14px; text-align: left;
}
.composer-plus { position: relative; width: 36px; height: 36px; border-radius: 50%; background: var(--deep-purple); color: #fff; }


.neighborhoods {
  height: 164px; padding: 20px 16px 19px; background: var(--app-bg); border-bottom: 2px solid var(--line);
}
.section-title { height: 18px; display: flex; align-items: center; justify-content: space-between; }
.section-title h2, .feed-menu h2 { margin: 0; font-size: 14px; line-height: 18px; font-weight: 600; }
.section-title button { border: 0; padding: 0; background: transparent; color: var(--purple); font-size: 12px; line-height: 16px; cursor: pointer; }
.neighbor-strip {
  margin-top: 11px; display: flex; align-items: center; gap: 12px; width: 343px; height: 94px;
  overflow-x: auto; scrollbar-width: none; padding-right: 10px;
}
.neighbor { width: 58px; height: 94px; flex: 0 0 58px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.neighbor:first-child { width: 82px; flex-basis: 82px; }
.neighbor-wide { width: 81px; flex-basis: 81px; }
.neighbor-avatar { position: relative; width: 58px; height: 58px; flex: 0 0 58px; border-radius: 50%; }
.neighbor-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.neighbor strong { max-width: 90px; white-space: nowrap; overflow: hidden; text-overflow: clip; font-size: 12px; line-height: 16px; font-weight: 600; }
.neighbor > span { margin-top: -3px; font-size: 10px; line-height: 13px; font-weight: 500; color: var(--muted); }
.status-check::after {
  content:"✓"; position:absolute; width:18px; height:18px; right:-1px; bottom:-1px; border-radius:50%;
  display:grid; place-items:center; font-size:10px; font-weight:700; color:#fff; background:var(--success); border:2px solid var(--surface);
}
.status-live::after {
  content:"● Live"; position:absolute; right:-5px; bottom:-1px; height:15px; padding:0 5px;
  border:1px solid #e1e4ed; border-radius:4px; background:var(--surface); color:var(--muted);
  font-size:9px; line-height:13px; white-space:nowrap;
}
.status-live::first-letter { color: var(--danger); }
.selected { padding: 5px; border: 3px solid var(--purple); background: var(--surface); }
.selected img { width: 42px; height: 42px; }

.feed {
  position: relative; min-height: 1141px; padding: 20px 16px 34px; background: var(--app-bg);
}
.feed::before {
  content:""; position:absolute; width:81px; height:125px; left:-50px; top:-13px;
  background:#ff4646; filter:blur(100px); pointer-events:none;
}
.feed-menu { position: relative; height: 18px; display: flex; align-items: center; justify-content: space-between; z-index: 1; }
.feed-tabs { display: flex; align-items: center; gap: 21px; height: 18px; }
.feed-tabs button { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; line-height: 16px; cursor: pointer; }
.feed-tabs button.active { color: var(--text); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.post-list { position: relative; margin-top: 12px; display: flex; flex-direction: column; gap: 3px; z-index: 1; }
.post-card { width: 343px; padding: 15px; border-radius: 8px; background: var(--surface); display: flex; flex-direction: column; gap: 11px; }
.post-header { width: 313px; min-height: 60px; display: flex; align-items: center; }
.post-avatar { width: 54px; height: 54px; flex: 0 0 54px; margin-right: 8px; border-radius: 50%; object-fit: cover; }
.post-author { min-width: 0; flex: 1; height: 60px; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.post-author span, .post-author strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-author .activity { font-size: 14px; line-height: 18px; color: var(--muted); }
.post-author strong { font-size: 16px; line-height: 20px; font-weight: 600; }
.post-author > span:last-child { font-size: 14px; line-height: 18px; color: var(--muted); }
.post-follow { display: flex; align-items: center; gap: 8px; margin-left: 4px; }
.post-follow > button:first-child { width: 47px; height: 23px; border: 0; border-radius: 6px; background: var(--purple-soft); color: var(--purple); font-size: 12px; font-weight: 600; cursor: pointer; }
.chevron { width: 18px; height: 18px; padding: 0; border: 0; background: transparent; cursor: pointer; color: var(--faint); display: grid; place-items: center; }
.chevron svg { width: 18px; height: 18px; }
.chevron.standalone { margin-left: 8px; }
.post-copy { margin: 0; font-size: 16px; line-height: 20.5px; font-weight: 400; }
.post-copy a { color: var(--purple); text-decoration: none; }
.post-media { position: relative; width: 313px; height: 186px; border-radius: 8px; overflow: hidden; }
.post-media img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.06); }
.play { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:40px; height:40px; border:0; border-radius:50%; background:rgba(189,197,205,.28); cursor:pointer; }
.play svg { width: 24px; height: 24px; color: #fff; }
.media-dots { height: 6px; display: flex; justify-content: center; gap: 4px; }
.media-dots i { width: 6px; height: 6px; border-radius: 50%; background: #e1e4ed; }
.media-dots i:first-child { background: var(--purple); }
.post-actions { width: 313px; height: 15px; display: flex; align-items: center; justify-content: space-between; }
.post-actions > div { display: flex; align-items: center; gap: 25px; }
.action { display: flex; align-items: center; gap: 3px; height: 15px; border: 0; padding: 0; background: transparent; color: var(--muted); cursor: pointer; }
.action b { font-size: 12px; line-height: 15px; font-weight: 400; }
.action-icon { width: 15px; height: 15px; color: currentColor; flex: 0 0 auto; }
.refresh-icon { width: 16px; height: 16px; }
.like-action.liked { color: var(--purple); }
.share-icon { width: 18px; height: 18px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.share-icon svg { width: 17px; height: 17px; }
.portrait-placeholder { width:313px; height:348px; overflow:hidden; border-radius:8px; background:var(--surface-soft); }
.portrait-placeholder img { width:100%; height:100%; object-fit:cover; transform:scale(1.55); filter:saturate(.85); }
.compact-post .post-copy { min-height: 40px; }

.bottom-nav {
  position: absolute; left: 0; bottom: 0; width: 375px; height: 82px; z-index: 30;
  display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 16px;
  border-radius: 30px 30px 0 0; background: var(--surface); box-shadow: var(--nav-shadow);
}
.nav-item { width: 34px; height: 42px; padding: 0; border:0; background:transparent; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; color:var(--muted); cursor:pointer; }
.nav-item svg { width:24px; height:24px; }
.nav-item span { font-size:10px; line-height:13px; font-weight:500; }
.nav-item.active { color: var(--purple); }
.nav-create { position:relative; width:44px; height:44px; margin-top:0; border:0; border-radius:50%; background:var(--purple); color:#fff; cursor:pointer; }


.sheet-backdrop, .modal-backdrop {
  position:absolute; inset:0; z-index:50; background:rgba(14,10,22,.38); backdrop-filter:blur(2px);
}
.settings-sheet {
  position:absolute; left:10px; right:10px; bottom:-250px; z-index:60; padding:10px 18px 18px;
  border-radius:24px; background:var(--surface); box-shadow:0 -12px 40px rgba(0,0,0,.2); transition:bottom .25s ease;
}
.settings-sheet.open { bottom:10px; }
.sheet-handle { width:42px; height:4px; margin:0 auto 18px; border-radius:99px; background:var(--faint); opacity:.7; }
.sheet-row { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.sheet-row strong { display:block; font-size:15px; }
.sheet-row span { display:block; margin-top:4px; font-size:11px; color:var(--muted); }
.theme-switch { position:relative; flex:0 0 auto; width:48px; height:28px; border:0; border-radius:99px; background:var(--line); cursor:pointer; }
.theme-switch i { position:absolute; width:22px; height:22px; left:3px; top:3px; border-radius:50%; background:var(--surface); box-shadow:0 2px 6px rgba(0,0,0,.18); transition:left .2s; }
.theme-switch[aria-checked="true"] { background:var(--purple); }
.theme-switch[aria-checked="true"] i { left:23px; }
.sheet-close, .publish-button { width:100%; height:42px; margin-top:18px; border:0; border-radius:10px; background:var(--purple); color:#fff; font-weight:700; cursor:pointer; }

.composer-modal {
  position:absolute; left:16px; right:16px; top:50%; z-index:70; transform:translateY(-46%) scale(.96);
  padding:16px; border-radius:18px; background:var(--surface); box-shadow:0 20px 70px rgba(0,0,0,.28);
  opacity:0; pointer-events:none; transition:.2s ease;
}
.composer-modal.open { opacity:1; pointer-events:auto; transform:translateY(-50%) scale(1); }
.composer-modal header { display:flex; align-items:center; justify-content:space-between; }
.composer-modal h2 { margin:0; font-size:18px; }
.composer-modal header button { width:30px; height:30px; border:0; border-radius:50%; background:var(--surface-soft); font-size:24px; line-height:24px; cursor:pointer; }
.composer-modal textarea { width:100%; height:130px; margin-top:14px; padding:12px; resize:none; border:1px solid var(--line); border-radius:12px; background:var(--surface-soft); color:var(--text); outline:none; }
.publish-button { margin-top:12px; }

@media (max-width: 480px) {
  body { background: var(--app-bg); }
  .phone-shell { width:100vw; height:100dvh; max-width:375px; border-radius:30px; box-shadow:none; }
  .bottom-nav { width:100%; }
}
@media (max-height: 780px) and (max-width:480px) {
  .phone-shell { border-radius:0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; transition:none !important; }
}

/* ================================================================
   Mobile viewport, icon alignment and fixed topbar corrections
   ================================================================ */

.phone-shell svg {
  display: block;
}

.topbar {
  z-index: 45;
  transition:
    top 180ms ease,
    left 180ms ease,
    width 180ms ease,
    height 180ms ease,
    padding 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.phone-shell.topbar-scrolled .topbar {
  top: 50px;
  left: 8px;
  width: calc(100% - 16px);
  height: 60px;
  padding: 10px 8px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 8px 26px rgba(20, 22, 25, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

html[data-theme="dark"] .phone-shell.topbar-scrolled .topbar {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.34);
}

.small-plus,
.composer-plus,
.nav-create,
.play {
  display: grid;
  place-items: center;
}

.small-plus svg,
.composer-plus svg,
.nav-create svg,
.play svg {
  margin: 0;
  flex: 0 0 auto;
}

.small-plus svg {
  width: 18px;
  height: 18px;
}

.composer-plus svg {
  width: 24px;
  height: 24px;
}

.nav-create svg {
  width: 27px;
  height: 27px;
}

.play svg {
  width: 23px;
  height: 23px;
}

/* Outline-SVGs erhalten ihre Farbe ausschließlich über currentColor. */
.round-control svg,
.hamburger svg,
.nav-item svg,
.action-icon,
.share-icon svg,
.chevron svg,
.small-plus svg,
.composer-plus svg,
.nav-create svg,
.play svg {
  fill: none;
}

.like-action.liked .heart-icon {
  fill: currentColor;
}

/* Aktiver Navigationspunkt wie in der Vorlage: Purple statt Grau/Schwarz. */
.nav-item.active,
.nav-item.active svg {
  color: var(--purple);
}

/* Auf echten Smartphones kein künstlicher 375px-Rahmen und kein Außenabstand. */
@media (max-width: 600px) {
  html,
  body {
    width: 100%;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    background: var(--app-bg);
  }

  body {
    display: block;
    min-height: 100dvh;
  }

  .phone-shell {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .app-scroll {
    width: 100%;
  }

  .hero,
  .neighborhoods,
  .feed,
  .bottom-nav {
    width: 100%;
  }

  .tile-a,
  .tile-c {
    left: 0;
    width: calc(50% - 1.5px);
  }

  .tile-b,
  .tile-d {
    left: calc(50% + 1.5px);
    width: calc(50% - 1.5px);
  }

  .tile-e {
    left: 0;
    width: 50%;
  }

  .tile-f {
    left: 50%;
    width: 50%;
  }

  .topbar,
  .hero-main,
  .composer-bar {
    left: 16px;
    width: calc(100% - 32px);
  }

  .hero-main {
    justify-content: space-between;
  }

  .neighborhoods {
    padding-right: 16px;
    padding-left: 16px;
  }

  .neighbor-strip {
    width: 100%;
  }

  .feed {
    padding-right: 16px;
    padding-left: 16px;
  }

  .post-list,
  .post-card,
  .post-header,
  .post-media,
  .portrait-placeholder,
  .post-actions {
    width: 100%;
  }

  .post-author {
    min-width: 0;
  }

  .bottom-nav {
    left: 0;
    right: 0;
    bottom: 0;
  }
}

/* Sehr schmale Geräte behalten die Vorlage ohne horizontales Quetschen. */
@media (max-width: 359px) {
  .hero-main {
    gap: 14px;
  }

  .hero-copy {
    width: calc(50% - 7px);
  }

  .spark-panel {
    width: calc(50% - 7px);
  }

  .add-spark,
  .spark-grid {
    width: 100%;
  }

  .spark-card {
    width: calc(50% - 2.5px);
  }

  .feed-tabs {
    gap: 13px;
  }
}

/* ================================================================
   HNT.ROCKS bottom navigation and create popover
   ================================================================ */

.bottom-nav {
  align-items: flex-start;
}

.create-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

.create-popover {
  position: absolute;
  left: 50%;
  bottom: 58px;
  z-index: 80;
  width: 184px;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 16px 42px rgba(20, 22, 25, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateX(-50%) translateY(10px) scale(0.96);
  transform-origin: bottom center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 160ms ease;
}

html[data-theme="dark"] .create-popover {
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.create-popover.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.create-popover::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 14px;
  height: 14px;
  border-right: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: var(--surface);
  transform: translateX(-50%) rotate(45deg);
}

.create-popover button {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  text-align: left;
}

.create-popover button:hover,
.create-popover button:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.create-popover button svg {
  width: 21px;
  height: 21px;
  color: var(--purple);
  flex: 0 0 auto;
}

.create-popover button span {
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
}

.nav-create[aria-expanded="true"] {
  transform: rotate(45deg);
}

.nav-create {
  transition: transform 160ms ease, background-color 160ms ease;
}

.nav-item span {
  white-space: nowrap;
}

@media (max-width: 359px) {
  .create-popover {
    width: 174px;
  }

  .bottom-nav {
    padding-right: 12px;
    padding-left: 12px;
  }
}

/* ================================================================
   Post typography, compact header and large action bar
   ================================================================ */

.post-copy {
  font-size: 13px;
  line-height: 1.55;
}

.post-header-compact {
  width: 100%;
  min-height: 54px;
}

.post-header-compact .post-avatar {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  margin-right: 10px;
}

.post-author-compact {
  height: auto;
  justify-content: center;
  gap: 3px;
}

.post-author-compact strong {
  font-size: 15px;
  line-height: 19px;
  font-weight: 700;
}

.post-author-compact > span:last-child {
  font-size: 12px;
  line-height: 16px;
  color: var(--muted);
}

.post-more {
  width: 34px;
  height: 34px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.post-more:hover,
.post-more:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.post-more svg {
  width: 22px;
  height: 22px;
}

.post-actions-modern {
  width: 100%;
  height: 48px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-action,
.likes-pill {
  height: 38px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-action {
  min-width: 38px;
  padding: 0 7px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.icon-action:hover,
.icon-action:focus-visible,
.likes-pill:hover,
.likes-pill:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.icon-action svg {
  width: 24px;
  height: 24px;
}

.icon-action span {
  font-size: 13px;
  font-weight: 600;
}

.likes-pill {
  max-width: 132px;
  padding: 4px 12px 4px 6px;
  border-radius: 15px;
  background: var(--surface-soft);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  white-space: nowrap;
}

.likes-pill > span:last-child {
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
}

.likes-avatars {
  display: flex;
  align-items: center;
}

.likes-avatars img {
  width: 28px;
  height: 28px;
  border: 2px solid var(--surface-soft);
  border-radius: 50%;
  object-fit: cover;
}

.likes-avatars img + img {
  margin-left: -10px;
}

.bookmark-action {
  margin-left: auto;
}

.like-action.liked {
  color: var(--purple);
}

/* ================================================================
   Tall create popover matching the supplied reference
   ================================================================ */

.create-popover-tall {
  width: 218px;
  padding: 10px;
  border-radius: 24px;
}

.create-popover-tall button {
  height: 56px;
  padding: 0 14px;
  border-radius: 15px;
  gap: 14px;
}

.create-popover-tall button + button {
  margin-top: 2px;
}

.create-popover-tall .create-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--surface-soft);
  display: grid;
  place-items: center;
  flex: 0 0 38px;
}

.create-popover-tall .create-icon svg {
  width: 23px;
  height: 23px;
  color: var(--text);
}

.create-popover-tall button > span:last-child {
  font-size: 15px;
  font-weight: 600;
}

/* ================================================================
   Modern HNT.ROCKS side navigation
   ================================================================ */

.side-menu-backdrop {
  position: absolute;
  inset: 0;
  z-index: 88;
  background: rgba(9, 7, 14, 0.48);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.side-menu {
  position: absolute;
  left: 10px;
  top: 10px;
  bottom: 10px;
  z-index: 90;
  width: min(340px, calc(100% - 20px));
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 28px;
  background:
    linear-gradient(160deg,
      color-mix(in srgb, var(--surface) 96%, var(--purple) 4%) 0%,
      var(--surface) 48%,
      color-mix(in srgb, var(--surface) 94%, #ff4646 6%) 100%);
  box-shadow: 0 28px 80px rgba(7, 5, 13, 0.34);
  overflow: hidden;
  transform: translateX(calc(-100% - 24px)) scale(0.98);
  transform-origin: left center;
  opacity: 0;
  pointer-events: none;
  transition:
    transform 260ms cubic-bezier(.2,.8,.2,1),
    opacity 200ms ease;
}

.side-menu.open {
  transform: translateX(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.side-menu-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}

.side-menu-glow-one {
  width: 140px;
  height: 140px;
  right: -50px;
  top: 80px;
  background: color-mix(in srgb, var(--purple) 50%, transparent);
}

.side-menu-glow-two {
  width: 120px;
  height: 120px;
  left: -60px;
  bottom: 70px;
  background: rgba(255, 70, 70, 0.2);
}

.side-menu-header,
.side-menu-brand,
.side-profile-card,
.side-menu-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}

.side-menu-header {
  justify-content: space-between;
}

.side-menu-brand {
  gap: 11px;
}

.side-menu-logo {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--purple);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--purple) 28%, transparent);
}

.side-menu-logo span {
  position: absolute;
  inset: 11px;
  background: #fff;
  clip-path: polygon(0 32%,32% 32%,32% 0,100% 0,100% 68%,68% 68%,68% 100%,0 100%);
}

.side-menu-brand strong,
.side-profile-card strong {
  display: block;
  font-size: 15px;
}

.side-menu-brand small,
.side-profile-card span,
.side-menu-footer span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.side-menu-close {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.side-menu-close svg {
  width: 20px;
  height: 20px;
}

.side-profile-card {
  margin-top: 20px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  box-shadow: 0 8px 22px rgba(20,22,25,.06);
  gap: 11px;
}

.side-profile-card > img {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  object-fit: cover;
}

.side-profile-card > div {
  min-width: 0;
  flex: 1;
}

.side-profile-card > button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  display: grid;
  place-items: center;
}

.side-profile-card > button svg {
  width: 18px;
  height: 18px;
}

.side-primary-nav {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  display: grid;
  gap: 5px;
}

.side-primary-nav button {
  width: 100%;
  min-height: 58px;
  padding: 8px 10px;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  cursor: pointer;
}

.side-primary-nav button:hover,
.side-primary-nav button:focus-visible,
.side-primary-nav button.active {
  background: color-mix(in srgb, var(--purple-soft) 68%, var(--surface));
  outline: none;
}

.side-nav-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--surface);
  color: var(--purple);
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  box-shadow: 0 4px 12px rgba(20,22,25,.06);
}

.side-nav-icon svg {
  width: 22px;
  height: 22px;
}

.side-primary-nav button > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.side-primary-nav strong {
  display: block;
  font-size: 13px;
  line-height: 17px;
}

.side-primary-nav small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  line-height: 14px;
  color: var(--muted);
}

.side-primary-nav em {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 8px;
  background: var(--purple);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.side-menu-divider {
  position: relative;
  z-index: 1;
  height: 1px;
  margin: 16px 0;
  background: var(--line);
}

.side-secondary-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.side-secondary-grid button {
  min-height: 66px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  cursor: pointer;
}

.side-secondary-grid button:hover,
.side-secondary-grid button:focus-visible {
  border-color: color-mix(in srgb, var(--purple) 48%, var(--line));
  outline: none;
}

.side-secondary-grid svg {
  width: 21px;
  height: 21px;
  color: var(--purple);
}

.side-secondary-grid span {
  font-size: 11px;
  font-weight: 700;
}

.side-menu-footer {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 17px;
  background: var(--surface-soft);
}

.side-menu-footer strong {
  display: block;
  font-size: 12px;
}

.side-theme-toggle {
  position: relative;
  width: 48px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: var(--line);
  cursor: pointer;
}

.side-theme-toggle i {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0,0,0,.16);
  transition: left 180ms ease;
}

.side-theme-toggle[aria-checked="true"] {
  background: var(--purple);
}

.side-theme-toggle[aria-checked="true"] i {
  left: 23px;
}

@media (max-height: 720px) {
  .side-primary-nav {
    gap: 2px;
  }

  .side-primary-nav button {
    min-height: 50px;
  }

  .side-secondary-grid button {
    min-height: 58px;
  }
}

/* ================================================================
   Functional likes/comments panels and interaction feedback
   ================================================================ */

.interaction-backdrop {
  position: absolute;
  inset: 0;
  z-index: 72;
  background: rgba(9, 7, 14, 0.48);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.interaction-sheet {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -620px;
  z-index: 74;
  max-height: calc(100% - 24px);
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 -22px 64px rgba(9, 7, 14, 0.24);
  opacity: 0;
  pointer-events: none;
  transition:
    bottom 260ms cubic-bezier(.2,.8,.2,1),
    opacity 180ms ease;
}

.interaction-sheet.open {
  bottom: 10px;
  opacity: 1;
  pointer-events: auto;
}

.interaction-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.sheet-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--purple);
  font-size: 10px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.interaction-sheet h2 {
  margin: 0;
  font-size: 18px;
  line-height: 24px;
}

.sheet-icon-close {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.sheet-icon-close svg {
  width: 20px;
  height: 20px;
}

.likes-list {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}

.likes-list article {
  min-height: 62px;
  padding: 8px;
  border-radius: 17px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.likes-list article:hover {
  background: var(--surface-soft);
}

.likes-list img {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  object-fit: cover;
}

.likes-list article > div {
  min-width: 0;
  flex: 1;
}

.likes-list strong,
.likes-list span {
  display: block;
}

.likes-list strong {
  font-size: 13px;
  line-height: 18px;
}

.likes-list span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
}

.likes-list button {
  min-width: 76px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.comments-sheet {
  height: min(590px, calc(100% - 24px));
  display: flex;
  flex-direction: column;
}

.comments-list {
  min-height: 0;
  margin-top: 17px;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 14px;
  scrollbar-width: none;
}

.comments-list::-webkit-scrollbar {
  display: none;
}

.comment-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.comment-item > img {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  object-fit: cover;
  flex: 0 0 36px;
}

.comment-bubble {
  min-width: 0;
  flex: 1;
  padding: 10px 11px;
  border-radius: 15px;
  background: var(--surface-soft);
}

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

.comment-bubble strong {
  font-size: 12px;
  line-height: 16px;
}

.comment-bubble header span {
  color: var(--muted);
  font-size: 10px;
}

.comment-bubble p {
  margin: 6px 0 8px;
  font-size: 12px;
  line-height: 1.48;
}

.comment-bubble button {
  margin-right: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.comment-composer {
  margin-top: 14px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-composer > img {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  object-fit: cover;
}

.comment-composer input {
  min-width: 0;
  flex: 1;
  height: 36px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 12px;
}

.comment-composer input::placeholder {
  color: var(--muted);
}

.comment-composer button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--purple);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.comment-composer button svg {
  width: 21px;
  height: 21px;
}

.composer-modal header button {
  display: grid;
  place-items: center;
  font-size: 0;
}

.composer-modal header button svg {
  width: 18px;
  height: 18px;
}

.publish-button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.app-toast {
  position: absolute;
  left: 50%;
  bottom: 98px;
  z-index: 100;
  max-width: calc(100% - 32px);
  padding: 10px 14px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--text) 92%, transparent);
  color: var(--surface);
  box-shadow: 0 12px 34px rgba(9,7,14,.24);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.app-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 360px) {
  .interaction-sheet {
    left: 6px;
    right: 6px;
    padding: 15px;
  }

  .likes-list button {
    min-width: 68px;
  }
}

/* ================================================================
   Header messages, notifications and user menu
   ================================================================ */

.topbar-actions {
  width: 172px;
}

.message-button svg,
.notification-button svg {
  width: 20px;
  height: 20px;
}

.header-status-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  right: 7px;
  top: 8px;
  border: 2px solid var(--surface);
  border-radius: 50%;
}

.message-status-dot {
  background: var(--purple);
}

.notification-dot {
  background: var(--danger);
}

.avatar-button {
  position: relative;
  border: 2px solid color-mix(in srgb, var(--surface) 75%, transparent);
  box-shadow: 0 4px 14px rgba(20, 22, 25, 0.08);
}

.avatar-button[aria-expanded="true"] {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--purple) 34%, transparent);
}

.topbar-popover {
  position: absolute;
  top: 108px;
  right: 10px;
  z-index: 66;
  width: min(355px, calc(100% - 20px));
  max-height: min(600px, calc(100% - 126px));
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 25px;
  background:
    linear-gradient(
      150deg,
      color-mix(in srgb, var(--surface) 97%, var(--purple) 3%) 0%,
      color-mix(in srgb, var(--surface) 96%, transparent) 55%,
      var(--surface) 100%
    );
  box-shadow: 0 22px 70px rgba(15, 10, 24, 0.22);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  overflow: hidden auto;
  scrollbar-width: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-9px) scale(0.975);
  transform-origin: top right;
  transition:
    opacity 170ms ease,
    transform 200ms cubic-bezier(.2,.8,.2,1),
    visibility 170ms ease;
}

.topbar-popover::-webkit-scrollbar {
  display: none;
}

.topbar-popover.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.phone-shell.topbar-scrolled .topbar-popover {
  top: 118px;
}

html[data-theme="dark"] .topbar-popover {
  box-shadow: 0 24px 76px rgba(0, 0, 0, 0.48);
}

.popover-accent {
  position: absolute;
  width: 130px;
  height: 130px;
  right: -50px;
  top: -60px;
  border-radius: 50%;
  filter: blur(55px);
  pointer-events: none;
}

.popover-accent-purple {
  background: color-mix(in srgb, var(--purple) 45%, transparent);
}

.popover-accent-red {
  background: rgba(251, 52, 87, 0.22);
}

.topbar-popover-header {
  position: relative;
  z-index: 1;
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-popover-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--purple);
  font-size: 9px;
  line-height: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.topbar-popover h2 {
  margin: 0;
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
}

.popover-header-action {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.popover-header-action:hover,
.popover-header-action:focus-visible {
  color: var(--purple);
  outline: none;
}

.popover-header-action svg {
  width: 20px;
  height: 20px;
}

.message-list {
  position: relative;
  z-index: 1;
  margin-top: 13px;
  display: grid;
  gap: 5px;
}

.message-entry {
  width: 100%;
  min-height: 64px;
  padding: 8px;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.message-entry:hover,
.message-entry:focus-visible,
.message-entry.unread {
  background: color-mix(in srgb, var(--purple-soft) 44%, var(--surface));
  outline: none;
}

.message-avatar-wrap {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
}

.message-avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 15px;
  object-fit: cover;
}

.message-avatar-wrap i {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--success);
}

.message-entry-copy {
  min-width: 0;
  flex: 1;
}

.message-entry-copy > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.message-entry-copy strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-entry-copy time {
  color: var(--muted);
  font-size: 9px;
  line-height: 13px;
}

.message-entry-copy small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-entry > b {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 8px;
  background: var(--purple);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 9px;
}

.popover-footer-action {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 40px;
  margin-top: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.popover-footer-action:hover,
.popover-footer-action:focus-visible {
  color: var(--purple);
  outline: none;
}

.popover-footer-action svg {
  width: 17px;
  height: 17px;
  transform: rotate(-90deg);
}

.notification-tabs {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  padding: 4px;
  border-radius: 15px;
  background: var(--surface-soft);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.notification-tabs button {
  min-width: 0;
  height: 38px;
  padding: 0 9px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.notification-tabs button.active {
  background: var(--surface);
  color: var(--purple);
  box-shadow: 0 5px 15px rgba(20,22,25,.07);
}

.notification-tabs svg {
  width: 17px;
  height: 17px;
}

.notification-tabs span {
  font-size: 10px;
  font-weight: 700;
}

.notification-tabs b {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--purple) 14%, transparent);
  display: grid;
  place-items: center;
  font-size: 8px;
}

.notification-panel {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  display: grid;
  gap: 5px;
}

.notification-panel:not(.active) {
  display: none;
}

.notification-entry {
  position: relative;
  width: 100%;
  min-height: 70px;
  padding: 9px;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.notification-entry:hover,
.notification-entry:focus-visible,
.notification-entry.unread {
  background: color-mix(in srgb, var(--surface-soft) 78%, transparent);
  outline: none;
}

.notification-entry-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
}

.notification-entry-icon svg {
  width: 21px;
  height: 21px;
}

.notification-entry-icon.purple {
  background: color-mix(in srgb, var(--purple) 14%, transparent);
  color: var(--purple);
}

.notification-entry-icon.gold {
  background: rgba(214, 168, 79, 0.14);
  color: #d6a84f;
}

.notification-entry-icon.green {
  background: rgba(31, 193, 107, 0.14);
  color: var(--success);
}

.notification-entry > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.notification-entry strong,
.notification-entry small,
.notification-entry time {
  display: block;
}

.notification-entry strong {
  font-size: 11px;
  line-height: 15px;
}

.notification-entry small {
  margin-top: 3px;
  color: var(--text);
  font-size: 10px;
  line-height: 14px;
}

.notification-entry time {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 13px;
}

.notification-entry > i {
  position: absolute;
  right: 11px;
  top: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple);
}

.friend-request {
  padding: 10px;
  border-radius: 18px;
  background: var(--surface-soft);
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 9px 11px;
}

.friend-request > img {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  object-fit: cover;
}

.friend-request > div:nth-child(2) {
  min-width: 0;
}

.friend-request strong,
.friend-request span,
.friend-request small {
  display: block;
}

.friend-request strong {
  font-size: 12px;
  line-height: 17px;
}

.friend-request span,
.friend-request small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 13px;
}

.friend-request-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.friend-request-actions button {
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.friend-request-actions button.accept {
  background: var(--purple);
  color: #fff;
}

.friend-request.resolved {
  opacity: .55;
}

.user-popover {
  width: min(300px, calc(100% - 20px));
}

.user-popover-profile {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-popover-profile > img {
  width: 56px;
  height: 56px;
  border: 3px solid color-mix(in srgb, var(--purple) 22%, var(--surface));
  border-radius: 18px;
  object-fit: cover;
}

.user-online-label {
  color: var(--success);
  font-size: 8px;
  line-height: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.user-online-label i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 50%;
  background: currentColor;
}

.user-popover-profile h2 {
  margin-top: 2px;
}

.user-popover-profile p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 13px;
}

.user-stats {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  padding: 10px;
  border-radius: 15px;
  background: var(--surface-soft);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.user-stats span {
  text-align: center;
}

.user-stats span + span {
  border-left: 1px solid var(--line);
}

.user-stats strong,
.user-stats small {
  display: block;
}

.user-stats strong {
  font-size: 13px;
  line-height: 18px;
}

.user-stats small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 8px;
  line-height: 11px;
}

.user-menu-links {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  display: grid;
  gap: 3px;
}

.user-menu-links > button {
  width: 100%;
  min-height: 52px;
  padding: 7px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
}

.user-menu-links > button:hover,
.user-menu-links > button:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.user-menu-links > button > span {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
  flex: 0 0 36px;
}

.user-menu-links > button > span svg {
  width: 19px;
  height: 19px;
}

.user-menu-links > button > div {
  min-width: 0;
  flex: 1;
}

.user-menu-links strong,
.user-menu-links small {
  display: block;
}

.user-menu-links strong {
  font-size: 11px;
  line-height: 15px;
}

.user-menu-links small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  line-height: 11px;
}

.user-menu-links > button > svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  transform: rotate(-90deg);
}

.user-theme-row {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  padding: 9px;
  border-radius: 14px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  gap: 9px;
}

.user-theme-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--purple);
  display: grid;
  place-items: center;
}

.user-theme-icon svg {
  width: 18px;
  height: 18px;
}

.user-theme-row > div {
  min-width: 0;
  flex: 1;
}

.user-theme-row strong,
.user-theme-row small {
  display: block;
}

.user-theme-row strong {
  font-size: 10px;
  line-height: 14px;
}

.user-theme-row small {
  color: var(--muted);
  font-size: 8px;
  line-height: 11px;
}

.user-theme-toggle {
  position: relative;
  width: 42px;
  height: 25px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: var(--line);
  cursor: pointer;
}

.user-theme-toggle i {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 2px 7px rgba(0,0,0,.15);
  transition: left 160ms ease;
}

.user-theme-toggle[aria-checked="true"] {
  background: var(--purple);
}

.user-theme-toggle[aria-checked="true"] i {
  left: 20px;
}

.user-logout {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 39px;
  margin-top: 9px;
  border: 0;
  border-radius: 13px;
  background: rgba(251, 52, 87, 0.1);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.user-logout svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 359px) {
  .topbar-actions {
    gap: 2px;
    width: 166px;
  }

  .topbar-popover {
    right: 6px;
    width: calc(100% - 12px);
    padding: 14px;
  }
}


/* ================================================================
   HNT.ROCKS header logo and post spacing
   ================================================================ */

.brand-hnt {
  width: 44px;
  height: 44px;
  padding: 5px;
  border-radius: 14px;
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--purple) 78%, #ffffff 22%),
      var(--purple)
    );
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow:
    0 8px 20px color-mix(in srgb, var(--purple) 24%, transparent),
    inset 0 1px 0 rgba(255,255,255,.18);
}

.brand-hnt::before {
  display: none;
}

.brand-hnt img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.18));
}

.post-list {
  gap: 10px;
}

@media (max-width: 359px) {
  .brand-hnt {
    width: 42px;
    height: 42px;
  }
}


/* ================================================================
   Clean HNT.ROCKS logo treatment
   ================================================================ */

.brand-hnt {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.brand-hnt img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.22));
}

@media (max-width: 359px) {
  .brand-hnt,
  .brand-hnt img {
    width: 42px;
    height: 42px;
  }
}

/* ================================================================
   Post share sheet
   ================================================================ */

.share-sheet {
  min-height: 420px;
}

.share-preview {
  margin-top: 16px;
  padding: 10px;
  border-radius: 18px;
  background: var(--surface-soft);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.share-preview > img {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
  flex: 0 0 52px;
}

.share-preview > div {
  min-width: 0;
  flex: 1;
}

.share-preview strong,
.share-preview small,
.share-preview p {
  display: block;
}

.share-preview strong {
  font-size: 13px;
  line-height: 18px;
}

.share-preview small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 14px;
}

.share-preview p {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 11px;
  line-height: 1.45;
}

.share-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.share-grid button {
  min-height: 112px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background-color 160ms ease;
}

.share-grid button:hover,
.share-grid button:focus-visible {
  border-color: color-mix(in srgb, var(--purple) 55%, var(--line));
  background: color-mix(in srgb, var(--purple-soft) 52%, var(--surface));
  transform: translateY(-1px);
  outline: none;
}

.share-option-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
  flex: 0 0 42px;
}

.share-option-icon svg {
  width: 22px;
  height: 22px;
}

.share-grid strong,
.share-grid small {
  display: block;
}

.share-grid strong {
  font-size: 12px;
  line-height: 17px;
}

.share-grid small {
  color: var(--muted);
  font-size: 9px;
  line-height: 13px;
}

@media (max-width: 359px) {
  .share-grid {
    gap: 8px;
  }

  .share-grid button {
    min-height: 104px;
    padding: 10px;
  }
}


/* ================================================================
   Version 12: centered share dialog matching the supplied reference
   ================================================================ */

.share-backdrop {
  z-index: 82;
  background: rgba(7, 6, 11, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.share-dialog {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 50%;
  z-index: 84;
  max-height: calc(100% - 28px);
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(7, 5, 13, 0.38);
  overflow: hidden auto;
  scrollbar-width: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-47%) scale(0.97);
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(.2,.8,.2,1),
    visibility 180ms ease;
}

.share-dialog::-webkit-scrollbar {
  display: none;
}

.share-dialog.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.share-dialog-header {
  min-height: 76px;
  padding: 17px 18px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.share-dialog-header h2 {
  margin: 0;
  font-size: 17px;
  line-height: 23px;
  font-weight: 700;
}

.share-dialog-header span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
}

.share-dialog-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.share-dialog-close:hover,
.share-dialog-close:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.share-dialog-close svg {
  width: 18px;
  height: 18px;
}

.share-dialog-body {
  padding: 16px 18px 18px;
}

#shareComment {
  width: 100%;
  height: 96px;
  padding: 10px 11px;
  border: 0;
  resize: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

#shareComment::placeholder {
  color: var(--muted);
}

.share-divider {
  height: 1px;
  margin: 0 0 14px;
  background: var(--line);
}

.share-post-preview {
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
  border-radius: 21px;
  background: color-mix(in srgb, var(--surface-soft) 58%, var(--surface));
}

.share-post-preview header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-post-preview header img {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  object-fit: cover;
  flex: 0 0 42px;
}

.share-post-preview header > div {
  min-width: 0;
  flex: 1;
}

.share-post-preview strong,
.share-post-preview span {
  display: block;
}

.share-post-preview strong {
  font-size: 13px;
  line-height: 18px;
}

.share-post-preview span {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-post-preview p {
  margin: 13px 0 0;
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.share-feed-primary {
  width: 100%;
  height: 48px;
  margin-top: 14px;
  border: 0;
  border-radius: 16px;
  background: var(--purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--purple) 24%, transparent);
}

.share-feed-primary:hover,
.share-feed-primary:focus-visible {
  filter: brightness(1.06);
  outline: none;
}

.share-feed-primary svg {
  width: 20px;
  height: 20px;
}

.share-secondary-actions {
  margin-top: 9px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.share-secondary-actions button,
.share-message-action {
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.share-secondary-actions button:hover,
.share-secondary-actions button:focus-visible,
.share-message-action:hover,
.share-message-action:focus-visible {
  color: var(--purple);
  outline: none;
}

.share-message-action {
  width: 100%;
  margin-top: 1px;
  color: var(--muted);
}

@media (max-height: 690px) {
  .share-dialog {
    top: 12px;
    bottom: 12px;
    transform: translateY(8px) scale(0.97);
  }

  .share-dialog.open {
    transform: translateY(0) scale(1);
  }

  #shareComment {
    height: 72px;
  }
}

/* ================================================================
   Version 13: light-mode logo contrast and accent colour switcher
   ================================================================ */

/* The supplied logo artwork is white. Render it dark in light mode
   and white in dark mode instead of letting it wash out against the header. */
.brand-hnt {
  z-index: 2;
  isolation: isolate;
  opacity: 1;
}

.brand-hnt img {
  opacity: 1;
  mix-blend-mode: normal;
}

html[data-theme="light"] .brand-hnt img {
  filter:
    brightness(0)
    saturate(100%)
    opacity(.9)
    drop-shadow(0 2px 3px rgba(20,22,25,.18));
}

html[data-theme="dark"] .brand-hnt img {
  filter:
    brightness(0)
    invert(1)
    opacity(.96)
    drop-shadow(0 2px 4px rgba(0,0,0,.34));
}

/* Accent palettes. Existing theme components already consume the
   --purple, --purple-soft and --deep-purple variables. */
html[data-accent="hnt"] {
  --purple: #c89432;
  --purple-soft: #f1e3c7;
  --deep-purple: #765016;
}

html[data-theme="dark"][data-accent="hnt"] {
  --purple: #d6a84f;
  --purple-soft: #3b3020;
  --deep-purple: #9a7129;
}

html[data-accent="purple"] {
  --purple: #7949dd;
  --purple-soft: #ded3f7;
  --deep-purple: #220e4c;
}

html[data-theme="dark"][data-accent="purple"] {
  --purple: #9a72f0;
  --purple-soft: #382d55;
  --deep-purple: #7250d8;
}

html[data-accent="blue"] {
  --purple: #00aee6;
  --purple-soft: #d6f4fc;
  --deep-purple: #073e54;
}

html[data-theme="dark"][data-accent="blue"] {
  --purple: #21c4f3;
  --purple-soft: #173945;
  --deep-purple: #087b9d;
}

html[data-accent="green"] {
  --purple: #65bd36;
  --purple-soft: #e0f3d5;
  --deep-purple: #234b16;
}

html[data-theme="dark"][data-accent="green"] {
  --purple: #79d64a;
  --purple-soft: #293f25;
  --deep-purple: #4b9c2d;
}

html[data-accent="orange"] {
  --purple: #ed8f24;
  --purple-soft: #f8dfc1;
  --deep-purple: #74400d;
}

html[data-theme="dark"][data-accent="orange"] {
  --purple: #ef9a35;
  --purple-soft: #49301d;
  --deep-purple: #a85c18;
}

.accent-picker {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  padding: 10px;
  border-radius: 16px;
  background: var(--surface-soft);
}

.accent-picker > header {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.accent-picker > header strong,
.accent-picker > header small {
  display: block;
}

.accent-picker > header strong {
  font-size: 10px;
  line-height: 14px;
}

.accent-picker > header small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 8px;
  line-height: 11px;
}

.accent-current-dot {
  width: 24px;
  height: 24px;
  border: 5px solid color-mix(in srgb, var(--purple) 18%, transparent);
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 5px 12px color-mix(in srgb, var(--purple) 22%, transparent);
}

.accent-options {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.accent-options button {
  min-width: 0;
  height: 38px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.accent-options button:hover,
.accent-options button:focus-visible {
  border-color: color-mix(in srgb, var(--purple) 45%, var(--line));
  outline: none;
}

.accent-options button.active {
  border-color: color-mix(in srgb, var(--purple) 54%, var(--line));
  background: color-mix(in srgb, var(--purple-soft) 55%, var(--surface));
}

.accent-swatch {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 7px;
  flex: 0 0 18px;
  background: transparent;
}

.accent-swatch.hnt {
  color: #d6a84f;
}

.accent-swatch.purple {
  color: #a729bd;
}

.accent-swatch.blue {
  color: #00b8e8;
}

.accent-swatch.green {
  color: #64c238;
}

.accent-swatch.orange {
  color: #f6a01b;
}

.accent-options span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accent-options b {
  width: 16px;
  height: 16px;
  border-radius: 6px;
  background: var(--purple);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 8px;
  opacity: 0;
  transform: scale(.8);
  transition: opacity 140ms ease, transform 140ms ease;
}

.accent-options button.active b {
  opacity: 1;
  transform: scale(1);
}

/* Give the expanded user popover enough usable space without growing
   outside the mobile viewport. */
.user-popover {
  max-height: min(650px, calc(100% - 126px));
}


/* ================================================================
   Version 14: original HNT.ROCKS logo without visual manipulation
   ================================================================ */

.brand-hnt {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  opacity: 1;
  isolation: auto;
}

.brand-hnt img,
html[data-theme="light"] .brand-hnt img,
html[data-theme="dark"] .brand-hnt img {
  width: 44px;
  height: 44px;
  display: block;
  object-fit: contain;
  opacity: 1;
  filter: none;
  mix-blend-mode: normal;
  transform: none;
}

@media (max-width: 359px) {
  .brand-hnt,
  .brand-hnt img,
  html[data-theme="light"] .brand-hnt img,
  html[data-theme="dark"] .brand-hnt img {
    width: 42px;
    height: 42px;
  }
}


/* ================================================================
   Version 15: crisp original logo asset
   ================================================================ */

.brand-hnt {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  opacity: 1;
  isolation: auto;
}

.brand-hnt img,
html[data-theme="light"] .brand-hnt img,
html[data-theme="dark"] .brand-hnt img {
  width: 44px;
  height: 44px;
  display: block;
  object-fit: contain;
  opacity: 1;
  filter: none;
  mix-blend-mode: normal;
  image-rendering: auto;
}

@media (max-width: 359px) {
  .brand-hnt,
  .brand-hnt img,
  html[data-theme="light"] .brand-hnt img,
  html[data-theme="dark"] .brand-hnt img {
    width: 42px;
    height: 42px;
  }
}


/* ================================================================
   Version 16: true original logo file, unchanged
   ================================================================ */

.brand-hnt {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  opacity: 1;
}

.brand-hnt img,
html[data-theme="light"] .brand-hnt img,
html[data-theme="dark"] .brand-hnt img {
  width: 44px;
  height: 44px;
  display: block;
  object-fit: contain;
  opacity: 1;
  filter: none;
  mix-blend-mode: normal;
  transform: none;
  image-rendering: auto;
}

@media (max-width: 359px) {
  .brand-hnt,
  .brand-hnt img,
  html[data-theme="light"] .brand-hnt img,
  html[data-theme="dark"] .brand-hnt img {
    width: 42px;
    height: 42px;
  }
}


/* ================================================================
   Version 17: original logo displayed larger again
   ================================================================ */

.brand-hnt {
  width: 72px;
  height: 72px;
}

.brand-hnt img,
html[data-theme="light"] .brand-hnt img,
html[data-theme="dark"] .brand-hnt img {
  width: 72px;
  height: 72px;
}

@media (max-width: 359px) {
  .brand-hnt,
  .brand-hnt img,
  html[data-theme="light"] .brand-hnt img,
  html[data-theme="dark"] .brand-hnt img {
    width: 66px;
    height: 66px;
  }
}

/* ================================================================
   Version 43: HNT.ROCKS project-style search modal
   ================================================================ */

.search-overlay-backdrop {
  position: absolute;
  inset: 0;
  z-index: 150;
  background: rgba(7, 7, 6, .7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.search-overlay-backdrop[hidden] {
  display: none;
}

.search-overlay {
  position: absolute;
  inset: 10px;
  z-index: 152;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .46);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(.975);
  transition:
    opacity 190ms ease,
    transform 240ms cubic-bezier(.2,.8,.2,1),
    visibility 190ms ease;
}

.search-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.search-project-header {
  position: relative;
  min-height: 116px;
  padding: 17px 58px 16px 17px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  overflow: hidden;
}

.search-project-heading {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.search-project-kicker,
.search-section-kicker {
  display: block;
  color: var(--purple);
  font-size: 7px;
  line-height: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.search-project-heading h2 {
  max-width: 230px;
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.13;
  letter-spacing: -.35px;
}

.search-project-heading p {
  max-width: 245px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.search-project-header-actions {
  position: absolute;
  z-index: 3;
  right: 13px;
  top: 13px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.search-project-art {
  position: relative;
  width: 80px;
  height: 72px;
  opacity: .82;
  pointer-events: none;
}

.search-art-card {
  position: absolute;
  width: 36px;
  height: 36px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-soft) 84%, transparent);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
  display: grid;
  place-items: center;
}

.search-art-card svg {
  width: 18px;
  height: 18px;
}

.search-art-card-one {
  left: 1px;
  top: 24px;
  transform: rotate(-8deg);
}

.search-art-card-two {
  left: 28px;
  top: 5px;
  transform: rotate(7deg);
}

.search-art-card-three {
  right: 0;
  top: 29px;
  transform: rotate(-5deg);
}

.search-overlay-close {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.search-overlay-close:hover,
.search-overlay-close:focus-visible {
  color: var(--purple);
  outline: none;
}

.search-overlay-close svg {
  width: 18px;
  height: 18px;
}

.search-project-divider {
  height: 1px;
  margin: 0 17px;
  background: var(--line);
}

.search-project-toolbar {
  min-height: 66px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-filter-strip {
  min-width: 0;
  flex: 1;
  height: 46px;
  padding: 4px;
  border-radius: 10px;
  background: var(--surface-soft);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
}

.search-filter-strip button {
  min-width: 0;
  height: 38px;
  padding: 0 5px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

.search-filter-strip button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}

.search-filter-strip button.active svg {
  color: var(--purple);
}

.search-filter-strip svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.search-filter-strip span {
  overflow: hidden;
  font-size: 7px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-filter-settings {
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 46px;
}

.search-filter-settings:hover,
.search-filter-settings:focus-visible {
  border-color: color-mix(in srgb, var(--purple) 48%, var(--line));
  color: var(--purple);
  outline: none;
}

.search-filter-settings svg {
  width: 20px;
  height: 20px;
}

.search-overlay-scroll {
  position: relative;
  height: calc(100% - 183px);
  padding: 0 14px 24px;
  overflow-y: auto;
  scrollbar-width: none;
}

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

.search-query-stage {
  position: relative;
  min-height: 176px;
  padding: 15px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(
      135deg,
      transparent 0,
      transparent 34%,
      color-mix(in srgb, var(--surface-soft) 64%, transparent) 34%,
      color-mix(in srgb, var(--surface-soft) 64%, transparent) 50%,
      transparent 50%,
      transparent 84%,
      color-mix(in srgb, var(--surface-soft) 64%, transparent) 84%
    ),
    color-mix(in srgb, var(--surface) 88%, var(--surface-soft));
  background-size: 40px 40px;
}

.search-query-stage::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  right: -44px;
  top: -48px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--purple) 15%, transparent);
  filter: blur(34px);
  pointer-events: none;
}

.search-query-heading,
.search-input-shell,
.search-suggestion-row {
  position: relative;
  z-index: 2;
}

.search-query-heading span,
.search-query-heading strong,
.search-query-heading small {
  display: block;
}

.search-query-heading span {
  color: var(--purple);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.search-query-heading strong {
  margin-top: 3px;
  font-size: 14px;
  line-height: 19px;
}

.search-query-heading small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
  line-height: 10px;
}

.search-input-shell {
  height: 48px;
  margin-top: 12px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
}

.search-input-shell > svg {
  width: 20px;
  height: 20px;
  color: var(--purple);
  flex: 0 0 20px;
}

.search-input-shell input {
  min-width: 0;
  flex: 1;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 10px;
}

.search-input-shell input::placeholder {
  color: var(--muted);
}

.search-input-shell button {
  width: 29px;
  height: 29px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.search-input-shell button svg {
  width: 14px;
  height: 14px;
}

.search-suggestion-row {
  margin-top: 9px;
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.search-suggestion-row::-webkit-scrollbar {
  display: none;
}

.search-suggestion-row button {
  min-width: max-content;
  height: 29px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.search-suggestion-row button:hover,
.search-suggestion-row button:focus-visible {
  border-color: color-mix(in srgb, var(--purple) 45%, var(--line));
  color: var(--purple);
  outline: none;
}

.search-suggestion-row svg {
  width: 13px;
  height: 13px;
}

.search-suggestion-row span {
  font-size: 7px;
  font-weight: 700;
}

.search-section + .search-section,
.advanced-search-panel + .search-section,
.search-query-stage + .advanced-search-panel {
  margin-top: 18px;
}

.search-section-heading {
  min-height: 37px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.search-section-heading h2,
.advanced-search-panel h2 {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 19px;
}

.search-section-heading > button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  cursor: pointer;
}

.search-section-heading > button:hover,
.search-section-heading > button:focus-visible {
  color: var(--purple);
  outline: none;
}

.search-result-list {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.search-result-card {
  width: 100%;
  min-height: 62px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
}

.search-result-card:hover,
.search-result-card:focus-visible {
  border-color: color-mix(in srgb, var(--purple) 42%, var(--line));
  background: color-mix(in srgb, var(--purple-soft) 35%, var(--surface));
  outline: none;
}

.search-result-icon,
.search-category-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.search-result-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.search-result-icon svg,
.search-category-icon svg {
  width: 21px;
  height: 21px;
}

.search-result-icon.purple,
.search-category-icon.purple {
  background: color-mix(in srgb, var(--purple) 13%, transparent);
  color: var(--purple);
}

.search-result-icon.cyan,
.search-category-icon.cyan {
  background: rgba(0, 174, 230, .13);
  color: #00aee6;
}

.search-result-icon.orange,
.search-category-icon.orange {
  background: rgba(239, 154, 53, .13);
  color: #ef9a35;
}

.search-result-icon.green,
.search-category-icon.green {
  background: rgba(120, 160, 92, .13);
  color: #78a05c;
}

.search-result-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 42px;
}

.search-result-copy {
  min-width: 0;
  flex: 1;
}

.search-result-copy strong,
.search-result-copy small {
  display: block;
}

.search-result-copy strong {
  overflow: hidden;
  font-size: 10px;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-copy small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  line-height: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-badge {
  min-width: 40px;
  height: 25px;
  padding: 0 7px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 6px;
  font-weight: 800;
}

.search-result-badge.active {
  background: rgba(0, 174, 230, .12);
  color: #00aee6;
}

.search-result-badge.live {
  background: color-mix(in srgb, var(--purple) 12%, transparent);
  color: var(--purple);
}

.search-result-badge.online {
  background: rgba(31, 193, 107, .12);
  color: var(--success);
}

.search-category-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.search-category-grid button {
  min-height: 91px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  cursor: pointer;
}

.search-category-grid button:hover,
.search-category-grid button:focus-visible {
  border-color: color-mix(in srgb, var(--purple) 44%, var(--line));
  background: color-mix(in srgb, var(--purple-soft) 24%, var(--surface));
  outline: none;
}

.search-category-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.search-category-grid strong,
.search-category-grid small {
  display: block;
}

.search-category-grid strong {
  margin-top: 8px;
  font-size: 9px;
  line-height: 13px;
}

.search-category-grid small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
  line-height: 10px;
}

.search-user-list {
  margin-top: 8px;
  padding: 5px;
  border-radius: 8px;
  background: var(--surface);
  display: grid;
  gap: 2px;
}

.search-user-list button {
  width: 100%;
  min-height: 57px;
  padding: 7px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
}

.search-user-list button:hover,
.search-user-list button:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.search-user-list img {
  width: 41px;
  height: 41px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 41px;
}

.search-user-list span {
  min-width: 0;
  flex: 1;
}

.search-user-list strong,
.search-user-list small {
  display: block;
}

.search-user-list strong {
  font-size: 10px;
  line-height: 14px;
}

.search-user-list small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  line-height: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-user-list em {
  color: var(--purple);
  font-size: 6px;
  font-style: normal;
  font-weight: 800;
}

.search-no-results {
  min-height: 205px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.search-no-results[hidden] {
  display: none;
}

.search-no-results > span {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
}

.search-no-results svg {
  width: 25px;
  height: 25px;
}

.search-no-results strong,
.search-no-results small {
  display: block;
}

.search-no-results strong {
  margin-top: 11px;
  font-size: 12px;
}

.search-no-results small {
  max-width: 225px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  line-height: 12px;
}

.advanced-search-panel {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.advanced-search-panel[hidden] {
  display: none;
}

.advanced-search-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.advanced-search-panel > header button {
  width: 31px;
  height: 31px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.advanced-search-panel > header svg {
  width: 15px;
  height: 15px;
}

.advanced-search-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.advanced-search-grid label {
  display: grid;
  gap: 5px;
}

.advanced-search-grid label > span {
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
}

.advanced-search-grid select {
  width: 100%;
  height: 37px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 8px;
  outline: none;
}

.advanced-search-apply {
  width: 100%;
  height: 39px;
  margin-top: 9px;
  border: 0;
  border-radius: 8px;
  background: var(--purple);
  color: #15130f;
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

.search-hidden-by-filter {
  display: none !important;
}

html[data-theme="dark"] .search-overlay {
  background: #20201e;
}

html[data-theme="dark"] .search-project-toolbar,
html[data-theme="dark"] .search-project-header {
  background: #20201e;
}

html[data-theme="dark"] .search-query-stage {
  border-color: #343025;
}

@media (max-width: 359px) {
  .search-overlay {
    inset: 6px;
  }

  .search-project-header {
    min-height: 108px;
    padding-right: 48px;
    padding-left: 14px;
  }

  .search-project-heading h2 {
    max-width: 205px;
    font-size: 18px;
  }

  .search-project-heading p {
    max-width: 205px;
  }

  .search-project-art {
    display: none;
  }

  .search-project-toolbar {
    padding-right: 10px;
    padding-left: 10px;
  }

  .search-filter-strip span {
    display: none;
  }

  .search-filter-strip svg {
    width: 18px;
    height: 18px;
  }

  .search-overlay-scroll {
    height: calc(100% - 175px);
    padding-right: 10px;
    padding-left: 10px;
  }

  .search-category-grid,
  .advanced-search-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   Version 19: grouped HNT.ROCKS navigation
   ================================================================ */

.side-menu-grouped {
  padding: 17px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.grouped-menu-header {
  flex: 0 0 auto;
}

.grouped-menu-brand {
  min-width: 0;
}

.grouped-menu-logo {
  width: 58px;
  height: 58px;
  margin: -7px -4px -7px -6px;
  display: block;
  object-fit: contain;
  flex: 0 0 58px;
  opacity: 1;
  filter: none;
  mix-blend-mode: normal;
}

.grouped-menu-brand strong {
  font-size: 16px;
  line-height: 21px;
}

.grouped-menu-brand small {
  margin-top: 1px;
  font-size: 9px;
  line-height: 13px;
}

.grouped-profile-card {
  flex: 0 0 auto;
  margin-top: 15px;
  padding: 10px;
}

.grouped-profile-card > img {
  width: 44px;
  height: 44px;
}

.grouped-menu-scroll {
  min-height: 0;
  flex: 1 1 auto;
  margin: 14px -5px 11px 0;
  padding-right: 5px;
  overflow-y: auto;
  scrollbar-width: none;
}

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

.grouped-menu-section + .grouped-menu-section {
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.grouped-menu-section > header {
  min-height: 22px;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.grouped-menu-section > header > span {
  width: 24px;
  height: 18px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--purple) 13%, transparent);
  color: var(--purple);
  display: grid;
  place-items: center;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .05em;
}

.grouped-menu-section h2 {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 13px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.grouped-menu-section nav {
  display: grid;
  gap: 4px;
}

.grouped-menu-item {
  width: 100%;
  min-height: 50px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
}

.grouped-menu-item:hover,
.grouped-menu-item:focus-visible {
  border-color: color-mix(in srgb, var(--purple) 38%, var(--line));
  background: var(--surface-soft);
  outline: none;
}

.grouped-menu-item.active {
  border-color: color-mix(in srgb, var(--purple) 22%, transparent);
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--purple-soft) 72%, var(--surface)) 0%,
      color-mix(in srgb, var(--purple-soft) 34%, transparent) 100%
    );
}

.grouped-menu-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--purple);
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  box-shadow: 0 4px 12px rgba(20,22,25,.06);
}

.grouped-menu-item.active .grouped-menu-icon {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 7px 18px color-mix(in srgb, var(--purple) 25%, transparent);
}

.grouped-menu-icon svg {
  width: 20px;
  height: 20px;
}

.grouped-menu-copy {
  min-width: 0;
  flex: 1;
}

.grouped-menu-copy strong,
.grouped-menu-copy small {
  display: block;
}

.grouped-menu-copy strong {
  font-size: 11px;
  line-height: 15px;
}

.grouped-menu-copy small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  line-height: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grouped-menu-item > em,
.grouped-menu-item > b {
  min-width: 25px;
  height: 25px;
  padding: 0 7px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.grouped-menu-item > em {
  background: var(--purple);
  color: #fff;
}

.grouped-menu-item > b {
  background: rgba(214,168,79,.14);
  color: #d6a84f;
}

.grouped-menu-footer {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  flex: 0 0 auto;
  margin-top: auto;
}

@media (max-height: 760px) {
  .grouped-profile-card {
    margin-top: 10px;
  }

  .grouped-menu-scroll {
    margin-top: 10px;
  }

  .grouped-menu-section + .grouped-menu-section {
    margin-top: 13px;
    padding-top: 12px;
  }

  .grouped-menu-item {
    min-height: 46px;
  }

  .grouped-menu-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }
}

/* ================================================================
   Version 20: rich post composer
   ================================================================ */

.composer-modal-rich {
  left: 10px;
  right: 10px;
  width: auto;
  max-height: calc(100% - 20px);
  min-height: 500px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 25px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.composer-rich-header {
  position: relative;
  z-index: 4;
  min-height: 76px;
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.composer-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.composer-identity > img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  flex: 0 0 44px;
}

.composer-identity > div {
  min-width: 0;
}

.composer-identity h2 {
  margin: 0;
  font-size: 15px;
  line-height: 20px;
}

.composer-visibility-trigger {
  height: 25px;
  margin-top: 3px;
  padding: 0 7px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.composer-visibility-trigger:hover,
.composer-visibility-trigger:focus-visible {
  color: var(--purple);
  outline: none;
}

.composer-visibility-trigger svg {
  width: 14px;
  height: 14px;
}

.composer-visibility-trigger span {
  font-size: 9px;
  font-weight: 700;
}

.composer-rich-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.composer-rich-close svg {
  width: 18px;
  height: 18px;
}

.composer-rich-body {
  min-height: 0;
  flex: 1;
  padding: 12px 15px 5px;
  overflow-y: auto;
  scrollbar-width: none;
}

.composer-rich-body::-webkit-scrollbar {
  display: none;
}

.composer-modal-rich #composerText {
  width: 100%;
  height: 150px;
  min-height: 150px;
  margin: 0;
  padding: 11px 2px;
  border: 0;
  resize: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  outline: none;
}

.composer-modal-rich #composerText::placeholder {
  color: var(--muted);
}

.composer-feeling-pill {
  width: max-content;
  max-width: 100%;
  min-height: 34px;
  margin-bottom: 10px;
  padding: 5px 6px 5px 10px;
  border: 1px solid color-mix(in srgb, var(--purple) 28%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--purple-soft) 38%, var(--surface));
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}

.composer-feeling-pill > span:first-child {
  font-size: 17px;
}

.composer-feeling-pill > span:nth-child(2) {
  font-size: 9px;
}

.composer-feeling-pill button,
.composer-media-meta button,
.composer-poll header button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.composer-feeling-pill button svg,
.composer-media-meta button svg,
.composer-poll header button svg {
  width: 14px;
  height: 14px;
}

.composer-media-preview {
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.composer-media-frame {
  position: relative;
  width: 100%;
  max-height: 190px;
  border-radius: 12px;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface) 80%, var(--line));
}

.composer-media-frame img,
.composer-media-frame video {
  width: 100%;
  max-height: 190px;
  display: block;
  object-fit: contain;
  background: #08080b;
}

.composer-media-placeholder {
  min-height: 100px;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.composer-media-placeholder svg {
  width: 31px;
  height: 31px;
}

.composer-media-meta {
  min-height: 38px;
  margin-top: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.composer-media-meta > div {
  min-width: 0;
  flex: 1;
}

.composer-media-meta strong,
.composer-media-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-media-meta strong {
  font-size: 10px;
}

.composer-media-meta small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.composer-poll {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--purple) 24%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--purple-soft) 20%, var(--surface));
}

.composer-poll > header {
  min-height: 35px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.composer-poll > header strong,
.composer-poll > header span {
  display: block;
}

.composer-poll > header strong {
  font-size: 11px;
}

.composer-poll > header span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.composer-poll-options {
  margin-top: 8px;
  display: grid;
  gap: 7px;
}

.composer-poll-options label {
  height: 40px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 8px;
}

.composer-poll-options label > span {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
  font-size: 8px;
  font-weight: 800;
}

.composer-poll-options input {
  min-width: 0;
  flex: 1;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 10px;
}

.composer-poll-footer {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.composer-poll-footer > button,
.composer-poll-footer > label {
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.composer-poll-footer > button {
  cursor: pointer;
}

.composer-poll-footer svg {
  width: 14px;
  height: 14px;
}

.composer-poll-footer span,
.composer-poll-footer select {
  font-size: 8px;
  font-weight: 700;
}

.composer-poll-footer select {
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
}

.composer-rich-footer {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  padding: 10px 15px 14px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
}

.composer-add-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.composer-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.composer-toolbar button {
  min-width: 0;
  height: 48px;
  padding: 5px 3px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
}

.composer-toolbar button:hover,
.composer-toolbar button:focus-visible,
.composer-toolbar button.active {
  border-color: color-mix(in srgb, var(--purple) 46%, var(--line));
  background: color-mix(in srgb, var(--purple-soft) 48%, var(--surface));
  color: var(--purple);
  outline: none;
}

.composer-toolbar svg {
  width: 19px;
  height: 19px;
}

.composer-toolbar span {
  font-size: 8px;
  font-weight: 700;
}

.composer-publish-button {
  height: 44px;
  margin-top: 10px;
  border-radius: 13px;
  font-size: 11px;
}

.composer-flyout {
  position: absolute;
  z-index: 8;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(8, 6, 14, .26);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(.98);
  transition: opacity 150ms ease, transform 170ms ease, visibility 150ms ease;
}

.composer-flyout.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.composer-visibility-menu {
  left: 15px;
  top: 67px;
  width: calc(100% - 30px);
}

.composer-visibility-menu > button {
  width: 100%;
  min-height: 53px;
  padding: 7px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
}

.composer-visibility-menu > button:hover,
.composer-visibility-menu > button.active {
  background: var(--surface-soft);
}

.composer-visibility-menu > button > span {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--purple) 12%, transparent);
  color: var(--purple);
  display: grid;
  place-items: center;
  flex: 0 0 36px;
}

.composer-visibility-menu > button > span svg {
  width: 19px;
  height: 19px;
}

.composer-visibility-menu > button > div {
  min-width: 0;
  flex: 1;
}

.composer-visibility-menu strong,
.composer-visibility-menu small {
  display: block;
}

.composer-visibility-menu strong {
  font-size: 10px;
}

.composer-visibility-menu small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  line-height: 11px;
}

.composer-visibility-menu b {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  background: var(--purple);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 8px;
  opacity: 0;
}

.composer-visibility-menu button.active b {
  opacity: 1;
}

.composer-feeling-menu {
  left: 15px;
  right: 15px;
  bottom: 130px;
}

.composer-feeling-menu > header {
  padding: 5px 6px 9px;
}

.composer-feeling-menu > header strong,
.composer-feeling-menu > header small {
  display: block;
}

.composer-feeling-menu > header strong {
  font-size: 11px;
}

.composer-feeling-menu > header small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.composer-feeling-menu > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.composer-feeling-menu button {
  height: 39px;
  padding: 0 9px;
  border: 0;
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.composer-feeling-menu button:hover,
.composer-feeling-menu button:focus-visible {
  background: color-mix(in srgb, var(--purple-soft) 50%, var(--surface));
  outline: none;
}

.composer-feeling-menu button span {
  font-size: 17px;
}

@media (max-height: 700px) {
  .composer-modal-rich {
    top: 8px;
    bottom: 8px;
    max-height: none;
    min-height: 0;
    transform: translateY(8px) scale(.96);
  }

  .composer-modal-rich.open {
    transform: translateY(0) scale(1);
  }

  .composer-modal-rich #composerText {
    height: 112px;
    min-height: 112px;
  }
}


/* ================================================================
   Version 21: composer visibility row + lower comments composer
   ================================================================ */

.composer-title-block {
  min-width: 0;
}

.composer-title-block h2 {
  margin-bottom: 8px;
}

.composer-visibility-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.composer-visibility-row button {
  min-width: 0;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.composer-visibility-row button:hover,
.composer-visibility-row button:focus-visible,
.composer-visibility-row button.active {
  border-color: color-mix(in srgb, var(--purple) 46%, var(--line));
  background: color-mix(in srgb, var(--purple-soft) 48%, var(--surface));
  color: var(--purple);
  outline: none;
}

.composer-visibility-row button svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.composer-visibility-row button span {
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.composer-identity {
  align-items: flex-start;
}

.composer-identity > div {
  flex: 1;
}

.composer-rich-header {
  align-items: flex-start;
}

.comments-sheet {
  gap: 0;
}

.comments-list {
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: 14px;
}

.comment-composer {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: 9px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 -8px 18px rgba(9, 7, 14, 0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.comment-composer input {
  height: 40px;
}

.comment-composer button {
  width: 40px;
  height: 40px;
  border-radius: 13px;
}

@media (max-width: 390px) {
  .composer-visibility-row {
    gap: 4px;
  }

  .composer-visibility-row button {
    padding: 0 7px;
  }

  .composer-visibility-row button span {
    font-size: 7px;
  }
}


/* ================================================================
   Version 22: cleaner composer dropdown + borderless modal
   ================================================================ */

.composer-modal-rich {
  border: 0;
  box-shadow: 0 26px 72px rgba(8, 6, 14, .34);
}

.composer-rich-header {
  border-bottom: 0;
}

.composer-rich-footer {
  border-top: 0;
}

.composer-title-block h2 {
  margin-bottom: 7px;
}

.composer-visibility-trigger-modern {
  height: 30px;
  padding: 0 10px;
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--text);
  gap: 6px;
  box-shadow: 0 8px 18px rgba(8, 6, 14, .08);
}

.composer-visibility-trigger-modern:hover,
.composer-visibility-trigger-modern:focus-visible,
.composer-visibility-trigger-modern[aria-expanded="true"] {
  color: var(--purple);
  outline: none;
}

.composer-visibility-trigger-modern svg:first-child {
  color: var(--purple);
}

.composer-visibility-trigger-modern span {
  font-size: 9px;
  color: var(--text);
}

.composer-visibility-trigger-modern svg:last-child {
  width: 12px;
  height: 12px;
  color: var(--muted);
}

.composer-visibility-menu-modern {
  top: 74px;
  left: 69px;
  width: min(250px, calc(100% - 94px));
  border: 0;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  box-shadow: 0 24px 64px rgba(8, 6, 14, .30);
}

.composer-visibility-menu-modern > button {
  min-height: 50px;
  border-radius: 14px;
}

.composer-visibility-menu-modern > button > span {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.composer-visibility-menu-modern strong {
  font-size: 10px;
}

.composer-visibility-menu-modern small {
  font-size: 8px;
  line-height: 11px;
}

.composer-visibility-menu-modern b {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  font-size: 7px;
}

.composer-identity {
  align-items: flex-start;
}

.composer-identity > div {
  flex: 1;
}

.composer-rich-header {
  align-items: flex-start;
}

.composer-rich-body {
  padding-top: 8px;
}

.composer-toolbar button,
.composer-media-preview,
.composer-poll,
.composer-poll-options label,
.composer-poll-footer > button,
.composer-poll-footer > label {
  border-color: transparent;
}

@media (max-width: 390px) {
  .composer-visibility-menu-modern {
    left: 15px;
    width: calc(100% - 30px);
  }
}


/* ================================================================
   Version 23: inline composer visibility trigger
   ================================================================ */

.composer-title-block h2 {
  margin-bottom: 0;
}

.composer-rich-header {
  min-height: 72px;
  padding-bottom: 10px;
}

.composer-rich-body {
  padding-top: 10px;
}

.composer-editor-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.composer-visibility-trigger-inline {
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 16px;
  background: var(--surface-soft);
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  white-space: nowrap;
}

.composer-visibility-trigger-inline svg {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 18px;
}

.composer-visibility-trigger-inline svg:first-child {
  color: var(--purple);
}

.composer-visibility-trigger-inline span {
  display: inline-block;
  margin: 0;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}

.composer-visibility-trigger-inline svg:last-child {
  width: 14px;
  height: 14px;
  color: var(--muted);
  flex: 0 0 14px;
}

.composer-modal-rich #composerText {
  padding-top: 6px;
}

.composer-visibility-menu-modern {
  top: 112px;
  left: auto;
  right: 15px;
  width: min(250px, calc(100% - 30px));
}

@media (max-width: 390px) {
  .composer-editor-topbar {
    margin-bottom: 7px;
  }

  .composer-visibility-trigger-inline {
    height: 37px;
    padding: 0 12px;
    gap: 7px;
  }

  .composer-visibility-trigger-inline span {
    font-size: 9px;
  }
}




/* ================================================================
   Version 42: HNT project-form post composer
   ================================================================ */

.composer-project-modal {
  left: 10px;
  right: 10px;
  width: auto;
  min-height: 0;
  height: min(718px, calc(100% - 20px));
  max-height: calc(100% - 20px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .42);
  display: flex;
  flex-direction: column;
}

.composer-project-header {
  position: relative;
  z-index: 6;
  min-height: 88px;
  padding: 15px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background:
    radial-gradient(circle at 90% 20%, color-mix(in srgb, var(--purple) 10%, transparent), transparent 34%),
    var(--surface);
}

.composer-project-heading {
  min-width: 0;
}

.composer-kicker {
  display: block;
  color: var(--purple);
  font-size: 7px;
  line-height: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.composer-project-heading h2 {
  margin: 3px 0 0;
  font-size: 18px;
  line-height: 23px;
}

.composer-project-heading p {
  max-width: 245px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 12px;
}

.composer-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.composer-header-icon,
.composer-rich-close {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--surface-soft);
  display: grid;
  place-items: center;
}

.composer-header-icon {
  color: var(--purple);
}

.composer-header-icon svg,
.composer-rich-close svg {
  width: 18px;
  height: 18px;
}

.composer-rich-close {
  padding: 0;
  border: 0;
  color: var(--text);
  cursor: pointer;
}

.composer-project-body {
  min-height: 0;
  flex: 1;
  padding: 12px 15px 14px;
  overflow-y: auto;
  scrollbar-width: none;
}

.composer-project-body::-webkit-scrollbar {
  display: none;
}

.composer-account-card {
  min-height: 58px;
  padding: 8px;
  border-radius: 8px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.composer-account-card .composer-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.composer-account-card .composer-identity > img {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  object-fit: cover;
  flex: 0 0 42px;
}

.composer-account-card .composer-identity > div {
  min-width: 0;
}

.composer-account-card .composer-identity strong,
.composer-account-card .composer-identity span {
  display: block;
}

.composer-account-card .composer-identity strong {
  font-size: 10px;
  line-height: 14px;
}

.composer-account-card .composer-identity span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
  line-height: 10px;
}

.composer-account-card .composer-visibility-trigger-inline {
  min-width: 104px;
  height: 38px;
  margin: 0;
  padding: 0 11px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
  justify-content: center;
}

.composer-account-card .composer-visibility-trigger-inline span {
  font-size: 9px;
}

.composer-editor-card {
  margin-top: 10px;
  border-radius: 8px;
  background: var(--surface-soft);
  overflow: hidden;
}

.composer-project-modal #composerText {
  width: 100%;
  height: 130px;
  min-height: 130px;
  margin: 0;
  padding: 14px;
  border: 0;
  resize: none;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
  outline: none;
}

.composer-project-modal #composerText::placeholder {
  color: var(--muted);
}

.composer-editor-card > footer {
  min-height: 31px;
  padding: 0 12px 8px;
  color: var(--faint);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.composer-editor-card > footer span {
  font-size: 7px;
  line-height: 10px;
}

.composer-feeling-pill {
  margin: 9px 0 0;
  border-radius: 8px;
}

.composer-media-preview {
  margin: 10px 0 0;
  padding: 8px;
  border: 0;
  border-radius: 8px;
}

.composer-media-frame {
  border-radius: 8px;
}

.composer-poll {
  margin: 10px 0 0;
  border: 0;
  border-radius: 8px;
}

.composer-poll-options label {
  border: 0;
  border-radius: 8px;
}

.composer-poll-footer > button,
.composer-poll-footer > label {
  border: 0;
  border-radius: 8px;
}

.composer-section-heading {
  min-height: 28px;
  margin-top: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.composer-section-heading > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.composer-section-heading strong {
  font-size: 10px;
  line-height: 14px;
}

.composer-section-heading span,
.composer-section-heading small {
  color: var(--muted);
  font-size: 7px;
  line-height: 10px;
}

.composer-upload-zone {
  min-height: 102px;
  margin-top: 7px;
  padding: 11px;
  border: 1px dashed color-mix(in srgb, var(--purple) 34%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(135deg,
      transparent 0,
      transparent 34%,
      color-mix(in srgb, var(--surface-soft) 72%, transparent) 34%,
      color-mix(in srgb, var(--surface-soft) 72%, transparent) 50%,
      transparent 50%,
      transparent 84%,
      color-mix(in srgb, var(--surface-soft) 72%, transparent) 84%
    ),
    color-mix(in srgb, var(--surface) 82%, var(--surface-soft));
  background-size: 34px 34px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 9px;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.composer-upload-zone.dragging {
  border-color: var(--purple);
  background-color: color-mix(in srgb, var(--purple-soft) 36%, var(--surface));
}

.composer-upload-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--purple);
  display: grid;
  place-items: center;
}

.composer-upload-icon svg {
  width: 20px;
  height: 20px;
}

.composer-upload-copy {
  min-width: 0;
}

.composer-upload-copy strong,
.composer-upload-copy span {
  display: block;
}

.composer-upload-copy strong {
  font-size: 9px;
  line-height: 13px;
}

.composer-upload-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
  line-height: 10px;
}

.composer-upload-actions {
  display: flex;
  gap: 5px;
}

.composer-upload-actions button {
  min-width: 47px;
  height: 38px;
  padding: 0 7px;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

.composer-upload-actions button:hover,
.composer-upload-actions button:focus-visible,
.composer-upload-actions button.active {
  color: var(--purple);
  outline: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--purple) 38%, transparent);
}

.composer-upload-actions svg {
  width: 15px;
  height: 15px;
}

.composer-upload-actions span {
  font-size: 7px;
  font-weight: 800;
}

.composer-enhance-heading {
  margin-top: 10px;
}

.composer-enhancement-row {
  margin-top: 7px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.composer-enhancement-row > button {
  min-width: 0;
  min-height: 52px;
  padding: 7px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
  text-align: left;
  cursor: pointer;
}

.composer-enhancement-row > button:hover,
.composer-enhancement-row > button:focus-visible,
.composer-enhancement-row > button.active {
  background: color-mix(in srgb, var(--purple-soft) 44%, var(--surface));
  color: var(--purple);
  outline: none;
}

.composer-enhancement-row > button > span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--purple);
  display: grid;
  place-items: center;
  flex: 0 0 34px;
}

.composer-enhancement-row > button > span svg {
  width: 18px;
  height: 18px;
}

.composer-enhancement-row > button > div {
  min-width: 0;
  flex: 1;
}

.composer-enhancement-row strong,
.composer-enhancement-row small {
  display: block;
}

.composer-enhancement-row strong {
  font-size: 9px;
  line-height: 12px;
}

.composer-enhancement-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
  line-height: 10px;
}

.composer-enhancement-row > button > svg {
  width: 13px;
  height: 13px;
  color: var(--muted);
  transform: rotate(-90deg);
}

.composer-project-footer {
  position: relative;
  z-index: 5;
  min-height: 76px;
  padding: 10px 15px 13px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.composer-draft-status {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.composer-draft-status > i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 12%, transparent);
  flex: 0 0 8px;
}

.composer-draft-status strong,
.composer-draft-status span {
  display: block;
}

.composer-draft-status strong {
  font-size: 8px;
  line-height: 11px;
}

.composer-draft-status span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 6px;
  line-height: 9px;
}

.composer-footer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.composer-cancel-button,
.composer-project-footer .composer-publish-button {
  width: auto;
  min-width: 91px;
  height: 42px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.composer-cancel-button {
  background: var(--surface-soft);
  color: var(--muted);
}

.composer-project-footer .composer-publish-button {
  background: var(--purple);
  color: #15130f;
}

.composer-project-footer .composer-publish-button:disabled {
  background: var(--surface-soft);
  color: var(--faint);
  box-shadow: none;
  cursor: not-allowed;
}

.composer-project-modal .composer-visibility-menu-modern {
  top: 148px;
  right: 15px;
  left: auto;
  width: min(260px, calc(100% - 30px));
  border-radius: 14px;
}

.composer-project-modal .composer-feeling-menu {
  left: 15px;
  right: 15px;
  bottom: 84px;
  border-radius: 14px;
}

html[data-theme="dark"] .composer-project-modal,
html[data-theme="dark"] .composer-project-footer,
html[data-theme="dark"] .composer-project-header {
  background-color: #20201e;
}

html[data-theme="dark"] .composer-account-card,
html[data-theme="dark"] .composer-editor-card,
html[data-theme="dark"] .composer-enhancement-row > button {
  background-color: #282824;
}

html[data-theme="dark"] .composer-upload-zone {
  border-color: color-mix(in srgb, var(--purple) 38%, #343025);
}

@media (max-width: 359px) {
  .composer-project-modal {
    left: 7px;
    right: 7px;
    height: calc(100% - 14px);
    max-height: calc(100% - 14px);
    border-radius: 16px;
  }

  .composer-project-header {
    min-height: 82px;
    padding: 13px;
  }

  .composer-project-heading h2 {
    font-size: 16px;
  }

  .composer-header-icon {
    display: none;
  }

  .composer-project-body {
    padding-right: 12px;
    padding-left: 12px;
  }

  .composer-account-card .composer-visibility-trigger-inline {
    min-width: 96px;
    padding: 0 9px;
  }

  .composer-upload-zone {
    grid-template-columns: 34px 1fr;
  }

  .composer-upload-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .composer-project-footer {
    padding-right: 12px;
    padding-left: 12px;
  }

  .composer-draft-status span {
    display: none;
  }

  .composer-cancel-button,
  .composer-project-footer .composer-publish-button {
    min-width: 79px;
    padding: 0 9px;
  }
}

@media (max-height: 700px) {
  .composer-project-modal {
    top: 7px;
    bottom: 7px;
    height: auto;
    max-height: none;
    transform: translateY(7px) scale(.97);
  }

  .composer-project-modal.open {
    transform: translateY(0) scale(1);
  }

  .composer-project-modal #composerText {
    height: 104px;
    min-height: 104px;
  }
}

/* ================================================================
   Version 25: final feed polish
   ================================================================ */

/* Moments strip */
.moments-strip-section {
  height: 164px;
}

.moments-strip {
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  cursor: grab;
}

.moments-strip:active {
  cursor: grabbing;
}

.moment-item {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  scroll-snap-align: start;
  cursor: pointer;
  font-family: inherit;
}

.moment-item:focus-visible .moment-avatar,
.moment-item:hover .moment-avatar {
  transform: translateY(-2px);
}

.moment-avatar {
  transition: transform 160ms ease;
}

.moment-avatar::before {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid color-mix(in srgb, var(--purple) 76%, transparent);
  border-radius: 50%;
  pointer-events: none;
}

.moment-item .selected::before {
  display: none;
}

/* Feed tabs */
.feed-tabs {
  gap: 24px;
}

.feed-tabs button {
  font-size: 12px;
}

.post-card.feed-filter-hidden {
  display: none;
}



/* Version 61: Hunt-spezifische Feed-Demo */
.post-avatar.hunt-logo-avatar {
  padding: 5px;
  background: #151512;
  object-fit: contain;
}

.post-avatar.hunt-character-avatar {
  object-position: center 32%;
}

.moments-strip .hunt-moment-logo {
  background: #151512;
}

.moments-strip .hunt-moment-logo img {
  padding: 8px;
  object-fit: contain;
}

.hunt-community-post .post-copy {
  margin-bottom: 1px;
}

.hunt-poll {
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.hunt-poll-heading {
  min-height: 27px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hunt-poll-heading span {
  color: var(--purple);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hunt-poll-heading strong {
  color: var(--muted);
  font-size: 7px;
}

.hunt-poll-option {
  position: relative;
  width: 100%;
  min-height: 54px;
  margin-top: 7px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  color: var(--text);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.hunt-poll-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: color-mix(in srgb, var(--purple) 13%, transparent);
  pointer-events: none;
  transition: width 260ms ease;
}

.hunt-poll-option.selected {
  box-shadow: inset 0 0 0 1.5px var(--purple);
}

.hunt-poll-copy,
.hunt-poll-option > b {
  position: relative;
  z-index: 1;
}

.hunt-poll-copy {
  min-width: 0;
}

.hunt-poll-copy strong,
.hunt-poll-copy small {
  display: block;
}

.hunt-poll-copy strong {
  font-size: 9px;
}

.hunt-poll-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.35;
}

.hunt-poll-option > b {
  color: var(--purple);
  font-size: 10px;
}

.hunt-poll-hint {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 6px;
  line-height: 1.4;
}

.hunt-map-media img {
  object-fit: cover;
}

.hunt-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hunt-post-tags span {
  min-height: 29px;
  padding: 0 9px;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  font-size: 7px;
  font-weight: 700;
}

/* Side profile card opens the header user menu */
.grouped-profile-trigger {
  width: 100%;
  border: 0;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.grouped-profile-trigger:hover,
.grouped-profile-trigger:focus-visible {
  background: color-mix(in srgb, var(--purple-soft) 36%, var(--surface));
  outline: none;
}

.grouped-profile-copy {
  min-width: 0;
  flex: 1;
}

.grouped-profile-copy strong,
.grouped-profile-copy > span {
  display: block;
}

.side-profile-chevron {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  display: grid;
  place-items: center;
  flex: 0 0 32px;
}

.side-profile-chevron svg {
  width: 18px;
  height: 18px;
}

/* Post options */
.post-options-backdrop {
  position: absolute;
  inset: 0;
  z-index: 76;
  background: rgba(8, 7, 12, .18);
}

.post-options-popover {
  position: absolute;
  z-index: 78;
  width: 232px;
  padding: 8px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  box-shadow: 0 20px 58px rgba(8, 6, 14, .28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(.98);
  transform-origin: top right;
  transition:
    opacity 150ms ease,
    transform 180ms cubic-bezier(.2,.8,.2,1),
    visibility 150ms ease;
}

.post-options-popover.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.post-options-popover > header {
  min-height: 38px;
  padding: 2px 5px 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-options-popover > header > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.post-options-popover > header button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.post-options-popover > header svg {
  width: 15px;
  height: 15px;
}

#postOptionsList {
  display: grid;
  gap: 3px;
}

.post-option-item {
  width: 100%;
  min-height: 46px;
  padding: 6px 8px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
}

.post-option-item:hover,
.post-option-item:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.post-option-item > span:first-child {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--purple) 12%, transparent);
  color: var(--purple);
  display: grid;
  place-items: center;
  flex: 0 0 34px;
}

.post-option-item > span:first-child svg {
  width: 18px;
  height: 18px;
}

.post-option-item > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.post-option-item strong,
.post-option-item small {
  display: block;
}

.post-option-item strong {
  font-size: 10px;
  line-height: 14px;
}

.post-option-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  line-height: 11px;
}

.post-option-item.danger {
  color: var(--danger);
}

.post-option-item.danger > span:first-child {
  background: rgba(251, 52, 87, .11);
  color: var(--danger);
}

@media (max-width: 359px) {
  .post-options-popover {
    width: 218px;
  }
}

/* ================================================================
   Version 26: moments strip no clipping
   ================================================================ */

.neighborhoods.moments-strip-section {
  height: auto;
  min-height: 176px;
  padding-top: 20px;
  padding-bottom: 23px;
}

.neighborhoods.moments-strip-section .neighbor-strip,
.moments-strip {
  height: auto;
  min-height: 102px;
  padding-top: 6px;
  padding-bottom: 6px;
  overflow-x: auto;
  overflow-y: visible;
  align-items: flex-start;
}

.moments-strip .moment-item {
  min-height: 94px;
}

.moments-strip .moment-avatar::before {
  inset: -4px;
}

@media (max-width: 390px) {
  .neighborhoods.moments-strip-section {
    min-height: 180px;
    padding-bottom: 24px;
  }
}


/* ================================================================
   Version 27: moments more compact + uniform circles
   ================================================================ */

.neighborhoods.moments-strip-section {
  min-height: 152px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.neighborhoods.moments-strip-section .section-title {
  height: auto;
  min-height: 18px;
}

.neighborhoods.moments-strip-section .neighbor-strip,
.moments-strip {
  margin-top: 10px;
  min-height: 84px;
  height: auto;
  padding-top: 2px;
  padding-bottom: 2px;
  gap: 14px;
}

.moments-strip .neighbor,
.moments-strip .neighbor:first-child,
.moments-strip .neighbor-wide {
  width: 64px;
  height: 84px;
  min-height: 84px;
  flex: 0 0 64px;
  gap: 4px;
}

.moments-strip .neighbor-avatar,
.moments-strip .moment-avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-sizing: border-box;
}

.moments-strip .neighbor-avatar img,
.moments-strip .moment-avatar img,
.moments-strip .selected img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}

.moments-strip .selected {
  padding: 0;
  border: 0;
  background: transparent;
}

.moments-strip .selected::before {
  display: block;
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid color-mix(in srgb, var(--purple) 76%, transparent);
  border-radius: 50%;
  pointer-events: none;
}

.moments-strip .moment-avatar::before {
  inset: -4px;
}

.moments-strip .neighbor strong {
  max-width: 64px;
  font-size: 10px;
  line-height: 14px;
  text-align: center;
}

.moments-strip .neighbor > span {
  margin-top: -1px;
  font-size: 8px;
  line-height: 11px;
  text-align: center;
}

.moments-strip .status-check::after {
  width: 16px;
  height: 16px;
  right: -2px;
  bottom: -1px;
  font-size: 9px;
}

.moments-strip .status-live::after {
  right: -7px;
  bottom: -1px;
  height: 14px;
  padding: 0 5px;
  font-size: 8px;
  line-height: 12px;
}

@media (max-width: 390px) {
  .neighborhoods.moments-strip-section {
    min-height: 150px;
    padding-top: 15px;
    padding-bottom: 15px;
  }

  .moments-strip .neighbor,
  .moments-strip .neighbor:first-child,
  .moments-strip .neighbor-wide {
    width: 62px;
    flex-basis: 62px;
  }
}


/* ================================================================
   Version 28: moments compact without clipping
   ================================================================ */

.neighborhoods.moments-strip-section {
  min-height: 160px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.neighborhoods.moments-strip-section .neighbor-strip,
.moments-strip {
  min-height: 92px;
  padding-top: 4px;
  padding-bottom: 4px;
  align-items: flex-start;
}

.moments-strip .neighbor,
.moments-strip .neighbor:first-child,
.moments-strip .neighbor-wide {
  height: 92px;
  min-height: 92px;
}

@media (max-width: 390px) {
  .neighborhoods.moments-strip-section {
    min-height: 160px;
  }

  .neighborhoods.moments-strip-section .neighbor-strip,
  .moments-strip {
    min-height: 92px;
  }
}

[data-page="moments"] body,
body[data-page="moments"] {
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 150, 150, 0.28), transparent 30%),
    radial-gradient(circle at 84% 86%, rgba(255, 124, 92, 0.2), transparent 26%),
    #ece8ef;
}

body[data-page="moments"] .phone-shell {
  background: #0c0a12;
}

body[data-page="moments"] .app-scroll {
  inset: 0;
  overflow: hidden;
  background: #0c0a12;
}

.moments-page-view,
.moments-story {
  position: relative;
  width: 100%;
  height: 100%;
}

.moments-story {
  overflow: hidden;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.04) 16%, rgba(0, 0, 0, 0.05) 54%, rgba(0, 0, 0, 0.76) 100%),
    linear-gradient(180deg, #79556a 0%, #b16c89 18%, #ef8a99 40%, #ff946a 59%, #8b3443 79%, #231019 100%);
  box-shadow: none;
}

.moments-scene,
.moments-scene > div {
  position: absolute;
  inset: 0;
}

.moments-scene {
  overflow: hidden;
  pointer-events: none;
}

.moments-sky-glow {
  border-radius: 999px;
  filter: blur(76px);
  opacity: 0.95;
}

.moments-sky-glow-a {
  inset: auto auto 205px -22px;
  width: 290px;
  height: 170px;
  background: rgba(255, 162, 115, 0.78);
}

.moments-sky-glow-b {
  inset: auto -46px 138px auto;
  width: 238px;
  height: 156px;
  background: rgba(255, 103, 60, 0.62);
}

.moments-cloud {
  border-radius: 999px;
  filter: blur(22px);
  opacity: 0.8;
}

.moments-cloud-a {
  inset: 92px 20px auto auto;
  width: 222px;
  height: 52px;
  transform: rotate(-7deg);
  background:
    linear-gradient(180deg, rgba(255, 206, 200, 0.18), rgba(255, 148, 99, 0.42)),
    rgba(103, 40, 60, 0.18);
}

.moments-cloud-b {
  inset: 164px auto auto -18px;
  width: 274px;
  height: 70px;
  transform: rotate(3deg);
  background:
    linear-gradient(180deg, rgba(255, 174, 156, 0.22), rgba(155, 55, 73, 0.42)),
    rgba(78, 23, 35, 0.22);
}

.moments-cloud-c {
  inset: 248px 28px auto auto;
  width: 240px;
  height: 64px;
  transform: rotate(-5deg);
  background:
    linear-gradient(180deg, rgba(255, 194, 132, 0.2), rgba(107, 41, 58, 0.46)),
    rgba(69, 26, 37, 0.24);
}

.moments-sea {
  inset: auto 0 0;
  height: 34%;
  background:
    linear-gradient(180deg, rgba(71, 25, 38, 0.04), rgba(34, 13, 22, 0.48)),
    linear-gradient(180deg, rgba(128, 47, 60, 0.15), rgba(34, 14, 22, 0.82)),
    linear-gradient(180deg, rgba(54, 25, 36, 0) 0%, rgba(52, 17, 24, 0.38) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 160, 118, 0.2);
}

.moments-sea::before,
.moments-sea::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  border-radius: 999px;
}

.moments-sea::before {
  top: 18px;
  height: 11px;
  background:
    repeating-linear-gradient(90deg, rgba(15, 7, 10, 0.45) 0 24px, rgba(255, 141, 105, 0.08) 24px 40px);
  opacity: 0.65;
  filter: blur(0.4px);
}

.moments-sea::after {
  top: 58px;
  height: 126px;
  background:
    repeating-linear-gradient(180deg, rgba(18, 8, 11, 0.46) 0 8px, rgba(255, 168, 121, 0.06) 8px 13px);
  opacity: 0.82;
}

.moments-water-highlight {
  inset: auto 42px 138px;
  height: 14px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 211, 105, 0), rgba(255, 176, 63, 0.98) 28%, rgba(255, 164, 61, 0.82) 76%, rgba(255, 200, 118, 0));
  filter: blur(1px);
  opacity: 0.92;
}

.moment-back-button {
  position: absolute;
  left: 16px;
  top: 45px;
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.moment-back-icon {
  width: 24px;
  height: 24px;
  transform: rotate(90deg);
  color: #fff;
}

.moments-actions {
  position: absolute;
  right: 6px;
  bottom: 111px;
  z-index: 2;
  width: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.moment-action {
  width: 58px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.moment-action-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.moment-action-icon svg {
  width: 24px;
  height: 24px;
  color: #fff;
}

.moment-action-count {
  width: 58px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.32;
  text-align: center;
  color: #fff;
}

.moment-action-more {
  gap: 0;
}

.moment-action-more .moment-action-icon {
  width: 24px;
  height: 24px;
}

.moments-caption {
  position: absolute;
  left: 16px;
  right: 96px;
  bottom: 30px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  color: #fff;
}

.moments-author-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}

.moments-author-block {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.moment-author-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  overflow: visible;
}

.moment-author-avatar img {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: block;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.moment-author-status {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #1fc16b;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.96);
}

.moment-post-author {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.moment-post-author strong {
  display: block;
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
  color: #fff;
}

.moment-meta-sr {
  font-size: 0;
  line-height: 0;
  color: transparent;
  user-select: none;
}

.moment-follow-button {
  flex: 0 0 auto;
  min-width: 92px;
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: #ded3f7;
  color: #7949dd;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.moment-follow-button.is-following {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.moment-follow-button:active {
  transform: scale(0.98);
}

.moment-copy {
  margin: 0;
  font-size: 14px;
  line-height: 1.32;
  font-weight: 400;
  color: #fefefe;
}

.moment-copy span {
  color: #fefefe;
}

.moment-audio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.32;
  color: #fdfdfd;
}

.moment-audio-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.moment-audio-icon svg {
  width: 18px;
  height: 18px;
  color: #fff;
}

@media (max-width: 600px) {
  body[data-page="moments"] .phone-shell {
    border-radius: 0;
  }
}


/* ================================================================
   Version 31: ten vertically scrollable moments
   ================================================================ */

.moments-page-view {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.moments-scroll {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

.moments-scroll .moments-story {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  padding: 0;
  border-radius: inherit;
  display: block;
  flex: none;
  gap: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  box-shadow: none;
}

/* Test scenes use existing project assets and CSS backgrounds only. */
.moment-scene-beach {
  background:
    linear-gradient(180deg, rgba(8, 10, 20, .34) 0%, transparent 22%, transparent 55%, rgba(7, 8, 16, .78) 100%),
    url("../spark_beach.jpg") center / cover no-repeat;
}

.moment-scene-orange {
  background:
    linear-gradient(180deg, rgba(10, 8, 16, .34) 0%, transparent 20%, transparent 58%, rgba(9, 7, 14, .82) 100%),
    url("../spark_orange.jpg") center / cover no-repeat;
}

.moment-scene-hunt {
  background:
    linear-gradient(180deg, rgba(6, 7, 10, .28) 0%, transparent 22%, transparent 55%, rgba(6, 7, 10, .86) 100%),
    url("../feed_media.jpg") center / cover no-repeat;
}

.moment-scene-night {
  background:
    radial-gradient(circle at 70% 16%, rgba(132, 117, 255, .48), transparent 22%),
    linear-gradient(180deg, #15142b 0%, #202649 38%, #132a39 68%, #071016 100%);
}

.moment-scene-forest {
  background:
    radial-gradient(circle at 28% 26%, rgba(187, 220, 126, .26), transparent 20%),
    linear-gradient(180deg, #4f6652 0%, #2f4e3a 40%, #183126 68%, #09130f 100%);
}

.moment-scene-fog {
  background:
    radial-gradient(circle at 70% 28%, rgba(255, 255, 255, .42), transparent 25%),
    linear-gradient(180deg, #98a0a5 0%, #68737b 42%, #3d4b54 70%, #141c22 100%);
}

.moment-scene-fire {
  background:
    radial-gradient(circle at 46% 63%, rgba(255, 214, 77, .95), transparent 10%),
    radial-gradient(circle at 56% 62%, rgba(255, 89, 31, .78), transparent 25%),
    linear-gradient(180deg, #351722 0%, #6e2922 50%, #1c0c11 100%);
}

.moment-scene-moon {
  background:
    radial-gradient(circle at 72% 18%, rgba(248, 245, 221, .95) 0 9%, rgba(205, 216, 255, .26) 10%, transparent 23%),
    linear-gradient(180deg, #252646 0%, #1a2442 44%, #132a3a 72%, #071017 100%);
}

.moment-scene-gold {
  background:
    radial-gradient(circle at 62% 36%, rgba(255, 226, 124, .72), transparent 24%),
    linear-gradient(180deg, #9b633a 0%, #d28a42 40%, #774127 67%, #21120e 100%);
}

.moment-scene-beach .moments-scene,
.moment-scene-orange .moments-scene,
.moment-scene-hunt .moments-scene {
  opacity: .28;
}

.moment-scene-night .moments-sea,
.moment-scene-forest .moments-sea,
.moment-scene-fog .moments-sea,
.moment-scene-fire .moments-sea,
.moment-scene-moon .moments-sea,
.moment-scene-gold .moments-sea {
  opacity: .62;
}

.moment-back-button {
  position: absolute;
  z-index: 12;
}

.moment-action-more .moment-action-icon svg {
  width: 25px;
  height: 25px;
}

.moments-story.is-muted .moment-audio {
  opacity: .58;
}

.moments-story.is-muted .moment-audio-icon {
  position: relative;
}

.moments-story.is-muted .moment-audio-icon::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
  transform: rotate(-45deg);
}


/* ================================================================
   Version 32: smaller online status on Moment avatars
   ================================================================ */

.moment-author-status {
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.96);
}

.moment-options-backdrop {
  position: absolute;
  inset: 0;
  z-index: 86;
  background: rgba(9, 7, 14, 0.48);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.moment-options-popover {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -560px;
  z-index: 88;
  max-height: calc(100% - 24px);
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 26px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 -22px 64px rgba(9, 7, 14, 0.24);
  opacity: 0;
  pointer-events: none;
  transition:
    bottom 260ms cubic-bezier(.2,.8,.2,1),
    opacity 180ms ease;
}

.moment-options-popover.open {
  bottom: 10px;
  opacity: 1;
  pointer-events: auto;
}

.moment-options-sheet-header {
  min-height: 58px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.moment-options-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--purple);
  font-size: 10px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.moment-options-sheet-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 24px;
}

.moment-options-sheet-header small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 12px;
}

.moment-options-sheet-header > button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.moment-options-sheet-header > button svg {
  width: 20px;
  height: 20px;
}

.moment-options-list {
  margin-top: 14px;
  display: grid;
  gap: 7px;
}

.moment-options-list > button {
  width: 100%;
  min-height: 56px;
  padding: 8px 10px;
  border: 0;
  border-radius: 17px;
  background: var(--surface-soft);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  cursor: pointer;
}

.moment-options-list > button:hover,
.moment-options-list > button:focus-visible {
  background: color-mix(in srgb, var(--purple-soft) 34%, var(--surface-soft));
  outline: none;
}

.moment-options-list > button > span {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--purple) 12%, var(--surface));
  color: var(--purple);
  display: grid;
  place-items: center;
  flex: 0 0 40px;
}

.moment-options-list > button > span svg {
  width: 20px;
  height: 20px;
}

.moment-options-list > button > div {
  min-width: 0;
  flex: 1;
}

.moment-options-list strong,
.moment-options-list small {
  display: block;
}

.moment-options-list strong {
  font-size: 11px;
  line-height: 15px;
}

.moment-options-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 12px;
}

.moment-options-list > button.danger {
  color: var(--danger);
}

.moment-options-list > button.danger > span {
  background: rgba(251, 52, 87, .11);
  color: var(--danger);
}

@media (max-height: 720px) {
  .moment-options-popover {
    padding: 15px;
  }

  .moment-options-list {
    gap: 5px;
  }

  .moment-options-list > button {
    min-height: 50px;
  }
}

.moment-create-button {
  position: absolute;
  right: 16px;
  top: 45px;
  z-index: 12;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, .28);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.moment-create-button svg {
  width: 24px;
  height: 24px;
}

.moment-composer-backdrop {
  position: absolute;
  inset: 0;
  z-index: 96;
  background: rgba(7, 6, 12, .68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.moment-composer {
  position: absolute;
  inset: 8px;
  z-index: 98;
  border-radius: 25px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .42);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px) scale(.975);
  transition:
    opacity 190ms ease,
    visibility 190ms ease,
    transform 240ms cubic-bezier(.2,.8,.2,1);
}

.moment-composer.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.moment-composer-header {
  min-height: 66px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 10px;
}

.moment-composer-header > button:first-child {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.moment-composer-header > button:first-child svg {
  width: 19px;
  height: 19px;
}

.moment-composer-header > div {
  min-width: 0;
}

.moment-composer-header > div span,
.moment-composer-header > div h2 {
  display: block;
}

.moment-composer-header > div span {
  color: var(--purple);
  font-size: 8px;
  line-height: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.moment-composer-header > div h2 {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 19px;
}

.moment-composer-publish {
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--purple);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.moment-composer-scroll {
  min-height: 0;
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  scrollbar-width: none;
}

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

.moment-preview-section {
  display: grid;
  place-items: center;
}

.moment-editor-preview {
  position: relative;
  width: 190px;
  height: 338px;
  overflow: hidden;
  border-radius: 18px;
  background: #09080d;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .22);
  touch-action: none;
}

.moment-editor-preview > img,
.moment-editor-preview > video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform-origin: center;
}

.moment-editor-gradient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,.28), transparent 24%, transparent 68%, rgba(0,0,0,.42));
}

.moment-video-select {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: rgba(12, 11, 17, .72);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 8px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.moment-video-select svg {
  width: 17px;
  height: 17px;
}

.moment-text-overlay {
  position: absolute;
  left: 50%;
  top: 32%;
  transform: translate(-50%, -50%);
  max-width: 86%;
  padding: 6px 9px;
  border-radius: 8px;
  color: #fff;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 3px 12px rgba(0, 0, 0, .48);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.moment-text-overlay:active {
  cursor: grabbing;
}

.moment-editor-tabs {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.moment-editor-tabs button {
  min-width: 0;
  height: 47px;
  padding: 4px 2px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
}

.moment-editor-tabs button.active,
.moment-editor-tabs button:hover,
.moment-editor-tabs button:focus-visible {
  border-color: color-mix(in srgb, var(--purple) 46%, var(--line));
  background: color-mix(in srgb, var(--purple-soft) 44%, var(--surface));
  color: var(--purple);
  outline: none;
}

.moment-editor-tabs svg {
  width: 18px;
  height: 18px;
}

.moment-editor-tabs span {
  font-size: 7px;
  font-weight: 800;
}

.moment-editor-panel {
  display: none;
  margin-top: 10px;
  padding: 12px;
  border-radius: 17px;
  background: var(--surface-soft);
}

.moment-editor-panel.active {
  display: block;
}

.moment-editor-panel > header {
  min-height: 34px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.moment-editor-panel > header strong,
.moment-editor-panel > header small {
  display: block;
}

.moment-editor-panel > header strong {
  font-size: 11px;
  line-height: 15px;
}

.moment-editor-panel > header small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  line-height: 11px;
}

.moment-editor-panel > header > span {
  color: var(--purple);
  font-size: 8px;
  font-weight: 800;
}

.moment-trim-timeline {
  position: relative;
  height: 64px;
  margin-top: 11px;
  border-radius: 13px;
  overflow: hidden;
  background: #17161d;
  touch-action: none;
}

.moment-trim-thumbnails {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  opacity: .82;
}

.moment-trim-thumbnails i {
  background:
    linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.3)),
    url("../feed_media.jpg") center / cover no-repeat;
}

.moment-trim-thumbnails i:nth-child(even) {
  background-position: 72% center;
}

.moment-trim-selection {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 10%;
  right: 40%;
  border-top: 3px solid var(--purple);
  border-bottom: 3px solid var(--purple);
  background: color-mix(in srgb, var(--purple) 9%, transparent);
  pointer-events: none;
}

.moment-trim-timeline::before,
.moment-trim-timeline::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  background: rgba(8, 7, 12, .62);
  pointer-events: none;
}

.moment-trim-timeline::before {
  left: 0;
  width: var(--trim-left, 10%);
}

.moment-trim-timeline::after {
  right: 0;
  width: var(--trim-right, 40%);
}

.moment-trim-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  width: 22px;
  padding: 0;
  border: 0;
  background: var(--purple);
  cursor: ew-resize;
  touch-action: none;
}

.moment-trim-handle.left {
  left: calc(10% - 11px);
  border-radius: 10px 0 0 10px;
}

.moment-trim-handle.right {
  left: calc(60% - 11px);
  border-radius: 0 10px 10px 0;
}

.moment-trim-handle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  transform: translate(-50%, -50%);
}

.moment-trim-scale {
  margin-top: 5px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 7px;
}

.moment-text-input {
  margin-top: 10px;
  display: grid;
  gap: 5px;
}

.moment-text-input > span,
.moment-text-controls > div > span,
.moment-range-control > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.moment-text-input input {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  font-size: 10px;
}

.moment-text-controls {
  margin-top: 10px;
  display: grid;
  gap: 12px;
}

.moment-color-swatches {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.moment-color-swatches button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 10px;
  background: var(--swatch);
  cursor: pointer;
}

.moment-color-swatches button:nth-child(1) { --swatch: #fff; }
.moment-color-swatches button:nth-child(2) { --swatch: #ffb12b; }
.moment-color-swatches button:nth-child(3) { --swatch: #8e63f1; }
.moment-color-swatches button:nth-child(4) { --swatch: #20c9f3; }
.moment-color-swatches button:nth-child(5) { --swatch: #1fc16b; }

.moment-color-swatches button.active {
  border-color: var(--purple);
  box-shadow: 0 0 0 2px var(--surface);
}

.moment-range-control {
  display: grid;
  gap: 6px;
}

.moment-range-control > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.moment-range-control b {
  color: var(--text);
  font-size: 8px;
}

.moment-range-control em {
  color: var(--purple);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.moment-range-control input[type="range"] {
  width: 100%;
  accent-color: var(--purple);
}

.moment-adjust-grid {
  margin-top: 10px;
  display: grid;
  gap: 12px;
}

.moment-adjust-reset {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--purple);
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

.moment-filter-list {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.moment-filter-list::-webkit-scrollbar {
  display: none;
}

.moment-filter-list button {
  min-width: 54px;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  display: grid;
  gap: 5px;
  place-items: center;
  cursor: pointer;
}

.moment-filter-list button.active {
  border-color: var(--purple);
  color: var(--purple);
}

.moment-filter-thumb {
  width: 44px;
  height: 54px;
  border-radius: 10px;
  display: block;
  background:
    linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.32)),
    url("../feed_media.jpg") center / cover no-repeat;
}

.moment-filter-thumb.cinematic { filter: contrast(1.2) saturate(.78) hue-rotate(-8deg); }
.moment-filter-thumb.warm { filter: sepia(.24) saturate(1.28) hue-rotate(-8deg); }
.moment-filter-thumb.cold { filter: saturate(.88) hue-rotate(16deg) brightness(.96); }
.moment-filter-thumb.mono { filter: grayscale(1) contrast(1.15); }

.moment-filter-list strong {
  font-size: 7px;
}

.moment-composer-footer {
  min-height: 60px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
}

.moment-composer-footer > button {
  height: 40px;
  padding: 0 11px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

.moment-composer-footer > button svg {
  width: 17px;
  height: 17px;
}

.moment-composer-footer > div {
  min-width: 0;
  text-align: center;
}

.moment-composer-footer > div span,
.moment-composer-footer > div strong {
  display: block;
}

.moment-composer-footer > div span {
  color: var(--muted);
  font-size: 7px;
}

.moment-composer-footer > div strong {
  margin-top: 2px;
  color: var(--text);
  font-size: 8px;
}

.moment-composer-footer .moment-composer-next {
  background: var(--purple);
  color: #fff;
}

@media (max-height: 730px) {
  .moment-editor-preview {
    width: 164px;
    height: 292px;
  }

  .moment-editor-tabs {
    margin-top: 10px;
  }
}


/* Ready Lobbies – page-only styles.
   The bottom navigation remains owned exclusively by
   src/partials/bottom-navigation.html and bottom-navigation.css. */

body[data-page="ready-lobbies"] .app-scroll,
body[data-page="ready-lobby-detail"] .app-scroll {
  background:
    radial-gradient(circle at 92% 4%, color-mix(in srgb, var(--purple) 13%, transparent), transparent 29%),
    var(--app-bg);
}

.ready-page {
  min-height: calc(100dvh - 82px);
  padding: 12px 12px 34px;
}

.ready-page button,
.ready-page input,
.ready-page textarea,
.ready-page select {
  font: inherit;
}

.ready-page-header {
  position: sticky;
  top: 10px;
  z-index: 24;
  min-height: 66px;
  padding: 9px 10px;
  border-radius: 21px;
  background: color-mix(in srgb, var(--surface) 91%, transparent);
  box-shadow: 0 10px 28px rgba(8, 6, 14, .12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  gap: 9px;
}

html[data-theme="dark"] .ready-page-header {
  box-shadow: 0 12px 32px rgba(0, 0, 0, .34);
}

.ready-page-header__brand {
  width: 50px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: visible;
  flex: 0 0 50px;
}

.ready-page-header__brand img {
  width: 58px;
  height: 58px;
  display: block;
  object-fit: contain;
  filter: none;
}

.ready-page-header__copy {
  min-width: 0;
  flex: 1;
}

.ready-page-header__copy > span {
  display: block;
  color: var(--purple);
  font-size: 8px;
  line-height: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ready-page-header__copy h1 {
  margin: 2px 0 0;
  font-size: 17px;
  line-height: 22px;
  white-space: nowrap;
}

.ready-page-header__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ready-round-button,
.ready-header-avatar {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.ready-round-button:hover,
.ready-round-button:focus-visible {
  color: var(--purple);
  outline: none;
}

.ready-round-button svg {
  width: 20px;
  height: 20px;
}

.ready-header-avatar {
  border-radius: 50%;
  overflow: hidden;
}

.ready-header-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.ready-kicker {
  display: block;
  color: var(--purple);
  font-size: 8px;
  line-height: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.ready-hero {
  position: relative;
  min-height: 236px;
  margin-top: 18px;
  padding: 18px;
  border-radius: 25px;
  overflow: hidden;
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--purple-soft) 66%, var(--surface)) 0%,
      var(--surface) 59%,
      color-mix(in srgb, var(--surface) 92%, #d6a84f 8%) 100%
    );
  box-shadow: var(--shadow);
}

.ready-hero::before {
  content: "";
  position: absolute;
  width: 165px;
  height: 165px;
  right: -52px;
  top: -64px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--purple) 23%, transparent);
  filter: blur(47px);
}

.ready-hero__copy,
.ready-hero__metrics,
.ready-hero__button {
  position: relative;
  z-index: 1;
}

.ready-hero__copy h2 {
  max-width: 270px;
  margin: 5px 0 0;
  font-size: 25px;
  line-height: 1.12;
  letter-spacing: -.5px;
}

.ready-hero__copy p {
  max-width: 285px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.ready-hero__metrics {
  margin-top: 16px;
  display: flex;
  gap: 8px;
}

.ready-hero__metrics > div {
  min-width: 105px;
  padding: 9px 11px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
}

.ready-hero__metrics strong,
.ready-hero__metrics span {
  display: block;
}

.ready-hero__metrics strong {
  font-size: 17px;
}

.ready-hero__metrics span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.ready-primary-button,
.ready-secondary-button {
  min-height: 42px;
  padding: 0 15px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
}

.ready-primary-button {
  background: var(--purple);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 9px 22px color-mix(in srgb, var(--purple) 24%, transparent);
}

.ready-primary-button svg {
  width: 18px;
  height: 18px;
}

.ready-secondary-button {
  background: var(--surface-soft);
  color: var(--muted);
}

.ready-hero__button {
  height: 42px;
  margin-top: 13px;
  font-size: 10px;
}

.ready-filter-panel {
  margin-top: 12px;
  padding: 12px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.ready-search-box {
  height: 42px;
  padding: 0 10px;
  border-radius: 13px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ready-search-box > svg {
  width: 19px;
  height: 19px;
  color: var(--purple);
}

.ready-search-box input {
  min-width: 0;
  flex: 1;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 10px;
}

.ready-search-box button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.ready-search-box button svg {
  width: 14px;
  height: 14px;
}

.ready-filter-row {
  margin-top: 9px;
  padding-bottom: 1px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ready-filter-row::-webkit-scrollbar {
  display: none;
}

.ready-filter-row button {
  min-width: max-content;
  height: 31px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

.ready-filter-row button.active {
  border-color: transparent;
  background: color-mix(in srgb, var(--purple-soft) 58%, var(--surface));
  color: var(--purple);
}

.ready-overview-list {
  margin-top: 19px;
}

.ready-section-header {
  min-height: 40px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.ready-section-header h2 {
  margin: 2px 0 0;
  font-size: 15px;
}

.ready-section-header > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.ready-lobby-list {
  margin-top: 10px;
  display: grid;
  gap: 12px;
}

.ready-lobby-card {
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform .18s ease;
}

.ready-lobby-card:hover {
  transform: translateY(-1px);
}

.ready-lobby-card__button {
  width: 100%;
  padding: 13px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.ready-lobby-card__header,
.ready-lobby-card__title,
.ready-host,
.ready-lobby-tags,
.ready-common-preview {
  display: flex;
  align-items: center;
}

.ready-lobby-card__header {
  justify-content: space-between;
  gap: 8px;
}

.ready-host {
  min-width: 0;
  gap: 8px;
}

.ready-host img {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  object-fit: cover;
  flex: 0 0 36px;
}

.ready-host > div {
  min-width: 0;
}

.ready-host strong,
.ready-host span {
  display: block;
}

.ready-host strong {
  overflow: hidden;
  font-size: 11px;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ready-host span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.ready-status {
  min-height: 26px;
  padding: 0 9px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 7px;
  font-weight: 800;
  white-space: nowrap;
}

.ready-status--waiting {
  background: color-mix(in srgb, var(--purple) 12%, transparent);
  color: var(--purple);
}

.ready-status--hunting {
  background: rgba(31, 193, 107, .12);
  color: var(--success);
}

.ready-lobby-card__title {
  margin-top: 9px;
  justify-content: space-between;
  gap: 8px;
}

.ready-lobby-card__title > div {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.ready-lobby-card__title strong {
  font-size: 16px;
}

.ready-lobby-card__title > div span {
  color: var(--purple);
  font-size: 9px;
  font-weight: 700;
}

.ready-mood {
  min-height: 25px;
  padding: 0 8px;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  font-size: 7px;
  font-weight: 800;
}

.ready-squad-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 744 / 465;
  margin-top: 10px;
  border-radius: 15px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 20%, color-mix(in srgb, var(--purple) 12%, transparent), transparent 45%),
    #11110f;
}

.ready-squad-stage img {
  position: absolute;
  left: -5.914%;
  top: 0;
  width: 111.828%;
  max-width: none;
  display: block;
  transform: translateY(-23.56%);
  pointer-events: none;
  user-select: none;
}

.ready-squad-stage[data-ready-state="1"] img {
  transform: translateY(-23.55%);
}

.ready-squad-stage[data-ready-state="3"] img {
  transform: translateY(-23.54%);
}

.ready-lobby-tags {
  margin-top: 9px;
  flex-wrap: wrap;
  gap: 5px;
}

.ready-lobby-tags span,
.ready-detail-tags span {
  min-height: 25px;
  padding: 0 8px;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  font-size: 7px;
  font-weight: 700;
}

.ready-common-preview {
  margin-top: 8px;
  padding: 8px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--purple-soft) 26%, var(--surface));
  gap: 5px;
  flex-wrap: wrap;
}

.ready-common-preview strong {
  width: 100%;
  color: var(--purple);
  font-size: 8px;
}

.ready-common-preview span,
.ready-common-preview em {
  min-height: 21px;
  padding: 0 6px;
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  font-size: 6px;
  font-style: normal;
  font-weight: 700;
}

.ready-empty-state {
  min-height: 250px;
  margin-top: 10px;
  border-radius: 22px;
  background: var(--surface);
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.ready-empty-state > span {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
}

.ready-empty-state svg {
  width: 26px;
  height: 26px;
}

.ready-empty-state strong {
  margin-top: 12px;
  font-size: 12px;
}

.ready-empty-state small {
  max-width: 230px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.ready-card-hidden {
  display: none;
}

/* Detail page */
.ready-detail-header .ready-back-button {
  flex: 0 0 40px;
}

.ready-back-button svg {
  transform: rotate(90deg);
}

.ready-detail-host {
  padding: 17px 4px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.ready-detail-host__identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ready-detail-host__identity > img {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
  flex: 0 0 52px;
}

.ready-detail-host__identity > div {
  min-width: 0;
}

.ready-detail-host__identity h2 {
  margin: 0;
  font-size: 17px;
}

.ready-detail-host__identity .ready-mood {
  margin-top: 5px;
}

.ready-detail-host__identity p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.ready-detail-host__identity p strong {
  color: var(--purple);
}

.ready-detail-stage-card,
.ready-detail-card,
.ready-hunter-list {
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.ready-detail-stage-card {
  padding: 10px;
}

.ready-detail-stage {
  margin-top: 0;
}

.ready-detail-stage-card > footer {
  min-height: 38px;
  padding: 8px 2px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.ready-detail-stage-card > footer span {
  max-width: 225px;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.4;
}

.ready-detail-stage-card > footer strong {
  color: var(--purple);
  font-size: 8px;
  white-space: nowrap;
}

.ready-detail-card {
  margin-top: 12px;
  padding: 14px;
}

.ready-detail-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.ready-detail-card h2 {
  margin: 2px 0 0;
  font-size: 14px;
}

.ready-detail-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ready-common-card > header > strong {
  min-height: 26px;
  padding: 0 8px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--purple) 12%, transparent);
  color: var(--purple);
  display: inline-flex;
  align-items: center;
  font-size: 7px;
}

.ready-common-card > p,
.ready-note-card > p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.ready-detail-hunters {
  margin-top: 20px;
}

.ready-hunter-list {
  margin-top: 9px;
  padding: 7px;
  display: grid;
  gap: 3px;
}

.ready-hunter-list article {
  min-height: 58px;
  padding: 8px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.ready-hunter-list article:hover {
  background: var(--surface-soft);
}

.ready-hunter-list img,
.ready-hunter-empty > span {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  object-fit: cover;
  flex: 0 0 42px;
}

.ready-hunter-empty > span {
  background: var(--surface-soft);
  color: var(--muted);
  display: grid;
  place-items: center;
}

.ready-hunter-empty svg {
  width: 20px;
  height: 20px;
}

.ready-hunter-list article > div {
  min-width: 0;
  flex: 1;
}

.ready-hunter-list strong,
.ready-hunter-list span {
  display: block;
}

.ready-hunter-list strong {
  font-size: 10px;
}

.ready-hunter-list article > div span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
}

.ready-hunter-list em {
  min-height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--purple);
  display: inline-flex;
  align-items: center;
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
}

.ready-detail-action-spacer {
  height: 92px;
}

.ready-detail-sticky-action {
  position: absolute;
  z-index: 28;
  left: 12px;
  right: 12px;
  bottom: 84px;
  padding: 8px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 91%, transparent);
  box-shadow: 0 10px 30px rgba(8, 6, 14, .18);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.ready-detail-sticky-action .ready-primary-button {
  width: 100%;
  height: 45px;
  font-size: 10px;
}

/* Create / join sheets */
.ready-sheet-backdrop {
  z-index: 92;
  background: rgba(8, 6, 14, .58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ready-sheet {
  position: absolute;
  z-index: 94;
  left: 10px;
  right: 10px;
  bottom: -760px;
  max-height: calc(100% - 20px);
  padding: 15px;
  border-radius: 25px;
  background: var(--surface);
  box-shadow: 0 -24px 74px rgba(8, 6, 14, .34);
  opacity: 0;
  pointer-events: none;
  transition: bottom .26s cubic-bezier(.2,.8,.2,1), opacity .18s ease;
}

.ready-sheet.open {
  bottom: 10px;
  opacity: 1;
  pointer-events: auto;
}

.ready-sheet__header {
  min-height: 44px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ready-sheet__header h2 {
  margin: 2px 0 0;
  font-size: 17px;
}

.ready-sheet__close {
  width: 35px;
  height: 35px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.ready-sheet__close svg {
  width: 17px;
  height: 17px;
}

.ready-sheet__scroll {
  max-height: calc(100dvh - 190px);
  margin: 9px -3px 0 0;
  padding-right: 3px;
  overflow-y: auto;
  scrollbar-width: none;
}

.ready-sheet__scroll::-webkit-scrollbar {
  display: none;
}

.ready-form-section + .ready-form-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.ready-form-section > header {
  margin-bottom: 9px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.ready-form-section h3 {
  margin: 0;
  font-size: 11px;
}

.ready-form-section > header span {
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
}

.ready-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ready-form-grid label,
.ready-full-field {
  display: grid;
  gap: 5px;
}

.ready-form-grid label > span,
.ready-full-field > span {
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
}

.ready-form-grid input,
.ready-form-grid select,
.ready-full-field input,
.ready-full-field textarea {
  width: 100%;
  min-width: 0;
  height: 39px;
  padding: 0 9px;
  border: 0;
  border-radius: 11px;
  outline: none;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 9px;
}

.ready-full-field {
  margin-top: 9px;
}

.ready-full-field textarea {
  height: 64px;
  padding-top: 9px;
  resize: none;
}

.ready-toggle-row {
  margin-top: 9px;
  padding: 9px;
  border-radius: 12px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.ready-toggle-row strong,
.ready-toggle-row small {
  display: block;
}

.ready-toggle-row strong {
  font-size: 9px;
}

.ready-toggle-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
}

.ready-toggle-row input {
  accent-color: var(--purple);
}

.ready-form-note {
  margin: 9px 0 0;
  padding: 8px 9px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--purple-soft) 28%, var(--surface));
  color: var(--muted);
  font-size: 7px;
  line-height: 1.4;
}

.ready-choice-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ready-choice-row::-webkit-scrollbar {
  display: none;
}

.ready-choice-row button {
  min-width: max-content;
  min-height: 31px;
  padding: 0 9px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
  cursor: pointer;
}

.ready-choice-row button.active {
  background: var(--purple);
  color: #fff;
}

.ready-choice-row--wrap {
  margin-top: 8px;
  flex-wrap: wrap;
  overflow: visible;
}

.ready-sheet__footer {
  margin-top: 12px;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 8px;
}

.ready-sheet__footer button {
  width: 100%;
  font-size: 9px;
}

.ready-join-sheet {
  bottom: -430px;
}

.ready-join-grid {
  margin-top: 10px;
}

@media (max-width: 600px) {
  .ready-page {
    min-height: calc(100dvh - 82px);
  }
}

@media (max-width: 359px) {
  .ready-page {
    padding-right: 9px;
    padding-left: 9px;
  }

  .ready-page-header {
    padding-right: 8px;
    padding-left: 8px;
  }

  .ready-page-header__actions {
    gap: 4px;
  }

  .ready-page-header__brand {
    width: 46px;
    flex-basis: 46px;
  }

  .ready-hero__copy h2 {
    font-size: 23px;
  }

  .ready-form-grid {
    grid-template-columns: 1fr;
  }
}


/* ================================================================
   Version 35 – polished Ready Lobby UI and viewport-correct overlays
   ================================================================ */

.ready-empty-state[hidden],
.ready-sheet-backdrop[hidden] {
  display: none !important;
}

.phone-shell.ready-modal-open .app-scroll {
  overflow: hidden;
}

.ready-page-header__copy > span,
.ready-kicker {
  font-size: 10px;
  line-height: 13px;
}

.ready-page-header__copy h1 {
  font-size: 20px;
  line-height: 25px;
}

.ready-hero__copy h2 {
  max-width: 300px;
  font-size: 30px;
  line-height: 1.08;
}

.ready-hero__copy p {
  max-width: 310px;
  font-size: 13px;
  line-height: 1.45;
}

.ready-hero__metrics strong {
  font-size: 21px;
}

.ready-hero__metrics span {
  font-size: 10px;
}

.ready-hero__button,
.ready-primary-button,
.ready-secondary-button {
  font-size: 12px;
}

.ready-search-box {
  height: 48px;
}

.ready-search-box input {
  font-size: 13px;
}

.ready-filter-row button {
  height: 36px;
  padding: 0 13px;
  border-radius: 12px;
  font-size: 10px;
}

.ready-section-header h2 {
  font-size: 18px;
}

.ready-section-header > span {
  font-size: 10px;
}

.ready-lobby-card__button {
  padding: 15px;
}

.ready-host img {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.ready-host strong {
  font-size: 14px;
  line-height: 18px;
}

.ready-host span {
  font-size: 10px;
}

.ready-status {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 11px;
  font-size: 9px;
}

.ready-lobby-card__title {
  margin-top: 12px;
}

.ready-lobby-card__title strong {
  font-size: 21px;
}

.ready-lobby-card__title > div span {
  font-size: 11px;
}

.ready-mood {
  min-height: 29px;
  padding: 0 10px;
  font-size: 9px;
}

.ready-lobby-tags span,
.ready-detail-tags span {
  min-height: 29px;
  padding: 0 10px;
  font-size: 9px;
}

.ready-common-preview {
  padding: 10px;
}

.ready-common-preview strong {
  font-size: 10px;
}

.ready-common-preview span,
.ready-common-preview em {
  min-height: 24px;
  padding: 0 8px;
  font-size: 8px;
}

.ready-empty-state {
  min-height: 290px;
}

.ready-empty-state strong {
  font-size: 14px;
}

.ready-empty-state small {
  font-size: 10px;
}

.ready-detail-host__identity h2 {
  font-size: 20px;
}

.ready-detail-host__identity p,
.ready-detail-stage-card > footer span,
.ready-detail-stage-card > footer strong,
.ready-common-card > p,
.ready-note-card > p {
  font-size: 10px;
}

.ready-detail-card h2,
.ready-detail-hunters .ready-section-header h2 {
  font-size: 17px;
}

.ready-common-card > header > strong {
  font-size: 9px;
}

.ready-hunter-list strong {
  font-size: 13px;
}

.ready-hunter-list article > div span,
.ready-hunter-list em {
  font-size: 9px;
}

/* Overlay architecture: these elements are siblings of app-scroll and
   therefore always cover the complete phone viewport. */
.ready-sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 140;
  background: rgba(8, 7, 12, .66);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ready-sheet {
  position: absolute;
  z-index: 142;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: color-mix(in srgb, var(--surface) 98%, transparent);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .42);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(calc(100% + 34px));
  transition:
    transform 280ms cubic-bezier(.2,.85,.2,1),
    opacity 180ms ease,
    visibility 180ms ease;
  overflow: hidden;
}

.ready-sheet.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.ready-create-sheet {
  height: min(760px, calc(100% - 20px));
  display: flex;
  flex-direction: column;
}

.ready-join-sheet {
  max-height: calc(100% - 20px);
  padding-bottom: 0;
}

.ready-sheet__handle {
  width: 46px;
  height: 5px;
  margin: 9px auto 0;
  border-radius: 99px;
  background: color-mix(in srgb, var(--muted) 45%, transparent);
}

.ready-sheet__header {
  flex: 0 0 auto;
  min-height: 78px;
  padding: 12px 16px 13px;
  align-items: flex-start;
}

.ready-sheet__header h2 {
  margin-top: 3px;
  font-size: 21px;
  line-height: 26px;
}

.ready-sheet__header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.ready-sheet__close {
  width: 40px;
  height: 40px;
  border-radius: 14px;
}

.ready-sheet__scroll {
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  margin: 0;
  padding: 0 16px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ready-form-section {
  padding: 14px;
  border-radius: 18px;
  background: var(--surface-soft);
}

.ready-form-section + .ready-form-section {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 0;
}

.ready-form-section > header {
  margin-bottom: 12px;
}

.ready-form-section > header > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ready-form-section > header > div > span {
  width: 27px;
  height: 22px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--purple) 13%, transparent);
  color: var(--purple);
  display: grid;
  place-items: center;
  font-size: 8px;
  font-weight: 800;
}

.ready-form-section h3 {
  font-size: 14px;
}

.ready-form-section > header > strong {
  color: var(--muted);
  font-size: 9px;
}

.ready-form-grid {
  gap: 10px;
}

.ready-form-grid label > span,
.ready-full-field > span,
.ready-choice-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.ready-form-grid input,
.ready-form-grid select,
.ready-full-field input,
.ready-full-field textarea {
  height: 46px;
  padding: 0 12px;
  border-radius: 13px;
  background: var(--surface);
  font-size: 12px;
}

.ready-full-field textarea {
  height: 86px;
  padding-top: 12px;
  line-height: 1.45;
}

.ready-toggle-row {
  margin-top: 11px;
  padding: 11px 12px;
  border-radius: 14px;
  background: var(--surface);
}

.ready-toggle-row strong {
  font-size: 12px;
}

.ready-toggle-row small {
  font-size: 9px;
}

.ready-form-note {
  margin-top: 10px;
  padding: 10px 11px;
  border-radius: 13px;
  font-size: 9px;
}

.ready-choice-label {
  margin: 2px 0 7px;
}

.ready-choice-row {
  gap: 7px;
}

.ready-choice-row + .ready-choice-label {
  margin-top: 13px;
}

.ready-choice-row button {
  min-height: 36px;
  padding: 0 11px;
  border-radius: 11px;
  background: var(--surface);
  font-size: 9px;
}

.ready-choice-row button.active {
  box-shadow: 0 8px 18px color-mix(in srgb, var(--purple) 22%, transparent);
}

.ready-sheet__footer {
  flex: 0 0 auto;
  margin: 0;
  padding: 12px 16px 16px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 -10px 28px rgba(8, 6, 14, .10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.ready-sheet__footer button {
  min-height: 48px;
  font-size: 11px;
}

.ready-join-sheet .ready-sheet__header,
.ready-join-sheet .ready-form-grid,
.ready-join-sheet .ready-full-field,
.ready-join-sheet .ready-form-note,
.ready-join-sheet .ready-sheet__footer,
.ready-join-summary {
  margin-right: 16px;
  margin-left: 16px;
}

.ready-join-summary {
  margin-top: 2px;
  margin-bottom: 13px;
  padding: 11px;
  border-radius: 15px;
  background: color-mix(in srgb, var(--purple-soft) 34%, var(--surface));
  display: flex;
  align-items: center;
  gap: 10px;
}

.ready-join-summary__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--purple);
  display: grid;
  place-items: center;
}

.ready-join-summary__icon svg {
  width: 20px;
  height: 20px;
}

.ready-join-summary strong,
.ready-join-summary small {
  display: block;
}

.ready-join-summary strong {
  font-size: 12px;
}

.ready-join-summary small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.ready-join-grid {
  margin-top: 0;
}

.ready-join-sheet .ready-full-field {
  margin-top: 11px;
}

.ready-join-sheet .ready-sheet__footer {
  margin-top: 13px;
  padding-right: 0;
  padding-left: 0;
}

.ready-join-sheet .ready-sheet__header {
  padding-right: 0;
  padding-left: 0;
}

@media (max-height: 720px) {
  .ready-create-sheet {
    height: calc(100% - 12px);
    left: 6px;
    right: 6px;
    bottom: 6px;
  }

  .ready-sheet__header {
    min-height: 68px;
    padding-top: 8px;
  }

  .ready-sheet__header p {
    display: none;
  }

  .ready-form-section {
    padding: 12px;
  }
}


/* ================================================================
   Version 36: established HNT.ROCKS card radius
   ================================================================ */

/* Main content cards use the same restrained 8px radius as Feed cards.
   Menus, dropdowns, pills, avatars and circular controls keep their own radius. */
.ready-hero,
.ready-filter-panel,
.ready-lobby-card,
.ready-empty-state,
.ready-detail-stage-card,
.ready-detail-card,
.ready-hunter-list,
.ready-detail-sticky-action,
.ready-form-section {
  border-radius: 8px;
}

.ready-squad-stage {
  border-radius: 8px;
}

/* The Ready avatar opens the exact shared Feed user menu. */
body[data-page="ready-lobbies"] .user-popover,
body[data-page="ready-lobby-detail"] .user-popover {
  top: 88px;
  right: 12px;
  z-index: 92;
}

.ready-header-avatar[aria-expanded="true"] {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--purple) 34%, transparent);
}


/* ================================================================
   Version 37: Ready topbar parity and non-overlapping join action
   ================================================================ */

/* Header is a navigation surface, not a normal content card.
   It matches the Feed topbar radius and uses the same compact glass
   treatment once app-scroll passes the existing 18px threshold. */
.ready-page-header {
  border: 1px solid transparent;
  border-radius: 18px;
  transition:
    top 180ms ease,
    min-height 180ms ease,
    padding 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.ready-page-header__brand,
.ready-page-header__brand img,
.ready-page-header__copy h1 {
  transition:
    width 180ms ease,
    height 180ms ease,
    flex-basis 180ms ease,
    font-size 180ms ease;
}

.phone-shell.topbar-scrolled .ready-page-header {
  top: 8px;
  min-height: 60px;
  padding: 8px 10px;
  border-color: color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 8px 26px rgba(20, 22, 25, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

html[data-theme="dark"] .phone-shell.topbar-scrolled .ready-page-header {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.34);
}

.phone-shell.topbar-scrolled .ready-page-header__brand {
  width: 44px;
  height: 42px;
  flex-basis: 44px;
}

.phone-shell.topbar-scrolled .ready-page-header__brand img {
  width: 50px;
  height: 50px;
}

.phone-shell.topbar-scrolled .ready-page-header__copy h1 {
  font-size: 16px;
}

/* The detail CTA gets its own reserved viewport band between the
   scroll area and the shared 82px bottom navigation. Content can no
   longer slide underneath the join button. */
body[data-page="ready-lobby-detail"] .app-scroll {
  bottom: 156px;
}

.ready-detail-sticky-action {
  z-index: 29;
  bottom: 82px;
  border-radius: 8px;
}

.ready-detail-action-spacer {
  height: 24px;
}

@media (max-height: 700px) {
  body[data-page="ready-lobby-detail"] .app-scroll {
    bottom: 150px;
  }

  .ready-detail-sticky-action {
    padding: 6px 8px;
  }

  .ready-detail-sticky-action .ready-primary-button {
    height: 42px;
  }
}


/* ================================================================
   Version 38: join action in normal document flow
   ================================================================ */

/* The action is now part of the page flow. It cannot cover Lobby-Regeln,
   Common Ground, Hunter or any other content while scrolling. */
body[data-page="ready-lobby-detail"] .app-scroll {
  bottom: 82px;
}

.ready-detail-sticky-action,
.ready-detail-action-spacer {
  display: none;
}

.ready-detail-join-action {
  margin-top: 12px;
  padding: 8px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.ready-detail-join-action .ready-primary-button {
  width: 100%;
  height: 46px;
  font-size: 10px;
}

.ready-detail-page {
  padding-bottom: 24px;
}

@media (max-height: 700px) {
  body[data-page="ready-lobby-detail"] .app-scroll {
    bottom: 82px;
  }

  .ready-detail-join-action .ready-primary-button {
    height: 43px;
  }
}


/* ================================================================
   Version 63: Ready overview uses the exact shared Feed header
   ================================================================ */

/* The overview is a primary bottom-navigation destination. It therefore
   uses partials/main-header.html and the shared bottom navigation exactly
   like the Feed. Only the vertical placement is page-specific: the header
   sits close to the safe top edge instead of floating inside page content. */
body[data-page="feed"] .topbar,
body[data-page="ready-lobbies"] .topbar {
  top: max(10px, env(safe-area-inset-top));
}

body[data-page="ready-lobbies"] .ready-page {
  padding-top: calc(max(10px, env(safe-area-inset-top)) + 58px);
}

body[data-page="feed"] .phone-shell.topbar-scrolled .topbar,
body[data-page="ready-lobbies"] .phone-shell.topbar-scrolled .topbar {
  top: max(8px, env(safe-area-inset-top));
}

body[data-page="feed"] .topbar-popover,
body[data-page="ready-lobbies"] .topbar-popover {
  top: calc(max(10px, env(safe-area-inset-top)) + 52px);
}

body[data-page="feed"] .phone-shell.topbar-scrolled .topbar-popover,
body[data-page="ready-lobbies"] .phone-shell.topbar-scrolled .topbar-popover {
  top: calc(max(8px, env(safe-area-inset-top)) + 68px);
}

/* The old overview header is no longer rendered. These rules deliberately
   remain available for the detail page, which still needs a back action and
   page title rather than the global primary-navigation header. */

@media (max-width: 600px) {
  body[data-page="feed"] .topbar,
  body[data-page="ready-lobbies"] .topbar {
    left: 12px;
    width: calc(100% - 24px);
  }

  body[data-page="feed"] .phone-shell.topbar-scrolled .topbar,
  body[data-page="ready-lobbies"] .phone-shell.topbar-scrolled .topbar {
    left: 8px;
    width: calc(100% - 16px);
  }
}


/* ================================================================
   Own profile
   ================================================================ */

body[data-page="profile"] .app-scroll,
body[data-page="user-profile"] .app-scroll {
  background:
    radial-gradient(circle at 90% 1%, color-mix(in srgb, var(--purple) 12%, transparent), transparent 28%),
    var(--app-bg);
}

.profile-page {
  min-height: calc(100dvh - 82px);
  padding: 12px 12px 28px;
}

.profile-page button,
.profile-page input,
.profile-page select,
.profile-page textarea {
  font: inherit;
}

.profile-ready-header {
  margin: 0;
}

/* Profile header uses the exact Ready Lobby detail-header system. */

.profile-hero-card {
  margin-top: 18px;
  padding: 0 12px 14px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-cover {
  position: relative;
  height: 140px;
  margin: 0 -12px;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  background: #11110f;
}

.profile-cover > img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: auto;
  min-height: 100%;
  display: block;
  transform: translateY(-22%);
  object-fit: cover;
}

.profile-cover-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11,11,11,.08), rgba(11,11,11,.58)),
    linear-gradient(90deg, rgba(10,10,10,.26), transparent 52%);
}

.profile-media-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(8,6,14,.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.profile-media-button:hover,
.profile-media-button:focus-visible {
  color: var(--purple);
  outline: none;
}

.profile-media-button svg {
  width: 18px;
  height: 18px;
}

.profile-cover-button {
  position: absolute;
  right: 10px;
  top: 10px;
}

.profile-identity-row {
  position: relative;
  min-height: 96px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.profile-avatar-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  margin-top: -36px;
  flex: 0 0 88px;
  z-index: 2;
}

.profile-avatar-wrap > img {
  width: 88px;
  height: 88px;
  border: 4px solid var(--surface);
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-shadow: 0 8px 22px rgba(8,6,14,.18);
}

.profile-avatar-button {
  position: absolute;
  right: -1px;
  bottom: 0;
  width: 30px;
  height: 30px;
  border: 2px solid var(--surface);
  border-radius: 50%;
}

.profile-avatar-button svg {
  width: 15px;
  height: 15px;
}

.profile-identity-copy {
  min-width: 0;
  flex: 1;
  padding-top: 10px;
}

.profile-name-line {
  display: flex;
  align-items: center;
  gap: 7px;
}

.profile-name-line h2 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 19px;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-name-line span {
  min-height: 22px;
  padding: 0 7px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--purple) 12%, transparent);
  color: var(--purple);
  display: inline-flex;
  align-items: center;
  font-size: 7px;
  font-weight: 800;
  white-space: nowrap;
}

.profile-identity-copy > p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.profile-identity-copy > strong {
  display: block;
  margin-top: 5px;
  font-size: 9px;
  line-height: 1.35;
}

.profile-region {
  margin-top: 5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.profile-region svg {
  width: 14px;
  height: 14px;
  color: var(--purple);
}

.profile-region span {
  font-size: 8px;
}

.profile-bio {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.profile-stats {
  margin-top: 13px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 5px;
}

.profile-stats button {
  min-height: 64px;
  padding: 10px 4px;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--purple-soft) 80%, var(--surface)) 0%,
      color-mix(in srgb, var(--surface) 94%, var(--purple-soft)) 100%);
  color: var(--text);
  cursor: pointer;
}

.profile-stats button:hover,
.profile-stats button:focus-visible {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--purple) 34%, transparent);
  outline: none;
}

.profile-stats strong,
.profile-stats span {
  display: block;
}

.profile-stats strong {
  font-size: 16px;
}

.profile-stats span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.profile-actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 42px 42px;
  gap: 6px;
}

.profile-edit-button,
.profile-square-button {
  height: 42px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.profile-edit-button {
  background: var(--purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 800;
}

.profile-edit-button svg {
  width: 17px;
  height: 17px;
}

.profile-square-button {
  background: var(--surface-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
}

.profile-square-button svg {
  width: 21px;
  height: 21px;
}

.profile-tabs {
  position: sticky;
  top: 84px;
  z-index: 24;
  height: 46px;
  margin-top: 12px;
  padding: 0 4px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--app-bg) 94%, transparent);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: flex;
  align-items: stretch;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

.profile-tabs::-webkit-scrollbar {
  display: none;
}

.profile-tabs button {
  position: relative;
  min-width: max-content;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.profile-tabs button::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 2px;
  border-radius: 99px 99px 0 0;
  background: var(--purple);
  opacity: 0;
}

.profile-tabs button.active {
  color: var(--purple);
  font-weight: 800;
}

.profile-tabs button.active::after {
  opacity: 1;
}

.profile-tab-panels {
  margin-top: 12px;
}

.profile-tab-panel[hidden] {
  display: none !important;
}

.profile-tab-panel.active {
  display: block;
}

.profile-post-list {
  margin-top: 0;
  align-items: center;
}

.profile-hunt-media img {
  object-fit: cover;
  object-position: center 32%;
  transform: none;
}

.profile-section-heading {
  min-height: 43px;
  padding: 0 2px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 9px;
}

.profile-section-heading span,
.profile-info-card header > span,
.profile-dna-card header span {
  display: block;
  color: var(--purple);
  font-size: 7px;
  line-height: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.profile-section-heading h2,
.profile-info-card h2,
.profile-dna-card h2 {
  margin: 2px 0 0;
  font-size: 14px;
}

.profile-section-heading > strong {
  color: var(--muted);
  font-size: 7px;
}

.profile-info-card,
.profile-dna-card {
  padding: 14px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-info-card + .profile-info-card {
  margin-top: 10px;
}

.profile-info-card > p,
.profile-dna-card > p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.profile-info-grid {
  margin-top: 11px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 7px;
}

.profile-info-grid > div,
.profile-mini-stats > div {
  min-height: 57px;
  padding: 9px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.profile-info-grid strong,
.profile-info-grid span,
.profile-mini-stats strong,
.profile-mini-stats span {
  display: block;
}

.profile-info-grid strong {
  font-size: 9px;
}

.profile-info-grid span,
.profile-mini-stats span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
}

.profile-level-row {
  margin-top: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-level-row strong,
.profile-level-row span {
  display: block;
}

.profile-level-row strong {
  font-size: 10px;
}

.profile-level-row span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
}

.profile-level-row em {
  color: var(--purple);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.profile-progress {
  height: 7px;
  margin-top: 8px;
  border-radius: 99px;
  background: var(--surface-soft);
  overflow: hidden;
}

.profile-progress i {
  width: 74%;
  height: 100%;
  border-radius: inherit;
  background: var(--purple);
  display: block;
}

.profile-mini-stats {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 6px;
}

.profile-mini-stats > div {
  min-height: 50px;
  text-align: center;
}

.profile-mini-stats strong {
  font-size: 11px;
}

.profile-moments-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
}

.profile-moments-grid > button {
  position: relative;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.profile-moments-grid img {
  width: 100%;
  height: 150px;
  display: block;
  object-fit: cover;
}

.profile-moments-grid > button:nth-child(-n+2) img {
  object-position: center 29%;
}

.profile-moment-play {
  position: absolute;
  left: 50%;
  top: 61px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(12,12,14,.58);
  color: #fff;
  display: grid;
  place-items: center;
  transform: translateX(-50%);
  backdrop-filter: blur(7px);
}

.profile-moment-play svg {
  width: 18px;
  height: 18px;
}

.profile-moments-grid > button > div {
  min-height: 54px;
  padding: 9px;
}

.profile-moments-grid strong,
.profile-moments-grid > button > div span {
  display: block;
}

.profile-moments-grid strong {
  overflow: hidden;
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-moments-grid > button > div span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
}

.profile-friends-list {
  margin-top: 10px;
  padding: 6px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-friends-list > button {
  width: 100%;
  min-height: 65px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
}

.profile-friends-list > button:hover,
.profile-friends-list > button:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.profile-friends-list img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-friends-list > button > div {
  min-width: 0;
  flex: 1;
}

.profile-friends-list strong,
.profile-friends-list span,
.profile-friends-list small {
  display: block;
}

.profile-friends-list strong {
  font-size: 10px;
}

.profile-friends-list span,
.profile-friends-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
}

.profile-friends-list em {
  min-height: 23px;
  padding: 0 7px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--purple) 12%, transparent);
  color: var(--purple);
  display: inline-flex;
  align-items: center;
  font-size: 6px;
  font-style: normal;
  font-weight: 800;
}

.profile-badges-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.profile-badges-list article {
  min-height: 73px;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 9px;
}

.profile-badges-list article > span {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--purple) 12%, transparent);
  color: var(--purple);
  display: grid;
  place-items: center;
  flex: 0 0 44px;
}

.profile-badges-list svg {
  width: 23px;
  height: 23px;
}

.profile-badges-list article > div {
  min-width: 0;
  flex: 1;
}

.profile-badges-list strong,
.profile-badges-list small {
  display: block;
}

.profile-badges-list strong {
  font-size: 10px;
}

.profile-badges-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.35;
}

.profile-badges-list em {
  min-height: 23px;
  padding: 0 7px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--purple);
  display: inline-flex;
  align-items: center;
  font-size: 6px;
  font-style: normal;
  font-weight: 800;
}

.profile-dna-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.profile-dna-card header > strong {
  min-height: 24px;
  padding: 0 7px;
  border-radius: 8px;
  background: rgba(31,193,107,.12);
  color: var(--success);
  display: inline-flex;
  align-items: center;
  font-size: 6px;
}

.profile-dna-bars {
  margin-top: 13px;
  display: grid;
  gap: 10px;
}

.profile-dna-bars label {
  display: grid;
  grid-template-columns: 84px 1fr 28px;
  align-items: center;
  gap: 7px;
}

.profile-dna-bars label > span,
.profile-dna-bars em {
  font-size: 7px;
}

.profile-dna-bars em {
  color: var(--purple);
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.profile-dna-bars i {
  height: 7px;
  border-radius: 99px;
  background: var(--surface-soft);
  overflow: hidden;
}

.profile-dna-bars b {
  height: 100%;
  border-radius: inherit;
  background: var(--purple);
  display: block;
}

.profile-dna-tags {
  margin-top: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-dna-tags span {
  min-height: 25px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  font-size: 7px;
  font-weight: 700;
}

.profile-dna-card > button {
  width: 100%;
  height: 40px;
  margin-top: 13px;
  border: 0;
  border-radius: 8px;
  background: var(--purple);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

/* Profile edit sheet */
.profile-edit-backdrop {
  z-index: 140;
  background: rgba(8,6,14,.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.profile-edit-sheet {
  position: absolute;
  z-index: 142;
  left: 10px;
  right: 10px;
  bottom: -760px;
  max-height: calc(100% - 20px);
  padding: 15px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 -24px 74px rgba(8,6,14,.34);
  opacity: 0;
  pointer-events: none;
  transition: bottom .26s cubic-bezier(.2,.8,.2,1), opacity .18s ease;
}

.profile-edit-sheet.open {
  bottom: 10px;
  opacity: 1;
  pointer-events: auto;
}

.profile-edit-sheet__header {
  min-height: 45px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.profile-edit-sheet__header span {
  color: var(--purple);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.profile-edit-sheet__header h2 {
  margin: 2px 0 0;
  font-size: 17px;
}

.profile-edit-sheet__header button {
  width: 35px;
  height: 35px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.profile-edit-sheet__header svg {
  width: 17px;
  height: 17px;
}

.profile-edit-sheet__scroll {
  max-height: calc(100dvh - 190px);
  margin-top: 9px;
  padding-right: 2px;
  overflow-y: auto;
  scrollbar-width: none;
}

.profile-edit-sheet__scroll::-webkit-scrollbar {
  display: none;
}

.profile-edit-media {
  display: grid;
  gap: 6px;
}

.profile-edit-media button {
  width: 100%;
  min-height: 54px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
}

.profile-edit-media button > span {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--surface);
  color: var(--purple);
  display: grid;
  place-items: center;
}

.profile-edit-media button > span svg {
  width: 19px;
  height: 19px;
}

.profile-edit-media button > div {
  min-width: 0;
  flex: 1;
}

.profile-edit-media strong,
.profile-edit-media small {
  display: block;
}

.profile-edit-media strong {
  font-size: 9px;
}

.profile-edit-media small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
}

.profile-edit-media button > svg {
  width: 15px;
  height: 15px;
  transform: rotate(-90deg);
}

.profile-edit-grid {
  margin-top: 11px;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
}

.profile-edit-grid label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.profile-edit-grid label > span {
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
}

.profile-edit-grid input,
.profile-edit-grid select,
.profile-edit-grid textarea {
  width: 100%;
  min-width: 0;
  height: 39px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  outline: none;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 9px;
}

.profile-edit-grid textarea {
  height: 76px;
  padding-top: 9px;
  resize: none;
}

.profile-edit-wide {
  grid-column: 1 / -1;
}

.profile-edit-toggle {
  margin-top: 10px;
  padding: 9px;
  border-radius: 8px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.profile-edit-toggle strong,
.profile-edit-toggle small {
  display: block;
}

.profile-edit-toggle strong {
  font-size: 9px;
}

.profile-edit-toggle small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
}

.profile-edit-toggle input {
  accent-color: var(--purple);
}

.profile-edit-sheet__footer {
  margin-top: 12px;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 8px;
}

.profile-edit-sheet__footer button {
  height: 42px;
  border: 0;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.profile-edit-sheet__footer button:first-child {
  background: var(--surface-soft);
  color: var(--muted);
}

.profile-edit-sheet__footer button:last-child {
  background: var(--purple);
  color: #fff;
}

.phone-shell.profile-edit-open .app-scroll {
  overflow: hidden;
}

body[data-page="profile"] .user-popover {
  top: 88px;
  right: 12px;
  z-index: 92;
}

@media (max-width: 359px) {
  .profile-page {
    padding-right: 9px;
    padding-left: 9px;
  }

  .profile-name-line h2 {
    font-size: 17px;
  }

  .profile-identity-copy > strong {
    font-size: 8px;
  }

  .profile-tabs button {
    padding-right: 8px;
    padding-left: 8px;
  }

  .profile-edit-grid {
    grid-template-columns: 1fr;
  }

  .profile-edit-wide {
    grid-column: auto;
  }
}


/* ================================================================
   Version 55: shared own/foreign profile system
   ================================================================ */

.profile-actions-own {
  grid-template-columns: minmax(0, 1fr) 42px;
}

.profile-actions-foreign {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-friend-button,
.profile-message-button {
  min-width: 0;
  height: 42px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.profile-friend-button {
  background: var(--purple);
  color: #fff;
}

.profile-friend-button[data-relationship="friend"],
.profile-friend-button[data-relationship="outgoing"] {
  background: color-mix(in srgb, var(--purple) 13%, var(--surface-soft));
  color: var(--purple);
}

.profile-message-button {
  background: var(--surface-soft);
  color: var(--purple);
}

.profile-friend-button:hover,
.profile-friend-button:focus-visible,
.profile-message-button:hover,
.profile-message-button:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--purple) 38%, transparent);
}

.profile-friend-button svg,
.profile-message-button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.foreign-profile .profile-avatar-wrap {
  margin-top: -36px;
}

.foreign-profile .profile-cover,
.foreign-profile .profile-avatar-wrap > img {
  cursor: default;
}


/* ================================================================
   HNT.ROCKS warm dark palette – visual test
   ================================================================ */

html[data-theme="dark"] body {
  background: #0d0d0b;
}

html[data-theme="dark"] .phone-shell {
  background: #141412;
  box-shadow: 0 18px 64px rgba(0,0,0,.58);
}

html[data-theme="dark"] .app-scroll {
  background: #141412;
}

html[data-theme="dark"] .hero {
  background:
    radial-gradient(circle at 82% 8%, rgba(214,168,79,.08), transparent 34%),
    #181816;
}

html[data-theme="dark"] .tile {
  background: #20201e;
}

html[data-theme="dark"] .purple-glow {
  background: rgba(214,168,79,.34);
  opacity: .68;
}

html[data-theme="dark"] .feed::before {
  background: rgba(123,48,38,.72);
  opacity: .42;
}

html[data-theme="dark"] .round-control,
html[data-theme="dark"] .composer-bar,
html[data-theme="dark"] .post-card,
html[data-theme="dark"] .profile-hero-card,
html[data-theme="dark"] .profile-info-card,
html[data-theme="dark"] .profile-dna-card,
html[data-theme="dark"] .ready-lobby-card,
html[data-theme="dark"] .ready-detail-card,
html[data-theme="dark"] .ready-detail-stage-card {
  border: 1px solid rgba(52,48,37,.58);
}

html[data-theme="dark"] .topbar-popover,
html[data-theme="dark"] .user-popover,
html[data-theme="dark"] .messages-popover,
html[data-theme="dark"] .notifications-popover,
html[data-theme="dark"] .create-popover,
html[data-theme="dark"] .search-panel,
html[data-theme="dark"] .side-menu {
  border-color: #343025;
}

html[data-theme="dark"] .bottom-nav {
  border-top: 1px solid #343025;
  background: #181816;
}

html[data-theme="dark"] .bottom-nav::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214,168,79,.28), transparent);
}

html[data-theme="dark"] .nav-create {
  box-shadow: 0 8px 20px rgba(214,168,79,.22);
}

html[data-theme="dark"] .post-copy,
html[data-theme="dark"] .post-author strong,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3 {
  color: #f2e8d8;
}

html[data-theme="dark"] .post-author span,
html[data-theme="dark"] .post-author .activity,
html[data-theme="dark"] .profile-bio,
html[data-theme="dark"] .profile-region,
html[data-theme="dark"] .ready-hero__copy p {
  color: #b7ab9b;
}

html[data-theme="dark"] .phone-shell.topbar-scrolled .topbar,
html[data-theme="dark"] .phone-shell.topbar-scrolled .profile-page-header,
html[data-theme="dark"] .phone-shell.topbar-scrolled .ready-page-header {
  border-color: #343025;
  background: rgba(32,32,30,.9);
  box-shadow: 0 10px 30px rgba(0,0,0,.44);
}

html[data-theme="dark"] .profile-tabs {
  border-bottom-color: #343025;
  background: rgba(20,20,18,.92);
}

html[data-theme="dark"] .media-dots i {
  background: #514b40;
}

html[data-theme="dark"] .media-dots i:first-child {
  background: var(--purple);
}

html[data-theme="dark"] .sheet-backdrop,
html[data-theme="dark"] .modal-backdrop,
html[data-theme="dark"] .profile-edit-backdrop,
html[data-theme="dark"] .ready-sheet-backdrop {
  background: rgba(7,7,6,.7);
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  caret-color: var(--purple);
}


/* ================================================================
   Version 41: compact Feed hero
   ================================================================ */

/* The greeting and Add Moment area is intentionally removed.
   Header and composer remain in the existing Feed hero shell. */
.hero-compact {
  height: 226px;
}

/* The unused lower decorative tiles disappear instead of leaving
   empty blocks behind. */
.hero-compact .tile-c,
.hero-compact .tile-d {
  top: 121px;
  height: 105px;
}

.hero-compact .tile-e,
.hero-compact .tile-f {
  display: none;
}

.hero-compact .purple-glow {
  left: 146px;
  top: 74px;
  width: 92px;
  height: 94px;
  opacity: .44;
}

/* Composer gets more vertical room than before and still keeps the
   full available Feed width. */
.hero-compact .composer-bar {
  top: 137px;
  height: 64px;
  padding: 10px 10px 10px 18px;
  border-radius: 12px;
  font-size: 14px;
}

.hero-compact .composer-plus {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.hero-compact .composer-plus svg {
  width: 25px;
  height: 25px;
}

@media (max-width: 359px) {
  .hero-compact {
    height: 220px;
  }

  .hero-compact .composer-bar {
    top: 133px;
    height: 62px;
    padding-left: 15px;
    font-size: 13px;
  }

  .hero-compact .composer-plus {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
}


/* ================================================================
   Version 42: exact compact Feed composer bar
   ================================================================ */

.hero-compact {
  height: 208px;
}

.hero-compact .tile-c,
.hero-compact .tile-d {
  top: 121px;
  height: 87px;
}

.hero-compact .composer-plus {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}

.hero-compact .composer-bar {
  top: 137px;
  height: 50px;
  padding: 10px 10px 10px 18px;
  border-radius: 12px;
  font-size: 14px;
}

.hero-compact .composer-plus svg {
  width: 23px;
  height: 23px;
}

@media (max-width: 359px) {
  .hero-compact {
    height: 204px;
  }

  .hero-compact .tile-c,
  .hero-compact .tile-d {
    top: 121px;
    height: 83px;
  }

  .hero-compact .composer-bar {
    top: 137px;
    height: 50px;
    padding: 10px 10px 10px 18px;
    font-size: 13px;
  }

  .hero-compact .composer-plus {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }
}

/* ================================================================
   Version 43: one modal radius
   ================================================================ */

/* True modal/dialog surfaces only. Menus, popovers, pills and dropdowns
   retain their purpose-specific radii. */
[role="dialog"][aria-modal="true"] {
  border-radius: 18px !important;
}

/* ================================================================
   Version 44: unified 18px system surfaces
   ================================================================ */

/* Testweise gehen wir für Menüs, Dropdowns und ähnliche Shells ebenfalls
   auf 18px. Kompakte innere Einträge bleiben etwas kleiner, damit die
   Oberflächen nicht klobig wirken. */
.topbar-popover,
.create-popover,
.side-menu,
.composer-flyout,
.post-options-popover,
.share-dialog,
.search-overlay,
.user-popover,
.notifications-popover,
.messages-popover {
  border-radius: 18px !important;
}

.create-popover-tall {
  border-radius: 18px !important;
}

.topbar-popover,
.create-popover,
.composer-flyout,
.post-options-popover,
.share-dialog,
.side-menu {
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
}

.topbar-popover-header,
.user-popover-profile,
.interaction-sheet-header,
.share-dialog-header,
.post-options-popover > header {
  position: relative;
}

.topbar-popover-header::after,
.user-popover-profile::after,
.interaction-sheet-header::after,
.share-dialog-header::after,
.post-options-popover > header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -11px;
  height: 1px;
  background: color-mix(in srgb, var(--line) 88%, transparent);
}

.topbar-popover-header,
.user-popover-profile,
.interaction-sheet-header,
.share-dialog-header,
.post-options-popover > header,
.ready-sheet__header {
  padding-bottom: 12px;
}

.message-entry,
.notification-entry,
.friend-request,
.user-menu-links > button,
.accent-options > button,
.create-popover button,
.create-popover-tall button,
.composer-visibility-menu > button,
.composer-feeling-menu button,
.composer-visibility-menu-modern > button,
.post-option-button,
.share-target,
.likes-list article,
.comment-bubble,
.comment-composer,
.ready-join-summary {
  border-radius: 14px !important;
}

.popover-header-action,
.sheet-icon-close,
.share-dialog-close,
.post-options-popover > header button,
.ready-sheet__close,
.search-overlay-close,
.search-filter-settings,
.ready-project-settings {
  border-radius: 14px !important;
}

.interaction-sheet {
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background:
    linear-gradient(
      150deg,
      color-mix(in srgb, var(--surface) 97%, var(--purple) 3%) 0%,
      color-mix(in srgb, var(--surface) 96%, transparent) 55%,
      var(--surface) 100%
    );
}

.likes-list {
  margin-top: 22px;
}

.likes-list article {
  padding: 10px;
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
}

.likes-list article:hover {
  border-color: color-mix(in srgb, var(--purple) 28%, var(--line));
  background: color-mix(in srgb, var(--purple-soft) 34%, var(--surface));
}

.comment-bubble {
  padding: 12px 12px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
}

.comment-composer {
  padding: 8px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
}

.comment-composer button {
  border-radius: 12px;
}

/* Ready create adopts the same project-form language as Search/Composer. */
.ready-sheet {
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
}

.ready-sheet__header {
  min-height: 88px;
  padding: 14px 16px 14px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
}

.ready-sheet__scroll.ready-project-scroll {
  padding: 0 14px 18px;
}

.ready-project-intro {
  position: relative;
  min-height: 114px;
  padding: 14px 14px 15px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
}

.ready-project-copy {
  position: relative;
  z-index: 2;
  max-width: 210px;
}

.ready-project-kicker {
  display: block;
  color: var(--purple);
  font-size: 7px;
  line-height: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.ready-project-copy h3 {
  margin: 5px 0 0;
  font-size: 18px;
  line-height: 1.16;
}

.ready-project-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.ready-project-art {
  position: relative;
  width: 80px;
  height: 72px;
  opacity: .82;
  pointer-events: none;
  flex: 0 0 80px;
}

.ready-project-art-card {
  position: absolute;
  width: 36px;
  height: 36px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-soft) 84%, transparent);
  color: var(--text);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.ready-project-art-card svg {
  width: 18px;
  height: 18px;
}

.ready-project-art-card-one { left: 1px; top: 24px; transform: rotate(-8deg); }
.ready-project-art-card-two { left: 28px; top: 5px; transform: rotate(7deg); }
.ready-project-art-card-three { right: 0; top: 29px; transform: rotate(-5deg); }

.ready-project-divider {
  height: 1px;
  margin: 0 0 10px;
  background: color-mix(in srgb, var(--line) 88%, transparent);
}

.ready-project-toolbar {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ready-project-tabs {
  min-width: 0;
  flex: 1;
  height: 44px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-soft);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.ready-project-tabs button {
  min-width: 0;
  height: 36px;
  padding: 0 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: default;
}

.ready-project-tabs button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ready-project-tabs button.active svg { color: var(--purple); }
.ready-project-tabs svg { width: 15px; height: 15px; }
.ready-project-tabs span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 7px; font-weight: 800; }

.ready-project-settings {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
}

.ready-project-settings svg { width: 18px; height: 18px; }

.ready-project-stage {
  position: relative;
  min-height: 90px;
  margin-bottom: 10px;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(
      135deg,
      transparent 0,
      transparent 34%,
      color-mix(in srgb, var(--surface-soft) 64%, transparent) 34%,
      color-mix(in srgb, var(--surface-soft) 64%, transparent) 50%,
      transparent 50%,
      transparent 84%,
      color-mix(in srgb, var(--surface-soft) 64%, transparent) 84%
    ),
    color-mix(in srgb, var(--surface) 88%, var(--surface-soft));
  background-size: 40px 40px;
  overflow: hidden;
}

.ready-project-stage::after {
  content: '';
  position: absolute;
  width: 110px;
  height: 110px;
  right: -42px;
  top: -52px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--purple) 15%, transparent);
  filter: blur(34px);
  pointer-events: none;
}

.ready-project-stage__icon,
.ready-project-stage > div,
.ready-project-stage__meta {
  position: relative;
  z-index: 2;
}

.ready-project-stage__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--purple);
  display: grid;
  place-items: center;
}

.ready-project-stage__icon svg { width: 18px; height: 18px; }
.ready-project-stage > div { margin-top: 8px; }
.ready-project-stage strong, .ready-project-stage small { display: block; }
.ready-project-stage strong { font-size: 10px; line-height: 14px; }
.ready-project-stage small { margin-top: 3px; color: var(--muted); font-size: 7px; line-height: 10px; }

.ready-project-stage__meta {
  margin-top: 9px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.ready-project-stage__meta span {
  min-height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  font-size: 7px;
  font-weight: 700;
}

.ready-form-section--project {
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 97%, transparent);
}

.ready-form-section--project + .ready-form-section--project {
  margin-top: 10px;
}

.ready-form-section--project > header {
  position: relative;
  padding-bottom: 11px;
  margin-bottom: 12px;
}

.ready-form-section--project > header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: color-mix(in srgb, var(--line) 88%, transparent);
}

.ready-form-section--project .ready-form-grid input,
.ready-form-section--project .ready-form-grid select,
.ready-form-section--project .ready-full-field input,
.ready-form-section--project .ready-full-field textarea,
.ready-form-section--project .ready-toggle-row,
.ready-form-section--project .ready-form-note,
.ready-form-section--project .ready-choice-row button {
  border-radius: 14px;
}

.ready-form-section--project .ready-form-grid input,
.ready-form-section--project .ready-form-grid select,
.ready-form-section--project .ready-full-field input,
.ready-form-section--project .ready-full-field textarea {
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
}

.ready-sheet__footer--project {
  border-top: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
}

.ready-sheet__footer--project .ready-secondary-button,
.ready-sheet__footer--project .ready-primary-button {
  border-radius: 14px;
}

@media (max-width: 359px) {
  .ready-project-art {
    display: none;
  }

  .ready-project-copy {
    max-width: none;
  }

  .ready-project-tabs span {
    display: none;
  }

  .ready-project-tabs svg {
    width: 17px;
    height: 17px;
  }
}

/* ================================================================
   HNT.ROCKS Maps overview + fullscreen detail
   ================================================================ */

body[data-page="maps"] .app-scroll {
  padding-top: 120px;
}

.maps-overview-page {
  min-height: 100%;
  padding: 0 16px 112px;
  background:
    radial-gradient(circle at 94% 2%, color-mix(in srgb, var(--purple) 10%, transparent), transparent 22%),
    var(--app-bg);
}

.maps-overview-hero {
  position: relative;
  min-height: 360px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 96%, var(--purple) 4%), var(--surface));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .12);
}

.maps-overview-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--purple) 20%, transparent);
  filter: blur(70px);
  pointer-events: none;
}

.maps-overview-copy {
  position: relative;
  z-index: 2;
  width: 58%;
}

.maps-kicker {
  display: block;
  color: var(--purple);
  font-size: 8px;
  line-height: 11px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.maps-overview-copy h1 {
  margin: 7px 0 0;
  font-size: 29px;
  line-height: 1.08;
  letter-spacing: -.7px;
}

.maps-overview-copy h1 strong {
  color: var(--purple);
}

.maps-overview-copy > p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.maps-hero-meta {
  margin-top: 15px;
  display: flex;
  gap: 7px;
}

.maps-hero-meta > span {
  min-width: 72px;
  padding: 9px 10px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.maps-hero-meta strong,
.maps-hero-meta small {
  display: block;
}

.maps-hero-meta strong {
  font-size: 15px;
}

.maps-hero-meta small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
}

.maps-primary-action {
  height: 42px;
  margin-top: 15px;
  padding: 0 13px;
  border: 0;
  border-radius: 12px;
  background: var(--purple);
  color: #17140f;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.maps-primary-action svg {
  width: 18px;
  height: 18px;
}

.maps-feature-preview {
  position: absolute;
  z-index: 1;
  width: 183px;
  height: 240px;
  right: -24px;
  bottom: 21px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--purple) 38%, var(--line));
  border-radius: 18px;
  overflow: hidden;
  background: #11120f;
  box-shadow: 0 24px 52px rgba(0,0,0,.34);
  transform: rotate(-4deg);
  cursor: pointer;
}

.maps-feature-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
}

.maps-feature-status {
  position: absolute;
  left: 10px;
  bottom: 10px;
  height: 26px;
  padding: 0 9px;
  border-radius: 10px;
  background: rgba(18,18,16,.82);
  color: #f2e8d8;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 7px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.maps-feature-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #79c969;
  box-shadow: 0 0 0 3px rgba(121,201,105,.13);
}

.maps-feature-compass {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: rgba(18,18,16,.75);
  color: var(--purple);
  display: grid;
  place-items: center;
  backdrop-filter: blur(10px);
}

.maps-feature-compass svg {
  width: 18px;
  height: 18px;
}

.maps-directory {
  margin-top: 18px;
}

.maps-directory-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.maps-directory-heading h2,
.maps-tool-preview-heading h2 {
  margin: 4px 0 0;
  font-size: 18px;
  line-height: 23px;
}

.maps-count {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.maps-search-panel {
  margin-top: 10px;
  padding: 10px;
  border-radius: 18px;
  background: var(--surface);
}

.maps-search-field {
  height: 44px;
  padding: 0 10px;
  border-radius: 14px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}

.maps-search-field > svg {
  width: 18px;
  height: 18px;
  color: var(--purple);
}

.maps-search-field input {
  min-width: 0;
  flex: 1;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 9px;
}

.maps-search-field button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
}

.maps-search-field button svg {
  width: 13px;
  height: 13px;
}

.maps-filter-row {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.maps-filter-row::-webkit-scrollbar { display: none; }

.maps-filter-row button {
  min-width: max-content;
  height: 31px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  cursor: pointer;
}

.maps-filter-row button.active {
  border-color: color-mix(in srgb, var(--purple) 42%, var(--line));
  background: color-mix(in srgb, var(--purple-soft) 45%, var(--surface));
  color: var(--purple);
}

.maps-card-list {
  margin-top: 10px;
  display: grid;
  gap: 9px;
}

.map-directory-card {
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  transition: opacity 160ms ease, transform 160ms ease;
}

.map-directory-card[hidden] {
  display: none;
}

.map-directory-card > button {
  width: 100%;
  min-height: 132px;
  padding: 9px;
  border: 0;
  background: transparent;
  color: var(--text);
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 22px;
  gap: 10px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.map-card-preview {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 8px;
  overflow: hidden;
  background: #11120f;
}

.map-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.map-card-preview i {
  position: absolute;
  left: 7px;
  top: 7px;
  height: 22px;
  padding: 0 7px;
  border-radius: 8px;
  background: rgba(17,18,15,.78);
  color: var(--purple);
  display: flex;
  align-items: center;
  font-size: 6px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.map-card-body {
  min-width: 0;
}

.map-card-eyebrow {
  color: var(--purple);
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.map-card-body > strong,
.map-card-body > small {
  display: block;
}

.map-card-body > strong {
  margin-top: 4px;
  font-size: 14px;
  line-height: 18px;
}

.map-card-body > small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.42;
}

.map-card-tags {
  margin-top: 8px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.map-card-tags i {
  min-height: 23px;
  padding: 0 7px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  font-size: 6px;
  font-style: normal;
  font-weight: 700;
}

.map-card-open {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
}

.map-card-open svg {
  width: 12px;
  height: 12px;
  transform: rotate(-90deg);
}

.maps-empty-state {
  min-height: 190px;
  margin-top: 10px;
  border-radius: 8px;
  background: var(--surface);
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.maps-empty-state[hidden] { display: none; }

.maps-empty-state > span {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
}

.maps-empty-state svg { width: 24px; height: 24px; }
.maps-empty-state strong { margin-top: 10px; font-size: 12px; }
.maps-empty-state small { margin-top: 4px; color: var(--muted); font-size: 8px; }

.maps-tool-preview {
  margin-top: 18px;
  padding: 15px;
  border-radius: 18px;
  background: var(--surface);
}

.maps-tool-preview-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.maps-tool-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.maps-tool-grid article {
  min-height: 83px;
  padding: 10px;
  border-radius: 14px;
  background: var(--surface-soft);
}

.maps-tool-grid article > span {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--purple);
  display: grid;
  place-items: center;
}

.maps-tool-grid svg { width: 17px; height: 17px; }
.maps-tool-grid strong, .maps-tool-grid small { display: block; }
.maps-tool-grid strong { margin-top: 8px; font-size: 9px; }
.maps-tool-grid small { margin-top: 2px; color: var(--muted); font-size: 7px; }

/* Fullscreen detail --------------------------------------------------------- */
body[data-page="map-detail"] {
  background: #0b0c0a;
}

body[data-page="map-detail"] .phone-shell {
  background: #0b0c0a;
}

body[data-page="map-detail"] .app-scroll {
  inset: 0;
  overflow: hidden;
  background: #0b0c0a;
}

.map-explorer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0b0c0a;
  touch-action: none;
}

.map-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  background: #10110f;
  touch-action: none;
}

.map-viewport.dragging { cursor: grabbing; }
.map-viewport.measure-mode,
.map-viewport.submit-mode { cursor: crosshair; }

.map-transform-layer {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(116vh, 760px);
  height: min(116vh, 760px);
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center;
  will-change: transform;
  user-select: none;
}

.map-transform-layer > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

.map-lines-layer {
  position: absolute;
  inset: 0;
  opacity: .72;
  pointer-events: none;
  background:
    repeating-radial-gradient(circle at 50% 50%, transparent 0 58px, rgba(214,168,79,.08) 59px 60px),
    linear-gradient(90deg, transparent 49.8%, rgba(214,168,79,.16) 50%, transparent 50.2%),
    linear-gradient(transparent 49.8%, rgba(214,168,79,.16) 50%, transparent 50.2%);
  transition: opacity 160ms ease;
}

.map-lines-layer.hidden { opacity: 0; }

.map-marker {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  padding: 0;
  border: 2px solid rgba(242,232,216,.88);
  border-radius: 50%;
  background: #171715;
  color: #f2e8d8;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.45), 0 0 0 4px rgba(23,23,21,.36);
  cursor: pointer;
  transform: scale(calc(1 / var(--map-scale, 1)));
  transform-origin: center;
  transition: opacity 150ms ease, transform 150ms ease;
}

.map-marker span {
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
}

.map-marker:hover,
.map-marker:focus-visible {
  z-index: 5;
  outline: none;
  box-shadow: 0 7px 22px rgba(0,0,0,.5), 0 0 0 5px color-mix(in srgb, var(--purple) 30%, transparent);
}

.map-marker.marker-compound { border-color: #d6a84f; color: #d6a84f; }
.map-marker.marker-cash { border-color: #d0bd57; color: #d0bd57; }
.map-marker.marker-spawn { border-color: #6d9dc5; color: #6d9dc5; }
.map-marker.marker-supply { border-color: #69a878; color: #69a878; }
.map-marker.marker-extract { border-color: #e2ddd2; color: #e2ddd2; }
.map-marker.marker-boss { border-color: #bd5b4d; color: #bd5b4d; }
.map-marker.marker-tower { border-color: #a9815e; color: #a9815e; }
.map-marker.marker-wild { border-color: #839865; color: #839865; }
.map-marker.marker-tarot { border-color: #9d83b4; color: #9d83b4; }
.map-marker.filtered-out { opacity: 0; pointer-events: none; }
.map-marker.search-muted { opacity: .18; }

.map-measure-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 8;
  pointer-events: none;
}

.map-measure-overlay line {
  stroke: var(--purple);
  stroke-width: .55;
  stroke-dasharray: 2 1.4;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.7));
}

.map-measure-overlay circle {
  fill: var(--purple);
  stroke: #171715;
  stroke-width: .55;
  opacity: 0;
}

.map-measure-overlay.active circle { opacity: 1; }

.map-floating-header {
  position: absolute;
  z-index: 30;
  left: 10px;
  right: 10px;
  top: max(10px, env(safe-area-inset-top));
  min-height: 64px;
  padding: 7px;
  border: 0;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 91%, transparent);
  box-shadow: 0 12px 32px rgba(0,0,0,.34);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 7px;
  align-items: center;
}

.map-round-button {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: rgba(40,40,36,.92);
  color: #f2e8d8;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.map-round-button > svg {
  width: 20px;
  height: 20px;
}

#mapBackButton > svg { transform: rotate(90deg); }

.map-avatar-button {
  overflow: hidden;
  background: transparent;
}

.map-avatar-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.map-title-button {
  min-width: 0;
  min-height: 48px;
  padding: 2px 30px 2px 6px;
  border: 0;
  background: transparent;
  color: #f2e8d8;
  text-align: left;
  position: relative;
  cursor: pointer;
}

.map-title-button strong,
.map-title-button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-title-button strong {
  margin-top: 1px;
  font-size: 13px;
  line-height: 17px;
}

.map-title-button small {
  margin-top: 1px;
  color: #aca292;
  font-size: 7px;
}

.map-title-button > svg {
  position: absolute;
  right: 6px;
  top: 18px;
  width: 13px;
  height: 13px;
}

.map-switcher-menu {
  position: absolute;
  z-index: 45;
  left: 10px;
  right: 10px;
  top: 82px;
  padding: 12px;
  border: 1px solid #343025;
  border-radius: 18px;
  background: rgba(32,32,30,.97);
  box-shadow: 0 22px 66px rgba(0,0,0,.5);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(.98);
  transition: 170ms ease;
}

.map-switcher-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.map-switcher-menu > header {
  padding: 2px 2px 10px;
  border-bottom: 1px solid #343025;
}

.map-switcher-menu > header strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}

.map-switcher-menu > button {
  width: 100%;
  min-height: 58px;
  margin-top: 5px;
  padding: 6px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #f2e8d8;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
}

.map-switcher-menu > button:hover,
.map-switcher-menu > button.active {
  background: #282824;
}

.map-switcher-menu img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
}

.map-switcher-menu button > span {
  min-width: 0;
  flex: 1;
}

.map-switcher-menu strong,
.map-switcher-menu small {
  display: block;
}

.map-switcher-menu button strong { font-size: 10px; }
.map-switcher-menu button small { margin-top: 2px; color: #aca292; font-size: 7px; }
.map-switcher-menu button b { color: var(--purple); opacity: 0; }
.map-switcher-menu button.active b { opacity: 1; }

.map-zoom-controls {
  position: absolute;
  z-index: 24;
  right: 10px;
  top: 94px;
  width: 44px;
  padding: 4px;
  border-radius: 18px;
  background: rgba(24,24,22,.84);
  border: 1px solid rgba(214,168,79,.16);
  box-shadow: 0 14px 34px rgba(0,0,0,.3);
  backdrop-filter: blur(16px);
  display: grid;
  gap: 3px;
}

.map-zoom-controls button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #f2e8d8;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.map-zoom-controls button:hover { background: #282824; color: var(--purple); }
.map-zoom-controls svg { width: 18px; height: 18px; }
.map-zoom-controls span { font-size: 24px; line-height: 1; font-weight: 400; }

.map-compass {
  position: absolute;
  z-index: 20;
  left: 15px;
  top: 98px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(214,168,79,.35);
  background: rgba(24,24,22,.78);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
  backdrop-filter: blur(12px);
}

.map-compass i {
  position: absolute;
  top: 5px;
  color: var(--purple);
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
}

.map-compass span {
  width: 2px;
  height: 20px;
  background: linear-gradient(var(--purple) 0 50%, #d9d2c2 50% 100%);
  clip-path: polygon(50% 0, 100% 48%, 65% 48%, 65% 100%, 35% 100%, 35% 48%, 0 48%);
}

.map-view-status {
  position: absolute;
  z-index: 20;
  left: 15px;
  bottom: 91px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(24,24,22,.8);
  color: #f2e8d8;
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
  backdrop-filter: blur(14px);
}

.map-view-status span,
.map-view-status strong {
  display: flex;
  align-items: center;
}

.map-view-status span {
  gap: 5px;
  color: var(--purple);
  font-size: 6px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.map-view-status span i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #78a05c;
  box-shadow: 0 0 0 3px rgba(120,160,92,.15);
}

.map-view-status strong {
  margin-top: 4px;
  font-size: 8px;
}

.map-tool-rail {
  position: absolute;
  z-index: 24;
  left: 10px;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  height: 72px;
  padding: 7px;
  border: 1px solid rgba(214,168,79,.16);
  border-radius: 18px;
  background: rgba(24,24,22,.9);
  box-shadow: 0 -10px 36px rgba(0,0,0,.36);
  backdrop-filter: blur(18px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
}

.map-tool-rail button {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #aca292;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

.map-tool-rail button:hover,
.map-tool-rail button.active {
  background: #282824;
  color: var(--purple);
}

.map-tool-rail button > span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
}

.map-tool-rail svg { width: 18px; height: 18px; }
.map-tool-rail small { font-size: 6px; font-weight: 800; }

.map-tool-backdrop,
.map-dialog-backdrop {
  position: absolute;
  inset: 0;
  z-index: 48;
  background: rgba(6,7,5,.64);
  backdrop-filter: blur(9px);
}

.map-tool-backdrop[hidden],
.map-dialog-backdrop[hidden] { display: none; }

.map-tool-drawer {
  position: absolute;
  z-index: 50;
  left: 10px;
  right: 10px;
  bottom: 10px;
  max-height: calc(100% - 20px);
  border: 1px solid #343025;
  border-radius: 18px;
  background: #20201e;
  box-shadow: 0 26px 80px rgba(0,0,0,.52);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(calc(100% + 24px));
  transition: 260ms cubic-bezier(.2,.85,.2,1);
}

.map-tool-drawer.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.map-tool-drawer > header {
  min-height: 96px;
  padding: 15px;
  border-bottom: 1px solid #343025;
  background:
    radial-gradient(circle at 90% 10%, rgba(214,168,79,.1), transparent 30%),
    #20201e;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.map-tool-drawer > header h2 {
  margin: 4px 0 0;
  font-size: 18px;
}

.map-tool-drawer > header p {
  max-width: 240px;
  margin: 5px 0 0;
  color: #b7ab9b;
  font-size: 8px;
  line-height: 1.45;
}

.map-tool-drawer > header button,
.map-marker-dialog > header button,
.map-submit-dialog > header button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #282824;
  color: #f2e8d8;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.map-tool-drawer > header svg,
.map-marker-dialog > header svg,
.map-submit-dialog > header svg { width: 18px; height: 18px; }

.map-tool-scroll {
  max-height: calc(100dvh - 126px);
  padding: 12px 14px 18px;
  overflow-y: auto;
  scrollbar-width: none;
}

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

.map-tool-section {
  padding: 12px;
  border: 1px solid #343025;
  border-radius: 14px;
  background: #181816;
}

.map-tool-section + .map-tool-section { margin-top: 9px; }

.map-tool-section-heading {
  min-height: 26px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.map-tool-section-heading strong,
.map-tool-section-heading small { display: block; }
.map-tool-section-heading strong { font-size: 10px; }
.map-tool-section-heading small { color: #a89e8f; font-size: 7px; }
.map-tool-section-heading button { padding: 0; border: 0; background: transparent; color: var(--purple); font-size: 7px; font-weight: 800; }

.map-tool-search {
  height: 43px;
  margin-top: 8px;
  padding: 0 9px;
  border-radius: 13px;
  background: #282824;
  display: flex;
  align-items: center;
  gap: 7px;
}

.map-tool-search > svg { width: 17px; height: 17px; color: var(--purple); }
.map-tool-search input { min-width: 0; flex: 1; border: 0; outline: none; background: transparent; color: #f2e8d8; font-size: 8px; }
.map-tool-search button { width: 27px; height: 27px; border: 0; border-radius: 10px; background: #20201e; color: #a89e8f; display: grid; place-items: center; }
.map-tool-search button svg { width: 12px; height: 12px; }

.map-search-results { margin-top: 7px; display: grid; gap: 5px; }
.map-search-results button { min-height: 48px; padding: 6px; border: 0; border-radius: 12px; background: #282824; color: #f2e8d8; display: flex; align-items: center; gap: 8px; text-align: left; }
.map-search-results button > span { width: 34px; height: 34px; border-radius: 11px; background: #20201e; color: var(--purple); display: grid; place-items: center; font-weight: 900; }
.map-search-results strong, .map-search-results small { display: block; }
.map-search-results strong { font-size: 9px; }
.map-search-results small { margin-top: 2px; color: #a89e8f; font-size: 7px; }

.map-filter-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.map-filter-grid label {
  min-width: 0;
  min-height: 58px;
  padding: 7px;
  border-radius: 12px;
  background: #282824;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  cursor: pointer;
}

.map-filter-grid input { position: absolute; opacity: 0; pointer-events: none; }
.marker-dot { width: 27px; height: 27px; border: 1px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-size: 8px; font-weight: 900; }
.marker-dot.compound, .marker-dot.cash { color: #d6a84f; }
.marker-dot.boss { color: #bd5b4d; }
.marker-dot.spawn { color: #6d9dc5; }
.marker-dot.supply, .marker-dot.wild { color: #78a05c; }
.marker-dot.extract { color: #e2ddd2; }
.marker-dot.tower { color: #a9815e; }
.marker-dot.tarot { color: #9d83b4; }
.map-filter-grid b { overflow: hidden; color: #f2e8d8; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.map-filter-grid label:has(input:not(:checked)) { opacity: .4; }
.map-filter-grid label:has(input:checked) { box-shadow: inset 0 0 0 1px rgba(214,168,79,.16); }

.map-layer-toggle {
  min-height: 54px;
  margin-top: 8px;
  padding: 8px;
  border-radius: 13px;
  background: #282824;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.map-layer-toggle > span { min-width: 0; display: flex; align-items: center; gap: 8px; }
.map-layer-toggle svg { width: 18px; height: 18px; color: var(--purple); }
.map-layer-toggle strong, .map-layer-toggle small { display: block; }
.map-layer-toggle strong { font-size: 9px; }
.map-layer-toggle small { margin-top: 2px; color: #a89e8f; font-size: 7px; }
.map-layer-toggle input { position: absolute; opacity: 0; }
.map-layer-toggle > i { position: relative; width: 40px; height: 24px; border-radius: 99px; background: #3a3934; flex: 0 0 40px; }
.map-layer-toggle > i::after { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #f2e8d8; transition: left 160ms ease; }
.map-layer-toggle input:checked + i { background: var(--purple); }
.map-layer-toggle input:checked + i::after { left: 19px; background: #17140f; }

.map-measure-card,
.map-share-card,
.map-submit-card {
  min-height: 58px;
  margin-top: 8px;
  padding: 8px;
  border: 0;
  border-radius: 13px;
  background: #282824;
  color: #f2e8d8;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.map-measure-card > span,
.map-share-card > span,
.map-submit-card > span {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #20201e;
  color: var(--purple);
  display: grid;
  place-items: center;
  flex: 0 0 38px;
}

.map-measure-card svg,
.map-share-card svg,
.map-submit-card svg { width: 19px; height: 19px; }
.map-measure-card > div, .map-share-card > div, .map-submit-card > div { min-width: 0; flex: 1; }
.map-measure-card strong, .map-measure-card small, .map-share-card strong, .map-share-card small, .map-submit-card strong, .map-submit-card small { display: block; }
.map-measure-card strong, .map-share-card strong, .map-submit-card strong { font-size: 9px; }
.map-measure-card small, .map-share-card small, .map-submit-card small { margin-top: 2px; color: #a89e8f; font-size: 7px; }
.map-share-card > svg { width: 13px; height: 13px; transform: rotate(-90deg); }

.map-tool-actions {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.map-tool-actions button {
  min-height: 39px;
  border: 0;
  border-radius: 12px;
  background: #282824;
  color: #a89e8f;
  font-size: 8px;
  font-weight: 800;
}

.map-tool-actions .map-tool-primary { background: var(--purple); color: #17140f; }

.map-marker-dialog,
.map-submit-dialog {
  position: absolute;
  z-index: 54;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 14px;
  border: 1px solid #343025;
  border-radius: 18px;
  background: #20201e;
  box-shadow: 0 26px 80px rgba(0,0,0,.52);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(calc(100% + 24px));
  transition: 240ms cubic-bezier(.2,.85,.2,1);
}

.map-marker-dialog.open,
.map-submit-dialog.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.map-marker-dialog > header,
.map-submit-dialog > header {
  min-height: 58px;
  padding-bottom: 12px;
  border-bottom: 1px solid #343025;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.map-marker-dialog h2,
.map-submit-dialog h2 {
  margin: 4px 0 0;
  font-size: 17px;
  line-height: 22px;
}

.map-submit-dialog header p {
  max-width: 240px;
  margin: 5px 0 0;
  color: #a89e8f;
  font-size: 7px;
  line-height: 1.4;
}

.map-marker-preview {
  position: relative;
  height: 182px;
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  background: #121310;
}

.map-marker-preview img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.35); }
.map-marker-preview > span { position: absolute; left: 9px; bottom: 9px; height: 28px; padding: 0 9px; border-radius: 10px; background: rgba(24,24,22,.86); color: #f2e8d8; display: flex; align-items: center; gap: 5px; font-size: 7px; font-weight: 800; backdrop-filter: blur(8px); }
.map-marker-preview svg { width: 15px; height: 15px; color: var(--purple); }

.map-marker-info { min-height: 54px; padding: 10px 2px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.map-marker-info strong, .map-marker-info small { display: block; }
.map-marker-info strong { font-size: 9px; }
.map-marker-info small { margin-top: 2px; color: #a89e8f; font-size: 7px; }
.map-marker-info > span { height: 28px; padding: 0 9px; border-radius: 10px; background: rgba(120,160,92,.14); color: #90b877; display: flex; align-items: center; font-size: 7px; font-weight: 800; }

.map-marker-actions { margin-top: 8px; display: grid; grid-template-columns: 62px 1fr 42px; gap: 6px; }
.map-marker-actions button { height: 42px; padding: 0 9px; border: 0; border-radius: 12px; background: #282824; color: #f2e8d8; display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 8px; }
.map-marker-actions svg { width: 17px; height: 17px; color: var(--purple); }

.map-submit-location { min-height: 58px; margin-top: 12px; padding: 8px; border-radius: 13px; background: #282824; display: flex; align-items: center; gap: 8px; }
.map-submit-location > span { width: 38px; height: 38px; border-radius: 12px; background: #20201e; color: var(--purple); display: grid; place-items: center; }
.map-submit-location svg { width: 19px; height: 19px; }
.map-submit-location strong, .map-submit-location small { display: block; }
.map-submit-location strong { font-size: 9px; }
.map-submit-location small { margin-top: 2px; color: #a89e8f; font-size: 7px; }

.map-submit-upload { min-height: 104px; margin-top: 9px; padding: 12px; border: 1px dashed rgba(214,168,79,.38); border-radius: 14px; background: #181816; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; }
.map-submit-upload input { position: absolute; opacity: 0; }
.map-submit-upload > span { width: 34px; height: 34px; border-radius: 11px; background: #282824; color: var(--purple); display: grid; place-items: center; }
.map-submit-upload svg { width: 18px; height: 18px; }
.map-submit-upload strong { margin-top: 7px; font-size: 9px; }
.map-submit-upload small { margin-top: 3px; color: #a89e8f; font-size: 7px; }

.map-submit-note { display: grid; gap: 5px; margin-top: 9px; }
.map-submit-note > span { color: #a89e8f; font-size: 7px; font-weight: 800; }
.map-submit-note textarea { width: 100%; height: 78px; padding: 10px; border: 1px solid #343025; border-radius: 14px; resize: none; outline: none; background: #181816; color: #f2e8d8; font-size: 9px; }
.map-submit-dialog footer { margin-top: 10px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 7px; }
.map-submit-dialog footer button { height: 43px; border: 0; border-radius: 13px; background: #282824; color: #a89e8f; font-size: 8px; font-weight: 800; }
.map-submit-dialog footer button:last-child { background: var(--purple); color: #17140f; }

.map-detail-toast {
  position: absolute;
  z-index: 80;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%) translateY(10px);
  max-width: calc(100% - 30px);
  padding: 9px 12px;
  border-radius: 12px;
  background: #20201e;
  color: #f2e8d8;
  box-shadow: 0 14px 36px rgba(0,0,0,.4);
  font-size: 8px;
  font-weight: 700;
  opacity: 0;
  transition: 160ms ease;
}

.map-detail-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 359px) {
  .maps-overview-copy { width: 62%; }
  .maps-feature-preview { width: 162px; right: -28px; }
  .map-directory-card > button { grid-template-columns: 96px minmax(0,1fr) 20px; }
  .map-card-preview { width: 96px; height: 104px; }
  .map-tool-rail small { display: none; }
  .map-tool-rail button > span { width: 34px; height: 34px; }
  .map-filter-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}


/* ================================================================
   Version 46: Maps header parity + rebuilt overview hero
   ================================================================ */

body[data-page="maps"] .app-scroll {
  padding-top: 120px;
}

body[data-page="maps"] .topbar {
  pointer-events: auto;
}

body[data-page="maps"] .phone-shell.topbar-scrolled .topbar {
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  border-color: color-mix(in srgb, var(--line) 88%, transparent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .36);
}

.maps-overview-hero-v2 {
  min-height: 0;
  padding: 16px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 4%, color-mix(in srgb, var(--purple) 12%, transparent), transparent 28%),
    linear-gradient(150deg, color-mix(in srgb, var(--surface) 97%, var(--purple) 3%), var(--surface));
}

.maps-overview-hero-v2::after {
  width: 180px;
  height: 180px;
  right: -80px;
  bottom: -90px;
  opacity: .48;
}

.maps-hero-intro {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.maps-hero-intro h1 {
  margin: 6px 0 0;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -.65px;
}

.maps-hero-intro h1 strong { color: var(--purple); }

.maps-hero-live {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 7px;
  font-weight: 800;
  white-space: nowrap;
}

.maps-hero-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 13%, transparent);
}

.maps-hero-description {
  position: relative;
  z-index: 3;
  max-width: 292px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.maps-feature-preview-v2 {
  position: relative;
  z-index: 2;
  right: auto;
  bottom: auto;
  width: 100%;
  height: 152px;
  margin-top: 14px;
  border-radius: 14px;
  display: block;
  transform: none;
  text-decoration: none;
}

.maps-feature-preview-v2:hover,
.maps-feature-preview-v2:focus-visible {
  border-color: color-mix(in srgb, var(--purple) 72%, var(--line));
  outline: none;
}

.maps-feature-preview-v2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.035);
}

.maps-feature-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 14, 12, .82), rgba(14, 14, 12, .12) 68%),
    linear-gradient(180deg, transparent 44%, rgba(14, 14, 12, .58));
}

.maps-feature-copy {
  position: absolute;
  z-index: 2;
  left: 13px;
  top: 13px;
  max-width: 190px;
  color: #f2e8d8;
}

.maps-feature-copy small,
.maps-feature-copy strong,
.maps-feature-copy em { display: block; }

.maps-feature-copy small {
  color: var(--purple);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.maps-feature-copy strong {
  margin-top: 4px;
  font-size: 16px;
  line-height: 20px;
}

.maps-feature-copy em {
  margin-top: 3px;
  color: #c7bdad;
  font-size: 7px;
  line-height: 10px;
  font-style: normal;
}

.maps-feature-open {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  background: rgba(24, 24, 22, .84);
  color: #f2e8d8;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(10px);
}

.maps-feature-open svg { width: 16px; height: 16px; color: var(--purple); }
.maps-feature-open b { font-size: 7px; }

.maps-hero-footer {
  position: relative;
  z-index: 3;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.maps-overview-hero-v2 .maps-hero-meta { margin-top: 0; gap: 6px; }
.maps-overview-hero-v2 .maps-hero-meta > span { min-width: 61px; padding: 8px 9px; border-radius: 10px; }

.maps-overview-hero-v2 .maps-primary-action {
  height: 42px;
  margin-top: 0;
  padding: 0 12px;
  border-radius: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.map-directory-card > a {
  width: 100%;
  min-height: 132px;
  padding: 9px;
  border: 0;
  background: transparent;
  color: var(--text);
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 22px;
  gap: 10px;
  align-items: center;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.map-directory-card > a:hover,
.map-directory-card > a:focus-visible {
  background: color-mix(in srgb, var(--purple-soft) 20%, transparent);
  outline: none;
}

body[data-page="map-detail"] .user-popover {
  top: 84px;
  right: 10px;
  z-index: 72;
  max-height: calc(100% - 96px);
}

body[data-page="map-detail"] .map-avatar-button[aria-expanded="true"] {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--purple) 38%, transparent);
}

@media (max-width: 359px) {
  .maps-hero-intro h1 { font-size: 25px; }
  .maps-hero-live { padding: 0 7px; }
  .maps-feature-preview-v2 { height: 144px; }
  .maps-overview-hero-v2 .maps-primary-action span { display: none; }
  .maps-overview-hero-v2 .maps-primary-action { width: 42px; padding: 0; justify-content: center; }
}


/* ================================================================
   Version 47: stable fullscreen map tool sheets
   ================================================================ */

/* The previous scrollIntoView based behaviour could move the fullscreen
   map canvas itself. The sheet now stays anchored to the viewport and only
   its own content is allowed to scroll. */
.map-tool-drawer {
  top: auto;
  bottom: max(10px, env(safe-area-inset-bottom));
  max-height: min(620px, calc(100% - 20px));
  display: flex;
  flex-direction: column;
  overscroll-behavior: contain;
  transform: translate3d(0, calc(100% + 28px), 0);
  will-change: transform, opacity;
}

.map-tool-drawer.open {
  transform: translate3d(0, 0, 0);
}

.map-tool-scroll {
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: auto;
}

.map-tool-section[hidden] {
  display: none !important;
}

.map-tool-drawer[data-active-tool="search"],
.map-tool-drawer[data-active-tool="measure"],
.map-tool-drawer[data-active-tool="submit"] {
  max-height: min(430px, calc(100% - 20px));
}

.map-tool-drawer[data-active-tool="layers"] {
  max-height: min(620px, calc(100% - 20px));
}

.map-explorer.tool-sheet-open .map-tool-rail {
  pointer-events: none;
}

/* Real marker and submit dialogs are bounded independently as well. */
.map-marker-dialog,
.map-submit-dialog {
  top: auto;
  bottom: max(10px, env(safe-area-inset-bottom));
  max-height: calc(100% - 20px);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translate3d(0, calc(100% + 28px), 0);
  will-change: transform, opacity;
}

.map-marker-dialog.open,
.map-submit-dialog.open {
  transform: translate3d(0, 0, 0);
}

.map-submit-dialog {
  scrollbar-width: none;
}

.map-submit-dialog::-webkit-scrollbar {
  display: none;
}

@media (max-height: 720px) {
  .map-tool-drawer,
  .map-tool-drawer[data-active-tool="layers"],
  .map-tool-drawer[data-active-tool="search"],
  .map-tool-drawer[data-active-tool="measure"],
  .map-tool-drawer[data-active-tool="submit"] {
    max-height: calc(100% - 12px);
    bottom: 6px;
  }

  .map-marker-dialog,
  .map-submit-dialog {
    max-height: calc(100% - 12px);
    bottom: 6px;
  }
}


/* ================================================================
   Version 49: exact Ready Lobby header on fullscreen maps
   ================================================================ */

/* No duplicated map-header design. The complete visual system comes from
   ready-page-header, ready-round-button and ready-header-avatar. Only the
   fullscreen placement belongs to Maps. */
body[data-page="map-detail"] .ready-page-header {
  position: absolute;
  z-index: 30;
  left: 10px;
  right: 10px;
  top: max(10px, env(safe-area-inset-top));
  margin: 0;
}

body[data-page="map-detail"] .ready-detail-header .ready-back-button > svg {
  transform: rotate(90deg);
}

body[data-page="map-detail"] #mapSwitcherButton > svg {
  width: 16px;
  height: 16px;
}

body[data-page="map-detail"] .map-switcher-menu {
  top: max(84px, calc(env(safe-area-inset-top) + 84px));
}

body[data-page="map-detail"] .user-popover {
  top: max(84px, calc(env(safe-area-inset-top) + 84px));
  right: 10px;
}

body[data-page="map-detail"] .ready-header-avatar[aria-expanded="true"] {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--purple) 34%, transparent);
}

/* ================================================================
   Saved posts and Moments
   ================================================================ */

body[data-page="saved"] .app-scroll {
  background:
    radial-gradient(circle at 88% 3%, color-mix(in srgb, var(--purple) 10%, transparent), transparent 28%),
    var(--app-bg);
}

.saved-page {
  min-height: calc(100dvh - 82px);
  padding: 14px 12px 30px;
}

.saved-library-hero {
  padding: 16px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--purple) 14%, transparent), transparent 34%),
    var(--surface);
  box-shadow: var(--shadow);
}

.saved-library-heading {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.saved-library-heading > div {
  min-width: 0;
  flex: 1;
}

.saved-library-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--purple) 14%, var(--surface-soft));
  color: var(--purple);
  display: grid;
  place-items: center;
  flex: 0 0 48px;
}

.saved-library-icon svg {
  width: 24px;
  height: 24px;
}

.saved-kicker {
  display: block;
  color: var(--purple);
  font-size: 8px;
  line-height: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.saved-library-heading h1 {
  margin: 3px 0 0;
  font-size: 23px;
  line-height: 29px;
}

.saved-library-heading p {
  max-width: 280px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.48;
}

.saved-library-stats {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.saved-library-stats button {
  min-height: 60px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.saved-library-stats button:hover,
.saved-library-stats button:focus-visible {
  background: color-mix(in srgb, var(--purple-soft) 42%, var(--surface));
  outline: none;
}

.saved-library-stats strong,
.saved-library-stats span {
  display: block;
}

.saved-library-stats strong {
  font-size: 17px;
  line-height: 21px;
}

.saved-library-stats span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.saved-tabs {
  position: sticky;
  top: 8px;
  z-index: 24;
  height: 58px;
  margin-top: 12px;
  padding: 5px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 93%, transparent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.saved-tabs button {
  min-width: 0;
  height: 48px;
  padding: 0 11px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
}

.saved-tabs button.active {
  background: var(--surface-soft);
  color: var(--text);
}

.saved-tabs button.active svg {
  color: var(--purple);
}

.saved-tabs svg {
  width: 19px;
  height: 19px;
}

.saved-tabs span {
  font-size: 10px;
  font-weight: 800;
}

.saved-tabs b {
  min-width: 23px;
  height: 23px;
  padding: 0 6px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--purple) 13%, transparent);
  color: var(--purple);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 7px;
}

.saved-panel {
  margin-top: 15px;
}

.saved-panel[hidden] {
  display: none !important;
}

.saved-section-heading {
  min-height: 43px;
  padding: 0 2px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.saved-section-heading h2 {
  margin: 3px 0 0;
  font-size: 16px;
  line-height: 21px;
}

.saved-section-heading small {
  color: var(--muted);
  font-size: 7px;
  white-space: nowrap;
}

.saved-post-list {
  margin-top: 9px;
}

.saved-post-list .bookmark-action.saved {
  color: var(--purple);
}

.saved-item-removing {
  opacity: 0;
  transform: translateY(-6px) scale(.985);
  transition: opacity 180ms ease, transform 180ms ease;
}

.saved-moments-grid {
  margin-top: 9px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.saved-moment-card {
  min-width: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.saved-moment-open {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 13;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #111;
  color: #fff;
  display: block;
  text-align: left;
  cursor: pointer;
}

.saved-moment-open > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.saved-moment-card:nth-child(3) .saved-moment-open > img,
.saved-moment-card:nth-child(4) .saved-moment-open > img {
  object-position: center 34%;
}

.saved-moment-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .06) 30%, rgba(0, 0, 0, .76) 100%);
}

.saved-moment-play {
  position: absolute;
  left: 50%;
  top: 43%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(12, 12, 12, .58);
  color: #fff;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.saved-moment-play svg {
  width: 21px;
  height: 21px;
}

.saved-moment-duration {
  position: absolute;
  right: 8px;
  top: 8px;
  min-height: 23px;
  padding: 0 7px;
  border-radius: 8px;
  background: rgba(12, 12, 12, .58);
  display: inline-flex;
  align-items: center;
  font-size: 7px;
  font-weight: 800;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.saved-moment-copy {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
}

.saved-moment-copy strong,
.saved-moment-copy small {
  display: block;
}

.saved-moment-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.saved-moment-copy small {
  margin-top: 4px;
  color: rgba(255,255,255,.74);
  font-size: 7px;
}

.saved-moment-card > footer {
  min-height: 54px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.saved-moment-card > footer > img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 34px;
}

.saved-moment-card > footer > div {
  min-width: 0;
  flex: 1;
}

.saved-moment-card > footer strong,
.saved-moment-card > footer span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-moment-card > footer strong {
  font-size: 8px;
}

.saved-moment-card > footer span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 6px;
}

.saved-moment-card > footer .bookmark-action {
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  cursor: pointer;
}

.saved-moment-card > footer .bookmark-action svg {
  width: 18px;
  height: 18px;
}

.saved-empty-state {
  min-height: 260px;
  margin-top: 9px;
  padding: 22px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
  display: grid;
  place-items: center;
  align-content: center;
}

.saved-empty-state[hidden] {
  display: none;
}

.saved-empty-state > span {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
}

.saved-empty-state svg {
  width: 27px;
  height: 27px;
}

.saved-empty-state strong,
.saved-empty-state small {
  display: block;
}

.saved-empty-state strong {
  margin-top: 12px;
  font-size: 13px;
}

.saved-empty-state small {
  max-width: 250px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.saved-empty-state a {
  height: 38px;
  margin-top: 13px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--purple);
  color: #15130f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 800;
  text-decoration: none;
}

html[data-theme="dark"] .saved-tabs {
  box-shadow: 0 12px 30px rgba(0, 0, 0, .32);
}

@media (max-width: 359px) {
  .saved-page {
    padding-right: 9px;
    padding-left: 9px;
  }

  .saved-library-heading h1 {
    font-size: 21px;
  }

  .saved-tabs span {
    font-size: 9px;
  }

  .saved-moment-copy strong {
    font-size: 9px;
  }
}


/* ================================================================
   Version 51: reserve space for the shared Feed topbar
   ================================================================ */

/* The Feed header is absolutely positioned. Unlike the Feed hero, the
   Saved page had no reserved header zone, so the topbar sat on top of the
   library card. Keep the exact shared header and only reserve its space. */
body[data-page="saved"] .saved-page {
  padding-top: 120px;
}

/* When the tab strip becomes sticky, it must stay below the 60px glass
   topbar (top 50px, bottom 110px) instead of sliding underneath it. */
body[data-page="saved"] .saved-tabs {
  top: 118px;
}

@media (max-width: 600px) {
  body[data-page="saved"] .saved-page {
    padding-top: 120px;
  }

  body[data-page="saved"] .saved-tabs {
    top: 118px;
  }
}

@media (max-width: 359px) {
  body[data-page="saved"] .saved-page {
    padding-top: 116px;
  }

  body[data-page="saved"] .saved-tabs {
    top: 114px;
  }
}

/* ================================================================
   Members directory
   ================================================================ */

body[data-page="members"] .app-scroll {
  background:
    radial-gradient(circle at 88% 3%, color-mix(in srgb, var(--purple) 10%, transparent), transparent 28%),
    var(--app-bg);
}

.members-page {
  min-height: calc(100dvh - 82px);
  padding: 120px 12px 30px;
}

.members-kicker {
  display: block;
  color: var(--purple);
  font-size: 8px;
  line-height: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.members-hero {
  padding: 16px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--purple) 14%, transparent), transparent 34%),
    var(--surface);
  box-shadow: var(--shadow);
}

.members-hero-heading {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.members-hero-heading > div {
  min-width: 0;
  flex: 1;
}

.members-hero-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--purple) 14%, var(--surface-soft));
  color: var(--purple);
  display: grid;
  place-items: center;
  flex: 0 0 48px;
}

.members-hero-icon svg { width: 24px; height: 24px; }
.members-hero h1 { margin: 3px 0 0; font-size: 23px; line-height: 29px; }
.members-hero p { max-width: 280px; margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.48; }

.members-hero-stats {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.members-hero-stats button {
  min-height: 59px;
  padding: 9px 8px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.members-hero-stats button:hover,
.members-hero-stats button:focus-visible { background: color-mix(in srgb, var(--purple-soft) 42%, var(--surface)); outline: none; }
.members-hero-stats strong, .members-hero-stats span { display: block; }
.members-hero-stats strong { font-size: 16px; line-height: 20px; }
.members-hero-stats span { margin-top: 3px; color: var(--muted); font-size: 8px; }

.members-tabs {
  position: sticky;
  top: 118px;
  z-index: 24;
  min-height: 58px;
  margin-top: 12px;
  padding: 5px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 93%, transparent);
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 5px;
}

.members-tabs button {
  min-width: 0;
  height: 48px;
  padding: 0 7px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.members-tabs button.active { background: var(--surface-soft); color: var(--text); }
.members-tabs span { overflow: hidden; font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.members-tabs b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 8px; background: color-mix(in srgb, var(--purple) 13%, transparent); color: var(--purple); display: inline-flex; align-items: center; justify-content: center; font-size: 7px; }

.members-toolbar {
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.members-search-field {
  min-width: 0;
  height: 46px;
  padding: 0 9px;
  border-radius: 14px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}

.members-search-field > svg { width: 19px; height: 19px; color: var(--purple); flex: 0 0 19px; }
.members-search-field input { min-width: 0; flex: 1; height: 100%; padding: 0; border: 0; outline: none; background: transparent; color: var(--text); font-size: 10px; }
.members-search-field input::placeholder { color: var(--muted); }
.members-search-field button { width: 29px; height: 29px; padding: 0; border: 0; border-radius: 9px; background: var(--surface); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.members-search-field button svg { width: 14px; height: 14px; }

.members-filter-button {
  position: relative;
  min-width: 82px;
  height: 46px;
  padding: 0 10px;
  border: 0;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.members-filter-button:hover, .members-filter-button:focus-visible { color: var(--purple); outline: none; }
.members-filter-button svg { width: 18px; height: 18px; }
.members-filter-button span { font-size: 8px; font-weight: 800; }
.members-filter-button b { position: absolute; right: -4px; top: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 50%; background: var(--purple); color: #15130f; display: grid; place-items: center; font-size: 7px; }

.members-quick-filters { grid-column: 1 / -1; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.members-quick-filters::-webkit-scrollbar { display: none; }
.members-quick-filters button { min-width: max-content; height: 32px; padding: 0 10px; border: 0; border-radius: 12px; background: var(--surface-soft); color: var(--muted); display: flex; align-items: center; gap: 5px; font-size: 7px; font-weight: 800; cursor: pointer; }
.members-quick-filters button.active { background: color-mix(in srgb, var(--purple) 15%, var(--surface-soft)); color: var(--purple); }
.members-quick-filters i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.members-quick-filters svg { width: 14px; height: 14px; }

.members-list-heading { min-height: 50px; margin-top: 14px; padding: 0 2px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.members-list-heading h2 { margin: 3px 0 0; font-size: 16px; line-height: 21px; }
.members-list-heading > strong { color: var(--muted); font-size: 8px; white-space: nowrap; }

.members-column-header { height: 30px; margin-top: 7px; padding: 0 11px; color: var(--faint); display: grid; grid-template-columns: minmax(0,1fr) 58px 42px; align-items: center; gap: 7px; font-size: 7px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.members-column-header span:nth-child(2), .members-column-header span:nth-child(3) { text-align: center; }

.members-directory { display: grid; gap: 9px; }
.member-row { padding: 11px; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.member-row[hidden] { display: none !important; }
.member-row-main { display: grid; grid-template-columns: minmax(0,1fr) 58px 42px; align-items: center; gap: 7px; }
.member-identity { min-width: 0; padding: 0; border: 0; background: transparent; color: var(--text); display: flex; align-items: center; gap: 9px; text-align: left; cursor: pointer; }
.member-avatar-shell { position: relative; width: 45px; height: 45px; flex: 0 0 45px; }
.member-avatar-shell img { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; display: block; }
.member-avatar-shell.logo-avatar img { object-fit: contain; }
.member-avatar-shell i { position: absolute; right: 1px; bottom: 1px; width: 10px; height: 10px; border: 2px solid var(--surface); border-radius: 50%; background: var(--success); }
.member-row[data-presence="offline"] .member-avatar-shell i { background: var(--faint); }
.member-name-copy { min-width: 0; }
.member-name-copy strong, .member-name-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-name-copy strong { font-size: 11px; line-height: 15px; }
.member-name-copy small { margin-top: 3px; color: var(--muted); font-size: 7px; }

.member-presence { min-height: 34px; border-radius: 12px; background: var(--surface-soft); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-align: center; }
.member-presence i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.member-presence.online i { background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 12%, transparent); }
.member-presence span { color: var(--muted); font-size: 6px; font-weight: 800; }
.member-presence.online span { color: var(--success); }

.member-more-button { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 12px; background: var(--surface-soft); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.member-more-button:hover, .member-more-button:focus-visible { color: var(--purple); outline: none; }
.member-more-button svg { width: 18px; height: 18px; }
.member-row > p { margin: 10px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.member-tags { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 5px; }
.member-tags span { min-height: 25px; padding: 0 8px; border-radius: 9px; background: var(--surface-soft); color: var(--muted); display: inline-flex; align-items: center; font-size: 7px; font-weight: 700; }
.member-tags span.lfg { background: color-mix(in srgb, var(--purple) 13%, var(--surface-soft)); color: var(--purple); }
.member-row footer { margin-top: 10px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--line) 62%, transparent); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.member-stats { min-width: 0; display: flex; gap: 9px; color: var(--muted); }
.member-stats span { font-size: 6px; white-space: nowrap; }
.member-stats strong { color: var(--text); font-size: 8px; }
.member-actions { display: flex; gap: 5px; }
.member-actions button { min-width: 58px; height: 32px; padding: 0 8px; border: 0; border-radius: 11px; background: var(--surface-soft); color: var(--muted); font-size: 7px; font-weight: 800; cursor: pointer; }
.member-actions button.primary { background: var(--purple); color: #15130f; }
.member-actions button:hover, .member-actions button:focus-visible { outline: none; filter: brightness(1.04); }

.members-empty { min-height: 260px; margin-top: 9px; padding: 22px; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; align-content: center; text-align: center; }
.members-empty[hidden] { display: none; }
.members-empty > span { width: 58px; height: 58px; border-radius: 16px; background: var(--surface-soft); color: var(--purple); display: grid; place-items: center; }
.members-empty svg { width: 27px; height: 27px; }
.members-empty strong { margin-top: 12px; font-size: 13px; }
.members-empty small { max-width: 250px; margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.members-empty button { height: 38px; margin-top: 13px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--purple); color: #15130f; font-size: 8px; font-weight: 800; cursor: pointer; }

/* Filter dialog */
.members-filter-backdrop { position: absolute; inset: 0; z-index: 150; background: rgba(7,7,6,.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.members-filter-backdrop[hidden] { display: none; }
.members-filter-dialog { position: absolute; z-index: 152; left: 10px; right: 10px; bottom: -720px; max-height: calc(100% - 20px); padding: 0; border-radius: 18px; background: var(--surface); box-shadow: 0 28px 84px rgba(0,0,0,.42); opacity: 0; pointer-events: none; overflow: hidden; transition: bottom .26s cubic-bezier(.2,.8,.2,1), opacity .18s ease; }
.members-filter-dialog.open { bottom: 10px; opacity: 1; pointer-events: auto; }
.members-filter-header { min-height: 88px; padding: 15px 74px 14px 15px; position: relative; background: radial-gradient(circle at 90% 18%, color-mix(in srgb, var(--purple) 10%, transparent), transparent 35%), var(--surface); }
.members-filter-header h2 { margin: 3px 0 0; font-size: 18px; }
.members-filter-header p { max-width: 250px; margin: 5px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.members-filter-header button { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 14px; background: var(--surface-soft); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.members-filter-header button svg { width: 18px; height: 18px; }
.members-filter-art { position: absolute; z-index: 2; right: 58px; top: 18px; width: 72px; height: 58px; opacity: .65; pointer-events: none; }
.members-filter-art span { position: absolute; width: 31px; height: 31px; border-radius: 9px; background: var(--surface-soft); color: var(--muted); display: grid; place-items: center; }
.members-filter-art span:nth-child(1) { left: 0; top: 18px; transform: rotate(-8deg); }
.members-filter-art span:nth-child(2) { left: 23px; top: 2px; transform: rotate(7deg); }
.members-filter-art span:nth-child(3) { right: 0; top: 21px; transform: rotate(-5deg); }
.members-filter-art svg { width: 15px; height: 15px; }
.members-filter-scroll { max-height: calc(100dvh - 210px); padding: 12px 14px 14px; border-top: 1px solid var(--line); overflow-y: auto; scrollbar-width: none; }
.members-filter-scroll::-webkit-scrollbar { display: none; }
.members-filter-section { padding: 13px; border-radius: 8px; background: var(--surface-soft); }
.members-filter-section + .members-filter-section { margin-top: 9px; }
.members-filter-section-heading { display: flex; align-items: center; gap: 9px; }
.members-filter-section-heading > span { width: 31px; height: 31px; border-radius: 10px; background: var(--surface); color: var(--purple); display: grid; place-items: center; font-size: 8px; font-weight: 800; }
.members-filter-section-heading strong, .members-filter-section-heading small { display: block; }
.members-filter-section-heading strong { font-size: 10px; }
.members-filter-section-heading small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.members-filter-grid { margin-top: 11px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.members-filter-grid label { display: grid; gap: 5px; }
.members-filter-grid label > span { color: var(--muted); font-size: 7px; font-weight: 700; }
.members-filter-grid select { width: 100%; height: 39px; padding: 0 8px; border: 0; border-radius: 14px; background: var(--surface); color: var(--text); font-size: 8px; outline: none; }
.members-filter-toggle { margin-top: 11px; padding: 9px; border-radius: 14px; background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.members-filter-toggle strong, .members-filter-toggle small { display: block; }
.members-filter-toggle strong { font-size: 9px; }
.members-filter-toggle small { margin-top: 2px; color: var(--muted); font-size: 7px; line-height: 1.35; }
.members-filter-toggle input { accent-color: var(--purple); }
.members-filter-footer { min-height: 68px; padding: 10px 14px 13px; border-top: 1px solid var(--line); display: grid; grid-template-columns: .8fr 1.2fr; gap: 8px; }
.members-filter-footer button { height: 42px; border: 0; border-radius: 14px; font-size: 8px; font-weight: 800; cursor: pointer; }
.members-filter-footer button:first-child { background: var(--surface-soft); color: var(--muted); }
.members-filter-footer button:last-child { background: var(--purple); color: #15130f; display: flex; align-items: center; justify-content: center; gap: 6px; }
.members-filter-footer svg { width: 16px; height: 16px; }

.phone-shell.members-filter-open .app-scroll { overflow: hidden; }
html[data-theme="dark"] .members-tabs { box-shadow: 0 12px 30px rgba(0,0,0,.32); }

@media (max-width: 359px) {
  .members-page { padding: 116px 9px 28px; }
  .members-tabs { top: 114px; }
  .members-hero h1 { font-size: 21px; }
  .members-tabs span { font-size: 8px; }
  .member-row footer { align-items: flex-start; flex-direction: column; }
  .member-actions { width: 100%; }
  .member-actions button { flex: 1; }
  .members-filter-grid { grid-template-columns: 1fr; }
  .members-filter-art { display: none; }
}

/* ================================================================
   Messages overview and direct chat
   ================================================================ */

body[data-page="messages"] .app-scroll,
body[data-page="message-thread"] .app-scroll {
  inset: 0;
  background: var(--app-bg);
}

body[data-page="messages"] .app-scroll {
  bottom: 82px;
}

.messages-page,
.message-thread-page {
  min-height: 100%;
  color: var(--text);
}

.messages-page {
  padding: max(18px, env(safe-area-inset-top)) 12px 24px;
}

.messages-page-header {
  height: 72px;
  padding: 10px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 9px;
}

.messages-header-button,
.message-thread-back,
.message-thread-actions button {
  padding: 0;
  border: 0;
  background: var(--surface-soft);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.messages-header-button {
  width: 52px;
  height: 52px;
  border-radius: 16px;
}

.messages-header-button svg {
  width: 22px;
  height: 22px;
}

.messages-header-button:first-child svg,
.message-thread-back svg {
  transform: rotate(90deg);
}

.messages-compose-trigger {
  color: var(--purple);
}

.messages-page-header__copy {
  min-width: 0;
  text-align: center;
}

.messages-page-header__copy span {
  display: block;
  color: var(--purple);
  font-size: 8px;
  line-height: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.messages-page-header__copy h1 {
  margin: 3px 0 0;
  font-size: 18px;
  line-height: 23px;
}

.messages-tabs {
  height: 52px;
  margin-top: 12px;
  padding: 4px;
  border-radius: 18px;
  background: var(--surface);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  box-shadow: var(--shadow);
}

.messages-tabs button {
  min-width: 0;
  height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.messages-tabs button.active {
  background: var(--surface-soft);
  color: var(--text);
}

.messages-tabs button.active span {
  color: var(--purple);
}

.messages-tabs span {
  overflow: hidden;
  font-size: 9px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messages-tabs b {
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--purple) 13%, transparent);
  color: var(--purple);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 7px;
}

.messages-search,
.new-message-search {
  height: 48px;
  padding: 0 12px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 9px;
}

.messages-search {
  margin-top: 12px;
}

.messages-search > svg,
.new-message-search > svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
  flex: 0 0 20px;
}

.messages-search input,
.new-message-search input {
  min-width: 0;
  flex: 1;
  height: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 10px;
}

.messages-search input::placeholder,
.new-message-search input::placeholder {
  color: var(--muted);
}

.messages-search button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.messages-search button svg {
  width: 14px;
  height: 14px;
}

.messages-panel {
  margin-top: 12px;
}

.messages-panel[hidden] {
  display: none !important;
}

.conversation-list {
  padding: 6px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  gap: 3px;
}

.conversation-row {
  width: 100%;
  min-height: 68px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
}

.conversation-row:hover,
.conversation-row:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.conversation-row.unread {
  background: color-mix(in srgb, var(--purple) 7%, var(--surface));
}

.conversation-avatar,
.message-thread-avatar {
  position: relative;
  display: block;
  flex: 0 0 auto;
}

.conversation-avatar {
  width: 50px;
  height: 50px;
}

.conversation-avatar img,
.message-thread-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.conversation-avatar.online::after,
.message-thread-avatar.online::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: 1px;
  width: 10px;
  height: 10px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--success);
}

.conversation-copy {
  min-width: 0;
  flex: 1;
}

.conversation-copy > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.conversation-copy strong {
  overflow: hidden;
  font-size: 10px;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-copy time {
  color: var(--muted);
  font-size: 7px;
  white-space: nowrap;
}

.conversation-copy small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  line-height: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-row.unread .conversation-copy strong,
.conversation-row.unread .conversation-copy small {
  color: var(--text);
}

.conversation-status {
  width: 24px;
  height: 24px;
  color: var(--faint);
  display: grid;
  place-items: center;
  flex: 0 0 24px;
}

.conversation-status svg {
  width: 17px;
  height: 17px;
}

.unread-dot {
  width: 10px;
  height: 10px;
  margin: 7px;
  border-radius: 50%;
  background: var(--purple);
}

.message-request-list {
  display: grid;
  gap: 8px;
}

.message-request-card {
  padding: 12px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  gap: 10px;
}

.message-request-card > div {
  min-width: 0;
  flex: 1;
}

.message-request-card strong,
.message-request-card small {
  display: block;
}

.message-request-card strong {
  font-size: 11px;
}

.message-request-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
}

.message-request-card p {
  margin: 9px 0 0;
  color: var(--text);
  font-size: 9px;
  line-height: 1.45;
}

.message-request-actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.message-request-actions button {
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

.message-request-actions button:last-child {
  background: var(--purple);
  color: #15130f;
}

.messages-empty {
  min-height: 230px;
  margin-top: 12px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
  display: grid;
  place-items: center;
  align-content: center;
}

.messages-empty[hidden] {
  display: none;
}

.messages-empty > span {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
}

.messages-empty svg {
  width: 27px;
  height: 27px;
}

.messages-empty strong,
.messages-empty small {
  display: block;
}

.messages-empty strong {
  margin-top: 12px;
  font-size: 12px;
}

.messages-empty small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
}

/* New message dialog */
.messages-modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: rgba(7, 7, 6, .68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.new-message-dialog {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 102;
  max-height: calc(100% - 24px);
  padding: 16px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0,0,0,.42);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 180ms ease, transform 220ms ease, visibility 180ms ease;
}

.new-message-dialog.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.new-message-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.new-message-dialog > header span {
  display: block;
  color: var(--purple);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.new-message-dialog > header h2 {
  margin: 4px 0 0;
  font-size: 18px;
}

.new-message-dialog > header button {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--surface-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.new-message-dialog > header svg {
  width: 18px;
  height: 18px;
}

.new-message-search {
  margin-top: 14px;
  box-shadow: none;
  background: var(--surface-soft);
}

.new-message-contacts {
  margin-top: 10px;
  display: grid;
  gap: 4px;
}

.new-message-contacts > button {
  min-height: 64px;
  padding: 7px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
}

.new-message-contacts > button:hover,
.new-message-contacts > button:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.new-message-contacts > button > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.new-message-contacts strong,
.new-message-contacts small {
  display: block;
}

.new-message-contacts strong {
  font-size: 10px;
}

.new-message-contacts small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
}

.new-message-contacts > button > svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transform: rotate(-90deg);
}

/* Thread */
.message-thread-page {
  height: 100dvh;
  padding: max(12px, env(safe-area-inset-top)) 10px 78px;
  overflow: hidden;
}

.message-thread-header {
  position: relative;
  z-index: 10;
  height: 72px;
  padding: 10px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.message-thread-back {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.message-thread-back svg {
  width: 20px;
  height: 20px;
}

.message-thread-person {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}

.message-thread-avatar {
  width: 44px;
  height: 44px;
}

.message-thread-avatar.online::after {
  border-color: var(--surface);
}

.message-thread-person > span:last-child {
  min-width: 0;
}

.message-thread-person strong,
.message-thread-person small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-thread-person strong {
  font-size: 10px;
  line-height: 14px;
}

.message-thread-person small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
}

.message-thread-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.message-thread-actions button {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: var(--purple);
}

.message-thread-actions svg {
  width: 18px;
  height: 18px;
}

.message-thread-scroll {
  position: absolute;
  inset: 94px 10px 76px;
  padding: 4px 6px 18px;
  overflow-y: auto;
  scrollbar-width: none;
}

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

.message-thread-intro {
  min-height: 104px;
  padding-top: 18px;
  text-align: center;
}

.message-intro-avatars {
  height: 52px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.message-intro-avatars img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--app-bg);
}

.message-intro-avatars img + img {
  margin-left: -10px;
}

.message-thread-intro p {
  margin: 8px 0 0;
  color: var(--faint);
  font-size: 8px;
}

.message-thread-intro strong {
  color: var(--muted);
}

.message-day-separator {
  min-height: 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.message-day-separator span {
  height: 1px;
  background: var(--line);
}

.message-day-separator time {
  color: var(--faint);
  font-size: 7px;
}

.message-stream {
  padding: 8px 0 24px;
  display: grid;
  gap: 13px;
}

.message-group {
  max-width: 82%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.message-group.incoming {
  justify-self: start;
  align-items: flex-start;
}

.message-group.outgoing {
  justify-self: end;
  align-items: flex-end;
}

.message-bubble {
  padding: 9px 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 10px;
  line-height: 1.42;
  box-shadow: var(--shadow);
}

.message-group.incoming .message-bubble {
  border-radius: 18px 18px 18px 4px;
}

.message-group.outgoing .message-bubble {
  border-radius: 18px 18px 4px 18px;
  background: var(--surface-soft);
}

.message-group time {
  margin-top: 2px;
  color: var(--faint);
  font-size: 6px;
}

.message-composer {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 20;
  height: 58px;
  padding: 5px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 -8px 30px rgba(0,0,0,.16);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 5px;
}

.message-attach-button,
.message-send-button {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.message-attach-button {
  background: var(--surface-soft);
  color: var(--muted);
}

.message-send-button {
  background: var(--purple);
  color: #fff;
}

.message-attach-button svg,
.message-send-button svg {
  width: 21px;
  height: 21px;
}

.message-composer label {
  height: 48px;
  padding: 0 12px;
  border-radius: 14px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
}

.message-composer input {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 10px;
}

.message-composer input::placeholder {
  color: var(--muted);
}

.message-send-icon {
  display: none;
  transform: rotate(-90deg);
}

.message-send-button.has-text .message-mic-icon {
  display: none;
}

.message-send-button.has-text .message-send-icon {
  display: block;
}

.message-new {
  animation: message-pop 220ms ease both;
}

@keyframes message-pop {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 359px) {
  .messages-page {
    padding-right: 8px;
    padding-left: 8px;
  }

  .message-thread-page {
    padding-right: 6px;
    padding-left: 6px;
  }

  .message-thread-header {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 5px;
  }

  .message-thread-person .message-thread-avatar {
    width: 40px;
    height: 40px;
  }

  .message-thread-actions button {
    width: 32px;
    height: 32px;
  }

  .message-thread-actions svg {
    width: 16px;
    height: 16px;
  }
}


/* ================================================================
   Version 54: Ready-header parity and thread scroll containment
   ================================================================ */

/* Overview follows the same page rhythm as Ready Lobbies. */
.messages-page {
  min-height: calc(100dvh - 82px);
  padding: 12px 12px 34px;
}

/* The old centered message header is retired. The actual markup now
   uses ready-page-header and therefore inherits its exact dimensions,
   typography, icon sizing, avatar shape and scroll treatment. */
.messages-ready-header {
  margin: 0;
}

.messages-ready-header .messages-compose-trigger {
  color: var(--purple);
}

/* Single-digit counters are true circular badges instead of pills. */
.messages-tabs b {
  width: 24px;
  min-width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  flex: 0 0 24px;
}

/* Unread state must remain a dot. The previous combination of
   conversation-status and unread-dot left a 24px flex basis, which
   produced the elongated purple badges visible in the screenshot. */
.conversation-status.unread-dot {
  width: 10px;
  min-width: 10px;
  height: 10px;
  margin: 0 7px;
  border-radius: 50%;
  display: block;
  flex: 0 0 10px;
}

.conversation-status:not(.unread-dot) {
  width: 24px;
  min-width: 24px;
  height: 24px;
  margin: 0;
  flex: 0 0 24px;
}

.conversation-status:not(.unread-dot) svg {
  width: 16px;
  height: 16px;
}

/* The thread page itself never scrolls. Header and composer stay in
   place, only the central conversation history is scrollable. */
body[data-page="message-thread"] .app-scroll {
  position: absolute;
  inset: 0;
  overflow: hidden !important;
  overscroll-behavior: none;
}

.message-thread-page {
  position: absolute;
  inset: 0;
  width: auto;
  min-height: 0;
  height: auto;
  padding: 0;
  overflow: hidden;
}

.message-thread-ready-header {
  position: absolute;
  left: 10px;
  right: 10px;
  top: max(10px, env(safe-area-inset-top));
  z-index: 30;
  width: auto;
}

/* Presence belongs to the title block without changing Ready's
   established header height. */
.message-thread-header-copy {
  display: grid;
  align-content: center;
}

.message-thread-header-copy h1 {
  margin-top: 0;
}

.message-thread-header-copy small {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  line-height: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-thread-ready-header .message-thread-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.message-thread-ready-header .message-thread-avatar.online::after {
  width: 9px;
  height: 9px;
  right: -1px;
  bottom: 0;
  border-width: 3px;
  border-color: var(--surface);
}

/* Exactly one internal scroll region between header and composer. */
.message-thread-scroll {
  position: absolute;
  left: 10px;
  right: 10px;
  top: calc(max(10px, env(safe-area-inset-top)) + 76px);
  bottom: calc(max(10px, env(safe-area-inset-bottom)) + 68px);
  padding: 6px 6px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Composer is anchored to the viewport-sized thread page, not to the
   scrollable history. */
.message-composer {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 32;
}

/* Remove the obsolete custom header sizing from practical use. */
.messages-page-header,
.message-thread-header,
.messages-header-button,
.message-thread-back,
.message-thread-actions {
  display: none !important;
}

@media (max-width: 359px) {
  .messages-page {
    padding-right: 9px;
    padding-left: 9px;
  }

  .message-thread-ready-header {
    left: 7px;
    right: 7px;
  }

  .message-thread-scroll {
    left: 7px;
    right: 7px;
  }

  .message-composer {
    left: 7px;
    right: 7px;
  }
}

/* ================================================================
   Teams overview and detail
   ================================================================ */

body[data-page="teams"] .app-scroll,
body[data-page="team-detail"] .app-scroll {
  background:
    radial-gradient(circle at 92% 3%, color-mix(in srgb, var(--purple) 10%, transparent), transparent 26%),
    var(--app-bg);
}

.teams-page {
  min-height: calc(100dvh - 82px);
  padding: 12px 12px 34px;
}

/* Header dimensions are intentionally not redefined here.
   Overview and detail use the existing Ready Lobby header classes 1:1. */

.teams-kicker {
  display: block;
  color: var(--purple);
  font-size: 8px;
  line-height: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.teams-hero {
  margin-top: 12px;
  padding: 18px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 90% 12%, color-mix(in srgb, var(--purple) 18%, transparent), transparent 35%),
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 96%, var(--purple) 4%), var(--surface));
  box-shadow: var(--shadow);
}

.teams-hero h2 {
  max-width: 310px;
  margin: 6px 0 0;
  font-size: 27px;
  line-height: 1.12;
}

.teams-hero p {
  max-width: 300px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.teams-hero-metrics {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.teams-hero-metrics > div {
  min-height: 68px;
  padding: 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-soft) 92%, transparent);
}

.teams-hero-metrics strong,
.teams-hero-metrics span {
  display: block;
}

.teams-hero-metrics strong {
  font-size: 20px;
}

.teams-hero-metrics span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.teams-primary-button {
  min-height: 48px;
  margin-top: 14px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: var(--purple);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.teams-primary-button svg {
  width: 19px;
  height: 19px;
}

.teams-filter-panel {
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.teams-search-box {
  height: 50px;
  padding: 0 12px;
  border-radius: 14px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  gap: 9px;
}

.teams-search-box > svg {
  width: 21px;
  height: 21px;
  color: var(--purple);
  flex: 0 0 21px;
}

.teams-search-box input {
  min-width: 0;
  flex: 1;
  height: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 9px;
}

.teams-search-box input::placeholder { color: var(--muted); }

.teams-search-box button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.teams-search-box button svg { width: 14px; height: 14px; }

.teams-filter-row {
  margin-top: 9px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.teams-filter-row::-webkit-scrollbar { display: none; }

.teams-filter-row button {
  height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.teams-filter-row button.active {
  background: color-mix(in srgb, var(--purple) 16%, var(--surface-soft));
  color: var(--purple);
}

.teams-directory { margin-top: 17px; }

.teams-section-header,
.team-section-heading {
  min-height: 42px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.teams-section-header h2,
.team-section-heading h2 {
  margin: 3px 0 0;
  font-size: 17px;
  line-height: 21px;
}

.teams-section-header > span,
.team-section-heading small {
  color: var(--muted);
  font-size: 7px;
  white-space: nowrap;
}

.teams-card-list {
  margin-top: 9px;
  display: grid;
  gap: 10px;
}

.team-card {
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.team-card[hidden] { display: none; }

.team-card-cover {
  position: relative;
  height: 128px;
  display: block;
  overflow: hidden;
  background: #111;
}

.team-card-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.44));
}

.team-card-cover > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-card-visibility {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 10px;
  background: rgba(15,15,14,.72);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 7px;
  font-weight: 800;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.team-card-visibility svg { width: 14px; height: 14px; }

.team-card-body {
  position: relative;
  padding: 14px;
}

.team-card-avatar {
  position: absolute;
  left: 14px;
  top: -43px;
  z-index: 3;
  width: 74px;
  height: 74px;
  padding: 4px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(0,0,0,.22);
}

.team-card-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
  display: block;
}

.team-card-heading {
  min-height: 62px;
  padding-left: 88px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.team-card-heading > div { min-width: 0; flex: 1; }

.team-card-heading > div > span {
  display: block;
  color: var(--purple);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.team-card-heading h3 {
  margin: 3px 0 0;
  font-size: 15px;
  line-height: 19px;
}

.team-card-heading h3 a {
  color: inherit;
  text-decoration: none;
}

.team-card-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.team-recruiting {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.team-recruiting.open {
  background: color-mix(in srgb, var(--purple) 14%, var(--surface-soft));
  color: var(--purple);
}

.team-recruiting.closed {
  background: var(--surface-soft);
  color: var(--muted);
}

.team-card-stats {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.team-card-stats > div {
  min-height: 54px;
  padding: 9px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.team-card-stats strong,
.team-card-stats span { display: block; }
.team-card-stats strong { font-size: 14px; }
.team-card-stats span { margin-top: 3px; color: var(--muted); font-size: 7px; }

.team-card-tags,
.team-detail-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.team-card-tags span,
.team-detail-tags span {
  min-height: 27px;
  padding: 0 9px;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  font-size: 7px;
  font-weight: 700;
}

.team-card-footer {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.team-member-stack {
  display: flex;
  align-items: center;
}

.team-member-stack img,
.team-member-stack span {
  width: 30px;
  height: 30px;
  margin-left: -7px;
  border: 2px solid var(--surface);
  border-radius: 50%;
}

.team-member-stack img:first-child { margin-left: 0; }
.team-member-stack img { object-fit: cover; }

.team-member-stack span {
  background: var(--surface-soft);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 6px;
  font-weight: 800;
}

.team-card-open {
  height: 36px;
  padding: 0 10px 0 12px;
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 8px;
  font-weight: 800;
  text-decoration: none;
}

.team-card-open svg {
  width: 16px;
  height: 16px;
  color: var(--purple);
  transform: rotate(-90deg);
}

.teams-empty-state {
  min-height: 250px;
  margin-top: 9px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
  display: grid;
  place-items: center;
  align-content: center;
}

.teams-empty-state[hidden] { display: none; }
.teams-empty-state > span { width: 58px; height: 58px; border-radius: 16px; background: var(--surface-soft); color: var(--purple); display: grid; place-items: center; }
.teams-empty-state svg { width: 27px; height: 27px; }
.teams-empty-state strong { margin-top: 12px; font-size: 12px; }
.teams-empty-state small { margin-top: 5px; color: var(--muted); font-size: 8px; }

/* Detail profile, deliberately left aligned */
.team-detail-page { padding-bottom: 34px; }

.team-profile-card {
  margin-top: 12px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.team-profile-cover {
  position: relative;
  height: 184px;
  background: #111;
  overflow: hidden;
}

.team-profile-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.03), rgba(0,0,0,.48));
}

.team-profile-cover > img { width: 100%; height: 100%; object-fit: cover; display: block; }

.team-profile-visibility {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  background: rgba(15,15,14,.72);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 7px;
  font-weight: 800;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.team-profile-visibility svg { width: 14px; height: 14px; }

.team-profile-main {
  position: relative;
  min-height: 102px;
  padding: 16px 14px 0 112px;
}

.team-profile-avatar-wrap {
  position: absolute;
  left: 14px;
  top: -50px;
  z-index: 3;
  width: 88px;
  height: 88px;
  padding: 5px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(0,0,0,.24);
}

.team-profile-avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 17px;
  object-fit: cover;
  display: block;
}

.team-profile-copy { min-width: 0; }

.team-profile-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.team-profile-name-row > div { min-width: 0; }
.team-profile-name-row h2 { margin: 0; font-size: 21px; line-height: 25px; }
.team-profile-name-row p { margin: 2px 0 0; color: var(--muted); font-size: 8px; }
.team-profile-copy > strong { display: block; margin-top: 8px; font-size: 9px; line-height: 1.4; }

.team-profile-location {
  margin-top: 7px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 8px;
}

.team-profile-location svg { width: 17px; height: 17px; color: var(--purple); }

.team-profile-description {
  margin: 0;
  padding: 6px 14px 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.team-profile-stats {
  margin-top: 14px;
  padding: 0 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 7px;
}

.team-profile-stats button {
  min-height: 62px;
  padding: 9px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.team-profile-stats strong,
.team-profile-stats span { display: block; }
.team-profile-stats strong { font-size: 17px; }
.team-profile-stats span { margin-top: 3px; color: var(--muted); font-size: 7px; }

.team-profile-actions {
  padding: 12px 14px 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 7px;
}

.team-join-button {
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

.team-join-button { background: var(--purple); color: #fff; }
.team-join-button[data-state="pending"] { background: color-mix(in srgb, var(--purple) 15%, var(--surface-soft)); color: var(--purple); }
.team-join-button svg { width: 17px; height: 17px; }

.team-profile-actions-single {
  grid-template-columns: minmax(0, 1fr);
}

.team-tabs {
  position: sticky;
  top: 8px;
  z-index: 24;
  height: 56px;
  margin-top: 12px;
  padding: 5px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 10px 28px rgba(0,0,0,.13);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.team-tabs::-webkit-scrollbar { display: none; }

.team-tabs button {
  min-width: 82px;
  height: 46px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

.team-tabs button.active { background: var(--surface-soft); color: var(--purple); }
.team-tab-panels { margin-top: 14px; }
.team-tab-panel[hidden] { display: none !important; }
.team-post-list { margin-top: 9px; }
.team-post-header .post-author span { white-space: normal; }

.team-info-card {
  padding: 14px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.team-info-card + .team-info-card { margin-top: 10px; }
.team-info-card header h2 { margin: 4px 0 0; font-size: 16px; }
.team-info-card > p { margin: 11px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }

.team-info-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 7px;
}

.team-info-grid > div {
  min-height: 62px;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.team-info-grid strong,
.team-info-grid span { display: block; }
.team-info-grid strong { font-size: 10px; }
.team-info-grid span { margin-top: 4px; color: var(--muted); font-size: 7px; }

.team-organizer-list,
.team-member-list,
.team-request-list {
  margin-top: 9px;
  display: grid;
  gap: 7px;
}

.team-organizer-list button,
.team-member-list button {
  width: 100%;
  min-height: 64px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
}

.team-organizer-list img,
.team-member-list img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 46px;
}

.team-organizer-list button > div,
.team-member-list button > div { min-width: 0; flex: 1; }
.team-organizer-list strong, .team-organizer-list span, .team-member-list strong, .team-member-list span, .team-member-list small { display: block; }
.team-organizer-list strong, .team-member-list strong { font-size: 9px; }
.team-organizer-list span, .team-member-list span { margin-top: 3px; color: var(--muted); font-size: 7px; }
.team-member-list small { margin-top: 2px; color: var(--faint); font-size: 6px; }
.team-organizer-list em, .team-member-list em { color: var(--purple); font-size: 7px; font-style: normal; font-weight: 800; }

.team-request-list article {
  padding: 11px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
}

.team-request-profile {
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.team-request-profile img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.team-request-copy {
  min-width: 0;
}

.team-request-copy strong,
.team-request-copy span {
  display: block;
}

.team-request-copy strong {
  font-size: 10px;
}

.team-request-copy > div > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
}

.team-request-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.team-request-tags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.team-request-tags span {
  min-height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  font-size: 6px;
  font-weight: 700;
}

.team-request-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.team-request-actions button {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

.team-request-actions button:last-child {
  background: var(--purple);
  color: #fff;
}

.team-request-actions button:disabled {
  opacity: .55;
  cursor: default;
}

.team-request-list article.team-request-removing {
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.team-requests-empty {
  min-height: 210px;
  margin-top: 9px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.team-requests-empty[hidden] {
  display: none;
}

.team-requests-empty > span {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
}

.team-requests-empty svg {
  width: 25px;
  height: 25px;
}

.team-requests-empty strong,
.team-requests-empty small {
  display: block;
}

.team-requests-empty strong {
  margin-top: 12px;
  font-size: 12px;
}

.team-requests-empty small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 7px;
}

/* Create dialog */
.team-dialog-backdrop {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: rgba(7,7,6,.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.team-create-dialog {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 102;
  max-height: calc(100% - 24px);
  padding: 16px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0,0,0,.42);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(22px);
  transition: opacity 180ms ease, transform 220ms ease, visibility 180ms ease;
}

.team-create-dialog.open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.team-create-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.team-create-dialog > header > div { min-width: 0; flex: 1; }
.team-create-dialog > header span { color: var(--purple); font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.team-create-dialog > header h2 { margin: 4px 0 0; font-size: 18px; }
.team-create-dialog > header p { margin: 5px 0 0; color: var(--muted); font-size: 7px; line-height: 1.45; }
.team-create-dialog > header button { width: 42px; height: 42px; padding: 0; border: 0; border-radius: 14px; background: var(--surface-soft); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.team-create-dialog > header button svg { width: 18px; height: 18px; }
.team-create-dialog form { margin-top: 14px; }

.team-create-media-preview { position: relative; min-height: 92px; padding: 10px 10px 10px 94px; border-radius: 8px; background: var(--surface-soft); display: flex; align-items: center; }
.team-create-cover-preview { position: absolute; inset: 0; overflow: hidden; border-radius: 8px; opacity: .28; }
.team-create-cover-preview::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--surface-soft) 24%, transparent); }
.team-create-cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.team-create-avatar-preview { position: absolute; left: 12px; top: 15px; z-index: 2; width: 62px; height: 62px; padding: 4px; border-radius: 17px; background: var(--surface); }
.team-create-avatar-preview img { width: 100%; height: 100%; border-radius: 13px; object-fit: cover; }
.team-create-media-preview > div:last-child { position: relative; z-index: 2; }
.team-create-media-preview strong, .team-create-media-preview small { display: block; }
.team-create-media-preview strong { font-size: 10px; }
.team-create-media-preview small { margin-top: 4px; color: var(--muted); font-size: 7px; line-height: 1.4; }

.team-create-dialog form > label,
.team-create-grid label { display: block; margin-top: 10px; }
.team-create-dialog label > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 7px; font-weight: 700; text-transform: none; letter-spacing: 0; }
.team-create-dialog input,
.team-create-dialog select { width: 100%; height: 44px; padding: 0 12px; border: 0; border-radius: 14px; outline: none; background: var(--surface-soft); color: var(--text); font-size: 9px; }
.team-create-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.team-create-toggle { min-height: 58px; padding: 10px 11px; border-radius: 14px; background: var(--surface-soft); display: flex !important; align-items: center; justify-content: space-between; gap: 10px; }
.team-create-toggle > span { margin: 0 !important; }
.team-create-toggle strong, .team-create-toggle small { display: block; }
.team-create-toggle strong { color: var(--text); font-size: 9px; }
.team-create-toggle small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.team-create-toggle input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--purple); }
.team-create-dialog footer { margin-top: 14px; display: grid; grid-template-columns: 1fr 1.35fr; gap: 7px; }
.team-create-dialog footer button { min-height: 44px; border: 0; border-radius: 14px; font-size: 8px; font-weight: 800; cursor: pointer; }
.team-create-cancel { background: var(--surface-soft); color: var(--muted); }
.team-create-submit { background: var(--purple); color: #fff; display: flex; align-items: center; justify-content: center; gap: 7px; }
.team-create-submit svg { width: 17px; height: 17px; }

@media (max-width: 359px) {
  .teams-page { padding-right: 9px; padding-left: 9px; }
  .teams-hero h2 { font-size: 24px; }
  .team-card-heading { padding-left: 80px; }
  .team-card-avatar { width: 68px; height: 68px; top: -39px; }
  .team-profile-main { padding-left: 104px; }
  .team-profile-avatar-wrap { width: 82px; height: 82px; }
  .team-profile-name-row { display: block; }
  .team-profile-name-row .team-recruiting { margin-top: 6px; }
}

/* ================================================================
   Cups overview and detail
   Headers deliberately reuse the Ready Lobby system without overrides.
   ================================================================ */

body[data-page="cups"] .app-scroll,
body[data-page="cup-detail"] .app-scroll {
  background:
    radial-gradient(circle at 92% 3%, color-mix(in srgb, var(--purple) 10%, transparent), transparent 27%),
    var(--app-bg);
}

.cups-page {
  min-height: calc(100dvh - 82px);
  padding: 12px 12px 34px;
}

.cups-kicker {
  display: block;
  color: var(--purple);
  font-size: 8px;
  line-height: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.cups-hero {
  position: relative;
  height: 244px;
  margin-top: 12px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.cups-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cups-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,10,9,.91) 0%, rgba(10,10,9,.7) 53%, rgba(10,10,9,.18) 100%);
}

.cups-hero-content {
  position: absolute;
  inset: 0;
  padding: 18px;
  color: #f2e8d8;
}

.cups-hero-content h2 {
  max-width: 260px;
  margin: 5px 0 0;
  font-size: 26px;
  line-height: 1.08;
}

.cups-hero-content p {
  max-width: 285px;
  margin: 8px 0 0;
  color: rgba(242,232,216,.78);
  font-size: 9px;
  line-height: 1.5;
}

.cups-hero-meta {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.cups-hero-meta span {
  min-height: 40px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(28,27,24,.72);
  color: rgba(242,232,216,.72);
  display: grid;
  align-content: center;
  font-size: 7px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cups-hero-meta strong {
  color: #fff;
  font-size: 10px;
}

.cups-hero-content > a {
  min-height: 44px;
  margin-top: 13px;
  padding: 0 14px;
  border-radius: 13px;
  background: var(--purple);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
}

.cups-hero-content > a svg {
  width: 19px;
  height: 19px;
}

.cups-filter-panel {
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.cups-search-box {
  height: 50px;
  padding: 0 12px;
  border-radius: 14px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  gap: 9px;
}

.cups-search-box > svg {
  width: 21px;
  height: 21px;
  color: var(--purple);
  flex: 0 0 21px;
}

.cups-search-box input {
  min-width: 0;
  flex: 1;
  height: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 9px;
}

.cups-search-box input::placeholder {
  color: var(--muted);
}

.cups-search-box button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.cups-search-box button svg {
  width: 14px;
  height: 14px;
}

.cups-filter-block {
  margin-top: 10px;
}

.cups-filter-block > span {
  padding-left: 2px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
}

.cups-filter-row {
  margin-top: 6px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cups-filter-row::-webkit-scrollbar {
  display: none;
}

.cups-filter-row button {
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.cups-filter-row button.active {
  background: color-mix(in srgb, var(--purple) 16%, var(--surface-soft));
  color: var(--purple);
}

.cups-hall-card {
  min-height: 130px;
  margin-top: 12px;
  padding: 14px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 92% 20%, color-mix(in srgb, #d6a84f 18%, transparent), transparent 35%),
    var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.cups-hall-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: color-mix(in srgb, #d6a84f 14%, var(--surface-soft));
  color: #d6a84f;
  display: grid;
  place-items: center;
}

.cups-hall-icon svg {
  width: 25px;
  height: 25px;
}

.cups-hall-card h2 {
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 1.2;
}

.cups-hall-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.45;
}

.cups-hall-podium {
  height: 56px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
}

.cups-hall-podium b {
  width: 24px;
  border-radius: 7px 7px 3px 3px;
  background: var(--surface-soft);
  color: #d6a84f;
  display: grid;
  place-items: center;
  font-size: 8px;
}

.cups-hall-podium b:nth-child(1) { height: 37px; }
.cups-hall-podium b:nth-child(2) { height: 54px; }
.cups-hall-podium b:nth-child(3) { height: 28px; }

.cups-directory {
  margin-top: 17px;
}

.cups-section-header {
  min-height: 42px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.cups-section-header h2 {
  margin: 3px 0 0;
  font-size: 17px;
  line-height: 21px;
}

.cups-section-header > strong {
  color: var(--muted);
  font-size: 7px;
}

.cups-card-list {
  margin-top: 9px;
  display: grid;
  gap: 10px;
}

.cup-card {
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.cup-card[hidden] {
  display: none;
}

.cup-card-cover {
  position: relative;
  height: 140px;
  display: block;
  overflow: hidden;
  background: #151512;
}

.cup-card-cover > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 260ms ease;
}

.cup-card:hover .cup-card-cover > img {
  transform: scale(1.025);
}

.cup-card-status,
.cup-card-cover > em {
  position: absolute;
  top: 10px;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 10px;
  background: rgba(14,14,13,.74);
  color: #fff;
  display: inline-flex;
  align-items: center;
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cup-card-status {
  right: 10px;
}

.cup-card-status.active { color: #73d69d; }
.cup-card-status.planned { color: #d6a84f; }
.cup-card-status.finished { color: #b9b3aa; }

.cup-card-cover > em {
  left: 10px;
  color: var(--purple);
}

.cup-card-body {
  padding: 14px;
}

.cup-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.cup-card-heading > div {
  min-width: 0;
}

.cup-card-heading > div > span {
  display: block;
  color: var(--purple);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cup-card-heading h3 {
  margin: 4px 0 0;
  font-size: 15px;
}

.cup-card-heading h3 a {
  color: var(--text);
  text-decoration: none;
}

.cup-card-open {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  display: grid;
  place-items: center;
  flex: 0 0 36px;
}

.cup-card-open svg {
  width: 17px;
  height: 17px;
  transform: rotate(-90deg);
}

.cup-card-body > p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.cup-card-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cup-card-meta span {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 7px;
}

.cup-card-meta svg {
  width: 14px;
  height: 14px;
  color: var(--purple);
}

.cup-card-footer {
  min-height: 40px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cup-card-avatars {
  display: flex;
}

.cup-card-avatars img {
  width: 29px;
  height: 29px;
  margin-left: -6px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  object-fit: cover;
}

.cup-card-avatars img:first-child {
  margin-left: 0;
}

.cup-card-footer > strong {
  color: var(--muted);
  font-size: 8px;
}

.cups-empty-state {
  min-height: 240px;
  margin-top: 9px;
  padding: 20px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
  display: grid;
  place-items: center;
  align-content: center;
}

.cups-empty-state[hidden] {
  display: none;
}

.cups-empty-state > span {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
}

.cups-empty-state svg {
  width: 27px;
  height: 27px;
}

.cups-empty-state strong,
.cups-empty-state small {
  display: block;
}

.cups-empty-state strong {
  margin-top: 12px;
  font-size: 12px;
}

.cups-empty-state small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
}

.cups-empty-state button {
  min-height: 38px;
  margin-top: 12px;
  padding: 0 13px;
  border: 0;
  border-radius: 12px;
  background: var(--purple);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

/* Detail */
.cup-detail-hero {
  margin-top: 12px;
  border-radius: 8px;
  overflow: visible;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.cup-detail-cover {
  position: relative;
  height: 186px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  background: #151512;
}

.cup-detail-cover > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cup-detail-status {
  position: absolute;
  left: 12px;
  top: 12px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  background: rgba(14,14,13,.76);
  color: #fff;
  display: inline-flex;
  align-items: center;
  font-size: 7px;
  font-weight: 800;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cup-detail-status.active { color: #73d69d; }
.cup-detail-status.planned { color: #d6a84f; }
.cup-detail-status.finished { color: #b9b3aa; }

.cup-admin-menu-wrap {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 5;
}

.cup-admin-menu-wrap > button {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: rgba(14,14,13,.76);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cup-admin-menu-wrap > button svg {
  width: 20px;
  height: 20px;
}

.cup-admin-menu {
  position: absolute;
  right: 0;
  top: 47px;
  width: 190px;
  padding: 7px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 20px 54px rgba(0,0,0,.34);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-5px);
  transition: 160ms ease;
}

.cup-admin-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.cup-admin-menu button {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

.cup-admin-menu button:hover {
  background: var(--surface-soft);
}

.cup-admin-menu button.danger {
  color: var(--danger);
}

.cup-admin-menu svg {
  width: 17px;
  height: 17px;
}

.cup-detail-hero-body {
  padding: 15px;
}

.cup-detail-hero-body h2 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.15;
}

.cup-detail-hero-body > p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.cup-detail-rule-chips {
  margin-top: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cup-detail-rule-chips span {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 7px;
}

.cup-detail-rule-chips svg {
  width: 14px;
  height: 14px;
  color: var(--purple);
}

.cup-detail-stats {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 7px;
}

.cup-detail-stats > div {
  min-height: 58px;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.cup-detail-stats span,
.cup-detail-stats strong {
  display: block;
}

.cup-detail-stats span {
  color: var(--muted);
  font-size: 7px;
}

.cup-detail-stats strong {
  margin-top: 4px;
  font-size: 10px;
}

.cup-register-button {
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: var(--purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.cup-register-button[data-state="registered"] {
  background: color-mix(in srgb, var(--purple) 14%, var(--surface-soft));
  color: var(--purple);
}

.cup-register-button svg {
  width: 18px;
  height: 18px;
}

.cup-detail-tabs {
  position: sticky;
  top: 86px;
  z-index: 22;
  min-height: 58px;
  margin-top: 12px;
  padding: 5px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 93%, transparent);
  box-shadow: 0 10px 28px rgba(0,0,0,.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cup-detail-tabs::-webkit-scrollbar {
  display: none;
}

.cup-detail-tabs button {
  min-width: max-content;
  height: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

.cup-detail-tabs button.active {
  background: var(--surface-soft);
  color: var(--text);
}

.cup-detail-tabs button.active svg {
  color: var(--purple);
}

.cup-detail-tabs svg {
  width: 17px;
  height: 17px;
}

.cup-tab-panels {
  margin-top: 12px;
}

.cup-tab-panel[hidden] {
  display: none !important;
}

.cup-panel-card {
  padding: 14px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.cup-panel-card + .cup-panel-card {
  margin-top: 10px;
}

.cup-panel-heading {
  min-height: 42px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.cup-panel-heading h2 {
  margin: 3px 0 0;
  font-size: 16px;
  line-height: 21px;
}

.cup-panel-heading > strong {
  color: var(--muted);
  font-size: 7px;
  white-space: nowrap;
}

.cup-overview-copy {
  margin-top: 12px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.62;
}

.cup-overview-copy p {
  margin: 0;
}

.cup-overview-copy p + p {
  margin-top: 10px;
}

.cup-chat-list {
  margin-top: 12px;
  display: grid;
  gap: 7px;
}

.cup-chat-list article {
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-soft);
  display: flex;
  gap: 9px;
}

.cup-chat-list img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 38px;
}

.cup-chat-list article > div {
  min-width: 0;
  flex: 1;
}

.cup-chat-list strong,
.cup-chat-list span {
  display: block;
}

.cup-chat-list strong {
  font-size: 9px;
}

.cup-chat-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.cup-chat-list span {
  margin-top: 5px;
  color: var(--faint);
  font-size: 6px;
}

.cup-chat-composer {
  min-height: 52px;
  margin-top: 10px;
  padding: 6px;
  border-radius: 14px;
  background: var(--surface-soft);
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) 40px;
  align-items: center;
  gap: 6px;
}

.cup-chat-composer > img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.cup-chat-composer input {
  min-width: 0;
  height: 40px;
  padding: 0 8px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 8px;
}

.cup-chat-composer button {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--purple);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.cup-chat-composer button svg {
  width: 18px;
  height: 18px;
  transform: rotate(-90deg);
}

.cup-rules-layout {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.cup-rule-copy {
  display: grid;
  gap: 8px;
}

.cup-rule-copy section {
  padding: 11px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.cup-rule-copy h3 {
  margin: 0;
  font-size: 10px;
}

.cup-rule-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.cup-rule-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 7px;
}

.cup-rule-facts > div {
  min-height: 76px;
  padding: 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--purple) 5%, var(--surface-soft));
}

.cup-rule-facts svg {
  width: 19px;
  height: 19px;
  color: var(--purple);
}

.cup-rule-facts span,
.cup-rule-facts strong {
  display: block;
}

.cup-rule-facts span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 6px;
}

.cup-rule-facts strong {
  margin-top: 2px;
  font-size: 8px;
}

.cup-leaderboard {
  margin-top: 12px;
  display: grid;
  gap: 5px;
}

.cup-leaderboard-row {
  min-height: 52px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  display: grid;
  grid-template-columns: 25px minmax(0,1fr) 33px 33px 38px;
  align-items: center;
  gap: 5px;
  text-align: left;
  font-size: 8px;
}

button.cup-leaderboard-row {
  cursor: pointer;
}

.cup-leaderboard-row.head {
  min-height: 34px;
  background: transparent;
  color: var(--muted);
  font-size: 6px;
  font-weight: 800;
  text-transform: uppercase;
}

.cup-leaderboard-row > span:nth-child(n+3),
.cup-leaderboard-row > b {
  text-align: center;
}

.cup-leaderboard-row > span:nth-child(2) {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.cup-leaderboard-row img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 30px;
}

.cup-leaderboard-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cup-leaderboard-row > b {
  color: var(--purple);
  font-size: 10px;
}

.cup-leaderboard-row.first {
  background: color-mix(in srgb, #d6a84f 12%, var(--surface-soft));
}

.cup-leaderboard-row.second {
  background: color-mix(in srgb, #b8bec8 9%, var(--surface-soft));
}

.cup-leaderboard-row.third {
  background: color-mix(in srgb, #b16b41 9%, var(--surface-soft));
}

.cup-prize-grid {
  display: grid;
  gap: 10px;
}

.cup-prize-card {
  min-height: 154px;
  padding: 15px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.cup-prize-card > span {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
}

.cup-prize-card > span svg {
  width: 24px;
  height: 24px;
}

.cup-prize-card em,
.cup-prize-card strong {
  display: block;
}

.cup-prize-card em {
  margin-top: 12px;
  color: var(--purple);
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.cup-prize-card strong {
  margin-top: 4px;
  font-size: 18px;
}

.cup-prize-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.cup-prize-card.first > span {
  color: #d6a84f;
}

.cup-submit-form {
  margin-top: 12px;
}

.cup-upload-zone {
  min-height: 142px;
  padding: 18px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(135deg, transparent 0 22px, color-mix(in srgb, var(--surface-soft) 72%, transparent) 22px 44px),
    var(--surface-soft);
  text-align: center;
  display: grid;
  place-items: center;
  align-content: center;
  cursor: pointer;
}

.cup-upload-zone input {
  display: none;
}

.cup-upload-zone > span {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--purple);
  display: grid;
  place-items: center;
}

.cup-upload-zone svg {
  width: 24px;
  height: 24px;
}

.cup-upload-zone strong,
.cup-upload-zone small {
  display: block;
}

.cup-upload-zone strong {
  margin-top: 10px;
  font-size: 11px;
}

.cup-upload-zone small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 7px;
}

.cup-submit-preview {
  position: relative;
  height: 190px;
  margin-top: 9px;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
}

.cup-submit-preview[hidden] {
  display: none;
}

.cup-submit-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cup-submit-preview button {
  position: absolute;
  right: 9px;
  top: 9px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: rgba(14,14,13,.76);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.cup-submit-preview button svg {
  width: 17px;
  height: 17px;
}

.cup-submit-fields {
  margin-top: 9px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 7px;
}

.cup-submit-fields label,
.cup-admin-score-grid label {
  min-width: 0;
}

.cup-submit-fields label > span,
.cup-admin-score-grid label > span {
  display: block;
  margin: 0 0 5px 2px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
}

.cup-submit-fields input,
.cup-submit-fields textarea,
.cup-admin-score-grid input {
  width: 100%;
  border: 0;
  outline: none;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  font-size: 8px;
}

.cup-submit-fields input,
.cup-admin-score-grid input {
  height: 44px;
  padding: 0 11px;
}

.cup-submit-fields textarea {
  min-height: 86px;
  padding: 11px;
  resize: vertical;
}

.cup-submit-fields .wide,
.cup-admin-score-grid .wide {
  grid-column: 1 / -1;
}

.cup-submit-note {
  margin-top: 9px;
  padding: 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--purple) 7%, var(--surface-soft));
  display: flex;
  gap: 8px;
}

.cup-submit-note svg {
  width: 18px;
  height: 18px;
  color: var(--purple);
  flex: 0 0 18px;
}

.cup-submit-note p {
  margin: 0;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.45;
}

.cup-submit-button {
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  border: 0;
  border-radius: 14px;
  background: var(--purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.cup-submit-button svg {
  width: 18px;
  height: 18px;
}

.cup-submission-list,
.cup-admin-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.cup-submission-card {
  min-height: 112px;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-soft);
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) 38px;
  gap: 8px;
}

.cup-submission-id {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--purple);
  display: grid;
  place-items: center;
  font-size: 7px;
  font-weight: 800;
}

.cup-submission-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.cup-submission-title strong {
  font-size: 9px;
}

.cup-submission-title em {
  min-height: 24px;
  padding: 0 7px;
  border-radius: 8px;
  background: var(--surface);
  font-size: 6px;
  font-style: normal;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}

.cup-submission-card.valid .cup-submission-title em { color: #52c77f; }
.cup-submission-card.review .cup-submission-title em { color: #d6a84f; }
.cup-submission-card.invalid .cup-submission-title em { color: var(--danger); }

.cup-submission-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.4;
}

.cup-submission-metrics,
.cup-admin-metrics {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cup-submission-metrics span,
.cup-admin-metrics span {
  min-height: 24px;
  padding: 0 7px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 6px;
}

.cup-submission-metrics b,
.cup-admin-metrics b {
  color: var(--text);
}

.cup-submission-card > button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  color: var(--purple);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.cup-submission-card > button svg {
  width: 19px;
  height: 19px;
}

.cup-admin-filters {
  margin-top: 11px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cup-admin-filters::-webkit-scrollbar {
  display: none;
}

.cup-admin-filters button {
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.cup-admin-filters button.active {
  background: color-mix(in srgb, var(--purple) 16%, var(--surface-soft));
  color: var(--purple);
}

.cup-admin-card {
  padding: 11px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.cup-admin-card[hidden] {
  display: none;
}

.cup-admin-card-top {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
}

.cup-admin-card-top strong {
  display: block;
  font-size: 9px;
}

.cup-admin-card-top p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 6px;
}

.cup-admin-card-top > em {
  min-height: 24px;
  padding: 0 7px;
  border-radius: 8px;
  background: var(--surface);
  font-size: 6px;
  font-style: normal;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}

.cup-admin-card.review .cup-admin-card-top > em { color: #d6a84f; }
.cup-admin-card.valid .cup-admin-card-top > em { color: #52c77f; }
.cup-admin-card.invalid .cup-admin-card-top > em { color: var(--danger); }

.cup-admin-ai {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 5px;
}

.cup-admin-ai span {
  min-height: 28px;
  padding: 0 7px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  display: flex;
  align-items: center;
  font-size: 6px;
}

.cup-admin-card details {
  margin-top: 8px;
}

.cup-admin-card summary {
  min-height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  font-size: 7px;
  font-weight: 800;
  cursor: pointer;
}

.cup-admin-score-grid {
  margin-top: 7px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 6px;
}

.cup-admin-actions {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 5px;
}

.cup-admin-actions button {
  min-height: 38px;
  padding: 0 6px;
  border: 0;
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 6px;
  font-weight: 800;
  cursor: pointer;
}

.cup-admin-actions button:nth-child(2) {
  color: #52c77f;
}

.cup-admin-actions button.danger {
  color: var(--danger);
}

/* Modals */
.cup-modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: rgba(7,7,6,.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cup-create-dialog,
.cup-progress-dialog,
.cup-shot-dialog {
  position: absolute;
  left: 12px;
  right: 12px;
  z-index: 102;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0,0,0,.44);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px);
  transition: 180ms ease;
}

.cup-create-dialog.open,
.cup-progress-dialog.open,
.cup-shot-dialog.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.cup-create-dialog {
  top: 12px;
  bottom: 12px;
  padding: 16px;
  overflow-y: auto;
}

.cup-create-dialog > header,
.cup-shot-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.cup-create-dialog > header span {
  color: var(--purple);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.cup-create-dialog > header h2,
.cup-shot-dialog > header h2 {
  margin: 4px 0 0;
  font-size: 18px;
}

.cup-create-dialog > header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 7px;
}

.cup-create-dialog > header button,
.cup-progress-dialog > button,
.cup-shot-dialog > header button {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--text);
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  cursor: pointer;
}

.cup-create-dialog > header svg,
.cup-progress-dialog > button svg,
.cup-shot-dialog > header button svg {
  width: 18px;
  height: 18px;
}

.cup-create-dialog form {
  margin-top: 15px;
}

.cup-create-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
}

.cup-create-dialog label {
  min-width: 0;
}

.cup-create-dialog label > span {
  display: block;
  margin: 0 0 5px 2px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
}

.cup-create-dialog input,
.cup-create-dialog select,
.cup-create-dialog textarea {
  width: 100%;
  border: 0;
  outline: none;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  font-size: 8px;
}

.cup-create-dialog input,
.cup-create-dialog select {
  height: 44px;
  padding: 0 10px;
}

.cup-create-dialog textarea {
  min-height: 88px;
  padding: 10px;
  resize: vertical;
}

.cup-create-wide {
  display: block;
  margin-bottom: 9px;
}

.cup-create-toggle {
  min-height: 58px;
  margin-top: 9px;
  padding: 9px 10px;
  border-radius: 12px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cup-create-toggle > span {
  margin: 0 !important;
}

.cup-create-toggle strong,
.cup-create-toggle small {
  display: block;
}

.cup-create-toggle strong {
  font-size: 8px;
}

.cup-create-toggle small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 6px;
}

.cup-create-dialog footer {
  margin-top: 12px;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 7px;
}

.cup-create-dialog footer button {
  min-height: 44px;
  border: 0;
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

.cup-create-dialog footer button:last-child {
  background: var(--purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.cup-create-dialog footer svg {
  width: 17px;
  height: 17px;
}

.cup-progress-dialog {
  top: 50%;
  padding: 18px;
  transform: translateY(calc(-50% + 18px));
}

.cup-progress-dialog.open {
  transform: translateY(-50%);
}

.cup-progress-dialog > button {
  position: absolute;
  right: 14px;
  top: 14px;
}

.cup-progress-dialog h2 {
  margin: 5px 52px 0 0;
  font-size: 18px;
}

.cup-progress-dialog > p {
  margin: 6px 50px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.cup-progress-bar {
  position: relative;
  height: 34px;
  margin-top: 18px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-soft);
}

.cup-progress-bar > span {
  height: 100%;
  width: 0;
  background: var(--purple);
  display: block;
  transition: width 180ms ease;
}

.cup-progress-bar > em {
  position: absolute;
  inset: 0;
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.cup-progress-steps {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 5px;
}

.cup-progress-steps span {
  min-height: 32px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 6px;
  font-weight: 800;
}

.cup-progress-steps span.active {
  color: var(--purple);
}

.cup-progress-result {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: color-mix(in srgb, #52c77f 9%, var(--surface-soft));
  text-align: center;
}

.cup-progress-result[hidden] {
  display: none;
}

.cup-progress-result svg {
  width: 28px;
  height: 28px;
  color: #52c77f;
}

.cup-progress-result strong,
.cup-progress-result small {
  display: block;
}

.cup-progress-result strong {
  margin-top: 7px;
  font-size: 10px;
}

.cup-progress-result small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 7px;
}

.cup-shot-dialog {
  top: 50%;
  padding: 14px;
  transform: translateY(calc(-50% + 18px));
}

.cup-shot-dialog.open {
  transform: translateY(-50%);
}

.cup-shot-dialog > img {
  width: 100%;
  max-height: 62dvh;
  margin-top: 12px;
  border-radius: 8px;
  object-fit: contain;
  display: block;
  background: #111;
}

@media (max-width: 359px) {
  .cups-page {
    padding-right: 9px;
    padding-left: 9px;
  }

  .cups-hall-card {
    grid-template-columns: 44px minmax(0,1fr);
  }

  .cups-hall-podium {
    display: none;
  }

  .cup-detail-tabs {
    top: 84px;
  }

  .cup-admin-score-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

/* ================================================================
   Guides overview and detail
   Header geometry comes directly from the shared Ready header system.
   ================================================================ */

body[data-page="guides"] .app-scroll,
body[data-page="guide-detail"] .app-scroll {
  background:
    radial-gradient(circle at 91% 2%, color-mix(in srgb, var(--purple) 10%, transparent), transparent 25%),
    var(--app-bg);
}

.guides-page {
  min-height: calc(100dvh - 82px);
  padding: 12px 12px 34px;
}

.guides-page button,
.guides-page input,
.guides-page select,
.guides-page textarea {
  font: inherit;
}

.guides-kicker {
  display: block;
  color: var(--purple);
  font-size: 8px;
  line-height: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

/* Header action menu */
.guide-header-menu-wrap {
  position: relative;
}

.guide-header-menu {
  position: absolute;
  top: 47px;
  right: 0;
  z-index: 40;
  width: 238px;
  padding: 7px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 22px 56px rgba(0, 0, 0, .34);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.guide-header-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.guide-header-menu > button {
  width: 100%;
  min-height: 56px;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
}

.guide-header-menu > button:hover,
.guide-header-menu > button:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.guide-header-menu > button > svg {
  width: 20px;
  height: 20px;
  color: var(--purple);
  justify-self: center;
}

.guide-header-menu strong,
.guide-header-menu small {
  display: block;
}

.guide-header-menu strong {
  font-size: 9px;
}

.guide-header-menu small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.35;
}

/* Overview hero */
.guides-hero {
  position: relative;
  height: 254px;
  margin-top: 12px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.guides-hero > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.08);
  filter: saturate(.75) brightness(.72);
}

.guides-hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 20%, color-mix(in srgb, var(--purple) 30%, transparent), transparent 39%),
    linear-gradient(90deg, rgba(15, 15, 13, .94) 0%, rgba(15, 15, 13, .78) 58%, rgba(15, 15, 13, .28) 100%);
}

.guides-hero-content {
  position: absolute;
  inset: 0;
  padding: 18px;
  color: #f2e8d8;
}

.guides-hero-content h2 {
  max-width: 260px;
  margin: 5px 0 0;
  font-size: 27px;
  line-height: 1.06;
  letter-spacing: -.55px;
}

.guides-hero-content > p {
  max-width: 282px;
  margin: 8px 0 0;
  color: rgba(242, 232, 216, .76);
  font-size: 9px;
  line-height: 1.5;
}

.guides-hero-stats {
  margin-top: 14px;
  display: flex;
  gap: 7px;
}

.guides-hero-stats > div {
  min-width: 70px;
  min-height: 48px;
  padding: 8px 9px;
  border-radius: 8px;
  background: rgba(24, 23, 20, .72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.guides-hero-stats strong,
.guides-hero-stats span {
  display: block;
}

.guides-hero-stats strong {
  font-size: 14px;
}

.guides-hero-stats span {
  margin-top: 2px;
  color: rgba(242, 232, 216, .64);
  font-size: 7px;
}

.guides-hero-content > a {
  min-height: 42px;
  margin-top: 12px;
  padding: 0 13px;
  border-radius: 13px;
  background: var(--purple);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 8px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 9px 22px color-mix(in srgb, var(--purple) 24%, transparent);
}

.guides-hero-content > a svg {
  width: 18px;
  height: 18px;
}

/* Filters */
.guides-filter-panel {
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.guides-search-box {
  height: 50px;
  padding: 0 10px 0 12px;
  border-radius: 14px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  gap: 9px;
}

.guides-search-box > svg {
  width: 21px;
  height: 21px;
  color: var(--purple);
  flex: 0 0 21px;
}

.guides-search-box input {
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  flex: 1;
  font-size: 9px;
}

.guides-search-box input::placeholder {
  color: var(--muted);
}

.guides-search-box button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.guides-search-box button svg {
  width: 14px;
  height: 14px;
}

.guides-category-row {
  margin-top: 9px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.guides-category-row::-webkit-scrollbar {
  display: none;
}

.guides-category-row button {
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 7px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.guides-category-row button span {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 7px;
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 6px;
}

.guides-category-row button.active {
  background: color-mix(in srgb, var(--purple) 16%, var(--surface-soft));
  color: var(--purple);
}

.guides-filter-grid {
  margin-top: 9px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.guides-filter-grid label {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.guides-filter-grid label > span {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 6px;
  font-weight: 800;
}

.guides-filter-grid label > span svg {
  width: 13px;
  height: 13px;
  color: var(--purple);
}

.guides-filter-grid select {
  width: 100%;
  height: 28px;
  margin-top: 3px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 8px;
  font-weight: 700;
}

.guides-reset-button {
  min-height: 36px;
  margin-top: 9px;
  padding: 0 11px;
  border: 0;
  border-radius: 12px;
  background: color-mix(in srgb, var(--purple) 10%, var(--surface-soft));
  color: var(--purple);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 7px;
  font-weight: 800;
  cursor: pointer;
}

.guides-reset-button svg {
  width: 16px;
  height: 16px;
}

.guides-directory {
  margin-top: 17px;
}

.guides-section-heading {
  min-height: 42px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.guides-section-heading h2 {
  margin: 3px 0 0;
  font-size: 17px;
  line-height: 21px;
}

.guides-section-heading > strong,
.guides-section-heading > a {
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  text-decoration: none;
}

.guides-card-list {
  margin-top: 9px;
  display: grid;
  gap: 10px;
}

.guide-card {
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.guide-card[hidden] {
  display: none;
}

.guide-card-cover {
  position: relative;
  height: 155px;
  display: block;
  overflow: hidden;
  background: #151512;
}

.guide-card-cover > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 240ms ease;
}

.guide-card:hover .guide-card-cover > img {
  transform: scale(1.025);
}

.guide-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(10, 10, 9, .76) 100%);
}

.guide-featured-badge,
.guide-reading-time {
  position: absolute;
  min-height: 29px;
  padding: 0 9px;
  border-radius: 10px;
  background: rgba(15, 15, 13, .78);
  color: #f2e8d8;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 7px;
  font-weight: 800;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.guide-featured-badge {
  left: 10px;
  top: 10px;
  color: var(--purple);
}

.guide-reading-time {
  right: 10px;
  bottom: 10px;
}

.guide-featured-badge svg,
.guide-reading-time svg {
  width: 14px;
  height: 14px;
}

.guide-card-body {
  padding: 13px;
}

.guide-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.guide-card-meta > span {
  min-height: 27px;
  padding: 0 8px;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  font-size: 6px;
  font-weight: 800;
}

.guide-card h3 {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.24;
}

.guide-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.guide-card-body > p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.guide-card-tags {
  margin-top: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.guide-card-tags span {
  color: var(--purple);
  font-size: 7px;
  font-weight: 700;
}

.guide-card-footer {
  min-height: 45px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.guide-author {
  min-width: 0;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.guide-author img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 34px;
}

.guide-author span {
  min-width: 0;
}

.guide-author strong,
.guide-author small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-author strong {
  font-size: 8px;
}

.guide-author small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 6px;
}

.guide-card-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.guide-card-stats span {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 6px;
  font-weight: 700;
}

.guide-card-stats svg {
  width: 14px;
  height: 14px;
  color: var(--purple);
}

.guides-empty-state {
  min-height: 240px;
  margin-top: 9px;
  padding: 20px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
  display: grid;
  place-items: center;
  align-content: center;
}

.guides-empty-state[hidden] {
  display: none;
}

.guides-empty-state > span {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
}

.guides-empty-state > span svg {
  width: 27px;
  height: 27px;
}

.guides-empty-state strong,
.guides-empty-state small {
  display: block;
}

.guides-empty-state strong {
  margin-top: 12px;
  font-size: 12px;
}

.guides-empty-state small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
}

.guides-empty-state button {
  min-height: 38px;
  margin-top: 12px;
  padding: 0 13px;
  border: 0;
  border-radius: 12px;
  background: var(--purple);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

/* Detail hero */
.guide-detail-hero {
  margin-top: 12px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.guide-detail-cover {
  position: relative;
  height: 194px;
  overflow: hidden;
  background: #151512;
}

.guide-detail-cover > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.guide-detail-cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 9, .1), rgba(10, 10, 9, .66));
}

.guide-detail-featured {
  position: absolute;
  left: 12px;
  top: 12px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  background: rgba(15, 15, 13, .78);
  color: var(--purple);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 7px;
  font-weight: 800;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.guide-detail-featured[hidden] {
  display: none;
}

.guide-detail-featured svg {
  width: 15px;
  height: 15px;
}

.guide-cover-save {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: rgba(15, 15, 13, .78);
  color: #f2e8d8;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.guide-cover-save svg {
  width: 20px;
  height: 20px;
}

.guide-cover-save.active {
  background: var(--purple);
  color: #fff;
}

.guide-detail-copy {
  padding: 14px;
}

.guide-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.guide-detail-meta > span {
  min-height: 29px;
  padding: 0 8px;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 6px;
}

.guide-detail-meta svg {
  width: 14px;
  height: 14px;
  color: var(--purple);
}

.guide-detail-meta b {
  font-weight: 800;
}

.guide-detail-copy > h2 {
  margin: 12px 0 0;
  font-size: 22px;
  line-height: 1.13;
  letter-spacing: -.35px;
}

.guide-detail-copy > p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.guide-author-card {
  min-height: 66px;
  margin-top: 13px;
  padding: 8px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.guide-author-card > img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
}

.guide-author-card > span:nth-child(2) {
  min-width: 0;
}

.guide-author-card strong,
.guide-author-card small {
  display: block;
}

.guide-author-card > span:nth-child(2) strong,
.guide-author-card > span:nth-child(2) small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-author-card > span:nth-child(2) strong {
  font-size: 9px;
}

.guide-author-card > span:nth-child(2) small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 6px;
}

.guide-author-reputation {
  min-width: 44px;
  text-align: right;
}

.guide-author-reputation b {
  color: var(--purple);
  font-size: 9px;
}

.guide-author-reputation small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 5px;
}

.guide-author-card > svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  transform: rotate(-90deg);
}

.guide-detail-actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.guide-detail-actions button {
  min-width: 0;
  min-height: 58px;
  padding: 7px 3px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
}

.guide-detail-actions button.active {
  background: color-mix(in srgb, var(--purple) 14%, var(--surface-soft));
  color: var(--purple);
}

.guide-detail-actions svg {
  width: 18px;
  height: 18px;
}

.guide-detail-actions span,
.guide-detail-actions b {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-detail-actions span {
  font-size: 5.5px;
  font-weight: 800;
}

.guide-detail-actions b {
  font-size: 6px;
}

/* TOC */
.guide-toc {
  position: sticky;
  top: 86px;
  z-index: 21;
  min-height: 58px;
  margin-top: 12px;
  padding: 5px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 93%, transparent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.guide-toc::-webkit-scrollbar {
  display: none;
}

.guide-toc > span,
.guide-toc button {
  min-width: max-content;
  height: 48px;
  padding: 0 11px;
  border: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 7px;
  font-weight: 800;
}

.guide-toc > span {
  background: color-mix(in srgb, var(--purple) 12%, var(--surface-soft));
  color: var(--purple);
}

.guide-toc > span svg {
  width: 17px;
  height: 17px;
}

.guide-toc button {
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.guide-toc button:hover,
.guide-toc button:focus-visible {
  background: var(--surface-soft);
  color: var(--text);
  outline: none;
}

/* Guide body */
.guide-content {
  margin-top: 12px;
}

.guide-content-intro,
.guide-content-section,
.guide-info-card {
  padding: 14px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.guide-content-intro > p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.62;
}

.guide-content-section {
  margin-top: 10px;
  scroll-margin-top: 158px;
}

.guide-content-section > header {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.guide-content-section > header > span {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--purple) 14%, var(--surface-soft));
  color: var(--purple);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 900;
}

.guide-content-section > header small {
  color: var(--purple);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.guide-content-section > header h2 {
  margin: 2px 0 0;
  font-size: 16px;
}

.guide-content-section > p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.guide-step-list {
  margin-top: 12px;
  display: grid;
  gap: 7px;
}

.guide-step-list > article {
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-soft);
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 9px;
}

.guide-step-list > article > span {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 8px;
  font-weight: 900;
}

.guide-step-list small {
  color: var(--purple);
  font-size: 6px;
  font-weight: 800;
}

.guide-step-list h3 {
  margin: 2px 0 0;
  font-size: 10px;
}

.guide-step-list p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.48;
}

.guide-content-image {
  margin: 12px 0 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-soft);
}

.guide-content-image img {
  width: 100%;
  height: 192px;
  display: block;
  object-fit: cover;
}

.guide-content-image figcaption {
  padding: 9px 10px 10px;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.45;
}

.guide-note,
.guide-warning {
  margin-top: 12px;
  padding: 11px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--purple) 8%, var(--surface-soft));
  display: flex;
  gap: 9px;
}

.guide-warning {
  background: color-mix(in srgb, var(--danger) 7%, var(--surface-soft));
}

.guide-note > svg,
.guide-warning > svg {
  width: 21px;
  height: 21px;
  color: var(--purple);
  flex: 0 0 21px;
}

.guide-warning > svg {
  color: var(--danger);
}

.guide-note strong,
.guide-warning strong {
  display: block;
  font-size: 9px;
}

.guide-note p,
.guide-warning p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.48;
}

.guide-check-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.guide-check-list li {
  padding: 9px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 7px;
  line-height: 1.45;
}

.guide-check-list svg {
  width: 17px;
  height: 17px;
  color: var(--purple);
  flex: 0 0 17px;
}

.guide-check-list strong {
  color: var(--text);
}

.guide-extract-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.guide-extract-grid article {
  min-height: 126px;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.guide-extract-grid svg {
  width: 22px;
  height: 22px;
  color: var(--purple);
}

.guide-extract-grid strong {
  display: block;
  margin-top: 10px;
  font-size: 8px;
  line-height: 1.3;
}

.guide-extract-grid p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 6px;
  line-height: 1.45;
}

.guide-info-card {
  margin-top: 10px;
}

.guide-info-card > header h2 {
  margin: 3px 0 0;
  font-size: 16px;
}

.guide-info-card > div {
  margin-top: 11px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.guide-info-card > div > span {
  min-height: 54px;
  padding: 9px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.guide-info-card small,
.guide-info-card strong {
  display: block;
}

.guide-info-card small {
  color: var(--muted);
  font-size: 6px;
}

.guide-info-card strong {
  margin-top: 3px;
  font-size: 9px;
}

.guide-detail-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.guide-detail-tags span {
  min-height: 28px;
  padding: 0 8px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--purple) 9%, var(--surface-soft));
  color: var(--purple);
  display: inline-flex;
  align-items: center;
  font-size: 7px;
  font-weight: 800;
}

.guide-related-section {
  margin-top: 17px;
}

.guide-related-list {
  margin-top: 9px;
  display: grid;
  gap: 8px;
}

.guide-related-list > a {
  min-height: 86px;
  padding: 8px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

.guide-related-list img {
  width: 82px;
  height: 70px;
  border-radius: 7px;
  object-fit: cover;
}

.guide-related-list small,
.guide-related-list strong,
.guide-related-list em {
  display: block;
}

.guide-related-list small {
  color: var(--purple);
  font-size: 6px;
  font-weight: 800;
}

.guide-related-list strong {
  margin-top: 4px;
  font-size: 8px;
  line-height: 1.35;
}

.guide-related-list em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 6px;
  font-style: normal;
}

.guide-related-list > a > svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  transform: rotate(-90deg);
}

/* Comments shell */
.guide-comments-backdrop {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: rgba(7, 7, 6, .72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.guide-comments-dialog {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 102;
  height: min(690px, calc(100dvh - 20px));
  padding: 15px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .46);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(22px);
  transition: 180ms ease;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.guide-comments-dialog.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.guide-comments-header {
  min-height: 60px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.guide-comments-header > div > span {
  color: var(--purple);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.guide-comments-header h2 {
  margin: 3px 0 0;
  font-size: 18px;
}

.guide-comments-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 7px;
}

.guide-comments-header > button {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.guide-comments-header > button svg {
  width: 18px;
  height: 18px;
}

.guide-comments-list {
  min-height: 0;
  margin-top: 8px;
  padding-right: 2px;
  overflow-y: auto;
  scrollbar-width: none;
  display: grid;
  align-content: start;
  gap: 8px;
}

.guide-comments-list::-webkit-scrollbar {
  display: none;
}

.guide-comment {
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-soft);
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 9px;
}

.guide-comment-avatar {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
}

.guide-comment-avatar img,
.guide-comment-reply > img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.guide-comment > div > header,
.guide-comment-reply header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.guide-comment header strong {
  font-size: 8px;
}

.guide-comment header span {
  color: var(--muted);
  font-size: 6px;
}

.guide-comment > div > p,
.guide-comment-reply p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.48;
}

.guide-comment > div > footer {
  margin-top: 7px;
  display: flex;
  gap: 10px;
}

.guide-comment > div > footer button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 6px;
  font-weight: 800;
  cursor: pointer;
}

.guide-comment > div > footer button:first-child {
  color: var(--purple);
}

.guide-comment-reply {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 7px;
}

.guide-comment-reply > img {
  width: 32px;
  height: 32px;
}

.guide-comment-reply em {
  margin-left: 4px;
  color: var(--purple);
  font-size: 5px;
  font-style: normal;
}

.guide-comment-composer {
  min-height: 58px;
  margin-top: 10px;
  padding: 6px;
  border-radius: 14px;
  background: var(--surface-soft);
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 42px;
  align-items: end;
  gap: 6px;
}

.guide-comment-composer > img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.guide-comment-composer label {
  min-width: 0;
}

.guide-reply-target {
  min-height: 20px;
  margin: 0 0 2px 4px;
  color: var(--purple);
  display: block;
  font-size: 6px;
  font-weight: 800;
}

.guide-reply-target[hidden] {
  display: none;
}

.guide-comment-composer textarea {
  width: 100%;
  max-height: 92px;
  min-height: 40px;
  padding: 11px 7px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: var(--text);
  font-size: 8px;
  line-height: 1.4;
}

.guide-comment-composer > button {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--purple);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.guide-comment-composer > button svg {
  width: 18px;
  height: 18px;
  transform: rotate(-90deg);
}

@media (max-width: 359px) {
  .guides-page {
    padding-right: 9px;
    padding-left: 9px;
  }

  .guides-hero-content h2 {
    font-size: 24px;
  }

  .guides-filter-grid {
    grid-template-columns: 1fr;
  }

  .guide-author-reputation {
    display: none;
  }

  .guide-author-card {
    grid-template-columns: 46px minmax(0, 1fr) 18px;
  }

  .guide-extract-grid {
    grid-template-columns: 1fr;
  }

  .guide-extract-grid article {
    min-height: 0;
  }
}

/* ================================================================
   Version 64: gemeinsame Hauptnavigation für Feed, Ready, Maps,
   Gespeichert und Mitglieder
   ================================================================ */

/* Diese Übersichtsseiten verwenden exakt denselben globalen Header.
   Detailseiten behalten weiterhin ihren Zurück-/Titel-Header. */
body[data-page="feed"] .topbar,
body[data-page="ready-lobbies"] .topbar,
body[data-page="maps"] .topbar,
body[data-page="saved"] .topbar,
body[data-page="members"] .topbar {
  top: max(8px, env(safe-area-inset-top));
}

body[data-page="feed"] .phone-shell.topbar-scrolled .topbar,
body[data-page="ready-lobbies"] .phone-shell.topbar-scrolled .topbar,
body[data-page="maps"] .phone-shell.topbar-scrolled .topbar,
body[data-page="saved"] .phone-shell.topbar-scrolled .topbar,
body[data-page="members"] .phone-shell.topbar-scrolled .topbar {
  top: max(8px, env(safe-area-inset-top));
}

/* Dropdowns sitzen auf allen fünf Seiten identisch unter dem Header. */
body[data-page="feed"] .topbar-popover,
body[data-page="ready-lobbies"] .topbar-popover,
body[data-page="maps"] .topbar-popover,
body[data-page="saved"] .topbar-popover,
body[data-page="members"] .topbar-popover {
  top: calc(max(8px, env(safe-area-inset-top)) + 52px);
}

body[data-page="feed"] .phone-shell.topbar-scrolled .topbar-popover,
body[data-page="ready-lobbies"] .phone-shell.topbar-scrolled .topbar-popover,
body[data-page="maps"] .phone-shell.topbar-scrolled .topbar-popover,
body[data-page="saved"] .phone-shell.topbar-scrolled .topbar-popover,
body[data-page="members"] .phone-shell.topbar-scrolled .topbar-popover {
  top: calc(max(8px, env(safe-area-inset-top)) + 68px);
}

/* Der globale Header ist absolut positioniert. Die Seiten beginnen direkt
   darunter, ohne den alten 120px-Leerraum. */
body[data-page="ready-lobbies"] .ready-page,
body[data-page="saved"] .saved-page,
body[data-page="members"] .members-page {
  padding-top: calc(max(8px, env(safe-area-inset-top)) + 60px);
}

body[data-page="maps"] .app-scroll {
  padding-top: calc(max(8px, env(safe-area-inset-top)) + 60px);
}

/* Sticky Bereiche bleiben unter dem 60px hohen Glasheader. */
body[data-page="saved"] .saved-tabs,
body[data-page="members"] .members-tabs {
  top: calc(max(8px, env(safe-area-inset-top)) + 68px);
}

/* Feed: Da der Header jetzt am oberen Rand sitzt, wird der unnötige
   Leerraum im Hero entfernt. Composer, Moments und Feed rutschen gemeinsam
   nach oben; Breite und Form des Composers bleiben unverändert. */
body[data-page="feed"] .hero-compact {
  height: 160px;
}

body[data-page="feed"] .hero-compact .tile-a,
body[data-page="feed"] .hero-compact .tile-b {
  height: 70px;
}

body[data-page="feed"] .hero-compact .tile-c,
body[data-page="feed"] .hero-compact .tile-d {
  top: 72px;
  height: 88px;
}

body[data-page="feed"] .hero-compact .purple-glow {
  top: 20px;
  height: 78px;
}

body[data-page="feed"] .hero-compact .composer-bar {
  top: 90px;
  height: 50px;
}

@media (max-width: 600px) {
  body[data-page="feed"] .topbar,
  body[data-page="ready-lobbies"] .topbar,
  body[data-page="maps"] .topbar,
  body[data-page="saved"] .topbar,
  body[data-page="members"] .topbar {
    left: 12px;
    width: calc(100% - 24px);
  }

  body[data-page="feed"] .phone-shell.topbar-scrolled .topbar,
  body[data-page="ready-lobbies"] .phone-shell.topbar-scrolled .topbar,
  body[data-page="maps"] .phone-shell.topbar-scrolled .topbar,
  body[data-page="saved"] .phone-shell.topbar-scrolled .topbar,
  body[data-page="members"] .phone-shell.topbar-scrolled .topbar {
    left: 8px;
    width: calc(100% - 16px);
  }
}

@media (max-width: 359px) {
  body[data-page="feed"] .hero-compact {
    height: 156px;
  }

  body[data-page="feed"] .hero-compact .tile-a,
  body[data-page="feed"] .hero-compact .tile-b {
    height: 68px;
  }

  body[data-page="feed"] .hero-compact .tile-c,
  body[data-page="feed"] .hero-compact .tile-d {
    top: 70px;
    height: 86px;
  }

  body[data-page="feed"] .hero-compact .composer-bar {
    top: 88px;
  }

  body[data-page="ready-lobbies"] .ready-page,
  body[data-page="saved"] .saved-page,
  body[data-page="members"] .members-page {
    padding-top: calc(max(8px, env(safe-area-inset-top)) + 58px);
  }
}

/* ================================================================
   Version 65: Gespeichert und Mitglieder sind Unterseiten.
   Sie nutzen den bestehenden Ready/Cup-Detailheader statt Feed-Topbar.
   ================================================================ */

body[data-page="saved"] .saved-page,
body[data-page="members"] .members-page {
  min-height: calc(100dvh - 82px);
  padding: 12px 12px 30px;
}

/* Derselbe Header wie Ready Lobby Detail und Cup Detail. */
body[data-page="saved"] .ready-page-header,
body[data-page="members"] .ready-page-header {
  top: 8px;
}

body[data-page="saved"] .phone-shell.topbar-scrolled .ready-page-header,
body[data-page="members"] .phone-shell.topbar-scrolled .ready-page-header {
  top: 8px;
}

/* Unterseiten beginnen nicht mehr unter einem imaginären Feed-Header. */
body[data-page="saved"] .saved-library-hero,
body[data-page="members"] .members-hero {
  margin-top: 12px;
}

.saved-library-heading h2,
.members-hero-heading h2 {
  margin: 3px 0 0;
  font-size: 20px;
  line-height: 25px;
}

.saved-library-hero-compact,
.members-hero-compact {
  padding: 14px;
}

/* Tabs bleiben unter dem 66/60px hohen Detailheader. */
body[data-page="saved"] .saved-tabs,
body[data-page="members"] .members-tabs {
  top: 86px;
}

/* Der Filter sitzt jetzt im Header. Die Toolbar braucht nur Suche
   und Schnellfilter und bleibt dadurch ruhiger. */
body[data-page="members"] .members-toolbar {
  grid-template-columns: minmax(0, 1fr);
}

body[data-page="members"] .members-quick-filters {
  grid-column: 1;
}

/* Der bestehende Zähler im Filterdialog wird weiterhin per JS gepflegt;
   im kompakten Header zeigen wir ihn als kleinen Punkt am Filterbutton. */
body[data-page="members"] #membersFilterButton {
  position: relative;
}

body[data-page="members"] #membersFilterButton[aria-expanded="true"] {
  color: var(--purple);
  background: color-mix(in srgb, var(--purple) 13%, var(--surface-soft));
}

@media (max-width: 600px) {
  body[data-page="saved"] .saved-page,
  body[data-page="members"] .members-page {
    padding: 8px 12px 28px;
  }

  body[data-page="saved"] .ready-page-header,
  body[data-page="members"] .ready-page-header {
    top: 8px;
  }

  body[data-page="saved"] .saved-tabs,
  body[data-page="members"] .members-tabs {
    top: 82px;
  }
}

@media (max-width: 359px) {
  body[data-page="saved"] .saved-page,
  body[data-page="members"] .members-page {
    padding-right: 9px;
    padding-left: 9px;
  }

  .saved-library-heading h2,
  .members-hero-heading h2 {
    font-size: 18px;
  }
}

/* ================================================================
   Version 66: Teams, Cups und Guides sind Unterseiten.
   Sie verwenden den bestehenden Ready/Cup-Detailheader.
   ================================================================ */

body[data-page="teams"] .ready-page-header,
body[data-page="cups"] .ready-page-header,
body[data-page="guides"] .ready-page-header {
  top: 8px;
}

body[data-page="teams"] .phone-shell.topbar-scrolled .ready-page-header,
body[data-page="cups"] .phone-shell.topbar-scrolled .ready-page-header,
body[data-page="guides"] .phone-shell.topbar-scrolled .ready-page-header {
  top: 8px;
}

/* Keine abweichenden Headermaße oder eigenen Rundungen:
   Höhe, Radius, Actions und Scroll-Glas kommen vollständig aus
   dem gemeinsamen Ready-Header-System. */

/* ================================================================
   Version 67: globalen Hauptheader etwas vom oberen Rand lösen
   ================================================================ */

body[data-page="feed"],
body[data-page="ready-lobbies"],
body[data-page="maps"] {
  --primary-header-top: calc(max(8px, env(safe-area-inset-top)) + 6px);
}

/* Nur die Hauptseiten mit Menü/Logo/Suche/Nachrichten/Benachrichtigungen.
   Unterseiten- und Detailheader bleiben unverändert. */
body[data-page="feed"] .topbar,
body[data-page="ready-lobbies"] .topbar,
body[data-page="maps"] .topbar,
body[data-page="feed"] .phone-shell.topbar-scrolled .topbar,
body[data-page="ready-lobbies"] .phone-shell.topbar-scrolled .topbar,
body[data-page="maps"] .phone-shell.topbar-scrolled .topbar {
  top: var(--primary-header-top);
}

/* Popover bleiben exakt im bisherigen Abstand unter dem Header. */
body[data-page="feed"] .topbar-popover,
body[data-page="ready-lobbies"] .topbar-popover,
body[data-page="maps"] .topbar-popover {
  top: calc(var(--primary-header-top) + 52px);
}

body[data-page="feed"] .phone-shell.topbar-scrolled .topbar-popover,
body[data-page="ready-lobbies"] .phone-shell.topbar-scrolled .topbar-popover,
body[data-page="maps"] .phone-shell.topbar-scrolled .topbar-popover {
  top: calc(var(--primary-header-top) + 68px);
}

/* Ready und Maps beginnen entsprechend 6 px tiefer, damit nichts
   unter den verschobenen Header läuft. */
body[data-page="ready-lobbies"] .ready-page {
  padding-top: calc(var(--primary-header-top) + 60px);
}

body[data-page="maps"] .app-scroll {
  padding-top: calc(var(--primary-header-top) + 60px);
}
