/* Waves (wv-): the feed page with its sea-blue header, the ring filter on the left
   and the side boxes on the right (stacked under the feed on phones), the
   composer, wave cards, the spoiler veil, replies, and My Waves / My Dog-ears.
   Each shore has its colour: Cove gold (buddies), Harbour sage (members), Open Sea
   blue (everyone). Colours come from the site palette where they can, so night
   mode (night.css, night-auto.css) turns them over. */

.wv-page {
  --wv-ink: var(--bb-sage-900);
  --wv-text: #3d4536;
  --wv-muted: #5f6758;
  --wv-line: var(--bb-sage-200);
  --wv-card: #ffffff;
  --wv-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  max-width: 1180px;
  margin: 0.5rem auto 3rem;
  color: var(--wv-ink);
}

.wv-page-narrow {
  max-width: 700px;
}

.wv-muted {
  color: var(--wv-muted);
  font-size: 0.9rem;
}

.wv-alert {
  border-radius: 0.9rem;
}

/* ---------- Header: a compact deep-sea band ---------- */

/* Fixed colours here (not the palette), so it stays a dark band in night mode too. */
.wv-hero {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.25rem;
  margin-bottom: 1.25rem;
  padding: 1.1rem 1.4rem;
  border-radius: 1.1rem;
  background:
    radial-gradient(circle at 85% -40%, rgba(227, 193, 92, 0.45), transparent 45%),
    linear-gradient(115deg, #0f1f4d 0%, #1e3a8a 45%, #1d4ed8 80%, #0e7490 100%);
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 31, 77, 0.22);
  overflow: hidden;
  isolation: isolate;
}

/* Waves rolling along the bottom. */
.wv-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 26' preserveAspectRatio='none'%3E%3Cpath d='M0 14 Q15 5 30 14 T60 14 T90 14 T120 14 V26 H0Z' fill='%23ffffff' fill-opacity='.08'/%3E%3Cpath d='M0 19 Q15 11 30 19 T60 19 T90 19 T120 19 V26 H0Z' fill='%23ffffff' fill-opacity='.08'/%3E%3C/svg%3E") repeat-x;
  background-size: 180px 26px;
  z-index: -1;
}

.wv-hero-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f8edc8;
}

.wv-hero-mark svg {
  width: 26px;
  height: 26px;
}

.wv-hero-text {
  flex: 1 1 260px;
  min-width: 0;
}

.wv-hero-eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e3c15c;
}

.wv-hero h1 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(1.45rem, 1.15rem + 1.2vw, 1.9rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #ffffff;
  overflow-wrap: anywhere;
}

.wv-hero-sub {
  margin: 0.2rem 0 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.82);
}

.wv-hero-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.wv-hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 34px;
  padding: 0 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
}

.wv-hero-stat b {
  font-size: 0.95rem;
}

.wv-hero-stat-new {
  background: #e3c15c;
  border-color: #e3c15c;
  color: #2b2104;
}

.wv-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 42px;
  padding: 0 1.15rem;
  border-radius: 999px;
  background: #ffffff;
  color: #1e3a8a;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s, box-shadow 0.15s;
}

.wv-hero-cta svg {
  width: 18px;
  height: 18px;
}

.wv-hero-cta:hover,
.wv-hero-cta:focus-visible {
  color: #1e3a8a;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

/* ---------- Layout: menu | feed | side boxes ---------- */

.wv-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 270px;
  gap: 1.5rem;
  align-items: start;
  transition: grid-template-columns 0.2s ease;
}

/* Icons only: the menu shrinks to a slim rail. */
.wv-layout--icons {
  grid-template-columns: 62px minmax(0, 1fr) 270px;
}

.wv-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* The left column runs the full height of the feed, so the sticky rail inside
   it stays in view while the member scrolls (a column only as tall as the rail
   gives it nowhere to move). Below 1100px the rail is a strip above the feed. */
.wv-side-left {
  align-self: stretch;
}

/* ---------- The menu (rail) ---------- */

/* The sticky block holds the rail and the "Find a buddy" panel together, so the
   panel moves with the rail instead of sliding under it. Sticky makes it its own
   layer above the feed: otherwise the hover labels and the panel go behind the
   waves. Still under the "new waves" pill (25) and the compact menu (30). */
.wv-rail-wrap {
  position: sticky;
  top: 1rem;
  z-index: 22;
}

.wv-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem;
  background: var(--wv-card);
  border: 1px solid var(--wv-line);
  border-radius: 1rem;
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.05);
}

.wv-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  padding: 0.15rem 0.15rem 0.3rem 0.5rem;
}

.wv-rail-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wv-muted);
  white-space: nowrap;
}

.wv-rail-group {
  padding: 0.55rem 0.5rem 0.2rem;
}

.wv-rail-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: var(--wv-muted);
  cursor: pointer;
}

.wv-rail-toggle:hover {
  background: var(--bb-sage-100);
  color: var(--wv-ink);
}

.wv-rail-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.wv-rail-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.wv-rail-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 42px;
  padding: 0.3rem;
  border-radius: 0.75rem;
  color: var(--wv-ink);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s;
}

.wv-rail-item:hover {
  background: var(--bb-sage-100);
  color: var(--wv-ink);
}

.wv-rail-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 0.65rem;
  flex-shrink: 0;
  background: var(--bb-sage-100);
  color: var(--bb-sage-700);
  transition: background-color 0.15s, color 0.15s;
}

.wv-rail-icon svg {
  width: 18px;
  height: 18px;
}

