:root {
  color-scheme: light;
  --ink: #142428;
  --muted: #69777b;
  --line: #dbe5e8;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --soft: #f3f7f7;
  --subpanel: #ffffff;
  --subpanel-strong: #f3fbfa;
  --app-bg: #edf4f3;
  --deep: #083f4d;
  --reef: #0f8f8b;
  --coral: #ee6f57;
  --sun: #f2b84b;
  --kelp: #466b54;
  --primary-button-bg: #083f4d;
  --primary-button-ink: #ffffff;
  --secondary-button-bg: #e7f5f2;
  --secondary-button-ink: #083f4d;
  --secondary-button-border: rgba(15, 143, 139, 0.18);
  --modal-backdrop: rgba(7, 32, 38, 0.46);
  --shadow: 0 18px 60px rgba(12, 38, 45, 0.12);
  --radius: 8px;
  --app-viewport-height: 100dvh;
  --app-viewport-offset-top: 0px;
  --app-keyboard-space: 320px;
  --ios-message-viewport-height: var(--app-viewport-height);
  --android-keyboard-space: 320px;
  --android-control-safe-bottom: 0px;
  --android-message-safe-bottom: var(--android-control-safe-bottom);
  --marketplace-cart-icon-url: url("assets/marketplace/cart-black.png?v=2.0.154");
  --marketplace-services-icon-url: url("assets/marketplace/services.png?v=2.0.154");
  --marketplace-payouts-icon-url: url("assets/marketplace/payouts.png?v=2.0.154");
  --marketplace-orders-icon-url: url("assets/marketplace/order.png?v=2.0.154");
  --marketplace-home-icon-url: url("assets/marketplace/home.png?v=2.0.154");
  --bottom-nav-home-icon-url: url("assets/nav/home.png?v=2.0.227");
  --bottom-nav-spot-icon-url: url("assets/nav/spot.png?v=2.0.227");
  --bottom-nav-community-icon-url: url("assets/nav/community.png?v=2.0.227");
  --bottom-nav-messages-icon-url: url("assets/nav/messages.png?v=2.0.227");
  --bottom-nav-profile-icon-url: url("assets/nav/profile.png?v=2.0.227");
  --icon-home: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m3 11 9-8 9 8'/%3E%3Cpath d='M5 10v10h14V10'/%3E%3Cpath d='M10 20v-6h4v6'/%3E%3C/svg%3E");
  --icon-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s7-5.1 7-12a7 7 0 1 0-14 0c0 6.9 7 12 7 12Z'/%3E%3Ccircle cx='12' cy='9' r='2.5'/%3E%3C/svg%3E");
  --icon-community: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M16 11a4 4 0 1 0-8 0'/%3E%3Ccircle cx='12' cy='7' r='3'/%3E%3Cpath d='M4 21c1.4-4 4.1-6 8-6s6.6 2 8 6'/%3E%3Cpath d='M19 8.5a2.5 2.5 0 0 1 0 5'/%3E%3Cpath d='M5 8.5a2.5 2.5 0 0 0 0 5'/%3E%3C/svg%3E");
  --icon-seal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m12 2 2.7 3.7 4.5.4-.4 4.5 3.2 3.4-4 2.2-1.3 4.4-4.7-1.7-4.7 1.7L6 16.2l-4-2.2 3.2-3.4-.4-4.5 4.5-.4L12 2Z'/%3E%3Cpath d='m8.8 12 2.1 2.1 4.4-4.5'/%3E%3C/svg%3E");
  --icon-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.8-4 5-6 8-6s6.2 2 8 6'/%3E%3C/svg%3E");
  --icon-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2.6' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  --icon-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M5 21h14'/%3E%3C/svg%3E");
  --icon-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3C/svg%3E");
  --icon-bookmark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 3h12v18l-6-4-6 4V3Z'/%3E%3C/svg%3E");
  --icon-message: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M21 12a8 8 0 0 1-8 8H7l-4 3v-6.2A8 8 0 1 1 21 12Z'/%3E%3Cpath d='M8 11h8M8 15h5'/%3E%3C/svg%3E");
  --icon-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='8.5' cy='10.5' r='1.5'/%3E%3Cpath d='m21 15-4.2-4.2a2 2 0 0 0-2.8 0L6 19'/%3E%3C/svg%3E");
  --icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2.2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m16.5 16.5 4 4'/%3E%3C/svg%3E");
  --icon-arrow-left: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2.4' viewBox='0 0 24 24'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E");
  --icon-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1A19.4 19.4 0 0 1 5.2 13 19.8 19.8 0 0 1 2.1 4.3 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 2 .7 2.9a2 2 0 0 1-.5 2.1L8 10a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.5c.9.3 1.9.6 2.9.7a2 2 0 0 1 1.7 2Z'/%3E%3C/svg%3E");
  --icon-x: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2.4' viewBox='0 0 24 24'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
  --icon-trash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3Cpath d='M6 6l1 16h10l1-16'/%3E%3Cpath d='M10 11v6M14 11v6'/%3E%3C/svg%3E");
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.34;
  color: var(--ink);
  background: var(--app-bg);
  overflow-x: hidden;
  overscroll-behavior-x: none;
  overscroll-behavior-y: contain;
}

.pull-refresh-indicator {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 50%;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 14px;
  color: var(--ink);
  pointer-events: none;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, -120%);
  transition: opacity 150ms ease, transform 150ms ease;
}

.pull-refresh-indicator.is-visible {
  opacity: 1;
}

.pull-refresh-indicator.is-refreshing .pull-refresh-spinner {
  animation: pull-refresh-spin 780ms linear infinite;
}

.pull-refresh-spinner {
  width: 17px;
  height: 17px;
  border: 2px solid color-mix(in srgb, var(--deep) 18%, transparent);
  border-top-color: var(--deep);
  border-radius: 50%;
}

.pull-refresh-indicator strong {
  font-size: 0.9rem;
  line-height: 1;
  white-space: nowrap;
}

@keyframes pull-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.icon-home {
  mask-image: var(--icon-home);
  -webkit-mask-image: var(--icon-home);
}

.icon-arrow-left {
  mask-image: var(--icon-arrow-left);
  -webkit-mask-image: var(--icon-arrow-left);
}

.icon-down {
  mask-image: var(--icon-down);
  -webkit-mask-image: var(--icon-down);
}

.icon-phone {
  mask-image: var(--icon-phone);
  -webkit-mask-image: var(--icon-phone);
}

.icon-plus {
  mask-image: var(--icon-plus);
  -webkit-mask-image: var(--icon-plus);
}

.icon-user {
  mask-image: var(--icon-user);
  -webkit-mask-image: var(--icon-user);
}

.icon-x {
  mask-image: var(--icon-x);
  -webkit-mask-image: var(--icon-x);
}

.icon-trash {
  mask-image: var(--icon-trash);
  -webkit-mask-image: var(--icon-trash);
}

/* Message composer viewport lock: keep focused inputs from widening mobile threads. */
body.messages-open,
body.messages-open main,
body.messages-open .app-shell {
  max-width: 100dvw;
  overflow-x: hidden;
}

#messagesSheet {
  position: fixed;
  right: 0;
  left: 0;
  width: 100dvw;
  max-width: 100dvw;
  overflow-x: clip;
}

#messagesSheet .messages-panel,
#messagesSheet .messages-list,
#messagesSheet .messages-list.is-thread,
#messagesSheet .message-conversation,
#messagesSheet .message-composer {
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  overflow-x: clip;
}

#messagesSheet .messages-list.is-thread .message-composer {
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  padding-inline: max(12px, env(safe-area-inset-left, 0px)) max(12px, env(safe-area-inset-right, 0px));
  contain: inline-size;
}

#messagesSheet .messages-list.is-thread .message-composer input[name="message"] {
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  overflow: hidden;
  font-size: 16px;
}

#messagesSheet .messages-list.is-thread .message-composer .primary-button {
  flex: 0 0 auto;
  inline-size: auto;
  max-inline-size: 96px;
  min-inline-size: 64px;
  white-space: nowrap;
}

/* Final guard against message pages causing horizontal scroll on mobile. */
#messagesSheet .message-conversation,
#messagesSheet .messages-panel,
#messagesSheet .messages-list {
  max-width: 100%;
  overflow-x: hidden;
}

#messagesSheet .message-bubble-row {
  min-width: 0;
  max-width: 100%;
}

#messagesSheet .message-bubble-stack {
  width: fit-content;
  max-width: min(68%, 360px);
}

#messagesSheet .message-bubble {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Comment composer viewport lock: keep iOS focus from zooming or shifting the sheet width. */
body.comments-open,
body.comments-open main,
body.comments-open .app-shell {
  max-width: 100dvw;
  overflow-x: hidden;
}

#commentsSheet {
  position: fixed;
  right: 0;
  left: 0;
  width: 100dvw;
  max-width: 100dvw;
  overflow-x: clip;
  justify-items: center;
}

#commentsSheet .comments-panel,
#commentsSheet .comments-list,
#commentsSheet .comments-composer,
#commentsSheet .comment-form {
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  overflow-x: clip;
}

#commentsSheet .comments-panel {
  width: min(680px, 100dvw);
}

#commentsSheet .comment-form {
  grid-template-columns: 34px minmax(0, 1fr) max-content;
  contain: inline-size;
}

#commentsSheet .comment-form input[name="comment"] {
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  overflow: hidden;
  font-size: 16px;
}

#commentsSheet .comment-submit {
  inline-size: auto;
  max-inline-size: 84px;
  white-space: nowrap;
}

/* Forum/spot viewport lock: keep selected spot tabs from widening mobile pages. */
.app-shell[data-view="spots"],
.app-shell[data-view="spots"] .map-layout,
.app-shell[data-view="spots"] .spot-posts,
#spotPosts,
#spotPosts > *,
#spotPosts .spot-detail-hero,
#spotPosts .spot-conditions-panel,
#spotPosts .spot-media-panel,
#spotPosts .spot-detail-cover,
#spotPosts .spot-detail-body,
#spotPosts .spot-detail-tabs,
#spotPosts .spot-detail-chip-row,
#spotPosts .location-forum,
#spotPosts .forum-thread,
#spotPosts .forum-composer {
  box-sizing: border-box;
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  overflow-x: clip;
}

#spotPosts .spot-detail-body > *,
#spotPosts .spot-detail-chip-row span,
#spotPosts .spot-meta {
  max-inline-size: 100%;
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

#spotPosts .spot-detail-chip-row span {
  white-space: normal;
}

#spotPosts .spot-detail-body .primary-button {
  inline-size: 100%;
  max-inline-size: 100%;
}

#spotPosts .spot-detail-tabs {
  overscroll-behavior-x: contain;
}

#spotPosts .spot-detail-tabs button {
  flex: 1 1 0;
  min-inline-size: 0;
  overflow-wrap: anywhere;
  text-align: center;
  white-space: normal;
}

#spotPosts.spot-posts {
  inline-size: auto;
  width: auto;
}

#spotPosts .location-forum,
#spotPosts .forum-composer {
  contain: inline-size;
}

#spotPosts .location-forum.is-maximized {
  inline-size: 100dvw;
  max-inline-size: 100dvw;
  contain: none;
  overflow: hidden;
}

#spotPosts .forum-composer {
  grid-template-columns: 44px minmax(0, 1fr) max-content;
  align-items: center;
}

#spotPosts .forum-composer input[name="message"] {
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  overflow: hidden;
  font-size: 16px;
}

#spotPosts .forum-composer .primary-button {
  inline-size: auto;
  max-inline-size: 96px;
  min-inline-size: 64px;
  min-height: 42px;
  padding-inline: 16px;
  white-space: nowrap;
}

.app-shell[data-view="forum"] {
  display: block;
  width: 100%;
  inline-size: 100%;
  max-width: 100%;
  max-inline-size: 100%;
  min-height: var(--app-viewport-height, 100dvh);
  min-block-size: var(--app-viewport-height, 100dvh);
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.app-shell[data-view="forum"] .rail,
.app-shell[data-view="forum"] .side-panel,
.app-shell[data-view="forum"] .topbar,
.app-shell[data-view="forum"] .bottom-nav,
.app-shell[data-view="forum"] .v2-log-dive-button,
.app-shell[data-view="forum"] .app-legal-footer {
  display: none !important;
}

.app-shell[data-view="services"] .v2-log-dive-button,
.app-shell[data-view="service-editor"] .v2-log-dive-button,
.app-shell[data-view="payouts"] .v2-log-dive-button,
.app-shell[data-view="payout-method-editor"] .v2-log-dive-button,
.app-shell[data-view="cart"] .v2-log-dive-button,
.app-shell[data-view="orders"] .v2-log-dive-button {
  display: none !important;
}

.app-shell[data-view="forum"] .main {
  width: 100%;
  inline-size: 100%;
  max-width: 100%;
  max-inline-size: 100%;
  height: var(--app-viewport-height, 100dvh);
  block-size: var(--app-viewport-height, 100dvh);
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.view-forum,
.forum-page-shell {
  width: 100%;
  inline-size: 100%;
  max-width: 100%;
  max-inline-size: 100%;
  height: var(--app-viewport-height, 100dvh);
  block-size: var(--app-viewport-height, 100dvh);
  min-height: 0;
  min-block-size: 0;
  overflow: hidden;
}

.location-forum.is-page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100vw;
  width: 100dvw;
  inline-size: 100dvw;
  max-width: 100dvw;
  max-inline-size: 100dvw;
  height: var(--app-viewport-height, 100dvh);
  block-size: var(--app-viewport-height, 100dvh);
  max-height: var(--app-viewport-height, 100dvh);
  max-block-size: var(--app-viewport-height, 100dvh);
  min-height: 0;
  min-block-size: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
}

.location-forum.is-page .forum-panel-head {
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  padding-right: max(18px, env(safe-area-inset-right, 0px));
  padding-left: max(18px, env(safe-area-inset-left, 0px));
}

.location-forum.is-page .forum-thread {
  padding-right: max(14px, env(safe-area-inset-right, 0px));
  padding-left: max(14px, env(safe-area-inset-left, 0px));
}

.location-forum.is-page .forum-composer {
  box-sizing: border-box;
  width: 100%;
  inline-size: 100%;
  max-width: 100%;
  max-inline-size: 100%;
  min-width: 0;
  min-inline-size: 0;
  grid-template-columns: 42px minmax(0, 1fr) max-content;
  align-items: center;
  gap: 6px;
  overflow-x: hidden;
  padding-right: max(12px, env(safe-area-inset-right, 0px));
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  padding-left: max(12px, env(safe-area-inset-left, 0px));
}

.location-forum.is-page .forum-composer input[name="message"] {
  width: 100%;
  inline-size: 100%;
  max-width: 100%;
  max-inline-size: 100%;
  min-width: 0;
  min-inline-size: 0;
  overflow: hidden;
  font-size: 16px;
}

.location-forum.is-page .forum-composer .primary-button {
  width: auto;
  inline-size: auto;
  max-width: 76px;
  max-inline-size: 76px;
  min-width: 58px;
  min-inline-size: 58px;
  min-height: 42px;
  padding-inline: 12px;
  white-space: nowrap;
}

/* Messages must never make the app horizontally scrollable on mobile. */
body.messages-open {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  overscroll-behavior-x: none;
}

#messagesSheet,
#messagesSheet * {
  box-sizing: border-box;
}

#messagesSheet {
  inset: 0;
  width: auto;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  overscroll-behavior-x: none;
}

#messagesSheet .messages-panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  contain: inline-size;
}

#messagesSheet .messages-header,
#messagesSheet .messages-list,
#messagesSheet .message-thread-section,
#messagesSheet .message-thread-shell,
#messagesSheet .message-thread-row,
#messagesSheet .message-conversation,
#messagesSheet .message-composer {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

#messagesSheet .message-directory-strip {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

#messagesSheet .message-person {
  min-width: 0;
  max-width: 100%;
}

#messagesSheet .message-thread-row {
  grid-template-columns: 48px minmax(0, 1fr) auto;
}

#messagesSheet .message-thread-row > span {
  min-width: 0;
  max-width: 100%;
}

#messagesSheet .message-thread-row strong,
#messagesSheet .message-thread-row small {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#messagesSheet .message-bubble-row {
  grid-template-columns: 30px minmax(0, 1fr);
  width: 100%;
  min-width: 0;
}

#messagesSheet .message-bubble-row.is-own {
  grid-template-columns: minmax(0, 1fr);
}

#messagesSheet .message-bubble-stack {
  min-width: 0;
  max-width: min(78vw, 460px);
}

#messagesSheet .message-bubble,
#messagesSheet .message-reply-context,
#messagesSheet .message-reply-context > div {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#messagesSheet .message-bubble p {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#messagesSheet .message-composer {
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding-left: max(12px, env(safe-area-inset-left, 0px));
  padding-right: max(12px, env(safe-area-inset-right, 0px));
}

#messagesSheet .message-composer input,
#messagesSheet .message-reply-target span {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 520px) {
  #messagesSheet .messages-header {
    gap: 8px;
    padding-left: max(10px, env(safe-area-inset-left, 0px));
    padding-right: max(10px, env(safe-area-inset-right, 0px));
  }

  #messagesSheet .messages-header.is-thread {
    grid-template-columns: 38px 36px minmax(0, 1fr) 38px;
  }

  #messagesSheet .message-conversation {
    padding-left: max(10px, env(safe-area-inset-left, 0px));
    padding-right: max(10px, env(safe-area-inset-right, 0px));
  }

  #messagesSheet .message-bubble-stack {
    max-width: calc(100vw - 74px);
  }

  #messagesSheet .message-bubble-row.is-own .message-bubble-stack {
    max-width: calc(100vw - 42px);
  }

  #messagesSheet .messages-list.is-thread .message-composer .primary-button {
    min-width: 64px;
    padding-inline: 12px;
  }
}

/* Messages viewport lock: prevent the whole inbox from horizontal scrolling. */
body.messages-open {
  width: 100%;
  max-width: 100dvw;
  background: #000000;
  overflow: hidden;
}

body.messages-open .app-shell {
  visibility: hidden;
}

#messagesSheet,
#messagesSheet * {
  box-sizing: border-box;
}

#messagesSheet {
  width: 100dvw;
  max-width: 100dvw;
  min-width: 0;
  overflow: hidden;
  overscroll-behavior-x: none;
}

#messagesSheet .messages-panel {
  width: min(100dvw, 680px);
  max-width: 100dvw;
  min-width: 0;
  overflow: hidden;
  contain: inline-size;
}

#messagesSheet .messages-header,
#messagesSheet .messages-list,
#messagesSheet .message-thread-section,
#messagesSheet .message-thread-shell,
#messagesSheet .message-thread-row,
#messagesSheet .message-conversation,
#messagesSheet .message-composer,
#messagesSheet .message-bubble-row,
#messagesSheet .message-bubble-stack,
#messagesSheet .message-bubble,
#messagesSheet .message-reply-context {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

#messagesSheet .messages-header,
#messagesSheet .messages-list,
#messagesSheet .message-thread-section,
#messagesSheet .message-thread-shell,
#messagesSheet .message-conversation,
#messagesSheet .message-composer {
  overflow-x: hidden;
}

#messagesSheet .messages-list.is-thread {
  overflow: hidden;
  touch-action: pan-y;
}

#messagesSheet .message-directory-strip {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
}

#messagesSheet .message-thread-row {
  grid-template-columns: 48px minmax(0, 1fr) auto;
}

#messagesSheet .message-thread-row span,
#messagesSheet .message-thread-row strong,
#messagesSheet .message-thread-row small,
#messagesSheet .message-thread-row em,
#messagesSheet .messages-header > div,
#messagesSheet .messages-header h2,
#messagesSheet .messages-header p {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#messagesSheet .message-bubble-row {
  grid-template-columns: 30px minmax(0, 1fr);
}

#messagesSheet .message-bubble-row.is-own {
  grid-template-columns: minmax(0, 1fr);
}

#messagesSheet .message-bubble-stack {
  max-width: min(78dvw, 460px);
}

#messagesSheet .message-bubble,
#messagesSheet .message-bubble p,
#messagesSheet .message-reply-context,
#messagesSheet .message-reply-context > div {
  overflow-wrap: anywhere;
  word-break: break-word;
}

#messagesSheet .message-reply-context.is-own > div::after {
  right: 0;
}

#messagesSheet .message-reply-context:not(.is-own) > div::before {
  left: 0;
}

#messagesSheet .message-composer {
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding-left: max(12px, env(safe-area-inset-left, 0px));
  padding-right: max(12px, env(safe-area-inset-right, 0px));
}

#messagesSheet .message-composer input,
#messagesSheet .message-composer button {
  min-width: 0;
}

@media (max-width: 520px) {
  #messagesSheet .messages-panel {
    width: 100dvw;
  }

  #messagesSheet .messages-header {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }

  #messagesSheet .messages-header.is-thread {
    grid-template-columns: 38px 36px minmax(0, 1fr) 38px;
    gap: 8px;
  }

  #messagesSheet .message-conversation {
    padding-inline: max(12px, env(safe-area-inset-left, 0px)) max(12px, env(safe-area-inset-right, 0px));
  }

  #messagesSheet .message-bubble-stack {
    max-width: calc(100dvw - 72px);
  }

  #messagesSheet .message-bubble-row.is-own .message-bubble-stack {
    max-width: calc(100dvw - 40px);
  }

  #messagesSheet .messages-list.is-thread .message-composer .primary-button {
    min-width: 64px;
    padding-inline: 12px;
  }
}

