:root {
  --ink: #17211f;
  --ink-soft: #4d5c58;
  --sand: #e8f0ec;
  --paper: #f5faf7;
  --white: #ffffff;
  --lagoon: #0f6f66;
  --lagoon-dark: #0b4a44;
  --on-accent: #f7fffd;
  --sidebar: #0a3a36;
  --sidebar-ink: #e4f3ef;
  --terracotta: #c24d1c;
  --moss: #3f6b3a;
  --line: #c5d6d0;
  --danger: #b42318;
  --shadow: 0 18px 50px color-mix(in srgb, var(--ink) 10%, transparent);
  --radius: 18px;
  --btn-radius: 10px;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", "Avenir Next", "Segoe UI", sans-serif;
  color-scheme: light;
}

html[data-scheme="dark"] {
  color-scheme: dark;
}

html[data-theme="harbor"][data-scheme="dark"] {
  --ink: #e6f3ef;
  --ink-soft: #9bb5ae;
  --sand: #0c1413;
  --paper: #14201d;
  --white: #1b2b27;
  --lagoon: #3dcfbf;
  --lagoon-dark: #7ee0d4;
  --on-accent: #062421;
  --sidebar: #07110f;
  --sidebar-ink: #d5efe9;
  --terracotta: #e08955;
  --moss: #8fbf7a;
  --line: #2a3f3a;
  --danger: #ff7a70;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

html[data-theme="atlas"] {
  --ink: #1a2233;
  --ink-soft: #4d5870;
  --sand: #e8edf6;
  --paper: #f5f7fc;
  --white: #ffffff;
  --lagoon: #2c4a8c;
  --lagoon-dark: #1c3268;
  --on-accent: #f5f8ff;
  --sidebar: #152246;
  --sidebar-ink: #e4eaf8;
  --terracotta: #c45c32;
  --moss: #3d6a7a;
  --line: #c5cde0;
  --danger: #b42318;
}

html[data-theme="atlas"][data-scheme="dark"] {
  --ink: #e6ecf8;
  --ink-soft: #97a4c0;
  --sand: #0d111a;
  --paper: #151b2a;
  --white: #1c2438;
  --lagoon: #7aa2f0;
  --lagoon-dark: #a8c2f5;
  --on-accent: #0c1730;
  --sidebar: #080b14;
  --sidebar-ink: #dce5f7;
  --terracotta: #e09068;
  --moss: #7eb3c4;
  --line: #2a3348;
  --danger: #ff7a70;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

html[data-theme="ember"] {
  --ink: #2a1812;
  --ink-soft: #6a4a3e;
  --sand: #f4ebe4;
  --paper: #fbf6f1;
  --white: #fffdfb;
  --lagoon: #c24d1c;
  --lagoon-dark: #8a3412;
  --on-accent: #fff7f2;
  --sidebar: #5c2410;
  --sidebar-ink: #f8e6d8;
  --terracotta: #b8860b;
  --moss: #5a6b38;
  --line: #e0cfc3;
  --danger: #9b2c2c;
}

html[data-theme="ember"][data-scheme="dark"] {
  --ink: #f6e6dc;
  --ink-soft: #c4a090;
  --sand: #140c09;
  --paper: #1f1410;
  --white: #2a1b16;
  --lagoon: #e87840;
  --lagoon-dark: #f0a070;
  --on-accent: #2a1008;
  --sidebar: #0e0806;
  --sidebar-ink: #f3dccd;
  --terracotta: #e0c060;
  --moss: #a0b86a;
  --line: #3d2a22;
  --danger: #ff7a70;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

html[data-theme="orchard"] {
  --ink: #1a2418;
  --ink-soft: #4d5c48;
  --sand: #eef3e8;
  --paper: #f6faf2;
  --white: #fdfffa;
  --lagoon: #3f6b32;
  --lagoon-dark: #2a4a22;
  --on-accent: #f4fbf0;
  --sidebar: #1e3318;
  --sidebar-ink: #e6f0dc;
  --terracotta: #c45a28;
  --moss: #6a8f4e;
  --line: #c9d6c0;
  --danger: #b42318;
}

html[data-theme="orchard"][data-scheme="dark"] {
  --ink: #e8f2e0;
  --ink-soft: #a3b896;
  --sand: #0e130c;
  --paper: #161c14;
  --white: #1e261a;
  --lagoon: #8fbf6a;
  --lagoon-dark: #b5d494;
  --on-accent: #14200e;
  --sidebar: #080b07;
  --sidebar-ink: #dcead0;
  --terracotta: #e08955;
  --moss: #a8cc88;
  --line: #2c3828;
  --danger: #ff7a70;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

html[data-theme="noir"] {
  --ink: #161513;
  --ink-soft: #5c5850;
  --sand: #f1eee6;
  --paper: #f8f6f0;
  --white: #fffcf7;
  --lagoon: #1a1916;
  --lagoon-dark: #11100e;
  --on-accent: #f7f3ea;
  --sidebar: #161513;
  --sidebar-ink: #f1eee6;
  --terracotta: #9a7b2f;
  --moss: #5a6358;
  --line: #d8d2c4;
  --danger: #9b2c2c;
}

html[data-theme="noir"][data-scheme="dark"] {
  --ink: #f2efe6;
  --ink-soft: #b0aa9a;
  --sand: #0c0b0a;
  --paper: #161512;
  --white: #1f1e1a;
  --lagoon: #d4c08a;
  --lagoon-dark: #e6d6a8;
  --on-accent: #16140c;
  --sidebar: #000000;
  --sidebar-ink: #efe8d4;
  --terracotta: #c4a24a;
  --moss: #8a9288;
  --line: #2e2c26;
  --danger: #ff7a70;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, color-mix(in srgb, var(--terracotta) 12%, transparent), transparent 50%),
    radial-gradient(900px 400px at 110% 10%, color-mix(in srgb, var(--lagoon) 14%, transparent), transparent 45%),
    var(--sand);
  background-attachment: fixed;
}

body:has(.auth-shell) {
  overflow-x: hidden;
}

@media (min-width: 861px) {
  body:has(.auth-shell) {
    overflow: hidden;
  }
}

a {
  color: var(--lagoon-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

img {
  max-width: 100%;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  grid-template-rows: minmax(100vh, auto);
  min-height: 100vh;
}

.shell-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100%;
}

.mobile-topbar {
  display: none;
}

.nav-backdrop,
.nav-close {
  display: none;
}

.sidebar {
  background: var(--sidebar);
  color: var(--sidebar-ink);
  padding: 1.6rem 1.2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.sidebar-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
  min-height: 0;
}

.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  color: var(--sidebar-ink);
  text-decoration: none;
}

.brand span {
  display: block;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  font-weight: 500;
  opacity: 0.7;
  margin-top: 0.2rem;
}

.workspace-switcher {
  background: color-mix(in srgb, var(--sidebar-ink) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--sidebar-ink) 14%, transparent);
  border-radius: 14px;
  padding: 0.75rem;
}

.workspace-switcher-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
  margin: 0 0 0.35rem;
}

.workspace-switcher-name {
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
}

.workspace-switcher select,
.workspace-switcher button {
  width: 100%;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow-y: auto;
  flex: 1;
}

.nav-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.5;
  margin: 0.9rem 0.7rem 0.2rem;
}

.nav-label:first-child {
  margin-top: 0;
}

.nav a {
  color: inherit;
  text-decoration: none;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  gap: 0.4rem;
}

.nav a:hover,
.nav a.is-active {
  background: color-mix(in srgb, var(--sidebar-ink) 12%, transparent);
}

.nav .hint {
  font-size: 0.62rem;
  letter-spacing: 0.02em;
  opacity: 0.55;
  flex: 0 0 auto;
  transform: translateY(-0.35em);
}

.sidebar-foot {
  margin-top: auto;
  font-size: 0.9rem;
}

.sidebar-foot a {
  color: var(--sidebar-ink);
}

.content {
  padding: 2rem 2.2rem 3rem;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.35rem;
}

.hero-tagline {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.03em;
  margin: 0 0 0.6rem;
}

h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.lede {
  max-width: 42rem;
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
  line-height: 1.55;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.cards {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
}

.stat {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
}

.btn,
button,
input[type="submit"] {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
  border-radius: var(--btn-radius);
  padding: 0.68rem 1.15rem;
  cursor: pointer;
  background: var(--lagoon);
  color: var(--on-accent);
  text-decoration: none;
}

.btn:hover,
.btn:focus-visible,
button:hover,
button:focus-visible,
input[type="submit"]:hover,
input[type="submit"]:focus-visible {
  text-decoration: none;
}

a.btn,
a.btn:link,
a.btn:visited,
a.btn:hover,
a.btn:focus-visible,
a.btn:active {
  text-decoration: none;
}

.btn.secondary,
button.secondary {
  background: transparent;
  color: var(--lagoon-dark);
  border: 1px solid color-mix(in srgb, var(--lagoon-dark) 22%, var(--line));
}

.btn.danger,
button.danger {
  background: var(--danger);
  border-color: color-mix(in srgb, currentColor 24%, transparent);
}

.btn.ghost,
button.ghost {
  background: transparent;
  color: inherit;
  border-color: transparent;
  padding-left: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.table td.actions {
  white-space: nowrap;
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.table td.actions form {
  margin: 0;
}

.table td.actions button {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}

.public-requests-gate {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  margin: 0;
}

.public-requests-gate .eyebrow {
  margin: 0;
}

.switch,
button.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0.2rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0;
  box-shadow: none;
}

.switch:hover,
button.switch:hover,
.switch:focus-visible,
button.switch:focus-visible {
  background: transparent;
  color: inherit;
}

.switch-track {
  position: relative;
  width: 2.4rem;
  height: 1.35rem;
  flex-shrink: 0;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 18%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 0.12rem;
  left: 0.12rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 1px 2px color-mix(in srgb, #000 18%, transparent);
  transition: transform 0.15s ease;
}

.switch.is-on .switch-track {
  background: var(--lagoon);
  border-color: var(--lagoon);
}

.switch.is-on .switch-track::after {
  transform: translateX(1.05rem);
}

.switch:focus-visible .switch-track {
  outline: 2px solid var(--lagoon);
  outline-offset: 2px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.table th,
.table td {
  text-align: left;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table th {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  background: color-mix(in srgb, var(--lagoon) 12%, transparent);
  color: var(--lagoon-dark);
}

.badge.warn {
  background: color-mix(in srgb, var(--terracotta) 14%, transparent);
  color: var(--terracotta);
}

.badge.danger {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
}

.badge.complimentary {
  background: color-mix(in srgb, var(--moss) 16%, transparent);
  color: var(--moss);
}

.complimentary-banner {
  background: color-mix(in srgb, var(--moss) 12%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--moss) 28%, var(--line));
  color: var(--ink);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
}

.output-caption {
  white-space: pre-wrap;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0.4rem 0 0.6rem;
}

.issue-list {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 0;
}

.issue {
  font-size: 0.88rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}

.issue.error {
  color: var(--danger);
}

.issue.warning {
  color: var(--terracotta);
}

.issue.info {
  color: var(--ink-soft);
}

.output-card {
  min-height: 100%;
}

.output-picker {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.output-picker-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.2rem;
}

.output-picker-head > div {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
}

.form-stack {
  display: grid;
  gap: 0.9rem;
  max-width: 42rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="datetime-local"],
input[type="search"],
select,
textarea {
  font: inherit;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  width: 100%;
}

.messages {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.messages li {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 0.5rem;
}

.messages .success {
  color: var(--lagoon-dark);
}

.messages .warning {
  color: var(--terracotta);
}

.messages .error {
  color: var(--danger);
}

.auth-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 1.2fr) minmax(320px, 440px);
}

.auth-story {
  position: relative;
  z-index: 1;
  overflow: visible;
  padding: 3.5rem 5vw 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-story-copy {
  position: relative;
  z-index: 1;
  max-width: 36rem;
}

.auth-story-copy::before {
  content: "";
  position: absolute;
  inset: -2.2rem -2.6rem;
  z-index: -1;
  pointer-events: none;
  border-radius: 2rem;
  background: color-mix(in srgb, var(--sand) 82%, transparent);
  filter: blur(28px);
}

.auth-panel {
  position: relative;
  z-index: 1;
  background: var(--paper);
  padding: 3.2rem 2.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--line);
}

.auth-panel .lede {
  max-width: none;
  margin-bottom: 1.2rem;
}

.auth-panel .form-stack {
  max-width: none;
}

.auth-panel .actions {
  display: grid;
  gap: 0.7rem;
  width: 100%;
  margin-top: 0.15rem;
}

.auth-panel .btn,
.auth-panel button:not(.auth-link),
.auth-panel input[type="submit"] {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.78rem 1.15rem;
}

.auth-panel form {
  display: grid;
  gap: 0.95rem;
}

.auth-panel hr {
  width: 100%;
  border: 0;
  height: 1px;
  margin: 0.35rem 0;
  background: var(--line);
}

.auth-footnote {
  margin: 1.15rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.5;
}

.auth-alt {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.95rem;
}

.auth-panel .auth-alt a,
.auth-alt a,
.auth-link,
.auth-panel .auth-link,
.auth-panel .auth-alt button {
  width: auto;
  min-height: 0;
  padding: 0;
  display: inline;
  background: none;
  border: 0;
  color: var(--lagoon-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  font-weight: 500;
  cursor: pointer;
}

.auth-link:hover,
.auth-link:focus-visible,
.auth-panel .auth-alt button:hover,
.auth-panel .auth-alt button:focus-visible {
  background: none;
  color: var(--lagoon-dark);
}

.auth-logo-field {
  position: absolute;
  top: -16vh;
  right: 300px;
  bottom: -18vh;
  left: -12vw;
  z-index: 0;
  isolation: isolate;
  pointer-events: none;
}

.auth-logo {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 0;
  color: var(--lagoon-dark);
  animation: auth-logo-drift var(--d, 20s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.auth-logo .platform-icon {
  display: block;
  width: calc(var(--s, 2) * 1rem);
  height: calc(var(--s, 2) * 1rem);
}

.auth-logo--far {
  opacity: 0.11;
  filter: blur(0.6px);
}

.auth-logo--mid {
  opacity: 0.22;
}

.auth-logo--near {
  opacity: 0.38;
}

@keyframes auth-logo-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(var(--dx, 12px), var(--dy, -16px), 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-logo {
    animation: none;
  }
}

.hero-mark {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  margin: 0 0 1rem;
}

.hero-mark + .lede {
  font-size: 1.2rem;
  color: var(--ink);
  max-width: 28rem;
}

.muted {
  color: var(--ink-soft);
}

.empty {
  color: var(--ink-soft);
  font-style: italic;
}

.helptext,
.helptext ul {
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 400;
}

.calendar-weekdays,
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
}

.calendar-weekdays {
  margin: 0.4rem 0 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.calendar-cell {
  min-height: 8.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.45rem 0.5rem 0.6rem;
}

.calendar-cell.today {
  outline: 2px solid var(--lagoon);
}

.calendar-cell.muted-cell {
  opacity: 0.45;
}

.cal-date {
  margin: 0 0 0.35rem;
  font-weight: 700;
}

.cal-event {
  display: block;
  font-size: 0.75rem;
  line-height: 1.3;
  background: color-mix(in srgb, var(--lagoon) 10%, transparent);
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
  padding: 0.28rem 0.4rem;
  margin-top: 0.3rem;
}

.cal-event-head {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.1rem;
}

.cal-event.story {
  background: color-mix(in srgb, var(--terracotta) 12%, transparent);
}

.cal-time {
  display: block;
  font-weight: 700;
  color: var(--lagoon-dark);
}

.cal-meta {
  display: block;
  color: var(--ink-soft);
}

.tag {
  display: inline-block;
  background: color-mix(in srgb, var(--lagoon) 10%, transparent);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  margin: 0.15rem 0.1rem;
  font-size: 0.85rem;
}

.playbook {
  display: grid;
  gap: 1rem;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
}

code {
  font-size: 0.92em;
}

.errorlist {
  color: var(--danger);
  margin: 0.2rem 0 0;
  padding-left: 1.1rem;
}

@media (max-width: 860px) {
  .app-shell,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  body.is-nav-open {
    overflow: hidden;
  }

  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 0.85rem 1.1rem;
    background: color-mix(in srgb, var(--sand) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }

  .mobile-topbar .brand {
    color: var(--ink);
  }

  .nav-toggle,
  .nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    min-height: 0;
    padding: 0;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
    background: color-mix(in srgb, currentColor 8%, transparent);
    color: inherit;
    box-shadow: none;
    flex: 0 0 auto;
  }

  .nav-toggle:hover,
  .nav-toggle:focus-visible,
  .nav-close:hover,
  .nav-close:focus-visible {
    background: color-mix(in srgb, currentColor 14%, transparent);
  }

  .nav-toggle {
    color: var(--ink);
  }

  .nav-toggle svg,
  .nav-close svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 30;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 0;
    min-height: 0;
    background: color-mix(in srgb, #000 16%, transparent);
    box-shadow: none;
    cursor: pointer;
  }

  .nav-backdrop:hover,
  .nav-backdrop:focus-visible {
    background: color-mix(in srgb, #000 22%, transparent);
  }

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

  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 40;
    width: min(22rem, 68vw);
    max-width: 100%;
    padding: 1.1rem 0.75rem 1.4rem;
    gap: 1rem;
    overflow: hidden;
    transform: translateX(100%);
    box-shadow: -18px 0 40px transparent;
    transition:
      transform 220ms ease,
      box-shadow 220ms ease;
  }

  body.is-nav-open .sidebar {
    transform: translateX(0);
    box-shadow: -18px 0 40px color-mix(in srgb, #000 22%, transparent);
  }

  .sidebar-brand {
    display: none;
  }

  .sidebar-top {
    justify-content: flex-end;
    min-height: 2.6rem;
  }

  .sidebar-main {
    flex: 1;
    min-height: 0;
  }

  .nav {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .nav-label {
    margin-left: 0.45rem;
    margin-right: 0.45rem;
  }

  .nav a {
    padding: 0.55rem 0.45rem;
    font-size: 0.95rem;
  }

  .sidebar-foot {
    padding-top: 0.35rem;
  }

  .content {
    padding: 1.25rem 1.1rem 2.4rem;
  }

  .calendar-weekdays,
  .calendar,
  .split-layout,
  .grid[style] {
    grid-template-columns: 1fr;
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }

  .auth-story {
    z-index: 2;
    padding: 2.4rem 1.4rem 1.1rem;
  }

  .auth-logo-field {
    top: -8vh;
    right: -12vw;
    bottom: -8vh;
    left: -12vw;
  }

  .auth-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 2.2rem 1.4rem 3rem;
  }

  .auth-logo--far {
    opacity: 0.08;
  }
}

@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  .sidebar {
    transition: none;
  }
}

.walkthrough-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
}

.walkthrough-steps li {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.walkthrough-steps li.done {
  background: color-mix(in srgb, var(--lagoon) 12%, transparent);
  color: var(--lagoon-dark);
  border-color: transparent;
}

.walkthrough-steps li.current {
  background: var(--lagoon);
  color: var(--on-accent);
  border-color: var(--lagoon);
}

.interval-toggle {
  display: flex;
  gap: 0.6rem;
  margin: 0 0 1rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.plan-card {
  display: grid;
  gap: 0.45rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.plan-card.featured {
  outline: 2px solid var(--lagoon);
}

.plan-card .price {
  font-family: var(--serif);
  font-size: 1.8rem;
  margin: 0;
}

.plan-card input[type="radio"] {
  width: auto;
  margin-bottom: 0.2rem;
}

@media (max-width: 860px) {
  .plan-grid {
    grid-template-columns: 1fr;
  }
}

.process-breadcrumb {
  margin: 0 0 1.5rem;
}

.process-breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

.process-breadcrumb-item {
  display: flex;
  align-items: center;
}

.process-breadcrumb-step {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 0.15rem 0;
}

.process-breadcrumb-item.is-current .process-breadcrumb-step {
  color: var(--ink);
}

.process-breadcrumb-item.is-complete .process-breadcrumb-step {
  color: var(--lagoon-dark);
}

.process-breadcrumb-num {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  color: var(--ink-soft);
}

.process-breadcrumb-item.is-current .process-breadcrumb-num {
  background: var(--lagoon);
  color: var(--on-accent);
}

.process-breadcrumb-item.is-complete .process-breadcrumb-num {
  background: color-mix(in srgb, var(--lagoon) 16%, transparent);
  color: var(--lagoon-dark);
}

.process-breadcrumb-label {
  letter-spacing: 0.01em;
}

.process-breadcrumb-separator {
  width: 1.75rem;
  height: 1px;
  margin: 0 0.35rem;
  background: var(--line);
  flex-shrink: 0;
}

.process-breadcrumb-item.is-complete + .process-breadcrumb-separator {
  background: color-mix(in srgb, var(--lagoon) 35%, var(--line));
}

.process-caption {
  color: var(--ink-soft);
  margin: 0.65rem 0 0;
  max-width: 40rem;
  font-size: 0.92rem;
}

/* Legacy pill steps — kept for any cached references */
.process-steps {
  display: none;
}

.glossary-line {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.55;
  max-width: 46rem;
}

.form-compose {
  max-width: 46rem;
  display: grid;
  gap: 1rem;
}

.compose-page {
  max-width: 46rem;
}

.compose-header {
  margin-bottom: 1.25rem;
}

.compose-header h1 {
  margin: 0 0 0.35rem;
}

.compose-lede {
  margin: 0;
  max-width: 36rem;
}

.compose-section {
  padding: 1.15rem 1.25rem;
  display: grid;
  gap: 0.85rem;
}

.compose-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}

.compose-section-options {
  padding-bottom: 1rem;
}

.compose-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.compose-field-media .field-label,
.field-label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

.compose-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  padding-top: 0.25rem;
}

@media (max-width: 640px) {
  .compose-options-grid {
    grid-template-columns: 1fr;
  }
}

/* Library media picker (dispatch compose) */

.library-media-picker {
  display: grid;
  gap: 0.65rem;
}

.library-media-empty {
  margin: 0;
  font-size: 0.9rem;
}

.library-media-selected-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.library-media-selected-item {
  display: grid;
  grid-template-columns: 3.25rem 1fr auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem 0.45rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  min-width: 0;
  max-width: 100%;
  flex: 1 1 220px;
}

.library-media-selected-preview {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 8px;
  overflow: hidden;
  background: color-mix(in srgb, var(--lagoon) 8%, var(--sand));
  display: grid;
  place-items: center;
}

.library-media-selected-preview img,
.library-media-selected-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.library-media-selected-preview.kind-caption {
  padding: 0.35rem;
  font-size: 0.62rem;
  line-height: 1.25;
  align-items: start;
}

.library-media-selected-title {
  font-size: 0.88rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-media-selected-remove {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.library-media-selected-remove:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
}

.library-media-browse {
  justify-self: start;
}

.library-media-dialog {
  width: min(720px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 48px color-mix(in srgb, var(--ink) 18%, transparent);
}

.library-media-dialog::backdrop {
  background: color-mix(in srgb, var(--ink) 35%, transparent);
}

.library-media-dialog-header,
.library-media-dialog-toolbar,
.library-media-dialog-footer {
  padding: 1rem 1.15rem;
}

.library-media-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.library-media-dialog-header h2 {
  margin: 0 0 0.2rem;
  font-size: 1.15rem;
}

.library-media-dialog-close {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 8px;
}

.library-media-dialog-close:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
}

.library-media-dialog-toolbar {
  display: grid;
  gap: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.library-media-search {
  width: 100%;
}

.library-media-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.library-media-dialog-body {
  padding: 1rem 1.15rem;
  overflow: auto;
  max-height: min(52vh, 420px);
}

.library-media-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 0.65rem;
}

.library-media-tile {
  margin: 0;
}

.library-media-tile-btn {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  padding: 0;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.library-media-tile-btn:hover {
  border-color: color-mix(in srgb, var(--lagoon) 45%, var(--line));
}

.library-media-tile.is-selected .library-media-tile-btn {
  border-color: var(--lagoon);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--lagoon) 22%, transparent);
}

.library-media-tile-preview {
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--lagoon) 8%, var(--sand));
  overflow: hidden;
}

.library-media-tile-preview .library-play {
  width: 2rem;
  height: 2rem;
}

.library-media-tile-preview.kind-caption {
  padding: 0.65rem;
  align-items: start;
  font-size: 0.72rem;
  line-height: 1.35;
}

.library-media-tile-check {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: var(--lagoon);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.library-media-tile.is-selected .library-media-tile-check {
  opacity: 1;
  transform: scale(1);
}

.library-media-tile-title {
  display: block;
  padding: 0.45rem 0.55rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-media-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
}

/* Streamlined datetime picker */

.datetime-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.datetime-picker-trigger {
  flex: 1 1 12rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font: inherit;
  font-weight: 500;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.datetime-picker-trigger:hover {
  border-color: color-mix(in srgb, var(--lagoon) 40%, var(--line));
}

.datetime-picker-icon {
  color: var(--ink-soft);
  display: grid;
}

.datetime-picker-clear {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
}

.datetime-picker-clear:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}

.datetime-picker-dialog {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 40px color-mix(in srgb, var(--ink) 16%, transparent);
}

.datetime-picker-dialog::backdrop {
  background: color-mix(in srgb, var(--ink) 30%, transparent);
}

.datetime-picker-panel {
  padding: 1rem;
  display: grid;
  gap: 1rem;
  min-width: min(320px, calc(100vw - 2rem));
}

.datetime-picker-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.datetime-picker-month {
  font-weight: 700;
  font-size: 0.95rem;
}

.datetime-picker-nav {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}

.datetime-picker-nav:hover {
  border-color: var(--lagoon);
}

.datetime-picker-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.15rem;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-align: center;
}

.datetime-picker-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.2rem;
}

.datetime-picker-day {
  aspect-ratio: 1;
  border: none;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.datetime-picker-day.is-empty {
  pointer-events: none;
}

.datetime-picker-day.is-today:not(.is-selected) {
  outline: 1px solid color-mix(in srgb, var(--lagoon) 45%, transparent);
}

.datetime-picker-day:hover:not(.is-empty) {
  background: color-mix(in srgb, var(--lagoon) 10%, transparent);
}

.datetime-picker-day.is-selected {
  background: var(--lagoon);
  color: var(--on-accent);
}

.datetime-picker-time-label {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.datetime-picker-time-inputs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.datetime-picker-time-inputs select {
  width: auto;
  min-width: 4.5rem;
}

.datetime-picker-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--line);
}

.media-picker {
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.45rem;
}

.media-picker li {
  margin: 0;
}

.media-picker label {
  font-weight: 500;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.1rem;
}

.chip.is-active {
  background: var(--lagoon);
  color: var(--on-accent);
  border-color: var(--lagoon);
}

.filter-segment {
  display: inline-flex;
  align-items: stretch;
  align-self: flex-start;
  width: max-content;
  max-width: 100%;
  margin: 0 0 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--paper);
}

.filter-segment-item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  padding: 0.4rem 0.7rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink-soft);
  text-decoration: none;
  text-underline-offset: unset;
  white-space: nowrap;
  transition:
    background 0.16s ease,
    color 0.16s ease;
}