.wv-tone-all { background: #e8eefc; color: #1e3a8a; }
.wv-tone-buddies { background: #fdf3d7; color: #7d6318; }
.wv-tone-cove { background: var(--bb-gold-100); color: #6b5414; }
.wv-tone-harbour { background: var(--bb-sage-100); color: var(--bb-sage-700); }
.wv-tone-open { background: var(--bb-blue-50); color: var(--bb-blue-700); }
.wv-tone-mine { background: #eef0ff; color: #4338ca; }
.wv-tone-saved { background: #fde8ee; color: #9f1239; }

.wv-rail-label {
  flex-grow: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wv-rail-item.is-active {
  background: #1e3a8a;
  color: #ffffff;
}

.wv-rail-item.is-active .wv-rail-icon {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.wv-rail-sep {
  height: 1px;
  margin: 0.35rem 0.4rem 0;
  background: var(--bb-sage-100);
}

/* Hover (or keyboard focus) info: a dark label beside the item. */
.wv-rail-item[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  z-index: 20;
  padding: 0.4rem 0.65rem;
  border-radius: 0.5rem;
  background: #111827;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translate(-4px, -50%);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  pointer-events: none;
}

.wv-rail-item[data-tip]:hover::after,
.wv-rail-item[data-tip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
  transition-delay: 0.25s;
}

/* Icons only. */
.wv-layout--icons .wv-rail {
  align-items: center;
  padding: 0.45rem 0.3rem;
}

.wv-layout--icons .wv-rail-head {
  padding: 0 0 0.3rem;
}

.wv-layout--icons .wv-rail-title,
.wv-layout--icons .wv-rail-label {
  display: none;
}

.wv-layout--icons .wv-rail-group {
  display: none;
}

.wv-layout--icons .wv-rail-toggle svg {
  transform: rotate(180deg);
}

.wv-layout--icons .wv-rail-item {
  justify-content: center;
  padding: 0.2rem;
}

.wv-layout--icons .wv-rail-sep {
  width: 70%;
  margin: 0.3rem auto;
}

.wv-clear,
.wv-back {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}

.wv-feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.wv-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Small caps labels: the form's field names and the side boxes' sub-headings. */
.wv-label,
.wv-box-sub {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wv-muted);
}

/* ---------- Composer ---------- */

/* Folded: one slim bar. Open: the bar gives way to the full form. */
.wv-compose-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 56px;
  padding: 0.5rem 0.55rem 0.5rem 0.65rem;
  background: var(--wv-card);
  border: 1px solid var(--wv-line);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.05);
  cursor: pointer;
  list-style: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.wv-compose-bar::-webkit-details-marker {
  display: none;
}

.wv-compose-bar:hover,
.wv-compose-bar:focus-visible {
  border-color: var(--bb-blue-200);
  box-shadow: 0 6px 18px rgba(30, 58, 138, 0.1);
  outline: none;
}

.wv-compose-bar:focus-visible {
  box-shadow: 0 0 0 3px var(--bb-blue-200);
}

.wv-compose[open] > .wv-compose-bar {
  display: none;
}

.wv-compose-prompt {
  flex-grow: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--wv-muted);
  font-size: 0.95rem;
}

.wv-compose-short {
  display: none;
}

.wv-compose-kinds {
  display: flex;
  gap: 0.15rem;
}

.wv-compose-kind {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--bb-sage-700);
  transition: background-color 0.15s, color 0.15s;
}

.wv-compose-kind svg {
  width: 18px;
  height: 18px;
}

.wv-compose-kind:hover {
  background: var(--bb-blue-50);
  color: var(--bb-blue-700);
}

.wv-compose-go {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 40px;
  padding: 0 1rem;
  border-radius: 999px;
  background: var(--bb-blue-600);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.wv-compose-go svg {
  width: 16px;
  height: 16px;
}

.wv-composer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -0.35rem -0.35rem -0.35rem 0;
}

.wv-composer-head strong {
  font-size: 1.05rem;
}

.wv-compose-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--wv-muted);
  cursor: pointer;
}

.wv-compose-close:hover {
  background: var(--bb-sage-100);
  color: var(--wv-ink);
}

.wv-compose-close svg {
  width: 18px;
  height: 18px;
}

.wv-compose[open] .wv-composer {
  animation: wv-unfold 0.18s ease-out;
}

@keyframes wv-unfold {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.wv-composer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--wv-card);
  border: 1px solid var(--wv-line);
  border-radius: 1.1rem;
  box-shadow: 0 6px 22px rgba(30, 58, 138, 0.06);
}

.wv-first {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: 0.8rem;
  background: var(--bb-gold-100);
  color: #4a3a0e;
  font-size: 0.92rem;
  line-height: 1.5;
}

.wv-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wv-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.wv-kind input,
.wv-pill input,
.wv-ring-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wv-kind span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0 0.9rem;
  border: 1px solid var(--wv-line);
  border-radius: 999px;
  background: var(--wv-card);
  color: var(--wv-text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

.wv-kind svg {
  width: 16px;
  height: 16px;
}

.wv-kind input:checked + span {
  background: var(--bb-blue-50);
  border-color: var(--bb-blue-500);
  color: var(--bb-blue-700);
  font-weight: 600;
}

.wv-kind input:focus-visible + span,
.wv-pill input:focus-visible + span,
.wv-ring-option input:focus-visible + .wv-ring-card {
  outline: 3px solid var(--bb-blue-200);
  outline-offset: 2px;
}

.wv-field {
  position: relative;
}

.wv-field .wv-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.wv-body-input {
  min-height: 92px;
  border-radius: 0.9rem;
  padding: 0.8rem 1rem;
  font-family: var(--wv-serif);
  font-size: 1.08rem;
  line-height: 1.55;
  resize: vertical;
}

.wv-quote-input {
  border-radius: 0.9rem;
  font-family: var(--wv-serif);
  font-style: italic;
  font-size: 1.05rem;
}

.wv-count {
  position: absolute;
  right: 0.75rem;
  bottom: 0.4rem;
  font-size: 0.75rem;
  color: var(--wv-muted);
  pointer-events: none;
}

.wv-book {
  border: 1px dashed var(--bb-sage-300);
  border-radius: 0.9rem;
  padding: 0.6rem 0.9rem;
  background: var(--bb-sage-50);
}

.wv-book summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  min-height: 32px;
  cursor: pointer;
  font-weight: 600;
  color: var(--bb-sage-700);
  list-style: none;
}

.wv-book summary::-webkit-details-marker {
  display: none;
}

.wv-book summary svg {
  width: 17px;
  height: 17px;
}

.wv-book summary small {
  font-weight: 400;
  color: var(--wv-muted);
}

.wv-book[open] summary {
  margin-bottom: 0.6rem;
}

.wv-book-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 0.75rem;
}

.wv-book-grid .wv-label {
  display: block;
  margin-bottom: 0.3rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.85rem;
}

/* The three shores to choose from. */
.wv-rings {
  margin: 0;
  padding: 0;
  border: 0;
}

.wv-rings legend {
  float: none;
  margin-bottom: 0.45rem;
}

.wv-ring-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.wv-ring-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  height: 100%;
  min-height: 64px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--wv-line);
  border-radius: 0.9rem;
  background: var(--wv-card);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.wv-ring-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.wv-ring-icon svg {
  width: 20px;
  height: 20px;
}

.wv-ring-option-cove .wv-ring-icon { background: var(--bb-gold-100); color: var(--bb-gold-700); }
.wv-ring-option-harbour .wv-ring-icon { background: var(--bb-sage-100); color: var(--bb-sage-700); }
.wv-ring-option-open .wv-ring-icon { background: var(--bb-blue-50); color: var(--bb-blue-700); }

.wv-ring-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.wv-ring-text strong {
  font-size: 0.95rem;
}

.wv-ring-text small {
  color: var(--wv-muted);
  font-size: 0.78rem;
}

.wv-ring-option-cove input:checked + .wv-ring-card { border: 2px solid var(--bb-gold-600); background: #fffaf0; }
.wv-ring-option-harbour input:checked + .wv-ring-card { border: 2px solid var(--bb-sage-600); background: var(--bb-sage-50); }
.wv-ring-option-open input:checked + .wv-ring-card { border: 2px solid var(--bb-blue-600); background: var(--bb-blue-50); }

/* "See it as": who sees the wave with the chosen shore. */
.wv-seeas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  font-size: 0.85rem;
}

.wv-seeas-title {
  color: var(--wv-muted);
  margin-right: 0.15rem;
}

.wv-seeas-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--bb-sage-100);
  color: var(--wv-text);
}

.wv-seeas-chip svg {
  width: 15px;
  height: 15px;
  display: block;
}

.wv-seeas-chip.is-yes {
  background: #e3f6e8;
  color: #1f6b35;
}

.wv-seeas-chip.is-no {
  background: var(--bb-sage-100);
  color: var(--wv-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(95, 103, 88, 0.5);
}

.wv-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

.wv-choice {
  margin: 0;
  padding: 0;
  border: 0;
}

.wv-choice legend {
  float: none;
  margin-bottom: 0.4rem;
}

.wv-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.wv-pill span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.9rem;
  border: 1px solid var(--wv-line);
  border-radius: 999px;
  background: var(--wv-card);
  color: var(--wv-text);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
}

.wv-pill input:checked + span {
  background: var(--bb-blue-700);
  border-color: var(--bb-blue-700);
  color: #fff;
}

