/* ===========================
   YOLLY LEARN - styles.css
   Dark theme, pink accent
   =========================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  --bg-base:       #10141c;
  --bg-card:       #1e2431;
  --bg-card-hover: #353a46;
  --bg-sidebar:    #1e2431;
  --bg-sunken:     #0a0a0b;
  --accent-pink:   #d8368e;
  --accent-pink-hover: #e64a9f;
  --accent-teal:   #2dd4bf;
  --star:          #b8568e;
  --text-primary:  #ffffff;
  --text-secondary:#b9bfcc;
  --text-muted:    #909195;
  --border:        #3a3f4b;
  --border-strong: #414141;
  --hero-from:     #e17dcf;
  --hero-to:       #8551e1;
  --radius-sm:     10px;
  --radius-md:     14px;
  --radius-lg:     20px;
  --radius-xl:     28px;
  --radius-pill:   999px;
  --font-body:     "Inter", "Segoe UI", Arial, sans-serif;
  --font-display:  "Poppins", "Inter", "Segoe UI", Arial, sans-serif;
}

html { font-size: 15px; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
}

/* ===========================  SITE HEADER (the shop's)  =========================== */
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: calc(1312px + 96px);
  padding: 30px 48px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; color: var(--text-primary); text-decoration: none; }
.brand__logo { flex-shrink: 0; width: 42px; height: 43px; margin: -5px; }
.brand__name {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
}
.brand__name-light { font-weight: 300; }
.search { position: relative; flex: 0 1 438px; margin-left: 64px; }
.search__icon {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.search__input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  outline: none;
}
.search__input::placeholder { color: var(--text-muted); }
.search__input:focus { border-color: var(--text-muted); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.pill-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.pill-link:hover, .pill-link--active { border-color: var(--accent-pink); }
.pill-link__icon--compact { display: none; }
.account-menu__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--accent-pink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

/* ===========================  PAGES  =========================== */
.page { display: block; padding: 24px 48px 48px; }

.page-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  max-width: 1100px;
}

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

.page-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.page-header-row .page-heading { margin-bottom: 0; }
.page-header-row h2 { font-size: 1.3rem; }

.page-header-row.with-back { }

.back-btn {
  background: #1c2027;
  border: none;
  border-radius: 50%;
  width: 36px; height: 36px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.2rem;
  transition: background 0.2s;
}
.back-btn:hover { background: var(--bg-card-hover); }

/* ===========================  SEARCH  =========================== */
.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-sunken);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 0 18px;
  height: 44px;
  gap: 10px;
  margin-bottom: 32px;
}
.search-icon { color: var(--text-muted); flex-shrink: 0; display: flex; }
.search-bar input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font: inherit;
  font-size: 0.95rem;
  width: 100%;
}
.search-bar input::placeholder { color: #5f6370; }
.search-bar:focus-within { border-color: var(--text-muted); }

/* ===========================  HERO BANNER  =========================== */
.hero-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 218px;
  padding: 36px 160px;
  margin-bottom: 36px;
  border-radius: var(--radius-xl);
  text-align: center;
  background:
    radial-gradient(circle at 34% 18%, rgba(255,255,255,0.10) 0, rgba(255,255,255,0) 26%),
    radial-gradient(circle at 70% 88%, rgba(255,255,255,0.08) 0, rgba(255,255,255,0) 30%),
    linear-gradient(90deg, var(--hero-from) 15%, #d482dc 45%, #b375e5 65%, var(--hero-to) 95%);
}
.hero-banner__star {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: auto;
  pointer-events: none;
}
.hero-text { position: relative; }
.hero-text h2 {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #fff;
}
.hero-text p {
  max-width: 500px;
  margin: 14px auto 0;
  color: rgba(255,255,255,0.95);
  font-size: 1.05rem;
  line-height: 1.55;
}

/* ===========================  SECTION HEADER  =========================== */
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
}
.section-header h2, .section-header h3 { font-size: 1.35rem; font-weight: 700; }
.link-pink {
  color: var(--accent-pink);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
}
.link-pink:hover { color: var(--accent-pink-hover); }