/* Guardrails for the full-screen messages view on narrow mobile browsers. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.messages-sheet,
.messages-panel,
.messages-list,
.message-directory-strip,
.message-thread-section,
.message-thread-shell,
.message-thread-row,
.message-conversation,
.message-composer,
.message-bubble-row,
.message-bubble-stack,
.message-bubble,
.message-reply-context {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

.messages-sheet,
.messages-panel,
.messages-list {
  overflow-x: hidden;
}

.messages-panel {
  width: min(100vw, 680px);
  max-width: 100vw;
}

.messages-header > div,
.messages-header h2,
.messages-header p {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-directory-strip {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.message-directory-strip::-webkit-scrollbar {
  display: none;
}

.message-thread-shell {
  width: 100%;
  overflow: hidden;
}

.message-thread-row {
  width: 100%;
}

.message-thread-row span,
.message-thread-row strong,
.message-thread-row small,
.message-thread-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-bubble,
.message-reply-context p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message-composer {
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.message-composer input {
  width: 100%;
  min-width: 0;
}

@media (max-width: 480px) {
  .messages-header {
    padding-inline: 12px;
  }

  .message-conversation {
    padding-inline: 12px;
  }

  .message-bubble-stack {
    max-width: min(88%, 360px);
  }

  .message-composer {
    padding-inline: 12px;
  }

  .messages-list.is-thread .message-composer .primary-button {
    min-width: 66px;
    padding-inline: 12px;
  }
}

.message-icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--deep);
  background: var(--secondary-button-bg);
  border: 1px solid var(--secondary-button-border);
  border-radius: 999px;
  cursor: pointer;
}

.message-header-avatar {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--subpanel);
}

.message-directory-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 94px;
  gap: 12px;
  padding: 16px 14px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.message-directory-strip::-webkit-scrollbar {
  display: none;
}

.message-person {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.message-person-role {
  min-height: 18px;
  color: var(--deep);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.message-person-avatar {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  padding: 3px;
  border: 3px solid transparent;
  border-radius: 50%;
}

.message-person.has-conversation.is-instructor .message-person-avatar {
  border-color: #1cb0aa;
}

.message-person.has-conversation.is-videographer .message-person-avatar {
  border-color: #ee6f57;
}

.message-person-avatar img {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--subpanel);
}

.message-person strong,
.message-person small {
  max-width: 100%;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-person strong {
  font-size: 0.76rem;
  line-height: 1.05;
}

.message-person small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
}

.message-thread-section {
  display: grid;
  gap: 0;
  padding: 8px 0 22px;
}

.message-thread-section h3 {
  margin: 0;
  padding: 0 16px 8px;
  font-size: 1.05rem;
}

.message-thread-shell {
  position: relative;
  overflow: hidden;
  background: #e94747;
}

.message-thread-row {
  position: relative;
  z-index: 1;
  border-bottom: 0;
  transform: translateX(var(--message-swipe-x, 0));
  transition: transform 180ms ease;
}

.message-thread-shell.show-delete .message-thread-row {
  transform: translateX(-84px);
}

.message-thread-shell.is-swiping .message-thread-row {
  transition: none;
}

.message-thread-delete {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: grid;
  width: 84px;
  place-items: center;
  color: #ffffff;
  background: #e94747;
  border: 0;
  cursor: pointer;
}

.message-bubble-actions {
  display: flex;
  gap: 9px;
  margin-top: 5px;
}

.message-bubble-actions button,
.message-delete-actions button {
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 900;
}

.message-bubble-actions button.active {
  color: #e04462;
}

.message-delete-actions {
  display: none;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.message-bubble-row.is-actions-open .message-delete-actions {
  display: flex;
}

.message-reply-preview,
.message-reply-target {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  margin-bottom: 8px;
  color: var(--muted);
  background: color-mix(in srgb, var(--subpanel-strong) 76%, transparent);
  border-left: 3px solid var(--reef);
  border-radius: 10px;
  font-size: 0.78rem;
}

.message-reply-target span {
  min-width: 0;
}

.message-reply-preview strong,
.message-reply-target strong {
  color: var(--deep);
  font-weight: 900;
}

.message-reply-target em {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-reply-preview span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-bubble-row.is-deleted .message-bubble {
  color: var(--muted);
  background: transparent;
  border-style: dashed;
}

.message-composer {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.message-reply-target {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin: 0;
}

.message-reply-target[hidden] {
  display: none;
}

.message-reply-target button {
  width: 28px;
  height: 28px;
  color: var(--deep);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 950;
}

.shortcut-panel-setting {
  min-height: 100%;
}

.shortcut-version {
  margin: 0;
  padding: 2px 0 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
}

.shortcut-version span {
  display: block;
}

.shortcut-version span + span {
  margin-top: 3px;
  font-size: 0.72rem;
  opacity: 0.82;
}

.location-default-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: center;
  align-self: end;
  justify-self: stretch;
  gap: 12px;
  width: 100%;
  inline-size: 100%;
  min-height: 44px;
  min-width: 0;
  max-width: 100%;
  max-inline-size: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  color: var(--ink);
  background: color-mix(in srgb, var(--secondary-button-bg) 62%, transparent);
  border: 1px solid var(--secondary-button-border);
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 900;
}

.location-default-choice span {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-default-choice input[type="radio"] {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  width: 20px;
  inline-size: 20px;
  min-width: 20px;
  min-inline-size: 20px;
  max-width: 20px;
  max-inline-size: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 2px solid color-mix(in srgb, var(--muted) 52%, transparent);
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
}

.location-default-choice input[type="radio"]:checked {
  background: radial-gradient(circle at center, var(--deep) 0 42%, transparent 46%);
  border-color: var(--deep);
}

.messages-sheet {
  align-items: stretch;
  background: var(--panel);
}

.messages-panel {
  width: min(100%, 680px);
  height: 100dvh;
  max-height: none;
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  grid-template-rows: auto minmax(0, 1fr);
}

.messages-header {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  min-height: calc(64px + env(safe-area-inset-top, 0px));
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
}

.messages-header.is-thread {
  grid-template-columns: 44px 42px minmax(0, 1fr) 44px;
}

.messages-header h2 {
  font-size: 1.08rem;
}

.messages-header p {
  text-align: left;
}

.messages-header:not(.is-thread) p {
  text-align: center;
}

.message-icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--deep);
  background: var(--secondary-button-bg);
  border: 1px solid var(--secondary-button-border);
  border-radius: 999px;
  cursor: pointer;
}

.message-header-avatar {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--subpanel);
}

.messages-list {
  background: var(--app-bg);
}

.message-directory-empty {
  display: grid;
  gap: 4px;
  padding: 16px;
  color: var(--muted);
}

.message-directory-empty strong {
  color: var(--ink);
}

.message-directory-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 94px;
  gap: 12px;
  padding: 16px 14px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.message-directory-strip::-webkit-scrollbar {
  display: none;
}

.message-person {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.message-person-role {
  min-height: 18px;
  color: var(--deep);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.message-person-avatar {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  padding: 3px;
  border: 3px solid transparent;
  border-radius: 50%;
}

.message-person.has-conversation.is-instructor .message-person-avatar {
  border-color: #1cb0aa;
}

.message-person.has-conversation.is-videographer .message-person-avatar {
  border-color: #ee6f57;
}

.message-person-avatar img {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--subpanel);
}

.message-person strong,
.message-person small {
  max-width: 100%;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-person strong {
  font-size: 0.76rem;
  line-height: 1.05;
}

.message-person small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
}

.message-thread-section {
  display: grid;
  gap: 0;
  padding: 8px 0 22px;
}

.message-thread-section h3 {
  margin: 0;
  padding: 0 16px 8px;
  font-size: 1.05rem;
}

.message-thread-shell {
  position: relative;
  overflow: hidden;
  background: #e94747;
}

.message-thread-row {
  position: relative;
  z-index: 1;
  border-bottom: 0;
  transform: translateX(var(--message-swipe-x, 0));
  transition: transform 180ms ease;
}

.message-thread-shell.show-delete .message-thread-row {
  transform: translateX(-84px);
}

.message-thread-shell.is-swiping .message-thread-row {
  transition: none;
}

.message-thread-delete {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: grid;
  width: 84px;
  place-items: center;
  color: #ffffff;
  background: #e94747;
  border: 0;
  cursor: pointer;
}

.message-conversation {
  min-height: 0;
  max-height: none;
  padding-bottom: 18px;
}

.message-bubble-row {
  align-items: start;
}

.message-bubble {
  position: relative;
}

.message-bubble-actions {
  display: flex;
  gap: 9px;
  margin-top: 5px;
}

.message-bubble-actions button,
.message-delete-actions button {
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 900;
}

.message-bubble-actions button.active {
  color: #e04462;
}

.message-delete-actions {
  display: none;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.message-bubble-row.is-actions-open .message-delete-actions {
  display: flex;
}

.message-reply-preview,
.message-reply-target {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  margin-bottom: 8px;
  color: var(--muted);
  background: color-mix(in srgb, var(--subpanel-strong) 76%, transparent);
  border-left: 3px solid var(--reef);
  border-radius: 10px;
  font-size: 0.78rem;
}

.message-reply-preview strong,
.message-reply-target span {
  color: var(--deep);
  font-weight: 900;
}

.message-reply-preview span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-bubble-row.is-deleted .message-bubble {
  color: var(--muted);
  background: transparent;
  border-style: dashed;
}

.message-composer {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.message-reply-target {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin: 0;
}

.message-reply-target[hidden] {
  display: none;
}

.message-reply-target button {
  width: 28px;
  height: 28px;
  color: var(--deep);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 950;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f5f5f5;
  --muted: #a8a8a8;
  --line: #2f3336;
  --panel: #121212;
  --panel-strong: #161616;
  --soft: #000000;
  --subpanel: #1a1a1a;
  --subpanel-strong: #262626;
  --app-bg: #000000;
  --deep: #8edfe0;
  --reef: #38b9b0;
  --coral: #ff8a73;
  --sun: #f6c35f;
  --kelp: #7aa48a;
  --primary-button-bg: #8edfe0;
  --primary-button-ink: #062329;
  --secondary-button-bg: #121212;
  --secondary-button-ink: #f5f5f5;
  --secondary-button-border: #2f3336;
  --modal-backdrop: rgba(0, 0, 0, 0.78);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
  --marketplace-cart-icon-url: url("assets/marketplace/cart-white.png?v=2.0.154");
  background: var(--app-bg);
}

@media (prefers-color-scheme: dark) {
  body[data-theme="auto"] {
    color-scheme: dark;
    --ink: #f5f5f5;
    --muted: #a8a8a8;
    --line: #2f3336;
    --panel: #121212;
    --panel-strong: #161616;
    --soft: #000000;
    --subpanel: #1a1a1a;
    --subpanel-strong: #262626;
    --app-bg: #000000;
    --deep: #8edfe0;
    --reef: #38b9b0;
    --coral: #ff8a73;
    --sun: #f6c35f;
    --kelp: #7aa48a;
    --primary-button-bg: #8edfe0;
    --primary-button-ink: #062329;
    --secondary-button-bg: #121212;
    --secondary-button-ink: #f5f5f5;
    --secondary-button-border: #2f3336;
    --modal-backdrop: rgba(0, 0, 0, 0.78);
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
    --marketplace-cart-icon-url: url("assets/marketplace/cart-white.png?v=2.0.154");
    background: var(--app-bg);
  }
}

body[data-theme="dark"] .topbar,
body[data-theme="dark"] .bottom-nav,
body[data-theme="dark"] .profile-tab-button,
body[data-theme="dark"] select,
body[data-theme="dark"] input,
body[data-theme="dark"] textarea {
  color: var(--ink);
  background: var(--panel);
}

body[data-theme="dark"] .topbar,
body[data-theme="dark"] .bottom-nav {
  background: #000000;
}

@media (prefers-color-scheme: dark) {
  body[data-theme="auto"] .topbar,
  body[data-theme="auto"] .bottom-nav,
  body[data-theme="auto"] .profile-tab-button,
  body[data-theme="auto"] select,
  body[data-theme="auto"] input,
  body[data-theme="auto"] textarea {
    color: var(--ink);
    background: var(--panel);
  }

  body[data-theme="auto"] .topbar,
  body[data-theme="auto"] .bottom-nav {
    background: #000000;
  }
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 320px;
  gap: 22px;
  width: min(100%, 1240px);
  max-inline-size: 100%;
  min-inline-size: 0;
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: clip;
  padding: 18px;
}

.rail,
.side-panel {
  position: sticky;
  top: 18px;
  height: calc(100vh - 36px);
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 18px 12px;
  border-right: 1px solid rgba(8, 63, 77, 0.12);
}

.brand,
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 2px 10px rgba(8, 63, 77, 0.18);
}

.rail-nav {
  display: grid;
  gap: 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 700;
}

.nav-link.active {
  color: var(--deep);
  background: rgba(15, 143, 139, 0.12);
}

button.nav-link {
  font: inherit;
  background: transparent;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  text-align: inherit;
}

.nav-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--reef) 55%, transparent);
  outline-offset: 2px;
}

.icon,
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  overflow: hidden;
  color: transparent;
  background: currentColor;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: 22px;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 22px;
}

.icon {
  color: currentColor;
}

.nav-dive-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.icon:has(+ span) {
  flex: 0 0 28px;
}

.icon {
  mask-image: var(--icon-home);
  -webkit-mask-image: var(--icon-home);
}

[aria-label="Spots"] .icon,
[href="#spots"] .icon {
  mask-image: var(--icon-pin);
  -webkit-mask-image: var(--icon-pin);
}

.icon {
  color: currentColor;
}

.nav-link[href="#spots"] .icon {
  mask-image: var(--icon-pin);
  -webkit-mask-image: var(--icon-pin);
}

.nav-link[data-route="community"] .icon,
.nav-link[href="#community"] .icon {
  mask-image: var(--icon-community);
  -webkit-mask-image: var(--icon-community);
}

.nav-link[href="#badges"] .icon {
  mask-image: var(--icon-seal);
  -webkit-mask-image: var(--icon-seal);
}

.nav-link[href="#profile"] .icon {
  mask-image: var(--icon-user);
  -webkit-mask-image: var(--icon-user);
}

.nav-link[href="#cart"] .icon {
  background: transparent var(--marketplace-cart-icon-url) center / contain no-repeat;
  mask-image: none;
  -webkit-mask-image: none;
  color: transparent;
  font-size: 0;
}

.nav-link[href="#orders"] .icon,
.nav-link[href="#services"] .icon,
.nav-link[href="#payouts"] .icon {
  background: transparent center / contain no-repeat;
  mask-image: none;
  -webkit-mask-image: none;
  color: transparent;
  font-size: 0;
}

.nav-link[href="#orders"] .icon {
  background-image: var(--marketplace-orders-icon-url);
}

.nav-link[href="#payouts"] .icon {
  background-image: var(--marketplace-payouts-icon-url);
}

.nav-link[href="#services"] .icon {
  background-image: var(--marketplace-services-icon-url);
}

.main {
  min-width: 0;
  height: calc(100vh - 36px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding-bottom: 88px;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: env(safe-area-inset-top) 14px 10px;
  background: rgba(237, 244, 243, 0.88);
  backdrop-filter: blur(16px);
}

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

.avatar-button,
.create-button {
  border: 0;
  cursor: pointer;
}

.create-button {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  overflow: hidden;
  color: var(--deep);
  background: var(--panel);
}

.create-button::before {
  content: "+";
  position: relative;
  z-index: 2;
  color: var(--deep);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 0.92;
}

.create-button img {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 82px;
  height: 82px;
  object-fit: contain;
  opacity: 0.14;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.create-button span {
  position: relative;
  z-index: 2;
  color: var(--deep);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.05;
}

.install-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  color: var(--secondary-button-ink);
  background: var(--secondary-button-bg);
  border: 1px solid var(--secondary-button-border);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
}

.install-button[hidden] {
  display: none;
}

.install-button-icon {
  display: block;
  width: 19px;
  height: 19px;
  background: currentColor;
  mask-image: var(--icon-down);
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-image: var(--icon-down);
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.app-purpose {
  display: none;
  gap: 8px;
  margin: 0 0 18px;
  padding: 16px 0 18px;
  border-bottom: 1px solid rgba(8, 63, 77, 0.12);
}

.app-purpose h1,
.app-purpose p {
  margin: 0;
}

.app-purpose h1 {
  color: var(--ink);
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  line-height: 1.05;
}

.app-purpose p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 750;
  line-height: 1.45;
}

.app-purpose a {
  justify-self: start;
  color: var(--deep);
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.app-legal-footer,
.legal-link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.3;
}

.app-legal-footer {
  margin-top: 24px;
  padding: 16px 0 0;
  border-top: 1px solid rgba(8, 63, 77, 0.12);
}

.app-legal-footer strong {
  color: var(--ink);
}

.app-legal-footer a,
.legal-link-row a {
  color: var(--deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-link-row {
  margin: 0;
}

.message-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--deep);
  background: var(--secondary-button-bg);
  border: 1px solid var(--secondary-button-border);
  border-radius: 999px;
  cursor: pointer;
}

.message-button-icon {
  width: 21px;
  height: 21px;
  background: currentColor;
  mask: var(--icon-message) center / contain no-repeat;
  -webkit-mask: var(--icon-message) center / contain no-repeat;
}

.message-button em {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 5px;
  color: #ffffff;
  background: #e04462;
  border: 2px solid var(--panel);
  border-radius: 999px;
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.avatar-button,
.composer-avatar {
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 50%;
}

.avatar-button,
.avatar-button img,
.composer-avatar,
.composer-avatar img {
  width: 38px;
  height: 38px;
}

.avatar-button img,
.composer-avatar img,
.story img,
.profile-photo {
  object-fit: cover;
  border-radius: 50%;
}

.menu-button-bars {
  display: none;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.stories {
  display: block;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 8px 0 14px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

.story-loop {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 104px;
  gap: 12px;
  width: max-content;
}

.story {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.story-thumb {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
}

.story img {
  width: 68px;
  height: 68px;
  border: 0;
  transition: opacity 180ms ease;
}

.story-name {
  display: block;
  width: 100%;
  min-height: 2.2em;
  color: var(--deep);
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.composer,
.post,
.login-card,
.leaderboard,
.spot-card,
.badge-card,
.profile-stats,
.profile-badges {
  background: var(--panel);
  border: 1px solid rgba(8, 63, 77, 0.1);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(8, 63, 77, 0.04);
}

.composer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 14px;
}

.composer-button {
  flex: 1;
  min-height: 42px;
  padding: 0 14px;
  color: var(--muted);
  text-align: left;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.feed {
  display: grid;
  gap: 8px;
}

.post {
  overflow: hidden;
  max-width: 100%;
}

.post-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
}

.post-avatar-button {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.post-avatar-button > img,
.post-head > img,
.leader-row > img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
}

.post-user {
  min-width: 0;
  flex: 1;
}

.post-user strong,
.post-user > span,
.leader-row > div > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-user strong,
.spot-post-card strong,
.leader-row strong {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  row-gap: 4px;
  min-width: 0;
  overflow: visible;
  line-height: 1.18;
  white-space: normal;
}

.post-user > span,
.leader-row > div > span {
  display: block;
  margin-top: 4px;
}

.cert-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 2px;
  color: var(--deep);
  background: rgba(15, 143, 139, 0.12);
  border: 1px solid rgba(15, 143, 139, 0.18);
  border-radius: 50%;
  font-size: 0.62rem;
  font-weight: 900;
  cursor: pointer;
  vertical-align: middle;
}

.cert-badge.has-logo {
  width: 30px;
  height: 30px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.cert-badge.is-pending {
  opacity: 0.48;
  filter: grayscale(0.18);
}

.cert-badge:focus-visible {
  outline: 2px solid rgba(8, 63, 77, 0.32);
  outline-offset: 3px;
}

.cert-badge img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

.cert-badge > span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #fff;
  background: var(--deep);
  border-radius: 50%;
  font-size: 0.55rem;
}

.user-badge-stack {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  white-space: normal;
  vertical-align: middle;
}

.user-badge-stack > * {
  flex: 0 0 auto;
}

.achievement-badge {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  width: 28px;
  height: 32px;
  place-items: center;
  cursor: pointer;
  vertical-align: middle;
}

.achievement-count {
  position: absolute;
  right: -5px;
  bottom: -4px;
  z-index: 3;
  display: grid;
  min-width: 16px;
  height: 16px;
  place-items: center;
  padding: 0 4px;
  color: #fff;
  background: var(--deep);
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
}

.achievement-badge:focus-visible {
  outline: 2px solid rgba(8, 63, 77, 0.32);
  outline-offset: 3px;
}

.achievement-template,
.achievement-photo {
  position: absolute;
  display: block;
}

.achievement-template {
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.achievement-photo {
  top: 9%;
  left: 9%;
  z-index: 2;
  width: 82%;
  height: 78%;
  object-fit: cover;
  opacity: 0.9;
  clip-path: polygon(50% 0, 94% 17%, 86% 74%, 50% 100%, 14% 74%, 6% 17%);
}

.achievement-badge.is-preview {
  width: 58px;
  height: 64px;
}

.achievement-badge.is-preview .achievement-photo {
  top: 5%;
  left: 5%;
  width: 90%;
  height: 86%;
}

.badge-count-pill {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  color: #fff;
  background: var(--deep);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.cert-preview-popover {
  position: fixed;
  z-index: 1000;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: min(300px, calc(100vw - 24px));
  padding: 10px;
  color: var(--ink);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(8, 63, 77, 0.18);
}

.cert-preview-popover[hidden] {
  display: none;
}

.cert-preview-icon {
  display: grid;
  width: 58px;
  height: 66px;
  place-items: center;
}

.cert-preview-icon > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cert-preview-icon span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #fff;
  background: var(--deep);
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 800;
}

.cert-preview-group {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
}

.cert-preview-group > p {
  margin: -4px 0 0;
}

.cert-preview-list {
  display: grid;
  gap: 8px;
  max-height: min(300px, 60vh);
  overflow-y: auto;
}

.cert-preview-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px;
  color: inherit;
  text-align: left;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
}

button.cert-preview-row {
  cursor: pointer;
}

button.cert-preview-row:hover {
  border-color: var(--secondary-button-border);
  background: var(--secondary-button-bg);
}

.cert-preview-row .achievement-badge.is-preview {
  width: 34px;
  height: 38px;
}

.cert-preview-row .achievement-badge.is-preview .achievement-photo {
  top: 8%;
  left: 8%;
  width: 84%;
  height: 80%;
}

.cert-preview-row span {
  min-width: 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.18;
}

.cert-preview-popover strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.15;
}

.cert-preview-popover p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.post-user > span,
.post-location,
.badge-meta,
.spot-meta,
.login-card p,
.profile-info p {
  color: var(--muted);
  font-size: 0.88rem;
}

.post-media {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 100%;
  height: auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--deep) 20%, transparent), transparent 58%),
    #071114;
}

.post-media-image,
.post-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.post-media-image {
  object-position: var(--media-position-x, 50%) var(--media-position-y, 50%);
  filter: var(--media-filter, none);
  transform: scale(var(--media-scale, 1));
  transform-origin: var(--media-position-x, 50%) var(--media-position-y, 50%);
}

.post-media-text-overlay {
  position: absolute;
  left: 50%;
  bottom: 15%;
  z-index: 3;
  max-width: min(82%, 420px);
  padding: 8px 12px;
  color: var(--text-color, #061013);
  background: var(--text-bg, rgba(255, 255, 255, 0.86));
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  font-size: clamp(0.78rem, 2.6vw, 0.96rem);
  font-weight: 900;
  line-height: 1.18;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.post-media video {
  object-position: center center;
  background: #071114;
}

.post-media-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.post-media-gallery::-webkit-scrollbar {
  display: none;
}

.post-media-slide {
  position: relative;
  width: 100%;
  min-width: 100%;
  height: 100%;
  overflow: hidden;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.post-media-count,
.post-media-dots {
  position: absolute;
}

.post-media-count {
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  color: #fff;
  background: rgba(7, 17, 20, 0.62);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.post-media-dots {
  left: 50%;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  background: rgba(7, 17, 20, 0.28);
  border-radius: 999px;
  transform: translateX(-50%);
  pointer-events: auto;
}

.post-media-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  background: rgba(255, 255, 255, 0.58);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.post-media-dot.is-active {
  background: #fff;
  transform: scale(1.25);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  color: var(--secondary-button-ink);
  background: var(--secondary-button-bg);
  border: 1px solid var(--secondary-button-border);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

button.badge-pill {
  cursor: pointer;
  font-family: inherit;
}

.post-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  color: #8f452f;
  background: rgba(238, 111, 87, 0.14);
  border: 1px solid rgba(238, 111, 87, 0.28);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
}

.post-status-pill.is-icon-only {
  width: 38px;
  height: 34px;
  min-height: 34px;
  padding: 0;
}

.post-status-pill .post-action-icon {
  width: 21px;
  height: 21px;
}

.post-more-button {
  display: inline-grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.post-more-button:hover {
  background: var(--secondary-button-bg);
  color: var(--deep);
}

.post-more-button .post-action-icon {
  width: 24px;
  height: 24px;
}

.post-body {
  display: grid;
  gap: 4px;
  padding: 4px 12px 12px;
}

.post-body > strong,
.post-caption,
.post-location {
  min-width: 0;
  margin: 0;
}

.post-body > strong {
  font-size: 0.9rem;
  line-height: 1.12;
}

.post-caption {
  display: block;
  font-size: 0.8rem;
  line-height: 1.22;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.post-caption-more {
  display: inline;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.post-body .post-location {
  font-size: 0.78rem;
  line-height: 1.22;
}

.post.is-focused {
  outline: 3px solid rgba(238, 111, 87, 0.36);
  box-shadow: 0 0 0 6px rgba(238, 111, 87, 0.12), var(--shadow);
}

.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0;
}

.post-action-left {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 2px;
}

.post-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 34px;
  gap: 4px;
  flex: 0 0 auto;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  cursor: pointer;
  font-weight: 800;
}

.post-metric-button {
  width: auto;
  min-width: 30px;
  padding: 0 4px;
}

.post-metric-button.has-count {
  min-width: 42px;
  justify-content: flex-start;
}

.post-action-count {
  min-width: 11px;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1;
  text-align: left;
}

.post-like-count-button {
  min-width: 18px;
  min-height: 34px;
  padding: 0 4px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1;
}

.post-action-icon {
  display: block;
  width: 19px;
  height: 19px;
}

.post-action-icon path,
.post-action-icon circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.95;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.share-action .post-action-icon {
  width: 23px;
  height: 23px;
}

.share-action .post-action-icon path {
  stroke-width: 2.35;
}

.love-action.is-loved,
.love-action.is-loved .post-action-count {
  color: #e04462;
}

.love-action.is-loved {
  background: transparent;
}

.love-action.is-loved .post-action-icon path {
  fill: #e04462;
  stroke: #e04462;
}

.save-action.is-saved {
  color: var(--deep);
  background: transparent;
}

.save-action.is-saved .post-action-icon path {
  fill: currentColor;
}

.report-button {
  margin-left: auto;
  color: var(--muted);
}

.report-button:hover,
.post-icon-button:hover,
.post-like-count-button:hover {
  color: var(--deep);
}

.liked-by-preview {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  gap: 8px;
  margin-top: 4px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: left;
}

.liked-by-preview span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.liked-by-avatars {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding-left: 0;
}

.liked-by-avatars img {
  width: 22px;
  height: 22px;
  object-fit: cover;
  background: var(--subpanel);
  border: 2px solid var(--panel);
  border-radius: 50%;
}

.liked-by-avatars img + img {
  margin-left: -8px;
}

.text-button {
  min-height: 34px;
  padding: 0 10px;
  color: var(--deep);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0 16px;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.section-head h1,
.profile-info h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  line-height: 1.05;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primary-button,
.secondary-button,
.social-button {
  min-height: 42px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 0;
  cursor: pointer;
  font-weight: 900;
}

.primary-button {
  color: var(--primary-button-ink);
  background: var(--primary-button-bg);
}

.secondary-button {
  color: var(--secondary-button-ink);
  background: var(--secondary-button-bg);
  border: 1px solid var(--secondary-button-border);
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.map-card {
  min-height: 420px;
  padding: 0;
  background: #9fd0e4;
  border: 1px solid rgba(8, 63, 77, 0.12);
  border-radius: var(--radius);
  overflow: hidden;
}

.philippines-map {
  position: relative;
  z-index: 1;
  min-height: 420px;
  background: #9fd0e4;
  border-radius: var(--radius);
}

.leaflet-container {
  font: inherit;
  background: #9fd0e4;
}

.leaflet-popup-content {
  color: #142428;
  line-height: 1.45;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  color: #142428;
  background: #ffffff;
}

.leaflet-popup-content strong {
  color: #083f4d;
}

.freedive-map-marker {
  display: grid;
  place-items: center;
}

.freedive-map-marker span {
  display: block;
  width: 22px;
  height: 22px;
  background: var(--coral);
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 10px 24px rgba(8, 63, 77, 0.32);
  transform: rotate(-45deg);
}

.freedive-map-marker span::after {
  content: "";
  position: absolute;
  inset: 5px;
  background: #fff;
  border-radius: 50%;
}

.spot-list,
.spot-posts,
.badge-grid,
.profile-badges {
  display: grid;
  gap: 12px;
}

.badge-library-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid rgba(8, 63, 77, 0.1);
  border-radius: var(--radius);
}

.badge-library-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  align-items: start;
  overflow: visible;
}

.badge-library-tab {
  display: grid;
  min-height: 108px;
  align-items: center;
  justify-items: center;
  gap: 4px;
  padding: 4px 0 7px;
  color: var(--secondary-button-ink);
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-align: center;
  overflow: visible;
}

.badge-tab-orb {
  position: relative;
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  overflow: visible;
}

.badge-tab-orb::before {
  content: "";
  position: absolute;
  inset: 11px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(8, 63, 77, 0.08);
}

.badge-tab-icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 36px;
  height: 36px;
}

.badge-tab-icon.is-seal {
  background: currentColor;
  mask-image: var(--icon-seal);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: var(--icon-seal);
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.badge-tab-icon.is-first,
.badge-tab-icon.is-dive {
  width: 38px;
  height: 42px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.badge-tab-icon.is-first {
  background-image: url("assets/first-contributor-badge.png");
}

.badge-tab-icon.is-dive {
  background-image: url("assets/dive-spot-badge.png");
}

.badge-tab-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.badge-tab-ring text {
  fill: var(--deep);
  font-size: 7.3px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.badge-library-tab strong {
  display: inline-flex;
  min-width: 34px;
  height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  color: var(--secondary-button-ink);
  background: var(--secondary-button-bg);
  border-radius: 999px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.badge-library-tab.active {
  color: var(--deep);
  background: transparent;
}

.badge-library-tab.active .badge-tab-orb::before {
  background: color-mix(in srgb, var(--primary-button-bg) 13%, var(--panel));
  border-color: rgba(238, 111, 87, 0.46);
  box-shadow: 0 0 0 3px rgba(238, 111, 87, 0.12), 0 8px 20px rgba(8, 63, 77, 0.14);
}

.badge-library-tab.active .badge-tab-ring text {
  fill: var(--deep);
}

.badge-library-tab.active strong {
  color: var(--primary-button-ink);
}

.badge-library-tab.active strong {
  background: var(--primary-button-bg);
}

.badge-library-copy h2 {
  margin: 0;
  font-size: 1.2rem;
}

.badge-library-copy p {
  margin: 6px 0 0;
  color: var(--muted);
}

.badge-grid-inner {
  display: grid;
  gap: 12px;
}

.location-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.location-tab {
  appearance: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 72px;
  padding: 8px 8px;
  color: var(--secondary-button-ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.location-tab.active {
  color: var(--deep);
  background: rgba(15, 143, 139, 0.09);
  border-color: rgba(15, 143, 139, 0.42);
  box-shadow: inset 0 0 0 1px rgba(15, 143, 139, 0.12);
}

.location-tab-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--location-tab-icon);
  background: var(--location-tab-icon-bg);
  border-radius: 999px;
}

.location-tab-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.location-tab-label {
  display: block;
  max-width: 100%;
  font-size: 0.86rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.location-tab-posts .location-tab-label,
.location-tab-spots .location-tab-label,
.location-tab-forum .location-tab-label,
.location-tab-videographer .location-tab-label {
  font-size: 0.74rem;
}

.location-tab-posts {
  --location-tab-icon: #0891b2;
  --location-tab-icon-bg: #d9f7fa;
}

.location-tab-spots {
  --location-tab-icon: #15935d;
  --location-tab-icon-bg: #dcfce7;
}

.location-tab-forum {
  --location-tab-icon: #b7791f;
  --location-tab-icon-bg: #fff3c4;
}

.location-tab-instructor {
  --location-tab-icon: #6d5bd0;
  --location-tab-icon-bg: #ede9fe;
}

.location-tab-videographer {
  --location-tab-icon: #e05f43;
  --location-tab-icon-bg: #ffe4dc;
}

.location-spot-card {
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.location-spot-card:hover,
.location-spot-card:focus-visible {
  border-color: rgba(8, 63, 77, 0.24);
  box-shadow: 0 14px 34px rgba(8, 63, 77, 0.1);
  outline: 0;
  transform: translateY(-1px);
}

.location-spot-card.is-selected {
  border-color: rgba(238, 111, 87, 0.46);
  box-shadow: 0 0 0 3px rgba(238, 111, 87, 0.12);
}

.location-spot-card h3 {
  margin: 0 0 4px;
  line-height: 1.12;
}

.location-spot-action {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 6px 10px;
  color: var(--deep);
  background: var(--secondary-button-bg);
  border: 1px solid var(--secondary-button-border);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 900;
}

.spot-card,
.badge-card {
  display: grid;
  gap: 12px;
  padding: 10px;
}

.spot-card {
  position: relative;
  grid-template-columns: 96px minmax(0, 1fr);
  cursor: pointer;
}

.spot-card-body {
  min-width: 0;
}

.badge-card {
  grid-template-columns: 96px minmax(0, 1fr);
}

.badge-card-action {
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.badge-card-action:hover,
.badge-card-action:focus-visible {
  border-color: rgba(238, 111, 87, 0.46);
  box-shadow: 0 8px 20px rgba(8, 63, 77, 0.12);
  outline: 0;
  transform: translateY(-1px);
}

.spot-card.is-selected {
  border-color: rgba(238, 111, 87, 0.46);
  box-shadow: 0 0 0 3px rgba(238, 111, 87, 0.12);
}

.spot-card > img,
.badge-art {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: var(--radius);
}

.spot-card .spot-contributor-avatar {
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(8, 63, 77, 0.14);
}

.spot-card .spot-contributor-badge {
  align-self: start;
  width: 96px;
  height: 106px;
}

.spot-card .spot-contributor-badge.is-open {
  opacity: 0.92;
}

.spot-card h3,
.badge-card h3,
.login-card h2,
.leaderboard h2 {
  margin: 0 0 4px;
}

.spot-card p,
.badge-card p {
  margin: 6px 0;
}

.compact-section-head {
  align-items: center;
  margin: 4px 0 0;
}

.compact-section-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.spot-post-grid {
  display: grid;
  gap: 12px;
}

.spot-post-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid rgba(8, 63, 77, 0.1);
  border-radius: var(--radius);
}

.spot-post-card[data-spot-post-key] {
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.spot-post-card[data-spot-post-key]:hover,
.spot-post-card[data-spot-post-key]:focus-visible {
  border-color: rgba(8, 63, 77, 0.24);
  box-shadow: 0 14px 34px rgba(8, 63, 77, 0.1);
  outline: 0;
  transform: translateY(-1px);
}

.spot-post-card > img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: var(--radius);
}

.account-card > img {
  border-radius: 50%;
}

.account-card {
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.account-card:hover,
.account-card:focus-within {
  border-color: rgba(8, 63, 77, 0.24);
  box-shadow: 0 14px 34px rgba(8, 63, 77, 0.1);
  transform: translateY(-1px);
}

.account-card.is-pending-account {
  opacity: 0.72;
  border-style: dashed;
}

.account-card.is-pending-account > img {
  filter: grayscale(0.55);
}

.account-card-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.spot-professional-section {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.spot-professional-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.compact-account-button {
  width: auto;
  min-height: 38px;
  padding: 8px 16px;
  margin-top: 8px;
  border-radius: 999px;
  font-size: 0.92rem;
}

.account-location-dialog .spot-meta {
  margin: 4px 0 12px;
  overflow-wrap: anywhere;
}

.account-location-dialog {
  width: 100%;
  max-width: calc(100vw - 28px);
  overflow-x: hidden;
}

.account-location-dialog * {
  min-width: 0;
}

.account-location-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.account-location-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
  max-width: 100%;
  overflow: hidden;
}

body.forum-fullscreen-open {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

body.forum-fullscreen-open .topbar,
body.forum-fullscreen-open .bottom-nav,
body.forum-fullscreen-open .v2-log-dive-button {
  display: none !important;
}

body.forum-fullscreen-open .main {
  overflow: hidden !important;
}

.location-forum {
  display: grid;
  grid-template-rows: auto minmax(280px, 52vh) auto;
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.location-forum.is-maximized {
  position: fixed !important;
  inset: 0;
  z-index: 1000;
  grid-template-rows: auto minmax(0, 1fr) auto;
  box-sizing: border-box;
  width: 100vw;
  width: 100dvw;
  height: var(--app-viewport-height, 100dvh);
  min-height: var(--app-viewport-height, 100dvh);
  max-width: 100dvw;
  max-height: var(--app-viewport-height, 100dvh);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  transform: none;
  isolation: isolate;
}

.location-forum.is-maximized .forum-panel-head {
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  padding-right: max(18px, env(safe-area-inset-right, 0px));
  padding-left: max(18px, env(safe-area-inset-left, 0px));
}

.location-forum.is-maximized .forum-thread {
  padding-right: max(14px, env(safe-area-inset-right, 0px));
  padding-left: max(14px, env(safe-area-inset-left, 0px));
}

.forum-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.forum-panel-head .eyebrow,
.forum-panel-head h2 {
  margin: 0;
}

.forum-panel-head h2 {
  margin-top: 2px;
}

.forum-fullscreen-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

.forum-fullscreen-button:hover {
  color: var(--deep);
  background: var(--subpanel);
}

.forum-fullscreen-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.forum-thread {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  padding: 14px;
  overflow-y: auto;
}

.forum-thread .chat-time-divider {
  margin: 4px 0 0;
}

.forum-message {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.forum-message > img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 50%;
}

.forum-author-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.forum-author-button img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 50%;
}

.forum-author-button.is-anonymous-admin::after {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  content: "A";
  color: #083f4d;
  background: var(--sun);
  border: 2px solid var(--panel);
  border-radius: 50%;
  font-size: 0.58rem;
  font-weight: 1000;
  line-height: 1;
}

.forum-anonymous-avatar {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.forum-anonymous-avatar .icon {
  width: 20px;
  height: 20px;
  mask-image: var(--icon-user);
  -webkit-mask-image: var(--icon-user);
  mask-size: 20px;
  -webkit-mask-size: 20px;
}

.forum-message-main {
  min-width: 0;
}

.forum-message-bubble {
  display: grid;
  gap: 8px;
  width: fit-content;
  max-width: min(680px, 100%);
  min-width: 0;
  padding: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow-wrap: anywhere;
}

.forum-message.is-own .forum-message-bubble {
  margin-left: auto;
  color: var(--primary-button-ink);
  background: var(--primary-button-bg);
  border-color: var(--primary-button-bg);
}

.forum-message.has-media .forum-message-bubble {
  max-width: min(72vw, 420px);
}

.forum-message-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.forum-message-head strong {
  line-height: 1.1;
}

.forum-message-head span,
.forum-message-bubble > p,
.forum-reply-context p,
.forum-reply-context span {
  overflow-wrap: anywhere;
}

.forum-message-head span,
.forum-reply-context span {
  color: currentColor;
  opacity: 0.72;
  font-size: 0.78rem;
  font-weight: 800;
}

.forum-message-bubble > p {
  margin: 0;
  line-height: 1.35;
}

.forum-image-button {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  overflow: hidden;
  background: var(--app-bg);
  border: 0;
  border-radius: 14px;
  cursor: pointer;
}

.forum-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(48dvh, 420px);
  object-fit: contain;
}

.forum-mention {
  display: inline;
  padding: 0;
  color: var(--deep);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.forum-message.is-own .forum-mention {
  color: currentColor;
}

.forum-message.is-deleted .forum-message-bubble > p {
  color: currentColor;
  font-style: italic;
  opacity: 0.72;
}

.forum-reply-context {
  display: grid;
  gap: 3px;
  max-width: 100%;
  min-width: 0;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(8, 63, 77, 0.12);
  border-radius: 10px;
}

.forum-message.is-own .forum-reply-context {
  color: var(--ink);
}

.forum-reply-context p {
  margin: 0;
  font-size: 0.85rem;
}

.forum-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.forum-message-actions button {
  padding: 0;
  color: currentColor;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 900;
  opacity: 0.76;
}

.forum-message-actions button.active,
.forum-message-actions button:hover {
  opacity: 1;
}

.forum-empty {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 220px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.forum-empty strong {
  color: var(--ink);
}

.forum-composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
  background: var(--panel);
  border-top: 1px solid var(--line);
}

.location-forum.is-maximized .forum-composer {
  padding-right: max(12px, env(safe-area-inset-right, 0px));
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  padding-left: max(12px, env(safe-area-inset-left, 0px));
}

html.forum-keyboard-open body.forum-fullscreen-open .location-forum.is-maximized {
  top: var(--app-viewport-offset-top, 0px);
  bottom: auto;
  height: var(--app-viewport-height, 100dvh);
  min-height: 0;
  max-height: var(--app-viewport-height, 100dvh);
}

html.forum-keyboard-open body.forum-fullscreen-open .location-forum.is-maximized .forum-thread {
  padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  scroll-padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
}

html.forum-keyboard-open body.forum-fullscreen-open .location-forum.is-maximized .forum-composer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  box-sizing: border-box;
  width: 100vw;
  width: 100dvw;
  max-width: 100dvw;
  box-shadow: 0 -14px 30px rgba(2, 11, 20, 0.28);
}

html.android-keyboard-open.forum-keyboard-open body.forum-fullscreen-open .location-forum.is-maximized {
  top: 0;
  height: 100dvh;
  max-height: 100dvh;
}

html.android-keyboard-open.forum-keyboard-open body.forum-fullscreen-open .location-forum.is-maximized .forum-composer {
  bottom: var(--android-keyboard-space, 320px);
  padding-bottom: 12px;
}

html.ios-keyboard-open.forum-keyboard-open body.forum-fullscreen-open .location-forum.is-maximized {
  top: var(--app-viewport-offset-top, 0px);
  height: var(--ios-message-viewport-height, var(--app-viewport-height, 100dvh));
  max-height: var(--ios-message-viewport-height, var(--app-viewport-height, 100dvh));
}

html.ios-keyboard-open.forum-keyboard-open body.forum-fullscreen-open .location-forum.is-maximized .forum-composer {
  bottom: max(0px, calc(100dvh - var(--ios-message-viewport-height, var(--app-viewport-height, 100dvh)) - var(--app-viewport-offset-top, 0px)));
}

html.forum-keyboard-open .app-shell[data-view="forum"] .location-forum.is-page {
  top: var(--app-viewport-offset-top, 0px);
  block-size: var(--app-viewport-height, 100dvh);
  min-block-size: 0;
  max-block-size: var(--app-viewport-height, 100dvh);
}

html.forum-keyboard-open .app-shell[data-view="forum"] .location-forum.is-page .forum-thread {
  padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  scroll-padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
}

html.forum-keyboard-open .app-shell[data-view="forum"] .location-forum.is-page .forum-composer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  box-sizing: border-box;
  width: 100vw;
  width: 100dvw;
  max-width: 100vw;
  max-width: 100dvw;
  inline-size: 100dvw;
  max-inline-size: 100dvw;
  padding-right: max(8px, env(safe-area-inset-right, 0px));
  padding-left: max(8px, env(safe-area-inset-left, 0px));
  box-shadow: 0 -14px 30px rgba(2, 11, 20, 0.28);
}

html.android-keyboard-open.forum-keyboard-open .app-shell[data-view="forum"] .location-forum.is-page {
  top: 0;
  block-size: 100dvh;
  max-block-size: 100dvh;
}

html.android-keyboard-open.forum-keyboard-open .app-shell[data-view="forum"] .location-forum.is-page .forum-composer {
  bottom: var(--android-keyboard-space, 320px);
  padding-bottom: 12px;
}

html.ios-keyboard-open.forum-keyboard-open .app-shell[data-view="forum"] .location-forum.is-page {
  position: relative;
  top: 0;
  block-size: var(--ios-message-viewport-height, var(--app-viewport-height, 100dvh));
  max-block-size: var(--ios-message-viewport-height, var(--app-viewport-height, 100dvh));
}

html.ios-keyboard-open.forum-keyboard-open .app-shell[data-view="forum"] {
  position: fixed;
  top: var(--app-viewport-offset-top, 0px);
  right: 0;
  bottom: auto;
  left: 0;
  min-height: 0;
  min-block-size: 0;
  height: var(--ios-message-viewport-height, var(--app-viewport-height, 100dvh));
  block-size: var(--ios-message-viewport-height, var(--app-viewport-height, 100dvh));
  max-height: var(--ios-message-viewport-height, var(--app-viewport-height, 100dvh));
  max-block-size: var(--ios-message-viewport-height, var(--app-viewport-height, 100dvh));
  overflow: hidden;
}

html.ios-keyboard-open.forum-keyboard-open .app-shell[data-view="forum"] .main,
html.ios-keyboard-open.forum-keyboard-open .app-shell[data-view="forum"] .view-forum,
html.ios-keyboard-open.forum-keyboard-open .app-shell[data-view="forum"] .forum-page-shell {
  height: var(--ios-message-viewport-height, var(--app-viewport-height, 100dvh));
  block-size: var(--ios-message-viewport-height, var(--app-viewport-height, 100dvh));
  max-height: var(--ios-message-viewport-height, var(--app-viewport-height, 100dvh));
  max-block-size: var(--ios-message-viewport-height, var(--app-viewport-height, 100dvh));
  overflow: hidden;
}

html.ios-keyboard-open.forum-keyboard-open .app-shell[data-view="forum"] .location-forum.is-page .forum-composer {
  position: absolute;
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
}

html[data-android-shell="true"] .forum-composer,
html[data-native-app="android"] .forum-composer {
  padding-bottom: calc(12px + var(--android-control-safe-bottom, 0px));
}

.forum-reply-target {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.forum-reply-target[hidden] {
  display: none;
}

.forum-reply-target span {
  display: grid;
  min-width: 0;
}

.forum-reply-target em {
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-reply-target button {
  width: 30px;
  height: 30px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.forum-mention-menu {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  max-height: 220px;
  padding: 6px;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
}

.forum-attachment-preview {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  color: var(--ink);
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.forum-attachment-preview img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
}

.forum-attachment-preview span {
  display: grid;
  min-width: 0;
}

.forum-attachment-preview strong,
.forum-attachment-preview em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-attachment-preview em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 800;
}

.forum-attachment-preview button,
.forum-attach-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  font-weight: 900;
}

.forum-attach-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.forum-anonymous-toggle {
  grid-column: 1 / -1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 34px;
  padding: 5px 10px 5px 6px;
  color: var(--ink);
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
  user-select: none;
}

.forum-anonymous-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.forum-toggle-track {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 24px;
  background: color-mix(in srgb, var(--muted) 22%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.forum-toggle-track::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  content: "";
  background: var(--panel);
  border-radius: 50%;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.18);
  transition: transform 140ms ease;
}

.forum-anonymous-toggle input:checked + .forum-toggle-track {
  background: var(--primary-button-bg);
  border-color: var(--primary-button-bg);
}

.forum-anonymous-toggle input:checked + .forum-toggle-track::after {
  transform: translateX(16px);
}

.forum-mention-menu[hidden] {
  display: none;
}

.forum-mention-menu button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
}

.forum-mention-menu button.is-active,
.forum-mention-menu button:hover {
  background: var(--soft);
  border-color: var(--line);
}

.forum-mention-menu img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 50%;
}

.forum-mention-menu span {
  display: grid;
  min-width: 0;
}

.forum-mention-menu strong,
.forum-mention-menu em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-mention-menu em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 800;
}

.forum-composer input {
  inline-size: 100%;
  max-inline-size: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.account-location-row span {
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
  word-break: normal;
}

.account-location-row strong {
  color: var(--deep);
  white-space: nowrap;
}

@media (max-width: 480px) {
  .account-location-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .account-location-row strong {
    justify-self: start;
  }
}

.spot-post-card p {
  margin: 6px 0;
}

.empty-state {
  display: block;
  color: var(--muted);
}

.badge-art {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--deep), var(--reef));
  font-size: 1.7rem;
  font-weight: 900;
}

.badge-art-image {
  overflow: visible;
  background: linear-gradient(180deg, rgba(15, 143, 139, 0.1), rgba(8, 63, 77, 0.06));
}

.badge-art-image .achievement-badge.is-preview {
  width: 70px;
  height: 78px;
}

.profile-hero {
  overflow: hidden;
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid rgba(8, 63, 77, 0.1);
}

.profile-cover {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.profile-info {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 0 16px 16px;
}

.profile-photo {
  width: 92px;
  height: 92px;
  display: block;
  flex: 0 0 auto;
  margin-top: -42px;
  object-position: center 22%;
  border: 4px solid #fff;
}

.profile-info > [data-open-login] {
  display: none;
}

.profile-info > div {
  min-width: 0;
}

.profile-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-title-row .cert-status-pill {
  max-width: 100%;
  white-space: normal;
  line-height: 1.15;
}

#profileMeta {
  margin: 6px 0 0;
}

.profile-bio {
  grid-column: 1 / -1;
  margin: -8px 0 0;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 14px 0;
  overflow: hidden;
}

.profile-stats div {
  display: grid;
  gap: 4px;
  padding: 16px 8px;
  text-align: center;
  background: var(--panel);
}

.profile-stats strong {
  font-size: 1.35rem;
}

.profile-stats span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.profile-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  margin-bottom: 14px;
  color: var(--deep);
  background: rgba(15, 143, 139, 0.08);
  border: 1px solid rgba(15, 143, 139, 0.18);
  border-radius: var(--radius);
  font-weight: 700;
}

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

.profile-filter-bar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 14px 0;
  overflow: hidden;
  background: var(--line);
  border: 1px solid rgba(8, 63, 77, 0.1);
  border-radius: var(--radius);
}

.profile-tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  color: var(--muted);
  background: var(--panel);
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.profile-tab-button.active {
  color: var(--secondary-button-ink);
  background: var(--secondary-button-bg);
}

.profile-tab-icon {
  width: 20px;
  height: 20px;
  background: currentColor;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: 20px;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 20px;
}

.profile-tab-icon.is-badge {
  mask-image: var(--icon-seal);
  -webkit-mask-image: var(--icon-seal);
}

.profile-tab-icon.is-grid {
  mask-image: var(--icon-grid);
  -webkit-mask-image: var(--icon-grid);
}

.profile-tab-icon.is-saved {
  mask-image: var(--icon-bookmark);
  -webkit-mask-image: var(--icon-bookmark);
}

.profile-tab-icon.is-profile {
  mask-image: var(--icon-user);
  -webkit-mask-image: var(--icon-user);
}

.profile-posts {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.profile-posts[hidden],
.profile-badges[hidden] {
  display: none;
}

.profile-badges {
  display: grid;
  gap: 14px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.profile-badge-section {
  display: grid;
  gap: 10px;
}

.profile-badge-section h2 {
  margin: 0;
  color: var(--deep);
  font-size: 1rem;
}

.profile-badge-list {
  display: grid;
  gap: 10px;
}

.profile-badge-empty,
.profile-cert-card {
  padding: 12px;
  background: var(--panel);
  border: 1px solid rgba(8, 63, 77, 0.1);
  border-radius: var(--radius);
}

.profile-cert-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.profile-cert-art .cert-badge,
.profile-cert-art .cert-badge.has-logo {
  width: 70px;
  height: 78px;
}

.profile-cert-art .cert-badge > span {
  border-radius: var(--radius);
  font-size: 1rem;
}

.profile-cert-card h3 {
  margin: 0;
  font-size: 1rem;
}

.certification-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.certification-status-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.certification-status-card strong {
  display: block;
  font-weight: 800;
}

.certification-status-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.cert-status-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  color: var(--deep);
  background: rgba(15, 143, 139, 0.12);
  border: 1px solid rgba(15, 143, 139, 0.18);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
}

.cert-status-pill.is-pending {
  color: #7a5a00;
  background: rgba(247, 185, 69, 0.18);
  border-color: rgba(247, 185, 69, 0.34);
}

.cert-status-pill.is-rejected,
.cert-status-pill.is-revoked {
  color: #8c2d23;
  background: rgba(244, 117, 92, 0.16);
  border-color: rgba(244, 117, 92, 0.28);
}

.profile-badge-empty {
  color: var(--muted);
  font-weight: 700;
}

.profile-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.profile-grid-item {
  position: relative;
  display: block;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  background: var(--line);
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

.profile-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-grid-item span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 18px 6px 6px;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.58));
  font-size: 0.72rem;
  font-weight: 800;
  text-align: left;
}

.profile-detail-toolbar {
  display: flex;
  justify-content: flex-start;
}

.profile-post-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid rgba(8, 63, 77, 0.1);
  border-radius: var(--radius);
}

.profile-post-card.empty-state {
  display: block;
}

.profile-post-card > img {
  width: 128px;
  height: 128px;
  object-fit: cover;
  border-radius: var(--radius);
}

.profile-post-card strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}

.profile-post-card p {
  margin: 6px 0;
}

.profile-post-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.profile-post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.profile-settings-form {
  display: grid;
  gap: 14px;
}

.profile-settings-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid rgba(8, 63, 77, 0.1);
  border-radius: var(--radius);
}

.profile-settings-section[hidden] {
  display: none;
}

.profile-settings-section h2 {
  margin: 0;
  color: var(--deep);
  font-size: 1rem;
}

.profile-settings-grid,
.profile-password-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-settings-form label,
.profile-settings-grid label,
.profile-password-grid label {
  min-width: 0;
}

.profile-settings-form :is(input, select, textarea) {
  width: 100%;
  inline-size: 100%;
  max-width: 100%;
  max-inline-size: 100%;
  min-width: 0;
  min-inline-size: 0;
  box-sizing: border-box;
  font-size: 16px;
}

.profile-bio-field {
  grid-column: 1 / -1;
}

.profile-bio-field textarea {
  min-height: 96px;
  resize: vertical;
}

.location-picker-block {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.location-picker-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.location-picker-heading strong {
  color: var(--deep);
  font-size: 0.96rem;
}

.location-picker-heading small {
  text-align: right;
}

.location-picker-list {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.location-picker-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 10px;
  width: 100%;
  inline-size: 100%;
  min-width: 0;
  min-inline-size: 0;
  max-width: 100%;
  max-inline-size: 100%;
  box-sizing: border-box;
  contain: inline-size;
  padding: 10px;
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.location-picker-row label:not(.location-default-choice) {
  display: grid;
  gap: 5px;
  position: relative;
  min-width: 0;
  max-width: 100%;
}

.location-picker-row input[type="text"] {
  width: 100%;
  inline-size: 100%;
  max-width: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  box-sizing: border-box;
  overflow: hidden;
  padding-right: 34px;
  font-size: 16px;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.location-picker-suggestions {
  position: absolute;
  z-index: 60;
  right: 0;
  left: 0;
  top: calc(100% + 4px);
  display: grid;
  width: 100%;
  inline-size: 100%;
  max-width: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  max-height: 220px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 5px;
  box-sizing: border-box;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 34px rgba(3, 25, 31, 0.22);
}

.location-picker-suggestions[hidden] {
  display: none;
}

.location-picker-suggestions button {
  width: 100%;
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  overflow-wrap: anywhere;
  white-space: normal;
}

.location-picker-suggestions button:active,
.location-picker-suggestions button:hover,
.location-picker-suggestions button:focus-visible {
  background: var(--soft);
}

.location-remove-button {
  min-height: 44px;
  align-self: end;
}

.location-add-button[hidden] {
  display: none;
}

.profile-image-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-image-control {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
  cursor: pointer;
}

.profile-image-label {
  color: var(--muted);
  font-weight: 900;
  line-height: 1.15;
}

.profile-image-preview {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.profile-image-preview.is-avatar {
  width: 116px;
  aspect-ratio: 1;
  border-radius: 50%;
}

.profile-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-image-edit-chip {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  color: #fff;
  background: rgba(7, 17, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(7, 17, 20, 0.24);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.profile-image-preview.is-avatar .profile-image-edit-chip {
  right: 50%;
  bottom: 8px;
  transform: translateX(50%);
}

.profile-image-control:hover .profile-image-preview {
  border-color: rgba(8, 63, 77, 0.28);
  box-shadow: 0 10px 26px rgba(8, 63, 77, 0.12);
}

.profile-image-control:has(.profile-image-file:focus-visible) .profile-image-preview {
  outline: 3px solid rgba(15, 143, 139, 0.28);
  outline-offset: 3px;
}

.profile-image-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.profile-certification-file-field {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  min-width: 0;
}

.profile-certification-preview {
  display: grid;
  gap: 8px;
}

.profile-certification-preview[hidden] {
  display: none;
}

.profile-certification-proof {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.profile-certification-proof.is-selected {
  border-color: rgba(15, 143, 139, 0.32);
  background: color-mix(in srgb, var(--reef) 10%, var(--subpanel));
}

.profile-certification-proof-thumb {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  overflow: hidden;
  color: var(--deep);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 900;
}

.profile-certification-proof-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-certification-proof-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.profile-certification-proof-copy small,
.profile-certification-proof-copy em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.profile-certification-proof-copy strong {
  color: var(--ink);
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.profile-certification-proof-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 7px;
}

.profile-theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.profile-theme-options label {
  grid-template-columns: 18px 1fr;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.profile-settings-form input.is-required-missing,
.profile-settings-form select.is-required-missing {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(239, 112, 92, 0.18);
}

.profile-field-error {
  display: block;
  margin-top: 6px;
  color: var(--coral);
  font-size: 0.82rem;
  font-weight: 800;
}

.profile-save-status {
  margin: 0;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 800;
}

.profile-save-status.is-success {
  color: var(--teal);
  background: var(--sea-soft);
  border-color: var(--sea-line);
}

.profile-save-status.is-error {
  color: var(--coral);
  background: rgba(239, 112, 92, 0.12);
  border-color: rgba(239, 112, 92, 0.45);
}

.profile-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.side-panel {
  display: flex;
  flex-direction: column;
  align-content: start;
  gap: 14px;
  min-height: 0;
  padding-right: 4px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.side-panel > * {
  flex: 0 0 auto;
  width: 100%;
}

.login-card,
.leaderboard {
  min-width: 0;
  align-self: start;
  padding: 14px;
}

.login-card {
  display: grid;
  gap: 12px;
}

.login-card > h2,
.login-card > p {
  margin: 0;
}

.account-session-card {
  display: grid;
  gap: 10px;
}

.account-login-card {
  display: grid;
  gap: 12px;
}

.account-session-card.is-compact {
  gap: 8px;
  padding: 10px;
}

.account-card-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.account-card-head h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.1;
}

.account-card-head span {
  max-width: 100%;
  padding: 3px 8px;
  color: var(--deep);
  overflow-wrap: anywhere;
  white-space: normal;
  background: var(--sea-soft);
  border: 1px solid var(--sea-line);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.15;
}

.account-user-line {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.3;
}

.account-action-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.account-session-card.is-compact .account-action-row {
  grid-template-columns: repeat(2, minmax(116px, 1fr));
  width: min(100%, 420px);
  justify-self: center;
}

.account-action-row .primary-button,
.account-action-row .secondary-button {
  min-height: 34px;
  padding: 7px 8px;
  font-size: 0.78rem;
}

.account-session-card .primary-button,
.account-session-card .secondary-button {
  width: 100%;
  min-width: 0;
  white-space: normal;
}

.notification-card,
.announcement-card,
.leaderboard {
  overflow: hidden;
}

.login-action-grid,
.social-login-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 0;
}

.login-action-grid .primary-button,
.login-action-grid .secondary-button,
.social-login-grid .social-button,
.login-profile-shortcut {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  margin: 0;
  white-space: normal;
}

.login-profile-shortcut {
  margin-top: 10px;
}

.social-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 0;
  color: #fff;
  text-align: center;
}

.facebook {
  background: #1877f2;
}

.apple {
  color: #fff;
  background: #101820;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.google {
  color: #233044;
  background: #fff;
  border: 1px solid rgba(35, 48, 68, 0.18);
}

.google::before {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #fff;
  background: #4285f4;
  border-radius: 50%;
  content: "G";
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

.instagram {
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}

.leader-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.leader-row:first-child {
  border-top: 0;
}

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

.leader-row strong {
  display: flex;
}

.bottom-nav {
  display: none;
}

.marketplace-cart-top {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  text-decoration: none;
}

.marketplace-cart-top[hidden] {
  display: none;
}

.marketplace-cart-icon {
  width: 42px;
  height: 42px;
  background: transparent var(--marketplace-cart-icon-url) center / contain no-repeat;
}

.marketplace-cart-count {
  position: absolute;
  top: -4px;
  right: -2px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  color: #061217;
  background: var(--reef);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.marketplace-cart-count[hidden] {
  display: none;
}

.view-marketplace {
  max-width: 980px;
  margin: 0 auto;
  padding: 4px 0 24px;
}

.view-marketplace,
.view-marketplace * {
  box-sizing: border-box;
}

.view-marketplace input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.view-marketplace select,
.view-marketplace textarea {
  max-width: 100%;
  min-width: 0;
}

.marketplace-shell {
  display: grid;
  gap: 14px;
}

.marketplace-head,
.marketplace-card,
.marketplace-summary,
.marketplace-notice {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(8, 63, 77, 0.08);
}

.marketplace-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}

.marketplace-head h1,
.marketplace-card h2,
.marketplace-card h3 {
  margin: 0;
}

.marketplace-head p,
.marketplace-card p,
.marketplace-notice p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.34;
}

.marketplace-services-head {
  align-items: center;
  padding-block: 14px;
}

.marketplace-services-head .eyebrow {
  margin: 0;
  color: var(--reef);
}

.marketplace-services-head .primary-button {
  width: auto;
  min-width: 124px;
  min-height: 36px;
  padding-inline: 12px;
  border-radius: 12px;
  font-size: 0.86rem;
}

.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.marketplace-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.marketplace-list-panel {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(8, 63, 77, 0.08);
}

.marketplace-list-scroll {
  overflow-x: auto;
}

.marketplace-service-list-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.7fr) minmax(122px, 0.8fr) minmax(116px, 0.7fr) minmax(116px, 0.6fr);
  gap: 16px;
  align-items: center;
  width: max(720px, 100%);
  min-width: 100%;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
}

.marketplace-service-list-row:first-child {
  border-top: 0;
}

.marketplace-service-list-row[data-marketplace-service-row] {
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.marketplace-service-list-row[data-marketplace-service-row]:hover {
  background: color-mix(in srgb, var(--soft) 58%, transparent);
}

.marketplace-service-list-row.is-readonly {
  cursor: default;
}

.marketplace-service-list-row.is-readonly .secondary-button[disabled],
.primary-button.is-disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.marketplace-service-list-head {
  color: var(--muted);
  background: color-mix(in srgb, var(--soft) 82%, var(--panel));
  font-size: 0.82rem;
  font-weight: 900;
}

.marketplace-service-list-name {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.marketplace-service-list-name img {
  width: 72px;
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
  object-position: center;
  background: var(--soft);
  border-radius: 8px;
}

.marketplace-service-list-name strong,
.marketplace-service-list-name small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-service-list-name small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
}

.marketplace-service-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
  background: var(--soft);
}

.marketplace-services-browser {
  align-items: start;
}

.marketplace-service-directory-shell {
  gap: 10px;
}

.marketplace-service-directory-head {
  align-items: center;
  padding: 12px 14px;
}

.marketplace-service-directory-head h1 {
  font-size: 1.7rem;
  line-height: 1;
}

.marketplace-service-filter-card {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(118px, 0.65fr) max-content;
  gap: 8px;
  align-items: end;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(8, 63, 77, 0.08);
}

.marketplace-service-filter-card label,
.marketplace-service-filter-provider {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.marketplace-service-filter-card input:not([type="radio"]),
.marketplace-service-filter-card select {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.1;
}

.marketplace-service-filter-provider {
  margin: 0;
  padding: 0;
  border: 0;
}

.marketplace-service-filter-provider legend {
  padding: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.marketplace-provider-radio-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: 36px;
  min-width: 0;
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.marketplace-provider-radio-group label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 100%;
  padding: 0 6px;
  color: var(--muted);
  border-right: 1px solid var(--line);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.marketplace-provider-radio-group label:last-child {
  border-right: 0;
}

.marketplace-provider-radio-group input[type="radio"] {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  min-width: 12px;
  margin: 0 4px 0 0;
  padding: 0;
  accent-color: var(--reef);
  appearance: auto;
  -webkit-appearance: radio;
}

.marketplace-provider-radio-group label:has(input[type="radio"]:checked) {
  color: #001217;
  background: var(--reef);
}

.marketplace-provider-radio-group span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-service-filter-card input:focus,
.marketplace-service-filter-card select:focus {
  outline-offset: 0;
}

.marketplace-service-filter-card datalist {
  display: none;
}

.marketplace-service-filter-search,
.marketplace-service-filter-location,
.marketplace-service-filter-provider,
.marketplace-service-filter-actions {
  min-width: 0;
}

.marketplace-service-filter-actions {
  display: grid;
  gap: 6px;
}

.marketplace-service-filter-card small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.marketplace-provider-group {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(8, 63, 77, 0.08);
}

.marketplace-provider-group > header {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.marketplace-provider-group > header img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--soft);
  border: 1px solid var(--line);
}

.marketplace-provider-group > header strong,
.marketplace-provider-group > header small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-provider-group > header strong {
  font-size: 0.9rem;
  line-height: 1.08;
}

.marketplace-provider-group > header small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.marketplace-provider-group > header span {
  padding: 5px 8px;
  color: var(--ink);
  background: color-mix(in srgb, var(--reef) 18%, var(--soft));
  border: 1px solid color-mix(in srgb, var(--reef) 38%, var(--line));
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 900;
}

.marketplace-provider-services {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.marketplace-provider-service-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto auto;
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border-top: 1px solid var(--line);
}

.marketplace-provider-service-row:first-child {
  border-top: 0;
}

.marketplace-provider-service-row > img {
  width: 68px;
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  background: var(--soft);
}

.marketplace-provider-service-row div {
  min-width: 0;
}

.marketplace-provider-service-row div strong,
.marketplace-provider-service-row div small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-provider-service-row div strong {
  font-size: 0.86rem;
  line-height: 1.1;
}

.marketplace-provider-service-row div small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.marketplace-provider-service-row > strong {
  font-size: 0.8rem;
  white-space: nowrap;
}

.marketplace-provider-service-row > strong.marketplace-price-hidden {
  max-width: 140px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.05;
  white-space: normal;
  text-align: right;
}

.marketplace-price-visibility {
  display: inline-block;
  margin-left: 4px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
  vertical-align: middle;
}

.marketplace-provider-service-row .primary-button {
  width: auto;
  min-width: 58px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 0.72rem;
}

@media (max-width: 640px) {
  .marketplace-service-filter-card {
    grid-template-columns: minmax(0, 1fr) minmax(122px, auto);
  }

  .marketplace-service-filter-search,
  .marketplace-service-filter-location {
    grid-column: 1 / -1;
  }

  .marketplace-service-filter-provider {
    grid-column: 1;
  }

  .marketplace-service-filter-actions {
    grid-column: 2;
    align-self: end;
  }

  .marketplace-service-filter-card .marketplace-compact-button {
    min-height: 36px;
    padding-inline: 10px;
    white-space: nowrap;
  }

  .marketplace-provider-radio-group label {
    gap: 0;
    padding: 0 3px;
    font-size: 0.58rem;
  }

  .marketplace-provider-radio-group input[type="radio"] {
    flex-basis: 10px;
    width: 10px;
    height: 10px;
    min-width: 10px;
    margin-right: 3px;
  }

  .marketplace-provider-service-row {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .marketplace-provider-service-row > img {
    grid-row: 1 / span 2;
    width: 58px;
  }

  .marketplace-provider-service-row > strong {
    grid-column: 2;
    font-size: 0.74rem;
  }

  .marketplace-provider-service-row > strong.marketplace-price-hidden {
    max-width: 100%;
    text-align: left;
  }

  .marketplace-provider-service-row .primary-button {
    grid-column: 3;
    grid-row: 1 / span 2;
    min-width: 52px;
  }
}

.marketplace-service-shop-card {
  align-content: start;
}

.marketplace-service-provider {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}

.marketplace-service-provider img {
  width: 36px;
  height: 36px;
  aspect-ratio: 1;
  border-radius: 50%;
}

.marketplace-service-provider strong,
.marketplace-service-provider small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-service-provider small {
  color: var(--muted);
  font-weight: 750;
}

.marketplace-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.marketplace-row:first-child {
  border-top: 0;
}

.marketplace-row strong {
  display: block;
}

.marketplace-row small {
  color: var(--muted);
  font-weight: 700;
}

.marketplace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: end;
}

.marketplace-service-list-row .marketplace-actions {
  justify-content: start;
  gap: 6px;
}

.marketplace-service-list-row .marketplace-actions .secondary-button {
  width: auto;
  min-width: 64px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 0.78rem;
}

.marketplace-qty {
  display: inline-grid;
  grid-template-columns: 32px 36px 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}

.marketplace-qty button,
.marketplace-qty span {
  display: grid;
  place-items: center;
  min-height: 34px;
  color: var(--ink);
  background: transparent;
  border: 0;
  font-weight: 900;
}

.marketplace-qty span {
  border-inline: 1px solid var(--line);
}

.marketplace-summary {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.marketplace-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

.marketplace-summary-row.is-total {
  padding-top: 8px;
  color: var(--ink);
  border-top: 1px solid var(--line);
  font-size: 1.08rem;
}

.marketplace-payout-shell {
  gap: 10px;
}

.marketplace-payout-head {
  align-items: center;
  padding: 12px 14px;
}

.marketplace-payout-head .eyebrow {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
}

.marketplace-payout-head h1 {
  font-size: 2rem;
  line-height: 1.02;
}

.marketplace-payout-card {
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
}

.marketplace-payout-order-head {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 0;
  border-top: 0;
}

.marketplace-payout-buyer {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.marketplace-buyer-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

.marketplace-payout-buyer:focus-visible .marketplace-buyer-avatar,
.marketplace-payout-buyer:hover .marketplace-buyer-avatar {
  border-color: color-mix(in srgb, var(--reef) 65%, var(--line));
}

.marketplace-buyer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.marketplace-payout-buyer strong {
  display: block;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-payout-buyer small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-payout-order-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.marketplace-payout-card .marketplace-status {
  align-self: center;
  padding: 6px 10px;
  font-size: 0.74rem;
}

.marketplace-message-button {
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1;
}

.marketplace-payout-summary {
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  box-shadow: none;
}

.marketplace-payout-summary .marketplace-summary-row {
  align-items: center;
  font-size: 0.76rem;
}

.marketplace-payout-summary .marketplace-summary-row strong {
  font-size: 0.84rem;
}

.marketplace-payout-summary .marketplace-summary-row.is-total {
  padding-top: 7px;
  font-size: 0.86rem;
}

.marketplace-payout-summary .marketplace-summary-row.is-total strong {
  font-size: 0.94rem;
}

.marketplace-payout-items {
  display: grid;
  gap: 5px;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--soft) 56%, transparent);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.marketplace-payout-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.marketplace-payout-item span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-payout-item small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.marketplace-payout-item strong {
  color: var(--ink);
  font-size: 0.76rem;
}

.marketplace-payout-proof {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
}

.marketplace-payout-proof strong {
  font-size: 0.82rem;
}

.marketplace-payout-proof p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.marketplace-payout-proof-image {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
}

.marketplace-payout-proof-image img {
  width: 76px;
  height: 58px;
  object-fit: cover;
}

.marketplace-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.marketplace-tabs button {
  min-height: 38px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
}

.marketplace-tabs button.active {
  color: #001217;
  background: var(--reef);
}

.view-marketplace-cart .marketplace-shell {
  gap: 10px;
}

.view-marketplace-cart .marketplace-card,
.view-marketplace-cart .marketplace-summary,
.view-marketplace-cart .marketplace-notice {
  padding: 10px 12px;
  border-radius: 12px;
}

.view-marketplace-cart .marketplace-tabs {
  gap: 3px;
  padding: 3px;
  border-radius: 10px;
}

.view-marketplace-cart .marketplace-tabs button {
  min-height: 32px;
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1;
}

.view-marketplace-cart .marketplace-card h2 {
  font-size: 0.98rem;
  line-height: 1.12;
}

.view-marketplace-cart .marketplace-card p,
.view-marketplace-cart .marketplace-notice p {
  font-size: 0.76rem;
  line-height: 1.28;
}

.view-marketplace-cart .marketplace-summary-row {
  font-size: 0.76rem;
}

.view-marketplace-cart .marketplace-summary-row.is-total {
  font-size: 0.88rem;
}

.view-marketplace-cart .marketplace-summary-row.is-total strong {
  font-size: 0.94rem;
}

.view-marketplace-cart .marketplace-notice strong {
  font-size: 0.82rem;
}

.view-marketplace-cart .marketplace-shell > .primary-button {
  min-height: 40px;
  border-radius: 12px;
  font-size: 0.82rem;
}

.marketplace-payout-method-list-panel {
  border-radius: 12px;
}

.marketplace-payout-method-row {
  display: grid;
  grid-template-columns: 80px minmax(92px, 0.7fr) minmax(142px, 1fr) minmax(142px, 1fr) minmax(92px, 0.6fr) minmax(80px, 0.5fr);
  gap: 12px;
  align-items: center;
  width: max(820px, 100%);
  min-width: 100%;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.marketplace-payout-method-row:first-child {
  border-top: 0;
}

.marketplace-payout-method-row[data-marketplace-payout-method-row] {
  cursor: pointer;
  transition: background 0.18s ease;
}

.marketplace-payout-method-row[data-marketplace-payout-method-row]:hover {
  background: color-mix(in srgb, var(--soft) 58%, transparent);
}

.marketplace-payout-method-head {
  color: var(--muted);
  background: color-mix(in srgb, var(--soft) 82%, var(--panel));
  font-size: 0.76rem;
  font-weight: 900;
}

.marketplace-payout-method-row strong,
.marketplace-payout-method-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-payout-method-row > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.marketplace-payout-method-qr {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
}

.marketplace-payout-method-qr img,
.marketplace-payout-method-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 12px;
}

.marketplace-payout-method-qr img {
  object-fit: cover;
  object-position: center 60%;
  background: #fff;
}

.marketplace-payout-method-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--soft);
  border: 1px dashed var(--line);
  font-size: 0.76rem;
  font-weight: 900;
}

.marketplace-payout-setting-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.marketplace-payout-setting-head .eyebrow {
  margin: 0 0 3px;
  font-size: 0.72rem;
}

.marketplace-payout-setting-head h2 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.05;
}

.marketplace-compact-button {
  width: auto;
  min-width: 118px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 0.86rem;
}

.marketplace-row-action {
  width: auto;
  min-width: 58px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 0.78rem;
}

.marketplace-payout-setting-card {
  gap: 12px;
}

.marketplace-payout-editor-head,
.marketplace-service-editor-head {
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
  padding: 12px 48px 12px 14px;
  border-radius: 12px;
}

.marketplace-payout-editor-head .eyebrow,
.marketplace-service-editor-head .eyebrow {
  margin: 0 0 4px;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
}

.marketplace-payout-editor-head h1,
.marketplace-service-editor-head h1 {
  font-size: 1.32rem;
  line-height: 1.02;
}

.marketplace-payout-editor-head p:not(.eyebrow),
.marketplace-service-editor-head p:not(.eyebrow) {
  max-width: 320px;
  margin-top: 6px;
  font-size: 0.78rem;
  line-height: 1.26;
}

.marketplace-editor-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0 0 2px;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.marketplace-editor-close:hover,
.marketplace-editor-close:focus-visible {
  color: var(--primary-button-ink);
  background: var(--primary-button-bg);
  outline: none;
}

.marketplace-payout-setting-card h2 {
  font-size: 1.12rem;
}

.marketplace-payout-method-form {
  gap: 9px;
}

.marketplace-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.marketplace-form-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.marketplace-photo-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.marketplace-service-photo {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  color: var(--deep);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.marketplace-service-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.marketplace-qr-field .marketplace-service-photo.marketplace-qr-photo {
  justify-self: start;
  width: min(100%, 520px);
  aspect-ratio: 16 / 10;
  min-height: 0;
  padding: 8px;
  background: #ffffff;
}

.marketplace-service-photo.marketplace-qr-photo img {
  position: absolute;
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  object-fit: cover;
  object-position: center 66%;
  background: #fff;
  border-radius: 8px;
}

.marketplace-service-photo em {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  max-width: calc(100% - 20px);
  padding: 6px 10px;
  color: var(--ink);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(8, 63, 77, 0.14);
}

.marketplace-service-photo.is-uploading {
  cursor: wait;
}

.marketplace-service-photo.is-uploading::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: color-mix(in srgb, var(--panel) 42%, transparent);
}

.marketplace-service-photo input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.marketplace-service-photo-icon {
  position: relative;
  z-index: 2;
  width: 34px;
  height: 34px;
  background: currentColor;
  mask: var(--icon-image) center / contain no-repeat;
  -webkit-mask: var(--icon-image) center / contain no-repeat;
}

.marketplace-form-grid input:not([type="checkbox"]),
.marketplace-form-grid select,
.marketplace-form-grid textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.marketplace-form-grid textarea {
  min-height: 86px;
  resize: vertical;
}

.marketplace-active-toggle {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  padding: 10px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.marketplace-active-toggle input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  margin: 0;
  padding: 0;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 7px;
  box-shadow: none;
}

.marketplace-active-toggle input[type="checkbox"]::before {
  content: "";
  width: 12px;
  height: 7px;
  border-bottom: 3px solid #fff;
  border-left: 3px solid #fff;
  opacity: 0;
  transform: translateY(-1px) rotate(-45deg);
}

.marketplace-active-toggle input[type="checkbox"]:checked {
  background: var(--reef);
  border-color: var(--reef);
}

.marketplace-active-toggle input[type="checkbox"]:checked::before {
  opacity: 1;
}

.marketplace-active-toggle input[type="checkbox"]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--reef) 28%, transparent);
  outline-offset: 3px;
}

.marketplace-active-toggle span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.marketplace-active-toggle strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.marketplace-active-toggle small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
}

.marketplace-notice {
  padding: 12px 14px;
  background: color-mix(in srgb, var(--reef) 16%, var(--panel));
}

.marketplace-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #083f4d;
  background: #e7f5f2;
  font-size: 0.76rem;
  font-weight: 900;
}

.marketplace-status.is-pending {
  color: #7b4d00;
  background: #fff4dd;
}

.marketplace-status.is-paid,
.marketplace-status.is-active,
.marketplace-status.is-completed {
  color: #0b6046;
  background: #e9f8f1;
}

.marketplace-status.is-deactivated {
  color: #6b2730;
  background: #feecec;
}

.post-options-sheet {
  position: fixed;
  inset: 0;
  z-index: 74;
  display: grid;
  align-items: end;
}

.post-options-sheet[hidden] {
  display: none;
}

.post-options-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 17, 20, 0.38);
  border: 0;
  cursor: pointer;
}

.post-options-panel {
  position: relative;
  width: min(100%, 520px);
  max-height: min(calc(var(--app-viewport-height, 100dvh) - 18px), 520px);
  margin: 0 auto;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -14px 48px rgba(7, 17, 20, 0.18);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.post-options-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 8px;
}

.post-options-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.post-options-list {
  display: grid;
  gap: 6px;
}

.post-options-list button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 8px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.post-options-list button:hover {
  background: var(--secondary-button-bg);
}

.post-options-list .danger-row {
  color: #b42342;
  min-height: 52px;
}

.post-options-list .post-action-icon {
  width: 26px;
  height: 26px;
}

.post-share-sheet {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: grid;
  align-items: end;
}

.post-share-sheet[hidden] {
  display: none;
}

.post-share-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 17, 20, 0.46);
  border: 0;
  cursor: pointer;
}

.post-share-panel {
  position: relative;
  display: grid;
  gap: 10px;
  width: min(100%, 520px);
  max-height: min(calc(var(--app-viewport-height, 100dvh) - 96px), 420px);
  margin: 0 auto;
  padding: 8px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -16px 52px rgba(7, 17, 20, 0.22);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.post-share-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 2px;
}

.post-share-header h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.1;
}

.post-share-preview {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.post-share-preview img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  background: var(--soft);
  border-radius: 12px;
}

.post-share-preview div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.post-share-preview strong,
.post-share-preview span,
.post-share-preview p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-share-preview strong {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.14;
  white-space: nowrap;
}

.post-share-preview span,
.post-share-preview p {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
}

.post-share-preview p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}

.post-share-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.post-share-action {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 72px;
  padding: 9px 6px;
  color: var(--ink);
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.1;
}

.post-share-action:hover {
  border-color: rgba(20, 184, 190, 0.34);
  box-shadow: 0 10px 24px rgba(7, 17, 20, 0.08);
}

.post-share-action span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-share-platform-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #ffffff;
  background: #1c94ff;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 10px 18px rgba(7, 17, 20, 0.12);
  font-size: 1rem;
  font-weight: 1000;
  letter-spacing: 0;
  text-transform: uppercase;
}

.post-share-platform-icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

.post-share-platform-icon svg path {
  fill: currentColor;
  stroke: none;
}

.post-share-platform-icon.is-facebook {
  color: #ffffff;
  background: #1877f2;
}

.post-share-platform-icon.is-facebook svg {
  width: 21px;
  height: 21px;
}

.post-share-platform-icon.is-instagram {
  color: #ffffff;
  background: radial-gradient(circle at 30% 108%, #fdf497 0 18%, #fd5949 44%, #d6249f 68%, #285aeb 100%);
}

.post-share-platform-icon.is-instagram svg rect,
.post-share-platform-icon.is-instagram svg circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.post-share-platform-icon.is-copy {
  color: var(--deep);
  background: #dff8f7;
}

.post-share-platform-icon.is-copy svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html[data-android-shell="true"] .post-share-panel,
html[data-native-app="android"] .post-share-panel {
  padding-bottom: calc(18px + var(--android-control-safe-bottom, 0px));
}

html[data-android-shell="true"] .post-options-panel,
html[data-native-app="android"] .post-options-panel {
  padding-bottom: calc(18px + var(--android-control-safe-bottom, 0px));
}

html[data-android-shell="true"] .post-options-list .danger-row,
html[data-native-app="android"] .post-options-list .danger-row {
  background: color-mix(in srgb, #b42342 8%, transparent);
}

.post-edit-form {
  display: grid;
  gap: 12px;
}

.post-edit-form textarea {
  min-height: 132px;
  resize: vertical;
}

.modal {
  width: min(92vw, 430px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--panel);
  box-shadow: var(--shadow);
}

#composeModal {
  width: min(96vw, 560px);
  max-height: min(94dvh, 860px);
  overflow: hidden;
}

#spotProposalModal {
  width: min(96vw, 560px);
  max-height: min(calc(var(--app-viewport-height, 100dvh) - 24px), 860px);
  overflow: hidden;
}

.modal::backdrop {
  background: var(--modal-backdrop);
  backdrop-filter: blur(4px);
}

.auth-modal {
  width: min(94vw, 520px);
  max-width: calc(100vw - 20px);
  max-height: min(92dvh, 760px);
  overflow: hidden;
  contain: inline-size;
}

.auth-modal[open],
.auth-modal[open] .auth-panel,
.auth-modal[open] .auth-layout,
.auth-modal[open] .auth-card,
.auth-modal[open] .auth-form,
.auth-modal[open] .auth-card label {
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

.auth-modal[open] .auth-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.auth-modal[open] .auth-card select,
.auth-modal[open] .auth-card textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: 16px;
  line-height: 1.25;
}

.auth-modal[open] .auth-card input:focus,
.auth-modal[open] .auth-card select:focus,
.auth-modal[open] .auth-card textarea:focus {
  outline: 0;
  border-color: var(--reef);
  box-shadow: 0 0 0 3px rgba(15, 143, 139, 0.16);
}

.modal form,
.modal-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  color: var(--ink);
  background: var(--panel);
  border-radius: var(--radius);
}

.auth-panel {
  max-height: min(calc(var(--app-viewport-height, 100dvh) - 24px), 760px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#composeForm {
  position: relative;
  max-height: min(94dvh, 860px);
  overflow-x: hidden;
  overflow-y: auto;
  align-content: start;
  -webkit-overflow-scrolling: touch;
}

#spotProposalForm {
  position: relative;
  max-height: min(calc(var(--app-viewport-height, 100dvh) - 24px), 860px);
  overflow-x: hidden;
  overflow-y: auto;
  align-content: start;
  overscroll-behavior: contain;
  scroll-padding: 18px 0 calc(104px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}

#spotProposalForm .spot-proposal-submit {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 4px;
}

#spotProposalForm input.is-required-missing,
#spotProposalForm select.is-required-missing,
#spotProposalForm textarea.is-required-missing {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(239, 112, 92, 0.18);
}

html.android-keyboard-open .keyboard-safe-scroll-area {
  scroll-padding-bottom: calc(var(--android-keyboard-space, 320px) + 96px + var(--android-control-safe-bottom, 0px));
}

html.android-keyboard-open #composeModal[open],
html.android-keyboard-open #spotProposalModal[open] {
  position: fixed;
  top: calc(var(--app-safe-top, env(safe-area-inset-top, 0px)) + 6px);
  left: 50%;
  max-height: calc(var(--app-viewport-height, 100dvh) - var(--android-keyboard-space, 320px) - var(--app-safe-top, env(safe-area-inset-top, 0px)) - 12px);
  margin: 0;
  transform: translateX(-50%);
}

html.android-keyboard-open #composeForm,
html.android-keyboard-open #spotProposalForm {
  max-height: calc(100dvh - var(--android-keyboard-space, 320px) - 16px);
  padding-bottom: calc(var(--android-keyboard-space, 320px) + 24px + var(--android-control-safe-bottom, 0px));
  scroll-padding-bottom: calc(var(--android-keyboard-space, 320px) + 96px + var(--android-control-safe-bottom, 0px));
}

html.android-keyboard-open .auth-modal[open] {
  position: fixed;
  top: calc(var(--app-safe-top, env(safe-area-inset-top, 0px)) + 6px);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  max-height: calc(var(--app-viewport-height, 100dvh) - var(--android-keyboard-space, 320px) - var(--app-safe-top, env(safe-area-inset-top, 0px)) - 12px);
}

html.android-keyboard-open .auth-panel {
  max-height: calc(var(--app-viewport-height, 100dvh) - var(--android-keyboard-space, 320px) - var(--app-safe-top, env(safe-area-inset-top, 0px)) - 12px);
  overflow-y: auto;
  padding-bottom: 18px;
  scroll-padding-bottom: calc(96px + var(--android-control-safe-bottom, 0px));
}

html.android-keyboard-open dialog.modal[open]:not(.auth-modal):not(#composeModal):not(#spotProposalModal) {
  position: fixed;
  top: calc(var(--app-safe-top, env(safe-area-inset-top, 0px)) + 6px);
  left: 50%;
  max-height: calc(var(--app-viewport-height, 100dvh) - var(--android-keyboard-space, 320px) - var(--app-safe-top, env(safe-area-inset-top, 0px)) - 12px);
  margin: 0;
  transform: translateX(-50%);
}

html.android-keyboard-open dialog.modal[open]:not(.auth-modal):not(#composeModal):not(#spotProposalModal) .modal-panel {
  max-height: calc(var(--app-viewport-height, 100dvh) - var(--android-keyboard-space, 320px) - var(--app-safe-top, env(safe-area-inset-top, 0px)) - 12px);
  overflow-y: auto;
  padding-bottom: 18px;
  scroll-padding-bottom: calc(96px + var(--android-control-safe-bottom, 0px));
}

html.android-keyboard-open #spotProposalForm,
html[data-android-shell="true"].spot-proposal-keyboard-open #spotProposalForm {
  padding-bottom: calc(var(--android-keyboard-space, 320px) + 24px + var(--android-control-safe-bottom, 0px));
  scroll-padding-bottom: calc(var(--android-keyboard-space, 320px) + 96px + var(--android-control-safe-bottom, 0px));
}

html.android-keyboard-open #spotProposalForm .spot-proposal-submit,
html[data-android-shell="true"].spot-proposal-keyboard-open #spotProposalForm .spot-proposal-submit {
  position: static;
}

#composeForm .close-button {
  position: static;
}

#composeForm.is-submitting > *:not(.posting-progress) {
  pointer-events: none;
}

.compose-modal-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.compose-modal-header .close-button {
  grid-column: 1;
  grid-row: 1;
}

.compose-modal-header > div {
  grid-column: 2;
  min-width: 0;
}

.compose-modal-header .eyebrow {
  margin: 0 0 2px;
}

.compose-modal-header h2 {
  margin: 0;
  line-height: 1.06;
}

.compose-back-button,
.compose-next-button {
  min-height: 42px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
}

.compose-back-button {
  grid-column: 1;
  grid-row: 1;
  min-width: 74px;
  padding: 0 14px;
  color: var(--deep);
  background: var(--secondary-button-bg);
  border: 1px solid var(--secondary-button-border);
  font-size: 0.92rem;
  line-height: 1;
}

.compose-next-button {
  grid-column: 3;
  padding: 0 18px;
  color: #fff;
  background: #5162ff;
  border: 1px solid #5162ff;
  box-shadow: 0 12px 28px rgba(81, 98, 255, 0.24);
}

.compose-next-button[hidden],
#composeStepTitle[hidden],
.compose-media-state {
  display: none !important;
}

.compose-step[hidden] {
  display: none;
}

.compose-step {
  display: grid;
  gap: 12px;
}

.compose-review-step {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.compose-review-media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 180px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(159, 230, 232, 0.16), transparent 52%),
    #071114;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.compose-review-media:empty::before {
  content: "Add Story";
  color: var(--muted);
  font-weight: 900;
}

.compose-review-media .compose-review-frame {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #071114;
  border-radius: 18px;
}

.compose-review-media img,
.compose-review-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--crop-position-x, 50%) var(--crop-position-y, 50%);
  filter: var(--editor-filter, none);
  transform: scale(var(--crop-scale, 1));
  transform-origin: var(--crop-position-x, 50%) var(--crop-position-y, 50%);
  user-select: none;
  -webkit-user-drag: none;
}

.compose-review-media .compose-video-cover-edit {
  left: 50%;
  right: auto;
  min-width: 150px;
  transform: translateX(-50%);
}

.compose-review-count {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  padding: 4px 9px;
  color: #fff;
  background: rgba(7, 17, 20, 0.62);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.compose-story-field {
  display: grid;
  gap: 8px;
  font-weight: 900;
}

.compose-story-field textarea {
  min-height: 116px;
  resize: vertical;
}

.compose-review-list {
  display: grid;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.compose-review-row,
.compose-review-toggle,
.compose-review-select {
  display: grid;
  min-height: 52px;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-family: inherit;
  font-weight: 900;
}

.compose-review-row {
  grid-template-columns: minmax(0, 1fr) auto;
  cursor: pointer;
}

.compose-review-row strong {
  min-width: 0;
  max-width: 210px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compose-review-row[aria-disabled="true"],
.compose-review-select.is-locked {
  cursor: not-allowed;
  opacity: 0.78;
}

.compose-review-select.is-locked select {
  pointer-events: none;
}

.compose-review-select {
  gap: 7px;
  background: var(--soft);
  min-height: auto;
  align-items: stretch;
}

.compose-review-select span {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.compose-review-select select {
  width: 100%;
  min-height: 46px;
  padding: 0 44px 0 14px;
  font-size: 0.96rem;
  line-height: 1.15;
  white-space: normal;
}

.compose-review-list .field-hint {
  margin: 0;
  padding: 0 14px 12px;
  color: var(--muted);
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  line-height: 1.25;
}

.compose-proposal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.compose-proposal-actions .secondary-button {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
}

.compose-review-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.compose-review-toggle {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 38px;
  padding: 8px 10px;
  gap: 8px;
  font-size: 0.78rem;
  border-bottom: 0;
}

.compose-review-toggle:first-child {
  border-right: 1px solid var(--line);
}

.compose-review-toggle > span:first-child {
  min-width: 0;
  overflow: hidden;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compose-review-list > :last-child {
  border-bottom: 0;
}

.compose-review-list > .compose-review-toggle-grid:last-child {
  border-bottom: 0;
}

.compose-review-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.compose-toggle-track {
  position: relative;
  width: 34px;
  height: 20px;
  background: #c8ced7;
  border-radius: 999px;
  transition: background 160ms ease;
}

.compose-toggle-track span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(7, 17, 20, 0.18);
  transition: transform 160ms ease;
}

.compose-review-toggle input:checked + .compose-toggle-track {
  background: var(--deep);
}

.compose-review-toggle input:checked + .compose-toggle-track span {
  transform: translateX(14px);
}

@media (max-width: 560px) {
  .compose-proposal-actions {
    grid-template-columns: 1fr;
  }
}

.compose-share-button[hidden] {
  display: none;
}

.posting-progress[hidden] {
  display: none;
}

.posting-progress {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  backdrop-filter: blur(10px);
}

.posting-progress-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(280px, 100%);
  padding: 18px;
  color: var(--ink);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.posting-progress-card strong {
  font-size: 1.05rem;
}

.posting-progress-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.diving-progress-ring {
  position: relative;
  display: grid;
  width: 106px;
  height: 106px;
  place-items: center;
  color: var(--deep);
  background: radial-gradient(circle at 50% 50%, var(--panel) 58%, var(--secondary-button-bg) 59%);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.diving-progress-ring::before {
  position: absolute;
  inset: -7px;
  border: 5px solid color-mix(in srgb, var(--reef) 18%, transparent);
  border-top-color: var(--reef);
  border-right-color: var(--sun);
  border-radius: 50%;
  content: "";
  animation: diving-progress-spin 900ms linear infinite;
}

.diving-progress-ring span {
  position: relative;
  z-index: 1;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

@keyframes diving-progress-spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-panel {
  gap: 16px;
  padding: 18px;
  max-height: min(92dvh, 760px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.auth-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 48px;
}

.auth-header h2 {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1;
}

.auth-header p,
.auth-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-logo {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(8, 63, 77, 0.16);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 4px;
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.auth-tab {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.auth-tab.active {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 8px 22px rgba(8, 63, 77, 0.16);
}

.auth-status {
  padding: 10px 12px;
  color: var(--deep);
  background: var(--secondary-button-bg);
  border: 1px solid var(--secondary-button-border);
  border-radius: var(--radius);
  font-weight: 700;
  line-height: 1.32;
}

.auth-status.is-error {
  color: #7a2419;
  background: #fff1ed;
  border-color: rgba(238, 111, 87, 0.34);
}

.auth-status.is-success {
  color: #073d37;
  background: #e7fbf6;
  border-color: rgba(15, 143, 139, 0.24);
}

.username-status {
  display: block;
  margin-top: 4px;
}

.username-status.is-error {
  color: #b83a2b;
}

.username-status.is-success {
  color: #0a7a68;
}

body[data-theme="dark"] .auth-tab,
body[data-theme="dark"] .auth-header p,
body[data-theme="dark"] .auth-note,
body[data-theme="dark"] .auth-card label,
body[data-theme="dark"] .auth-divider,
body[data-theme="dark"] .field-hint {
  color: #d2e5e9;
}

body[data-theme="dark"] .auth-tab.active {
  color: #062329;
  background: #e9fbfb;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .auth-card,
body[data-theme="dark"] .certification-fields {
  background: #121212;
  border-color: #2f3336;
}

body[data-theme="dark"] .auth-card input,
body[data-theme="dark"] .auth-card select,
body[data-theme="dark"] .auth-card textarea {
  color: #f5f5f5;
  background: #1a1a1a;
  border-color: #2f3336;
}

body[data-theme="dark"] .auth-card input::placeholder,
body[data-theme="dark"] .auth-card textarea::placeholder {
  color: #c4d4d9;
  opacity: 1;
}

body[data-theme="dark"] .auth-card input:focus,
body[data-theme="dark"] .auth-card select:focus,
body[data-theme="dark"] .auth-card textarea:focus {
  outline: 0;
  border-color: #8edfe0;
  box-shadow: 0 0 0 3px rgba(142, 223, 224, 0.18);
}

body[data-theme="dark"] .auth-switch {
  color: #d9fbfb;
  border-color: #2f3336;
}

body[data-theme="dark"] .close-button {
  color: #f5f5f5;
  background: #121212;
  border-color: #2f3336;
}

@media (prefers-color-scheme: dark) {
  body[data-theme="auto"] .auth-tab,
  body[data-theme="auto"] .auth-header p,
  body[data-theme="auto"] .auth-note,
  body[data-theme="auto"] .auth-card label,
  body[data-theme="auto"] .auth-divider,
  body[data-theme="auto"] .field-hint {
    color: #d2e5e9;
  }

  body[data-theme="auto"] .auth-tab.active {
    color: #062329;
    background: #e9fbfb;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  }

  body[data-theme="auto"] .auth-card,
  body[data-theme="auto"] .certification-fields {
    background: #121212;
    border-color: #2f3336;
  }

  body[data-theme="auto"] .auth-card input,
  body[data-theme="auto"] .auth-card select,
  body[data-theme="auto"] .auth-card textarea {
    color: #f5f5f5;
    background: #1a1a1a;
    border-color: #2f3336;
  }

  body[data-theme="auto"] .auth-card input::placeholder,
  body[data-theme="auto"] .auth-card textarea::placeholder {
    color: #c4d4d9;
    opacity: 1;
  }

  body[data-theme="auto"] .auth-card input:focus,
  body[data-theme="auto"] .auth-card select:focus,
  body[data-theme="auto"] .auth-card textarea:focus {
    outline: 0;
    border-color: #8edfe0;
    box-shadow: 0 0 0 3px rgba(142, 223, 224, 0.18);
  }

  body[data-theme="auto"] .auth-switch {
    color: #d9fbfb;
    border-color: #2f3336;
  }

  body[data-theme="auto"] .close-button {
    color: #f5f5f5;
    background: #121212;
    border-color: #2f3336;
  }
}

.auth-layout {
  display: block;
}

.auth-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  color: var(--ink);
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.auth-view[hidden] {
  display: none;
}

.auth-card-primary {
  background: linear-gradient(180deg, var(--panel-strong), var(--subpanel-strong));
  border-color: var(--secondary-button-border);
}

.auth-card h3 {
  font-size: 1.35rem;
  line-height: 1.1;
}

.auth-submit {
  width: 100%;
  margin-top: 2px;
}

.auth-agreement {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  color: var(--muted);
  background: rgba(20, 184, 190, 0.08);
  border: 1px solid rgba(20, 184, 190, 0.22);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.auth-agreement input {
  flex: 0 0 auto;
  margin-top: 2px;
}

.auth-agreement a {
  color: var(--reef);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-switch {
  width: fit-content;
  min-height: 36px;
  justify-self: center;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.modal-panel .auth-form {
  padding: 0;
}

.certification-fields {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: var(--subpanel);
  border: 1px solid var(--secondary-button-border);
  border-radius: var(--radius);
}

.optional-verification summary {
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.certification-grid {
  display: grid;
  gap: 10px;
}

.optional-verification .field-hint {
  margin: 4px 0 10px;
}

.claim-fields,
.proposal-fields,
.headquarter-fields {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.claim-fields[hidden],
.proposal-fields[hidden],
.headquarter-fields[hidden] {
  display: none;
}

.proposal-map-control {
  display: grid;
  gap: 10px;
}

.proposal-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.proposal-map-head div {
  display: grid;
  gap: 2px;
}

.proposal-map-head strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.proposal-map-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.proposal-map {
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.proposal-marker span {
  width: 30px;
  height: 30px;
}

#composeSpotField[hidden],
#composeSpotHint[hidden],
#composeProposalActions[hidden],
#contributorClaimRow[hidden],
#claimContributorFields[hidden] {
  display: none !important;
}

.compose-media-field {
  display: grid;
  gap: 8px;
}

.compose-media-field[hidden] {
  display: none !important;
}

.field-label {
  color: var(--muted);
  font-weight: 900;
}

.compose-media-picker {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 12px;
  overflow: hidden;
  color: var(--ink);
  background: linear-gradient(135deg, var(--subpanel), color-mix(in srgb, var(--panel) 78%, var(--aqua)));
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.compose-media-picker:hover,
.compose-media-picker:focus-within {
  border-color: color-mix(in srgb, var(--reef) 46%, var(--line));
  box-shadow: 0 10px 30px rgba(8, 63, 77, 0.12);
}

.compose-media-picker.has-media {
  border-color: color-mix(in srgb, var(--reef) 58%, var(--line));
}

.compose-media-picker.has-error {
  border-color: color-mix(in srgb, var(--coral) 72%, var(--line));
}

.compose-media-icon {
  position: relative;
  width: 52px;
  height: 52px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.compose-media-icon::before,
.compose-media-icon::after {
  position: absolute;
  content: "";
}

.compose-media-icon::before {
  inset: 12px;
  background: var(--deep);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2.1' viewBox='0 0 24 24'%3E%3Cpath d='M4 7.5A2.5 2.5 0 0 1 6.5 5H8l1.4-1.8h5.2L16 5h1.5A2.5 2.5 0 0 1 20 7.5v9A2.5 2.5 0 0 1 17.5 19h-11A2.5 2.5 0 0 1 4 16.5v-9Z'/%3E%3Ccircle cx='12' cy='12' r='3.5'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2.1' viewBox='0 0 24 24'%3E%3Cpath d='M4 7.5A2.5 2.5 0 0 1 6.5 5H8l1.4-1.8h5.2L16 5h1.5A2.5 2.5 0 0 1 20 7.5v9A2.5 2.5 0 0 1 17.5 19h-11A2.5 2.5 0 0 1 4 16.5v-9Z'/%3E%3Ccircle cx='12' cy='12' r='3.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.compose-media-icon::after {
  right: 7px;
  bottom: 7px;
  width: 17px;
  height: 17px;
  background: var(--reef);
  border: 2px solid var(--panel);
  border-radius: 999px;
  box-shadow: inset 0 0 0 5px var(--panel);
}

.compose-media-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.compose-media-copy strong {
  font-size: 1rem;
}

.compose-media-copy small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.3;
}

.compose-media-state {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 0 12px;
  color: var(--secondary-button-ink);
  background: var(--secondary-button-bg);
  border: 1px solid var(--secondary-button-border);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
  white-space: nowrap;
}

.media-clear-button {
  justify-self: end;
  width: auto;
  min-height: 38px;
  padding-inline: 14px;
}

.compose-media-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 8px;
}

.compose-media-preview.is-crop-editor {
  grid-template-columns: 1fr;
  gap: 12px;
}

.compose-media-preview.is-photo-editor {
  display: block;
}

.compose-photo-editor {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 10px;
  color: var(--ink);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.compose-editor-stage {
  display: grid;
  place-items: center;
  min-width: 0;
}

.compose-editor-frame {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #071114;
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(8, 31, 36, 0.2);
  cursor: grab;
  touch-action: none;
}

.compose-editor-frame:active {
  cursor: grabbing;
}

.compose-editor-frame.is-gesturing .compose-editor-grid {
  opacity: 0.58;
}

.compose-editor-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--crop-position-x, 50%) var(--crop-position-y, 50%);
  filter: var(--editor-filter, none);
  transform: scale(var(--crop-scale, 1));
  transform-origin: var(--crop-position-x, 50%) var(--crop-position-y, 50%);
  user-select: none;
  -webkit-user-drag: none;
}

.compose-editor-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 33.2%, rgba(255, 255, 255, 0.32) 33.4%, transparent 33.6%, transparent 66.4%, rgba(255, 255, 255, 0.32) 66.6%, transparent 66.8%),
    linear-gradient(180deg, transparent 33.2%, rgba(255, 255, 255, 0.32) 33.4%, transparent 33.6%, transparent 66.4%, rgba(255, 255, 255, 0.32) 66.6%, transparent 66.8%);
  opacity: 0;
  transition: opacity 160ms ease;
  pointer-events: none;
}

.compose-editor-frame:hover .compose-editor-grid,
.compose-editor-frame.is-gesturing .compose-editor-grid {
  opacity: 0.58;
}

.compose-editor-text-layer,
.post-media-text-overlay {
  position: absolute;
  left: var(--text-x, 50%);
  bottom: auto;
  top: var(--text-y, 50%);
  max-width: 84%;
  padding: 4px 8px;
  color: var(--text-color, #fff);
  background: var(--text-bg, transparent);
  border-radius: 10px;
  box-shadow: none;
  font-size: var(--text-size, 2rem);
  font-weight: 900;
  line-height: 1.05;
  text-align: var(--text-align, center);
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.56), 0 1px 2px rgba(0, 0, 0, 0.78);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.compose-editor-text-layer[contenteditable="true"] {
  z-index: 6;
  min-width: 86px;
  min-height: 1.15em;
  outline: 0;
  caret-color: #38bdf8;
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  will-change: left, top;
}

.compose-editor-text-layer.is-dragging {
  cursor: grabbing;
  user-select: none;
  -webkit-user-select: none;
}

.compose-editor-text-layer[contenteditable="true"]:empty::before {
  content: "Text";
  color: rgba(255, 255, 255, 0.78);
}

.compose-editor-text-layer.is-classic,
.post-media-text-overlay.is-classic {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
}

.compose-editor-text-layer.is-signature,
.post-media-text-overlay.is-signature {
  font-family: "Snell Roundhand", "Brush Script MT", cursive;
  font-size: calc(var(--text-size, 2rem) * 1.12);
  font-weight: 700;
}

.compose-editor-text-layer.is-editor,
.post-media-text-overlay.is-editor {
  font-family: "Courier New", monospace;
  letter-spacing: 0.04em;
}

.compose-editor-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.compose-editor-thumbs {
  display: flex;
  justify-content: safe center;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 8px 6px;
  scrollbar-width: none;
}

.compose-editor-thumbs::-webkit-scrollbar {
  display: none;
}

.compose-editor-thumb {
  width: 100%;
  height: 100%;
  flex: none;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 13px;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.compose-editor-thumb.active {
  outline-color: var(--aqua);
}

.compose-editor-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.compose-editor-thumb-wrap {
  position: relative;
  flex: 0 0 66px;
  width: 66px;
  aspect-ratio: 1;
}

.compose-editor-add-thumb {
  flex: 0 0 66px;
  width: 66px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--deep);
  background: color-mix(in srgb, var(--aqua) 18%, var(--panel));
  border: 1.5px dashed color-mix(in srgb, var(--deep) 32%, var(--line));
  border-radius: 13px;
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1;
}

.compose-editor-remove,
.compose-media-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 6;
  display: grid;
  width: 24px;
  height: 24px;
  min-height: 24px;
  place-items: center;
  padding: 0;
  color: #fff;
  background: rgba(6, 16, 19, 0.82);
  border: 2px solid var(--panel);
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(6, 16, 19, 0.24);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.compose-editor-toolbar {
  display: flex;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.compose-editor-tool {
  display: grid;
  place-items: center;
  gap: 3px;
  width: 58px;
  min-height: 56px;
  padding: 7px 6px;
  color: var(--ink);
  background: color-mix(in srgb, var(--deep) 8%, transparent);
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 0.62rem;
  font-weight: 900;
}

.compose-editor-tool.active {
  color: #061013;
  background: #9fe6e8;
  border-color: #9fe6e8;
}

.compose-editor-tool svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
}

.compose-editor-section {
  display: grid;
  gap: 10px;
  padding: 10px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.compose-editor-section[hidden],
.compose-editor-focused-panel[hidden],
.compose-editor-thumbs[hidden],
.compose-editor-toolbar[hidden],
.compose-editor-text-tray[hidden] {
  display: none;
}

.compose-editor-gesture-help {
  gap: 3px;
  min-height: 58px;
  place-content: center;
  text-align: center;
}

.compose-editor-gesture-help strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.compose-editor-gesture-help span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.compose-editor-focused-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.compose-editor-text-controls {
  display: grid;
  gap: 10px;
  justify-items: center;
  min-width: 0;
}

.compose-editor-text-tray {
  display: flex;
  justify-content: safe center;
  gap: 8px;
  width: min(100%, 520px);
  overflow-x: auto;
  padding: 2px 4px 6px;
  scrollbar-width: none;
  touch-action: pan-x;
}

.compose-editor-text-tray::-webkit-scrollbar {
  display: none;
}

.compose-editor-style-choice {
  min-width: 88px;
  height: 40px;
  padding: 0 12px;
  color: var(--ink);
  background: color-mix(in srgb, var(--deep) 8%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 900;
}

.compose-editor-style-choice.active {
  color: #fff;
  background: var(--deep);
  border-color: var(--deep);
}

.compose-editor-color-choice {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  background: var(--swatch-bg);
  border: 2px solid color-mix(in srgb, var(--panel) 70%, transparent);
  border-radius: 999px;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.compose-editor-color-choice.active {
  outline-color: var(--aqua);
}

.compose-editor-align-choice,
.compose-editor-format-bar button,
.compose-editor-done {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  color: var(--ink);
  background: color-mix(in srgb, var(--deep) 8%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.compose-editor-align-choice svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.compose-editor-align-choice.active,
.compose-editor-format-bar button.active {
  color: #fff;
  background: var(--deep);
  border-color: var(--deep);
}

.compose-editor-format-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.compose-editor-done {
  justify-self: center;
  min-width: 112px;
  color: #063a44;
  background: #dff4f3;
  border-color: rgba(159, 230, 232, 0.9);
}

.compose-editor-font-size {
  position: absolute;
  right: 11px;
  top: 50%;
  z-index: 7;
  display: flex;
  width: 36px;
  height: min(50%, 250px);
  align-items: center;
  justify-content: center;
  padding: 13px 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.34);
  border-radius: 999px;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
  touch-action: none;
}

.compose-editor-font-size input {
  width: 178px;
  accent-color: #fff;
  transform: rotate(-90deg);
  touch-action: none;
}

.compose-editor-font-size span {
  position: absolute;
  bottom: 8px;
  font-size: 0.72rem;
  font-weight: 900;
  opacity: 0.88;
}

.compose-editor-filters {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: none;
  touch-action: pan-x;
}

.compose-editor-filters::-webkit-scrollbar {
  display: none;
}

.compose-editor-filters button {
  display: grid;
  justify-items: center;
  gap: 8px;
  flex: 0 0 70px;
  width: 70px;
  padding: 7px;
  color: var(--ink);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: center;
  font-size: 0.58rem;
}

.compose-editor-filters button.active {
  border-color: #9fe6e8;
  box-shadow: inset 0 0 0 1px #9fe6e8;
}

.compose-editor-filter-preview {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
}

.compose-editor-filter-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--editor-filter, none);
}

.compose-photo-editor.is-focused-tool {
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 96%, transparent), color-mix(in srgb, var(--soft) 74%, transparent));
}

.compose-editor-frame {
  cursor: default;
}

.compose-photo-editor.is-crop-mode .compose-editor-frame {
  cursor: grab;
}

.compose-photo-editor.is-crop-mode .compose-editor-frame:active {
  cursor: grabbing;
}

.compose-photo-editor:not(.is-crop-mode) .compose-editor-frame:hover .compose-editor-grid {
  opacity: 0;
}

.compose-photo-editor.is-crop-mode .compose-editor-frame:hover .compose-editor-grid,
.compose-photo-editor.is-crop-mode .compose-editor-frame.is-gesturing .compose-editor-grid {
  opacity: 0.58;
}

.compose-editor-image {
  position: absolute;
  inset: 0;
  height: 100%;
}

.compose-photo-editor.is-text-mode .compose-editor-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(1, 8, 11, 0.18);
  pointer-events: none;
}

.compose-editor-text-layer,
.post-media-text-overlay {
  top: var(--text-y, 50%);
  bottom: auto;
  z-index: 3;
  text-align: var(--text-align, center);
  transform: translate(-50%, -50%);
}

.compose-editor-text-layer.is-modern,
.post-media-text-overlay.is-modern {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.compose-editor-text-layer[data-align="left"],
.post-media-text-overlay[data-align="left"] {
  text-align: left;
}

.compose-editor-text-layer[data-align="center"],
.post-media-text-overlay[data-align="center"] {
  text-align: center;
}

.compose-editor-text-layer[data-align="right"],
.post-media-text-overlay[data-align="right"] {
  text-align: right;
}

.compose-photo-editor.is-text-mode .compose-editor-text-layer {
  z-index: 5;
}

.post-media-text-overlay {
  max-width: 84%;
  font-size: var(--text-size, 2rem);
}

.compose-editor-thumbs {
  justify-content: safe center;
}

.compose-editor-focused-panel {
  justify-items: stretch;
}

.compose-editor-filters {
  overscroll-behavior-x: contain;
}

@media (max-width: 720px) {
  .compose-editor-frame {
    width: min(100%, 320px);
  }

  .compose-editor-panel {
    gap: 10px;
  }
}

.compose-media-thumb {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.compose-media-thumb img,
.compose-media-thumb video {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.compose-video-cover-frame {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #071114;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.compose-video-cover-frame video,
.compose-video-cover-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border: 0;
  border-radius: 0;
  background: #071114;
}

.compose-video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.compose-video-cover-edit {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  min-height: 34px;
  padding: 8px 10px;
  color: #fff;
  background: rgba(7, 17, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.compose-crop-card {
  padding: 12px;
  color: var(--ink);
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.compose-crop-frame {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #071114;
  border: 1px solid color-mix(in srgb, var(--deep) 28%, var(--line));
  border-radius: 14px;
  cursor: grab;
  touch-action: none;
}

.compose-crop-frame:active {
  cursor: grabbing;
}

.compose-crop-frame .compose-crop-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--crop-position-x, 50%) var(--crop-position-y, 50%);
  transform: scale(var(--crop-scale, 1));
  transform-origin: var(--crop-position-x, 50%) var(--crop-position-y, 50%);
  background: #071114;
  border: 0;
  border-radius: 0;
  user-select: none;
  -webkit-user-drag: none;
}

.compose-crop-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(7, 17, 20, 0.64);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

.compose-media-thumb strong,
.compose-media-thumb small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.error-text {
  color: var(--coral);
}

.video-cover-modal {
  width: min(94vw, 540px);
  max-width: calc(100vw - 28px);
}

.video-cover-modal form {
  width: 100%;
  max-height: calc(100dvh - 28px);
  overflow-x: hidden;
  overflow-y: auto;
}

.video-cover-preview {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #071114;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.video-cover-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.video-cover-preview-loader {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  padding: 9px 10px;
  color: #fff;
  background: rgba(7, 17, 20, 0.7);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
  text-align: center;
}

.video-cover-preview-loader[hidden] {
  display: none;
}

.video-cover-preview-loader.is-error {
  background: color-mix(in srgb, var(--coral) 82%, #071114);
}

.video-cover-range-label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
}

.video-cover-range-label input {
  width: 100%;
  accent-color: var(--deep);
}

.video-cover-time-row,
.video-cover-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.video-cover-time-row {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.video-cover-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.video-cover-upload {
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

body.comments-open,
body.likes-open,
body.messages-open,
body.post-options-open {
  overflow: hidden;
}

body.side-drawer-open {
  width: 100%;
  max-width: 100dvw;
  overflow: hidden;
  overflow-x: hidden;
}

body.side-drawer-open,
body.side-drawer-open main,
body.side-drawer-open .app-shell {
  max-inline-size: 100dvw;
  overflow-x: hidden;
}

body.comments-open .main,
body.likes-open .main,
body.messages-open .main,
body.post-options-open .main,
body.side-drawer-open .main {
  overflow: hidden;
}

.comments-sheet[hidden],
.likes-sheet[hidden],
.messages-sheet[hidden],
.post-options-sheet[hidden] {
  display: none;
}

.comments-sheet,
.likes-sheet,
.messages-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: end;
}

.side-drawer[hidden] {
  display: none;
}

.side-drawer {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  justify-items: end;
  width: 100dvw;
  max-width: 100dvw;
  overflow-x: clip;
  overflow-y: hidden;
  contain: inline-size;
}

.side-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 12, 16, 0.55);
  border: 0;
  opacity: 0;
  transition: opacity 200ms ease;
}

.side-drawer.is-open .side-drawer-backdrop {
  opacity: 1;
}

.side-drawer-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(360px, calc(100dvw - 16px));
  inline-size: min(360px, calc(100dvw - 16px));
  max-width: calc(100dvw - 16px);
  max-inline-size: calc(100dvw - 16px);
  height: 100dvh;
  min-width: 0;
  min-inline-size: 0;
  padding: calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));
  color: var(--ink);
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 44px rgba(7, 17, 20, 0.28);
  overflow-x: hidden;
  transform: translateX(100%);
  transition: transform 220ms ease;
}

html[data-android-shell="true"] .side-drawer-panel,
html[data-native-app="android"] .side-drawer-panel {
  padding-top: calc(12px + var(--app-safe-top, 28px));
  padding-bottom: calc(12px + var(--android-control-safe-bottom, 0px));
}

.side-drawer-panel * {
  min-width: 0;
}

.side-drawer.is-open .side-drawer-panel {
  transform: translateX(0);
}

.side-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 2px 0 14px;
  border-bottom: 1px solid var(--line);
}

.side-drawer-identity {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.side-drawer-avatar {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 50%;
}

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

.side-drawer-header h2 {
  overflow: hidden;
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-drawer-header span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-drawer-content {
  display: grid;
  align-content: start;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  min-width: 0;
  padding-top: 10px;
  overflow-x: hidden;
  overflow-y: hidden;
}

.shortcut-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  padding: 0 2px 2px;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.shortcut-tab {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 50px;
  padding: 5px 2px 4px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.shortcut-tab:hover,
.shortcut-tab:focus-visible {
  color: var(--deep);
  background: rgba(15, 143, 139, 0.08);
  outline: 0;
}

.shortcut-tab.active {
  color: var(--deep);
  background: transparent;
  box-shadow: none;
}

.shortcut-tab-icon {
  position: relative;
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(221, 246, 246, 0.92));
  border: 1px solid rgba(8, 63, 77, 0.1);
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(8, 63, 77, 0.12);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.shortcut-tab-emoji {
  display: block;
  font-size: 1.08rem;
  line-height: 1;
  transform: translateY(1px);
  filter: saturate(1.12) drop-shadow(0 2px 2px rgba(8, 63, 77, 0.12));
}

.shortcut-tab.is-account .shortcut-tab-icon {
  background: linear-gradient(145deg, #eef8ff, #dff1ff);
}

.shortcut-tab.is-alerts .shortcut-tab-icon {
  background: linear-gradient(145deg, #fff7d7, #ffe7a3);
}

.shortcut-tab.is-promos .shortcut-tab-icon {
  background: linear-gradient(145deg, #ffece6, #ffd4c3);
}

.shortcut-tab.is-top .shortcut-tab-icon {
  background: linear-gradient(145deg, #fff4bf, #f7d773);
}

.shortcut-tab.active .shortcut-tab-icon {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 8px 18px rgba(8, 63, 77, 0.16);
}

.shortcut-tab-icon em {
  position: absolute;
  top: -4px;
  right: -7px;
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  color: #fff;
  background: var(--coral);
  border: 2px solid var(--panel);
  border-radius: 999px;
  font-size: 0.64rem;
  font-style: normal;
  line-height: 1;
}

.shortcut-panel {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 2px;
  overscroll-behavior: contain;
}

.shortcut-panel-note {
  margin: -4px 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.side-drawer .login-card,
.side-drawer .leaderboard {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.side-drawer .account-login-card {
  min-height: 0;
  gap: 8px;
  overflow: hidden;
}

.side-drawer .account-login-card h2 {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.08;
}

.side-drawer .account-login-card > p {
  font-size: 0.72rem;
  line-height: 1.28;
}

.side-drawer .account-login-card .login-action-grid,
.side-drawer .account-login-card .social-login-grid {
  position: relative;
  z-index: 1;
  gap: 8px;
}

.side-drawer .account-login-card :is(.primary-button, .secondary-button, .social-button) {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 16px;
  font-size: 0.82rem;
  line-height: 1.12;
}

.side-drawer .location-picker-block,
.side-drawer .location-picker-list,
.side-drawer .location-picker-row,
.side-drawer .profile-settings-form,
.side-drawer .profile-settings-section {
  inline-size: 100%;
  min-width: 0;
  min-inline-size: 0;
  max-width: 100%;
  max-inline-size: 100%;
  overflow-x: clip;
}

.side-drawer .location-picker-row {
  grid-template-columns: 1fr;
  overflow: visible;
}

.side-drawer .location-default-choice {
  display: grid;
  justify-self: stretch;
  width: 100%;
  inline-size: 100%;
}

.side-drawer .account-login-card .google::before {
  width: 20px;
  height: 20px;
  font-size: 0.72rem;
}

.side-drawer .notification-card,
.side-drawer .announcement-card,
.side-drawer .leaderboard {
  overflow: hidden;
}

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

.drawer-section-head h2 {
  margin: 0;
}

.notification-count {
  display: inline-flex;
  min-width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--coral);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.notification-list,
.announcement-list {
  display: grid;
  gap: 8px;
}

.notification-list > p,
.announcement-list > p,
.leaderboard > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.32;
}

.notification-list {
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.side-drawer .notification-list {
  max-height: calc(100dvh - 250px);
}

.notification-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.notification-filter {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.notification-filter button,
.notification-mark-read {
  border: 0;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.notification-filter button {
  min-width: 64px;
  padding: 7px 9px;
  color: var(--muted);
  background: transparent;
}

.notification-filter button.active {
  color: #03121a;
  background: var(--blue);
}

.notification-mark-read {
  padding: 8px 10px;
  color: var(--aqua);
  background: rgba(36, 213, 242, 0.1);
  border: 1px solid rgba(36, 213, 242, 0.22);
}

.notification-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  width: 100%;
  padding: 10px;
  color: var(--ink);
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.notification-row.is-unread {
  border-color: rgba(15, 143, 139, 0.32);
  box-shadow: inset 3px 0 0 var(--aqua);
}

.notification-row-content {
  display: grid;
  gap: 4px;
}

.notification-type-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--aqua);
  background: rgba(36, 213, 242, 0.12);
  border: 1px solid rgba(36, 213, 242, 0.22);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.notification-type-pill.is-badge,
.notification-type-pill.is-certification {
  color: #ffe27a;
  background: rgba(255, 205, 84, 0.12);
  border-color: rgba(255, 205, 84, 0.28);
}

.notification-type-pill.is-system,
.notification-type-pill.is-dive_spot_approval {
  color: #55ffbd;
  background: rgba(85, 255, 189, 0.1);
  border-color: rgba(85, 255, 189, 0.24);
}

.notification-row strong,
.announcement-row strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.92rem;
  line-height: 1.18;
}

.notification-row small,
.notification-row time,
.announcement-row p {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
}

.announcement-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.announcement-row:not(:has(img)) {
  grid-template-columns: 1fr;
}

.announcement-row img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
}

.side-drawer .primary-button,
.side-drawer .secondary-button,
.side-drawer .social-button {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  white-space: normal;
}

.compact-modal-panel {
  width: min(520px, calc(100vw - 28px));
  gap: 12px;
}

#locationAccountModal {
  width: min(92vw, 560px);
  max-width: calc(100vw - 28px);
}

#locationAccountModal .account-location-dialog {
  width: 100%;
  max-width: 100%;
}

#publicAccountProfileModal {
  width: min(94vw, 720px);
  max-width: calc(100vw - 24px);
}

.public-profile-panel {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: calc(100dvh - 28px);
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.public-profile-panel > .close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
}

.public-profile-cover {
  height: 190px;
  background: linear-gradient(135deg, rgba(15, 143, 139, 0.16), rgba(239, 112, 92, 0.1));
}

.public-profile-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-profile-body {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.public-profile-body.is-pending-profile .public-profile-avatar {
  filter: grayscale(0.4);
}

.public-profile-head {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  align-items: end;
}

.public-profile-avatar {
  width: 108px;
  height: 108px;
  margin-top: -42px;
  object-fit: cover;
  border: 5px solid var(--panel);
  border-radius: 50%;
  box-shadow: 0 18px 34px rgba(8, 63, 77, 0.16);
}

.public-profile-identity {
  min-width: 0;
  padding-top: 12px;
}

.public-profile-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.public-profile-title-row h2 {
  min-width: 0;
  margin: 0;
  font-size: clamp(1.45rem, 5vw, 2.2rem);
  line-height: 1.04;
}

.public-profile-identity p,
.public-profile-bio {
  margin: 4px 0 0;
  color: var(--muted);
}

.public-profile-bio {
  color: var(--ink);
  line-height: 1.45;
}

.public-profile-intro-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
}

.public-profile-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.public-profile-actions:empty {
  display: none;
}

.public-profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.public-profile-actions .primary-button,
.public-profile-actions .secondary-button {
  width: auto;
  min-width: 184px;
  min-height: 44px;
}

.public-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.public-profile-stats.is-two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.public-profile-stats div {
  display: grid;
  gap: 2px;
  place-items: center;
  padding: 8px 6px;
  background: var(--soft);
}

.public-profile-stats div + div {
  border-left: 1px solid var(--line);
}

.public-profile-stats strong {
  color: var(--deep);
  font-size: 1rem;
  line-height: 1;
}

.public-profile-stats span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.08;
}

.public-profile-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.public-profile-tabs.is-two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.public-profile-tabs button {
  min-height: 34px;
  padding: 7px 5px;
  color: var(--muted);
  background: var(--panel);
  border: 0;
  border-radius: 0;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.05;
}

.public-profile-tabs button + button {
  border-left: 1px solid var(--line);
}

.public-profile-tabs button.active {
  color: var(--deep);
  background: var(--soft);
}

.public-profile-tab-panel {
  min-width: 0;
}

.public-profile-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.public-profile-post {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--soft);
}

.public-profile-post img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-profile-post span {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 28px;
  padding: 3px 7px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.public-profile-list,
.public-profile-badge-list {
  display: grid;
  gap: 8px;
}

.public-profile-location,
.public-profile-badge-card,
.public-profile-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.public-profile-location span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.public-profile-location strong,
.is-pending-text {
  color: var(--deep);
}

.public-profile-location strong.is-pending-text {
  color: var(--coral);
}

.public-profile-badge-card {
  justify-content: flex-start;
  font-weight: 900;
}

.public-profile-empty {
  justify-content: flex-start;
  color: var(--muted);
  font-weight: 800;
}

#notificationModal,
#feedbackModal {
  width: min(94vw, 560px);
  max-width: calc(100vw - 28px);
  overflow-x: hidden;
}

#notificationModal .compact-modal-panel,
#feedbackModal .compact-modal-panel {
  width: 100%;
  max-width: 100%;
  max-height: calc(100dvh - 32px);
  overflow-x: hidden;
  overflow-y: auto;
}

#notificationModal *,
#feedbackModal * {
  min-width: 0;
}

#notificationBody {
  overflow-wrap: anywhere;
}

#feedbackForm input,
#feedbackForm select,
#feedbackForm textarea {
  width: 100%;
  max-width: 100%;
}

.compact-modal-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.notification-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.device-alerts-prompt {
  text-align: left;
}

.device-alerts-prompt p {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.device-alerts-prompt .notification-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 420px) {
  .device-alerts-prompt .notification-detail-actions {
    grid-template-columns: 1fr;
  }
}

.support-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-color: rgba(15, 143, 139, 0.22);
  background: linear-gradient(180deg, var(--panel), var(--subpanel-strong));
}

.support-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.18;
}

.support-card h2 {
  margin: 0 0 2px;
  overflow-wrap: anywhere;
  font-size: 0.92rem;
  line-height: 1.05;
}

.support-card-copy {
  min-width: 0;
}

.side-drawer .support-card {
  gap: 6px;
  padding: 8px;
}

.side-drawer .support-card h2 {
  margin-bottom: 1px;
  font-size: 0.82rem;
  line-height: 1.05;
}

.side-drawer .support-card p {
  font-size: 0.68rem;
  line-height: 1.16;
}

.legal-settings-card {
  gap: 10px;
  padding: 10px;
  border-color: rgba(15, 143, 139, 0.18);
}

.side-drawer .legal-settings-card {
  gap: 8px;
  padding: 8px;
}

.legal-settings-copy {
  display: grid;
  gap: 3px;
}

.side-drawer .legal-settings-copy {
  gap: 2px;
}

.legal-settings-card h2,
.legal-settings-card p {
  margin: 0;
}

.legal-settings-card h2 {
  font-size: 0.92rem;
  line-height: 1.05;
}

.side-drawer .legal-settings-card h2 {
  font-size: 0.82rem;
  line-height: 1.05;
}

.legal-settings-card p {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.25;
}

.side-drawer .legal-settings-card p {
  font-size: 0.68rem;
  line-height: 1.18;
}

.legal-settings-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.legal-settings-links a {
  color: var(--deep);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.side-drawer .legal-settings-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 10px;
}

.side-drawer .legal-settings-links a {
  font-size: 0.7rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.compact-support-button {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.78rem;
}

.push-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(15, 143, 139, 0.18);
  border-radius: 8px;
  background: var(--panel);
}

.push-control h2 {
  margin: 0 0 2px;
  font-size: 0.92rem;
  line-height: 1.05;
}

.push-control p {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.18;
}

.push-control.is-enabled {
  border-color: rgba(15, 143, 139, 0.34);
  background: linear-gradient(180deg, var(--panel), var(--subpanel-strong));
}

.push-toggle {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 8px;
  min-width: 88px;
  cursor: pointer;
  user-select: none;
}

.push-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.push-toggle-track {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #d8e4e6;
  box-shadow: inset 0 0 0 1px rgba(8, 63, 77, 0.12);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.push-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(8, 63, 77, 0.22);
  transition: transform 180ms ease;
}

.push-toggle input:checked + .push-toggle-track {
  background: var(--teal);
  box-shadow: inset 0 0 0 1px rgba(8, 63, 77, 0.08), 0 8px 18px rgba(15, 143, 139, 0.18);
}

.push-toggle input:checked + .push-toggle-track .push-toggle-thumb {
  transform: translateX(20px);
}

.push-toggle-label {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.push-toggle.is-disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.theme-control {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(15, 143, 139, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--panel), var(--subpanel-strong));
}

.theme-control h2 {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.05;
}

.theme-choice-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.theme-choice {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 64px;
  padding: 8px 6px;
  color: var(--deep);
  background: var(--secondary-button-bg);
  border: 1px solid var(--secondary-button-border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.05;
}

.theme-choice.active {
  color: var(--primary-button-ink);
  background: var(--primary-button-bg);
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(15, 143, 139, 0.18);
}

.theme-choice-icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.theme-choice.is-auto .theme-choice-icon {
  color: #14b8a6;
}

.theme-choice.is-light .theme-choice-icon {
  color: #f6b63f;
}

.theme-choice.is-dark .theme-choice-icon {
  color: #60a5fa;
}

body[data-theme="dark"] :is(.side-drawer-panel, .shortcut-panel, .account-session-card, .support-card, .legal-settings-card, .push-control, .theme-control),
body[data-theme="dark"] :is(.side-drawer-header h2, .account-card-head h2, .account-user-line, .support-card h2, .legal-settings-card h2, .push-control h2, .theme-control h2, .theme-choice, .shortcut-version) {
  color: var(--ink);
}

body[data-theme="dark"] :is(.side-drawer-header span, .account-user-line, .support-card p, .legal-settings-card p, .push-control p, .shortcut-panel-note, .shortcut-version) {
  color: var(--muted);
}

body[data-theme="dark"] :is(.account-session-card, .support-card, .legal-settings-card, .push-control, .theme-control) {
  background: var(--panel);
  border-color: var(--line);
}

body[data-theme="dark"] .shortcut-tab {
  color: var(--muted);
}

body[data-theme="dark"] .shortcut-tab.active {
  color: var(--deep);
}

body[data-theme="dark"] .account-card-head span {
  color: var(--deep);
  background: rgba(142, 223, 224, 0.1);
  border-color: rgba(142, 223, 224, 0.26);
}

body[data-theme="dark"] .theme-choice {
  color: var(--ink);
  background: var(--subpanel);
  border-color: var(--line);
}

body[data-theme="dark"] .theme-choice.active {
  color: var(--primary-button-ink);
  background: var(--primary-button-bg);
  border-color: transparent;
}

body[data-theme="dark"] .push-toggle-track {
  background: var(--subpanel-strong);
  box-shadow: inset 0 0 0 1px var(--line);
}

@media (prefers-color-scheme: dark) {
  body[data-theme="auto"] :is(.side-drawer-panel, .shortcut-panel, .account-session-card, .support-card, .legal-settings-card, .push-control, .theme-control),
  body[data-theme="auto"] :is(.side-drawer-header h2, .account-card-head h2, .account-user-line, .support-card h2, .legal-settings-card h2, .push-control h2, .theme-control h2, .theme-choice, .shortcut-version) {
    color: var(--ink);
  }

  body[data-theme="auto"] :is(.side-drawer-header span, .account-user-line, .support-card p, .legal-settings-card p, .push-control p, .shortcut-panel-note, .shortcut-version) {
    color: var(--muted);
  }

  body[data-theme="auto"] :is(.account-session-card, .support-card, .legal-settings-card, .push-control, .theme-control) {
    background: var(--panel);
    border-color: var(--line);
  }

  body[data-theme="auto"] .shortcut-tab {
    color: var(--muted);
  }

  body[data-theme="auto"] .shortcut-tab.active {
    color: var(--deep);
  }

  body[data-theme="auto"] .account-card-head span {
    color: var(--deep);
    background: rgba(142, 223, 224, 0.1);
    border-color: rgba(142, 223, 224, 0.26);
  }

  body[data-theme="auto"] .theme-choice {
    color: var(--ink);
    background: var(--subpanel);
    border-color: var(--line);
  }

  body[data-theme="auto"] .theme-choice.active {
    color: var(--primary-button-ink);
    background: var(--primary-button-bg);
    border-color: transparent;
  }

  body[data-theme="auto"] .push-toggle-track {
    background: var(--subpanel-strong);
    box-shadow: inset 0 0 0 1px var(--line);
  }
}

.report-modal {
  width: min(94vw, 540px);
}

.report-form {
  gap: 14px;
}

.report-copy {
  color: var(--muted);
  line-height: 1.35;
}

.destructive-form {
  gap: 14px;
}

.destructive-copy {
  color: var(--muted);
  line-height: 1.4;
}

.danger-button {
  background: #b4233a;
  color: #fff;
}

.blocked-users-panel {
  gap: 14px;
}

.blocked-users-select-all,
.blocked-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.blocked-users-select-all {
  color: var(--text);
  font-weight: 900;
}

.blocked-users-list {
  display: grid;
  gap: 8px;
  max-height: min(42vh, 360px);
  overflow: auto;
  padding-right: 2px;
}

.blocked-user-row {
  padding: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
}

.blocked-user-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.blocked-user-row strong,
.blocked-user-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blocked-user-row small,
.blocked-users-empty {
  color: var(--muted);
  font-weight: 800;
}

.report-form select,
.report-form textarea {
  width: 100%;
  color: var(--ink);
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.report-form select {
  min-height: 46px;
  padding: 0 12px;
}

.report-form textarea {
  min-height: 118px;
  padding: 12px;
  resize: vertical;
}

.report-form select:focus,
.report-form textarea:focus {
  outline: 0;
  border-color: var(--reef);
  box-shadow: 0 0 0 2px rgba(20, 184, 190, 0.18);
}

.report-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.report-block-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(8, 63, 77, 0.12);
  border-radius: 8px;
  background: rgba(8, 63, 77, 0.04);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.report-block-option input {
  margin-top: 2px;
  flex: 0 0 auto;
}

.post-safety-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.block-button,
.danger-inline-button,
.clear-blocked-users-button {
  color: #8b1e2f;
}

.side-drawer .leader-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  width: 100%;
  min-width: 0;
}

.side-drawer .leader-row strong,
.side-drawer .leader-row > div > span {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  white-space: normal;
}

.side-drawer .leader-row > div > span {
  display: block;
  line-height: 1.25;
}

@media (max-width: 520px) {
  .side-drawer-panel {
    width: 100dvw;
    max-width: 100dvw;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
    border-left: 0;
  }

  .login-action-grid,
  .social-login-grid {
    grid-template-columns: 1fr;
  }
}

.comments-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 12, 16, 0.55);
  border: 0;
}

.likes-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  border: 0;
}

.likes-panel {
  --likes-panel-top-gap: max(18px, calc(var(--app-safe-top, env(safe-area-inset-top, 0px)) + 12px));
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  width: min(680px, 100%);
  height: min(calc(var(--app-viewport-height, 100dvh) - var(--likes-panel-top-gap)), 780px);
  max-height: min(calc(var(--app-viewport-height, 100dvh) - var(--likes-panel-top-gap)), 780px);
  margin: 0 auto;
  color: #f5f5f5;
  background: #111418;
  border: 1px solid #2f3336;
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -18px 44px rgba(0, 0, 0, 0.36);
  overflow: hidden;
}

.likes-grabber {
  justify-self: center;
  width: 74px;
  height: 5px;
  margin: 12px 0 8px;
  background: #a8a8a8;
  border-radius: 999px;
  opacity: 0.72;
}

.likes-header {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 50px;
  padding: 0 52px;
  text-align: center;
  border-bottom: 1px solid #2f3336;
}

.likes-header.has-note {
  padding-block: 10px;
}

.likes-header h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.1;
}

.likes-header .close-button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #f5f5f5;
  background: transparent;
}

.likes-note {
  margin: 3px 0 0;
  color: #a8a8a8;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
}

.likes-note[hidden] {
  display: none;
}

.likes-search {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 12px 16px;
  padding: 0 14px;
  color: #a8a8a8;
  background: #262b31;
  border-radius: 12px;
}

.likes-search .post-action-icon {
  width: 20px;
  height: 20px;
}

.likes-search input {
  min-width: 0;
  height: 40px;
  padding: 0;
  color: #f5f5f5;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font: inherit;
  font-size: 1rem;
}

.likes-search input::placeholder {
  color: #a8a8a8;
}

.likes-search input:focus {
  outline: 0;
}

.likes-list {
  display: grid;
  align-content: start;
  gap: 2px;
  min-height: 0;
  padding: 0 16px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.likes-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
}

.likes-user-identity {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 12px;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.likes-user-avatar {
  width: 50px;
  height: 50px;
  object-fit: cover;
  background: #262b31;
  border-radius: 50%;
}

.likes-user-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.likes-user-copy strong,
.likes-user-copy span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.likes-user-copy strong {
  color: #f5f5f5;
  font-size: 0.94rem;
}

.likes-user-copy span {
  color: #a8a8a8;
  font-size: 0.9rem;
}

.likes-view-profile-button {
  min-width: 112px;
  min-height: 42px;
  padding: 0 14px;
  color: #f5f5f5;
  background: #2f353d;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 900;
}

.likes-view-profile-button:hover,
.likes-user-identity:hover .likes-user-copy strong {
  color: #8edfe0;
}

.likes-empty {
  align-self: center;
  justify-self: center;
  margin: 28px 0;
  color: #a8a8a8;
  font-weight: 800;
}

.comments-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(680px, 100%);
  max-height: min(82dvh, 780px);
  margin: 0 auto;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -18px 44px rgba(7, 17, 20, 0.28);
  overflow: hidden;
}

.comments-grabber {
  justify-self: center;
  width: 74px;
  height: 5px;
  margin: 12px 0 8px;
  background: var(--muted);
  border-radius: 999px;
  opacity: 0.65;
}

.comments-header {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 52px;
  border-bottom: 1px solid var(--line);
}

.comments-header h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.1;
}

.comments-header .close-button {
  position: absolute;
  right: 12px;
  top: 14px;
}

.comments-list {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 0;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.comment {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.comment-avatar {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--subpanel);
}

.comment-main {
  min-width: 0;
}

.comment-bubble {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.comment-author {
  display: inline;
  margin-right: 6px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
}

.comment-text {
  display: inline;
  color: var(--ink);
  line-height: 1.38;
}

.comment-reply-mention {
  margin-right: 5px;
  color: #3d66c2;
  font-weight: 800;
}

.comment-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.comment-time {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.comment-action {
  min-height: 24px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
}

.comment-action.is-loved {
  color: #e04462;
}

.comment-action-admin {
  color: #b3483f;
}

.comment-action-admin:hover,
.comment-action-admin:focus-visible {
  color: var(--coral);
}

.comment-reply-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
}

.comment-reply-toggle span {
  display: block;
  width: 34px;
  height: 1px;
  background: var(--line);
}

.comment-replies {
  display: grid;
  gap: 16px;
  margin-top: 12px;
  padding-left: 22px;
}

.comment--reply {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
}

.comment--reply .comment-avatar {
  width: 28px;
  height: 28px;
}

.comment--reply .comment-author,
.comment--reply .comment-text {
  font-size: 0.9rem;
}

.comment-empty {
  align-self: center;
  justify-self: center;
  color: var(--muted);
  font-weight: 800;
}

.comments-composer {
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: var(--panel);
  border-top: 1px solid var(--line);
}

html[data-android-shell="true"] .comments-composer,
html[data-native-app="android"] .comments-composer {
  padding-bottom: calc(10px + var(--android-control-safe-bottom, 0px));
}

html.android-keyboard-open body.comments-open .comments-panel {
  max-height: min(calc(100dvh - var(--android-keyboard-space, 320px) - 12px), 780px);
  transform: translateY(calc(0px - var(--android-keyboard-space, 320px)));
}

html.android-keyboard-open body.comments-open .comments-list {
  scroll-padding-bottom: calc(var(--android-keyboard-space, 320px) + var(--android-control-safe-bottom, 0px) + 96px);
}

html.android-keyboard-open body.comments-open .comments-composer {
  position: sticky;
  bottom: 0;
  z-index: 2;
}

html.ios-keyboard-open body.comments-open #commentsSheet {
  top: var(--app-viewport-offset-top, 0px);
  bottom: auto;
  height: var(--ios-message-viewport-height, var(--app-viewport-height, 100dvh));
}

html.ios-keyboard-open body.comments-open #commentsSheet .comments-panel {
  max-height: min(calc(var(--ios-message-viewport-height, var(--app-viewport-height, 100dvh)) - 8px), 780px);
}

html.ios-keyboard-open body.comments-open #commentsSheet .comments-list {
  scroll-padding-bottom: calc(96px + var(--app-safe-bottom, env(safe-area-inset-bottom, 0px)));
}

html.ios-keyboard-open body.comments-open #commentsSheet .comments-composer {
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.replying-to {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.replying-to strong {
  color: var(--ink);
}

.comment-form {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: var(--panel);
}

.comment-form.is-reply {
  padding: 0;
}

.comment-form input {
  min-width: 0;
  height: 42px;
  padding: 0 16px;
  color: var(--ink);
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
}

.comment-form input:focus {
  outline: 0;
  border-color: var(--reef);
  box-shadow: 0 0 0 2px rgba(20, 184, 190, 0.18);
}

.comment-composer-avatar {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--subpanel);
}

.comment-submit {
  min-height: 42px;
  padding: 0 12px;
  color: var(--deep);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
}

.comment-submit:hover {
  background: var(--subpanel);
}

.messages-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 12, 16, 0.55);
  border: 0;
}

.messages-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(760px, 100%);
  max-height: min(86dvh, 820px);
  margin: 0 auto;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -18px 44px rgba(7, 17, 20, 0.28);
  overflow: hidden;
}

.messages-header {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 14px 12px;
  border-bottom: 1px solid var(--line);
}

.messages-header h2,
.messages-header p {
  margin: 0;
  text-align: center;
}

.messages-header h2 {
  font-size: 1rem;
  line-height: 1.1;
}

.messages-header p {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-back-button {
  justify-self: start;
  min-height: 36px;
  padding: 0 12px;
  color: var(--deep);
  background: var(--secondary-button-bg);
  border: 1px solid var(--secondary-button-border);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
}

.messages-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.message-thread-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  width: 100%;
  align-items: center;
  padding: 14px 16px;
  color: var(--ink);
  text-align: left;
  background: var(--panel);
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.message-thread-row.is-unread {
  background: var(--subpanel-strong);
}

.message-thread-row img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--subpanel);
}

.message-thread-row span {
  min-width: 0;
}

.message-thread-row strong,
.message-thread-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-thread-row strong {
  font-size: 0.96rem;
}

.message-thread-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.message-thread-row em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.message-thread-row.is-unread em {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  color: #ffffff;
  background: #e04462;
  border-radius: 999px;
}

.message-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 44px 22px;
  color: var(--muted);
  text-align: center;
}

.message-empty strong {
  color: var(--ink);
  font-size: 1rem;
}

.message-empty p {
  max-width: 340px;
  margin: 0;
}

.message-conversation {
  display: grid;
  align-content: end;
  gap: 10px;
  min-height: min(54dvh, 520px);
  max-height: min(62dvh, 580px);
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.chat-time-divider {
  justify-self: center;
  margin: 8px 0 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.message-bubble-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: end;
}

.message-bubble-row.is-own {
  grid-template-columns: minmax(0, 1fr);
}

.message-bubble-row img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--subpanel);
}

.message-bubble {
  justify-self: start;
  max-width: min(76%, 420px);
  padding: 10px 12px;
  color: var(--ink);
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 6px;
}

.message-bubble-row.is-own .message-bubble {
  justify-self: end;
  color: var(--primary-button-ink);
  background: var(--primary-button-bg);
  border-color: transparent;
  border-radius: 18px 18px 6px 18px;
}

.message-bubble p {
  margin: 0;
  overflow-wrap: anywhere;
}

.message-bubble-row.has-media .message-bubble {
  width: fit-content;
  max-width: min(72vw, 420px);
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.message-bubble-row.has-media .message-bubble p {
  width: fit-content;
  max-width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.message-bubble-row.has-media.is-own .message-bubble p {
  justify-self: end;
  color: var(--primary-button-ink);
  background: var(--primary-button-bg);
  border-color: transparent;
}

.message-image-button {
  display: block;
  width: min(220px, 100%);
  padding: 0;
  margin: 0 0 8px;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
}

.message-bubble-row.has-media .message-image-button {
  width: fit-content;
  max-width: min(72vw, 420px);
  margin: 0;
  background: transparent;
  border-radius: 18px;
}

.message-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: cover;
}

.message-bubble-row .message-image {
  width: 100%;
  height: auto;
  border-radius: 0;
}

.message-bubble-row.has-media .message-image {
  width: auto;
  max-width: min(72vw, 420px);
  max-height: min(58dvh, 520px);
  object-fit: contain;
}

.message-bubble-row.has-media .message-bubble time {
  width: fit-content;
  margin-top: 5px;
  color: var(--muted);
}

.message-bubble-row.has-media.is-own .message-bubble time {
  justify-self: end;
}

.message-bubble time {
  display: block;
  margin-top: 5px;
  color: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  opacity: 0.68;
}

.message-composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: var(--panel);
  border-top: 1px solid var(--line);
}

.message-attachment-preview {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  color: var(--ink);
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.message-attachment-preview img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
}

.message-attachment-preview span {
  display: grid;
  min-width: 0;
}

.message-attachment-preview strong,
.message-attachment-preview em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-attachment-preview em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 800;
}

.message-attachment-preview button,
.message-attach-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  font-weight: 900;
}

.message-attach-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.message-attach-icon {
  display: block;
  width: 22px;
  height: 22px;
  background: currentColor;
  mask: var(--icon-image) center / contain no-repeat;
  -webkit-mask: var(--icon-image) center / contain no-repeat;
}

.message-image-viewer {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  padding: max(18px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  color: #ffffff;
  background: rgba(0, 0, 0, 0.96);
  border: 0;
  border-radius: 0;
  overflow: hidden;
}

.message-image-viewer::backdrop {
  background: rgba(0, 0, 0, 0.92);
}

.message-image-viewer[open] {
  display: grid;
  place-items: center;
}

.message-image-viewer img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 92px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  object-fit: contain;
  border-radius: 14px;
}

.message-image-viewer-close {
  position: fixed;
  z-index: 2;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

.message-composer input {
  min-width: 0;
  height: 44px;
  padding: 0 16px;
  color: var(--ink);
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
}

.message-composer input:focus {
  outline: 0;
  border-color: var(--reef);
  box-shadow: 0 0 0 2px rgba(20, 184, 190, 0.18);
}

.account-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.modal-panel h3 {
  margin: 4px 0 0;
}

.compact-auth-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.resend-verification-form {
  grid-template-columns: 1fr;
}

.resend-verification-button {
  width: 100%;
}

.modal h2,
.modal h3,
.modal p {
  margin: 0;
}

.install-modal form {
  text-align: center;
}

.install-logo {
  justify-self: center;
  width: 92px;
  height: 92px;
  object-fit: contain;
  background: #f4fafa;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.install-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  text-align: left;
  list-style: none;
}

.install-device-note {
  padding: 10px 12px;
  color: var(--secondary-button-ink);
  background: var(--secondary-button-bg);
  border: 1px solid var(--secondary-button-border);
  border-radius: var(--radius);
  font-weight: 700;
}

.install-video-panel {
  overflow: hidden;
  width: min(100%, 340px);
  justify-self: center;
  background: var(--subpanel-strong);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.install-video-panel[hidden] {
  display: none;
}

.install-guide-video {
  display: block;
  width: 100%;
  max-height: min(58vh, 520px);
  background: #0b1b20;
  object-fit: contain;
}

.install-steps li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  color: var(--ink);
  background: var(--subpanel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.install-steps strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-weight: 800;
}

.install-steps p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.28;
}

.install-step-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--deep);
  background: var(--secondary-button-bg);
  border: 1px solid var(--secondary-button-border);
  border-radius: 50%;
}

.install-step-icon::before {
  display: block;
  width: 23px;
  height: 23px;
  background: currentColor;
  content: "";
}

.install-step-icon.is-safari::before {
  border: 3px solid currentColor;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 7px 7px 0 -5px currentColor;
}

.install-step-icon.is-chrome::before {
  border: 4px solid currentColor;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 0 5px var(--secondary-button-bg);
}

.install-step-icon.is-share::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2.4' viewBox='0 0 24 24'%3E%3Cpath d='M12 15V3'/%3E%3Cpath d='m7 8 5-5 5 5'/%3E%3Cpath d='M5 11v9h14v-9'/%3E%3C/svg%3E") center / contain no-repeat;
}

.install-step-icon.is-menu::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='5' r='2'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Ccircle cx='12' cy='19' r='2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.install-step-icon.is-add::before {
  mask: var(--icon-plus) center / contain no-repeat;
}

.install-step-icon.is-done::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2.8' viewBox='0 0 24 24'%3E%3Cpath d='m4 12 5 5L20 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.android-app-prompt {
  position: fixed;
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  left: max(12px, env(safe-area-inset-left, 0px));
  z-index: 56;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 34px;
  gap: 12px;
  align-items: center;
  width: min(calc(100vw - 24px), 680px);
  margin: 0 auto;
  padding: 12px;
  color: #f5f5f5;
  background: #121212;
  border: 1px solid #2f3336;
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
}

.android-app-prompt[hidden] {
  display: none;
}

.android-app-prompt-mark {
  width: 48px;
  height: 48px;
  object-fit: cover;
  background: #1c1c1e;
  border: 1px solid #2f3336;
  border-radius: 13px;
}

.android-app-prompt-copy {
  min-width: 0;
}

.android-app-prompt-copy strong {
  display: block;
  overflow: hidden;
  color: #f5f5f5;
  font-size: 0.98rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.android-app-prompt-copy p {
  margin: 3px 0 0;
  color: #a8a8a8;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.28;
}

.android-app-prompt-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.android-app-prompt-actions button,
.android-app-prompt-close {
  min-height: 34px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
}

.android-app-prompt-open {
  padding: 0 14px;
  color: #ffffff;
  background: linear-gradient(180deg, #10a2ff, #047af0);
  border: 0;
}

.android-app-prompt-store {
  padding: 0 12px;
  color: #f5f5f5;
  background: #1c1c1e;
  border: 1px solid #2f3336;
}

.android-app-prompt-close {
  display: grid;
  width: 34px;
  padding: 0;
  place-items: center;
  color: #a8a8a8;
  background: #1c1c1e;
  border: 1px solid #2f3336;
}

.android-app-prompt-open:hover,
.android-app-prompt-open:focus-visible {
  box-shadow: 0 0 0 4px rgba(16, 162, 255, 0.2);
}

.android-app-prompt-store:hover,
.android-app-prompt-store:focus-visible,
.android-app-prompt-close:hover,
.android-app-prompt-close:focus-visible {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
}

@media (max-width: 560px) {
  .android-app-prompt {
    bottom: calc(var(--v2-nav-height) + 14px + env(safe-area-inset-bottom, 0px));
    grid-template-columns: 42px minmax(0, 1fr) 34px;
    gap: 10px;
    padding: 10px;
    border-radius: 16px;
  }

  .android-app-prompt-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .android-app-prompt-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .android-app-prompt-actions button {
    width: 100%;
  }
}

.tour-modal form {
  gap: 14px;
}

.tour-modal h2 {
  color: var(--deep);
  font-size: 1.45rem;
  line-height: 1.12;
}

.tour-modal p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.42;
}

.tour-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.close-button {
  justify-self: end;
  width: 36px;
  height: 36px;
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

.close-button:hover,
.close-button:focus-visible,
.secondary-button:hover,
.secondary-button:focus-visible,
.primary-button:hover,
.primary-button:focus-visible {
  filter: brightness(1.04);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

select,
input,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background-color: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 46px;
  padding-right: 46px;
  cursor: pointer;
  background-color: var(--panel);
  background-image:
    linear-gradient(45deg, transparent 50%, color-mix(in srgb, var(--deep) 76%, var(--muted)) 50%),
    linear-gradient(135deg, color-mix(in srgb, var(--deep) 76%, var(--muted)) 50%, transparent 50%),
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, #fff), var(--panel));
  background-position:
    calc(100% - 22px) 50%,
    calc(100% - 15px) 50%,
    0 0;
  background-size:
    7px 7px,
    7px 7px,
    100% 100%;
  background-repeat: no-repeat;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

select:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--reef) 45%, var(--line));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48), 0 8px 20px rgba(8, 63, 77, 0.08);
}

select:disabled {
  cursor: not-allowed;
  opacity: 0.64;
  box-shadow: none;
}

select option {
  color: var(--ink);
  background: var(--panel);
}

input[type="file"] {
  min-height: 50px;
  padding: 8px;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  min-height: 34px;
  margin-right: 12px;
  padding: 0 13px;
  color: var(--secondary-button-ink);
  background: var(--secondary-button-bg);
  border: 1px solid var(--secondary-button-border);
  border-radius: 999px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

input[type="file"]::-webkit-file-upload-button {
  min-height: 34px;
  margin-right: 12px;
  padding: 0 13px;
  color: var(--secondary-button-ink);
  background: var(--secondary-button-bg);
  border: 1px solid var(--secondary-button-border);
  border-radius: 999px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover {
  filter: brightness(1.04);
}

input[type="file"].compose-media-input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

input[type="file"].compose-media-input::file-selector-button,
input[type="file"].compose-media-input::-webkit-file-upload-button {
  display: none;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(15, 143, 139, 0.16);
  border-color: var(--reef);
}

textarea {
  resize: vertical;
}

.auth-agreement,
.login-card .auth-agreement,
.modal-panel .auth-agreement {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
}

.auth-agreement input[type="checkbox"],
.login-card .auth-agreement input[type="checkbox"],
.modal-panel .auth-agreement input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  padding: 0;
  color: initial;
  background: initial;
  border-radius: 4px;
  appearance: auto;
  -webkit-appearance: checkbox;
}

.auth-agreement span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.side-drawer .auth-agreement {
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  font-size: 0.68rem;
  line-height: 1.24;
}

.side-drawer .auth-agreement input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
}

.check-row {
  grid-template-columns: 20px 1fr;
  align-items: center;
  color: var(--ink);
  font-weight: 700;
}

#composeModal .check-row {
  grid-template-columns: 1fr auto;
  min-height: 52px;
  padding: 9px 10px 9px 14px;
  color: var(--ink);
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 999px;
}

#composeModal .check-row > span {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
}

#composeModal .check-row > input[type="checkbox"] {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  width: 50px;
  min-height: 28px;
  height: 28px;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background: color-mix(in srgb, var(--muted) 22%, var(--panel));
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

#composeModal .check-row > input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(8, 63, 77, 0.18);
  transform: translateY(-50%);
  transition: transform 180ms ease;
}

#composeModal .check-row > input[type="checkbox"]:checked {
  background: var(--reef);
  border-color: var(--reef);
  box-shadow: 0 0 0 4px rgba(15, 143, 139, 0.12);
}

#composeModal .check-row > input[type="checkbox"]:checked::before {
  transform: translate(22px, -50%);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 86px;
  z-index: 1200;
  max-width: min(92vw, 430px);
  padding: 12px 14px;
  color: #fff;
  background: rgba(8, 63, 77, 0.94);
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: 180ms ease;
}

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

/* Professional typography refresh inspired by Facebook's compact system UI. */
.brand,
.wordmark,
.nav-link,
.story,
.text-button,
.badge-pill,
.profile-stats span,
label {
  font-weight: 600;
}

