@font-face {
  font-family: "Gopher";
  src: url("assets/Gopher/Gopher_regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gopher";
  src: url("assets/Gopher/Gopher_regular_italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Gopher";
  src: url("assets/Gopher/Gopher_Bold.otf") format("opentype");
  font-weight: 700 950;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-title: "Gopher", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #174950;
  --muted: rgba(23, 73, 80, 0.68);
  --brand-cream: #ECEFD0;
  --brand-orange: #F2552C;
  --brand-teal: #174950;
  --brand-pink: #F9A9AC;
  --login-theme-background: #E37A58;
  --page-background: #ffffff;
  --surface-body: #ffffff;
  --surface-header: var(--brand-cream);
  --menu-header-background: var(--brand-pink);
  --modal-header-background: var(--brand-pink);
  --post-header-background: var(--surface-header);
  --topbar-background: var(--surface-header);
  --paper: var(--page-background);
  --panel: var(--surface-body);
  --line: rgba(23, 73, 80, 0.18);
  --rose: #F2552C;
  --rose-dark: #c23f20;
  --sage: #174950;
  --gold: #F2552C;
  --shadow: 0 24px 70px rgba(23, 73, 80, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--topbar-background, var(--brand-cream, #ECEFD0));
  color: var(--ink);
  font-family: var(--font-body);
}

html,
body {
  background: var(--topbar-background, var(--brand-cream, #ECEFD0));
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top);
  background: var(--paper);
}

.ios-theme-sampler {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 9;
  height: calc(env(safe-area-inset-top) + 80px);
  background: var(--topbar-background, var(--brand-cream, #ECEFD0));
  pointer-events: none;
}

body:has(.login-shell) {
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--login-theme-background);
  touch-action: pan-y;
}

body:has(.login-shell) .ios-theme-sampler {
  display: none;
}

body:has(.login-shell) .app-shell {
  padding-top: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background-color: var(--login-theme-background);
  background:
    linear-gradient(rgba(236, 239, 208, 0.18), rgba(236, 239, 208, 0.34)),
    var(--asset-login-background, url("assets/background.png")) center / cover fixed no-repeat,
    var(--login-theme-background);
}

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

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

button,
.primary-button,
.secondary-button,
.tiny-button,
.danger-button,
.success-button,
.link-button,
.icon-button-text,
.friend-button,
.like-button,
.timeline-create-button,
.chat-send-button,
.comment-submit-button {
  font-family: var(--font-title);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

body:has(.login-shell) main {
  width: 100%;
  min-height: 100vh;
  height: 100dvh;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

.login-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(rgba(236, 239, 208, 0.18), rgba(236, 239, 208, 0.34)),
    var(--asset-login-background, url("assets/background.png")) center / cover fixed no-repeat,
    var(--login-theme-background);
}

.login-panel {
  width: min(430px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: color-mix(in srgb, var(--paper) 92%, #ffffff 8%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 36px;
}

.login-logo {
  display: block;
  width: min(260px, 80%);
  margin: 0 auto 30px;
  border-radius: 8px;
}

.login-language {
  display: flex;
  justify-content: flex-end;
  margin: -18px -18px 18px 0;
}

.login-submit-form .primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.login-submit-form .primary-button img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
}

.login-submit-form .primary-button.is-passkey {
  background: var(--brand-teal);
}

.is-hidden {
  display: none !important;
}

.topbar {
  position: fixed;
  top: env(safe-area-inset-top);
  right: 0;
  left: 0;
  z-index: 10;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 5vw, 48px);
  background: var(--topbar-background, var(--panel));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

body:has(.topbar) main {
  padding-top: 88px;
}

.brand img {
  width: 156px;
  display: block;
}

.global-search {
  position: relative;
  width: min(42vw, 520px);
  margin: 0 clamp(12px, 3vw, 34px);
}

.global-search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.global-search-form input {
  width: 100%;
  height: 46px;
  padding: 0 54px 0 20px;
  border: 1px solid color-mix(in srgb, var(--brand-teal) 12%, transparent);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-teal);
  box-shadow: 0 10px 24px rgba(23, 73, 80, 0.08);
}

.global-search-form input::placeholder {
  color: color-mix(in srgb, var(--brand-teal) 35%, #aeb7b7 65%);
}

.global-search-form button {
  position: absolute;
  right: 5px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--brand-orange);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(242, 85, 44, 0.2);
}

.global-search-form button img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.global-search-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 22;
  max-height: min(68vh, 560px);
  display: none;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(23, 73, 80, 0.18);
}

.global-search.open .global-search-panel {
  display: block;
}

.global-search-group + .global-search-group {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.global-search-group h3 {
  margin: 0 4px 8px;
  color: var(--brand-orange);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.global-search-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.global-search-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  color: var(--ink);
}

.global-search-item:hover {
  background: color-mix(in srgb, var(--brand-cream) 48%, #fff 52%);
}

.global-search-thumb {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--brand-teal);
  color: #fff;
  font-weight: 950;
}

.global-search-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.global-search-item strong,
.global-search-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-item strong {
  color: var(--brand-teal);
  font-size: 13px;
}

.global-search-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.global-search-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 64px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar a,
.link-button {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.topbar a.active {
  color: var(--rose-dark);
}

.link-button {
  border: 0;
  background: none;
  cursor: pointer;
}

.menu-wrap {
  position: relative;
}

.menu-button,
.notification-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(35, 31, 32, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 22px rgba(57, 40, 30, 0.08);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.menu-button:hover,
.menu-wrap.open .menu-button,
.notification-button:hover,
.notification-wrap.open .notification-button {
  background: #fff;
  box-shadow: 0 12px 28px rgba(57, 40, 30, 0.14);
  transform: translateY(-1px);
}

.menu-button img,
.notification-button img {
  width: 22px;
  height: 22px;
  display: block;
}

.notification-wrap {
  position: relative;
}

.notification-button {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid var(--brand-cream);
  border-radius: 999px;
  background: var(--brand-orange);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(390px, calc(100vw - 28px));
  max-height: calc(100vh - env(safe-area-inset-top) - 104px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.97), color-mix(in srgb, var(--paper) 96%, #ffffff 4%)),
    var(--paper);
  box-shadow: 0 24px 64px rgba(57, 40, 30, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.notification-wrap.open .notification-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.notification-panel::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 16px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
}

.notification-panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--line);
}

.notification-panel-head strong {
  color: var(--brand-teal);
  font-size: 15px;
  font-weight: 900;
}

.notification-panel-head button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: var(--brand-cream);
  color: var(--brand-teal);
  cursor: pointer;
  font-weight: 900;
}

.notification-list {
  max-height: calc(100vh - env(safe-area-inset-top) - 160px);
  overflow-y: auto;
  padding: 8px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.notification-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: transparent;
}

.notification-item.is-unread {
  background: color-mix(in srgb, var(--brand-cream) 62%, #fff 38%);
}

.notification-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 18px rgba(23, 73, 80, 0.12);
}

.notification-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notification-avatar img[src$=".svg"] {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.notification-copy {
  min-width: 0;
}

.notification-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.notification-title-row strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.notification-title-row span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.notification-copy p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

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

.notification-action {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: #fff;
  color: var(--brand-teal);
  cursor: pointer;
  font-weight: 900;
}

.notification-action.primary {
  border-color: var(--brand-orange);
  background: var(--brand-orange);
  color: #fff;
}

.notification-dismiss {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.notification-dismiss img {
  width: 20px;
  height: 20px;
}

.notification-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 84px;
  padding: 18px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(320px, calc(100vw - 28px));
  max-height: calc(100vh - env(safe-area-inset-top) - 104px);
  overflow: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), color-mix(in srgb, var(--paper) 96%, #ffffff 4%)),
    var(--paper);
  box-shadow: 0 24px 64px rgba(57, 40, 30, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.dropdown-menu-scroll {
  max-height: calc(100vh - env(safe-area-inset-top) - 174px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 10px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--brand-teal) 40%, transparent) transparent;
}

.dropdown-menu-scroll::-webkit-scrollbar {
  width: 8px;
}

.dropdown-menu-scroll::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-teal) 42%, transparent);
  background-clip: padding-box;
}

.menu-wrap.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-menu::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 18px;
  width: 12px;
  height: 12px;
  background: var(--menu-header-background);
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
}

.menu-section {
  display: grid;
  gap: 4px;
  padding: 8px;
}

.menu-section + .menu-section {
  border-top: 1px solid var(--line);
}

.menu-section span {
  padding: 4px 8px 6px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dropdown-menu a,
.dropdown-logout {
  position: relative;
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}

.dropdown-profile-head {
  min-height: 66px;
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 14px 18px !important;
  border-bottom: 1px solid var(--line);
  border-radius: 8px 8px 0 0 !important;
  background: var(--menu-header-background) !important;
}

.dropdown-profile-photo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--brand-teal);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.dropdown-profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropdown-profile-head strong,
.dropdown-profile-head small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-profile-head strong {
  color: var(--brand-teal);
  font-size: 14px;
  font-weight: 900;
}

.dropdown-profile-head small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.dropdown-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.menu-unread-badge {
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  padding: 0 6px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--brand-orange);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(242, 85, 44, 0.22);
}

.menu-unread-badge[hidden] {
  display: none;
}

.dropdown-menu a:hover,
.dropdown-menu a.active,
.dropdown-logout:hover {
  background: #efe3d4;
  color: var(--rose-dark);
}

.dropdown-menu form {
  margin: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.language-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  width: 86px;
  padding: 3px;
  border: 1px solid rgba(35, 31, 32, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 2px rgba(57, 40, 30, 0.08);
}

.language-switch button {
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.language-switch button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(57, 40, 30, 0.16);
}

.stack {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 13px;
  background: #fffdf9;
  color: var(--ink);
}

select {
  min-height: 48px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.primary-button,
.secondary-button,
.tiny-button,
.danger-button,
.success-button {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  padding: 13px 18px;
  background: var(--rose);
  color: white;
}

.loading-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.loading-button.is-loading {
  cursor: wait;
  opacity: 0.88;
}

.loading-button.is-loading::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-right-color: rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  animation: loader-spin 720ms linear infinite;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 73, 80, 0.22);
  opacity: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 180ms ease;
}

.page-loader[hidden] {
  display: none;
}

.page-loader.is-visible {
  opacity: 1;
}

.page-loader-card {
  display: grid;
  place-items: center;
  gap: 14px;
  min-width: 180px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  box-shadow: none;
  text-shadow: 0 2px 12px rgba(23, 73, 80, 0.32);
}

.page-loader-card strong {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-spinner {
  position: relative;
  width: 46px;
  height: 46px;
  border: 4px solid color-mix(in srgb, var(--brand-teal) 14%, transparent);
  border-top-color: var(--brand-orange);
  border-right-color: var(--brand-pink);
  border-radius: 50%;
  animation: loader-spin 760ms linear infinite;
}

.brand-spinner::after {
  content: none;
}

.inline-loader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--brand-teal);
  font-size: 13px;
  font-weight: 900;
}

.inline-loader span {
  width: 18px;
  height: 18px;
  border: 2px solid color-mix(in srgb, var(--brand-teal) 18%, transparent);
  border-top-color: var(--brand-orange);
  border-radius: 50%;
  animation: loader-spin 720ms linear infinite;
}

.inline-spinner {
  width: 18px;
  height: 18px;
  display: inline-block;
  border: 2px solid color-mix(in srgb, var(--brand-teal) 18%, transparent);
  border-top-color: var(--brand-orange);
  border-radius: 50%;
  animation: loader-spin 720ms linear infinite;
}

.content-skeleton {
  position: relative;
  overflow: hidden;
  min-height: 84px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-cream) 68%, #fff 32%);
}

.content-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.62), transparent);
  transform: translateX(-100%);
  animation: skeleton-sweep 1.2s ease-in-out infinite;
}

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

