/* My Reading Shore: a member's shore (Shore/Details), the shores to discover
   (Shore/Index) and the owner's editor (MyShore/Index). Each shore picks a theme
   (.shore-theme-*) for its sky, sea and accent, and a shelf style (.shelf-style-*). */

/* ---------- Themes ---------- */

.shore-theme-sunrise {
  --shore-sky-1: #fff1db;
  --shore-sky-2: #f9c3a8;
  --shore-sea: #4f93b8;
  --shore-sea-2: #2f6f94;
  --shore-accent: #d4683a;
  --shore-accent-soft: #fde4d6;
  --shore-ink: #3a2a20;
  --shore-ink-soft: #7a5e4c;
}

.shore-theme-lagoon {
  --shore-sky-1: #e3fbf7;
  --shore-sky-2: #9fe1da;
  --shore-sea: #1d9a9a;
  --shore-sea-2: #127373;
  --shore-accent: #0f7f7f;
  --shore-accent-soft: #d2f3ef;
  --shore-ink: #0f3434;
  --shore-ink-soft: #3f6b69;
}

.shore-theme-moonlit {
  --shore-sky-1: #2a3561;
  --shore-sky-2: #4b5a92;
  --shore-sea: #1b2347;
  --shore-sea-2: #121834;
  --shore-accent: #5b5bd6;
  --shore-accent-soft: #e6e6fb;
  --shore-ink: #f1f2fb;
  --shore-ink-soft: #c9cdea;
}

.shore-theme-pine {
  --shore-sky-1: #eaf4e3;
  --shore-sky-2: #b9d6ae;
  --shore-sea: #4c7d5a;
  --shore-sea-2: #335a40;
  --shore-accent: #3d7a4b;
  --shore-accent-soft: #e0efd9;
  --shore-ink: #1f3324;
  --shore-ink-soft: #4d6652;
}

.shore-theme-coral {
  --shore-sky-1: #fff0ec;
  --shore-sky-2: #ffb9ae;
  --shore-sea: #ef7f7a;
  --shore-sea-2: #c95a5f;
  --shore-accent: #d34b56;
  --shore-accent-soft: #ffe3df;
  --shore-ink: #3d1f22;
  --shore-ink-soft: #84555a;
}

.shore-theme-sandstone {
  --shore-sky-1: #fbf2e1;
  --shore-sky-2: #e8cfa5;
  --shore-sea: #b98a4e;
  --shore-sea-2: #8f6532;
  --shore-accent: #9a6a2c;
  --shore-accent-soft: #f5e7cf;
  --shore-ink: #3a2c18;
  --shore-ink-soft: #7a6343;
}

.shore-theme-lavender {
  --shore-sky-1: #f5f0ff;
  --shore-sky-2: #d2c2f2;
  --shore-sea: #8a72c8;
  --shore-sea-2: #634ca3;
  --shore-accent: #7048b8;
  --shore-accent-soft: #ece4fb;
  --shore-ink: #2c2142;
  --shore-ink-soft: #66597f;
}

.shore-theme-golden {
  --shore-sky-1: #fff8dc;
  --shore-sky-2: #ffd77a;
  --shore-sea: #e0a93b;
  --shore-sea-2: #b57f1c;
  --shore-accent: #9a5508;
  --shore-accent-soft: #fdefc9;
  --shore-ink: #3b2a0c;
  --shore-ink-soft: #7d6337;
}

.shore-theme-glacier {
  --shore-sky-1: #f2f8fc;
  --shore-sky-2: #c9e0ef;
  --shore-sea: #7fa9c6;
  --shore-sea-2: #4f7c9c;
  --shore-accent: #2f6e99;
  --shore-accent-soft: #e0eef8;
  --shore-ink: #1c3040;
  --shore-ink-soft: #536a7c;
}

/* Twilight is dark, like Moonlit Bay: light text over the sky (see the
   .shore-theme-moonlit overrides, which it shares). */
.shore-theme-twilight {
  --shore-sky-1: #3d2350;
  --shore-sky-2: #7a3f73;
  --shore-sea: #2a1838;
  --shore-sea-2: #1b0f26;
  --shore-accent: #c4508f;
  --shore-accent-soft: #f8e3ef;
  --shore-ink: #f8eef6;
  --shore-ink-soft: #dcc6d8;
}