.primary-button,
.secondary-button,
.social-button,
.location-tab {
  font-weight: 600;
}

.section-head h1,
.profile-info h1 {
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  font-weight: 700;
  line-height: 1.14;
}

.auth-header h2 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 700;
  line-height: 1.12;
}

.auth-card h3,
.compact-section-head h2,
.spot-card h3,
.badge-card h3,
.login-card h2,
.leaderboard h2 {
  font-weight: 700;
  line-height: 1.16;
}

.post-user strong,
.spot-post-card strong,
.leader-row strong,
.profile-stats strong {
  font-weight: 600;
}

.cert-badge,
.badge-pill,
.eyebrow {
  font-weight: 700;
}

.eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.post-user > span,
.post-location,
.badge-meta,
.spot-meta,
.login-card p,
.profile-info p {
  font-size: 0.92rem;
  line-height: 1.28;
}

.post-user > span {
  margin-top: 2px;
  font-size: 0.8rem;
  line-height: 1.18;
}

.spot-card p,
.badge-card p,
.spot-post-card p,
.post-body,
.auth-header p,
.auth-note {
  line-height: 1.34;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 84px minmax(0, 1fr) 280px;
  }

  .rail {
    align-items: center;
  }

  .brand span:last-child,
  .rail .nav-link span:last-child {
    display: none;
  }
}