@keyframes skeleton-sweep {
  to {
    transform: translateX(100%);
  }
}

.secondary-button {
  padding: 12px 18px;
  background: #efe3d4;
  color: var(--ink);
}

.tiny-button {
  padding: 7px 10px;
  background: var(--sage);
  color: #fff;
  font-size: 12px;
}

.danger-button {
  min-height: 42px;
  padding: 0 14px;
  background: #8f2f37;
  color: #fff;
}

.success-button {
  min-height: 42px;
  padding: 0 14px;
  background: #557052;
  color: #fff;
}

.icon-button-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.icon-button-text img {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

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

.unlisted-share-link {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--brand-orange) 35%, var(--line) 65%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-orange) 8%, #fff 92%);
  color: var(--brand-teal);
  font-size: 13px;
  font-weight: 800;
}

.unlisted-copy-field {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.unlisted-copy-field input {
  min-width: 0;
  height: 42px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--brand-teal);
}

.unlisted-copy-field button {
  flex: 0 0 auto;
  min-height: 42px;
  border-radius: 999px;
  white-space: nowrap;
}

.unlisted-copy-field button.is-copied {
  background: var(--brand-teal);
  color: #fff;
}

.video-actions .icon-button-text {
  min-width: 150px;
}

.wide {
  width: 100%;
  margin-top: 10px;
}

.code-login-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.login-code-actions {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 10px;
  margin-top: 12px;
}

.login-back-button,
.resend-form .secondary-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.resend-form .secondary-button {
  width: 100%;
}

.resend-form .secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.resend-form .secondary-button.is-ready {
  background: color-mix(in srgb, var(--brand-cream) 56%, #ffffff 44%);
  color: var(--brand-teal);
}

.code-input {
  text-align: center;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 8px;
}

.notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 6px;
  background: #edf3e9;
  color: #384c35;
  font-weight: 700;
}

.notice.error {
  background: #f6e3e1;
  color: #7b2d31;
}

.page-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 22px;
}

.page-title-with-action {
  gap: 16px;
}

.page-title-with-action .primary-button {
  flex: 0 0 auto;
}

body:has(.messenger-shell) main {
  height: calc(100dvh - env(safe-area-inset-top));
  min-height: 620px;
  display: block;
  padding-bottom: 20px;
  overflow: hidden;
}

.page-title h1,
.empty-state h1,
.episode-copy h1 {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.04;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.illustrated-empty {
  min-height: min(52vh, 420px);
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 34px 18px;
  text-align: center;
}

.timeline-feed > .illustrated-empty {
  min-height: 360px;
}

.video-list > .illustrated-empty {
  min-height: min(46vh, 360px);
}

.illustrated-empty img {
  width: min(360px, 72vw);
  max-height: 270px;
  object-fit: contain;
  opacity: 0.3;
  filter: saturate(0.9);
}

.illustrated-empty p {
  max-width: 520px;
  margin: 0;
  color: color-mix(in srgb, var(--brand-teal) 72%, #fff 28%);
  font-family: var(--font-title);
  font-size: clamp(22px, 4vw, 38px);
  font-weight: 400;
  line-height: 1.08;
  text-shadow:
    0 1px 0 #fff,
    0 -1px 0 rgba(23, 73, 80, 0.14),
    0 10px 24px rgba(23, 73, 80, 0.08);
}

.video-card,
.settings-panel,
.table-panel,
.empty-state,
.metric-grid > div,
.admin-video {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(57, 40, 30, 0.06);
}

.video-card {
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.video-card:hover,
.video-card:focus-within {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--brand-orange) 28%, var(--line));
  box-shadow: 0 18px 42px rgba(57, 40, 30, 0.11);
}

.video-card-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.audio-card-media,
.text-card-media {
  min-height: 176px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 18% 20%, rgba(249, 169, 172, 0.58), transparent 34%),
    linear-gradient(135deg, var(--brand-cream), rgba(255, 255, 255, 0.82));
  border-bottom: 1px solid var(--line);
}

.audio-card-media.has-cover,
.text-card-media.has-cover {
  min-height: 0;
  display: block;
  overflow: hidden;
  background: #111;
}

.audio-card-media img,
.text-card-media img {
  width: 58px;
  height: 58px;
  padding: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 12px 28px rgba(23, 73, 80, 0.12);
}

.audio-card-media .audio-cover-image,
.text-card-media.has-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  display: block;
  padding: 0;
  border-radius: 0;
  object-fit: cover;
  background: #111;
  box-shadow: none;
}

.audio-card-media span,
.text-card-media span {
  color: var(--brand-teal);
  font-weight: 900;
}

.video-card div {
  padding: 16px;
}

.video-card-category,
.eyebrow {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.video-card h2 {
  font-family: var(--font-title);
}

.comments-head h2,
.timeline-post-body h2,
.episode-heading h1,
.audio-player-head h1,
.user-profile-summary h1,
.messenger-sidebar-head h2,
.messenger-chat-head h2,
.account-toggle-card summary h2,
.community-panel h2,
.section-head-row h2,
.welcome-modal-head h2 {
  font-family: var(--font-title);
}

.user-profile-summary h1 {
 text-shadow:
-1px -1px 0 #fff,
 1px -1px 0 #fff,
-1px  1px 0 #fff,
 1px  1px 0 #fff;

 }

.video-card h2 {
  margin: 7px 0 8px;
  font-size: 20px;
}

.video-card p,
.episode-copy p,
.rich-description,
.empty-state p,
.help-text,
.settings-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.settings-panel > .language-switch {
  margin-top: 10px;
}

.card-description {
  margin: 0;
  color: #000;
  font-size: 15px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.55;
  text-transform: none;
  letter-spacing: 0;
}

.card-description span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-transform: none;
  letter-spacing: 0;
}

.text-link,
.rich-description a,
.card-description a {
  color: var(--brand-orange);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 2px;
  color: var(--brand-teal);
  font-weight: 800;
  text-decoration: none;
  vertical-align: -3px;
}

.social-link img {
  width: 16px;
  height: 16px;
  display: block;
}

.social-link span {
  color: inherit;
}

.rich-description {
  white-space: normal;
}

.text-article {
  display: grid;
  gap: 18px;
}

.text-article-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.text-body {
  max-width: 820px;
  font-size: 18px;
  line-height: 1.72;
}

.text-body p,
.text-body ul,
.text-body ol,
.text-body blockquote {
  margin: 0 0 18px;
}

.text-body h2,
.text-body h3 {
  margin: 28px 0 12px;
  color: var(--brand-teal);
  line-height: 1.15;
}

.text-body blockquote {
  padding: 14px 18px;
  border-left: 4px solid var(--brand-orange);
  background: color-mix(in srgb, var(--brand-cream) 70%, #ffffff 30%);
  border-radius: 0 8px 8px 0;
}

.content-embed {
  margin: 24px 0;
}

.content-embed-video {
  overflow: hidden;
  border-radius: 8px;
  background: #111;
  box-shadow: var(--shadow);
}

.content-embed-video iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
}

.content-embed figcaption {
  padding: 10px 12px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.compact-audio-player {
  box-shadow: none;
}

.hashtag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.hashtag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(249, 169, 172, 0.28);
  color: var(--brand-teal);
  font-size: 13px;
  font-weight: 850;
  text-transform: none;
}

.comments-section {
  margin-top: 34px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--paper) 78%, #ffffff 22%);
  box-shadow: 0 16px 42px rgba(23, 73, 80, 0.08);
}

.comments-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.comments-head h2 {
  margin: 0;
  font-size: 24px;
}

.comments-head span,
.comments-disabled,
.empty-comments {
  color: var(--muted);
}

.comment-form {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.comment-form textarea {
  min-height: 84px;
  border-radius: 8px;
  resize: vertical;
}

.comment-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.comment-submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 17px 10px 15px;
  border-radius: 999px;
  background: var(--brand-orange);
  color: #fff;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(242, 85, 44, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.comment-form-actions .secondary-button {
  min-height: 42px;
  padding: 10px 17px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
}

.comment-submit-button:hover,
.comment-submit-button:focus-visible {
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--brand-orange) 92%, var(--brand-teal));
  box-shadow: 0 14px 28px rgba(242, 85, 44, 0.24);
}

.comment-submit-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-orange) 30%, transparent);
  outline-offset: 3px;
}

.comment-submit-button img {
  width: 16px;
  height: 16px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  filter: none;
}

.comment-list {
  display: grid;
  gap: 18px;
}

.comment-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
}

.comment-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--brand-teal);
  color: #fff;
  font-weight: 900;
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-main {
  min-width: 0;
}