/* ---------- Shelf styles ---------- */

.shelf-style-oak {
  --shelf-back: #f6ead8;
  --shelf-board: #b98352;
  --shelf-board-edge: #8c5b31;
}

.shelf-style-white {
  --shelf-back: #f7f7f4;
  --shelf-board: #e3e2dc;
  --shelf-board-edge: #c8c6bd;
}

.shelf-style-walnut {
  --shelf-back: #3a2a1f;
  --shelf-board: #6b4329;
  --shelf-board-edge: #472a18;
}

.shelf-style-cherry {
  --shelf-back: #f4e1d8;
  --shelf-board: #9c4a33;
  --shelf-board-edge: #6e2e1e;
}

.shelf-style-birch {
  --shelf-back: #fbf6ec;
  --shelf-board: #e2cfa8;
  --shelf-board-edge: #bfa679;
}

.shelf-style-mint {
  --shelf-back: #eaf5ef;
  --shelf-board: #8fc4a8;
  --shelf-board-edge: #5f9a7b;
}

/* Ebony is dark, like Walnut (see the .shelf-style-walnut overrides). */
.shelf-style-ebony {
  --shelf-back: #24211f;
  --shelf-board: #3d3733;
  --shelf-board-edge: #171412;
}

/* ---------- The shore page ---------- */

.shore {
  margin: 1rem 0 2.5rem;
}

.shore-ownerbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--bb-sage-200);
  border-radius: 0.8rem;
  background: #fff;
  font-size: 0.9rem;
}

.shore-privacy {
  margin-right: auto;
  color: var(--bb-sage-700);
}

.shore-hero {
  position: relative;
  padding: 2rem 2rem 0;
  border-radius: 1.5rem;
  background: linear-gradient(170deg, var(--shore-sky-1), var(--shore-sky-2));
  color: var(--shore-ink);
  overflow: hidden;
}

.shore-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
}

.shore-avatar {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 4.5rem;
  height: 4.5rem;
  border: 3px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: var(--shore-accent);
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.9rem;
  font-weight: 800;
}

.shore-who {
  flex: 1;
  min-width: min(100%, 16rem);
}

.shore-kicker {
  display: inline-block;
  color: var(--shore-accent, var(--bb-gold-700));
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.shore-theme-moonlit .shore-hero .shore-kicker,
.shore-theme-twilight .shore-hero .shore-kicker {
  color: #f2d27a;
}

.shore-who h1 {
  margin: 0.1rem 0 0.2rem;
  color: inherit;
  font-size: clamp(1.8rem, 1.3rem + 2vw, 2.7rem);
  font-weight: 800;
  line-height: 1.1;
  text-wrap: balance;
}

.shore-headline {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-style: italic;
}

.shore-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  color: var(--shore-ink-soft);
  font-size: 0.85rem;
}

.shore-share {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--shore-ink);
  font-size: 0.88rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.shore-theme-moonlit .shore-share,