@media (max-width: 980px) {
  body {
    background: var(--soft);
  }

  .app-shell {
    display: block;
    padding: 0;
  }

  .rail,
  .side-panel {
    display: none;
  }

  .topbar {
    position: fixed;
    top: 0;
    left: 50%;
    z-index: 45;
    display: flex;
    width: min(100%, 680px);
    min-height: calc(58px + env(safe-area-inset-top, 0px));
    padding: calc(6px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px));
    background: var(--panel);
    border-bottom: 1px solid rgba(8, 63, 77, 0.08);
    transform: translateX(-50%);
  }

  .main {
    height: 100dvh;
    overflow-y: auto;
    width: min(100%, 680px);
    margin: 0 auto;
    padding: calc(78px + env(safe-area-inset-top, 0px)) 12px calc(66px + env(safe-area-inset-bottom, 0px));
  }

  .topbar .menu-button {
    display: inline-grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: var(--deep);
    background: var(--secondary-button-bg);
    border: 1px solid var(--secondary-button-border);
    border-radius: 999px;
  }

  .topbar .menu-button img {
    display: none;
  }

  .menu-button-bars {
    position: relative;
    display: block;
    width: 19px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
  }

  .menu-button-bars::before,
  .menu-button-bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 19px;
    height: 2px;
    background: currentColor;
    border-radius: inherit;
  }

  .menu-button-bars::before {
    top: -6px;
  }

  .menu-button-bars::after {
    top: 6px;
  }

  .view-home .stories {
    margin-top: 0;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .post-media {
    aspect-ratio: 4 / 5;
    height: auto;
    max-height: none;
  }

  .bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    min-height: calc(54px + env(safe-area-inset-bottom, 0px));
    padding: 3px 14px max(3px, env(safe-area-inset-bottom, 0px));
    background: var(--panel);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(16px);
  }

  .bottom-nav .nav-link {
    justify-content: center;
    min-height: 44px;
    padding: 0;
  }

  .bottom-nav .nav-dive-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
  }

  .create-button {
    justify-self: center;
    width: 58px;
    height: 58px;
    padding: 0;
    color: var(--deep);
    background: var(--panel);
    border: 2px solid var(--panel);
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(8, 63, 77, 0.14);
    mask-image: none;
    -webkit-mask-image: none;
  }

  .create-button img {
    width: 76px;
    height: 76px;
  }
}