/* ===========================  BOOK GRID  =========================== */
.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.book-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: transform 0.18s, box-shadow 0.18s;
}
.book-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35), 0 0 0 1.5px var(--accent-pink);
}
.book-card__cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: var(--bg-sunken);
  margin-bottom: 14px;
}
.book-card__title { font-weight: 600; font-size: 0.98rem; }
.book-card__author { color: var(--text-secondary); font-size: 0.75rem; margin: 4px 0 10px; }
.book-card__stars { font-size: 1.15rem; font-weight: 700; }
.book-card__stars, .book-hero__price, .purchase-row span:last-child, .order-total { display: inline-flex; align-items: center; gap: 6px; }
.book-card__stars, .book-hero__price { display: flex; }
/* book covers sit in portrait 2:3 frames and fill them (owner, 2026-11-08): real covers are close to 2:3, so nothing is banded and little is trimmed */
.price-free { color: #4ba692; font-weight: 700; }
.price__star { flex-shrink: 0; width: 1.15em; height: 1.15em; color: var(--star); }

/* ===========================  SIDEBAR  =========================== */
.sidebar {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  height: fit-content;
  border: 1.5px solid var(--border);
}
.sidebar h3 { font-size: 1.1rem; margin-bottom: 16px; }

/* INTEREST TAGS */
.interest-tags, .filter-tags {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px;
}
.tag {
  background: var(--bg-card-hover);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.18s;
}
.tag:hover { border-color: var(--accent-pink); color: var(--accent-pink); }
.tag.active {
  background: var(--text-primary);
  color: var(--bg-base);
  border-color: var(--text-primary);
  font-weight: 600;
}

/* ===========================  WIDE TWO-COLUMN PAGES (home, browse)  =========================== */
.page--wide { padding: 32px 48px 64px; }
.wide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 64px;
  max-width: 1312px;
}
.page-heading {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 18px;
}
.wide-aside { min-width: 0; }
.interest-tags--home {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}
.interest-tags--home .tag {
  flex: 1 1 auto;
  height: 41px;
  padding: 0 18px;
  white-space: nowrap;
  border: none;
  background: var(--bg-card);
  font-size: 1rem;
  font-weight: 700;
}
.interest-tags--home .tag:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.interest-tags--home .tag.active { background: var(--accent-pink); color: #fff; }

/* CONTINUE CARD (store home) */
.continue-card {
  display: block;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
  color: var(--text-primary);
  text-decoration: none;
}
.continue-card__img {
  display: block;
  width: 100%;
  aspect-ratio: 358 / 212;
  object-fit: cover;
  border-radius: 12px;
  background: #213087;
}
.continue-card__info { padding: 14px 0 2px; }
/* home: the top band (search + hero | interests + continue) sits above a full-width Picked for you of four books a row */
.home-top .hero-banner { margin-bottom: 0; }
.home-top .wide-aside { display: flex; flex-direction: column; }
.home-top .continue-card { flex: 1; display: flex; align-items: stretch; gap: 16px; padding: 12px; }
.home-top .continue-card__img { width: 46%; height: auto; min-height: 96px; aspect-ratio: auto; flex-shrink: 0; object-fit: cover; }
.home-top .continue-card__info { align-self: center; padding: 0; }
.home-top .btn-library { margin-bottom: 0; }
.home-picks { max-width: 1312px; margin-top: 40px; }
.book-grid--four { grid-template-columns: repeat(4, 1fr); }
/* home: one horizontally scrolling shelf per category, after Editor's Choice */
.home-shelves { max-width: 1312px; }
.shelf { margin-top: 48px; }
.shelf__nav { display: flex; align-items: center; gap: 16px; }
.shelf__arrows { display: inline-flex; gap: 8px; }
.shelf__arrow { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--border);
  border-radius: 50%; background: var(--bg-card); color: var(--text-primary); cursor: pointer; }