.shore-theme-twilight .shore-share {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.shore-share svg {
  width: 16px;
  height: 16px;
}

.shore-share:hover {
  background: #fff;
  color: var(--shore-accent);
}

.shore-share-status {
  font-size: 0.85rem;
  font-weight: 700;
}

.shore-stats {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.25rem;
  margin: 1.5rem 0 0;
  padding-bottom: 3.5rem;
}

.shore-stats div {
  display: flex;
  flex-direction: column-reverse;
}

.shore-stats dt {
  color: var(--shore-ink-soft);
  font-size: 0.8rem;
  font-weight: 600;
}

.shore-stats dd {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

/* The sea at the foot of the sky. */
.shore-wave {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
}

.shore-wave-back {
  fill: var(--shore-sea);
  opacity: 0.55;
}

.shore-wave-front {
  fill: var(--shore-sea-2);
}

.shore-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin-top: 1.25rem;
}

@media (min-width: 992px) {
  .shore-body {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
  }
}

.shore-main,
.shore-side {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

/* ---------- The bookcase ---------- */

.shore-bookcase {
  display: grid;
  gap: 1.4rem;
  padding: 1.25rem 1.25rem 0.5rem;
  border: 1px solid var(--bb-sage-200);
  border-radius: 1.25rem;
  background: var(--shelf-back);
}

.shelf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.shelf-head h3 {
  margin: 0;
  color: var(--bb-sage-900);
  font-size: 1.02rem;
  font-weight: 800;
}

.shelf-style-walnut .shelf-head h3,
.shelf-style-ebony .shelf-head h3 {
  color: #f6eadb;
}

.shelf-count {
  color: var(--bb-sage-700);
  font-size: 0.8rem;
}

.shelf-style-walnut .shelf-count,
.shelf-style-walnut .shelf-empty,
.shelf-style-ebony .shelf-count,
.shelf-style-ebony .shelf-empty {
  color: #d7c3ad;
}

.shelf-empty {
  margin: 0 0 0.75rem;
  padding: 1rem;
  border: 1px dashed var(--shelf-board-edge);
  border-radius: 0.6rem;
  color: var(--bb-sage-700);
  font-size: 0.9rem;
  text-align: center;
}

/* Books stand on a board: spines in a row, or covers face out. */
.shelf {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  min-height: 3rem;
  padding: 0 0.5rem;
  overflow-x: auto;
  border-bottom: 12px solid var(--shelf-board);
  border-radius: 2px;
  box-shadow: 0 6px 0 -2px var(--shelf-board-edge), 0 14px 18px -12px rgba(0, 0, 0, 0.5);
  scrollbar-width: thin;
}

.shelf-faceout {
  gap: 0.9rem;
  padding: 0 0.75rem;
}

.shelf-spine {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 0.5rem 0 0.4rem;
  border-radius: 3px 3px 0 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent 18%, rgba(255, 255, 255, 0.14) 45%, transparent 60%, rgba(0, 0, 0, 0.18)),
    var(--spine);
  color: #fff;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.shelf-spine::before,
.shelf-spine::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  height: 2px;
  background: rgba(255, 255, 255, 0.35);
}

.shelf-spine::before {
  top: 9px;
}

.shelf-spine::after {
  bottom: 9px;
}

.shelf-spine span {
  overflow: hidden;
  max-height: calc(100% - 1.5rem);
  margin-top: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.shelf-spine i {
  font-size: 0.5rem;
  font-style: normal;
  letter-spacing: -1px;
  color: #ffe08a;
  writing-mode: vertical-rl;
}

.shelf-spine:hover,
.shelf-spine:focus-visible {
  transform: translateY(-8px);
  color: #fff;
}

.shelf-spine:focus-visible,
.shelf-cover:focus-visible {
  outline: 3px solid var(--bb-blue-500);
  outline-offset: 2px;
}

.shelf-cover {
  flex-shrink: 0;
  color: #fff;
  text-decoration: none;
  width: 96px;
  height: 142px;
  border-radius: 3px 6px 6px 3px;
  box-shadow: 0 10px 16px -8px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  transition: transform 0.15s ease;
}

.shelf-cover:hover {
  transform: translateY(-6px) rotate(-1deg);
}

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

.shelf-cloth {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  height: 100%;
  padding: 0.6rem;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.25) 0, rgba(0, 0, 0, 0.25) 6px, transparent 6px),
    var(--spine);
  color: #fff;
  text-align: center;
}

.shelf-cloth strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.8rem;
  line-height: 1.2;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.shelf-cloth small {
  opacity: 0.85;
  font-size: 0.68rem;
}

/* ---------- Side cards ---------- */

.shore-card {
  margin: 0;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--bb-sage-200);
  border-radius: 1.1rem;
  background: #fff;
}

.shore-card h2 {
  margin: 0.25rem 0 0.4rem;
  color: var(--bb-sage-900);
  font-size: 1.15rem;
  font-weight: 800;
}

.shore-card p {
  margin: 0 0 0.6rem;
  color: var(--bb-sage-700);
  font-size: 0.92rem;
}

