/* e-Hymnal detail — studio shell surfaces */

.eh-page {
  --eh-ink: #e8ecf1;
  --eh-muted: #9aa3ad;
  --eh-border: rgba(255, 255, 255, 0.08);
  --eh-accent: #6eb6ff;
  color: var(--eh-ink);
}

.ss-studio.ss-light .eh-page {
  --eh-ink: #1c1915;
  --eh-muted: #5a554c;
  --eh-border: #ddd6cb;
  --eh-accent: #1f5f8a;
}

.eh-hero {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 1.35rem 1.75rem;
  align-items: center;
  margin-bottom: 1.35rem;
}

@media (max-width: 720px) {
  .eh-hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: left;
  }
  .eh-hero-copy {
    width: 100%;
  }
}

/* Grokipedia-style 3D book mockup (studio colors) */
.eh-mockup {
  width: 100%;
  max-width: 240px;
  margin: 0 auto;
}

.eh-mockup-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.15;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  perspective-origin: 50% 45%;
}

.eh-mockup-book {
  position: relative;
  width: min(168px, 58%);
  aspect-ratio: 1 / 1.42;
  transform-style: preserve-3d;
  transform: rotateY(-28deg) rotateX(6deg);
  animation: eh-mockup-float 5.5s ease-in-out infinite;
  filter: drop-shadow(18px 28px 32px rgba(0, 0, 0, 0.45));
  will-change: transform;
}

.eh-mockup-book:hover {
  animation-play-state: paused;
  transform: rotateY(-18deg) rotateX(4deg) translateY(-6px) scale(1.03);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes eh-mockup-float {
  0%, 100% { transform: rotateY(-28deg) rotateX(6deg) translateY(0); }
  50% { transform: rotateY(-24deg) rotateX(5deg) translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  .eh-mockup-book {
    animation: none;
  }
}

.eh-mockup-cover {
  position: absolute;
  inset: 0;
  border-radius: 2px 6px 6px 2px;
  overflow: hidden;
  background: linear-gradient(160deg, #3a465c 0%, #1c2430 55%, #121820 100%);
  transform: translateZ(1px);
  box-shadow:
    inset -14px 0 22px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.eh-mockup-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.eh-mockup-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  color: rgba(232, 236, 241, 0.75);
  background:
    radial-gradient(circle at 30% 20%, rgba(110, 182, 255, 0.22), transparent 55%),
    linear-gradient(160deg, #3a465c, #1c2430);
}

.eh-mockup-brand {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.6rem 0.7rem 0.75rem;
  background: linear-gradient(to top, rgba(12, 16, 24, 0.92) 0%, rgba(12, 16, 24, 0.55) 55%, transparent 100%);
  color: #f5f7fa;
  text-align: left;
}

.eh-mockup-brand small {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 0.15rem;
}

.eh-mockup-brand strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

.eh-mockup-spine {
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: 0;
  width: 22px;
  transform-origin: left center;
  transform: rotateY(-90deg) translateX(-22px);
  border-radius: 3px 0 0 3px;
  background:
    linear-gradient(90deg, #0e1218 0%, #2a3545 28%, #6eb6ff 52%, #2a3545 78%, #0e1218 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.ss-studio.ss-light .eh-mockup-spine {
  background:
    linear-gradient(90deg, #1a2430 0%, #2f4a63 28%, #1f5f8a 52%, #2f4a63 78%, #1a2430 100%);
}

.eh-mockup-spine span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  color: #0c1018;
  white-space: nowrap;
  max-height: 88%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ss-studio.ss-light .eh-mockup-spine span {
  color: #fffefb;
}

.eh-mockup-pages {
  position: absolute;
  top: 4px;
  bottom: 4px;
  right: 0;
  width: 14px;
  transform-origin: right center;
  transform: rotateY(90deg) translateX(14px);
  background:
    repeating-linear-gradient(
      180deg,
      #f4efe4 0px,
      #f4efe4 2px,
      #e4dccb 2px,
      #e4dccb 3px
    );
  border-radius: 0 2px 2px 0;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.2);
}

.eh-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--eh-muted);
}

.eh-hero-copy h1 {
  margin: 0 0 0.4rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.6vw, 2.05rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--eh-ink);
}

.eh-hero-desc {
  margin: 0 0 0.65rem;
  color: var(--eh-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 46rem;
}

.eh-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
}

.eh-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--eh-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--eh-border);
}