.comment-bubble {
  padding: 12px 14px;
  border-radius: 8px;
  background: #fffdf9;
  border: 1px solid var(--line);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.comment-meta strong {
  color: var(--brand-teal);
}

.comment-meta span {
  color: var(--muted);
  font-size: 13px;
}

.comment-body p {
  margin: 0;
  color: #111;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.comment-deleted {
  color: var(--muted) !important;
  font-style: italic;
}

.comment-actions {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 0 4px;
}

.comment-action,
.comment-delete {
  border: 0;
  background: transparent;
  color: var(--brand-teal);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.comment-delete {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  background: var(--brand-teal);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(23, 73, 80, 0.16);
}

.report-button {
  background: var(--brand-teal);
  color: #ffffff;
}

.comment-delete:hover {
  background: color-mix(in srgb, var(--brand-teal) 82%, #000 18%);
}

.report-button:hover {
  background: color-mix(in srgb, var(--brand-teal) 82%, #000 18%);
}

.comment-delete img {
  width: 15px;
  height: 15px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  object-position: center;
}

.comment-actions .comment-delete span,
.comment-actions .report-button span {
  display: none;
}

.reply-form-wrap {
  margin-top: 10px;
}

.comment-replies {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding-left: 18px;
  border-left: 2px solid color-mix(in srgb, var(--brand-teal) 16%, transparent);
}

.comment-replies .comment-avatar {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

.timeline-composer {
  display: flex;
  justify-content: flex-end;
  max-width: 860px;
  margin: 0 auto 16px;
}

.timeline-create-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 5px 16px 5px 5px;
  border: 0;
  border-radius: 999px;
  background: var(--brand-orange);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(242, 85, 44, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.timeline-create-button:hover,
.timeline-create-button:focus-visible {
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--brand-orange) 92%, var(--brand-teal));
  box-shadow: 0 14px 28px rgba(242, 85, 44, 0.24);
}

.timeline-create-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-orange) 30%, transparent);
  outline-offset: 3px;
}

.timeline-create-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--brand-teal);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.timeline-create-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#timeline-post-modal .admin-form-dialog {
  overflow: hidden;
}

#timeline-post-modal .modal-header {
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid color-mix(in srgb, var(--brand-teal) 14%, transparent);
  border-radius: 12px 12px 0 0;
  background: var(--modal-header-background, var(--brand-pink));
}

#timeline-post-modal .modal-header h2 {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 900;
  color: var(--brand-teal);
}

#timeline-post-modal .admin-form-body {
  max-height: calc(min(86vh, 780px) - 75px);
  overflow-y: auto;
}

.timeline-submit-button {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 18px 10px 15px;
  border-radius: 999px;
  background: var(--brand-orange);
  color: #fff;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(242, 85, 44, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.timeline-submit-button:hover,
.timeline-submit-button:focus-visible {
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--brand-orange) 92%, var(--brand-teal));
  box-shadow: 0 14px 28px rgba(242, 85, 44, 0.24);
}

.timeline-submit-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-orange) 30%, transparent);
  outline-offset: 3px;
}

.timeline-submit-button img {
  width: 16px;
  height: 16px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

.timeline-feed {
  display: grid;
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
}

.timeline-post {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 42px rgba(23, 73, 80, 0.08);
}

.timeline-post-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--brand-teal) 18%, transparent);
  background: var(--post-header-background);
}

.timeline-post-head strong,
.timeline-author-name,
.comment-author-name {
  display: block;
  color: var(--brand-teal);
  font-weight: 900;
}

.timeline-post-head span {
  color: var(--muted);
  font-size: 13px;
}

.timeline-post-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-post-menu {
  position: relative;
}

.timeline-post-menu-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--brand-teal);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.timeline-post-menu-button:hover,
.timeline-post-menu.open .timeline-post-menu-button {
  background: color-mix(in srgb, var(--brand-teal) 12%, transparent);
  color: var(--brand-teal);
  transform: translateY(-1px);
}

.timeline-post-menu-button img {
  width: 18px;
  height: 18px;
  display: block;
}

.timeline-post-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5;
  min-width: 190px;
  display: none;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(23, 73, 80, 0.18);
}

.timeline-post-menu.open .timeline-post-menu-panel {
  display: grid;
}

.timeline-post-menu-panel form {
  margin: 0;
}

.timeline-post-menu-panel .comment-delete {
  width: 100%;
  height: 40px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  justify-content: stretch;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  border-radius: 8px;
  background: transparent;
  color: var(--brand-teal);
  text-align: right;
  box-shadow: none;
}

.timeline-post-menu-panel .comment-delete::after {
  content: attr(title);
  overflow: hidden;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-post-menu-panel .comment-delete span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--brand-teal);
  text-align: right;
}

.timeline-post-menu-panel .comment-delete:has(span)::after {
  content: none;
}

.timeline-post-menu-panel .comment-delete:hover {
  background: color-mix(in srgb, var(--brand-teal) 8%, transparent);
}

.timeline-post-menu-panel .comment-delete img {
  width: 30px;
  height: 30px;
  padding: 7px;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--brand-teal);
  object-fit: contain;
  object-position: center;
  justify-self: start;
}

.timeline-post-body {
  padding: 16px 18px 14px;
}

.timeline-post-body h2 {
  margin: 0 0 10px;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.12;
}

.timeline-copy {
  color: #111;
  font-size: 16px;
}

.timeline-gallery {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0 18px 16px;
}

.timeline-photo-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #111;
  cursor: pointer;
  aspect-ratio: 1 / 1;
}

.timeline-gallery img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.timeline-photo-button:hover img {
  opacity: 0.92;
  transform: scale(1.025);
}

.timeline-gallery.one {
  grid-template-columns: minmax(0, 520px);
}

.timeline-gallery.one .timeline-photo-button {
  aspect-ratio: 16 / 10;
}

.timeline-gallery.grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.timeline-photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  opacity: 0;
  transition: opacity 0.16s ease;
}

.timeline-photo-viewer[hidden] {
  display: none;
}

.timeline-photo-viewer.open {
  opacity: 1;
}

.timeline-photo-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 18, 18, 0.82);
}

.timeline-photo-frame {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(1120px, 100%);
  height: min(82vh, 820px);
}

.timeline-photo-frame img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.timeline-photo-close,
.timeline-photo-nav {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.timeline-photo-close {
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  font-size: 28px;
  line-height: 1;
}

.timeline-photo-nav {
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  font-size: 34px;
}

.timeline-photo-nav.prev {
  left: 8px;
}

.timeline-photo-nav.next {
  right: 8px;
}

.timeline-photo-counter {
  position: absolute;
  bottom: 10px;
  left: 50%;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-size: 13px;
  font-weight: 850;
  transform: translateX(-50%);
}

body.has-photo-viewer {
  overflow: hidden;
}

.report-modal {
  position: fixed;
  inset: 0;
  z-index: 205;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  opacity: 0;
  transition: opacity 160ms ease;
}

.report-modal[hidden] {
  display: none;
}

.report-modal.open {
  opacity: 1;
}

.report-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(23, 73, 80, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.report-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(23, 73, 80, 0.24);
}

.report-dialog form {
  padding: 18px 22px 0;
}

.reports-list {
  display: grid;
  gap: 18px;
}

.report-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 42px rgba(23, 73, 80, 0.08);
  transition: opacity 180ms ease, transform 180ms ease;
}

.report-card.is-removing {
  opacity: 0;
  transform: translateY(-8px);
}

.report-card > header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--post-header-background);
}

.report-card > header strong {
  min-width: 0;
  overflow: hidden;
  color: var(--brand-teal);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-card > header small,
.report-card-body small {
  color: var(--muted);
  font-weight: 800;
}

.report-card-body,
.report-reasons,
.report-actions {
  padding: 16px 18px;
}

.report-card-body p,
.report-reasons p {
  margin: 0;
  color: #111;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.report-card-body p {
  margin-bottom: 8px;
}

.report-reasons {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.report-reasons > div {
  padding: 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-cream) 42%, #fff 58%);
}

.report-reasons strong {
  display: block;
  margin-bottom: 4px;
  color: var(--brand-teal);
}

.report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.report-status {
  min-height: 18px;
  color: var(--brand-teal);
  font-weight: 850;
}

.bottom-sheet-root {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: grid;
  align-items: end;
  opacity: 0;
  transition: opacity 220ms ease;
}

.bottom-sheet-root.open {
  opacity: 1;
}

.bottom-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(23, 73, 80, 0.24);
  backdrop-filter: blur(5px);
}

.bottom-sheet {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: min(82vh, 720px);
  margin: 0 auto;
  overflow: auto;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: color-mix(in srgb, var(--paper) 94%, #fff 6%);
  box-shadow: 0 -28px 80px rgba(23, 73, 80, 0.24);
  transform: translateY(100%);
  transition: transform 260ms cubic-bezier(0.2, 0.9, 0.2, 1);
  -webkit-overflow-scrolling: touch;
}

.bottom-sheet-root.open .bottom-sheet {
  transform: translateY(0);
}

.bottom-sheet-thumb {
  position: sticky;
  top: 0;
  z-index: 2;
  display: block;
  width: 48px;
  height: 5px;
  margin: 10px auto 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-teal) 22%, transparent);
}

.bottom-sheet-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--brand-teal) 85%, #fff 15%);
  border-radius: 50%;
  background: var(--brand-teal);
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 12px 24px rgba(23, 73, 80, 0.2);
}

.bottom-sheet-content {
  display: grid;
  gap: 18px;
  padding: 18px clamp(20px, 5vw, 34px) max(24px, env(safe-area-inset-bottom));
}

.bottom-sheet-content h2 {
  max-width: calc(100% - 56px);
  margin: 0;
  color: var(--brand-teal);
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1.08;
}

.bottom-sheet-body {
  color: var(--muted);
  line-height: 1.55;
}

.install-sheet-copy {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.install-sheet-copy img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(23, 73, 80, 0.16);
}

.install-sheet-copy p {
  margin: 0;
}

.bottom-sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

body.has-bottom-sheet {
  overflow: hidden;
}