@media (max-width: 760px) {
  .auth-modal {
    width: min(94vw, 480px);
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-header {
    align-items: start;
  }
}

@media (max-width: 560px) {
  .stories {
    padding-top: 6px;
    padding-bottom: 8px;
  }

  .story-loop {
    grid-auto-columns: 84px;
    gap: 8px;
  }

  .story-thumb {
    width: 58px;
    height: 58px;
  }

  .story img {
    width: 56px;
    height: 56px;
  }

  .story {
    gap: 5px;
    font-size: 0.72rem;
  }

  .story-name {
    min-height: 2em;
    line-height: 1.03;
  }

  .post-media {
    aspect-ratio: 4 / 5;
    height: auto;
    max-height: none;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .compose-media-picker {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .compose-media-state {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .field-pair {
    grid-template-columns: 1fr;
  }

  .comments-panel,
  .likes-panel,
  .messages-panel {
    width: 100%;
    max-height: 88dvh;
    border-radius: 24px 24px 0 0;
  }

  .likes-panel {
    height: calc(var(--app-viewport-height, 100dvh) - var(--likes-panel-top-gap));
    max-height: calc(var(--app-viewport-height, 100dvh) - var(--likes-panel-top-gap));
  }

  .comments-list,
  .likes-list {
    padding: 14px 12px;
  }

  .likes-search {
    margin: 12px;
  }

  .likes-user-row {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 68px;
    gap: 8px;
  }

  .likes-user-identity {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
  }

  .likes-user-avatar {
    width: 44px;
    height: 44px;
  }

  .likes-view-profile-button {
    min-width: 96px;
    min-height: 40px;
    padding: 0 10px;
    font-size: 0.84rem;
  }

  .comment {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
  }

  .comment-avatar {
    width: 34px;
    height: 34px;
  }

  .profile-certification-proof {
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: start;
  }

  .profile-certification-proof-thumb {
    width: 58px;
    height: 58px;
  }

  .profile-certification-proof-actions {
    grid-column: 1 / -1;
    justify-content: start;
  }

  .comment-replies {
    padding-left: 12px;
  }

  .comment-form {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }

  .comment-composer-avatar {
    width: 30px;
    height: 30px;
  }

  .message-button {
    width: 38px;
    height: 38px;
  }

  .messages-header {
    grid-template-columns: 70px minmax(0, 1fr) 40px;
    padding-inline: 12px;
  }

  .message-bubble {
    max-width: 100%;
  }

  .message-composer .primary-button {
    width: auto;
  }

  .location-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin-inline: 0;
    overflow: visible;
    padding: 0;
  }

  .location-tab {
    min-width: 0;
    min-height: 62px;
    padding: 6px 3px;
    gap: 4px;
    border-radius: 14px;
    font-size: clamp(0.64rem, 2.75vw, 0.78rem);
    line-height: 1.08;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .location-tab-label,
  .location-tab-posts .location-tab-label,
  .location-tab-spots .location-tab-label,
  .location-tab-forum .location-tab-label,
  .location-tab-videographer .location-tab-label {
    font-size: clamp(0.52rem, 2.05vw, 0.62rem);
  }

  .location-tab-icon {
    width: 28px;
    height: 28px;
  }

  .location-tab-icon svg {
    width: 17px;
    height: 17px;
  }

  .location-forum {
    grid-template-rows: auto minmax(300px, 58vh) auto;
  }

  .forum-composer {
    grid-template-columns: auto minmax(0, 1fr) max-content;
  }

  .profile-settings-grid,
  .profile-password-grid,
  .profile-image-upload-grid,
  .profile-theme-options,
  .location-picker-row {
    grid-template-columns: 1fr;
  }

  .location-picker-heading {
    display: grid;
    gap: 4px;
  }

  .location-picker-heading small {
    text-align: left;
  }

  .spot-card,
  .badge-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .profile-cert-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .profile-cert-art .cert-badge,
  .profile-cert-art .cert-badge.has-logo {
    width: 60px;
    height: 68px;
  }

  #publicAccountProfileModal {
    width: min(100vw - 16px, 560px);
  }

  .public-profile-panel {
    max-height: calc(100dvh - 18px);
  }

  .public-profile-cover {
    height: 154px;
  }

  .public-profile-body {
    padding: 0 12px 14px;
  }

  .public-profile-head {
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
  }

  .public-profile-avatar {
    width: 82px;
    height: 82px;
    margin-top: -30px;
  }

  .public-profile-intro-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .public-profile-actions {
    justify-content: center;
  }

  .public-profile-actions .primary-button,
  .public-profile-actions .secondary-button {
    flex: 0 1 184px;
  }

  .spot-card > img,
  .badge-art {
    width: 82px;
    height: 82px;
  }

  .spot-card .spot-contributor-badge {
    width: 82px;
    height: 91px;
  }

  .badge-art-image .achievement-badge.is-preview {
    width: 60px;
    height: 68px;
  }

  .profile-cover {
    height: 160px;
  }

  .profile-info {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: start;
    column-gap: 12px;
    row-gap: 8px;
    padding: 0 14px 14px;
  }

  .profile-photo {
    grid-row: 1 / span 2;
    margin-top: -38px;
  }

  .profile-info h1 {
    font-size: clamp(1.25rem, 7vw, 1.7rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .profile-info p {
    font-size: 0.82rem;
    line-height: 1.28;
  }

  .view-profile {
    padding-bottom: calc(var(--v2-nav-height) + 42px + env(safe-area-inset-bottom, 0px));
  }

  .profile-filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-filter-bar span {
    white-space: normal;
  }

  .profile-post-card {
    grid-template-columns: 86px minmax(0, 1fr);
    padding: 10px;
  }

  .profile-post-card > img {
    width: 86px;
    height: 86px;
  }
}

/* Final message page overrides keep the inbox full-screen after mobile media rules. */
.messages-sheet {
  align-items: stretch;
  background: var(--panel);
}

.messages-panel {
  width: min(100%, 680px);
  height: 100dvh;
  max-height: none;
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  grid-template-rows: auto minmax(0, 1fr);
}

.messages-header {
  position: sticky;
  top: 0;
  z-index: 6;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  min-height: calc(68px + var(--app-safe-top, env(safe-area-inset-top, 0px)));
  padding: calc(12px + var(--app-safe-top, env(safe-area-inset-top, 0px))) 16px 10px;
  background: var(--panel);
}

.messages-header.is-thread {
  grid-template-columns: 44px 42px minmax(0, 1fr) 44px;
}

.messages-header:not(.is-thread):not(.is-group-create) {
  grid-template-columns: 44px minmax(0, 1fr) auto;
}

.messages-header.is-group-create {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
}

.messages-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: end;
  gap: 6px;
  min-width: 0;
}

.messages-header-actions .message-icon-button {
  flex: 0 0 auto;
}

.message-header-spacer {
  width: 44px;
  height: 44px;
}

html[data-android-shell="true"] .messages-header,
html[data-native-app="android"] .messages-header {
  min-height: calc(74px + var(--app-safe-top, 28px));
  padding-top: calc(16px + var(--app-safe-top, 28px));
}

html[data-android-shell="true"] .message-icon-button,
html[data-native-app="android"] .message-icon-button {
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
}

html[data-android-shell="true"] .messages-header.is-thread,
html[data-native-app="android"] .messages-header.is-thread {
  grid-template-columns: 46px 42px minmax(0, 1fr) 46px;
}

.messages-list {
  min-height: 0;
  overflow-y: auto;
  background: var(--app-bg);
  overscroll-behavior-y: contain;
}

.messages-list.is-thread {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.messages-list.is-group-create {
  display: grid;
  min-height: 0;
  overflow: hidden;
}

.message-group-form {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
  padding: 16px;
  background: var(--app-bg);
}

.message-group-top {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.message-group-photo {
  position: relative;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  overflow: hidden;
  color: var(--deep);
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

.message-group-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-group-photo input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.message-group-photo-icon,
.message-group-search-icon {
  display: block;
  width: 26px;
  height: 26px;
  background: currentColor;
}

.message-group-photo-icon {
  mask: var(--icon-image) center / contain no-repeat;
  -webkit-mask: var(--icon-image) center / contain no-repeat;
}

.message-group-image-clear {
  position: absolute;
  top: 44px;
  left: 46px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

.message-group-image-clear .icon {
  width: 16px;
  height: 16px;
  background: currentColor;
}

.message-group-name,
.message-group-search {
  display: grid;
  min-width: 0;
}

.message-group-name {
  gap: 6px;
}

.message-group-name span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.message-group-name input,
.message-group-search input {
  min-width: 0;
  height: 46px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
}

.message-group-name input {
  padding: 0 16px;
}

.message-group-search {
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 14px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.message-group-search-icon {
  width: 20px;
  height: 20px;
  mask: var(--icon-search) center / contain no-repeat;
  -webkit-mask: var(--icon-search) center / contain no-repeat;
}

.message-group-search input {
  height: 42px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.message-group-name input:focus,
.message-group-search:focus-within {
  outline: 0;
  border-color: var(--reef);
  box-shadow: 0 0 0 2px rgba(20, 184, 190, 0.18);
}

.message-group-selected {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.message-group-selected::-webkit-scrollbar {
  display: none;
}

.message-group-selected button {
  display: grid;
  justify-items: center;
  gap: 5px;
  width: 70px;
  min-width: 70px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.message-group-selected img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 50%;
}

.message-group-selected span {
  display: block;
  width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-group-user-list {
  display: grid;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.message-group-user {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 10px 12px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.message-group-user:last-child {
  border-bottom: 0;
}

.message-group-user.is-selected {
  background: color-mix(in srgb, var(--deep) 10%, transparent);
}

.message-group-user img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--subpanel);
}

.message-group-user span {
  min-width: 0;
}

.message-group-user strong,
.message-group-user small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-group-user strong {
  font-size: 0.94rem;
  line-height: 1.12;
}

.message-group-user small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.message-group-user em {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: var(--primary-button-ink);
  background: var(--primary-button-bg);
  border-radius: 50%;
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 900;
  opacity: 0;
}

.message-group-user.is-selected em {
  opacity: 1;
}

.message-group-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding-top: 2px;
}

.message-group-actions span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-group-actions .primary-button {
  width: auto;
  min-width: 132px;
}

.messages-list.is-group-info {
  display: block;
  overflow-y: auto;
}

.message-group-info {
  display: grid;
  gap: 12px;
  min-height: 0;
  padding: 16px;
  background: var(--app-bg);
}

.message-group-info.is-add-mode {
  min-height: 100%;
  grid-template-rows: minmax(0, 1fr);
  padding-block: 12px;
}

.message-group-summary,
.message-group-info-section {
  min-width: 0;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.message-group-summary {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.message-group-summary > img,
.message-group-summary-photo {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--subpanel);
}

.message-group-summary-photo {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid var(--line);
  cursor: pointer;
}

.message-group-summary-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  background: var(--subpanel);
}

.message-group-summary-photo span {
  position: absolute;
  right: 5px;
  bottom: 5px;
  left: 5px;
  overflow: hidden;
  padding: 3px 5px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.66);
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-group-summary-photo input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.message-group-summary-photo.is-uploading {
  opacity: 0.78;
  pointer-events: none;
}

.message-group-summary-photo.is-compact {
  width: 52px;
  height: 52px;
}

.message-group-summary-photo.is-compact span {
  right: 4px;
  bottom: 4px;
  left: 4px;
  padding: 2px 4px;
  font-size: 0.52rem;
}

.message-group-summary h3,
.message-group-info-heading h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.15;
}

.message-group-summary p,
.message-group-info-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.message-group-info-section {
  display: grid;
  gap: 0;
  overflow: hidden;
}

.message-group-add-screen {
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.message-group-info-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.message-group-info-heading span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.message-group-member-list {
  display: grid;
  min-width: 0;
}

.message-group-member {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.message-group-member:last-child {
  border-bottom: 0;
}

.message-group-member img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--subpanel);
}

.message-group-member span {
  min-width: 0;
}

.message-group-member strong,
.message-group-member small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-group-member strong {
  font-size: 0.94rem;
  line-height: 1.12;
}

.message-group-member small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.message-group-add-summary {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  grid-row: 1;
}

.message-group-add-summary > span {
  min-width: 0;
}

.message-group-add-summary strong,
.message-group-add-summary small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-group-add-summary strong {
  font-size: 0.94rem;
  line-height: 1.12;
}

.message-group-add-summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.message-group-add-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(220px, 1fr) auto;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  padding: 14px;
}

.message-group-add-panel > .message-group-search {
  grid-row: 2;
}

.message-group-add-selected {
  grid-row: 3;
}

.message-group-add-user-list {
  grid-row: 4;
  max-height: none;
  min-height: 220px;
  overflow-y: auto;
}

.message-group-add-panel > .message-group-actions {
  grid-row: 5;
}

.message-group-info-note {
  padding: 12px 14px 14px;
}

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  color: #ffffff;
  background: #c93b32;
  border: 1px solid #c93b32;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.message-group-leave-button {
  width: calc(100% - 28px);
  margin: 14px;
}

.message-conversation-wrap {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.message-conversation {
  min-height: 0;
  max-height: none;
  align-content: start;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

.message-jump-bottom {
  position: absolute;
  left: 50%;
  bottom: 12px;
  display: inline-grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(45, 45, 48, 0.92);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  transform: translateX(-50%);
}

.message-jump-bottom[hidden] {
  display: none;
}

.message-jump-bottom .icon {
  width: 28px;
  height: 28px;
  background: currentColor;
}

.messages-list.is-thread .message-composer {
  position: sticky;
  bottom: 0;
  z-index: 3;
}

html[data-android-shell="true"] body.messages-open #messagesSheet .messages-list.is-thread .message-composer,
html[data-native-app="android"] body.messages-open #messagesSheet .messages-list.is-thread .message-composer {
  bottom: 0;
  padding-bottom: calc(12px + var(--android-control-safe-bottom, 0px));
}

html.ios-keyboard-open body.messages-open #messagesSheet {
  top: var(--app-viewport-offset-top, 0px);
  bottom: auto;
  height: var(--ios-message-viewport-height, var(--app-viewport-height, 100dvh));
}

html.ios-keyboard-open body.messages-open #messagesSheet .messages-panel {
  height: 100%;
  max-height: 100%;
}

html.ios-keyboard-open body.messages-open #messagesSheet .messages-list.is-thread .message-composer {
  bottom: 0;
  padding-bottom: 10px;
}

html.ios-keyboard-open body.messages-open #messagesSheet .message-conversation {
  scroll-padding-bottom: calc(96px + var(--app-safe-bottom, env(safe-area-inset-bottom, 0px)));
}

html.android-keyboard-open body.messages-open #messagesSheet .messages-panel,
html.android-keyboard-open body.messages-open #messagesSheet .messages-list.is-thread {
  height: 100dvh;
  max-height: 100dvh;
}

html.android-keyboard-open body.messages-open #messagesSheet .messages-list.is-thread .message-composer {
  bottom: var(--android-keyboard-space, 320px);
  padding-bottom: 12px;
  box-shadow: 0 -10px 28px rgba(7, 17, 20, 0.12);
}

html.android-keyboard-open body.messages-open #messagesSheet .messages-header.is-thread {
  position: fixed;
  top: 0;
  left: 50%;
  width: min(100%, 680px);
  transform: translateX(-50%);
}

html.android-keyboard-open body.messages-open #messagesSheet .messages-list.is-thread {
  padding-top: calc(74px + var(--app-safe-top, 28px));
}

html.android-keyboard-open body.messages-open #messagesSheet .message-conversation {
  padding-bottom: calc(var(--android-keyboard-space, 320px) + var(--android-control-safe-bottom, 0px) + 24px);
  scroll-padding-bottom: calc(var(--android-keyboard-space, 320px) + var(--android-control-safe-bottom, 0px) + 96px);
}