.filter-segment-item + .filter-segment-item {
  border-left: 1px solid var(--line);
}

.filter-segment-item:hover,
.filter-segment-item:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--lagoon) 8%, var(--paper));
  outline: none;
  text-decoration: none;
}

.filter-segment-item.is-active {
  color: var(--on-accent);
  background: var(--lagoon);
}

.filter-segment-item.is-active:hover,
.filter-segment-item.is-active:focus-visible {
  color: var(--on-accent);
  background: var(--lagoon);
}

.how-it-works {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.how-step {
  text-decoration: none;
  color: inherit;
  display: grid;
  gap: 0.35rem;
}

.how-step h2 {
  margin: 0;
}

.how-step:hover {
  outline: 2px solid var(--lagoon);
}

.home-split {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.2rem;
}

.posting-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 1.2rem;
  align-items: start;
}

.posting-side {
  position: sticky;
  top: 1rem;
}

.send-panel {
  background: var(--white);
}

.review-section {
  margin-top: 1.2rem;
}

.review-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.9rem;
}

.destination-groups {
  display: grid;
  gap: 1rem;
}

.dest-group-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.dest-group-identity {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  min-width: 0;
}

.dest-group-head h3 {
  margin: 0;
}

.output-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.output-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  min-height: 100%;
}