.shore-card-kicker {
  color: var(--shore-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.shore-twin {
  border-color: var(--shore-accent-soft);
  background: linear-gradient(160deg, var(--shore-accent-soft), #fff 70%);
}

.shore-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.6rem;
  padding: 0;
  list-style: none;
}

.shore-chips li {
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--shore-accent-soft);
  color: var(--shore-accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.shore-theme-moonlit .shore-chips li,
.shore-theme-moonlit .shore-card-kicker {
  color: #4343b8;
}

.shore-theme-twilight .shore-chips li,
.shore-theme-twilight .shore-card-kicker {
  color: #9b2f6c;
}

.shore-link {
  display: block;
  color: var(--shore-accent);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.shore-theme-moonlit .shore-link {
  color: #4343b8;
}

.shore-theme-twilight .shore-link {
  color: #9b2f6c;
}

.shore-link:hover {
  text-decoration: underline;
}

.shore-goal {
  height: 10px;
  margin: 0.4rem 0 0.5rem;
  border-radius: 99px;
  background: var(--bb-sage-100);
  overflow: hidden;
}

.shore-goal b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--shore-sea, var(--bb-sage-600)), var(--shore-accent, var(--bb-gold-500)));
}

.shore-most-read {
  font-size: 0.85rem !important;
}

.shore-quote {
  background: var(--shore-accent-soft);
  border-color: transparent;
}

.shore-quote blockquote {
  margin: 0 0 0.4rem;
  color: var(--shore-ink, var(--bb-sage-900));
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.5;
}

.shore-theme-moonlit .shore-quote blockquote {
  color: #1b2347;
}

.shore-theme-twilight .shore-quote blockquote {
  color: #2a1838;
}

.shore-quote figcaption {
  color: var(--bb-sage-700);
  font-size: 0.85rem;
  font-weight: 600;
}

.shore-bio {
  white-space: pre-line;
}

.shore-invite .shore-link {
  margin-top: 0.6rem;
}

/* ---------- Reviews ---------- */

.shore-reviews {
  display: grid;
  gap: 0.8rem;
}

.shore-reviews > h2 {
  margin: 0;
  color: var(--bb-sage-900);
  font-size: 1.25rem;
  font-weight: 800;
}

.shore-review {
  padding: 1rem 1.15rem;
  border: 1px solid var(--bb-sage-200);
  border-left: 4px solid var(--shore-accent);
  border-radius: 0.9rem;
  background: #fff;
}

.shore-review header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.6rem;
  margin-bottom: 0.4rem;
}

.shore-review h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
}

.shore-review h3 a {
  color: var(--bb-sage-900);
  text-decoration: none;
}

.shore-review h3 a:hover {
  color: var(--bb-blue-700);
  text-decoration: underline;
}

.shore-review-by {
  color: var(--bb-sage-700);
  font-size: 0.85rem;
}

.shore-review-stars {
  margin-left: auto;
  color: var(--bb-gold-500);
  letter-spacing: 1px;
}

.shore-review-off {
  color: var(--bb-sage-200);
}

.shore-review p {
  margin: 0 0 0.35rem;
  color: var(--bb-sage-900);
  white-space: pre-line;
}

.shore-review time {
  color: var(--bb-sage-600);
  font-size: 0.78rem;
}

/* ---------- Discover shores ---------- */

.shores-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin: 1.25rem 0 1rem;
  padding: 1.75rem;
  border-radius: 1.4rem;
  background: linear-gradient(160deg, #fff1db, #9fe1da);
}

.shores-hero > div:first-child {
  max-width: 42rem;
}

.shores-hero .shore-kicker {
  color: #127373;
}

.shores-hero h1 {
  margin: 0.2rem 0 0.4rem;
  color: var(--bb-sage-900);
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem);
  font-weight: 800;
  text-wrap: balance;
}

.shores-hero p {
  margin: 0;
  color: var(--bb-sage-700);
}

.shores-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.shores-search {
  display: flex;
  gap: 0.5rem;
  max-width: 28rem;
  margin-bottom: 1.25rem;
}

.shores-empty {
  padding: 2.5rem 1.5rem;
  border: 1px dashed var(--bb-sage-300);
  border-radius: 1.1rem;
  background: #fff;
  color: var(--bb-sage-700);
  text-align: center;
}

.shores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.shore-tile {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.1rem;
  border-radius: 1.1rem;
  background: linear-gradient(160deg, var(--shore-sky-1), var(--shore-sky-2));
  color: var(--shore-ink);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.shore-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px -18px rgba(0, 0, 0, 0.5);
  color: var(--shore-ink);
}