.messages-list.is-thread .message-reply-target span {
  display: block;
  min-width: 0;
}

.messages-list.is-thread .message-reply-target strong,
.messages-list.is-thread .message-reply-target em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messages-list.is-thread .message-reply-target em {
  color: var(--muted);
  font-style: normal;
}

.messages-list.is-thread .message-composer .primary-button {
  width: auto;
  min-width: 78px;
  padding-inline: 16px;
}

.message-bubble-stack {
  display: grid;
  max-width: min(68%, 360px);
  gap: 6px;
  justify-self: start;
  justify-items: start;
}

.message-bubble-row.is-own .message-bubble-stack {
  justify-self: end;
  justify-items: end;
}

.message-bubble-sender {
  max-width: 100%;
  overflow: hidden;
  padding-left: 2px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-bubble-row.is-jump-target .message-bubble {
  animation: messageJumpTarget 1600ms ease-out 1;
}

@keyframes messageJumpTarget {
  0%,
  100% {
    box-shadow: none;
  }
  18% {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-button-bg) 36%, transparent);
  }
}

.message-bubble-stack .message-bubble {
  max-width: 100%;
}

#messagesSheet .message-bubble-stack,
#messagesSheet .message-bubble-row.is-own .message-bubble-stack {
  max-width: min(68%, 360px);
}

#messagesSheet .message-bubble-row.has-media .message-bubble-stack,
#messagesSheet .message-bubble-row.has-media.is-own .message-bubble-stack {
  max-width: min(72vw, 420px);
}

.message-reply-context {
  display: grid;
  max-width: min(260px, 100%);
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.message-reply-context.is-own {
  text-align: right;
  justify-items: end;
}

.message-reply-context span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-inline: 2px;
  color: var(--muted);
}

.message-reply-context span::before {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  background: currentColor;
  content: "";
  mask: var(--icon-arrow-left) center / contain no-repeat;
  -webkit-mask: var(--icon-arrow-left) center / contain no-repeat;
  transform: rotate(28deg);
}

.message-reply-context > div {
  position: relative;
  display: grid;
  gap: 6px;
  overflow: hidden;
  max-width: 100%;
  padding: 9px 12px;
  color: var(--muted);
  background: color-mix(in srgb, var(--subpanel-strong) 78%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 18px;
}

.message-reply-context.has-image > div {
  width: min(132px, 100%);
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 14px;
}

.message-reply-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
}

.message-reply-context.has-image p {
  padding: 8px 10px;
  color: var(--ink);
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.message-reply-context.is-own > div {
  padding-right: 16px;
}

.message-reply-context.is-own.has-image > div {
  padding-right: 0;
}

.message-reply-context.is-own > div::after {
  position: absolute;
  top: 2px;
  right: -10px;
  bottom: 2px;
  width: 3px;
  background: color-mix(in srgb, var(--muted) 44%, transparent);
  border-radius: 999px;
  content: "";
}

.message-reply-context.has-image > div::before,
.message-reply-context.has-image > div::after {
  display: none;
}

.message-reply-context:not(.is-own) > div {
  padding-left: 16px;
}

.message-reply-context:not(.is-own) > div::before {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: -10px;
  width: 3px;
  background: color-mix(in srgb, var(--muted) 34%, transparent);
  border-radius: 999px;
  content: "";
}

.message-reply-context p {
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-theme="dark"] .message-reply-context > div {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .message-bubble-row.is-own:not(.has-media) .message-bubble {
  color: #111827;
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.74);
}

body[data-theme="dark"] .message-bubble-row.has-media.is-own .message-bubble p {
  color: #111827;
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.74);
}

body[data-theme="dark"] .message-bubble-row.is-own .message-reply-context > div {
  color: #f5f5f5;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.16);
}

body[data-theme="dark"] .message-bubble-row.is-own .message-reply-context.has-image > div {
  background: transparent;
  border-color: transparent;
}

body[data-theme="dark"] .message-bubble-row.is-own .message-reply-context.has-image p {
  color: #f5f5f5;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.16);
}

body[data-theme="dark"] .message-bubble-row.is-own .message-reply-context span {
  color: rgba(245, 245, 245, 0.82);
}

body[data-theme="dark"] .message-bubble-row.is-own .message-reply-context > div::after {
  background: #8edfe0;
}

@media (prefers-color-scheme: dark) {
  body[data-theme="auto"] .message-bubble-row.is-own:not(.has-media) .message-bubble {
    color: #111827;
    background: #ffffff;
    border-color: rgba(255, 255, 255, 0.74);
  }

  body[data-theme="auto"] .message-bubble-row.has-media.is-own .message-bubble p {
    color: #111827;
    background: #ffffff;
    border-color: rgba(255, 255, 255, 0.74);
  }

  body[data-theme="auto"] .message-bubble-row.is-own .message-reply-context > div {
    color: #f5f5f5;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.16);
  }

  body[data-theme="auto"] .message-bubble-row.is-own .message-reply-context.has-image > div {
    background: transparent;
    border-color: transparent;
  }

  body[data-theme="auto"] .message-bubble-row.is-own .message-reply-context.has-image p {
    color: #f5f5f5;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.16);
  }

  body[data-theme="auto"] .message-bubble-row.is-own .message-reply-context span {
    color: rgba(245, 245, 245, 0.82);
  }

  body[data-theme="auto"] .message-bubble-row.is-own .message-reply-context > div::after {
    background: #8edfe0;
  }
}

.icon-home {
  mask-image: var(--icon-home);
  -webkit-mask-image: var(--icon-home);
}

.icon-arrow-left {
  mask-image: var(--icon-arrow-left);
  -webkit-mask-image: var(--icon-arrow-left);
}

.icon-phone {
  mask-image: var(--icon-phone);
  -webkit-mask-image: var(--icon-phone);
}

.icon-user {
  mask-image: var(--icon-user);
  -webkit-mask-image: var(--icon-user);
}

.icon-x {
  mask-image: var(--icon-x);
  -webkit-mask-image: var(--icon-x);
}

.icon-trash {
  mask-image: var(--icon-trash);
  -webkit-mask-image: var(--icon-trash);
}

/* V2 home/feed foundation. */
:root {
  --v2-feed-width: 560px;
  --v2-rail-width: 86px;
  --v2-nav-height: 56px;
  --v2-feed-gap: 6px;
}

.app-shell {
  grid-template-columns: var(--v2-rail-width) minmax(0, var(--v2-feed-width)) 304px;
  gap: 18px;
  width: min(100%, 1120px);
}

.rail {
  align-items: center;
  padding-inline: 10px;
}

.brand span:last-child,
.rail .nav-link span:last-child {
  display: none;
}

.rail-nav {
  gap: 8px;
}

.rail .nav-link {
  justify-content: center;
  width: 54px;
  min-height: 48px;
  padding: 0;
}

.main {
  scrollbar-gutter: auto;
}

.view-home[data-v2-home] .stories {
  padding-bottom: 10px;
}

.view-home[data-v2-home] .story-loop {
  grid-auto-columns: 78px;
  gap: 8px;
}

.view-home[data-v2-home] .story-thumb {
  width: 58px;
  height: 58px;
}

.view-home[data-v2-home] .story img {
  width: 54px;
  height: 54px;
}

.view-home[data-v2-home] .story {
  gap: 5px;
  font-size: 0.68rem;
}

.view-home[data-v2-home] .story-name {
  min-height: 2.06em;
  line-height: 1.03;
}

.view-home[data-v2-home] .composer {
  margin-bottom: var(--v2-feed-gap);
  padding: 9px 10px;
}

.view-home[data-v2-home] .composer-button {
  min-height: 38px;
  font-size: 0.88rem;
}

.view-home[data-v2-home] .feed {
  gap: var(--v2-feed-gap);
}

.view-home[data-v2-home] .post {
  box-shadow: none;
}

.view-home[data-v2-home] .post-head {
  align-items: center;
  padding: 10px 12px;
}

.view-home[data-v2-home] .post-avatar-button,
.view-home[data-v2-home] .post-avatar-button > img,
.view-home[data-v2-home] .post-head > img {
  width: 38px;
  height: 38px;
}

.view-home[data-v2-home] .post-user strong {
  font-size: 0.96rem;
}