.output-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.4rem;
}

.output-card-action {
  margin: 0.75rem 0 0;
}

.dest-group.is-blocked,
.output-card.is-blocked {
  border-color: color-mix(in srgb, var(--danger) 35%, transparent);
}

.dest-group.is-warning,
.output-card.is-warning {
  border-color: color-mix(in srgb, var(--terracotta) 35%, transparent);
}

.departures-followup {
  margin-top: 1.8rem;
}

.send-views {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0 0 1.4rem;
}

.send-views a {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem 0.95rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}

.send-views a strong {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 560;
}

.send-views a span {
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.4;
}

.send-views a.is-active {
  outline: 2px solid var(--lagoon);
}

.field ul {
  margin: 0.2rem 0 0;
  padding-left: 1.1rem;
}

.connect-catalog {
  margin: 0 0 1.6rem;
}

.connect-catalog h2 {
  margin-bottom: 0.75rem;
}

.platform-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
  align-items: stretch;
}

.platform-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  min-height: 100%;
  padding: 1.1rem 1.15rem 1.15rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}

.platform-tile h3 {
  margin: 0.2rem 0 0;
  font-size: 1.2rem;
}

.platform-tile p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.4;
}

.platform-tile-cta {
  margin-top: auto;
  align-self: stretch;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.55rem 0.95rem;
  border-radius: var(--btn-radius);
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  background: var(--lagoon);
  color: var(--on-accent);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
}