.ss-studio.ss-light .eh-pill {
  background: #f3efe8;
  color: #4a453e;
}

.eh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.eh-actions .btn {
  border-radius: 0.5rem;
  font-size: 0.86rem;
  font-weight: 650;
}

.eh-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0.35rem 0 0.65rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--eh-border);
}

.eh-list-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
}

.eh-list-count {
  font-size: 0.82rem;
  color: var(--eh-muted);
}

.eh-entries {
  list-style: none;
  margin: 0;
  padding: 0;
}

.eh-entries > li {
  margin: 0;
  padding: 0;
}

.eh-entry {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  gap: 0.55rem 0.7rem;
  align-items: center;
  padding: 0.62rem 0.35rem;
  border-bottom: 1px solid var(--eh-border);
  text-decoration: none;
  color: inherit;
  border-radius: 0.35rem;
  transition: background 0.15s ease;
}

.eh-entry:hover {
  background: rgba(110, 182, 255, 0.08);
}

.ss-studio.ss-light .eh-entry:hover {
  background: rgba(31, 95, 138, 0.07);
}

.eh-entry-num {
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  color: var(--eh-muted);
  text-align: right;
}

.eh-entry-title {
  font-weight: 650;
  font-size: 0.95rem;
  color: var(--eh-ink);
  line-height: 1.3;
}

.eh-entry:hover .eh-entry-title {
  color: var(--eh-accent);
}

.eh-entry-meta {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.78rem;
  color: var(--eh-muted);
}

.eh-entry-badge {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.22rem 0.45rem;
  border-radius: 0.35rem;
  background: rgba(110, 182, 255, 0.14);
  color: var(--eh-accent);
  border: 1px solid rgba(110, 182, 255, 0.25);
}

.ss-studio.ss-light .eh-entry-badge {
  background: rgba(31, 95, 138, 0.1);
  border-color: rgba(31, 95, 138, 0.22);
}

.eh-empty {
  padding: 1.25rem 0.5rem;
  color: var(--eh-muted);
  text-align: center;
}

.eh-pager {
  display: flex;
  justify-content: center;
  margin-top: 1.15rem;
}

.eh-pager .pagination {
  margin: 0;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.eh-note {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--eh-muted);
  text-align: center;
}

.eh-note a {
  color: var(--eh-accent);
}

/* Terms used — Wikipedia-style */
.eh-terms {
  margin-top: 1.5rem;
  padding: 1rem 1.05rem 0.9rem;
  border: 1px solid var(--eh-border);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.03);
}

.ss-studio.ss-light .eh-terms {
  background: #fffefb;
}

.eh-terms h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 750;
}

.eh-terms-lead {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--eh-muted);
}

.eh-terms-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--eh-border);
}

.eh-terms-list li {
  border-bottom: 1px solid var(--eh-border);
}

.eh-terms-list li.is-extra {
  display: none;
}

.eh-terms.is-expanded .eh-terms-list li.is-extra {
  display: list-item;
}

.eh-terms-list a {
  display: grid;
  grid-template-columns: 5.2rem minmax(0, 1fr);
  gap: 0.45rem 0.75rem;
  align-items: baseline;
  padding: 0.5rem 0.1rem;
  text-decoration: none;
  color: inherit;
}

.eh-terms-list a:hover .eh-terms-title {
  color: var(--eh-accent);
  text-decoration: underline;
}

.eh-terms-kind {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--eh-muted);
}