.shore-tile-top {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.shore-tile .shore-avatar {
  width: 2.8rem;
  height: 2.8rem;
  border-width: 2px;
  font-size: 1.2rem;
}

.shore-tile strong {
  display: block;
  color: inherit;
  font-size: 1.02rem;
  line-height: 1.2;
}

.shore-tile small {
  color: var(--shore-ink-soft);
  font-size: 0.8rem;
}

.shore-tile-headline {
  font-style: italic;
  font-size: 0.92rem;
}

.shore-tile-foot {
  display: grid;
  gap: 0.15rem;
  margin-top: auto;
  color: var(--shore-ink-soft);
  font-size: 0.82rem;
}

.shore-tile-reading {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- The owner's editor ---------- */

.myshore-start {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  margin: 1.25rem 0 2.5rem;
  padding: 2rem;
  border-radius: 1.5rem;
  background: linear-gradient(160deg, #fff1db, #f9c3a8 55%, #9fe1da);
}

@media (min-width: 992px) {
  .myshore-start {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: center;
  }
}

.myshore-start h1 {
  margin: 0.3rem 0 0.6rem;
  color: #3a2a20;
  font-size: clamp(1.8rem, 1.3rem + 2vw, 2.7rem);
  font-weight: 800;
  line-height: 1.12;
  text-wrap: balance;
}

.myshore-start .shore-kicker {
  color: #b9542a;
}

.myshore-start p {
  color: #5d4536;
  font-size: 1.02rem;
}

.myshore-perks {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  color: #3a2a20;
  font-weight: 600;
}

.myshore-perks span {
  display: inline-block;
  width: 1.6rem;
}

.myshore-waiting {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-weight: 700;
}

.myshore-create {
  padding: 1.4rem;
  border-radius: 1.1rem;
  background: #fff;
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.5);
}

.myshore-create h2 {
  margin: 0 0 1rem;
  font-size: 1.3rem;
  font-weight: 800;
}

.myshore-prefix {
  max-width: 55%;
  overflow: hidden;
  color: var(--bb-sage-700);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.myshore-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1.25rem 0 1rem;
}

.myshore-head h1 {
  margin: 0.15rem 0 0.2rem;
  font-weight: 800;
}

.myshore-head .shore-kicker {
  color: var(--bb-gold-700);
}

.myshore-head p {
  color: var(--bb-sage-700);
  font-size: 0.9rem;
}

.myshore-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--bb-sage-200);
}

.myshore-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: -1px;
  padding: 0.6rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.7rem 0.7rem 0 0;
  color: var(--bb-sage-700);
  font-weight: 700;
  text-decoration: none;
}

.myshore-tabs a.active {
  border-color: var(--bb-sage-200);
  border-bottom-color: var(--bb-sage-50);
  background: var(--bb-sage-50);
  color: var(--bb-sage-900);
}

.myshore-tabs a span,
.myshore-count {
  padding: 0 0.45rem;
  border-radius: 999px;
  background: var(--bb-sage-100);
  color: var(--bb-sage-700);
  font-size: 0.75rem;
  font-weight: 700;
}

.myshore-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 992px) {
  .myshore-grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
  }
}

.myshore-main,
.myshore-side {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

.myshore-card {
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--bb-sage-200);
  border-radius: 1.1rem;
  background: #fff;
}

.myshore-card h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.8rem;
  color: var(--bb-sage-900);
  font-size: 1.1rem;
  font-weight: 800;
}

.myshore-sub {
  margin: 1.1rem 0 0.6rem;
  color: var(--bb-sage-900);
  font-size: 0.95rem;
  font-weight: 800;
}

.myshore-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

.myshore-results,
.myshore-suggest ul {
  display: grid;
  gap: 0.4rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

.myshore-results li,
.myshore-suggest li {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--bb-sage-100);
  border-radius: 0.6rem;
}

.myshore-results img,
.myshore-suggest img {
  width: 2.2rem;
  height: 3.2rem;
  border-radius: 3px;
  object-fit: cover;
}