.platform-tile:hover {
  outline: 2px solid var(--lagoon);
}

.platform-tile:hover .platform-tile-cta {
  background: var(--lagoon-dark);
}

.platform-icon {
  width: 1.85rem;
  height: 1.85rem;
  flex-shrink: 0;
  display: block;
  overflow: visible;
  color: var(--lagoon-dark);
}

.destination-mark {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
}

.destination-mark.is-compact {
  width: 1.5rem;
  height: 1.5rem;
}

.destination-mark .platform-icon {
  width: 100%;
  height: 100%;
}

.destination-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: var(--sand);
  display: block;
}

.destination-mark-fallback {
  display: none;
  width: 100%;
  height: 100%;
}

.destination-mark.has-avatar.is-broken .destination-avatar,
.destination-mark.has-avatar.is-broken .destination-mark-badge {
  display: none;
}

.destination-mark.has-avatar.is-broken .destination-mark-fallback {
  display: block;
}

.destination-mark-badge {
  position: absolute;
  right: -0.18rem;
  bottom: -0.18rem;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 1px var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.destination-mark-badge .platform-icon {
  width: 0.72rem;
  height: 0.72rem;
}

.destination-mark.is-compact .destination-mark-badge {
  width: 0.72rem;
  height: 0.72rem;
  right: -0.14rem;
  bottom: -0.14rem;
}

.destination-mark.is-compact .destination-mark-badge .platform-icon {
  width: 0.55rem;
  height: 0.55rem;
}

.destination-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  vertical-align: middle;
}