.shelf__arrow:hover:not(:disabled) { border-color: var(--accent-pink); }
.shelf__arrow:disabled { opacity: .35; cursor: default; }
.shelf__track { display: flex; gap: 20px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-left: 0;
  padding: 4px 2px 12px; margin: 0 -2px; scrollbar-width: none; }
.shelf__track::-webkit-scrollbar { display: none; }
.shelf__track .book-card { flex: 0 0 210px; scroll-snap-align: start; }
.shelf__track .book-card:hover { transform: none; }
/* home: Editor's Choice, one featured book after Picked for you */
.editors-choice { max-width: 1312px; margin-top: 48px; }
.editors-card { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: center; padding: 32px; border-radius: var(--radius-xl);
  background: var(--bg-card); }
.editors-card__cover-link { display: block; }
.editors-card__cover { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius-md); background: var(--bg-sunken);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.editors-card__body { min-width: 0; }
.editors-card__title { font-family: var(--font-display); font-size: 2rem; font-weight: 600; line-height: 1.2; }
.editors-card__author { color: #b5b5b5; font-size: 1.07rem; margin: 8px 0 14px; }
.editors-card__excerpt { margin: 22px 0 18px; padding-left: 18px; border-left: 3px solid var(--accent-pink); color: #e3e3e6;
  font: italic 1.15rem/1.6 Georgia, "Times New Roman", serif; white-space: pre-line; }
.editors-card__about { color: #b5b5b5; font-size: 0.97rem; line-height: 1.55; max-width: 620px; }
.editors-card__price { display: flex; align-items: center; gap: 6px; margin: 20px 0 16px; font-size: 1.4rem; font-weight: 700; }
.editors-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.editors-card__actions .btn { margin: 0; padding: 0 28px; }
.continue-card__info strong { display: block; font-size: 1.07rem; margin-bottom: 6px; }
.continue-card__info p { color: var(--text-muted); font-size: 0.93rem; }
.btn-library { height: 50px; font-size: 1.07rem; font-weight: 700; margin-bottom: 0; }

/* CHECKOUT SIDEBAR */

.terms-links { text-align: center; font-size: 0.8rem; color: var(--text-secondary); margin-top: 10px; }

/* ===========================  BUTTONS  =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  padding: 13px 26px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.18s;
  text-decoration: none;
}
.btn-full { width: 100%; margin-bottom: 10px; }
.btn-pink {
  background: var(--accent-pink);
  color: #fff;
}
.btn-pink:hover { background: var(--accent-pink-hover); transform: translateY(-1px); }
.btn-white {
  background: var(--text-primary);
  color: var(--bg-base);
}
.btn-white:hover { background: #d0d4e0; }
.btn-dark {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}
.btn-dark:hover { background: #2a2d3a; }

/* ===========================  BOOK DETAIL PAGE  =========================== */
.book-author { color: var(--text-secondary); margin-bottom: 12px; }
.book-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.badge-tag {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  font-size: 0.97rem;
  font-weight: 400;
}
.badge-tag.blue { background: #0e1c36; color: #2a63f6; }
.badge-tag.teal { background: #122528; color: #4ba692; }

.book-stars { font-size: 1rem; margin-bottom: 12px; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px 0 16px;
  background: #22252c;
  border: none;
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.97rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s;
}
.share-btn svg { color: var(--text-secondary); }
.share-btn:hover { background: #2f3238; }

.book-about { margin-bottom: 24px; }
.book-about h3, .book-about h4 { font-size: 1.07rem; font-weight: 700; margin-bottom: 8px; }
.book-about p { color: #b5b5b5; line-height: 1.55; font-size: 0.97rem; max-width: 440px; }

/* ===========================  BOOK DETAILS  =========================== */
.book-hero {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid #17191e;
}
.book-hero__cover {
  width: 200px;
  height: auto;
  aspect-ratio: 2 / 3;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--bg-sunken);
}
.book-hero__info { min-width: 0; padding-top: 6px; }
.book-hero__title { font-size: 2.15rem; font-weight: 600; line-height: 1.2; margin-bottom: 14px; }
.book-hero__author { color: #b5b5b5; font-size: 1.07rem; margin-bottom: 16px; }
.book-hero .book-tags { gap: 10px; margin-bottom: 14px; }
.book-hero__price { font-size: 1.6rem; font-weight: 700; margin-bottom: 18px; }
.btn-sample {
  height: 50px;
  margin: 8px 0 0;
  background: #2f3238;
  color: var(--text-primary);
  font-size: 1.07rem;
  font-weight: 500;
}
.btn-sample:hover { background: #3a3e46; }

/* PURCHASE PANEL */
.purchase-panel .page-heading { margin-bottom: 28px; }
.edition-card {
  display: block;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
}
.edition-card__title { display: block; font-size: 1.07rem; font-weight: 600; margin-bottom: 6px; }
.edition-card__note { display: block; color: #b6b6b6; font-size: 0.93rem; line-height: 1.5; }
.purchase-summary { padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid #1c1c1e; }
.purchase-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 0;
  color: #b5b5b5;
  font-size: 0.93rem;
}
.purchase-row span:last-child { color: var(--text-primary); }
.purchase-row--total span:last-child { font-size: 1.07rem; font-weight: 700; }
.purchase-note { color: #b6b6b6; font-size: 0.93rem; line-height: 1.5; margin-bottom: 30px; }
.btn-purchase { height: 50px; font-size: 1.07rem; font-weight: 700; }
.purchase-panel .terms-links { margin-top: 12px; font-size: 0.93rem; font-weight: 400; color: var(--text-primary); }
.link-pink--regular { font-size: inherit; font-weight: 400; }

/* ===========================  READER  =========================== */
.reader-page { margin-bottom: 24px; overflow-x: auto; border-radius: 12px; background: var(--bg-card); }
.reader-page__canvas { display: block; margin: 0 auto; background: #fff; }
.reader-page__status { padding: 48px 16px; color: var(--text-secondary); text-align: center; }
.reader-nav .btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.sample-pages { max-width: 640px; }
.sample-pages canvas { display: block; max-width: 100%; margin-bottom: 16px; background: #fff; border-radius: 4px; }
.sample-none { color: var(--text-muted); }
.reader-chapter-label { color: var(--text-secondary); margin-bottom: 8px; font-size: 0.9rem; }
.reader-content { margin-bottom: 32px; line-height: 1.8; }
.reader-content h4 { font-size: 1rem; margin-bottom: 12px; }
.reader-content p  { color: var(--text-secondary); margin-bottom: 14px; font-size: 1rem; }

.end-of-sample {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
}
.end-of-sample strong { display: block; font-size: 1.07rem; margin-bottom: 6px; }
.end-of-sample p { color: #b6b6b6; font-size: 0.97rem; line-height: 1.5; }

/* ===========================  FREE SAMPLE  =========================== */
.sample-head { padding-bottom: 30px; margin-bottom: 32px; border-bottom: 1px solid #17191e; }
.sample-head__title { font-size: 2.15rem; font-weight: 600; line-height: 1.2; margin: 14px 0 12px; }
.sample-head__label { color: #b5b5b5; font-size: 1.07rem; }
.sample-text { margin-bottom: 32px; }
.sample-text h2 { font-size: 1.07rem; font-weight: 700; margin-bottom: 10px; }
.sample-text p { max-width: 440px; margin-bottom: 20px; color: #b5b5b5; font-size: 0.97rem; line-height: 1.5; }
.sample-text p:last-child { margin-bottom: 0; }

/* ===========================  PROGRESS  =========================== */
.progress-bar-wrap {
  background: var(--bg-card-hover);
  border-radius: var(--radius-pill);
  height: 6px;
  overflow: hidden;
  margin: 6px 0;
}
.progress-bar {
  background: var(--accent-pink);
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.4s;
}

.reading-progress-bar-wrap {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
  border: 1.5px solid var(--border);
}
.reading-progress-label { margin-bottom: 8px; font-size: 0.9rem; }
.reading-bar { height: 8px; }
.progress-note { color: var(--text-secondary); font-size: 0.82rem; margin-top: 6px; }

.reader-nav { display: flex; justify-content: space-between; }

/* FONT SIZE SELECT */
.font-size-control { margin-bottom: 24px; }
.font-size-control h4 { margin-bottom: 10px; }
.font-size-select {
  width: 100%;
  background: var(--bg-card-hover);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
}

/* CHAPTER LIST */
.chapter-list h4 { margin-bottom: 10px; }
.chapter-item {
  display: block;
  width: 100%;
  background: var(--bg-card-hover);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
  margin-bottom: 8px;
  transition: all 0.18s;
}
.chapter-item:hover { border-color: var(--border); }
.chapter-item.active {
  background: var(--text-primary);
  color: var(--bg-base);
  font-weight: 600;
}

/* ===========================  LIBRARY  =========================== */
.library-card__status {
  display: table;
  margin: -4px 0 6px auto;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: #45484e;
  color: #e7e7e7;
  font-size: 0.87rem;
}
.library-card__chapter { color: #bfc1c5; font-size: 0.85rem; font-weight: 600; }
.library-card__percent { color: #bfc1c5; font-size: 0.85rem; }
.progress {
  height: 9px;
  margin: 6px 0 8px;
  border-radius: var(--radius-pill);
  background: #d9d9d9;
  overflow: hidden;
}
.progress__fill { height: 100%; border-radius: var(--radius-pill); background: var(--accent-pink); }
.section-divider { border: 0; border-top: 1px solid #1c1c1e; margin: 32px 0; }

/* CONTINUE READING (library aside) */
.reading-card { padding: 16px; border-radius: var(--radius-lg); background: var(--bg-card); }
.reading-card__title { font-size: 1.07rem; font-weight: 700; }
.reading-card__author { color: #b6b6b6; font-size: 0.97rem; margin: 6px 0 14px; }
.reading-card__cover {
  display: block;
  width: 180px;
  height: auto;
  aspect-ratio: 2 / 3;
  margin: 0 auto;
  object-fit: cover;
  border-radius: 12px;
  background: var(--bg-sunken);
}
.reading-card__chapter { color: #bfc1c5; font-size: 0.85rem; font-weight: 600; margin-top: 14px; }
.reading-card__percent { color: #bfc1c5; font-size: 0.85rem; }
.reading-card__label { font-size: 1rem; font-weight: 700; margin-top: 18px; }
.reading-card__progress { color: #b6b6b6; font-size: 0.88rem; margin: 4px 0 16px; }
.reading-card .btn { margin-bottom: 0; }

/* ===========================  ORDERS PAGE  =========================== */
.order-list { display: grid; gap: 16px; }
.order-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}
.order-cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: var(--bg-sunken);
}
.order-info { min-width: 0; }
.order-title { font-size: 1.07rem; font-weight: 700; }
.order-author { color: #b6b6b6; font-size: 0.97rem; margin: 6px 0 12px; }
.order-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; color: #bfc1c5; font-size: 0.88rem; }
.order-meta .badge-tag { height: 28px; font-size: 0.87rem; }
.order-actions { display: grid; justify-items: end; gap: 12px; }
.order-total { font-size: 1.07rem; font-weight: 700; white-space: nowrap; }
.order-actions .btn { margin: 0; white-space: nowrap; }
.help-card { padding: 20px; border-radius: var(--radius-lg); background: var(--bg-card); }
.help-card__title { font-size: 1.07rem; font-weight: 700; }
.help-card__text { color: #b6b6b6; font-size: 0.95rem; line-height: 1.5; margin: 8px 0 18px; }
.help-card .btn { margin-bottom: 0; }

/* FILTER GROUP */
.filter-group { margin-bottom: 20px; }
.filter-group h4 { margin-bottom: 10px; color: var(--text-primary); font-size: 0.9rem; }

/* FILTER PANEL (browse) */
.filter-panel .page-heading { margin-bottom: 28px; }
.filter-panel .filter-group { margin: 0; }
.filter-panel .filter-group + .filter-group {
  border-top: 1px solid #1c1c1e;
  margin-top: 24px;
  padding-top: 24px;
}
.filter-group__label { font-size: 1.07rem; font-weight: 600; margin-bottom: 10px; }
.filter-panel .filter-tags { gap: 8px; margin: 0; }
.filter-panel .tag {
  height: 36px;
  padding: 0 16px;
  border: none;
  background: #282c33;
  color: #9ea0a4;
  font-size: 0.97rem;
  font-weight: 500;
}
.filter-panel .tag:hover { color: var(--text-primary); }
.filter-panel .tag.active { background: #f5f5f7; color: #121212; font-weight: 500; }
.btn-apply { height: 50px; margin: 32px 0 0; font-size: 1.07rem; font-weight: 700; }

/* RESULTS HEADER */
.results-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
}
.results-count { font-size: 1.35rem; font-weight: 700; }

/* ===========================  MODAL  =========================== */
.modal::backdrop {
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  width: 340px;
  max-width: calc(100vw - 32px);
  margin: auto;
  color: var(--text-primary);
  text-align: center;
  position: relative;
}
.modal-close {
  position: absolute; top: 14px; right: 16px;
  background: var(--bg-card-hover);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: all 0.18s;
}
.modal-close:hover { color: var(--text-primary); }
.modal-icon {
  width: 60px; height: 60px;
  background: var(--accent-pink);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  margin: 0 auto 18px;
}
.modal h3 { font-size: 1.2rem; margin-bottom: 10px; }
.modal p  { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; margin-bottom: 18px; }
.order-number {
  background: var(--bg-card-hover);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  font-size: 0.9rem;
  margin-bottom: 18px;
  color: var(--text-secondary);
}

/* ===========================  TOAST  =========================== */
.toast {
  position: fixed;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  background: #23273a;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 12px 28px;
  font-size: 0.9rem;
  z-index: 300;
  pointer-events: none;
  transition: opacity 0.3s;
}
.toast[hidden] { display: none; }

/* ===========================  LINKS AS CARDS AND BUTTONS  =========================== */
.back-btn, .book-card, .library-card { color: var(--text-primary); text-decoration: none; }
.book-card, .library-card { display: block; }
.link-button { background: none; border: none; padding: 0; font-family: inherit; cursor: pointer; }

/* ===========================  PAGE TEXT  =========================== */
.sidebar__text { color: var(--text-secondary); font-size: 0.9rem; }
.sidebar__action { margin-top: 16px; }
.empty-state { color: var(--text-secondary); font-size: 0.9rem; padding: 24px 0; }

/* ===========================  ERROR / NOT FOUND  =========================== */
.error-page { max-width: 480px; margin: 48px auto; text-align: center; }
.error-page__code { font-size: 3rem; font-weight: 900; color: var(--accent-pink); }
.error-page__title { font-size: 1.4rem; margin: 8px 0; }
.error-page__text { color: var(--text-secondary); margin-bottom: 24px; }

/* ===========================  FOOTER  =========================== */
.site-footer { border-top: 1px solid var(--border); padding: 20px 48px; }
.site-footer__inner {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
  max-width: 1100px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.site-footer__links { display: flex; gap: 16px; }
.site-footer__links a { color: var(--text-secondary); text-decoration: none; }
.site-footer__links a:hover { color: var(--text-primary); }


/* ===========================  ACCOUNT MENU (the shop's)  =========================== */
.account-menu {
  position: relative;
}

.account-menu__button:hover,
.account-menu__button[aria-expanded="true"] {
  border-color: var(--text-primary);
}

.account-menu__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-menu__list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  display: grid;
  gap: 2px;
  min-width: 200px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.account-menu__name {
  margin: 4px 10px 8px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.account-menu__icon {
  flex-shrink: 0;
  color: var(--text-secondary);
}

.account-menu__item--logout .account-menu__icon {
  color: inherit;
}

.account-menu__item:hover,
.account-menu__item:focus-visible {
  background: var(--bg-sunken);
  outline: none;
}

.account-menu__item--logout {
  margin-top: 6px;
  background: #e74340;
  color: #ffffff;
  font-weight: 600;
}

.account-menu__item--logout:hover,
.account-menu__item--logout:focus-visible {
  background: #c9302d;
}

/* ===========================  LOGIN AND HANDOFF (the shop's)  =========================== */
  text-align: center;
}

.wallet-balance-card__btn {
  display: block;
  margin-top: 16px;
  padding: 14px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #9d4382 0%, #d987bb 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.star-icon {
  color: #9d4382;
}

/* Login: web's two-panel auth layout in the shop's colours */
.auth-page {
  flex: 1;
  padding: 22px;
  background: radial-gradient(circle at top left, rgba(216, 54, 142, 0.14), transparent 28%), var(--bg-base);
}

.auth-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  max-width: 1320px;
  margin: 0 auto 22px;
}

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

.auth-topbar__text {
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-topbar__signup {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.auth-topbar__signup:hover {
  border-color: var(--accent-pink);
}

.auth-layout {
  display: grid;
  grid-template-columns: 1.05fr minmax(420px, 0.85fr);
  gap: 28px;
  max-width: 1320px;
  margin: 0 auto;
}

.auth-showcase,
.auth-card {
  border-radius: var(--radius-xl);
}

.auth-showcase {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  background: linear-gradient(135deg, #eb50ae 0%, #e98fd6 55%, #b97bf2 100%);
}

.auth-showcase__eyebrow,
.auth-card__eyebrow {
  margin: 0 0 12px;
  font-size: 12.8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-showcase h1 {
  max-width: 12ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(38px, 4vw, 70px);
  font-weight: 700;
  line-height: 1.05;
}

.auth-showcase__copy {
  max-width: 44ch;
  margin: 18px 0 0;
  font-size: 16px;
  line-height: 1.7;
}

.auth-card {
  padding: 34px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.auth-card__eyebrow {
  color: var(--text-muted);
}

.auth-card__header {
  margin-bottom: 24px;
}

.auth-card__header h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.05;
}

.auth-card__header p:last-child {
  margin: 12px 0 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.auth-back {
  margin-bottom: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: #f05aac;
  font-size: 14px;
  font-weight: 600;
}

.auth-options {
  display: grid;
  gap: 12px;
}

.auth-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
}

.auth-option svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.auth-option--email {
  background: var(--accent-pink);
  color: #ffffff;
}

.auth-option--email:hover {
  background: var(--accent-pink-hover);
}

.auth-option--google {
  background: #ffffff;
  color: #1f1f1f;
}

.auth-option--google:hover {
  background: #e3e6ec;
}

.auth-option--kingschat {
  background: #2f6fed;
  color: #ffffff;
}

.auth-option--kingschat:hover {
  background: #2a63d4;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field > span:first-child {
  font-size: 15px;
  font-weight: 600;
}

.auth-field input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-sunken);
  outline: 0;
}

.auth-field input:focus {
  border-color: var(--text-muted);
}

.auth-field input[aria-invalid="true"] {
  border-color: #e74340;
}

.auth-password {
  position: relative;
  display: block;
}

.auth-password input {
  padding-right: 48px;
}

.auth-password__toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  transform: translateY(-50%);
}

.auth-password__toggle[aria-pressed="true"] {
  color: #f05aac;
}

.auth-form__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  font-size: 14px;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.auth-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent-pink);
}

.auth-link {
  color: #f05aac;
  font-weight: 600;
}

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

.auth-submit {
  min-height: 48px;
  font-size: 15px;
}

.auth-message {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(231, 67, 64, 0.14);
  color: #ff9d9b;
  font-size: 14px;
  line-height: 1.5;
}

.auth-footnote {
  margin: 20px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

/* 404 */
.auth-page a, .account-menu a { text-decoration: none; }
.auth-topbar__signup, .account-menu__item { color: var(--text-primary); }
.auth-option--yolly { border: 1px solid var(--border); background: var(--bg-sunken); color: var(--text-primary); text-decoration: none; }
.auth-option--yolly:hover { border-color: var(--accent-pink); }
.auth-option--yolly img { width: 22px; height: 22px; border-radius: 6px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-muted); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
@media (max-width: 980px) {
  .auth-layout { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
}
@media (max-width: 860px) {
  .auth-page { padding: 16px; }
  .auth-showcase { display: none; }
  .auth-card { padding: 24px 20px; border-radius: var(--radius-lg); }
  .auth-card__header h2 { font-size: 26px; }
}

/* ===========================  RESPONSIVE  =========================== */
@media (max-width: 1100px) {
  .book-grid--four { grid-template-columns: repeat(3, 1fr); }
  .search { margin-left: 16px; }
  .wide-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; }
  .interest-tags--home { gap: 8px; }
  .interest-tags--home .tag { font-size: 0.9rem; padding: 0 8px; }
  .hero-banner { padding: 32px 40px 32px 140px; }
  .hero-text h2 { font-size: 2.3rem; }
}
@media (max-width: 1000px) {
  .site-header__inner { flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; margin-left: 0; }
}
@media (max-width: 820px) {
  .shelf__track { gap: 12px; }
  .shelf__track .book-card { flex-basis: 150px; padding: 12px; }
  .shelf__arrows { display: none; }
  .editors-card { grid-template-columns: 1fr; gap: 24px; padding: 20px; }
  .editors-card__cover-link { width: 180px; margin: 0 auto; }
  .editors-card__title { font-size: 1.6rem; }
  .site-header__inner { gap: 16px; padding: 18px 16px; }
  .page-layout { grid-template-columns: 1fr; }
  .page--wide { padding: 20px 16px 48px; }
  .wide-layout { grid-template-columns: 1fr; gap: 36px; }
  .sidebar { order: -1; }
  .page { padding: 16px; }
  .site-footer { padding: 16px; }
  .book-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-banner { min-height: 170px; padding: 24px 20px 24px 104px; border-radius: var(--radius-lg); }
  .hero-text h2 { font-size: 1.75rem; }
  .hero-text p { font-size: 0.92rem; }
}
@media (max-width: 720px) {
  .site-header__inner { gap: 16px 8px; }
  .header-actions { gap: 6px; }
  .pill-link { width: 36px; height: 36px; padding: 0; justify-content: center; }
  .pill-link__label { display: none; }
  .pill-link__icon--compact { display: block; }
  .account-menu__button { width: 36px; height: 36px; }
}
@media (max-width: 600px) {
  .order-item { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; }
  .order-actions { grid-column: 1 / -1; grid-template-columns: 1fr auto; align-items: center; justify-items: stretch; }
  .order-total { justify-self: start; }
  .book-hero { flex-direction: column; gap: 20px; }
  .book-hero__cover { width: 180px; }
  .book-hero__title { font-size: 1.7rem; }
}
@media (max-width: 480px) {
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .brand__name { font-size: 22px; }
}