.myshore-results strong,
.myshore-suggest strong {
  display: block;
  overflow: hidden;
  color: var(--bb-sage-900);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.myshore-results small,
.myshore-suggest small {
  color: var(--bb-sage-700);
  font-size: 0.78rem;
}

.myshore-results .myshore-noresult {
  display: block;
  color: var(--bb-sage-700);
  font-size: 0.9rem;
}

.myshore-suggest form {
  display: flex;
  gap: 0.3rem;
}

.myshore-own {
  margin-top: 0.75rem;
}

.myshore-own summary {
  color: var(--bb-blue-700);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.myshore-own-form {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr) auto auto;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

@media (max-width: 767.98px) {
  .myshore-own-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

.myshore-suggest {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--bb-sage-100);
}

.myshore-suggest h3 {
  margin: 0;
  color: var(--bb-sage-700);
  font-size: 0.85rem;
  font-weight: 800;
}

.myshore-books {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.myshore-books details {
  border: 1px solid var(--bb-sage-100);
  border-radius: 0.7rem;
}

.myshore-books details[open] {
  border-color: var(--bb-sage-300);
  background: var(--bb-sage-50);
}

.myshore-books summary {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  list-style: none;
}

.myshore-books summary::-webkit-details-marker {
  display: none;
}

.myshore-books summary img,
.myshore-nocover {
  width: 2.2rem;
  height: 3.2rem;
  border-radius: 3px;
  object-fit: cover;
}

.myshore-nocover {
  display: grid;
  place-items: center;
  background: var(--bb-sage-100);
}

.myshore-book-text strong {
  display: block;
  overflow: hidden;
  color: var(--bb-sage-900);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.myshore-book-text small {
  color: var(--bb-sage-700);
  font-size: 0.8rem;
}

.myshore-edit {
  color: var(--bb-blue-700);
  font-size: 0.85rem;
  font-weight: 700;
}

.myshore-book-form {
  padding: 0.25rem 0.75rem 0.75rem;
}

.myshore-book-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
  gap: 0.6rem 1rem;
  align-items: end;
  margin-bottom: 0.6rem;
}

.myshore-book-fields fieldset {
  margin: 0;
}

.star-input-sm label {
  font-size: 1.35rem;
}

.myshore-norating {
  margin: 0;
  font-size: 0.8rem;
}

.myshore-fav {
  margin-bottom: 0.3rem;
}

.myshore-book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.myshore-goal-line {
  margin: 0;
  color: var(--bb-sage-900);
}

.myshore-goal-line strong {
  font-size: 1.6rem;
}

.myshore-goal-form {
  margin-top: 0.75rem;
}

.myshore-twin {
  color: var(--bb-sage-900);
}

.myshore-tip {
  background: var(--bb-sage-50);
}

/* Design: theme and shelf pickers. */
.myshore-themes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr));
  gap: 0.6rem;
}

.myshore-theme,
.myshore-shelf {
  position: relative;
  display: grid;
  gap: 0.4rem;
  padding: 0.5rem;
  border: 2px solid var(--bb-sage-100);
  border-radius: 0.8rem;
  color: var(--bb-sage-900);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.myshore-theme input,
.myshore-shelf input {
  position: absolute;
  opacity: 0;
}

.myshore-theme:has(input:checked),
.myshore-shelf:has(input:checked) {
  border-color: var(--bb-blue-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.myshore-theme:has(input:focus-visible),
.myshore-shelf:has(input:focus-visible) {
  outline: 3px solid var(--bb-blue-500);
  outline-offset: 2px;
}

.myshore-theme-swatch {
  position: relative;
  height: 3.6rem;
  border-radius: 0.5rem;
  background: linear-gradient(170deg, var(--shore-sky-1), var(--shore-sky-2) 62%, var(--shore-sea) 62%, var(--shore-sea-2));
  overflow: hidden;
}

.myshore-theme-swatch::after {
  content: "";
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--shore-accent);
}

.myshore-shelves {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 6.5rem), 1fr));
  gap: 0.6rem;
}

.myshore-shelf-swatch {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 3.6rem;
  border-bottom: 8px solid var(--shelf-board);
  border-radius: 0.5rem 0.5rem 2px 2px;
  background: var(--shelf-back);
}