.view-home[data-v2-home] .badge-pill {
  min-height: 28px;
  max-width: min(30vw, 132px);
  overflow: hidden;
  justify-content: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-home[data-v2-home] .post-more-button {
  width: 34px;
  height: 34px;
}

.view-home[data-v2-home] .post-body {
  gap: 4px;
  padding: 6px 12px 11px;
}

.view-home[data-v2-home] .post-actions {
  min-height: 32px;
}

.view-home[data-v2-home] .post-action-left {
  gap: 6px;
}

.view-home[data-v2-home] .post-icon-button {
  width: 28px;
  height: 32px;
}

.view-home[data-v2-home] .post-metric-button {
  min-width: 28px;
  padding-inline: 0;
}

.view-home[data-v2-home] .post-metric-button.has-count {
  min-width: 40px;
}

.view-home[data-v2-home] .post-action-icon {
  width: 20px;
  height: 20px;
}

.view-home[data-v2-home] .post-action-count {
  font-size: 0.82rem;
}

.view-home[data-v2-home] .post-caption {
  font-size: 0.82rem;
  line-height: 1.27;
}

.view-home[data-v2-home] .post-body .post-location {
  font-size: 0.76rem;
  line-height: 1.22;
}

@media (max-width: 980px) {
  .topbar {
    width: min(100%, var(--v2-feed-width));
    min-height: calc(54px + env(safe-area-inset-top, 0px));
    padding: calc(5px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 7px max(12px, env(safe-area-inset-left, 0px));
  }

  body:not([data-theme="dark"]) .topbar {
    min-height: calc(64px + env(safe-area-inset-top, 0px));
    padding-top: calc(15px + env(safe-area-inset-top, 0px));
    background: color-mix(in srgb, var(--panel) 94%, transparent);
  }

  html[data-native-app="android"] body:not([data-theme="dark"]) .topbar {
    min-height: 72px;
    padding-top: 22px;
  }

  .wordmark {
    font-size: 0.96rem;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .main {
    width: min(100%, var(--v2-feed-width));
    padding: calc(62px + env(safe-area-inset-top, 0px)) 0 calc(var(--v2-nav-height) + 10px + env(safe-area-inset-bottom, 0px));
  }

  body:not([data-theme="dark"]) .main {
    padding-top: calc(76px + env(safe-area-inset-top, 0px));
  }

  html[data-native-app="android"] body:not([data-theme="dark"]) .main {
    padding-top: 84px;
  }

  .view-home[data-v2-home] .stories {
    padding: 8px 12px 10px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
  }

  .view-home[data-v2-home] .composer {
    margin: 8px 12px var(--v2-feed-gap);
  }

  .view-home[data-v2-home] .feed {
    gap: var(--v2-feed-gap);
  }

  .view-home[data-v2-home] .post {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .view-home[data-v2-home] .post-media {
    border-top: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  }

  .bottom-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(var(--v2-nav-height) + env(safe-area-inset-bottom, 0px));
    padding: 2px 8px max(2px, env(safe-area-inset-bottom, 0px));
  }

  .bottom-nav .nav-link {
    display: grid;
    justify-items: center;
    gap: 2px;
    min-width: 0;
    min-height: 44px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 16px;
    font-size: 0.62rem;
    line-height: 1;
  }

  .bottom-nav .nav-link > span:last-child {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .bottom-nav .icon,
  .bottom-nav .message-button-icon {
    width: 22px;
    height: 22px;
  }

  .bottom-nav .nav-link[data-marketplace-nav="home"] .icon,
  .bottom-nav .nav-link[href="#cart"] .icon,
  .bottom-nav .nav-link[href="#services"] .icon,
  .bottom-nav .nav-link[href="#payouts"] .icon,
  .bottom-nav .nav-link[href="#orders"] .icon {
    width: 34px;
    height: 34px;
  }

  .bottom-nav .nav-link[data-marketplace-nav="home"] .icon {
    mask-size: 28px;
    -webkit-mask-size: 28px;
  }

  .bottom-nav .nav-link[href="#services"] .icon,
  .bottom-nav .nav-link[href="#payouts"] .icon,
  .bottom-nav .nav-link[href="#orders"] .icon {
    background-size: 28px 28px;
  }

  .bottom-nav .nav-link[href="#cart"] .icon {
    background-size: 42px 42px;
  }

  .create-button {
    width: 54px;
    height: 54px;
  }

  .create-button img {
    width: 70px;
    height: 70px;
  }
}

@media (max-width: 560px) {
  .view-home[data-v2-home] .story-loop {
    grid-auto-columns: 70px;
    gap: 6px;
  }

  .view-home[data-v2-home] .story-thumb {
    width: 54px;
    height: 54px;
  }

  .view-home[data-v2-home] .story img {
    width: 50px;
    height: 50px;
  }

  .view-home[data-v2-home] .story {
    font-size: 0.66rem;
  }

  .view-home[data-v2-home] .post-head {
    gap: 9px;
    padding: 9px 12px;
  }
}

body[data-theme="dark"] .view-home[data-v2-home] .stories,
body[data-theme="dark"] .view-home[data-v2-home] .composer,
body[data-theme="dark"] .view-home[data-v2-home] .post {
  border-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .view-home[data-v2-home] .post-media {
  border-color: rgba(255, 255, 255, 0.07);
}

@media (prefers-color-scheme: dark) {
  body[data-theme="auto"] .view-home[data-v2-home] .stories,
  body[data-theme="auto"] .view-home[data-v2-home] .composer,
  body[data-theme="auto"] .view-home[data-v2-home] .post {
    border-color: rgba(255, 255, 255, 0.08);
  }

  body[data-theme="auto"] .view-home[data-v2-home] .post-media {
    border-color: rgba(255, 255, 255, 0.07);
  }
}

/* V2 production shell. */
body[data-theme="dark"] {
  --ink: #f6fbff;
  --muted: rgba(222, 238, 247, 0.68);
  --line: rgba(151, 196, 224, 0.14);
  --panel: #071b2d;
  --panel-strong: #0b2338;
  --soft: #081b2d;
  --subpanel: #102d45;
  --subpanel-strong: #123650;
  --app-bg: #020b14;
  --deep: #15d4ff;
  --reef: #078bff;
  --coral: #ff5a78;
  --sun: #ffd15a;
  --primary-button-bg: #078bff;
  --primary-button-ink: #ffffff;
  --secondary-button-bg: rgba(255, 255, 255, 0.08);
  --secondary-button-ink: #f6fbff;
  --secondary-button-border: rgba(151, 196, 224, 0.14);
  --shadow: 0 22px 55px rgba(0, 0, 0, 0.34);
  background:
    radial-gradient(circle at 18% -12%, rgba(21, 212, 255, 0.2), transparent 34rem),
    linear-gradient(180deg, #041526 0%, #020b14 48%, #02060c 100%);
}

body[data-theme="dark"] .app-shell {
  grid-template-columns: var(--v2-rail-width) minmax(0, var(--v2-feed-width)) 304px;
  gap: 18px;
  width: min(100%, 1120px);
}

body[data-theme="dark"] .rail {
  align-items: center;
  padding: 18px 10px;
  background: rgba(7, 27, 45, 0.7);
  border: 1px solid rgba(151, 196, 224, 0.1);
  border-radius: 24px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.18);
}

body[data-theme="dark"] .brand {
  justify-content: center;
}

body[data-theme="dark"] .brand span:last-child,
body[data-theme="dark"] .rail .nav-link span:last-child {
  display: none;
}

body[data-theme="dark"] .rail .nav-link {
  justify-content: center;
  width: 54px;
  min-height: 50px;
  padding: 0;
  color: rgba(246, 251, 255, 0.58);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 18px;
}

body[data-theme="dark"] .rail .nav-link.active,
body[data-theme="dark"] .rail .nav-link:hover {
  color: #ffffff;
  background: rgba(7, 139, 255, 0.18);
  border-color: rgba(7, 139, 255, 0.28);
}

body[data-theme="dark"] .nav-link {
  color: rgba(246, 251, 255, 0.64);
  border: 0;
}

body[data-theme="dark"] button.nav-link {
  font: inherit;
  cursor: pointer;
}

body[data-theme="dark"] .nav-link.active {
  color: var(--reef);
  background: transparent;
}

body[data-theme="dark"] .nav-link[data-route="explore"] .icon {
  mask-image: var(--icon-home);
  -webkit-mask-image: var(--icon-home);
}

body[data-theme="dark"] .nav-link[data-route="community"] .icon {
  mask-image: var(--icon-community);
  -webkit-mask-image: var(--icon-community);
}

body[data-theme="dark"] .nav-link .message-button-icon {
  width: 24px;
  height: 24px;
  background: currentColor;
}

body[data-theme="dark"] .topbar {
  background: rgba(3, 16, 28, 0.9);
  border-bottom-color: rgba(151, 196, 224, 0.1);
  backdrop-filter: blur(18px);
}

body[data-theme="dark"] .wordmark {
  color: #fff;
}

body[data-theme="dark"] .brand-mark {
  box-shadow: 0 0 0 2px rgba(21, 212, 255, 0.22), 0 10px 26px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .message-button,
body[data-theme="dark"] .topbar .menu-button {
  color: #f6fbff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(151, 196, 224, 0.14);
}

body[data-theme="dark"] .main {
  scrollbar-gutter: auto;
}

body[data-theme="dark"] .composer,
body[data-theme="dark"] .post,
body[data-theme="dark"] .login-card,
body[data-theme="dark"] .leaderboard,
body[data-theme="dark"] .spot-card,
body[data-theme="dark"] .badge-card,
body[data-theme="dark"] .profile-stats,
body[data-theme="dark"] .profile-badges,
body[data-theme="dark"] .profile-post-card,
body[data-theme="dark"] .location-tabs,
body[data-theme="dark"] .spot-post-card,
body[data-theme="dark"] .location-forum,
body[data-theme="dark"] .forum-composer,
body[data-theme="dark"] .side-panel > * {
  background: rgba(7, 27, 45, 0.92);
  border-color: rgba(151, 196, 224, 0.12);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

body[data-theme="dark"] .view-home[data-v2-home] .stories {
  padding-bottom: 10px;
}

body[data-theme="dark"] .view-home[data-v2-home] .composer-button {
  color: rgba(246, 251, 255, 0.72);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(151, 196, 224, 0.12);
}

body[data-theme="dark"] .view-home[data-v2-home] .post {
  overflow: hidden;
}

body[data-theme="dark"] .post-user strong,
body[data-theme="dark"] .post-caption,
body[data-theme="dark"] .section-head h1,
body[data-theme="dark"] .spot-card h3,
body[data-theme="dark"] .badge-card h3,
body[data-theme="dark"] .profile-info h1,
body[data-theme="dark"] .profile-stats strong {
  color: #ffffff;
}

body[data-theme="dark"] .post-media {
  background:
    radial-gradient(circle at 50% 42%, rgba(21, 212, 255, 0.18), transparent 58%),
    #020b14;
}

body[data-theme="dark"] .post-caption-more {
  color: rgba(246, 251, 255, 0.68);
}

body[data-theme="dark"] .badge-pill,
body[data-theme="dark"] .cert-status-pill,
body[data-theme="dark"] .text-button,
body[data-theme="dark"] .secondary-button {
  color: #f6fbff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(151, 196, 224, 0.14);
}

body[data-theme="dark"] .primary-button,
body[data-theme="dark"] .cta,
body[data-theme="dark"] .compose-next-button {
  color: #ffffff;
  background: linear-gradient(180deg, #10a2ff, #047af0);
  border-color: transparent;
}

body[data-theme="dark"] .section-head {
  padding: 12px 0;
}

body[data-theme="dark"] .eyebrow {
  color: var(--deep);
}

body[data-theme="dark"] .map-layout {
  gap: 10px;
}

body[data-theme="dark"] .app-shell[data-view="spots"] .spot-list {
  order: 1;
}

body[data-theme="dark"] .app-shell[data-view="spots"] .map-card {
  order: 2;
}

body[data-theme="dark"] .app-shell[data-view="spots"] .spot-posts {
  order: 3;
}

body[data-theme="dark"] .map-card,
body[data-theme="dark"] .spot-posts {
  background: rgba(7, 27, 45, 0.9);
  border-color: rgba(151, 196, 224, 0.12);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

body[data-theme="dark"] .spot-card {
  gap: 10px;
  min-height: 84px;
  padding: 8px;
}

body[data-theme="dark"] .spot-card img {
  border-radius: 12px;
}

body[data-theme="dark"] .profile-hero {
  overflow: hidden;
  background: rgba(7, 27, 45, 0.92);
  border: 1px solid rgba(151, 196, 224, 0.12);
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

body[data-theme="dark"] .profile-cover {
  filter: saturate(1.12) brightness(0.82);
}

body[data-theme="dark"] .profile-tabs {
  background: rgba(7, 27, 45, 0.76);
  border-color: rgba(151, 196, 224, 0.12);
}

body[data-theme="dark"] .profile-tab-button {
  color: rgba(246, 251, 255, 0.64);
}

body[data-theme="dark"] .profile-tab-button.active {
  color: var(--reef);
}

body[data-theme="dark"] .bottom-nav {
  background: rgba(3, 16, 28, 0.96);
  border-top-color: rgba(151, 196, 224, 0.12);
  box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.24);
}

body[data-theme="dark"] .bottom-nav .nav-link {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 0;
  color: rgba(246, 251, 255, 0.58);
  background: transparent;
  border: 0;
  border-radius: 16px;
  font-size: 0.62rem;
  line-height: 1;
}

body[data-theme="dark"] .bottom-nav .nav-link.active {
  color: var(--reef);
}

body[data-theme="dark"] .bottom-nav .nav-link > span:last-child {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-theme="dark"] .bottom-nav .icon,
body[data-theme="dark"] .bottom-nav .message-button-icon {
  width: 22px;
  height: 22px;
}

body[data-theme="dark"] .bottom-nav .nav-link[data-marketplace-nav="home"] .icon,
body[data-theme="dark"] .bottom-nav .nav-link[href="#cart"] .icon,
body[data-theme="dark"] .bottom-nav .nav-link[href="#services"] .icon,
body[data-theme="dark"] .bottom-nav .nav-link[href="#payouts"] .icon,
body[data-theme="dark"] .bottom-nav .nav-link[href="#orders"] .icon {
  width: 34px;
  height: 34px;
}

body[data-theme="dark"] .bottom-nav .nav-link[data-marketplace-nav="home"] .icon {
  mask-size: 28px;
  -webkit-mask-size: 28px;
}

body[data-theme="dark"] .bottom-nav .nav-link[href="#services"] .icon,
body[data-theme="dark"] .bottom-nav .nav-link[href="#payouts"] .icon,
body[data-theme="dark"] .bottom-nav .nav-link[href="#orders"] .icon {
  background-size: 28px 28px;
}

body[data-theme="dark"] .bottom-nav .nav-link[href="#cart"] .icon {
  background-size: 42px 42px;
}

.bottom-nav .nav-link[data-marketplace-nav="home"] .icon,
body[data-theme="dark"] .bottom-nav .nav-link[data-marketplace-nav="home"] .icon {
  color: transparent;
  background: transparent var(--marketplace-home-icon-url) center / contain no-repeat;
  mask-image: none;
  -webkit-mask-image: none;
  font-size: 0;
}

.bottom-nav .nav-link[data-marketplace-nav="home"] .icon {
  background-size: 34px 34px;
}

.bottom-nav .nav-link[href="#explore"] .icon,
.bottom-nav .nav-link[href="#spots"] .icon,
.bottom-nav .nav-link[href="#community"] .icon,
.bottom-nav .nav-link[href="#profile"] .icon,
.bottom-nav .nav-link[data-open-messages] .message-button-icon,
body[data-theme="dark"] .bottom-nav .nav-link[href="#explore"] .icon,
body[data-theme="dark"] .bottom-nav .nav-link[href="#spots"] .icon,
body[data-theme="dark"] .bottom-nav .nav-link[href="#community"] .icon,
body[data-theme="dark"] .bottom-nav .nav-link[href="#profile"] .icon,
body[data-theme="dark"] .bottom-nav .nav-link[data-open-messages] .message-button-icon,
body[data-theme="light"] .bottom-nav .nav-link[href="#explore"] .icon,
body[data-theme="light"] .bottom-nav .nav-link[href="#spots"] .icon,
body[data-theme="light"] .bottom-nav .nav-link[href="#community"] .icon,
body[data-theme="light"] .bottom-nav .nav-link[href="#profile"] .icon,
body[data-theme="light"] .bottom-nav .nav-link[data-open-messages] .message-button-icon {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  color: transparent;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  mask: none;
  -webkit-mask: none;
  mask-image: none;
  -webkit-mask-image: none;
  opacity: 0.78;
  filter: saturate(0.9);
  font-size: 0;
}

.bottom-nav .nav-link[href="#explore"] .icon,
.bottom-nav .nav-link[data-marketplace-nav="home"] .icon,
body[data-theme="dark"] .bottom-nav .nav-link[href="#explore"] .icon,
body[data-theme="dark"] .bottom-nav .nav-link[data-marketplace-nav="home"] .icon,
body[data-theme="light"] .bottom-nav .nav-link[href="#explore"] .icon,
body[data-theme="light"] .bottom-nav .nav-link[data-marketplace-nav="home"] .icon {
  background-image: var(--bottom-nav-home-icon-url);
}

.bottom-nav .nav-link[href="#spots"] .icon,
body[data-theme="dark"] .bottom-nav .nav-link[href="#spots"] .icon,
body[data-theme="light"] .bottom-nav .nav-link[href="#spots"] .icon {
  background-image: var(--bottom-nav-spot-icon-url);
}

.bottom-nav .nav-link[href="#community"] .icon,
body[data-theme="dark"] .bottom-nav .nav-link[href="#community"] .icon,
body[data-theme="light"] .bottom-nav .nav-link[href="#community"] .icon {
  background-image: var(--bottom-nav-community-icon-url);
}

.bottom-nav .nav-link[data-open-messages] .message-button-icon,
body[data-theme="dark"] .bottom-nav .nav-link[data-open-messages] .message-button-icon,
body[data-theme="light"] .bottom-nav .nav-link[data-open-messages] .message-button-icon {
  background-image: var(--bottom-nav-messages-icon-url);
}

.bottom-nav .nav-link[href="#profile"] .icon,
body[data-theme="dark"] .bottom-nav .nav-link[href="#profile"] .icon,
body[data-theme="light"] .bottom-nav .nav-link[href="#profile"] .icon {
  background-image: var(--bottom-nav-profile-icon-url);
}

.bottom-nav .nav-link.active[href="#explore"] .icon,
.bottom-nav .nav-link.active[href="#spots"] .icon,
.bottom-nav .nav-link.active[href="#community"] .icon,
.bottom-nav .nav-link.active[href="#profile"] .icon,
.bottom-nav .nav-link.active[data-open-messages] .message-button-icon {
  opacity: 1;
  filter: saturate(1.08) drop-shadow(0 4px 10px rgba(21, 212, 255, 0.22));
}

.v2-log-dive-button {
  position: fixed;
  right: max(16px, calc((100vw - var(--v2-feed-width)) / 2 + 16px));
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  z-index: 36;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  padding: 0;
  color: #ffffff;
  background: linear-gradient(180deg, #10a2ff, #047af0);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 16px 34px rgba(7, 139, 255, 0.38);
  cursor: pointer;
}

.v2-log-dive-button span {
  margin-top: -4px;
  font-size: 1.45rem;
  line-height: 0.8;
}

.v2-log-dive-button strong {
  margin-top: -12px;
  font-size: 0.62rem;
  line-height: 1;
}

body[data-theme="dark"] .modal,
body[data-theme="dark"] .modal-panel,
body[data-theme="dark"] #composeModal form,
body[data-theme="dark"] .comments-panel,
body[data-theme="dark"] .post-options-panel,
body[data-theme="dark"] .post-share-panel,
body[data-theme="dark"] .messages-panel,
body[data-theme="dark"] .side-drawer-panel {
  color: #f6fbff;
  background: #071b2d;
  border-color: rgba(151, 196, 224, 0.14);
}

body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea {
  color: #f6fbff;
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(151, 196, 224, 0.14);
}

body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
  color: rgba(246, 251, 255, 0.42);
}

@media (min-width: 981px) {
  .v2-log-dive-button {
    right: max(24px, calc((100vw - 1120px) / 2 + 328px));
    bottom: 32px;
  }
}

@media (max-width: 980px) {
  body[data-theme="dark"] {
    background: #020b14;
  }

  body[data-theme="dark"] .main {
    width: min(100%, var(--v2-feed-width));
    padding: calc(62px + env(safe-area-inset-top, 0px)) 0 calc(var(--v2-nav-height) + 16px + env(safe-area-inset-bottom, 0px));
  }

  body[data-theme="dark"] .view-home[data-v2-home] .stories {
    background: rgba(7, 27, 45, 0.96);
    border-bottom-color: rgba(151, 196, 224, 0.12);
  }

  body[data-theme="dark"] .view-home[data-v2-home] .composer {
    margin: 8px 12px var(--v2-feed-gap);
    border-radius: 16px;
  }

  body[data-theme="dark"] .view-home[data-v2-home] .post {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  body[data-theme="dark"] .bottom-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(var(--v2-nav-height) + env(safe-area-inset-bottom, 0px));
    padding: 2px 8px max(2px, env(safe-area-inset-bottom, 0px));
  }

  body[data-theme="dark"] .map-layout,
  body[data-theme="dark"] .profile-hero,
  body[data-theme="dark"] .profile-stats,
  body[data-theme="dark"] .profile-tabs,
  body[data-theme="dark"] .profile-badges,
  body[data-theme="dark"] .profile-posts {
    margin-right: 12px;
    margin-left: 12px;
  }

  body[data-theme="dark"] .section-head {
    padding: 12px;
  }

  body[data-theme="dark"] .app-shell[data-view="spots"] .map-card,
  body[data-theme="dark"] .app-shell[data-view="spots"] .philippines-map {
    min-height: 180px;
  }
}

/* V2 storyboard implementation for the real app routes. */
body[data-theme="dark"] {
  --radius: 16px;
  --panel: #06192a;
  --panel-strong: #09233a;
  --soft: #020b14;
  --subpanel: #0b2a42;
  --app-bg: #020b14;
}

body[data-theme="dark"] .section-head h1,
body[data-theme="dark"] .section-head h2 {
  font-size: 1.35rem;
  letter-spacing: 0;
}

body[data-theme="dark"] .section-actions {
  gap: 7px;
}

body[data-theme="dark"] .spot-card-activity {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 5px 0 0;
  color: #3be7a5;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.15;
}

body[data-theme="dark"] .spot-card-activity span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  background: rgba(59, 231, 165, 0.09);
  border: 1px solid rgba(59, 231, 165, 0.12);
  border-radius: 999px;
}

body[data-theme="dark"] .spot-card p:not(.spot-meta):not(.spot-card-activity) {
  color: rgba(246, 251, 255, 0.62);
  font-size: 0.78rem;
  line-height: 1.24;
}

body[data-theme="dark"] .app-shell[data-view="explore"] .section-head {
  align-items: center;
  margin: 0;
  padding: 14px 12px 10px;
}

body[data-theme="dark"] .app-shell[data-view="explore"] .section-head .eyebrow {
  margin-bottom: 2px;
  color: rgba(246, 251, 255, 0.58);
  font-size: 0.7rem;
  text-transform: none;
}

body[data-theme="dark"] .app-shell[data-view="explore"] .map-layout {
  position: relative;
  gap: 0;
}

body[data-theme="dark"] .app-shell[data-view="explore"] .map-card,
body[data-theme="dark"] .app-shell[data-view="explore"] .philippines-map {
  min-height: 480px;
}

body[data-theme="dark"] .app-shell[data-view="explore"] .map-card {
  border-radius: 22px;
}

body[data-theme="dark"] .app-shell[data-view="explore"] .spot-list {
  position: relative;
  z-index: 4;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 72%);
  gap: 10px;
  overflow-x: auto;
  margin: -106px 12px 0;
  padding: 0 0 12px;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

body[data-theme="dark"] .app-shell[data-view="explore"] .spot-list::-webkit-scrollbar {
  display: none;
}

body[data-theme="dark"] .app-shell[data-view="explore"] .spot-card {
  grid-template-columns: 86px minmax(0, 1fr);
  min-height: 96px;
  padding: 8px;
  background: rgba(7, 27, 45, 0.94);
  border-color: rgba(151, 196, 224, 0.16);
  border-radius: 18px;
  backdrop-filter: blur(14px);
}

body[data-theme="dark"] .app-shell[data-view="explore"] .spot-card img {
  width: 86px;
  height: 78px;
  border-radius: 12px;
}

body[data-theme="dark"] .app-shell[data-view="explore"] .spot-card h3 {
  font-size: 0.92rem;
}

body[data-theme="dark"] .app-shell[data-view="explore"] .spot-card p:not(.spot-meta):not(.spot-card-activity) {
  display: none;
}

body[data-theme="dark"] .app-shell[data-view="spots"] .map-card {
  display: none;
}

body[data-theme="dark"] .app-shell[data-view="spots"] .spot-card {
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  min-height: 104px;
  border-radius: 18px;
}

body[data-theme="dark"] .app-shell[data-view="spots"] .spot-card img {
  width: 96px;
  height: 88px;
  border-radius: 12px;
}

body[data-theme="dark"] .app-shell[data-view="spots"] .spot-card h3,
body[data-theme="dark"] .spot-post-card strong {
  font-size: 0.96rem;
}

body[data-theme="dark"] .app-shell[data-view="spots"] .spot-posts {
  margin-top: 4px;
}

body[data-theme="dark"] .view-home[data-v2-home] .composer {
  background: rgba(7, 27, 45, 0.92);
  border-radius: 18px;
}

body[data-theme="dark"] .view-home[data-v2-home] .post-head {
  background: rgba(7, 27, 45, 0.72);
}

body[data-theme="dark"] .view-home[data-v2-home] .post-actions {
  min-height: 30px;
}

body[data-theme="dark"] .profile-stats,
body[data-theme="dark"] .profile-tabs,
body[data-theme="dark"] .profile-badges,
body[data-theme="dark"] .profile-posts {
  border-radius: 18px;
}

.app-shell[data-view="explore"] .map-card:not(.is-map-visible),
.app-shell[data-view="spots"] .map-card:not(.is-map-visible) {
  display: none;
}

.app-shell[data-view="explore"] .map-card.is-map-visible,
.app-shell[data-view="spots"] .map-card.is-map-visible,
body[data-theme="dark"] .app-shell[data-view="explore"] .map-card.is-map-visible,
body[data-theme="dark"] .app-shell[data-view="spots"] .map-card.is-map-visible {
  display: block;
}

.explore-dashboard {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.dashboard-weather-card,
.dashboard-badge-card,
.dashboard-post-card,
.dashboard-empty-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-stat-card {
  position: relative;
  min-height: 108px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 11px;
  color: inherit;
  text-align: left;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
}

button.dashboard-stat-card {
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

button.dashboard-stat-card:focus-visible,
button.dashboard-stat-card:hover {
  border-color: color-mix(in srgb, var(--stat-color, var(--reef)) 42%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--stat-color, var(--reef)) 16%, transparent);
}

.dashboard-stat-card.is-clickable:is(.is-spots, .is-divers, .is-instructors, .is-favorites):focus-visible,
.dashboard-stat-card.is-clickable:is(.is-spots, .is-divers, .is-instructors, .is-favorites):hover {
  border-color: color-mix(in srgb, var(--reef) 42%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--reef) 14%, transparent);
  outline: 0;
}

.dashboard-stat-card::after {
  position: absolute;
  top: -36px;
  right: -38px;
  width: 86px;
  height: 86px;
  background: color-mix(in srgb, var(--stat-color, var(--reef)) 25%, transparent);
  border-radius: 50%;
  content: "";
}

.dashboard-stat-card > span:first-child {
  position: relative;
  z-index: 1;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--stat-color, var(--reef));
  background: color-mix(in srgb, var(--stat-color, var(--reef)) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--stat-color, var(--reef)) 22%, transparent);
  border-radius: 50%;
}

.dashboard-stat-emoji {
  font-size: 1.08rem;
  line-height: 1;
}

.dashboard-stat-card .post-action-icon {
  width: 17px;
  height: 17px;
}

.dashboard-stat-card strong {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-size: 1.82rem;
  font-weight: 950;
  line-height: 1;
}

.dashboard-stat-card p {
  position: relative;
  z-index: 1;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.12;
}

.dashboard-stat-card.is-spots { --stat-color: #8edfe0; }
.dashboard-stat-card.is-divers { --stat-color: #a78bfa; }
.dashboard-stat-card.is-instructors { --stat-color: #f4c96b; }
.dashboard-stat-card.is-videographers { --stat-color: #38bdf8; }
.dashboard-stat-card.is-favorites { --stat-color: #ff7d6d; }

.divers-directory-shell {
  display: grid;
  gap: 12px;
}

.divers-directory-count {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--secondary-button-ink);
  background: var(--secondary-button-bg);
  border: 1px solid var(--secondary-button-border);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.divers-search {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 42px;
  margin-bottom: 2px;
  overflow: visible;
}

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

.explore-search.divers-search input {
  min-height: 0;
  font-size: 16px;
  line-height: 1.2;
}

.divers-directory-list {
  display: grid;
  gap: 10px;
}

.diver-directory-card,
.diver-directory-empty {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.diver-directory-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 86px;
  padding: 12px;
  cursor: pointer;
}

.diver-directory-card:hover,
.diver-directory-card:focus-visible {
  border-color: color-mix(in srgb, #a78bfa 34%, var(--line));
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.12);
  outline: 0;
}

.diver-directory-avatar {
  width: 58px;
  height: 58px;
  object-fit: cover;
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.diver-directory-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.diver-directory-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.diver-directory-title > strong {
  display: flex;
  align-items: center;
  min-width: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.14;
}

.diver-directory-title > strong > .user-badge-stack {
  flex: 0 0 auto;
  margin-left: auto;
  padding-left: 10px;
}

.diver-directory-body p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
  line-height: 1.28;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diver-directory-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.diver-directory-metrics span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  color: var(--muted);
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 850;
}

.diver-directory-metrics strong {
  color: var(--ink);
}

.diver-directory-empty {
  padding: 18px;
  color: var(--muted);
}

.diver-directory-empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
}

.diver-directory-empty p {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 760;
}

@media (max-width: 560px) {
  .divers-directory-count {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .diver-directory-card {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 12px;
  }

  .diver-directory-avatar {
    width: 50px;
    height: 50px;
  }

  .diver-directory-title {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .diver-directory-title .cert-status-pill {
    justify-self: start;
  }

  .diver-directory-title > strong > .user-badge-stack {
    max-width: 94px;
  }
}

.dashboard-weather-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 12px;
}

.dashboard-weather-card strong,
.dashboard-badge-card h2,
.dashboard-section-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 950;
  line-height: 1.12;
}

.dashboard-weather-card p,
.dashboard-badge-card p,
.dashboard-section-head span {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.3;
}

.dashboard-weather-card > span {
  color: #60a5fa;
  font-size: 2rem;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.dashboard-badge-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 13px 12px;
}

.dashboard-badge-card.is-clickable {
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.dashboard-badge-card.is-clickable:hover,
.dashboard-badge-card.is-clickable:focus-visible {
  border-color: color-mix(in srgb, var(--reef) 42%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--reef) 14%, transparent);
  outline: 0;
}

.dashboard-badge-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.dashboard-badge-head > strong {
  color: var(--ink);
  font-size: 1.8rem;
  font-weight: 950;
  line-height: 1;
}

.dashboard-badge-head em {
  color: var(--muted);
  font-size: 1rem;
  font-style: normal;
  font-weight: 900;
}

.dashboard-badge-track {
  height: 9px;
  overflow: hidden;
  background: color-mix(in srgb, var(--line) 60%, transparent);
  border-radius: 999px;
}

.dashboard-badge-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #8edfe0, #f4c96b, #ff7d6d);
  border-radius: inherit;
}

.dashboard-badge-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.dashboard-badge-breakdown span,
.dashboard-badge-breakdown button {
  display: grid;
  min-height: 44px;
  align-content: center;
  gap: 3px;
  padding: 7px;
  color: var(--muted);
  background: var(--subpanel);
  border: 1px solid var(--line);
  border-radius: 8px;
  appearance: none;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.1;
  text-align: left;
}

.dashboard-badge-breakdown button {
  cursor: pointer;
}

.dashboard-badge-card:not([data-profile-certification-shortcut]) .dashboard-badge-breakdown button[data-profile-certification-shortcut]::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: var(--radius);
  content: "";
}

.dashboard-badge-breakdown strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 950;
}

.dashboard-post-preview {
  display: grid;
  gap: 9px;
}

.dashboard-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-priority-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 3px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.dashboard-priority-tabs button {
  min-height: 34px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
}

.dashboard-priority-tabs button.active {
  color: #001517;
  background: #8edfe0;
}

.dashboard-post-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 82%);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.dashboard-post-strip::-webkit-scrollbar {
  display: none;
}

.dashboard-post-card {
  overflow: hidden;
  cursor: pointer;
}

.dashboard-post-card:focus-visible {
  outline: 2px solid var(--reef);
  outline-offset: 2px;
}

.dashboard-post-media {
  position: relative;
  height: 154px;
  overflow: hidden;
  background: var(--soft);
}

.dashboard-post-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.dashboard-post-media span {
  position: absolute;
  top: 9px;
  left: 9px;
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  color: #001517;
  background: rgba(142, 223, 224, 0.94);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 950;
}

.dashboard-post-body {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.dashboard-post-author {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dashboard-post-body strong {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1.18;
}

.dashboard-post-author > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-post-author .user-badge-stack {
  flex: 0 0 auto;
  justify-content: flex-end;
  max-width: 118px;
  flex-wrap: nowrap;
}

.dashboard-post-body p,
.dashboard-post-metrics {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 760;
  line-height: 1.25;
}

.dashboard-post-metrics {
  display: flex;
  gap: 12px;
}

.dashboard-empty-card {
  min-height: 210px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 16px;
}

.dashboard-empty-card strong {
  color: var(--ink);
}

.dashboard-empty-card p {
  margin: 0;
  color: var(--muted);
}

.spot-filter-count {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  margin-left: 6px;
  padding: 0 6px;
  color: inherit;
  background: color-mix(in srgb, currentColor 12%, transparent);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 950;
  line-height: 1;
}

.spot-card-open {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--reef);
  font-size: 1.22rem;
  font-weight: 950;
  line-height: 1;
  pointer-events: none;
  transition: transform 160ms ease, color 160ms ease;
}

.spot-card-body > p:last-child {
  padding-right: 34px;
}

.spot-card:hover .spot-card-open,
.spot-card:focus-visible .spot-card-open {
  transform: translateX(2px);
}

body[data-theme="dark"] .explore-dashboard {
  color: #f5f5f5;
}

body[data-theme="dark"] .dashboard-weather-card,
body[data-theme="dark"] .dashboard-badge-card,
body[data-theme="dark"] .dashboard-post-card,
body[data-theme="dark"] .dashboard-empty-card,
body[data-theme="dark"] .dashboard-stat-card,
body[data-theme="dark"] .dashboard-priority-tabs,
body[data-theme="dark"] .diver-directory-card,
body[data-theme="dark"] .diver-directory-empty {
  background: #121212;
  border-color: #1f2528;
  box-shadow: none;
}

body[data-theme="dark"] .dashboard-badge-breakdown span,
body[data-theme="dark"] .dashboard-badge-breakdown button,
body[data-theme="dark"] .diver-directory-metrics span {
  background: #1a1a1a;
  border-color: #262626;
}

body[data-theme="dark"] .dashboard-weather-card strong,
body[data-theme="dark"] .dashboard-badge-card h2,
body[data-theme="dark"] .dashboard-badge-card strong,
body[data-theme="dark"] .dashboard-section-head h2,
body[data-theme="dark"] .dashboard-post-body strong,
body[data-theme="dark"] .dashboard-stat-card strong,
body[data-theme="dark"] .diver-directory-title > strong,
body[data-theme="dark"] .diver-directory-empty strong,
body[data-theme="dark"] .diver-directory-metrics strong {
  color: #f5f5f5;
}

body[data-theme="dark"] .dashboard-weather-card p,
body[data-theme="dark"] .dashboard-badge-card p,
body[data-theme="dark"] .dashboard-badge-head em,
body[data-theme="dark"] .dashboard-section-head span,
body[data-theme="dark"] .dashboard-post-body p,
body[data-theme="dark"] .dashboard-post-metrics,
body[data-theme="dark"] .dashboard-stat-card p,
body[data-theme="dark"] .diver-directory-body p,
body[data-theme="dark"] .diver-directory-empty,
body[data-theme="dark"] .diver-directory-metrics span {
  color: #a8a8a8;
}

body[data-theme="dark"] .app-shell[data-view="explore"] .map-layout {
  gap: 12px;
}

body[data-theme="dark"] .app-shell[data-view="explore"] .spot-list {
  position: static;
  grid-auto-flow: row;
  grid-auto-columns: auto;
  gap: 10px;
  overflow: visible;
  margin: 0;
  padding: 0;
}

body[data-theme="dark"] .app-shell[data-view="explore"] .spot-card {
  grid-template-columns: 86px minmax(0, 1fr);
}

body[data-theme="dark"] .app-shell[data-view="spots"] .spot-card {
  grid-template-columns: 96px minmax(0, 1fr);
}

body[data-theme="light"] {
  color-scheme: light;
  --ink: #102b31;
  --muted: #5f7277;
  --line: rgba(8, 63, 77, 0.14);
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --soft: #eef7f6;
  --subpanel: #f5fbfa;
  --subpanel-strong: #e8f6f4;
  --app-bg: #eef7f6;
  --deep: #075363;
  --reef: #0b8f8a;
  --coral: #e76551;
  --sun: #dba034;
  --kelp: #3f7054;
  --primary-button-bg: #075363;
  --primary-button-ink: #ffffff;
  --secondary-button-bg: rgba(11, 143, 138, 0.1);
  --secondary-button-ink: #075363;
  --secondary-button-border: rgba(11, 143, 138, 0.22);
  --shadow: 0 18px 46px rgba(8, 63, 77, 0.12);
  background: linear-gradient(180deg, #f8fcfc 0%, #eef7f6 58%, #e7f1ef 100%);
}

body[data-theme="light"] .rail {
  align-items: center;
  padding: 18px 10px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(8, 63, 77, 0.1);
  border-radius: 24px;
  box-shadow: 0 16px 42px rgba(8, 63, 77, 0.1);
}

body[data-theme="light"] .brand {
  justify-content: center;
}

body[data-theme="light"] .rail .nav-link {
  justify-content: center;
  width: 54px;
  min-height: 50px;
  padding: 0;
  color: rgba(16, 43, 49, 0.58);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 18px;
}

body[data-theme="light"] .rail .nav-link.active,
body[data-theme="light"] .rail .nav-link:hover {
  color: var(--deep);
  background: rgba(11, 143, 138, 0.12);
  border-color: rgba(11, 143, 138, 0.2);
}

body[data-theme="light"] .nav-link.active {
  color: var(--reef);
  background: transparent;
}

body[data-theme="light"] .topbar {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(8, 63, 77, 0.1);
  backdrop-filter: blur(18px);
}

body[data-theme="light"] .wordmark {
  color: var(--ink);
}

body[data-theme="light"] .brand-mark {
  box-shadow: 0 0 0 2px rgba(11, 143, 138, 0.16), 0 10px 24px rgba(8, 63, 77, 0.12);
}

body[data-theme="light"] .message-button,
body[data-theme="light"] .topbar .menu-button {
  color: var(--deep);
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(8, 63, 77, 0.12);
}

body[data-theme="light"] .app-purpose {
  border-bottom-color: rgba(8, 63, 77, 0.12);
}

body[data-theme="light"] .app-purpose .eyebrow {
  color: var(--reef);
}

body[data-theme="light"] .composer,
body[data-theme="light"] .post,
body[data-theme="light"] .login-card,
body[data-theme="light"] .leaderboard,
body[data-theme="light"] .spot-card,
body[data-theme="light"] .badge-card,
body[data-theme="light"] .profile-stats,
body[data-theme="light"] .profile-badges,
body[data-theme="light"] .profile-post-card,
body[data-theme="light"] .location-tabs,
body[data-theme="light"] .spot-post-card,
body[data-theme="light"] .location-forum,
body[data-theme="light"] .forum-composer,
body[data-theme="light"] .side-panel > *,
body[data-theme="light"] .dashboard-weather-card,
body[data-theme="light"] .dashboard-badge-card,
body[data-theme="light"] .dashboard-post-card,
body[data-theme="light"] .dashboard-empty-card,
body[data-theme="light"] .dashboard-stat-card,
body[data-theme="light"] .dashboard-priority-tabs,
body[data-theme="light"] .diver-directory-card,
body[data-theme="light"] .diver-directory-empty {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(8, 63, 77, 0.1);
  box-shadow: 0 14px 34px rgba(8, 63, 77, 0.08);
}

body[data-theme="light"] .view-home[data-v2-home] .composer-button,
body[data-theme="light"] .badge-pill,
body[data-theme="light"] .cert-status-pill,
body[data-theme="light"] .text-button,
body[data-theme="light"] .secondary-button,
body[data-theme="light"] .dashboard-badge-breakdown span,
body[data-theme="light"] .dashboard-badge-breakdown button,
body[data-theme="light"] .diver-directory-metrics span {
  color: var(--deep);
  background: rgba(11, 143, 138, 0.08);
  border-color: rgba(11, 143, 138, 0.16);
}

body[data-theme="light"] .primary-button,
body[data-theme="light"] .cta,
body[data-theme="light"] .compose-next-button {
  color: #ffffff;
  background: linear-gradient(180deg, #0b8f8a, #075363);
  border-color: transparent;
}

body[data-theme="light"] .post-user strong,
body[data-theme="light"] .post-caption,
body[data-theme="light"] .section-head h1,
body[data-theme="light"] .section-head h2,
body[data-theme="light"] .spot-card h3,
body[data-theme="light"] .badge-card h3,
body[data-theme="light"] .profile-info h1,
body[data-theme="light"] .profile-stats strong,
body[data-theme="light"] .dashboard-weather-card strong,
body[data-theme="light"] .dashboard-badge-card h2,
body[data-theme="light"] .dashboard-badge-card strong,
body[data-theme="light"] .dashboard-section-head h2,
body[data-theme="light"] .dashboard-post-body strong,
body[data-theme="light"] .dashboard-stat-card strong,
body[data-theme="light"] .diver-directory-title > strong,
body[data-theme="light"] .diver-directory-empty strong,
body[data-theme="light"] .diver-directory-metrics strong {
  color: var(--ink);
}

body[data-theme="light"] .post-caption-more,
body[data-theme="light"] .spot-card p:not(.spot-meta):not(.spot-card-activity),
body[data-theme="light"] .dashboard-weather-card p,
body[data-theme="light"] .dashboard-badge-card p,
body[data-theme="light"] .dashboard-badge-head em,
body[data-theme="light"] .dashboard-section-head span,
body[data-theme="light"] .dashboard-post-body p,
body[data-theme="light"] .dashboard-post-metrics,
body[data-theme="light"] .dashboard-stat-card p,
body[data-theme="light"] .diver-directory-body p,
body[data-theme="light"] .diver-directory-empty,
body[data-theme="light"] .diver-directory-metrics span {
  color: var(--muted);
}

body[data-theme="light"] .spot-card-activity span {
  background: rgba(63, 112, 84, 0.09);
  border-color: rgba(63, 112, 84, 0.14);
}

body[data-theme="light"] .profile-hero {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(8, 63, 77, 0.1);
  border-radius: 24px;
  box-shadow: 0 14px 34px rgba(8, 63, 77, 0.08);
}

body[data-theme="light"] .profile-cover {
  filter: saturate(1.04) brightness(1.02);
}

body[data-theme="light"] .profile-tabs {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(8, 63, 77, 0.1);
}

body[data-theme="light"] .profile-tab-button {
  color: rgba(16, 43, 49, 0.62);
  background: transparent;
}

body[data-theme="light"] .profile-tab-button.active {
  color: var(--reef);
}

body[data-theme="light"] .bottom-nav {
  background: rgba(255, 255, 255, 0.96);
  border-top-color: rgba(8, 63, 77, 0.1);
  box-shadow: 0 -16px 38px rgba(8, 63, 77, 0.1);
}

body[data-theme="light"] .bottom-nav .nav-link {
  color: rgba(16, 43, 49, 0.58);
  background: transparent;
  border: 0;
}

body[data-theme="light"] .bottom-nav .nav-link.active {
  color: var(--reef);
}

body[data-theme="light"] .modal,
body[data-theme="light"] .modal-panel,
body[data-theme="light"] #composeModal form,
body[data-theme="light"] .comments-panel,
body[data-theme="light"] .post-options-panel,
body[data-theme="light"] .post-share-panel,
body[data-theme="light"] .messages-panel,
body[data-theme="light"] .side-drawer-panel {
  color: var(--ink);
  background: #ffffff;
  border-color: rgba(8, 63, 77, 0.12);
}

body[data-theme="light"] input,
body[data-theme="light"] select,
body[data-theme="light"] textarea {
  color: var(--ink);
  background-color: rgba(255, 255, 255, 0.92);
  border-color: rgba(8, 63, 77, 0.14);
}

body[data-theme="light"] input::placeholder,
body[data-theme="light"] textarea::placeholder {
  color: rgba(16, 43, 49, 0.42);
}

@media (max-width: 980px) {
  body[data-theme="light"] {
    background: #eef7f6;
  }

  body[data-theme="light"] .topbar {
    min-height: calc(56px + env(safe-area-inset-top, 0px));
    padding: calc(7px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 7px max(12px, env(safe-area-inset-left, 0px));
  }

  html[data-native-app="android"] body[data-theme="light"] .topbar {
    min-height: 64px;
    padding-top: 16px;
  }

  body[data-theme="light"] .main {
    width: min(100%, var(--v2-feed-width));
    padding: calc(62px + env(safe-area-inset-top, 0px)) 0 calc(var(--v2-nav-height) + 16px + env(safe-area-inset-bottom, 0px));
  }

  html[data-native-app="android"] body[data-theme="light"] .main {
    padding-top: 72px;
  }

  body[data-theme="light"] .view-home[data-v2-home] .stories {
    background: rgba(255, 255, 255, 0.96);
    border-bottom-color: rgba(8, 63, 77, 0.1);
  }

  body[data-theme="light"] .view-home[data-v2-home] .composer {
    margin: 8px 12px var(--v2-feed-gap);
    border-radius: 16px;
  }

  body[data-theme="light"] .view-home[data-v2-home] .post {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  body[data-theme="light"] .bottom-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(var(--v2-nav-height) + env(safe-area-inset-bottom, 0px));
    padding: 2px 8px max(2px, env(safe-area-inset-bottom, 0px));
  }

  body[data-theme="light"] .map-layout,
  body[data-theme="light"] .profile-hero,
  body[data-theme="light"] .profile-stats,
  body[data-theme="light"] .profile-tabs,
  body[data-theme="light"] .profile-badges,
  body[data-theme="light"] .profile-posts {
    margin-right: 12px;
    margin-left: 12px;
  }

  body[data-theme="light"] .section-head {
    padding: 12px;
  }

  body[data-theme="light"] .app-shell[data-view="explore"] .map-layout {
    margin-right: 0;
    margin-left: 0;
  }

  body[data-theme="light"] .app-shell[data-view="explore"] .map-card.is-map-visible,
  body[data-theme="light"] .app-shell[data-view="explore"] .philippines-map {
    min-height: 260px;
    border-radius: 18px;
  }

  body[data-theme="light"] .app-shell[data-view="spots"] .map-layout,
  body[data-theme="light"] .app-shell[data-view="spots"] .spot-posts {
    margin-right: 12px;
    margin-left: 12px;
  }

  body[data-theme="light"] .app-shell[data-view="spots"] .spot-list,
  body[data-theme="light"] .app-shell[data-view="explore"] .spot-list {
    margin: 0 12px;
  }

  body[data-theme="light"] .app-shell[data-view="spots"] .spot-card {
    grid-template-columns: 88px minmax(0, 1fr);
    min-height: 96px;
    padding: 8px;
  }

  body[data-theme="light"] .app-shell[data-view="spots"] .spot-card img {
    width: 88px;
    height: 80px;
  }

  body[data-theme="light"] .app-shell[data-view="explore"] .spot-card {
    grid-template-columns: 86px minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  body[data-theme="dark"] .topbar {
    min-height: calc(56px + env(safe-area-inset-top, 0px));
  }

  body[data-theme="dark"] .app-shell[data-view="explore"] .section-head {
    padding-top: 10px;
  }

  body[data-theme="dark"] .app-shell[data-view="explore"] .map-layout {
    margin-right: 0;
    margin-left: 0;
  }

  body[data-theme="dark"] .app-shell[data-view="explore"] .map-card,
  body[data-theme="dark"] .app-shell[data-view="explore"] .philippines-map {
    min-height: calc(100dvh - 238px);
    border-radius: 0;
  }

  body[data-theme="dark"] .app-shell[data-view="explore"] .spot-list {
    grid-auto-columns: minmax(260px, 78%);
    margin-top: -104px;
    padding-right: 12px;
    padding-left: 12px;
  }

  body[data-theme="dark"] .app-shell[data-view="spots"] .map-layout,
  body[data-theme="dark"] .app-shell[data-view="spots"] .spot-posts {
    margin-right: 12px;
    margin-left: 12px;
  }

  body[data-theme="dark"] .app-shell[data-view="spots"] .spot-list {
    margin: 0 12px;
  }

  body[data-theme="dark"] .app-shell[data-view="spots"] .spot-card {
    grid-template-columns: 88px minmax(0, 1fr);
    min-height: 96px;
    padding: 8px;
  }

  body[data-theme="dark"] .app-shell[data-view="spots"] .spot-card img {
    width: 88px;
    height: 80px;
  }

  body[data-theme="dark"] .bottom-nav .nav-link.active {
    color: #15d4ff;
  }
}

@media (max-width: 980px) {
  .explore-dashboard {
    margin-right: 12px;
    margin-left: 12px;
  }

  .dashboard-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-theme="dark"] .app-shell[data-view="explore"] .map-card.is-map-visible,
  body[data-theme="dark"] .app-shell[data-view="explore"] .philippines-map {
    min-height: 260px;
    border-radius: 18px;
  }

  body[data-theme="dark"] .app-shell[data-view="explore"] .spot-list {
    position: static;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 10px;
    overflow: visible;
    margin: 0 12px;
    padding: 0;
  }

  body[data-theme="dark"] .app-shell[data-view="explore"] .spot-card {
    grid-template-columns: 86px minmax(0, 1fr);
  }
}

.v2-onboarding {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top, 0px)) 18px max(18px, env(safe-area-inset-bottom, 0px));
  color: #f6fbff;
  background: #020b14;
}

.v2-onboarding[hidden] {
  display: none;
}

body.v2-onboarding-open {
  overflow: hidden;
}

.v2-onboarding-screen {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: min(100%, var(--v2-feed-width));
  min-height: min(760px, 100dvh - 24px);
  overflow: hidden;
  background: #06192a;
  border: 1px solid rgba(151, 196, 224, 0.16);
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.v2-onboarding-status {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  padding: 14px 16px 0;
  color: rgba(246, 251, 255, 0.86);
  font-size: 0.72rem;
  font-weight: 900;
}

.v2-onboarding-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 11, 20, 0.08), rgba(2, 11, 20, 0.18) 42%, rgba(2, 11, 20, 0.94) 78%),
    url("onboarding-freedive.jpg") center / cover no-repeat;
}

.v2-onboarding-copy {
  position: relative;
  z-index: 2;
  align-self: end;
  padding: 0 22px 18px;
}

.v2-onboarding-copy img {
  width: 54px;
  height: 54px;
  margin-bottom: 18px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(21, 212, 255, 0.22);
}

.v2-onboarding-copy h1 {
  max-width: 12ch;
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 2rem;
  line-height: 0.98;
}

.v2-onboarding-copy p {
  max-width: 30ch;
  margin: 0;
  color: rgba(246, 251, 255, 0.76);
  font-size: 0.78rem;
  line-height: 1.34;
}

.v2-onboarding-copy p + p {
  margin-top: 8px;
}

.v2-onboarding-dots {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 4px 0 18px;
}

.v2-onboarding-dots span {
  width: 7px;
  height: 7px;
  background: rgba(246, 251, 255, 0.36);
  border-radius: 50%;
}

.v2-onboarding-dots span:first-child {
  width: 18px;
  background: #15d4ff;
  border-radius: 999px;
}

.v2-onboarding-actions {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
  padding: 0 22px 24px;
}

.v2-onboarding-actions .primary-button,
.v2-onboarding-actions .secondary-button {
  width: 100%;
  border-radius: 999px;
}

.v2-onboarding-legal {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 850;
}

.v2-onboarding-legal a {
  color: rgba(246, 251, 255, 0.82);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.explore-controls {
  display: grid;
  gap: 9px;
  padding: 0 12px 12px;
}

.explore-controls[hidden] {
  display: none;
}

.explore-search {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  color: #a8a8a8;
  background: #262626;
  background-color: #262626;
  border: 1px solid #262626;
  border-radius: 14px;
  box-shadow: none;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.explore-search:focus-within {
  color: #f5f5f5;
  background: #262626;
  background-color: #262626;
  border-color: #3a3a3a;
  box-shadow: 0 0 0 3px rgba(0, 149, 246, 0.12);
}

.explore-search span {
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2.2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2.2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.explore-search input {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  color: #f5f5f5;
  background: transparent !important;
  background-color: transparent !important;
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
  outline: 0;
  font-size: 0.9rem;
  font-weight: 750;
}

.explore-search:focus-within input {
  background: transparent !important;
  background-color: transparent !important;
}

.explore-search input::placeholder {
  color: #a8a8a8;
  opacity: 1;
}

.explore-search input::-webkit-search-cancel-button,
.explore-search input::-webkit-search-decoration,
.explore-search input::-webkit-search-results-button,
.explore-search input::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

.view-spots .explore-search {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 42px;
  overflow: hidden;
}

.view-spots .explore-search,
.view-spots .explore-search *,
.view-spots .explore-search *::before,
.view-spots .explore-search *::after {
  box-sizing: border-box;
}

.view-spots .explore-search input {
  min-height: 0;
  font-size: 16px;
  line-height: 1.2;
}

.explore-filter-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.divers-filter-row {
  justify-content: center;
  justify-content: safe center;
}

.explore-filter-row::-webkit-scrollbar {
  display: none;
}

.explore-filter-row button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 12px;
  color: #a8a8a8;
  background: #121212;
  border: 1px solid #262626;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
}

.explore-filter-row button.active {
  color: #ffffff;
  background: #0095f6;
  border-color: #0095f6;
}

.spot-card-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
  padding-right: 52px;
}

.spot-card-title h3 {
  min-width: 0;
}

.spot-favorite-button,
.spot-detail-actions button {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  color: rgba(246, 251, 255, 0.68);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(151, 196, 224, 0.14);
  border-radius: 50%;
  cursor: pointer;
  font-weight: 900;
}

.app-shell[data-view="spots"] .spot-card {
  align-items: start;
}

.app-shell[data-view="spots"] .spot-card > img {
  align-self: start;
  margin-top: 30px;
}

.app-shell[data-view="spots"] .spot-card-body {
  align-self: start;
}

.app-shell[data-view="spots"] .spot-card .spot-favorite-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
}

.app-shell[data-view="spots"] .spot-card-title h3 {
  margin-bottom: 2px;
}

.app-shell[data-view="spots"] .spot-card-body .spot-meta {
  box-sizing: border-box;
  margin-top: 2px;
  margin-bottom: 6px;
  padding-right: 52px;
}

.app-shell[data-view="spots"] .spot-card-body .spot-card-activity {
  margin-top: 0;
}

.spot-favorite-button.is-favorite,
.spot-detail-actions button.is-favorite {
  color: #ff5a78;
  background: rgba(255, 90, 120, 0.16);
  border-color: rgba(255, 90, 120, 0.32);
}

.spot-detail-hero,
.spot-conditions-panel,
.spot-media-panel {
  overflow: hidden;
  background: rgba(7, 27, 45, 0.92);
  border: 1px solid rgba(151, 196, 224, 0.12);
  border-radius: 22px;
}

.spot-detail-cover {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.spot-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) brightness(0.82);
}

.spot-detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 11, 20, 0.05), rgba(2, 11, 20, 0.78));
}

.spot-detail-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
}

.spot-detail-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.spot-detail-body h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.45rem;
}