.destination-chip-copy {
  min-width: 0;
  line-height: 1.2;
}

.route-destination-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.35rem 0 0.5rem;
}

.destination-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
}

.destination-card-head {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.destination-card-head h2 {
  margin: 0;
}

.destination-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: auto;
  padding-top: 0.35rem;
}

.connect-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.connect-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 42rem;
  width: 100%;
}

.connect-panel .actions {
  margin-top: auto;
  padding-top: 1.25rem;
}

.connect-heading {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.4rem;
}

.connect-heading h1 {
  margin: 0;
}

.connect-heading .platform-icon {
  width: 2.4rem;
  height: 2.4rem;
}

.connect-steps {
  max-width: 42rem;
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.connect-note {
  max-width: 42rem;
  margin: 0 0 1.2rem;
}

.destination-grid {
  margin-top: 0.4rem;
}

.route-destination-field {
  border: 0;
  padding: 0;
  margin: 0;
  max-width: none;
}

.route-destination-field legend {
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.45rem;
}

.route-destinations {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.65rem;
}

.route-destination {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0.75rem 0.85rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-weight: 500;
  cursor: pointer;
}

.route-destination input {
  width: auto;
  margin: 0;
  accent-color: var(--lagoon);
}

.route-destination .destination-mark {
  width: 2rem;
  height: 2rem;
}

.route-destination .destination-mark > .platform-icon,
.route-destination .destination-mark-fallback .platform-icon {
  width: 100%;
  height: 100%;
}

.route-destination-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.route-destination-copy strong {
  font-size: 0.98rem;
  line-height: 1.25;
}

.route-destination:hover,
.route-destination.is-selected,
.route-destination:has(input:checked) {
  outline: 2px solid var(--lagoon);
}

.route-destination.is-selected,
.route-destination:has(input:checked) {
  background: color-mix(in srgb, var(--lagoon) 8%, transparent);
}

.route-default {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.route-default input {
  width: auto;
}

.team-member-form {
  max-width: none;
  gap: 0.7rem;
}

.team-destination-field {
  margin-top: 0.2rem;
}

.team-destination-field .helptext,
.team-destination-field .muted {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.team-member-form .route-destinations {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.sidebar-foot-links {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0.55rem 0 0;
  white-space: nowrap;
}

.sidebar-foot-links a,
.sidebar-foot-links .appearance-pop {
  flex: 0 0 auto;
}

.foot-sep {
  flex: 0 0 auto;
  opacity: 0.65;
}

.appearance-pop {
  position: relative;
  display: inline-block;
}

.appearance-pop summary {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  color: inherit;
  font: inherit;
  list-style: none;
  line-height: 0;
}

.appearance-pop summary svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.appearance-pop summary::-webkit-details-marker {
  display: none;
}

.appearance-panel {
  position: absolute;
  bottom: calc(100% + 0.55rem);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 0.65rem;
  min-width: 13.5rem;
  padding: 0.8rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.auth-story .appearance-pop {
  display: inline-block;
  margin-top: 1.4rem;
}

.auth-story .appearance-panel {
  bottom: auto;
  top: calc(100% + 0.55rem);
}

@media (max-width: 860px) {
  .auth-story .appearance-panel {
    top: auto;
    bottom: calc(100% + 0.55rem);
  }
}

.theme-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.theme-swatch {
  width: 1.5rem;
  height: 1.5rem;
  min-height: 0;
  padding: 0;
  flex-shrink: 0;
  border-radius: 999px;
  border: 2px solid color-mix(in srgb, currentColor 28%, transparent);
  background: var(--lagoon);
  cursor: pointer;
}

.theme-swatch.is-active {
  box-shadow: 0 0 0 2px currentColor;
}

.theme-swatch[data-theme-choice="harbor"] {
  background: #0f6f66;
}

.theme-swatch[data-theme-choice="atlas"] {
  background: #2c4a8c;
}

.theme-swatch[data-theme-choice="ember"] {
  background: #c24d1c;
}

.theme-swatch[data-theme-choice="orchard"] {
  background: #3f6b32;
}

.theme-swatch[data-theme-choice="noir"] {
  background: #1a1916;
  border-color: #d4c08a;
}

.scheme-toggle {
  display: flex;
  gap: 0.3rem;
}

.scheme-toggle button {
  flex: 1;
  padding: 0.35rem 0.45rem;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: color-mix(in srgb, currentColor 10%, transparent);
  color: inherit;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-radius: var(--btn-radius);
  min-height: 2rem;
}

.scheme-toggle button.is-active {
  background: var(--lagoon);
  color: var(--on-accent);
  border-color: var(--lagoon);
}

.sidebar .muted {
  color: color-mix(in srgb, var(--sidebar-ink) 70%, transparent);
}

@media (max-width: 980px) {
  .posting-layout,
  .how-it-works,
  .home-split,
  .send-views {
    grid-template-columns: 1fr;
  }

  .posting-side {
    position: static;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: block;
}

.library-page {
  position: relative;
}

.library-drop-form {
  margin: 0;
}

.library-drop {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  padding: 1.7rem 1.2rem;
  text-align: center;
  background: var(--paper);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.library-hero-drop {
  min-height: min(28rem, 68vh);
  padding: 3.2rem 1.6rem;
  align-content: center;
  gap: 0.7rem;
}

.library-drop:hover,
.library-drop.is-dragging,
body.is-file-drag .library-drop-overlay {
  border-color: var(--lagoon);
  background: color-mix(in srgb, var(--lagoon) 10%, var(--paper));
  box-shadow: 0 22px 60px color-mix(in srgb, var(--lagoon) 18%, transparent);
}

.library-hero-drop.is-dragging {
  transform: scale(1.01);
}

.library-drop-mark {
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--lagoon) 16%, transparent);
  color: var(--lagoon-dark);
  font-size: 1.45rem;
  font-weight: 700;
  transition: transform 0.18s ease;
}

.library-drop.is-dragging .library-drop-mark,
.library-drop:hover .library-drop-mark {
  transform: translateY(-3px);
}

.library-drop-title {
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  font-weight: 560;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.library-hero-drop .muted {
  max-width: 22rem;
}

.library-drop-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.library-drop-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 120;
  place-items: center;
  gap: 0.55rem;
  text-align: center;
  pointer-events: none;
  background: color-mix(in srgb, var(--lagoon) 16%, var(--sand));
  border: 3px dashed var(--lagoon);
}

body.is-file-drag .library-drop-overlay {
  display: grid;
}

.library-usage {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
}

.library-usage-bar {
  margin-top: 0.45rem;
  width: min(18rem, 100%);
  height: 0.35rem;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.library-usage-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--lagoon);
  max-width: 100%;
}

.library-upload-preview-dialog {
  width: min(42rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: none;
}

.library-upload-preview-panel {
  display: grid;
  gap: 1rem;
  padding: 1.2rem 1.25rem 1.25rem;
}

.library-upload-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}

.library-upload-preview-head h2 {
  margin: 0.15rem 0 0;
}

.library-upload-preview-lede {
  margin: 0.35rem 0 0;
}

.library-upload-preview-status {
  margin: 0;
  color: var(--lagoon-dark);
  font-weight: 600;
}

.library-upload-preview-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  max-height: min(24rem, 50vh);
  overflow: auto;
}

.library-upload-preview-item {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.85rem;
  align-items: center;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.library-upload-preview-thumb {
  aspect-ratio: 1;
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  background: color-mix(in srgb, var(--ink) 6%, var(--paper));
  display: grid;
  place-items: center;
}

.library-upload-preview-thumb img,
.library-upload-preview-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.library-upload-preview-meta strong {
  display: block;
  word-break: break-word;
}

.library-upload-preview-meta p {
  margin: 0.25rem 0 0;
}

.library-upload-preview-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.library-upload-status {
  margin: 0.5rem 0 0;
  color: var(--lagoon-dark);
  font-weight: 600;
}

.library-upload-status.is-busy,
.library-upload-status.htmx-indicator.is-busy {
  display: block !important;
  opacity: 1 !important;
}

.library-empty-alt {
  margin: 0.9rem 0 0;
  text-align: center;
}

.library-empty-alt a {
  color: var(--ink-soft);
  font-weight: 600;
}

.library-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  margin-bottom: 0.9rem;
}

.library-search {
  flex: 1 1 16rem;
}

.library-search input[type="search"] {
  border-radius: 999px;
  padding: 0.75rem 1.05rem;
}

.library-caption-link {
  font-weight: 600;
  white-space: nowrap;
}

.library-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.library-sort select {
  min-width: 7.5rem;
  padding: 0.55rem 2rem 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.library-view-toggle {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--paper);
}

.library-view-btn {
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  color: var(--ink-soft);
  text-decoration: none;
  transition:
    background 0.16s ease,
    color 0.16s ease;
}

.library-view-btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

.library-view-btn:hover,
.library-view-btn:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--lagoon) 8%, var(--paper));
  outline: none;
}