.eh-terms-kind[data-kind="author"] { color: #c9a66b; }
.eh-terms-kind[data-kind="dictionary"] { color: #6ecf9a; }
.eh-terms-kind[data-kind="subject"] { color: #b39ddb; }

.ss-studio.ss-light .eh-terms-kind[data-kind="author"] { color: #6b4f2a; }
.ss-studio.ss-light .eh-terms-kind[data-kind="dictionary"] { color: #3d6b4f; }
.ss-studio.ss-light .eh-terms-kind[data-kind="subject"] { color: #5a4570; }

.eh-terms-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.3;
}

.eh-terms-meta {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.76rem;
  color: var(--eh-muted);
}

.eh-terms-more-wrap {
  margin-top: 0.7rem;
  text-align: center;
}

.eh-terms-more {
  border: 1px solid var(--eh-border);
  background: transparent;
  color: var(--eh-accent);
  border-radius: 999px;
  padding: 0.38rem 0.95rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.eh-terms-more:hover {
  background: rgba(110, 182, 255, 0.1);
}

.eh-terms.is-expanded .eh-terms-more-label-more { display: none; }
.eh-terms:not(.is-expanded) .eh-terms-more-label-less { display: none; }

/* Useful links */
.eh-links {
  margin-top: 1.25rem;
}

.eh-links h3 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 750;
}

.eh-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
}

.eh-link-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.55rem;
  border: 1px solid var(--eh-border);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ss-studio.ss-light .eh-link-card {
  background: #fffefb;
}

.eh-link-card:hover {
  border-color: var(--eh-accent);
  background: rgba(110, 182, 255, 0.08);
}

.eh-link-card strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--eh-ink);
}

.eh-link-card span {
  font-size: 0.75rem;
  color: var(--eh-muted);
  line-height: 1.35;
}

.eh-link-card i {
  color: var(--eh-accent);
  margin-bottom: 0.15rem;
}

/* Nav mini list */
.eh-nav-mini {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 0.35rem 0.5rem;
}

.eh-nav-mini a {
  display: block;
  padding: 0.35rem 0.55rem;
  border-radius: 0.4rem;
  color: var(--ss-muted, #9aa3ad);
  text-decoration: none;
  font-size: 0.84rem;
}

.eh-nav-mini a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.ss-studio.ss-light .eh-nav-mini a:hover {
  background: rgba(31, 95, 138, 0.08);
  color: #1f5f8a;
}

.eh-side-block {
  margin-top: 1.15rem;
}

.eh-side-block h3 {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  font-weight: 750;
}

.eh-mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.eh-mini-list a {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--eh-border);
  text-decoration: none;
  color: inherit;
}

.eh-mini-list a:hover .eh-mini-title {
  color: var(--eh-accent);
}

.eh-mini-thumb {
  width: 36px;
  height: 50px;
  border-radius: 0.35rem;
  overflow: hidden;
  flex: 0 0 auto;
  background: linear-gradient(145deg, #3a4a6b, #1d2436);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.eh-mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.eh-mini-title {
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.25;
}

.eh-mini-meta {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.74rem;
  color: var(--eh-muted);
}


/* ========== e-Hymnal list ? real bookshelf ========== */

.eh-browse {
  --eh-ink: #e8ecf1;
  --eh-muted: #9aa3ad;
  --eh-border: rgba(255, 255, 255, 0.08);
  --eh-accent: #6eb6ff;
  --eh-shelf: #3a2a1c;
  --eh-shelf-edge: #5a4330;
  color: var(--eh-ink);
}

.ss-studio.ss-light .eh-browse {
  --eh-ink: #1c1915;
  --eh-muted: #5a554c;
  --eh-border: #ddd6cb;
  --eh-accent: #1f5f8a;
  --eh-shelf: #6b5340;
  --eh-shelf-edge: #8a6d52;
}

.eh-browse-intro {
  margin-bottom: 1.15rem;
}

.eh-browse-intro h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 750;
}

.eh-browse-intro p {
  margin: 0;
  color: var(--eh-muted);
  font-size: 0.95rem;
  max-width: 40rem;
}

.eh-browse-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.eh-browse-toolbar .form-control,
.eh-browse-toolbar .form-select {
  max-width: 280px;
  background: rgba(255,255,255,0.04);
  border-color: var(--eh-border);
  color: var(--eh-ink);
}

.ss-studio.ss-light .eh-browse-toolbar .form-control,
.ss-studio.ss-light .eh-browse-toolbar .form-select {
  background: #fff;
  border-color: #ddd6cb;
  color: #1c1915;
}

.eh-shelf-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 1.1rem 1.35rem;
  padding: 1.5rem 0.75rem 2.4rem;
  margin-bottom: 1.75rem;
  perspective: 1400px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.04) 0%, transparent 55%),
    linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.18) 100%);
  border-radius: 0.75rem 0.75rem 0 0;
}