.myshore-shelf-swatch i {
  width: 12px;
  height: 70%;
  border-radius: 2px 2px 0 0;
  background: #7b3f3a;
}

.myshore-shelf-swatch i + i {
  height: 85%;
  background: #2f5d62;
}

.myshore-shelf-swatch i + i + i {
  height: 60%;
  background: #c9a227;
}

.myshore-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.myshore-genre input {
  position: absolute;
  opacity: 0;
}

.myshore-genre span {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--bb-sage-200);
  border-radius: 999px;
  color: var(--bb-sage-900);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.myshore-genre input:checked + span {
  border-color: var(--bb-blue-600);
  background: var(--bb-blue-600);
  color: #fff;
}

.myshore-genre input:disabled + span {
  opacity: 0.45;
  cursor: not-allowed;
}

.myshore-genre input:focus-visible + span {
  outline: 3px solid var(--bb-blue-500);
  outline-offset: 2px;
}

@media (max-width: 575.98px) {
  .shore-hero {
    padding: 1.4rem 1.1rem 0;
  }

  .shore-stats {
    gap: 0.75rem 1.5rem;
  }

  .myshore-start {
    padding: 1.25rem;
  }

  .myshore-add-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .shelf-spine,
  .shelf-cover,
  .shore-tile {
    transition: none;
  }
}

/* ---------- Around BooksShore (picks) ---------- */

.shore-picks {
  display: grid;
  gap: 1rem;
}

.shore-picks > h2 {
  margin: 0;
  color: var(--bb-sage-900);
  font-size: 1.25rem;
  font-weight: 800;
}

.shore-picks-group h3 {
  margin: 0 0 0.55rem;
  color: var(--bb-sage-900);
  font-size: 1rem;
  font-weight: 800;
}

.shore-picks-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 0.7rem;
}

.shore-picks-quote {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
}

.shore-pick {
  display: flex;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--bb-sage-200);
  border-radius: 0.9rem;
  background: #fff;
  color: var(--bb-sage-900);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.shore-pick:hover {
  border-color: var(--shore-accent, var(--bb-blue-500));
  color: var(--bb-sage-900);
  transform: translateY(-2px);
}

.shore-pick img {
  flex-shrink: 0;
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 0.55rem;
  object-fit: cover;
}

.shore-pick img.shore-pick-book {
  width: 3rem;
  height: 4.4rem;
  border-radius: 3px;
}

.shore-pick-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.shore-pick-text strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.92rem;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.shore-pick-sub {
  display: -webkit-box;
  overflow: hidden;
  color: var(--bb-sage-700);
  font-size: 0.8rem;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.shore-pick-stars {
  color: var(--bb-gold-500);
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.shore-pick-stars span {
  color: var(--bb-sage-200);
}

.shore-pick-mine {
  color: var(--bb-sage-700);
  font-size: 0.83rem;
  font-style: italic;
  overflow-wrap: anywhere;
}

.shore-pick-quote {
  flex-direction: column;
  gap: 0.35rem;
  border-left: 4px solid var(--shore-accent, var(--bb-gold-500));
}

.shore-pick-quote blockquote {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-style: italic;
  line-height: 1.5;
}

.shore-pick-quote .shore-pick-mine strong {
  font-style: normal;
}

/* The owner's Picks tab. */
.myshore-picks {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.myshore-picks li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--bb-sage-100);
  border-radius: 0.7rem;
}

.myshore-picks li.is-hidden {
  background: var(--bb-sage-50);
  opacity: 0.75;
}

.myshore-pick-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.myshore-pick-text a {
  overflow: hidden;
  color: var(--bb-sage-900);
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.myshore-pick-text a:hover {
  color: var(--bb-blue-700);
  text-decoration: underline;
}

.myshore-pick-text small {
  color: var(--bb-sage-700);
  font-size: 0.78rem;
}

.myshore-addlinks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.myshore-addlinks a {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--bb-sage-200);
  border-radius: 999px;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

/* Long titles cut off with "…" instead of widening the columns. */
.myshore-main > *,
.myshore-side > *,
.myshore-picks li {
  min-width: 0;
}

.myshore-pick-text {
  flex: 1;
}