.wv-pill.is-disabled span {
  opacity: 0.4;
  cursor: not-allowed;
}

.wv-composer-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--bb-sage-100);
}

.wv-send {
  min-height: 44px;
  padding: 0 1.5rem;
  border-radius: 999px;
  font-weight: 600;
}

.wv-invite {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--wv-card);
  border: 1px solid var(--wv-line);
  border-radius: 1.1rem;
}

.wv-invite p {
  margin: 0.25rem 0 0;
  color: var(--wv-text);
  font-size: 0.93rem;
}

.wv-invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---------- The editor (composer) ---------- */

.wv-editor {
  border: 1px solid var(--wv-line);
  border-radius: 0.95rem;
  background: var(--wv-card);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.wv-editor:focus-within {
  border-color: var(--bb-blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.wv-editor.is-invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.wv-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
  padding: 0.3rem 0.4rem;
  border-bottom: 1px solid var(--bb-sage-100);
}

.wv-tool {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: var(--wv-text);
  cursor: pointer;
}

.wv-tool svg {
  width: 17px;
  height: 17px;
}

.wv-tool:hover {
  background: var(--bb-sage-100);
  color: var(--wv-ink);
}

.wv-tool.is-on {
  background: var(--bb-blue-50);
  color: var(--bb-blue-700);
}

.wv-tool-sep {
  width: 1px;
  height: 20px;
  margin: 0 0.25rem;
  background: var(--wv-line);
}

.wv-tool-hint {
  margin-left: auto;
  padding-right: 0.3rem;
  font-size: 0.75rem;
  color: var(--wv-muted);
}

.wv-editor-area {
  min-height: 96px;
  max-height: 340px;
  overflow-y: auto;
  padding: 0.75rem 0.95rem 1.4rem;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--wv-ink);
  outline: none;
  overflow-wrap: anywhere;
}

.wv-editor-area.is-empty::before {
  content: attr(data-placeholder);
  color: var(--wv-muted);
  pointer-events: none;
}

.wv-editor-area a {
  color: var(--bb-blue-700);
  text-decoration: underline;
}

.wv-linkbox {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem 0.6rem;
  border-top: 1px dashed var(--bb-sage-200);
}

.wv-linkbox input {
  flex: 1 1 200px;
  border-radius: 0.6rem;
}

.wv-count.is-over {
  color: #dc2626;
  font-weight: 700;
}

/* ---------- A wave ---------- */

.wv-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.15rem 1.25rem 0.75rem;
  background: var(--wv-card);
  border: 1px solid rgba(208, 219, 192, 0.7);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 8px 24px rgba(30, 58, 138, 0.05);
  scroll-margin-top: 1rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.wv-card:hover {
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.05), 0 14px 34px rgba(30, 58, 138, 0.09);
}

.wv-card-new::before {
  content: "";
  position: absolute;
  top: 1.35rem;
  left: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bb-blue-600);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.wv-card-muted {
  background: var(--bb-sage-50);
  box-shadow: none;
}

.wv-card-muted > :not(.wv-flag):not(.wv-card-foot):not(.wv-card-head) {
  opacity: 0.7;
}

.wv-flag {
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 0.7rem;
  background: #fff4e5;
  color: #8a4b08;
  font-size: 0.85rem;
  font-weight: 500;
}

.wv-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* The avatar wears its audience's colour as a ring. */
.wv-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e3a8a;
}

.wv-card .wv-avatar {
  box-shadow: 0 0 0 2px var(--wv-card), 0 0 0 4px var(--wv-avatar-ring, #bfdbfe);
}

.wv-avatar-cove { background: linear-gradient(135deg, #fdf3d7, #f8e3a3); color: #6b5414; --wv-avatar-ring: #e3c15c; }
.wv-avatar-harbour { background: linear-gradient(135deg, #eef2e6, #d0dbc0); color: #3f4e30; --wv-avatar-ring: #b3c497; }
.wv-avatar-open { background: linear-gradient(135deg, #e0ecff, #bfdbfe); color: #1e3a8a; --wv-avatar-ring: #93c5fd; }

.wv-avatar-sm {
  width: 34px;
  height: 34px;
  font-size: 0.78rem;
}

.wv-card-who {
  flex-grow: 1;
  min-width: 0;
}

.wv-card-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.98rem;
  line-height: 1.25;
}

.wv-card-name a,
.wv-card-name strong {
  font-weight: 700;
  color: var(--wv-ink);
  text-decoration: none;
}

.wv-card-name a:hover {
  text-decoration: underline;
}

.wv-you,
.wv-new {
  padding: 0.08rem 0.5rem;
  border-radius: 999px;
  background: var(--bb-sage-100);
  color: var(--bb-sage-700);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wv-buddy {
  background: var(--bb-gold-100);
  color: #6b5414;
}

.wv-new {
  background: var(--bb-blue-600);
  color: #fff;
}

.wv-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.45rem;
  margin-top: 0.2rem;
  color: var(--wv-muted);
  font-size: 0.8rem;
}

.wv-card-meta a {
  color: var(--wv-muted);
  text-decoration: none;
}

.wv-card-meta a:hover {
  color: var(--wv-ink);
  text-decoration: underline;
}

.wv-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

.wv-ring-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
}

.wv-ring-inline svg {
  width: 13px;
  height: 13px;
}

.wv-ring-inline-cove { color: #7d6318; }
.wv-ring-inline-harbour { color: var(--bb-sage-700); }
.wv-ring-inline-open { color: var(--bb-blue-700); }

/* The audience badges in the side box. */
.wv-ring {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.wv-ring svg {
  width: 14px;
  height: 14px;
}

.wv-ring-cove { background: var(--bb-gold-100); color: #6b5414; }
.wv-ring-harbour { background: var(--bb-sage-100); color: var(--bb-sage-700); }
.wv-ring-open { background: var(--bb-blue-50); color: var(--bb-blue-700); }

.wv-kind-tag {
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}

.wv-kind-tag-quote { background: #eef0ff; color: #3730a3; }
.wv-kind-tag-reading { background: #e8f5ee; color: #166534; }
.wv-kind-tag-question { background: #e0f2fe; color: #075985; }

.wv-book-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.3rem 0.75rem 0.3rem 0.55rem;
  border-radius: 6px;
  background: var(--bb-sage-50);
  border: 1px solid var(--bb-sage-200);
  color: var(--bb-sage-700);
  font-size: 0.82rem;
  text-decoration: none;
}

.wv-book-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wv-book-chip svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.wv-book-chip:hover {
  background: var(--bb-sage-100);
  color: var(--wv-ink);
}

.wv-text {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--wv-ink);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.wv-text strong {
  font-weight: 700;
}

.wv-text-large {
  font-size: 1.22rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.wv-text-question {
  padding: 0.9rem 1.05rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #eff6ff, #e0f2fe);
  font-weight: 500;
}

.wv-link {
  color: var(--bb-blue-700);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(29, 78, 216, 0.35);
  text-underline-offset: 2px;
}

.wv-link:hover {
  text-decoration-color: currentColor;
}

/* The first link in a wave, as a card. */
.wv-linkcard {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--wv-line);
  border-radius: 8px;
  background: var(--bb-sage-50);
  color: var(--wv-ink);
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s;
}

.wv-linkcard:hover {
  background: var(--bb-blue-50);
  border-color: var(--bb-blue-200);
  color: var(--wv-ink);
}

.wv-linkcard-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 0.7rem;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--wv-line);
  color: var(--bb-blue-700);
}

.wv-linkcard-icon svg {
  width: 18px;
  height: 18px;
}

.wv-linkcard-text {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
  line-height: 1.3;
}

.wv-linkcard-text strong {
  font-size: 0.9rem;
}

.wv-linkcard-text small {
  color: var(--wv-muted);
  font-size: 0.76rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wv-linkcard-go {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--wv-muted);
}

/* A quote, set like a page from the book. */
.wv-quote {
  position: relative;
  margin: 0;
  padding: 1.6rem 1.7rem 1.4rem 1.7rem;
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0, rgba(212, 175, 55, 0.22), transparent 45%),
    linear-gradient(135deg, #1e3a8a, #172554);
  color: #f8edc8;
  overflow: hidden;
}

.wv-quote::before {
  content: "\201C";
  position: absolute;
  top: -1.4rem;
  right: 1rem;
  font-family: var(--wv-serif);
  font-size: 7rem;
  line-height: 1;
  color: rgba(227, 193, 92, 0.18);
}

.wv-quote blockquote {
  position: relative;
  margin: 0;
  font-family: var(--wv-serif);
  font-style: italic;
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.45rem);
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.wv-quote figcaption {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: #e3c15c;
}

/* A reading update. */
.wv-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem;
  border-radius: 8px;
  background: var(--bb-sage-50);
}

.wv-progress-cover {
  width: 56px;
  height: 80px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 3px 4px 10px rgba(0, 0, 0, 0.18);
}

.wv-progress-spine {
  display: flex;
  align-items: flex-end;
  padding: 6px;
  box-sizing: border-box;
  overflow: hidden;
  background: linear-gradient(160deg, var(--bb-sage-600), var(--bb-sage-700));
  color: #f4f6f0;
  font-family: var(--wv-serif);
  font-size: 0.62rem;
  line-height: 1.15;
}

.wv-progress-info {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.wv-progress-title a,
.wv-progress-title strong {
  font-weight: 700;
  color: var(--wv-ink);
}

.wv-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--bb-sage-200);
  overflow: hidden;
}

.wv-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8ba06e, #16a34a);
}

/* The spoiler veil: closed, a covered page and a message; open, the wave. */
.wv-veil {
  border-radius: 8px;
  background: var(--bb-sage-50);
  border: 1px solid var(--bb-sage-200);
}

.wv-veil summary {
  position: relative;
  display: block;
  padding: 1.1rem;
  cursor: pointer;
  list-style: none;
}

.wv-veil summary::-webkit-details-marker {
  display: none;
}

.wv-veil-lines {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  filter: blur(3px);
  opacity: 0.55;
}

.wv-veil-lines i {
  display: block;
  height: 0.75rem;
  border-radius: 999px;
  background: var(--bb-sage-300);
}

.wv-veil-lines i:nth-child(2) { width: 88%; }
.wv-veil-lines i:nth-child(3) { width: 62%; }

.wv-veil-msg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--wv-text);
  background: rgba(244, 246, 240, 0.7);
  border-radius: 1rem;
}

.wv-veil-msg svg {
  width: 20px;
  height: 20px;
}

.wv-veil-msg strong {
  color: var(--wv-ink);
}

.wv-veil-btn {
  margin-top: 0.35rem;
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--wv-line);
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--bb-blue-700);
}

.wv-veil[open] summary {
  display: none;
}

.wv-veil-body {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1rem;
}

.wv-veil[open] {
  background: transparent;
  border-style: dashed;
}

/* The writer's own numbers. */
.wv-quiet {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.45rem 0.7rem;
  border-radius: 0.7rem;
  background: #fdf8e8;
  font-size: 0.84rem;
  color: var(--bb-gold-700);
}

.wv-quiet svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.wv-quiet-note {
  margin-left: 0.3rem;
  color: var(--wv-muted);
  font-size: 0.76rem;
}

/* Reactions: soft pills that fill with their colour when chosen. */
.wv-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin: 0 -0.35rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--bb-sage-100);
}