.ss-studio.ss-light .eh-shelf-row {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.65) 0%, transparent 55%),
    linear-gradient(180deg, #f7f3ec 0%, #ebe4d8 100%);
}

.eh-shelf-row::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--eh-shelf-edge) 0%, var(--eh-shelf) 45%, #241810 100%);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.eh-book {
  position: relative;
  width: min(168px, 44vw);
  flex: 0 0 auto;
  z-index: 1;
  transform-style: preserve-3d;
  transition: z-index 0s;
}

.eh-book:hover,
.eh-book:focus-within {
  z-index: 8;
}

.eh-book-link {
  display: block;
  text-decoration: none;
  color: inherit;
  outline: none;
  cursor: pointer;
}

.eh-book-3d {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.42;
  transform-style: preserve-3d;
  transform: rotateY(-18deg) rotateX(6deg);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
  filter: drop-shadow(12px 18px 22px rgba(0, 0, 0, 0.5));
  will-change: transform;
}

.eh-book:hover .eh-book-3d,
.eh-book-link:focus-visible .eh-book-3d {
  transform: rotateY(-2deg) rotateX(0deg) translateY(-22px) scale(1.08);
  filter: drop-shadow(16px 32px 36px rgba(0, 0, 0, 0.62));
}

.eh-book-cover {
  position: absolute;
  inset: 0;
  border-radius: 2px 6px 6px 2px;
  overflow: hidden;
  background: linear-gradient(145deg, #4a3a2a 0%, #2a1f18 55%, #1a1410 100%);
  transform: translateZ(1px);
  box-shadow:
    inset -12px 0 20px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.eh-book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.eh-book-cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem;
  text-align: center;
  color: #f3e9d8;
  background:
    radial-gradient(circle at 30% 20%, rgba(110, 182, 255, 0.18), transparent 50%),
    linear-gradient(160deg, #5a4634 0%, #2c2118 60%, #17120e 100%);
}

.eh-book-cover-fallback i {
  font-size: 1.8rem;
  opacity: 0.85;
}

.eh-book-cover-fallback span {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  max-width: 100%;
}

.eh-book-spine {
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: 0;
  width: 20px;
  transform-origin: left center;
  transform: rotateY(-90deg) translateX(-20px);
  border-radius: 3px 0 0 3px;
  background: linear-gradient(90deg, #120c08 0%, #4a3828 35%, #6eb6ff55 52%, #2a1e16 72%, #120c08 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.ss-studio.ss-light .eh-book-spine {
  background: linear-gradient(90deg, #1a1410 0%, #5a4330 35%, #1f5f8a88 52%, #3a2a1c 72%, #1a1410 100%);
}

.eh-book-pages {
  position: absolute;
  top: 4px;
  bottom: 4px;
  right: 0;
  width: 13px;
  transform-origin: right center;
  transform: rotateY(90deg) translateX(13px);
  background: repeating-linear-gradient(
    180deg,
    #f7f1e4 0px,
    #f7f1e4 2px,
    #e8dfd0 2px,
    #e8dfd0 3px
  );
  border-radius: 0 2px 2px 0;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.22);
}

.eh-book-caption {
  margin-top: 0.75rem;
  text-align: center;
  padding: 0 0.15rem;
  transition: transform 0.35s ease;
}

.eh-book:hover .eh-book-caption {
  transform: translateY(-4px);
}

.eh-book-caption strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--eh-ink);
}

.eh-book-caption span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.74rem;
  color: var(--eh-muted);
}

.eh-browse-side {
  margin-top: 0.5rem;
}

.eh-browse-side h2 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 750;
}

.eh-browse-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--eh-muted);
}

.eh-browse-pager {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0 1rem;
}

.eh-browse-ads {
  margin: 1rem 0;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .eh-book-3d,
  .eh-book-caption {
    transition: none;
  }
}

@media (max-width: 560px) {
  .eh-book { width: min(138px, 44vw); }
  .eh-shelf-row { gap: 0.85rem 1rem; padding-bottom: 2.1rem; }
}