.offline-badge {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 260;
  padding: 9px 12px;
  border: 1px solid rgba(23, 73, 80, 0.16);
  border-radius: 999px;
  background: rgba(23, 73, 80, 0.92);
  color: #fff;
  box-shadow: 0 14px 34px rgba(23, 73, 80, 0.18);
  font-size: 12px;
  font-weight: 900;
}

.timeline-embed-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  margin: 0 18px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-cream) 70%, #fff 30%);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.timeline-embed-card:hover {
  border-color: color-mix(in srgb, var(--brand-orange) 45%, var(--line) 55%);
  box-shadow: 0 12px 26px rgba(23, 73, 80, 0.1);
  transform: translateY(-1px);
}

.timeline-youtube-embed {
  margin: 0 18px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-cream) 68%, #fff 32%);
}

.timeline-youtube-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
  background: #111;
}

.timeline-youtube-embed figcaption {
  padding: 14px 16px 16px;
}

.timeline-youtube-embed strong {
  display: block;
  color: var(--brand-teal);
  font-size: 20px;
  line-height: 1.2;
}

.timeline-youtube-embed p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.timeline-embed-card > img,
.timeline-embed-placeholder {
  width: 100%;
  height: 100%;
  min-height: 112px;
  object-fit: cover;
  background: #fff;
}

.timeline-embed-placeholder {
  display: grid;
  place-items: center;
}

.timeline-embed-placeholder img {
  width: 44px;
  height: 44px;
}

.timeline-embed-card figcaption {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 12px;
}

.timeline-embed-card figcaption strong {
  color: var(--brand-teal);
  font-size: 18px;
}

.timeline-embed-link {
  color: var(--brand-orange);
  font-weight: 850;
}

.timeline-post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px 16px;
}

.timeline-comments-toggle {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid color-mix(in srgb, var(--brand-teal) 16%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-cream) 76%, #fff 24%);
  color: var(--brand-teal);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.timeline-comments-toggle:hover,
.timeline-comments-toggle[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--brand-orange) 50%, transparent);
  color: var(--brand-orange);
}

.timeline-comments-wrap[hidden] {
  display: none;
}

.timeline-post .comments-section {
  margin: 0;
  border-width: 1px 0 0;
  border-radius: 0;
  box-shadow: none;
}

.timeline-photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-photo-dropzone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 166px;
  padding: 18px;
  border: 2px dashed color-mix(in srgb, var(--brand-teal) 34%, var(--line) 66%);
  border-radius: 10px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand-cream) 72%, #fff 28%), rgba(255, 255, 255, 0.72));
  color: var(--brand-teal);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.timeline-photo-dropzone:hover,
.timeline-photo-dropzone.is-dragging {
  border-color: var(--brand-orange);
  background: color-mix(in srgb, var(--brand-cream) 54%, #fff 46%);
  box-shadow: 0 14px 32px rgba(23, 73, 80, 0.11);
  transform: translateY(-1px);
}

.timeline-photo-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.timeline-photo-drop-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand-teal);
  color: #fff;
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
}

.timeline-photo-dropzone strong {
  font-size: 17px;
}

.timeline-photo-dropzone small {
  max-width: 420px;
  color: var(--muted);
  line-height: 1.45;
}

.timeline-photo-preview span {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
}

.timeline-photo-preview img {
  width: 64px;
  height: 64px;
  display: block;
  object-fit: cover;
}

.timeline-photo-preview small {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-teal);
  font-size: 10px;
  font-weight: 900;
}

.timeline-admin-embeds {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-cream) 72%, #fff 28%);
}

.card-description.is-collapsed .description-full {
  display: none;
}

.card-description.is-expanded .description-short {
  display: none;
}

.card-description.is-short .description-short {
  display: inline;
}

.description-more {
  border: 0;
  background: transparent;
  color: var(--rose-dark);
  cursor: pointer;
  font-weight: 900;
  padding: 0 2px;
}

.episode {
  display: grid;
  gap: 26px;
}

.audio-episode {
  gap: 24px;
}

.episode-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.episode-heading h1 {
  margin: 0;
}

.like-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 0 15px;
  border: 1px solid color-mix(in srgb, var(--brand-teal) 18%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-cream) 70%, #ffffff 30%);
  color: var(--brand-teal);
  cursor: pointer;
  font-weight: 850;
  line-height: 1;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.like-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(23, 73, 80, 0.14);
}

.like-button.is-liked {
  border-color: color-mix(in srgb, var(--brand-orange) 34%, transparent);
  background: color-mix(in srgb, var(--brand-orange) 12%, #ffffff 88%);
  color: var(--brand-orange);
}

.like-button.is-loading {
  opacity: 0.72;
  cursor: wait;
}

.like-button.has-error {
  animation: modal-shake 260ms ease;
}

@keyframes modal-shake {
  25% {
    transform: translateX(-3px);
  }

  50% {
    transform: translateX(3px);
  }

  75% {
    transform: translateX(-2px);
  }
}

.like-button-icon {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
}

.like-button-icon img {
  width: 19px;
  height: 19px;
  display: block;
}

.like-button-label {
  font-size: 14px;
}

.like-button-count {
  min-width: 24px;
  padding-left: 8px;
  border-left: 1px solid currentColor;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 640px) {
  .episode-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .audio-player-head {
    align-items: flex-start;
  }

  .audio-controls {
    grid-template-columns: auto auto auto;
  }
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.audio-player {
  --audio-progress: 0;
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 12%, rgba(249, 169, 172, 0.55), transparent 34%),
    linear-gradient(145deg, var(--brand-cream), #fffdf4 78%);
  box-shadow: var(--shadow);
}

.audio-player-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.audio-player-head h1 {
  margin: 4px 0 0;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.05;
}

.audio-player-art {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 14px 34px rgba(23, 73, 80, 0.14);
}

.audio-player-art img {
  width: 38px;
  height: 38px;
}

.audio-player-art .audio-player-cover {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.audio-waveform {
  width: 100%;
  height: 104px;
  display: block;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  touch-action: none;
}

.audio-waveform:focus-visible {
  outline: 3px solid rgba(242, 85, 44, 0.34);
  outline-offset: 4px;
}

.audio-controls {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 10px;
}

.audio-play-button {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--brand-orange);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(242, 85, 44, 0.24);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.audio-play-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(242, 85, 44, 0.28);
}

.audio-player.is-playing .audio-play-button {
  background: var(--brand-teal);
  box-shadow: 0 14px 30px rgba(23, 73, 80, 0.22);
}

.audio-play-icon {
  width: 24px;
  height: 24px;
  display: block;
  filter: brightness(0) invert(1);
}

.audio-icon-pause {
  display: none;
}

.audio-player.is-playing .audio-icon-play {
  display: none;
}

.audio-player.is-playing .audio-icon-pause {
  display: block;
}

.audio-time-label {
  min-width: 58px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid rgba(23, 73, 80, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--brand-teal);
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.youtube-share-shield {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  width: min(150px, 24%);
  height: min(104px, 22%);
  background: transparent;
  pointer-events: auto;
}

.watermark {
  position: absolute;
  right: 14px;
  bottom: 12px;
  padding: 6px 9px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.46);
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  pointer-events: none;
}

.back-link {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--rose-dark);
  font-weight: 800;
}

.empty-state,
.settings-panel,
.table-panel {
  padding: 24px;
}

.empty-state {
  max-width: 620px;
  margin: 70px auto;
  text-align: center;
}

.empty-state form {
  display: inline-block;
  margin: 8px;
}

.details {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px 22px;
  margin: 28px 0 24px;
}

.details dt {
  color: var(--muted);
  font-weight: 800;
}

.details dd {
  margin: 0;
}

.account-profile {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.profile-media-fields {
  display: grid;
  gap: 14px;
}

.account-media-merged {
  position: relative;
  padding-bottom: 72px;
}

.account-cover-upload {
  min-height: 260px;
}

.account-avatar-upload {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 4;
  width: 138px;
  min-height: 138px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translateX(-50%);
}

.account-avatar-upload:hover,
.account-avatar-upload:focus-within,
.account-avatar-upload.is-dragging,
.account-avatar-upload.is-uploading {
  background: transparent;
  transform: translateX(-50%) translateY(-1px);
}

.account-avatar-upload .avatar-circle {
  width: 138px;
  height: 138px;
  border-width: 5px;
}

.account-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.account-action-button {
  width: fit-content;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 17px 10px 15px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(23, 73, 80, 0.12);
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease;
}

.account-save-button {
  background: var(--brand-orange);
  color: #fff;
  box-shadow: 0 10px 22px rgba(242, 85, 44, 0.18);
}

.account-view-page-button {
  border: 1px solid color-mix(in srgb, var(--brand-teal) 16%, transparent);
  background: #fff;
  color: var(--brand-teal);
}

.account-action-button:hover,
.account-action-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(23, 73, 80, 0.16);
}

.account-save-button:hover,
.account-save-button:focus-visible {
  background: color-mix(in srgb, var(--brand-orange) 92%, var(--brand-teal));
  box-shadow: 0 14px 28px rgba(242, 85, 44, 0.24);
}

.account-action-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-orange) 30%, transparent);
  outline-offset: 3px;
}

.account-action-button img {
  width: 16px;
  height: 16px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

.account-view-page-button img {
  filter: brightness(0) saturate(100%) invert(22%) sepia(24%) saturate(1452%) hue-rotate(141deg) brightness(91%) contrast(90%);
}

.passkey-card {
  display: grid;
  gap: 18px;
}

.passkey-create-button img {
  filter: brightness(0) invert(1);
}

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

.passkey-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.passkey-row form {
  margin: 0;
}

.passkey-delete-button {
  width: 38px;
  height: 38px;
  box-shadow: 0 8px 18px rgba(143, 40, 50, 0.16);
}

.passkey-delete-button:hover {
  box-shadow: 0 10px 22px rgba(143, 40, 50, 0.22);
}

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

.passkey-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.passkey-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--panel);
  color: var(--brand-teal);
}

.passkey-icon img {
  width: 22px;
  height: 22px;
  filter: brightness(0) saturate(100%) invert(22%) sepia(24%) saturate(1452%) hue-rotate(141deg) brightness(91%) contrast(90%);
}