.wv-react-form {
  display: contents;
}

.wv-act {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0 0.8rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--wv-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, transform 0.1s;
}

.wv-act svg {
  width: 18px;
  height: 18px;
}

.wv-act:hover {
  background: var(--bb-sage-100);
  color: var(--wv-ink);
}

.wv-act:active {
  transform: scale(0.96);
}

.wv-act-like:hover,
.wv-act-like.is-on { color: #e11d48; }
.wv-act-like.is-on { background: #ffe4e6; }

.wv-act-save:hover,
.wv-act-save.is-on { color: #b45309; }
.wv-act-save.is-on { background: #fef3c7; }

.wv-act-reading:hover,
.wv-act-reading.is-on { color: #15803d; }
.wv-act-reading.is-on { background: #dcfce7; }

.wv-act-reply:hover { color: var(--bb-blue-700); }
.wv-act-share:hover { color: #0e7490; }

/* ---------- Share dialog (_WaveShareDialog) ---------- */

.wv-share {
  --wv-ink: var(--bb-sage-900);
  --wv-muted: #5f6758;
  --wv-line: var(--bb-sage-200);
  width: min(440px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 1px solid var(--wv-line);
  border-radius: 12px;
  background: #fff;
  color: var(--wv-ink);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.wv-share::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.wv-share-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.15rem 1.15rem;
}

.wv-share-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wv-share-head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.wv-share-head form {
  margin: 0;
}

.wv-share-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--wv-muted);
  cursor: pointer;
}

.wv-share-close:hover {
  background: var(--bb-sage-100);
  color: var(--wv-ink);
}

.wv-share-close svg {
  width: 18px;
  height: 18px;
}

.wv-share-part {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wv-share-part[hidden],
.wv-share-why[hidden] {
  display: none;
}

.wv-share-part + .wv-share-part {
  padding-top: 1rem;
  border-top: 1px solid var(--bb-sage-100);
}

.wv-share-part h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
}

.wv-share-part .wv-muted,
.wv-share-why {
  margin: 0;
  font-size: 0.82rem;
}

.wv-share-buddies {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 232px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.wv-share-buddies li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
}

.wv-share-buddies li:hover {
  background: var(--bb-sage-50);
}

.wv-share-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e3a8a;
  font-size: 0.78rem;
  font-weight: 800;
}

.wv-share-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 600;
}

.wv-share-send {
  flex-shrink: 0;
  min-width: 74px;
  padding: 0.3rem 0.85rem;
  border: 0;
  border-radius: 999px;
  background: #0e7490;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.wv-share-send:hover {
  background: #155e75;
}

.wv-share-send.is-sent,
.wv-share-send.is-sent:disabled {
  background: #dcfce7;
  color: #15803d;
  cursor: default;
}

.wv-share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.wv-act-like.is-on svg,
.wv-act-save.is-on svg {
  fill: currentColor;
}

.wv-foot-note {
  margin-left: auto;
  padding-right: 0.35rem;
  color: var(--wv-muted);
  font-size: 0.76rem;
}

/* The "more" menu at the top right of the writer's own waves. */
.wv-menu {
  position: relative;
  flex-shrink: 0;
}

.wv-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--wv-muted);
  cursor: pointer;
  list-style: none;
}

.wv-menu-btn::-webkit-details-marker {
  display: none;
}

.wv-menu-btn svg {
  width: 18px;
  height: 18px;
}

.wv-menu-btn:hover,
.wv-menu[open] .wv-menu-btn {
  background: var(--bb-sage-100);
  color: var(--wv-ink);
}

.wv-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 15;
  display: flex;
  flex-direction: column;
  min-width: 240px;
  padding: 0.35rem;
  background: var(--wv-card);
  border: 1px solid var(--wv-line);
  border-radius: 0.9rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
}

.wv-menu-list a,
.wv-menu-list button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 42px;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 0.6rem;
  background: none;
  color: var(--wv-ink);
  font-size: 0.9rem;
  text-align: left;
  text-decoration: none;
}