.spot-detail-body p {
  margin: 0;
}

.spot-detail-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.spot-detail-chip-row span,
.spot-condition-note {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  color: #3be7a5;
  background: rgba(59, 231, 165, 0.09);
  border: 1px solid rgba(59, 231, 165, 0.12);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 850;
}

.spot-detail-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 0;
  scrollbar-width: none;
}

.spot-detail-tabs::-webkit-scrollbar {
  display: none;
}

.spot-detail-tabs button {
  flex: 1 0 auto;
  min-height: 34px;
  padding: 0 10px;
  color: rgba(246, 251, 255, 0.66);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 0.78rem;
  font-weight: 900;
}

.spot-detail-tabs button.active {
  color: #15d4ff;
  border-bottom-color: #15d4ff;
}

.spot-detail-tabs [data-location-tab="instructor"] {
  font-size: 0.72rem;
  line-height: 1.06;
}

.spot-conditions-panel,
.spot-media-panel {
  padding: 12px;
}

.spot-condition-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.spot-condition-grid div {
  display: grid;
  gap: 3px;
  min-height: 70px;
  align-content: center;
  padding: 10px 6px;
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(151, 196, 224, 0.1);
  border-radius: 14px;
}

.spot-condition-grid strong {
  color: #ffffff;
  font-size: 0.98rem;
}

.spot-condition-grid span {
  color: rgba(246, 251, 255, 0.62);
  font-size: 0.66rem;
}

.spot-condition-note {
  margin-top: 10px;
  width: 100%;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
  border-radius: 14px;
  text-align: center;
}

.spot-weather-source {
  color: rgba(246, 251, 255, 0.58);
  font-size: 0.66rem;
}

.spot-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.spot-media-grid img {
  aspect-ratio: 1;
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
}

@media (max-width: 560px) {
  .v2-onboarding {
    padding: 0;
  }

  .v2-onboarding-screen {
    width: 100%;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .spot-condition-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Keep Messages on the pre-v2 dark palette while the rest of v2 stays blue. */
body[data-theme="dark"] #messagesSheet,
body[data-theme="dark"] #messagesSheet .messages-panel {
  --ink: #f5f5f5;
  --muted: #a8a8a8;
  --line: #2f3336;
  --panel: #121212;
  --panel-strong: #161616;
  --soft: #000000;
  --subpanel: #1a1a1a;
  --subpanel-strong: #262626;
  --app-bg: #000000;
  --deep: #8edfe0;
  --reef: #38b9b0;
  --coral: #ff8a73;
  --sun: #f6c35f;
  --kelp: #7aa48a;
  --primary-button-bg: #8edfe0;
  --primary-button-ink: #062329;
  --secondary-button-bg: #121212;
  --secondary-button-ink: #f5f5f5;
  --secondary-button-border: #2f3336;
}

body[data-theme="dark"] #messagesSheet.messages-sheet,
body[data-theme="dark"] #messagesSheet .messages-list {
  background: var(--app-bg);
}

body[data-theme="dark"] #messagesSheet .messages-panel,
body[data-theme="dark"] #messagesSheet .message-composer {
  color: var(--ink);
  background: var(--panel);
  border-color: var(--line);
}

body[data-theme="dark"] #messagesSheet .message-thread-row {
  color: var(--ink);
  background: var(--panel);
  border-bottom-color: var(--line);
}

body[data-theme="dark"] #messagesSheet .message-thread-row.is-unread {
  background: var(--subpanel-strong);
}

body[data-theme="dark"] #messagesSheet .message-bubble,
body[data-theme="dark"] #messagesSheet .message-bubble-row.has-media .message-bubble p {
  color: var(--ink);
  background: var(--subpanel);
  border-color: var(--line);
}

body[data-theme="dark"] #messagesSheet .message-bubble-row.has-media .message-bubble {
  color: var(--ink);
  background: transparent;
  border: 0;
}

body[data-theme="dark"] #messagesSheet .message-bubble-row.has-media .message-image-button {
  background: var(--app-bg);
}

body[data-theme="dark"] #messagesSheet .message-bubble-row.has-media .message-image {
  background: var(--app-bg);
}

body[data-theme="dark"] #messagesSheet .message-bubble-row.is-own:not(.has-media) .message-bubble,
body[data-theme="dark"] #messagesSheet .message-bubble-row.has-media.is-own .message-bubble p {
  color: #111827;
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.74);
}

@media (prefers-color-scheme: dark) {
  body[data-theme="auto"] #messagesSheet,
  body[data-theme="auto"] #messagesSheet .messages-panel {
    --ink: #f5f5f5;
    --muted: #a8a8a8;
    --line: #2f3336;
    --panel: #121212;
    --panel-strong: #161616;
    --soft: #000000;
    --subpanel: #1a1a1a;
    --subpanel-strong: #262626;
    --app-bg: #000000;
    --deep: #8edfe0;
    --reef: #38b9b0;
    --coral: #ff8a73;
    --sun: #f6c35f;
    --kelp: #7aa48a;
    --primary-button-bg: #8edfe0;
    --primary-button-ink: #062329;
    --secondary-button-bg: #121212;
    --secondary-button-ink: #f5f5f5;
    --secondary-button-border: #2f3336;
  }

  body[data-theme="auto"] #messagesSheet.messages-sheet,
  body[data-theme="auto"] #messagesSheet .messages-list {
    background: var(--app-bg);
  }

  body[data-theme="auto"] #messagesSheet .messages-panel,
  body[data-theme="auto"] #messagesSheet .message-composer {
    color: var(--ink);
    background: var(--panel);
    border-color: var(--line);
  }

  body[data-theme="auto"] #messagesSheet .message-thread-row {
    color: var(--ink);
    background: var(--panel);
    border-bottom-color: var(--line);
  }

  body[data-theme="auto"] #messagesSheet .message-thread-row.is-unread {
    background: var(--subpanel-strong);
  }

  body[data-theme="auto"] #messagesSheet .message-bubble,
  body[data-theme="auto"] #messagesSheet .message-bubble-row.has-media .message-bubble p {
    color: var(--ink);
    background: var(--subpanel);
    border-color: var(--line);
  }

  body[data-theme="auto"] #messagesSheet .message-bubble-row.has-media .message-bubble {
    color: var(--ink);
    background: transparent;
    border: 0;
  }

  body[data-theme="auto"] #messagesSheet .message-bubble-row.has-media .message-image-button {
    background: var(--app-bg);
  }

  body[data-theme="auto"] #messagesSheet .message-bubble-row.has-media .message-image {
    background: var(--app-bg);
  }

  body[data-theme="auto"] #messagesSheet .message-bubble-row.is-own:not(.has-media) .message-bubble,
  body[data-theme="auto"] #messagesSheet .message-bubble-row.has-media.is-own .message-bubble p {
    color: #111827;
    background: #ffffff;
    border-color: rgba(255, 255, 255, 0.74);
  }
}

/* Android shell guard: keep tappable UI out of the status and 3-button nav bars. */
:root {
  --app-safe-top: env(safe-area-inset-top, 0px);
  --app-safe-bottom: env(safe-area-inset-bottom, 0px);
  --android-safe-top: 0px;
  --android-safe-bottom: 0px;
  --android-control-safe-bottom: 0px;
  --android-message-safe-bottom: var(--android-control-safe-bottom);
}

html[data-android-shell="true"],
html[data-native-app="android"] {
  --app-safe-top: max(env(safe-area-inset-top, 0px), 28px);
  --app-safe-bottom: max(env(safe-area-inset-bottom, 0px), 56px);
}

html[data-android-shell="true"][data-android-insets="true"],
html[data-native-app="android"][data-android-insets="true"] {
  --app-safe-top: max(env(safe-area-inset-top, 0px), var(--android-safe-top));
  --app-safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--android-safe-bottom), 16px);
}

@media (max-width: 980px) {
  .topbar {
    min-height: calc(56px + var(--app-safe-top));
    padding-top: calc(7px + var(--app-safe-top));
    padding-bottom: 8px;
  }

  .main,
  body[data-theme="dark"] .main,
  body[data-theme="light"] .main {
    padding-top: calc(64px + var(--app-safe-top));
    padding-bottom: calc(var(--v2-nav-height) + 32px + var(--app-safe-bottom));
    scroll-padding-top: calc(64px + var(--app-safe-top));
  }

  .bottom-nav,
  body[data-theme="dark"] .bottom-nav,
  body[data-theme="light"] .bottom-nav {
    min-height: calc(var(--v2-nav-height) + 8px + var(--app-safe-bottom));
    padding-top: 6px;
    padding-bottom: calc(8px + var(--app-safe-bottom));
  }

  .bottom-nav .nav-link,
  body[data-theme="dark"] .bottom-nav .nav-link {
    min-height: 48px;
    padding-block: 4px;
  }

  .v2-log-dive-button {
    bottom: calc(var(--v2-nav-height) + 22px + var(--app-safe-bottom));
  }

  .view-profile {
    padding-bottom: calc(var(--v2-nav-height) + 58px + var(--app-safe-bottom));
  }

  .profile-cover {
    height: clamp(150px, 42vw, 190px);
    object-position: center center;
  }

  .profile-info {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    align-items: start;
    column-gap: 12px;
    row-gap: 10px;
    padding: 14px 14px 16px;
  }

  .profile-photo {
    width: 84px;
    height: 84px;
    margin-top: 0;
    object-position: center center;
    border-width: 3px;
  }

  .profile-bio {
    grid-column: 1 / -1;
    margin-top: -8px;
  }

  html[data-android-shell="true"] .v2-onboarding-status,
  html[data-native-app="android"] .v2-onboarding-status {
    padding-top: calc(14px + var(--app-safe-top));
  }

  html[data-android-shell="true"] .v2-onboarding-actions,
  html[data-native-app="android"] .v2-onboarding-actions {
    padding-bottom: calc(24px + var(--app-safe-bottom));
  }
}

body[data-theme] #likesSheet .likes-panel {
  color: #f5f5f5;
  background: #111418;
  border-color: #2f3336;
}

body[data-theme] #likesSheet .likes-search input {
  color: #f5f5f5;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body[data-theme] #likesSheet .likes-header .close-button {
  color: #f5f5f5;
  background: transparent;
  border-color: transparent;
}

/* Final Messages mobile guard: keep group controls stable and override the nav icon fallback. */
#messagesSheet {
  inline-size: 100dvw;
  max-inline-size: 100dvw;
  min-inline-size: 0;
  overflow-x: hidden;
}

#messagesSheet .messages-panel,
#messagesSheet .messages-list {
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

#messagesSheet .messages-header {
  --message-header-button: 46px;
  --message-header-actions: 100px;
  display: grid;
  align-items: center;
  column-gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

#messagesSheet .messages-header:not(.is-thread):not(.is-group-create) {
  grid-template-columns: var(--message-header-button) minmax(0, 1fr) var(--message-header-actions);
}

#messagesSheet .messages-header.is-group-create {
  grid-template-columns: var(--message-header-button) minmax(0, 1fr) var(--message-header-button);
}

#messagesSheet .messages-header.is-thread {
  grid-template-columns: var(--message-header-button) 38px minmax(0, 1fr) var(--message-header-button);
}

#messagesSheet .messages-header > div,
#messagesSheet .messages-header h2,
#messagesSheet .messages-header p {
  min-width: 0;
  max-width: 100%;
}

#messagesSheet .messages-header-actions {
  width: var(--message-header-actions);
  min-width: var(--message-header-actions);
  max-width: var(--message-header-actions);
}

#messagesSheet [data-open-message-group] .icon,
#messagesSheet [data-open-message-group] .icon-plus {
  width: 24px;
  height: 24px;
  background: currentColor;
  mask-image: var(--icon-plus) !important;
  -webkit-mask-image: var(--icon-plus) !important;
}

#messagesSheet [data-open-message-group-info] .icon,
#messagesSheet [data-open-message-group-info] .icon-user {
  width: 24px;
  height: 24px;
  background: currentColor;
  mask-image: var(--icon-user) !important;
  -webkit-mask-image: var(--icon-user) !important;
}

#messagesSheet .message-group-form,
#messagesSheet .message-group-top,
#messagesSheet .message-group-name,
#messagesSheet .message-group-search,
#messagesSheet .message-group-user-list,
#messagesSheet .message-group-actions,
#messagesSheet .message-group-info,
#messagesSheet .message-group-summary,
#messagesSheet .message-group-info-section,
#messagesSheet .message-group-member-list,
#messagesSheet .message-group-add-panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

#messagesSheet .message-group-name input,
#messagesSheet .message-group-search input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-size: 16px;
}

@media (max-width: 520px) {
  #messagesSheet .messages-header {
    --message-header-button: 46px;
    --message-header-actions: 100px;
    padding-inline: max(10px, env(safe-area-inset-left, 0px)) max(10px, env(safe-area-inset-right, 0px));
  }

  #messagesSheet .messages-header.is-thread {
    grid-template-columns: 42px 36px minmax(0, 1fr) 42px;
  }

  #messagesSheet .messages-header-actions {
    gap: 8px;
  }
}

.app-shell[data-view="forum"] {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

.app-shell[data-view="forum"] .main,
.app-shell[data-view="forum"] .view-forum,
.app-shell[data-view="forum"] .forum-page-shell {
  width: 100% !important;
  max-width: 100% !important;
}

@media (max-width: 980px) {
  body[data-theme] .app-shell[data-view="spots"] .map-layout,
  body[data-theme] .app-shell[data-view="spots"] #spotPosts.spot-posts {
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  #spotPosts .spot-detail-tabs {
    gap: 4px;
    padding-inline: 0;
  }

  #spotPosts .spot-detail-tabs button {
    min-height: 36px;
    padding-inline: 4px;
    font-size: clamp(0.66rem, 2.6vw, 0.72rem);
    line-height: 1.04;
    overflow-wrap: normal;
    white-space: nowrap;
  }

  #spotPosts .spot-detail-tabs [data-location-tab="conditions"] {
    font-size: clamp(0.56rem, 2.25vw, 0.64rem);
  }

  #spotPosts .spot-detail-tabs [data-location-tab="instructor"] {
    font-size: clamp(0.6rem, 2.35vw, 0.66rem);
    line-height: 1.05;
  }
}