.library-view-btn.is-active {
  color: var(--lagoon-dark);
  background: color-mix(in srgb, var(--lagoon) 14%, var(--paper));
}

.library-view-btn + .library-view-btn {
  border-left: 1px solid var(--line);
}

.library-kind-filters {
  margin-bottom: 1rem;
}

.chip.compact {
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.chip-count {
  font-weight: 600;
  opacity: 0.75;
}

#library-results.htmx-request .library-grid,
#library-results.htmx-request .library-list {
  opacity: 0.55;
  transition: opacity 0.16s ease;
}

.card.library-add-tile {
  --library-add-dash: 5px;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  border-color: transparent;
  border-radius: var(--radius);
  box-shadow: none;
  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

.card.library-add-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border: var(--library-add-dash) dashed color-mix(in srgb, var(--ink) 40%, var(--line));
  border-radius: inherit;
  pointer-events: none;
}

.library-add-tile-hit {
  display: contents;
}

.library-add-tile-preview {
  aspect-ratio: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.4rem;
  padding: 1rem;
  overflow: hidden;
  background: color-mix(in srgb, var(--lagoon) 8%, var(--sand));
  border-top-left-radius: calc(var(--radius) - var(--library-add-dash));
  border-top-right-radius: calc(var(--radius) - var(--library-add-dash));
  clip-path: inset(
    0 round
      calc(var(--radius) - var(--library-add-dash))
      calc(var(--radius) - var(--library-add-dash))
      0 0
  );
}