.avatar-upload,
.cover-upload {
  position: relative;
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 18px;
  border: 2px dashed color-mix(in srgb, var(--brand-teal) 42%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--paper) 72%, #ffffff 28%);
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.avatar-upload:hover,
.avatar-upload:focus-within,
.avatar-upload.is-dragging,
.avatar-upload.is-uploading,
.cover-upload:hover,
.cover-upload:focus-within,
.cover-upload.is-dragging,
.cover-upload.is-uploading {
  border-color: var(--brand-orange);
  background: color-mix(in srgb, var(--brand-cream) 62%, #ffffff 38%);
  transform: translateY(-1px);
}

.avatar-upload.is-uploading,
.cover-upload.is-uploading {
  cursor: wait;
  opacity: 0.82;
}

.avatar-upload input,
.cover-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.avatar-circle {
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--brand-teal);
  color: #fff;
  box-shadow: 0 12px 28px rgba(23, 73, 80, 0.18);
  font-size: 42px;
  font-weight: 900;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-upload strong {
  font-size: 14px;
}

.avatar-upload small {
  max-width: 180px;
  color: var(--muted);
  line-height: 1.4;
}

.cover-upload,
.user-profile-cover.is-editable {
  min-height: 190px;
  align-content: end;
  overflow: hidden;
  padding: 0;
}

.cover-preview {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  background:
    radial-gradient(circle at 18% 20%, rgba(249, 169, 172, 0.48), transparent 34%),
    linear-gradient(135deg, var(--brand-cream), rgba(255, 255, 255, 0.82));
}

.cover-preview img,
.user-profile-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-preview span,
.user-profile-cover span {
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 20%, rgba(249, 169, 172, 0.5), transparent 34%),
    linear-gradient(135deg, var(--brand-cream), rgba(255, 255, 255, 0.86));
}

.cover-upload strong,
.cover-upload small,
.user-profile-cover.is-editable strong {
  position: relative;
  z-index: 1;
  width: calc(100% - 24px);
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
}

.account-cover-upload strong,
.account-cover-upload small {
  width: auto;
  max-width: calc(100% - 24px);
}

.cover-upload small {
  margin-bottom: 12px;
}

.account-language-detail {
  display: flex;
  align-items: center;
  min-height: 34px;
}

.account-media-merged .account-cover-upload {
  min-height: 260px;
  align-content: start;
  padding-top: 14px;
}

.account-media-merged .account-avatar-upload {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 4;
  width: 138px;
  min-height: 138px;
  height: 138px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translateX(-50%);
}

.account-media-merged .account-avatar-upload:hover,
.account-media-merged .account-avatar-upload:focus-within,
.account-media-merged .account-avatar-upload.is-dragging,
.account-media-merged .account-avatar-upload.is-uploading {
  background: transparent;
  transform: translateX(-50%) translateY(-1px);
}

.account-media-merged .account-avatar-upload .avatar-circle {
  width: 138px;
  height: 138px;
  border-width: 5px;
}

.user-profile-hero {
  max-width: 960px;
  margin: 0 auto 24px;
  position: relative;
  z-index: 2;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 42px rgba(23, 73, 80, 0.08);
}

.user-profile-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.user-profile-backdrop img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.user-profile-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(236, 239, 208, 0) 0, rgba(236, 239, 208, 0) 50%, rgba(236, 239, 208, 0.58) 76%, var(--panel) 100%);
}

.user-profile-cover {
  position: relative;
  z-index: 1;
  display: block;
  height: clamp(150px, 22vw, 260px);
  margin-bottom: -58px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  border: 0;
  background: var(--brand-cream);
}

.user-profile-hero.has-cover .user-profile-cover {
  background: transparent;
}

.user-profile-hero.has-cover .cover-preview {
  background: transparent;
}

.user-profile-hero.has-cover .cover-preview img {
  opacity: 0;
}

.user-profile-hero.has-cover > .user-profile-cover > img {
  opacity: 0;
}

.user-profile-cover.is-editable {
  width: 100%;
  cursor: pointer;
  text-align: center;
}

.user-profile-cover.is-editable input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.user-profile-cover.is-editable strong {
  position: absolute;
  right: 18px;
  bottom: 72px;
  width: auto;
  color: var(--brand-teal);
  font-size: 14px;
  box-shadow: 0 10px 22px rgba(23, 73, 80, 0.12);
}

.user-profile-cover.is-editable:hover strong,
.user-profile-cover.is-editable.is-dragging strong,
.user-profile-cover.is-editable.is-uploading strong {
  color: var(--brand-orange);
}

.user-profile-summary {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: end;
  min-height: 146px;
  padding: 62px 24px 24px;
  margin-top: 0;
  background: transparent;
}

.user-profile-avatar {
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 4px solid var(--panel);
  border-radius: 50%;
  background: var(--brand-teal);
  color: #fff;
  box-shadow: 0 14px 34px rgba(23, 73, 80, 0.18);
  font-size: 42px;
  font-weight: 900;
}

.user-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-profile-summary h1 {
  margin: 0 0 4px;
  color: var(--brand-teal);
  font-size: clamp(28px, 4.1vw, 44px);
  line-height: 1.02;
}

.profile-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.profile-role-pill {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 0 16px;
  background: #fff;
  color: var(--brand-teal);
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(23, 73, 80, 0.12);
}

.profile-role-pill img {
  width: 19px;
  height: 19px;
}

.profile-friend-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 0;
}

.profile-friend-action.compact form {
  margin: 0;
}

.friend-button,
.friend-status-pill {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  background: var(--brand-orange);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(242, 85, 44, 0.16);
}

.friend-button img,
.friend-status-pill img {
  width: 19px;
  height: 19px;
}

.friend-status-pill {
  margin-top: 0;
  background: #fff;
  color: var(--brand-teal);
  box-shadow: 0 10px 22px rgba(23, 73, 80, 0.12);
}

.friend-status-pill.is-pending {
  color: var(--muted);
}

.friend-menu {
  position: relative;
  display: inline-block;
  margin-top: 0;
  z-index: 50;
}

.friend-menu summary {
  list-style: none;
}

.friend-menu summary::-webkit-details-marker {
  display: none;
}

.friend-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 80;
  min-width: 210px;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 18px 44px rgba(23, 73, 80, 0.18);
}

.friend-menu-panel a,
.friend-menu-panel button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  border: 0;
  padding: 0 14px;
  background: transparent;
  color: var(--brand-teal);
  cursor: pointer;
  font-weight: 900;
  text-align: left;
}

.friend-menu-panel a:hover,
.friend-menu-panel button:hover {
  background: var(--brand-cream);
  color: var(--brand-orange);
}

.friend-menu-panel form {
  margin: 0;
  border-top: 1px solid var(--line);
}

.profile-timeline-feed {
  max-width: 860px;
}

.friends-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.friend-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-cream) 64%, #fff 36%);
  color: var(--ink);
}

.friend-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--brand-teal);
  color: #fff;
  font-weight: 900;
}

.friend-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friend-card strong,
.friend-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-card strong {
  color: var(--brand-teal);
  font-size: 15px;
}

.friend-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.messenger-shell {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(57, 40, 30, 0.08);
}

.messenger-sidebar {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--brand-cream) 52%, #fff 48%);
}