.wv-menu-list svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--wv-muted);
}

.wv-menu-list a:hover,
.wv-menu-list button:hover {
  background: var(--bb-sage-100);
}

.wv-menu-list .wv-danger,
.wv-menu-list .wv-danger svg {
  color: #b42318;
}

/* ---------- Banner waves: colours behind short words ---------- */

/* Fixed colours (not the palette), so a banner looks the same by day and night;
   each is dark enough for white words. */
.wv-bg-ocean { background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 55%, #0e7490 100%); }
.wv-bg-sunset { background: linear-gradient(135deg, #c2410c 0%, #db2777 100%); }
.wv-bg-forest { background: linear-gradient(135deg, #14532d 0%, #3f6212 100%); }
.wv-bg-berry { background: linear-gradient(135deg, #6b21a8 0%, #be185d 100%); }
.wv-bg-gold { background: linear-gradient(135deg, #92400e 0%, #a16207 60%, #b45309 100%); }
.wv-bg-night { background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.12), transparent 30%), linear-gradient(135deg, #0f172a 0%, #312e81 100%); }
.wv-bg-coral { background: linear-gradient(135deg, #be123c 0%, #ea580c 100%); }
.wv-bg-lagoon { background: linear-gradient(135deg, #115e59 0%, #1d4ed8 100%); }

.wv-banner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 210px;
  padding: 2rem 1.75rem;
  border-radius: 8px;
  color: #ffffff;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

/* A soft wave across the foot of every banner. */
.wv-banner::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 36px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 36' preserveAspectRatio='none'%3E%3Cpath d='M0 20 Q15 9 30 20 T60 20 T90 20 T120 20 V36 H0Z' fill='%23ffffff' fill-opacity='.1'/%3E%3C/svg%3E") repeat-x;
  background-size: 200px 36px;
  z-index: -1;
}

.wv-banner p {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(1.3rem, 1.05rem + 1.1vw, 1.75rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  white-space: pre-line;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.wv-banner-long p {
  max-width: 44ch;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
}

.wv-banner a,
.wv-banner .wv-link {
  color: #ffffff;
  text-decoration-color: rgba(255, 255, 255, 0.7);
}

.wv-banner-tag {
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* The editor while a colour is chosen: what the banner will look like. */
.wv-editor-area.wv-banner-preview,
.wv-body-input.wv-banner-preview {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 190px;
  padding: 1.5rem;
  color: #ffffff;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  border-radius: 0 0 0.9rem 0.9rem;
}

.wv-editor-area.wv-banner-preview a {
  color: #ffffff;
}

.wv-editor-area.wv-banner-preview.is-empty::before {
  color: rgba(255, 255, 255, 0.75);
}

.wv-bgpick {
  margin: 0;
  padding: 0;
  border: 0;
}

.wv-bgpick legend {
  float: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.6rem;
  margin-bottom: 0.45rem;
}

.wv-bgpick-note {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: 0.78rem;
}

.wv-bgpick-note.is-over {
  color: #b45309;
  font-weight: 600;
}

.wv-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.wv-swatch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wv-swatch > span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  transition: transform 0.12s, box-shadow 0.12s;
}

.wv-swatch:hover > span {
  transform: scale(1.08);
}

.wv-swatch-none > span {
  background: var(--wv-card);
  border: 1px solid var(--wv-line);
  color: var(--wv-muted);
}

.wv-swatch-none svg {
  width: 20px;
  height: 20px;
}

.wv-swatch input:checked + span {
  box-shadow: 0 0 0 2px var(--wv-card), 0 0 0 4px var(--bb-blue-600);
}

.wv-swatch input:focus-visible + span {
  outline: 3px solid var(--bb-blue-200);
  outline-offset: 3px;
}

/* ---------- Pin from BooksShore (composer) ---------- */

.wv-pin-open {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  border: 1px dashed var(--bb-blue-200);
  border-radius: 0.9rem;
  background: var(--bb-blue-50);
  color: var(--bb-blue-700);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.wv-pin-open svg {
  width: 17px;
  height: 17px;
}

/* Recommend a Find from the composer (ShoreFinds/New, back here with it pinned). */
.wv-new-find {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.9rem;
  border: 1px dashed #fdba74;
  border-radius: 0.9rem;
  background: #fff7ed;
  color: #9a3412;
  text-decoration: none;
}

.wv-new-find:hover,
.wv-new-find:focus-visible {
  border-style: solid;
  color: #7c2d12;
}

.wv-new-find small {
  color: #c2410c;
  font-weight: 500;
}

.wv-pin-open small {
  font-weight: 400;
  color: var(--wv-muted);
}

.wv-pin-open:hover {
  border-style: solid;
}

.wv-pin-chosen {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.55rem 0.55rem 0.75rem;
  border: 1px solid var(--bb-blue-200);
  border-radius: 0.9rem;
  background: var(--bb-blue-50);
}

.wv-pin-chosen-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 0.6rem;
  flex-shrink: 0;
  background: var(--bb-blue-600);
  color: #fff;
}

.wv-pin-chosen-icon svg {
  width: 17px;
  height: 17px;
}

.wv-pin-chosen-text {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
  line-height: 1.3;
}

.wv-pin-chosen-text small {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bb-blue-700);
}

.wv-pin-chosen-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wv-pin-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--wv-muted);
  cursor: pointer;
}

.wv-pin-remove:hover {
  background: #fff;
  color: #b42318;
}

.wv-pin-remove svg {
  width: 17px;
  height: 17px;
}

.wv-pin-panel {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.5rem;
  padding: 0.75rem;
  border: 1px solid var(--wv-line);
  border-radius: 1rem;
  background: var(--bb-sage-50);
}

/* The tabs wrap onto a second line rather than hide off the edge. */
.wv-pin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.wv-pin-tab {
  min-height: 34px;
  padding: 0 0.85rem;
  border: 1px solid var(--wv-line);
  border-radius: 999px;
  background: var(--wv-card);
  color: var(--wv-text);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.wv-pin-tab.is-active {
  background: var(--bb-blue-700);
  border-color: var(--bb-blue-700);
  color: #fff;
}

.wv-pin-panel input[type="search"] {
  border-radius: 0.7rem;
}

.wv-pin-results {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-height: 300px;
  overflow-y: auto;
  font-size: 0.88rem;
  color: var(--wv-muted);
}

.wv-pin-result {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  background: var(--wv-card);
  color: var(--wv-ink);
  text-align: left;
  cursor: pointer;
}

.wv-pin-result:hover,
.wv-pin-result:focus-visible {
  border-color: var(--bb-blue-200);
  background: var(--bb-blue-50);
}

.wv-pin-result-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 52px;
  border-radius: 5px;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--bb-sage-100);
  color: var(--bb-sage-700);
  font-weight: 800;
}

.wv-pin-result-3,
.wv-pin-result-4 {
  height: 38px;
  border-radius: 50%;
  background: var(--bb-gold-100);
  color: #6b5414;
}

.wv-pin-result-2 {
  background: #ecfdf5;
  color: #047857;
}

.wv-pin-result-8 {
  border-radius: 50%;
  background: #ffedd5;
}

.wv-pin-result-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.wv-pin-result-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wv-pin-result-text small {
  color: var(--wv-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wv-pin-empty {
  margin: 0.4rem 0.2rem;
}

.wv-pin-panel-foot {
  display: flex;
  justify-content: flex-end;
}

/* ---------- Pinned on a wave ---------- */

/* Shown to the writer (and staff) when what they pinned has gone off BooksShore. */
.wv-pin-gone {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin: 0.6rem 0 0;
  padding: 0.6rem 0.8rem;
  border: 1px dashed #fcd34d;
  border-radius: 0.8rem;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.88rem;
}

.wv-pinned {
  display: flex;
  align-items: stretch;
  gap: 0.9rem;
  padding: 0.75rem;
  border: 1px solid var(--wv-line);
  border-radius: 1rem;
  background: var(--wv-card);
  color: var(--wv-ink);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.wv-pinned:hover {
  border-color: var(--bb-blue-200);
  box-shadow: 0 8px 22px rgba(30, 58, 138, 0.08);
  color: var(--wv-ink);
}

.wv-pinned-img {
  width: 76px;
  height: 104px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 3px 4px 10px rgba(0, 0, 0, 0.16);
}

.wv-pinned-blog .wv-pinned-img {
  width: 132px;
  height: 92px;
  border-radius: 10px;
  box-shadow: none;
}

.wv-pinned-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  min-height: 64px;
  border-radius: 0.85rem;
  flex-shrink: 0;
  background: var(--bb-sage-100);
  color: var(--bb-sage-700);
}

.wv-pinned-spiritual .wv-pinned-icon {
  background: linear-gradient(160deg, #064e3b, #065f46);
  color: #fde68a;
}

.wv-pinned-icon svg {
  width: 26px;
  height: 26px;
}

/* A pinned Shore Find: its type's emoji on its kind's colours (as in finds.css). */
.wv-pinned-find {
  --wv-find-a: #0f766e;
  --wv-find-b: #2563eb;
  border-left: 4px solid var(--wv-find-a);
}

.wv-pinned-find-dish {
  --wv-find-a: #ea580c;
  --wv-find-b: #f59e0b;
}

.wv-pinned-find-product {
  --wv-find-a: #7c3aed;
  --wv-find-b: #db2777;
}

.wv-pinned-find-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border: 3px solid #fff;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--wv-find-a), var(--wv-find-b));
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
  font-size: 1.8rem;
}

.wv-pinned-find-img {
  width: 96px;
  height: 72px;
  border-radius: 0.75rem;
  flex-shrink: 0;
  object-fit: cover;
}

.wv-pinned-find .wv-pinned-label {
  color: var(--wv-find-a);
}

.wv-pinned-find-note {
  color: #475569;
  font-size: 0.88rem;
  font-style: italic;
}

.wv-pinned-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  min-width: 0;
}

.wv-pinned-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bb-blue-700);
}

.wv-pinned-title {
  font-size: 1rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wv-pinned-sub {
  color: var(--wv-muted);
  font-size: 0.85rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wv-pinned-go {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.15rem;
  color: var(--bb-blue-700);
  font-size: 0.82rem;
  font-weight: 700;
}

.wv-pinned-go svg {
  width: 15px;
  height: 15px;
}

/* A Reading DNA result, in its own colours (the same as booktwin.css). */
.wv-pinned-dna[data-dna="midnight"] { --dna-a: #1e1b4b; --dna-b: #4c1d95; --dna-accent: #fbbf24; }
.wv-pinned-dna[data-dna="dreamer"] { --dna-a: #312e81; --dna-b: #db2777; --dna-accent: #fde68a; }
.wv-pinned-dna[data-dna="romantic"] { --dna-a: #9f1239; --dna-b: #f97316; --dna-accent: #fef3c7; }
.wv-pinned-dna[data-dna="sage"] { --dna-a: #2c3623; --dna-b: #718a56; --dna-accent: #e3c15c; }
.wv-pinned-dna[data-dna="achiever"] { --dna-a: #1e3a8a; --dna-b: #0891b2; --dna-accent: #fde047; }
.wv-pinned-dna[data-dna="soul"] { --dna-a: #134e4a; --dna-b: #7c3aed; --dna-accent: #ccfbf1; }
.wv-pinned-dna[data-dna="explorer"] { --dna-a: #7c2d12; --dna-b: #ca8a04; --dna-accent: #fef9c3; }
.wv-pinned-dna[data-dna="classic"] { --dna-a: #3f2a14; --dna-b: #a16207; --dna-accent: #fde68a; }

.wv-pinned-dna {
  align-items: center;
  border: 0;
  background: linear-gradient(135deg, var(--dna-a, #2c3623), var(--dna-b, #718a56));
  color: #fff;
}

.wv-pinned-dna:hover {
  color: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.22);
}

.wv-pinned-dna-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-size: 2rem;
}

.wv-pinned-dna .wv-pinned-label,
.wv-pinned-dna .wv-pinned-go {
  color: var(--dna-accent, #e3c15c);
}

.wv-pinned-dna .wv-pinned-sub {
  color: rgba(255, 255, 255, 0.85);
}

/* A greeting card: its picture large, the words underneath. */
.wv-pinned-card {
  flex-direction: column;
}

.wv-pinned-cardimg {
  display: block;
  width: 100%;
  max-height: 420px;
  border-radius: 6px;
  object-fit: contain;
  background: var(--bb-sage-50);
}

/* A poem or quote, in full, like a page. */
.wv-pinned-poem,
.wv-pinned-quote {
  padding: 0;
  overflow: hidden;
}

.wv-pinned-verse {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  padding: 1.2rem 1.35rem;
  background:
    radial-gradient(circle at 100% 0, rgba(212, 175, 55, 0.18), transparent 50%),
    #fffbeb;
}

.wv-pinned-quote .wv-pinned-verse {
  background:
    radial-gradient(circle at 0 100%, rgba(59, 130, 246, 0.12), transparent 50%),
    #f5f8ff;
}

.wv-pinned-words {
  font-family: var(--wv-serif);
  font-size: 1.08rem;
  font-style: italic;
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.wv-pinned-by {
  color: var(--wv-muted);
  font-size: 0.85rem;
}

html.wv-menu-compact .wv-page,
html.wv-menu-hidden .wv-page {
  margin-top: 0.75rem;
}

/* The switch in the banner. */
.wv-viewswitch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.wv-viewswitch button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.wv-viewswitch button svg {
  width: 16px;
  height: 16px;
}

.wv-viewswitch button:hover {
  color: #fff;
}

.wv-viewswitch button[aria-pressed="true"] {
  background: #fff;
  color: #1e3a8a;
}

/* ---------- Live refresh ---------- */

.wv-newpill {
  position: sticky;
  top: 0.75rem;
  z-index: 25;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 999px;
  background: #1e3a8a;
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 10px 24px rgba(30, 58, 138, 0.3);
  cursor: pointer;
  animation: wv-pill-in 0.25s ease-out;
}

.wv-newpill[hidden] {
  display: none;
}

html.wv-menu-compact .wv-newpill {
  top: 4rem;
}

/* The left rail stops below the compact menu instead of sliding under it. */
html.wv-menu-compact .wv-rail-wrap {
  top: 4rem;
}

.wv-newpill svg {
  width: 16px;
  height: 16px;
}

@keyframes wv-pill-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

.wv-arrive {
  animation: wv-arrive 0.5s ease-out;
}

@keyframes wv-arrive {
  from { opacity: 0; transform: translateY(-10px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

/* ---------- Tags ---------- */

.wv-tags {
  position: relative;
}

.wv-tags .wv-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.6rem;
  margin-bottom: 0.4rem;
}

.wv-tags-note {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: 0.78rem;
}

.wv-tags-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-height: 46px;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--wv-line);
  border-radius: 0.9rem;
  background: var(--wv-card);
  cursor: text;
}

.wv-tags-box:focus-within {
  border-color: var(--bb-blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.wv-tags-input {
  flex: 1 1 140px;
  min-width: 120px;
  min-height: 34px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--wv-ink);
  font-size: 0.95rem;
}

.wv-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.2rem 0.15rem 0.2rem;
  border-radius: 999px;
  background: var(--bb-gold-100);
  color: #4a3a0e;
  font-size: 0.86rem;
  font-weight: 600;
}

.wv-tag-chip button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.wv-tag-chip button:hover {
  background: rgba(0, 0, 0, 0.08);
}

.wv-tag-ini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #fdf3d7, #f8e3a3);
  color: #6b5414;
  font-size: 0.66rem;
  font-weight: 800;
}

.wv-tag-chip .wv-tag-ini {
  background: #fff;
}

.wv-tag-results {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 20;
  display: flex;
  flex-direction: column;
  margin-top: 0.3rem;
  padding: 0.3rem;
  background: var(--wv-card);
  border: 1px solid var(--wv-line);
  border-radius: 0.9rem;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12);
}

.wv-tag-results[hidden] {
  display: none;
}

.wv-tag-option,
.wv-find-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 42px;
  padding: 0.35rem 0.55rem;
  border: 0;
  border-radius: 0.6rem;
  background: none;
  color: var(--wv-ink);
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
}

.wv-tag-option:hover,
.wv-tag-option:focus-visible,
.wv-find-item:hover,
.wv-find-item:focus-visible {
  background: var(--bb-sage-100);
  color: var(--wv-ink);
}

.wv-tag-none {
  margin: 0.4rem 0.5rem;
  color: var(--wv-muted);
  font-size: 0.88rem;
}

/* "with Ayesha and Zara" on a wave. */
.wv-tagged {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: -0.3rem 0 0;
  color: var(--wv-muted);
  font-size: 0.86rem;
}

.wv-tagged svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.wv-tagged a {
  color: var(--wv-ink);
  font-weight: 600;
  text-decoration: none;
}

.wv-tagged a:hover {
  text-decoration: underline;
}

.wv-tagged a.is-me {
  padding: 0 0.35rem;
  border-radius: 0.4rem;
  background: var(--bb-gold-100);
}

.wv-shore-link {
  display: inline-flex;
  color: var(--wv-muted);
}

.wv-shore-link svg {
  width: 15px;
  height: 15px;
}

.wv-shore-link:hover {
  color: var(--bb-blue-700);
}

/* ---------- The menu's extras: "Tagged you" count, finding a buddy ---------- */

.wv-tone-tagged { background: #fdf3d7; color: #92400e; }
.wv-tone-find { background: #e0f2fe; color: #075985; }

button.wv-rail-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.wv-rail-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
}

.wv-layout--icons .wv-rail-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 18px;
  height: 18px;
  font-size: 0.64rem;
  line-height: 18px;
}

/* ---------- The end of the feed, and empty pages ---------- */

.wv-more {
  text-align: center;
}

.wv-end {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1.75rem 0 0.5rem;
  text-align: center;
}

.wv-end strong {
  font-family: var(--wv-serif);
  font-weight: 600;
  font-size: 1.1rem;
}

.wv-end-line {
  width: 64px;
  height: 10px;
  margin-bottom: 0.4rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 10'%3E%3Cpath d='M0 5 Q8 0 16 5 T32 5 T48 5 T64 5' fill='none' stroke='%23718a56' stroke-width='2'/%3E%3C/svg%3E") no-repeat center;
}

.wv-empty {
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--wv-card);
  border: 1px dashed var(--bb-sage-300);
  border-radius: 1.1rem;
}

.wv-empty-icon {
  font-size: 2.4rem;
}

.wv-empty h2 {
  margin: 0.5rem 0 0.3rem;
  font-family: var(--wv-serif);
  font-size: 1.35rem;
}

.wv-empty p {
  color: var(--wv-text);
}

/* ---------- Side boxes ---------- */

.wv-box {
  padding: 1.1rem 1.15rem;
  background: var(--wv-card);
  border: 1px solid var(--wv-line);
  border-radius: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--wv-text);
}

.wv-box p {
  margin: 0 0 0.6rem;
}

.wv-box-title {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wv-muted);
}

.wv-box-gold {
  background: var(--bb-gold-100);
  border-color: var(--bb-gold-400);
  color: #4a3a0e;
}

.wv-box-gold .wv-box-title {
  color: #6b5414;
}

.wv-box-list {
  margin: 0.3rem 0 0.6rem;
  padding: 0;
  list-style: none;
}

.wv-box-list li {
  padding: 0.25rem 0;
}

.wv-box-list a {
  font-style: italic;
}

.wv-box-link {
  font-weight: 600;
}

.wv-shores {
  margin: 0 0 0.6rem;
  padding: 0;
  list-style: none;
}

.wv-shores li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
}

/* ---------- Replies ---------- */

.wv-replies {
  margin-top: 1.25rem;
  padding: 1.2rem 1.3rem;
  background: var(--wv-card);
  border: 1px solid var(--wv-line);
  border-radius: 8px;
  scroll-margin-top: 1rem;
}

.wv-replies-title {
  margin: 0 0 0.8rem;
  font-family: var(--wv-serif);
  font-size: 1.2rem;
  font-weight: 600;
}

.wv-reply {
  display: flex;
  gap: 0.7rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--bb-sage-100);
  scroll-margin-top: 1rem;
}

.wv-reply:first-of-type {
  border-top: 0;
}

.wv-reply-body {
  flex-grow: 1;
  min-width: 0;
}

.wv-reply-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
}

.wv-reply-body p {
  margin: 0.2rem 0 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.wv-reply-writer .wv-reply-body p {
  color: var(--wv-ink);
}

.wv-reply-del {
  margin-left: auto;
}

.wv-reply-del button {
  min-height: 32px;
  padding: 0 0.5rem;
  border: 0;
  background: none;
  color: var(--wv-muted);
  font-size: 0.8rem;
}

.wv-reply-del button:hover {
  color: #b42318;
  text-decoration: underline;
}

.wv-reply-form {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.wv-reply-form textarea {
  border-radius: 0.9rem;
  resize: vertical;
}

.wv-reply-form .btn {
  min-height: 44px;
  border-radius: 999px;
  padding: 0 1.2rem;
  flex-shrink: 0;
}

.wv-list-head {
  margin-bottom: 1.2rem;
}

/* My Waves and Saved Waves: the menu and the list, no side boxes. */
.wv-layout--two {
  grid-template-columns: 210px minmax(0, 1fr);
}

.wv-layout--two.wv-layout--icons {
  grid-template-columns: 62px minmax(0, 1fr);
}

.wv-layout--two .wv-feed {
  max-width: 760px;
}

/* ---------- The row above the waves: composer (or New wave) and search ---------- */

/* One row that never wraps: the composer bar and a round search button. The
   search box opens in the bar's place (is-searching); writing a wave, the form
   takes the whole row and the button steps aside. */
.wv-actionbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.wv-actionbar > .wv-compose {
  flex: 1 1 auto;
  min-width: 0;
}

.wv-actionbar.is-searching > .wv-compose,
.wv-actionbar:has(> .wv-compose[open]) > .wv-search-toggle {
  display: none;
}

.wv-search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border: 1px solid var(--wv-line);
  border-radius: 50%;
  background: var(--wv-card);
  color: var(--bb-blue-700);
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.05);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.wv-search-toggle:hover,
.wv-search-toggle:focus-visible {
  border-color: var(--bb-blue-200);
  background: var(--bb-blue-50);
  box-shadow: 0 6px 18px rgba(30, 58, 138, 0.1);
}

.wv-search-toggle[hidden],
.wv-search[hidden] {
  display: none;
}

.wv-search-toggle svg {
  width: 21px;
  height: 21px;
}

.wv-search {
  order: -1;
  flex-basis: 100%;
}

.wv-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 56px;
  padding: 0.4rem 0.45rem 0.4rem 0.95rem;
  gap: 0.4rem;
  background: var(--wv-card);
  border: 1px solid var(--wv-line);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.05);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.wv-search:focus-within,
.wv-search.has-q {
  border-color: var(--bb-blue-200);
  box-shadow: 0 0 0 3px var(--bb-blue-50);
}

.wv-search-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--wv-muted);
}

.wv-search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--wv-ink);
  font-size: 0.95rem;
  outline: none;
}

.wv-search-input::placeholder {
  color: var(--wv-muted);
}

/* The browser's own clear cross: ours is the link beside it. */
.wv-search-input::-webkit-search-cancel-button {
  display: none;
}

.wv-search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  color: var(--wv-muted);
}

.wv-search-clear:hover {
  background: var(--bb-sage-100);
  color: var(--wv-ink);
}

.wv-search-clear svg {
  width: 15px;
  height: 15px;
}

.wv-search-go {
  min-height: 40px;
  padding: 0 1rem;
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  background: #1e3a8a;
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.wv-search-go:hover {
  background: var(--bb-blue-700);
}

/* Buddies matching what's typed, or every buddy for "Find a buddy". */
.wv-search-pop {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  z-index: 24;
  display: flex;
  flex-direction: column;
  max-height: 340px;
  overflow-y: auto;
  padding: 0.4rem;
  background: var(--wv-card);
  border: 1px solid var(--wv-line);
  border-radius: 1rem;
  box-shadow: 0 16px 40px rgba(30, 58, 138, 0.18);
  animation: wv-unfold 0.15s ease-out;
}

.wv-search-pop[hidden] {
  display: none;
}

.wv-search-pop-head {
  padding: 0.3rem 0.55rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wv-muted);
}

.wv-actionbar-new {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 48px;
  padding: 0 1.15rem;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--bb-blue-600);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
}

.wv-actionbar-new:hover,
.wv-actionbar-new:focus-visible {
  background: var(--bb-blue-700);
  color: #fff;
}

.wv-actionbar-new svg {
  width: 16px;
  height: 16px;
}

.wv-list-head h1 {
  margin: 0 0 0.3rem;
  font-family: var(--wv-serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
}

/* ---------- Smaller screens ---------- */

/* Tablets: the menu becomes a row of chips above the feed (icons and words). */
@media (max-width: 1099.98px) {
  .wv-layout,
  .wv-layout--icons {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 1.25rem;
  }

  .wv-side-left {
    grid-column: 1 / -1;
  }

  .wv-layout--two,
  .wv-layout--two.wv-layout--icons {
    grid-template-columns: minmax(0, 1fr);
  }

  .wv-layout--two .wv-feed {
    max-width: none;
  }

  .wv-rail-wrap {
    position: static;
  }

  .wv-rail,
  .wv-layout--icons .wv-rail {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .wv-rail::-webkit-scrollbar {
    display: none;
  }

  .wv-rail-head,
  .wv-rail-group,
  .wv-rail-item[data-tip]::after {
    display: none;
  }

  .wv-rail-nav {
    flex-direction: row;
    gap: 0.35rem;
  }

  .wv-rail-item,
  .wv-layout--icons .wv-rail-item {
    min-height: 40px;
    padding: 0.2rem 0.85rem 0.2rem 0.25rem;
    border: 1px solid var(--wv-line);
    border-radius: 999px;
    justify-content: flex-start;
  }

  .wv-layout--icons .wv-rail-label {
    display: inline;
  }

  .wv-rail-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
  }

  .wv-rail-item.is-active {
    border-color: #1e3a8a;
  }

  .wv-rail-sep,
  .wv-layout--icons .wv-rail-sep {
    width: 1px;
    height: 26px;
    margin: 0 0.15rem;
    flex-shrink: 0;
  }
}

/* Phones: one column; the side boxes follow the feed. */
@media (max-width: 767.98px) {
  .wv-page {
    margin-top: 0;
  }

  .wv-hero {
    padding: 0.95rem 1rem 1.1rem;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .wv-hero-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .wv-hero-sub {
    display: none;
  }

  .wv-hero-text {
    flex: 1 1 0;
  }

  .wv-hero-side {
    margin-left: auto;
  }

  .wv-hero-stat {
    min-height: 30px;
    padding: 0 0.6rem;
  }

  .wv-hero-cta {
    min-height: 38px;
    padding: 0 0.9rem;
  }

  .wv-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .wv-composer,
  .wv-card,
  .wv-replies {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .wv-ring-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .wv-ring-card {
    min-height: 54px;
  }

  .wv-book-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .wv-act span {
    font-size: 0.82rem;
  }

  .wv-foot-note {
    flex-basis: 100%;
    order: 10;
    margin-left: 0;
  }

  .wv-quote {
    padding: 1.2rem 1.2rem 1rem;
  }

  .wv-composer-foot .wv-send {
    width: 100%;
  }

  .wv-reply-form {
    flex-direction: column;
    align-items: stretch;
  }

  /* The banner: the title on its own line, the menu switch and button below it. */
  .wv-hero-side {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .wv-viewswitch {
    order: -1;
  }

  .wv-banner {
    min-height: 170px;
    padding: 1.5rem 1.1rem;
  }

  .wv-pinned-img {
    width: 60px;
    height: 84px;
  }

  .wv-pinned-blog .wv-pinned-img {
    width: 92px;
    height: 72px;
  }

  .wv-compose-bar {
    gap: 0.4rem;
  }

  .wv-compose-prompt {
    font-size: 0.88rem;
  }

  .wv-compose-long {
    display: none;
  }

  .wv-compose-short {
    display: inline;
  }

  .wv-compose-kind {
    width: 32px;
    height: 32px;
  }

  .wv-compose-go {
    padding: 0 0.75rem;
  }

  .wv-actionbar {
    gap: 0.45rem;
  }

  .wv-search {
    min-height: 50px;
  }

  .wv-search-toggle {
    width: 50px;
    height: 50px;
  }

  .wv-search-go {
    padding: 0 0.8rem;
  }

  .wv-actionbar-new {
    min-height: 44px;
    padding: 0 0.9rem;
  }
}

/* Small phones: the kind icons give way, so the bar and the search button share the row. */
@media (max-width: 430px) {
  .wv-compose-kinds {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wv-arrive,
  .wv-newpill {
    animation: none;
  }

  .wv-ring-card,
  .wv-act {
    transition: none;
  }

  .wv-compose[open] .wv-composer,
  .wv-search-pop {
    animation: none;
  }
}