.library-add-tile .library-drop-mark {
  width: 2.6rem;
  height: 2.6rem;
  font-size: 1.2rem;
}

.library-add-tile-body {
  padding: 0.8rem 0.9rem 0.95rem;
  display: grid;
  gap: 0.15rem;
  background: var(--paper);
  border-bottom-left-radius: calc(var(--radius) - var(--library-add-dash));
  border-bottom-right-radius: calc(var(--radius) - var(--library-add-dash));
}

.library-add-tile-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card.library-add-tile:hover,
.card.library-add-tile.is-dragging {
  transform: translateY(-3px);
}

.card.library-add-tile:hover::after,
.card.library-add-tile.is-dragging::after {
  border-color: var(--lagoon);
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 0.9rem;
}

.library-list {
  display: grid;
  gap: 0.75rem;
}

.library-add-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  color: inherit;
  transition:
    border-color 0.18s ease,
    background 0.18s ease;
}

.library-add-row .library-drop-mark {
  width: 2.2rem;
  height: 2.2rem;
  font-size: 1rem;
}

.library-add-row-title {
  font-weight: 700;
}

.library-add-row:hover,
.library-add-row.is-dragging {
  border-color: var(--lagoon);
  background: color-mix(in srgb, var(--lagoon) 10%, var(--paper));
}

.library-table {
  margin: 0;
}

.library-row:hover {
  background: color-mix(in srgb, var(--lagoon) 5%, var(--paper));
}