.messenger-sidebar-head {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.messenger-sidebar-head h2,
.messenger-chat-head h2 {
  margin: 0;
  color: var(--brand-teal);
  font-size: 20px;
}

.messenger-sidebar-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.messenger-contact-list {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding: 8px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.messenger-contact {
  width: 100%;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  border: 0;
  border-radius: 8px;
  padding: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.messenger-contact:hover,
.messenger-contact.active {
  background: #fff;
  box-shadow: 0 10px 24px rgba(23, 73, 80, 0.09);
}

.messenger-avatar,
.chat-message-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--brand-teal);
  color: #fff;
  font-weight: 900;
}

.messenger-avatar img,
.chat-message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.messenger-avatar img[src$=".svg"] {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.messenger-contact-copy {
  min-width: 0;
}

.messenger-contact-copy strong,
.messenger-contact-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messenger-contact-copy strong {
  color: var(--brand-teal);
  font-size: 14px;
  font-weight: 900;
}

.messenger-contact-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.messenger-unread {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--brand-orange);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.messenger-chat {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 0%, rgba(249, 169, 172, 0.18), transparent 28%),
    #fffdf8;
}

.messenger-chat-head {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
}

.messenger-chat-head [data-chat-avatar] {
  display: contents;
}

.messenger-chat-head p {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-messages {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  padding: 18px;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.chat-older-loader {
  height: 34px;
  display: grid;
  place-items: center;
  margin: 0 0 6px;
  opacity: 0.72;
}

.chat-older-loader .inline-spinner {
  width: 16px;
  height: 16px;
}

.chat-message {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  margin: 12px 0;
}

.chat-message.is-mine {
  grid-template-columns: minmax(0, 1fr);
  justify-items: end;
}

.chat-message-avatar {
  width: 36px;
  height: 36px;
  align-self: end;
  font-size: 13px;
}

.chat-message-main {
  max-width: min(620px, 84%);
}

.chat-message.is-mine .chat-message-main {
  display: grid;
  justify-items: end;
}

.chat-bubble {
  overflow: hidden;
  border-radius: 18px 18px 18px 6px;
  padding: 11px 13px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(23, 73, 80, 0.08);
}

.chat-message.is-mine .chat-bubble {
  border-radius: 18px 18px 6px 18px;
  background: var(--brand-orange);
  color: #fff;
  box-shadow: 0 12px 26px rgba(242, 85, 44, 0.18);
}

.chat-bubble p {
  margin: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.chat-message.is-mine .text-link {
  color: #fff;
}

.chat-time {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.chat-youtube {
  margin-top: 10px;
  overflow: hidden;
  border-radius: 12px;
  background: #111;
}

.chat-youtube iframe {
  width: min(460px, 72vw);
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
}

.chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 -12px 30px rgba(23, 73, 80, 0.06);
}

.chat-compose textarea {
  width: 100%;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  padding: 10px 16px;
  overflow: hidden;
  resize: none;
  border-radius: 999px;
  line-height: 20px;
}

.chat-compose textarea::placeholder {
  color: color-mix(in srgb, var(--brand-teal) 48%, #9aa7a7 52%);
}

.chat-send-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  border: 0;
  border-radius: 50%;
  background: var(--brand-orange);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(242, 85, 44, 0.2);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.chat-send-button:hover {
  background: color-mix(in srgb, var(--brand-orange) 88%, #000 12%);
  box-shadow: 0 12px 26px rgba(242, 85, 44, 0.28);
  transform: translateY(-1px);
}

.chat-send-button:active {
  transform: translateY(0) scale(0.96);
}

.chat-send-button img {
  width: 19px;
  height: 19px;
  display: block;
}

.messenger-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 100px;
  padding: 18px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.messenger-contact-tooltip {
  position: fixed;
  z-index: 60;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--brand-teal);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translateY(-4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  white-space: nowrap;
  box-shadow: 0 12px 26px rgba(23, 73, 80, 0.18);
}

.messenger-contact-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.switch-stack {
  display: grid;
  gap: 10px;
}

.apple-switch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-cream) 42%, #fff 58%);
  cursor: pointer;
}

.apple-switch-row > span {
  min-width: 0;
}

.apple-switch-row strong,
.apple-switch-row small {
  display: block;
}

.apple-switch-row strong {
  color: var(--brand-teal);
  font-size: 15px;
  font-weight: 900;
}

.apple-switch-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.apple-switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.apple-switch-row i {
  position: relative;
  width: 56px;
  height: 32px;
  border-radius: 999px;
  background: rgba(23, 73, 80, 0.18);
  box-shadow: inset 0 1px 3px rgba(35, 31, 32, 0.14);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.apple-switch-row i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 9px rgba(35, 31, 32, 0.18);
  transition: transform 180ms ease;
}

.apple-switch-row input:checked + i {
  background: var(--brand-orange);
  box-shadow: inset 0 1px 3px rgba(35, 31, 32, 0.08), 0 8px 18px rgba(242, 85, 44, 0.18);
}

.apple-switch-row input:checked + i::after {
  transform: translateX(24px);
}

.apple-switch-row:focus-within {
  border-color: color-mix(in srgb, var(--brand-orange) 52%, var(--line));
  box-shadow: 0 0 0 3px rgba(242, 85, 44, 0.12);
}

.danger-zone {
  margin-top: 22px;
  border-color: color-mix(in srgb, var(--brand-orange) 36%, var(--line));
}

.account-toggle-card {
  padding: 0;
  overflow: hidden;
  margin-top: 3px;
}

.account-toggle-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}

.account-toggle-card summary::-webkit-details-marker {
  display: none;
}

.account-toggle-card summary::after {
  content: '+';
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--brand-teal);
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}

.account-toggle-card[open] summary::after {
  content: '-';
}

.account-toggle-card summary h2 {
  margin: 0;
}

.account-summary-title {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  line-height: 1.1;
}

.account-summary-title img {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(22%) sepia(24%) saturate(1452%) hue-rotate(141deg) brightness(91%) contrast(90%);
}

.account-summary-title.is-danger img {
  filter: brightness(0) saturate(100%) invert(25%) sepia(57%) saturate(2078%) hue-rotate(332deg) brightness(82%) contrast(88%);
}

.account-toggle-card > :not(summary) {
  margin-left: 20px;
  margin-right: 20px;
  animation: account-card-slide 180ms ease both;
}

.account-toggle-card > :last-child {
  margin-bottom: 20px;
}

@keyframes account-card-slide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.account-delete-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.account-delete-actions .danger-button,
.account-delete-actions .secondary-button {
  width: auto;
  min-width: 0;
  white-space: nowrap;
}

.community-panel {
  margin-bottom: 22px;
}

.community-panel h2 {
  margin-top: 0;
}

.section-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.section-head-row h2 {
  margin: 0;
}

.community-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.community-setting-card {
  display: grid;
  gap: 8px;
  width: 100%;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-cream) 62%, #fff 38%);
  color: var(--brand-teal);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.community-setting-card:hover {
  border-color: color-mix(in srgb, var(--brand-orange) 45%, var(--line) 55%);
  box-shadow: 0 12px 26px rgba(23, 73, 80, 0.1);
  transform: translateY(-1px);
}

.community-setting-card strong {
  font-size: 17px;
}

.community-setting-card span {
  color: #231f20;
  font-weight: 800;
}

.community-setting-card small {
  color: var(--muted);
  line-height: 1.45;
}

.community-modal-block {
  display: grid;
  gap: 16px;
}

.push-subscriptions-table td {
  vertical-align: top;
}

.push-subscriptions-table td small {
  display: block;
  max-width: 280px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.push-subscriptions-table code {
  display: inline-block;
  max-width: 280px;
  padding: 5px 8px;
  overflow: hidden;
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-cream) 60%, #fff 40%);
  color: var(--brand-teal);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.welcome-admin-preview {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.welcome-admin-preview.is-logo {
  max-height: 110px;
  object-fit: contain;
  padding: 14px;
  background: var(--brand-cream);
}

.welcome-reset-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.welcome-image-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.welcome-image-dropzone {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.welcome-image-dropzone.is-logo {
  min-height: 130px;
  background: var(--brand-cream);
}

.welcome-image-dropzone.is-dragging {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-orange) 18%, transparent);
}

.welcome-image-picker {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100%;
  cursor: pointer;
}

.welcome-image-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.welcome-empty-preview {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.welcome-empty-preview img {
  width: 86px;
  opacity: 0.5;
}

.welcome-image-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.welcome-image-dropzone.is-logo .welcome-image-preview {
  object-fit: contain;
  padding: 18px;
}

.welcome-image-picker strong {
  position: relative;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--brand-teal);
  font-size: 13px;
  box-shadow: 0 8px 22px rgba(23, 73, 80, 0.1);
}

.welcome-image-dropzone.has-image .welcome-empty-preview,
.welcome-image-dropzone.has-image .welcome-image-picker strong {
  opacity: 0;
  transition: opacity 0.16s ease;
}

.welcome-image-dropzone.has-image:hover .welcome-image-picker strong,
.welcome-image-dropzone.is-dragging .welcome-image-picker strong {
  opacity: 1;
}

.welcome-image-delete {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand-teal);
  box-shadow: 0 10px 22px rgba(23, 73, 80, 0.2);
  cursor: pointer;
}

.welcome-image-delete input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.welcome-image-delete img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.welcome-image-dropzone.is-removing .welcome-image-preview {
  opacity: 0.16;
  filter: grayscale(1);
}

.welcome-image-dropzone.is-removing::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: rgba(255, 255, 255, 0.62);
  pointer-events: none;
}

.restart-control {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.restart-control .help-text {
  max-width: 560px;
  margin: 0;
}

.table-scroll {
  overflow-x: auto;
}

.members-scroll {
  max-height: min(62vh, 640px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.32);
}

.welcome-modal-root {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.welcome-modal-root.is-open {
  opacity: 1;
  pointer-events: auto;
}

.welcome-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 73, 80, 0.28);
  backdrop-filter: blur(6px);
}

.welcome-modal {
  position: relative;
  width: min(550px, 100%);
  max-height: min(90vh, 820px);
  overflow: auto;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--brand-teal) 16%, #fff 84%);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(23, 73, 80, 0.24);
  transform: translateY(18px) scale(0.985);
  transition: transform 0.24s ease;
  -webkit-overflow-scrolling: touch;
}

.welcome-modal-root.is-open .welcome-modal {
  transform: translateY(0) scale(1);
}

.welcome-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
}

.welcome-modal-head h2 {
  margin: 0;
  color: var(--brand-teal);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.1;
}

.welcome-modal-close {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 2px solid color-mix(in srgb, var(--brand-teal) 72%, #fff 28%);
  border-radius: 50%;
  background: var(--brand-teal);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  line-height: 0.8;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(23, 73, 80, 0.22);
}

.welcome-modal-hero {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}

.welcome-modal-copy {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 28px;
  border-radius: 0 0 12px 12px;
  background: var(--brand-cream);
}

.welcome-modal-logo {
  width: min(300px, 76%);
  max-height: 110px;
  object-fit: contain;
}

.welcome-modal-text {
  width: 100%;
  color: var(--brand-teal);
  font-size: 18px;
  line-height: 1.34;
}

.welcome-modal-text p {
  margin: 0 0 1.2em;
}

.welcome-modal-text p:last-child {
  margin-bottom: 0;
}

.welcome-modal-text a {
  color: var(--brand-orange);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.welcome-modal-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--brand-orange);
  color: #fff;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 12px 26px color-mix(in srgb, var(--brand-orange) 28%, transparent);
}

@media (max-width: 720px) {
  .welcome-modal-root {
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  }

  .welcome-modal {
    max-height: 92vh;
    border-radius: 16px;
    padding: 8px;
  }

  .welcome-modal-head {
    padding: 18px 14px;
  }

  .welcome-modal-close {
    width: 42px;
    height: 42px;
    font-size: 27px;
  }

  .welcome-modal-copy {
    padding: 28px 22px;
  }
}

.members-scroll table {
  min-width: 920px;
}

.members-scroll thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel);
  box-shadow: 0 1px 0 var(--line);
}

.members-scroll th,
.members-scroll td {
  background: color-mix(in srgb, var(--panel) 82%, #ffffff 18%);
}

.members-toolbar {
  align-items: stretch;
  gap: 10px;
}

.member-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(94px, 1fr));
  gap: 8px;
  margin: 10px 0 14px;
}

.member-filter-card {
  min-width: 0;
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-teal);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 8px 18px rgba(23, 73, 80, 0.06);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.member-filter-card:hover,
.member-filter-card.active {
  border-color: var(--brand-orange);
  box-shadow: 0 10px 22px rgba(242, 85, 44, 0.12);
  transform: translateY(-1px);
}

.member-filter-card span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.member-filter-card strong {
  font-size: 22px;
  line-height: 1;
}

.members-search-control {
  position: relative;
  flex: 0 1 200px;
  width: min(100%, 200px);
  max-width: 200px;
}

.members-search-control input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 10px 44px 10px 16px;
  border-radius: 999px;
}