.library-row-thumb {
  width: 4.5rem;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.library-row-thumb > a,
.library-row-thumb {
  display: block;
  position: relative;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
  background: color-mix(in srgb, var(--lagoon) 8%, var(--sand));
}

.library-row-thumb img,
.library-row-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.library-row-thumb .library-play {
  width: 1.6rem;
  height: 1.6rem;
}

.library-row-caption,
.library-row-file {
  display: block;
  padding: 0.35rem;
  font-size: 0.72rem;
  line-height: 1.25;
  overflow: hidden;
}

.library-row-title a {
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}

.library-row-title a:hover,
.library-row-title a:focus-visible {
  color: var(--lagoon-dark);
}

.library-row-date {
  white-space: nowrap;
  font-size: 0.92rem;
}

.library-card {
  position: relative;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  animation: library-card-in 0.42s ease both;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.library-card:hover,
.library-card:focus-visible {
  outline: 2px solid var(--lagoon);
  outline-offset: 0;
  transform: translateY(-3px);
}

.library-card-preview {
  aspect-ratio: 1;
  background: color-mix(in srgb, var(--lagoon) 8%, var(--sand));
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.library-card-preview img,
.library-card-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.library-card:hover img,
.library-card:hover video {
  transform: scale(1.045);
}

.library-card-preview.kind-caption,
.library-card-preview.kind-other,
.library-card-preview.kind-hashtag_set {
  padding: 1rem;
  align-items: start;
}

.library-kind {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink);
  background: color-mix(in srgb, var(--white) 86%, transparent);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
}

.library-caption-preview,
.library-file-name {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.library-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  color: var(--white);
  pointer-events: none;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 1px 3px color-mix(in srgb, var(--ink) 55%, transparent));
  transition: opacity 0.18s ease;
}

.library-play svg {
  width: 100%;
  height: 100%;
  display: block;
}

.library-card:hover .library-play {
  opacity: 0;
}

.library-card-body {
  padding: 0.8rem 0.9rem 0.95rem;
  display: grid;
  gap: 0.15rem;
}

.library-card-body h2 {
  font-size: 1.05rem;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-empty {
  margin-top: 0.5rem;
}

.library-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  margin-top: 1.1rem;
}

.library-item-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 24rem);
  gap: 1.4rem;
  align-items: start;
}

.library-item-preview {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 16rem;
  display: grid;
  place-items: center;
}

.library-item-preview img,
.library-item-preview video {
  width: 100%;
  display: block;
  max-height: min(72vh, 42rem);
  object-fit: contain;
  background: color-mix(in srgb, var(--ink) 5%, var(--paper));
}

.library-item-preview.kind-caption,
.library-item-preview.kind-other,
.library-item-preview.kind-hashtag_set {
  padding: 2rem 1.6rem;
  align-items: start;
}

.library-item-preview .library-caption-preview {
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  line-height: 1.35;
}

.library-item-form .form-stack {
  max-width: none;
}

.library-item-form {
  position: sticky;
  top: 1rem;
}

.library-item-remove {
  margin-top: 1rem;
}

.library-item-remove .ghost {
  padding: 0;
  color: var(--danger);
  background: transparent;
  font-weight: 600;
}

@keyframes library-card-in {
  from {
    /* Keep a trace of opacity so Chromium still paints <video> posters
       while the card animates in. Fully transparent ancestors skip frames. */
    opacity: 0.01;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

.library-item-layout.is-form-only {
  grid-template-columns: minmax(0, 28rem);
}

@media (max-width: 860px) {
  .library-item-layout {
    grid-template-columns: 1fr;
  }

  .library-item-form {
    position: static;
  }
}

@media (max-width: 720px) {
  .library-toolbar {
    display: grid;
  }

  .library-controls {
    justify-content: space-between;
    width: 100%;
  }

  .library-hero-drop {
    min-height: 22rem;
  }
}

.hashtag-live-panel h2 {
  margin-top: 0;
}

.hashtag-live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
  max-height: calc(100vh - 10rem);
  overflow: auto;
  padding-right: 0.2rem;
}

.hashtag-platform {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 0.95rem 1rem;
  display: grid;
  gap: 0.55rem;
}

.hashtag-platform-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.hashtag-platform-head h3 {
  margin: 0;
  font-size: 1rem;
}

.hashtag-platform-head .platform-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.hashtag-platform-head .badge {
  margin-left: auto;
}

.hashtag-mock {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
}

.hashtag-caption,
.hashtag-caption-tags,
.hashtag-youtube-title,
.hashtag-title-tags {
  margin: 0;
}

.hashtag-caption {
  font-size: 0.95rem;
  line-height: 1.45;
}

.hashtag-caption-tags {
  margin-top: 0.65rem;
  line-height: 1.55;
}

.hashtag-link {
  color: var(--lagoon-dark);
  font-weight: 600;
}

.hashtag-sticker {
  display: inline-block;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  margin: 0.15rem 0.1rem;
  font-weight: 700;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--ink) 8%, transparent);
}

.hashtag-story-note {
  margin: 0 0 0.55rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.hashtag-stickers {
  min-height: 4.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: center;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--sidebar) 18%, transparent), transparent 55%),
    color-mix(in srgb, var(--lagoon) 10%, var(--paper));
  border-radius: 10px;
  padding: 0.7rem;
}

.hashtag-youtube-frame {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  margin-bottom: 0.55rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--lagoon) 22%, var(--paper)), var(--sand));
}

.hashtag-title-tags {
  font-size: 0.82rem;
  margin-bottom: 0.15rem;
}

.hashtag-youtube-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.hashtag-dropped-line {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.hashtag-dropped {
  text-decoration: line-through;
  opacity: 0.75;
  margin-right: 0.15rem;
}

.hashtag-notes {
  margin: 0;
  font-size: 0.85rem;
}

@media (max-width: 860px) {
  .hashtag-live-grid {
    max-height: none;
  }
}

.console-code-input {
  letter-spacing: 0.28em;
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
}

.console-logout {
  display: inline;
  margin: 0;
}

.sidebar-foot-links a.is-active {
  font-weight: 700;
}

.account-stack {
  display: grid;
  gap: 1.15rem;
  max-width: 42rem;
}

.account-section > h2,
.account-section-head h2 {
  margin-bottom: 0.35rem;
}

.account-section > .muted,
.account-section-head .muted {
  margin: 0 0 1rem;
}

.account-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.account-section-head .btn {
  flex: 0 0 auto;
}

.account-keys {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.account-keys li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.account-keys li:first-child {
  border-top: 0;
  padding-top: 0;
}

.account-key-name {
  margin: 0 0 0.2rem;
  font-weight: 600;
}

.account-keys .muted {
  margin: 0;
}

.account-remove-password {
  margin-top: 0.85rem;
}

@media (max-width: 640px) {
  .account-section-head,
  .account-keys li {
    flex-direction: column;
    align-items: stretch;
  }
}

.oauth-app-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.oauth-app-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.oauth-app-title {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
}

.oauth-app-title h2 {
  margin: 0 0 0.15rem;
}

.oauth-app-title .muted {
  margin: 0;
}

.oauth-app-callback {
  margin: 0 0 0.95rem;
  font-size: 0.85rem;
  word-break: break-all;
}

.oauth-app-card .form-stack {
  max-width: none;
}

.oauth-app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.oauth-app-note {
  margin: 0.85rem 0 0;
}