.members-search-button {
  position: absolute;
  top: 50%;
  right: 4px;
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--brand-orange);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--brand-orange) 24%, transparent);
  cursor: pointer;
  transform: translateY(-50%);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.members-search-button:hover {
  box-shadow: 0 10px 22px color-mix(in srgb, var(--brand-orange) 32%, transparent);
  transform: translateY(calc(-50% - 1px));
}

.members-search-button img {
  width: 17px;
  height: 17px;
  filter: brightness(0) invert(1);
}

.members-add-button {
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
}

.members-add-button img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.members-grace-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.members-grace-form label {
  display: grid;
  min-width: min(100%, 220px);
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.members-grace-form select {
  min-height: 42px;
  border-radius: 999px;
}

.members-grace-save {
  min-height: 42px;
  border-radius: 999px;
}

.members-grace-form small {
  flex: 1 1 260px;
  color: var(--muted);
  line-height: 1.35;
}

.member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.member-actions form {
  margin: 0;
}

.csv-import-marker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-teal) 9%, #fff);
  color: var(--brand-teal);
  font-size: 12px;
  font-weight: 850;
}

.members-scroll td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.member-action-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--brand-teal);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(23, 73, 80, 0.16);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.member-action-button:hover {
  background: color-mix(in srgb, var(--brand-teal) 84%, #000 16%);
  box-shadow: 0 10px 22px rgba(23, 73, 80, 0.22);
  transform: translateY(-1px);
}

.member-action-button:active {
  transform: translateY(0) scale(0.96);
}

.member-action-button img {
  width: 16px;
  height: 16px;
  display: block;
  filter: brightness(0) invert(1);
}

.danger-mini {
  background: #8f2832;
  color: #ffffff;
}

.members-loader {
  position: sticky;
  bottom: 0;
  padding: 12px;
  background: color-mix(in srgb, var(--brand-cream) 88%, #ffffff 12%);
  color: var(--brand-teal);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.members-loader[hidden] {
  display: none;
}

.csv-preview-summary {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
  margin: 10px 0 18px;
}

.csv-preview-summary > div {
  min-height: 78px;
  padding: 10px 12px;
}

.csv-preview-metric {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 2px 8px;
  align-items: center;
}

.csv-preview-metric-icon {
  position: relative;
  grid-row: span 2;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand-cream) 78%, #fff 22%);
}

.csv-preview-metric-icon img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  display: block;
  object-fit: contain;
  object-position: center;
  transform: translate(-50%, -50%);
  filter: brightness(0) saturate(100%) invert(22%) sepia(24%) saturate(1452%) hue-rotate(141deg) brightness(91%) contrast(90%);
}

.csv-preview-summary span:not(.csv-preview-metric-icon) {
  font-size: 10px;
  line-height: 1.1;
  text-transform: uppercase;
}

.csv-preview-summary strong {
  margin: 0;
  font-size: 24px;
  line-height: 1;
}

.csv-file-label-panel {
  min-height: 20px;
  margin-bottom: 10px;
  padding: 10px 14px;
}

.csv-file-label-panel p {
  margin: 0;
  line-height: 20px;
}

.csv-preview-panel {
  margin-top: 8px;
}

.csv-preview-table {
  max-height: min(62vh, 680px);
  overflow: auto;
}

.csv-preview-table table {
  min-width: 820px;
  table-layout: fixed;
}

.csv-preview-table th:nth-child(1),
.csv-preview-table td:nth-child(1) {
  width: 48px;
}

.csv-preview-table th:nth-child(3),
.csv-preview-table td:nth-child(3) {
  width: 76px;
  text-align: center;
}

.csv-preview-table th:nth-child(7),
.csv-preview-table td:nth-child(7) {
  width: 136px;
}

.csv-preview-table th:nth-child(8),
.csv-preview-table td:nth-child(8) {
  width: 96px;
}

.csv-preview-table th,
.csv-preview-table td {
  padding: 9px 10px;
  font-size: 13px;
  vertical-align: top;
}

.csv-preview-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel);
}

.csv-preview-table .status-pill,
.csv-preview-table .csv-import-marker {
  margin: 1px 4px 2px 0;
}

.csv-row-number {
  width: 46px;
}

.csv-email-cell,
.csv-plan-cell,
.csv-customer-cell {
  overflow-wrap: anywhere;
}

.csv-period-cell {
  white-space: nowrap;
}

.csv-commit-form {
  margin-top: 16px;
}

.csv-preview-submit-button,
.csv-commit-button {
  gap: 8px;
  border-radius: 999px;
}

.csv-preview-submit-button img,
.csv-commit-button img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.csv-duplicate-row td {
  background: color-mix(in srgb, var(--brand-pink) 18%, #fff 82%);
}

.categories-table {
  min-width: 680px;
}

.categories-table td:nth-child(3) {
  max-width: 420px;
  overflow-wrap: anywhere;
}

.category-delete-button {
  min-width: 176px;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 3200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-root[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 73, 80, 0.34);
  opacity: 0;
  transition: opacity 180ms ease;
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(23, 73, 80, 0.24);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
}

.modal-root.open .modal-backdrop,
.modal-root.open .modal-dialog {
  opacity: 1;
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 10px;
}

.modal-header h2 {
  margin: 0;
  font-size: 22px;
}

.modal-x {
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--brand-teal) 86%, #fff 14%);
  border-radius: 50%;
  background: var(--brand-teal);
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(23, 73, 80, 0.18);
  transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.modal-x:hover {
  background: color-mix(in srgb, var(--brand-teal) 88%, #000 12%);
  box-shadow: 0 14px 28px rgba(23, 73, 80, 0.24);
  transform: translateY(-1px);
}

.modal-body {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--muted);
  line-height: 1.55;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px 22px;
  border-top: 1px solid var(--line);
}

.page-actions {
  display: flex;
  justify-content: flex-end;
  margin: -6px 0 18px;
}

.admin-form-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.admin-form-modal.is-stacked {
  z-index: 3100;
}

.admin-form-modal[hidden] {
  display: none;
}

.admin-form-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 73, 80, 0.34);
  opacity: 0;
  transition: opacity 180ms ease;
}

.admin-form-dialog {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  max-height: min(86vh, 780px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(23, 73, 80, 0.24);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
}

.admin-form-dialog.is-wide {
  width: min(1120px, 100%);
}

.admin-form-modal.open .admin-form-backdrop,
.admin-form-modal.open .admin-form-dialog {
  opacity: 1;
}

.admin-form-modal.open .admin-form-dialog {
  transform: translateY(0) scale(1);
}

.admin-form-body {
  padding: 10px 22px 24px;
}

.admin-success-modal {
  position: fixed;
  inset: 0;
  z-index: 3400;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.admin-success-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.admin-success-modal.closing {
  opacity: 0;
}

.admin-success-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 73, 80, 0.26);
  backdrop-filter: blur(5px);
}

.admin-success-dialog {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(360px, 100%);
  padding: 28px 24px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--brand-teal);
  text-align: center;
  box-shadow: 0 28px 80px rgba(23, 73, 80, 0.24);
  transform: translateY(10px) scale(0.96);
  transition: transform 0.2s ease;
}

.admin-success-modal.open .admin-success-dialog {
  transform: translateY(0) scale(1);
}

.admin-success-check {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #24a148;
  box-shadow: 0 12px 28px rgba(36, 161, 72, 0.28);
  animation: success-pop 0.46s cubic-bezier(0.2, 1.35, 0.35, 1) both;
}

.admin-success-check svg {
  width: 42px;
  height: 42px;
  fill: #fff;
  animation: success-check 0.42s ease 0.12s both;
}

.admin-success-dialog h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

.admin-success-dialog p {
  margin: 0 0 8px;
  color: var(--muted);
}

@keyframes success-pop {
  0% { transform: scale(0.45); opacity: 0; }
  70% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes success-check {
  0% { transform: scale(0.4) rotate(-12deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.rich-editor {
  display: grid;
  gap: 10px;
  font-weight: 400;
}

.rich-editor-toolbar,
.rich-editor-embeds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.email-placeholder-tools,
.email-placeholder-help {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.email-placeholder-tools button,
.email-placeholder-help span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  background: color-mix(in srgb, var(--brand-cream) 62%, #fff 38%);
  color: var(--brand-teal);
  font-size: 12px;
  font-weight: 900;
}

.email-placeholder-tools button {
  cursor: pointer;
}

.email-template-editor .rich-editor-surface {
  min-height: 190px;
}

.email-template-editor .rich-editor-toolbar button {
  flex: 0 0 auto;
}

.email-color-picker {
  width: fit-content;
  max-width: 100%;
}

.email-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.email-color-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--brand-teal);
  box-shadow: 0 8px 20px rgba(23, 73, 80, 0.08);
}

.email-color-control input[type='color'] {
  width: 54px;
  height: 38px;
  min-height: 0;
  padding: 3px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.email-color-control input[type='color']::-webkit-color-swatch-wrapper {
  padding: 0;
}

.email-color-control input[type='color']::-webkit-color-swatch {
  border: 0;
  border-radius: 8px;
}

.email-color-control input[type='color']::-moz-color-swatch {
  border: 0;
  border-radius: 8px;
}

.email-color-control span {
  min-width: 72px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.rich-editor-toolbar button,
.rich-editor-embeds button,
.rich-editor-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: var(--brand-teal);
  cursor: pointer;
  font-weight: 850;
}

.rich-editor-toolbar button,
.rich-editor-upload-button,
.rich-editor-image-tools button {
  width: 38px;
  padding: 0;
}

.rich-editor-toolbar svg,
.rich-editor-upload-button svg,
.rich-editor-image-tools svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.rich-editor-upload-button {
  gap: 8px;
}

.rich-editor-upload-button input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.rich-editor-image-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-cream) 54%, #ffffff 46%);
}

.rich-editor-image-tools[hidden] {
  display: none;
}

.rich-editor-image-tools button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--brand-teal);
  cursor: pointer;
}

.rich-editor-image-tools label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-teal);
  font-size: 12px;
  font-weight: 900;
}

.rich-editor-image-tools input[type='range'] {
  width: 140px;
  accent-color: var(--brand-orange);
}

.rich-editor-embeds label {
  min-width: min(100%, 320px);
  flex: 1;
}

.rich-editor-embeds span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.rich-editor-surface {
  min-height: 260px;
  max-height: 56vh;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  color: #111;
  line-height: 1.6;
  outline: none;
}

.rich-editor-surface:focus {
  border-color: color-mix(in srgb, var(--brand-orange) 52%, var(--line));
  box-shadow: 0 0 0 3px rgba(242, 85, 44, 0.12);
}

.rich-editor-surface figure {
  margin: 12px 0;
  padding: 12px;
  border: 1px dashed rgba(23, 73, 80, 0.28);
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-cream) 64%, #ffffff 36%);
  color: var(--brand-teal);
  font-weight: 800;
}

.rich-editor-surface img,
.text-body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.rich-editor-surface img {
  margin: 12px 0;
}

.rich-editor-surface img.is-selected {
  outline: 3px solid rgba(242, 85, 44, 0.45);
  outline-offset: 3px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #efe3d4;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.pill-active,
.pill-trialing,
.pill-free {
  background: #e1edda;
  color: #355131;
}

.pill-free_only {
  background: color-mix(in srgb, var(--brand-cream) 78%, #ffffff 22%);
  color: var(--brand-teal);
}

.pill-canceled,
.pill-passive,
.pill-banned,
.pill-unpaid,
.pill-none {
  background: #f3dedb;
  color: #7b2d31;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.dashboard-metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 12px;
}

.metric-grid > div {
  padding: 22px;
}

.dashboard-metric-grid > div {
  min-height: 118px;
  padding: 13px;
}

.dashboard-metric-card {
  position: relative;
  overflow: hidden;
}

.dashboard-metric-icon {
  position: relative;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  margin-bottom: 9px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand-cream) 74%, #fff 26%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand-teal) 14%, transparent);
}

.dashboard-metric-icon img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 17px;
  height: 17px;
  display: block;
  object-fit: contain;
  object-position: center;
  transform: translate(-50%, -50%);
  filter: brightness(0) saturate(100%) invert(22%) sepia(24%) saturate(1452%) hue-rotate(141deg) brightness(91%) contrast(90%);
}

.metric-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-metric-grid span:not(.dashboard-metric-icon) {
  font-size: 11px;
  line-height: 1.15;
  text-transform: uppercase;
}

.metric-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 38px;
}

.dashboard-metric-grid strong {
  margin-top: 4px;
  font-size: 28px;
  line-height: 1;
}

.metric-grid small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.analytics-metrics {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 22px 0;
}

.analytics-wide {
  grid-column: 1 / -1;
}

.analytics-bars {
  display: grid;
  gap: 12px;
}

.analytics-bar-row {
  display: grid;
  gap: 6px;
}

.analytics-bar-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--brand-teal);
  font-weight: 850;
}

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

.analytics-bar-label strong {
  color: var(--brand-orange);
  font-variant-numeric: tabular-nums;
}

.analytics-bar-track {
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 73, 80, 0.12);
}

.analytics-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-orange), var(--brand-pink));
}

.admin-actions,
.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.admin-actions a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px 10px 11px;
  border-radius: 999px;
  background: var(--sage);
  color: #fff;
  font-family: var(--font-title);
  font-weight: 850;
  box-shadow: 0 12px 26px rgba(23, 73, 80, 0.15);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.admin-actions a:hover,
.admin-actions a:focus-visible {
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--brand-teal) 84%, #000 16%);
  box-shadow: 0 16px 34px rgba(23, 73, 80, 0.22);
}

.admin-actions a img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.video-list {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.admin-video {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  padding: 18px;
}

.admin-video-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
}

.admin-audio-icon {
  min-height: 132px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--brand-cream);
}

.admin-audio-icon img {
  width: 58px;
  height: 58px;
}

.admin-audio-icon .admin-audio-cover {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
}

.upload-progress {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(236, 239, 208, 0.5);
}

.upload-progress[hidden] {
  display: none;
}

.upload-progress > div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 73, 80, 0.16);
}

.upload-progress span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--brand-orange);
  transition: width 120ms ease;
}

.upload-progress p {
  margin: 0;
  color: var(--brand-teal);
  font-size: 13px;
}

.admin-video-body {
  display: grid;
  gap: 12px;
}

@media (max-width: 760px) {
  main {
    width: min(100% - 22px, 1180px);
  }

  .topbar {
    height: 78px;
    padding: 14px;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
  }

  body:has(.topbar) main {
    padding-top: 86px;
  }

  body:has(.messenger-shell) main {
    width: 100%;
    height: calc(100dvh - env(safe-area-inset-top));
    min-height: 0;
    padding: 84px 10px 10px;
  }

  html.messenger-keyboard-open,
  html.messenger-keyboard-open body {
    overflow: hidden;
  }

  .topnav {
    gap: 8px;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .global-search {
    order: 0;
    flex: 1 1 auto;
    min-width: 116px;
    max-width: 260px;
    margin: 0;
  }

  .global-search-form input {
    height: 42px;
    padding: 0 44px 0 14px;
    font-size: 15px;
  }

  .global-search-form button {
    width: 32px;
    height: 32px;
    right: 5px;
  }

  .global-search-form button img {
    width: 16px;
    height: 16px;
  }

  .global-search-panel {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 84px);
    right: 10px;
    left: 10px;
    max-height: calc(100dvh - env(safe-area-inset-top) - 104px);
  }

  .global-search-results {
    grid-template-columns: 1fr;
  }

  .menu-button,
  .notification-button {
    width: 40px;
    height: 40px;
  }

  .menu-button img,
  .notification-button img {
    width: 20px;
    height: 20px;
  }

  .dropdown-menu {
    max-height: calc(100vh - env(safe-area-inset-top) - 112px);
  }

  .dropdown-menu-scroll {
    max-height: calc(100vh - env(safe-area-inset-top) - 182px);
  }

  .notification-wrap {
    position: static;
  }

  .notification-panel {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 58px);
    right: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100dvh - env(safe-area-inset-top) - 74px);
    transform-origin: top center;
  }

  .notification-panel::before {
    right: 74px;
  }

  .notification-list {
    max-height: calc(100dvh - env(safe-area-inset-top) - 130px);
  }

  .brand img {
    width: clamp(82px, 24vw, 120px);
  }

  .metric-grid,
  .analytics-grid,
  .admin-video,
  .account-profile {
    grid-template-columns: 1fr;
  }

  .messenger-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    height: var(--messenger-viewport-height, 100%);
    max-height: var(--messenger-viewport-height, 100%);
  }

  .messenger-sidebar {
    min-height: 0;
    display: block;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .messenger-sidebar-head {
    display: none;
  }

  .messenger-contact-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    padding: 9px 12px;
  }

  .messenger-contact {
    position: relative;
    width: 52px;
    min-height: 52px;
    flex: 0 0 52px;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 3px;
    border-radius: 50%;
  }

  .messenger-contact:hover,
  .messenger-contact.active {
    background: #fff;
    box-shadow: 0 8px 18px rgba(23, 73, 80, 0.12);
  }

  .messenger-contact .messenger-avatar {
    width: 46px;
    height: 46px;
  }

  .messenger-contact-copy {
    display: none;
  }

  .messenger-unread {
    position: absolute;
    top: -1px;
    right: -1px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 10px;
  }

  .messenger-chat {
    min-height: 0;
  }

  .messenger-shell.keyboard-open {
    position: fixed;
    top: var(--messenger-viewport-top, 0);
    left: var(--messenger-viewport-left, 0);
    z-index: 230;
    width: var(--messenger-viewport-width, 100vw);
    height: var(--messenger-viewport-height, 100dvh);
    max-height: var(--messenger-viewport-height, 100dvh);
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
    box-shadow: none;
  }

  .messenger-chat-head {
    min-height: 64px;
    padding: 10px 12px;
  }

  .chat-messages {
    min-height: 0;
    padding: 14px;
  }

  .messenger-shell.keyboard-open .chat-messages {
    padding-bottom: 14px;
  }

  .chat-message-main {
    max-width: 92%;
  }

  .chat-compose {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px 12px;
  }

  .messenger-shell.keyboard-open .chat-compose {
    position: relative;
    z-index: 2;
    width: auto;
    border: 1px solid var(--line);
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
  }

  .chat-compose textarea {
    min-height: 42px;
    max-height: 42px;
  }

  .user-profile-summary {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .user-profile-avatar {
    width: 104px;
    height: 104px;
  }

  .details {
    grid-template-columns: 1fr;
  }

  .categories-table-panel {
    padding: 14px;
  }

  .categories-table {
    min-width: 0;
  }

  .categories-table thead {
    display: none;
  }

  .categories-table,
  .categories-table tbody,
  .categories-table tr,
  .categories-table td {
    display: block;
    width: 100%;
  }

  .categories-table tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  .categories-table tr:last-child {
    border-bottom: 0;
  }

  .categories-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    padding: 7px 0;
    border-bottom: 0;
  }

  .categories-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .categories-table td:last-child {
    align-items: center;
  }

  .category-delete-button {
    width: 42px;
    min-width: 42px;
    padding: 0;
  }

  .category-delete-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .login-panel {
    padding: 26px;
  }

  .login-code-actions {
    grid-template-columns: 1fr;
  }

  .comments-section {
    padding: 18px;
  }

  .comments-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .comment-replies {
    padding-left: 12px;
  }

  .timeline-post-head {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    padding: 14px 14px 8px;
  }

  .timeline-post-body,
  .timeline-gallery,
  .timeline-post-actions {
    padding-left: 14px;
    padding-right: 14px;
  }

  .timeline-gallery,
  .timeline-gallery.grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline-gallery.one {
    grid-template-columns: 1fr;
  }

  .timeline-photo-nav {
    width: 42px;
    height: 42px;
  }

  .timeline-photo-nav.prev {
    left: 0;
  }

  .timeline-photo-nav.next {
    right: 0;
  }

  .timeline-embed-card {
    grid-template-columns: 1fr;
    margin-left: 14px;
    margin-right: 14px;
  }

  .timeline-youtube-embed {
    margin-left: 14px;
    margin-right: 14px;
  }
}

@media (max-height: 620px) {
  .login-shell {
    place-items: start center;
  }

  .login-panel {
    max-height: calc(100dvh - 24px);
    padding: 22px;
  }

  .login-logo {
    width: min(210px, 72%);
    margin-bottom: 18px;
  }
}
