/* Reference-led home card for Series Tracker. Deliberately isolated from journey cards. */
.app-shell.home-app-mode .series-tracker-home-panel {
  --series-card-a: #f3e4c8;
  --series-card-b: #dce5d5;
  --series-card-c: #f6ead6;
  --series-card-border: #a47a36;
  --series-card-inner: rgba(116, 83, 33, 0.42);
  --series-card-title: #4b2e17;
  --series-card-copy: #68543d;
  --series-card-status: #6d5018;
  --series-medal-outer: #9a6b25;
  --series-medal-mid: #e2aa47;
  --series-medal-light: #ffe5a0;
  --series-medal-ink: #43250c;
  --series-plaque-a: #f0d58f;
  --series-plaque-b: #c89542;
  --series-plaque-ink: #34200d;
  --series-arrow: #a7792a;
  position: relative;
  isolation: isolate;
  padding: 0;
  overflow: hidden;
  color: var(--series-card-title);
  background:
    radial-gradient(circle at 11% 52%, color-mix(in srgb, var(--series-medal-mid) 24%, transparent), transparent 18%),
    radial-gradient(circle at 72% 45%, color-mix(in srgb, var(--series-card-b) 60%, transparent), transparent 26%),
    linear-gradient(92deg, var(--series-card-a), var(--series-card-b) 50%, var(--series-card-c));
  border: 2px solid var(--series-card-border);
  border-radius: 20px;
  box-shadow:
    inset 0 0 0 3px color-mix(in srgb, var(--series-card-a) 66%, #111),
    inset 0 0 0 5px var(--series-card-inner),
    0 18px 38px rgba(0, 0, 0, 0.24);
}

.app-shell.home-app-mode[data-theme="dark"] .series-tracker-home-panel,
.app-shell.home-app-mode[data-theme="midnightLibrary"] .series-tracker-home-panel {
  --series-card-a: #17150e;
  --series-card-b: #071b18;
  --series-card-c: #071018;
  --series-card-border: #7d7042;
  --series-card-inner: rgba(188, 148, 62, 0.42);
  --series-card-title: #fff0c8;
  --series-card-copy: #d9ccaa;
  --series-card-status: #d4a73f;
  --series-medal-outer: #39220e;
  --series-medal-mid: #d7a13c;
  --series-medal-light: #ffe39a;
  --series-medal-ink: #2a1808;
  --series-plaque-a: #e8c16e;
  --series-plaque-b: #a66b25;
  --series-plaque-ink: #281708;
  --series-arrow: #d59f36;
}

.app-shell.home-app-mode[data-theme="warmWalnut"] .series-tracker-home-panel {
  --series-card-a: #30170b;
  --series-card-b: #1c0d07;
  --series-card-c: #120806;
  --series-card-border: #b87535;
  --series-card-inner: rgba(239, 189, 117, 0.36);
  --series-card-title: #fff0d4;
  --series-card-copy: #e7c69e;
  --series-card-status: #efbd75;
  --series-medal-outer: #51250d;
  --series-medal-mid: #cb7831;
  --series-medal-light: #ffd38b;
  --series-medal-ink: #321507;
  --series-plaque-a: #e8b965;
  --series-plaque-b: #a85c28;
  --series-plaque-ink: #301307;
  --series-arrow: #efbd75;
}

.app-shell.home-app-mode[data-theme="emeraldStudy"] .series-tracker-home-panel {
  --series-card-a: #13241a;
  --series-card-b: #071a13;
  --series-card-c: #07110d;
  --series-card-border: #8b8b4b;
  --series-card-inner: rgba(216, 189, 117, 0.34);
  --series-card-title: #f6efd2;
  --series-card-copy: #cbd7b9;
  --series-card-status: #d8bd75;
  --series-medal-outer: #243c22;
  --series-medal-mid: #b99442;
  --series-medal-light: #f1d98a;
  --series-medal-ink: #172413;
  --series-plaque-a: #d7c173;
  --series-plaque-b: #87934a;
  --series-plaque-ink: #1c2814;
  --series-arrow: #d8bd75;
}

.app-shell.home-app-mode .series-tracker-home-panel::before {
  content: none;
}

.app-shell.home-app-mode .series-tracker-home-panel::after {
  position: absolute;
  inset: 8px;
  z-index: 2;
  content: "";
  pointer-events: none;
  border: 1px solid var(--series-card-inner);
  border-radius: 13px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.24);
}

.app-shell.home-app-mode .series-tracker-home-button {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-areas: "icon copy stats arrow";
  grid-template-columns: clamp(112px, 10vw, 154px) minmax(320px, 1fr) minmax(300px, 430px) 48px;
  align-items: center;
  gap: clamp(22px, 2.4vw, 42px);
  width: 100%;
  min-height: clamp(230px, 18vw, 292px);
  padding: clamp(28px, 3vw, 46px);
  color: var(--series-card-title);
  background: transparent;
  border: 0;
  text-align: left;
}

.app-shell.home-app-mode .series-tracker-home-button:hover {
  background: linear-gradient(90deg, color-mix(in srgb, var(--series-medal-mid) 8%, transparent), transparent 48%, color-mix(in srgb, var(--series-medal-mid) 5%, transparent));
}

.app-shell.home-app-mode .series-tracker-home-button:focus-visible {
  background: linear-gradient(90deg, color-mix(in srgb, var(--series-medal-mid) 10%, transparent), transparent 48%, color-mix(in srgb, var(--series-medal-mid) 7%, transparent));
  outline: 3px solid var(--series-arrow);
  outline-offset: -10px;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--series-card-a) 78%, transparent);
}

.app-shell.home-app-mode .series-tracker-home-button:focus:not(:focus-visible) {
  outline: none;
}

.app-shell.home-app-mode .series-tracker-home-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: clamp(104px, 9vw, 144px);
  height: clamp(104px, 9vw, 144px);
  color: var(--series-medal-ink);
  background: radial-gradient(circle at 48% 40%, var(--series-medal-light) 0 13%, var(--series-medal-mid) 38%, color-mix(in srgb, var(--series-medal-mid) 60%, #4d260c) 70%, var(--series-medal-outer) 74% 100%);
  border: 4px solid var(--series-medal-mid);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 5px var(--series-medal-outer),
    inset 0 0 0 8px var(--series-medal-light),
    inset 0 0 22px color-mix(in srgb, var(--series-medal-light) 68%, transparent),
    0 0 0 4px var(--series-medal-outer),
    0 0 0 7px color-mix(in srgb, var(--series-medal-mid) 72%, #5f4318),
    0 12px 28px rgba(0, 0, 0, 0.45);
}

.app-shell.home-app-mode .series-tracker-home-icon svg {
  width: clamp(46px, 4.4vw, 66px);
  height: clamp(46px, 4.4vw, 66px);
  stroke-width: 2.4;
  filter: drop-shadow(0 2px 0 color-mix(in srgb, var(--series-medal-light) 58%, transparent));
}

.app-shell.home-app-mode .series-tracker-home-copy {
  grid-area: copy;
  display: grid;
  gap: 0;
  min-width: 0;
}

.app-shell.home-app-mode .series-tracker-home-copy > strong {
  color: var(--series-card-title);
  font-family: var(--display-font);
  font-size: clamp(2.25rem, 4vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 0.96;
  text-shadow: 0 3px 4px rgba(0, 0, 0, 0.35);
}

.app-shell.home-app-mode .series-tracker-home-copy > strong::after {
  display: block;
  max-width: 720px;
  margin-top: clamp(12px, 1.4vw, 20px);
  content: "Track missing books, ready-to-read entries, and completed series.";
  color: var(--series-card-copy);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(0.9rem, 1.5vw, 1.34rem);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.38;
}

.app-shell.home-app-mode .series-tracker-home-copy > small {
  margin-top: clamp(15px, 1.7vw, 24px);
  color: var(--series-card-status);
  font-size: clamp(0.84rem, 1.35vw, 1.18rem);
  font-weight: 900;
  line-height: 1.25;
}

.app-shell.home-app-mode .series-tracker-home-copy > small::before,
.app-shell.home-app-mode .series-tracker-home-copy > small::after {
  content: none;
  padding: 0;
}

.app-shell.home-app-mode .series-tracker-home-stats {
  grid-area: stats;
  display: grid;
  grid-template-columns: repeat(2, minmax(128px, 1fr));
  gap: clamp(12px, 1.4vw, 20px);
}

.app-shell.home-app-mode .series-tracker-home-stats > span {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  min-height: clamp(132px, 12vw, 178px);
  padding: 20px 15px;
  color: var(--series-plaque-ink);
  background: radial-gradient(circle at 48% 22%, rgba(255, 244, 191, 0.64), transparent 34%), linear-gradient(145deg, var(--series-plaque-a), var(--series-plaque-b));
  border: 3px solid color-mix(in srgb, var(--series-plaque-ink) 82%, transparent);
  clip-path: polygon(11% 0, 89% 0, 100% 11%, 100% 89%, 89% 100%, 11% 100%, 0 89%, 0 11%);
  filter: drop-shadow(0 9px 8px rgba(0, 0, 0, 0.42));
  text-align: center;
}

.app-shell.home-app-mode .series-tracker-home-stats > span::before {
  position: absolute;
  inset: 8px;
  content: "";
  pointer-events: none;
  border: 2px solid color-mix(in srgb, var(--series-plaque-ink) 64%, transparent);
  clip-path: inherit;
}

.app-shell.home-app-mode .series-tracker-home-stats strong {
  position: relative;
  z-index: 1;
  color: var(--series-plaque-ink);
  font-family: var(--display-font);
  font-size: clamp(2.15rem, 3.6vw, 3.8rem);
  line-height: 0.92;
}

.app-shell.home-app-mode .series-tracker-home-stats small {
  position: relative;
  z-index: 1;
  width: 78%;
  margin-top: 12px;
  padding-top: 12px;
  color: var(--series-plaque-ink);
  border-top: 1px solid color-mix(in srgb, var(--series-plaque-ink) 66%, transparent);
  font-family: var(--display-font);
  font-size: clamp(0.72rem, 1vw, 1rem);
  font-weight: 900;
  letter-spacing: 0.03em;
  text-align: center;
  text-transform: uppercase;
}

.app-shell.home-app-mode .series-tracker-home-button > svg:last-child {
  grid-area: arrow;
  width: clamp(30px, 3vw, 46px);
  height: clamp(30px, 3vw, 46px);
  color: var(--series-arrow);
  stroke-width: 2.7;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.5));
}

@media (max-width: 1040px) {
  .app-shell.home-app-mode .series-tracker-home-button {
    grid-template-areas: "icon copy arrow" "stats stats stats";
    grid-template-columns: 110px minmax(0, 1fr) 38px;
    min-height: 0;
  }
  .app-shell.home-app-mode .series-tracker-home-stats {
    width: min(100%, 520px);
    justify-self: center;
  }
}

@media (max-width: 620px) {
  .app-shell.home-app-mode .series-tracker-home-button {
    grid-template-areas: "icon arrow" "copy copy" "stats stats";
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 18px;
    padding: 24px 20px;
  }
  .app-shell.home-app-mode .series-tracker-home-icon { width: 82px; height: 82px; }
  .app-shell.home-app-mode .series-tracker-home-icon svg { width: 38px; height: 38px; }
  .app-shell.home-app-mode .series-tracker-home-copy > strong { font-size: clamp(2rem, 12vw, 3rem); }
  .app-shell.home-app-mode .series-tracker-home-copy > strong::after { font-size: 0.88rem; }
  .app-shell.home-app-mode .series-tracker-home-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .app-shell.home-app-mode .series-tracker-home-stats > span { min-height: 118px; padding-inline: 8px; }
}

@media (max-width: 390px) {
  .app-shell.home-app-mode .series-tracker-home-stats { grid-template-columns: minmax(0, 1fr); }
}

/* Compact home treatment: retain the reference design without dominating the page. */
.app-shell.home-app-mode .series-tracker-home-button {
  grid-template-areas: "icon copy stats arrow";
  grid-template-columns: 60px minmax(230px, 1fr) minmax(210px, 300px) 24px;
  gap: clamp(12px, 1.25vw, 20px);
  min-height: 96px;
  padding: 11px 18px;
}

.app-shell.home-app-mode .series-tracker-home-icon {
  width: 56px;
  height: 56px;
  border-width: 2px;
  box-shadow:
    inset 0 0 0 3px var(--series-medal-outer),
    inset 0 0 0 5px var(--series-medal-light),
    inset 0 0 10px color-mix(in srgb, var(--series-medal-light) 68%, transparent),
    0 0 0 2px var(--series-medal-outer),
    0 0 0 3px color-mix(in srgb, var(--series-medal-mid) 72%, #5f4318),
    0 5px 10px rgba(0, 0, 0, 0.38);
}

.app-shell.home-app-mode .series-tracker-home-icon svg {
  width: 27px;
  height: 27px;
}

.app-shell.home-app-mode .series-tracker-home-copy > strong {
  font-size: clamp(1.3rem, 1.75vw, 1.75rem);
  line-height: 1;
}

.app-shell.home-app-mode .series-tracker-home-copy > strong::after {
  max-width: 620px;
  margin-top: 4px;
  font-size: clamp(0.75rem, 0.82vw, 0.82rem);
  line-height: 1.2;
}

.app-shell.home-app-mode .series-tracker-home-copy > small {
  margin-top: 5px;
  font-size: clamp(0.72rem, 0.76vw, 0.78rem);
}

.app-shell.home-app-mode .series-tracker-home-copy > small::before,
.app-shell.home-app-mode .series-tracker-home-copy > small::after {
  padding: 0;
}

.app-shell.home-app-mode .series-tracker-home-stats {
  grid-template-columns: repeat(2, minmax(96px, 1fr));
  gap: 8px;
}

.app-shell.home-app-mode .series-tracker-home-stats > span {
  min-height: 68px;
  padding: 7px 8px;
  border-width: 2px;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.34));
}

.app-shell.home-app-mode .series-tracker-home-stats > span::before {
  inset: 4px;
  border-width: 1px;
}

.app-shell.home-app-mode .series-tracker-home-stats strong {
  font-size: clamp(1.3rem, 1.75vw, 1.7rem);
}

.app-shell.home-app-mode .series-tracker-home-stats small {
  width: 72%;
  margin-top: 4px;
  padding-top: 4px;
  font-size: clamp(0.68rem, 0.7vw, 0.72rem);
}

.app-shell.home-app-mode .series-tracker-home-button > svg:last-child {
  width: 22px;
  height: 22px;
}

@media (max-width: 760px) {
  .app-shell.home-app-mode .series-tracker-home-button {
    grid-template-areas: "icon copy arrow" "stats stats stats";
    grid-template-columns: 58px minmax(0, 1fr) 24px;
    min-height: 0;
    padding: 14px 16px;
  }

  .app-shell.home-app-mode .series-tracker-home-stats {
    width: min(100%, 360px);
    justify-self: center;
  }
}

@media (max-width: 520px) {
  .app-shell.home-app-mode .series-tracker-home-button {
    grid-template-areas: "icon copy arrow" "stats stats stats";
    grid-template-columns: 52px minmax(0, 1fr) 20px;
    gap: 11px;
    padding: 13px 12px;
  }

  .app-shell.home-app-mode .series-tracker-home-icon {
    width: 48px;
    height: 48px;
  }

  .app-shell.home-app-mode .series-tracker-home-icon svg {
    width: 23px;
    height: 23px;
  }

  .app-shell.home-app-mode .series-tracker-home-copy > strong {
    font-size: clamp(1.2rem, 6.4vw, 1.55rem);
  }

  .app-shell.home-app-mode .series-tracker-home-copy > strong::after {
    font-size: 0.75rem;
  }

  .app-shell.home-app-mode .series-tracker-home-copy > small {
    font-size: 0.72rem;
  }

  .app-shell.home-app-mode .series-tracker-home-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell.home-app-mode .series-tracker-home-stats > span {
    min-height: 62px;
  }

  .app-shell.home-app-mode .series-tracker-home-stats small {
    font-size: 0.68rem;
  }
}

/* Tighter framing around the existing text and artwork; typography stays unchanged. */
.app-shell.home-app-mode .series-tracker-home-panel {
  container-type: inline-size;
}

.app-shell.home-app-mode .series-tracker-home-button {
  grid-template-areas: "icon copy stats arrow";
  grid-template-columns: clamp(112px, 10cqi, 154px) minmax(320px, 1fr) minmax(300px, 430px) 48px;
  gap: clamp(22px, 2.4cqi, 42px);
  min-height: 228px;
  padding: clamp(18px, 2cqi, 28px);
}

.app-shell.home-app-mode .series-tracker-home-icon {
  width: clamp(104px, 9cqi, 144px);
  height: clamp(104px, 9cqi, 144px);
  border-width: 4px;
  box-shadow:
    inset 0 0 0 5px var(--series-medal-outer),
    inset 0 0 0 8px var(--series-medal-light),
    inset 0 0 22px color-mix(in srgb, var(--series-medal-light) 68%, transparent),
    0 0 0 4px var(--series-medal-outer),
    0 0 0 7px color-mix(in srgb, var(--series-medal-mid) 72%, #5f4318),
    0 12px 28px rgba(0, 0, 0, 0.45);
}

.app-shell.home-app-mode .series-tracker-home-icon svg {
  width: clamp(46px, 4.4cqi, 66px);
  height: clamp(46px, 4.4cqi, 66px);
}

.app-shell.home-app-mode .series-tracker-home-copy > strong {
  font-size: clamp(2.25rem, 4cqi, 4rem);
  line-height: 0.96;
}

.app-shell.home-app-mode .series-tracker-home-copy > strong::after {
  max-width: 720px;
  margin-top: clamp(12px, 1.4cqi, 20px);
  font-size: clamp(0.9rem, 1.5cqi, 1.34rem);
  line-height: 1.38;
}

.app-shell.home-app-mode .series-tracker-home-copy > small {
  margin-top: clamp(15px, 1.7cqi, 24px);
  font-size: clamp(0.84rem, 1.35cqi, 1.18rem);
}

.app-shell.home-app-mode .series-tracker-home-stats {
  grid-template-columns: repeat(2, minmax(128px, 1fr));
  gap: clamp(12px, 1.4cqi, 20px);
}

.app-shell.home-app-mode .series-tracker-home-stats > span {
  min-height: clamp(132px, 12cqi, 178px);
  padding: 20px 15px;
  border-width: 3px;
  filter: drop-shadow(0 9px 8px rgba(0, 0, 0, 0.42));
}

.app-shell.home-app-mode .series-tracker-home-stats > span::before {
  inset: 8px;
  border-width: 2px;
}

.app-shell.home-app-mode .series-tracker-home-stats strong {
  font-size: clamp(2.15rem, 3.6cqi, 3.8rem);
}

.app-shell.home-app-mode .series-tracker-home-stats small {
  width: 78%;
  margin-top: 12px;
  padding-top: 12px;
  font-size: clamp(0.72rem, 1cqi, 1rem);
}

.app-shell.home-app-mode .series-tracker-home-button > svg:last-child {
  width: clamp(30px, 3cqi, 46px);
  height: clamp(30px, 3cqi, 46px);
}

@media (max-width: 1040px) {
  .app-shell.home-app-mode .series-tracker-home-button {
    grid-template-areas: "icon copy arrow" "stats stats stats";
    grid-template-columns: 86px minmax(0, 1fr) 30px;
    gap: 10px;
    padding: 12px 18px;
  }

  .app-shell.home-app-mode .series-tracker-home-icon {
    width: 82px;
    height: 82px;
  }

  .app-shell.home-app-mode .series-tracker-home-icon svg {
    width: 38px;
    height: 38px;
  }

  .app-shell.home-app-mode .series-tracker-home-copy > strong {
    font-size: clamp(2rem, 6vw, 3rem);
  }

  .app-shell.home-app-mode .series-tracker-home-copy > strong::after {
    margin-top: 5px;
    font-size: 0.88rem;
  }

  .app-shell.home-app-mode .series-tracker-home-copy > small {
    margin-top: 6px;
    font-size: 0.82rem;
  }

  .app-shell.home-app-mode .series-tracker-home-stats {
    width: min(100%, 520px);
    justify-self: center;
  }

  .app-shell.home-app-mode .series-tracker-home-stats > span {
    min-height: 96px;
    padding: 9px 10px;
  }

  .app-shell.home-app-mode .series-tracker-home-stats strong {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
  }

  .app-shell.home-app-mode .series-tracker-home-stats small {
    margin-top: 5px;
    padding-top: 5px;
    font-size: 0.7rem;
  }
}

@media (max-width: 620px) {
  .app-shell.home-app-mode .series-tracker-home-button {
    grid-template-areas: "icon copy arrow" "stats stats stats";
    grid-template-columns: 66px minmax(0, 1fr) 24px;
    gap: 8px;
    padding: 10px 12px;
  }

  .app-shell.home-app-mode .series-tracker-home-icon {
    width: 62px;
    height: 62px;
  }

  .app-shell.home-app-mode .series-tracker-home-icon svg {
    width: 29px;
    height: 29px;
  }

  .app-shell.home-app-mode .series-tracker-home-copy > strong {
    font-size: clamp(1.55rem, 8vw, 2.15rem);
  }

  .app-shell.home-app-mode .series-tracker-home-copy > strong::after {
    margin-top: 4px;
    font-size: 0.78rem;
  }

  .app-shell.home-app-mode .series-tracker-home-copy > small {
    margin-top: 5px;
    font-size: 0.75rem;
  }

  .app-shell.home-app-mode .series-tracker-home-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .app-shell.home-app-mode .series-tracker-home-stats > span {
    min-height: 88px;
    padding-inline: 8px;
  }

  .app-shell.home-app-mode .series-tracker-home-stats small {
    margin-top: 4px;
    padding-top: 4px;
    font-size: 0.7rem;
  }
}

@media (max-width: 390px) {
  .app-shell.home-app-mode .series-tracker-home-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container (max-width: 720px) {
  .app-shell.home-app-mode .series-tracker-home-button {
    min-height: 245px;
  }
}

@container (max-width: 440px) {
  .app-shell.home-app-mode .series-tracker-home-button {
    min-height: 275px;
  }
}

/* The Series Tracker has its own permanent artwork. */
.app-shell.home-app-mode .series-tracker-home-icon {
  aspect-ratio: 1086 / 1448;
  height: clamp(132px, 12cqi, 184px);
  width: auto;
  border: 0;
  border-radius: 0;
  background: url("./series-tracker-emblem.png") center / contain no-repeat;
  box-shadow: none;
  overflow: visible;
}

.app-shell.home-app-mode .series-tracker-home-icon svg {
  display: none;
}

@media (max-width: 1040px) {
  .app-shell.home-app-mode .series-tracker-home-icon {
    height: 104px;
    width: auto;
  }
}

@media (max-width: 620px) {
  .app-shell.home-app-mode .series-tracker-home-icon {
    height: 80px;
    width: auto;
  }
}

/* Reference card refresh: calm paper surface, illustrated lead-in and paired counters. */
.app-shell.home-app-mode .series-tracker-home-panel {
  --series-surface: #fbf3e7;
  --series-surface-soft: #f7ecdd;
  --series-line: #d8c3a4;
  --series-icon-line: #bca17b;
  --series-card-title: #542c18;
  --series-card-copy: #6e5a47;
  --series-card-status: #55301d;
  --series-arrow: #49389b;
  container-type: inline-size;
  background:
    radial-gradient(circle at 14% 22%, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(140deg, var(--series-surface), var(--series-surface-soft));
  border: 2px solid var(--series-line);
  border-radius: 30px;
  box-shadow: 0 14px 34px rgba(93, 59, 29, 0.12);
}

.app-shell.home-app-mode[data-theme="dark"] .series-tracker-home-panel,
.app-shell.home-app-mode[data-theme="midnightLibrary"] .series-tracker-home-panel {
  --series-surface: #151817;
  --series-surface-soft: #0d1515;
  --series-line: #746950;
  --series-icon-line: #b9a781;
  --series-card-title: #f6e7c4;
  --series-card-copy: #c9bea9;
  --series-card-status: #e1c38a;
  --series-arrow: #a89aed;
}

.app-shell.home-app-mode[data-theme="warmWalnut"] .series-tracker-home-panel {
  --series-surface: #2b160e;
  --series-surface-soft: #1a0e0a;
  --series-line: #9b6947;
  --series-icon-line: #d2ac78;
  --series-card-title: #f9e7ca;
  --series-card-copy: #d9bea0;
  --series-card-status: #e9bc7e;
  --series-arrow: #d7a870;
}

.app-shell.home-app-mode[data-theme="emeraldStudy"] .series-tracker-home-panel {
  --series-surface: #15241c;
  --series-surface-soft: #0d1812;
  --series-line: #788267;
  --series-icon-line: #b9ad82;
  --series-card-title: #f2e9cf;
  --series-card-copy: #c8d0bc;
  --series-card-status: #d8bd75;
  --series-arrow: #b2a5ec;
}

.app-shell.home-app-mode .series-tracker-home-panel::before {
  position: absolute;
  right: 0;
  bottom: -28px;
  z-index: 0;
  width: clamp(118px, 15cqi, 190px);
  aspect-ratio: 1;
  content: "";
  background: url("./reading-calendar-decor/corner-sprig.png") center / contain no-repeat;
  opacity: 0.13;
  filter: sepia(0.35);
  pointer-events: none;
}

.app-shell.home-app-mode .series-tracker-home-panel::after {
  inset: 10px;
  z-index: 3;
  border: 1px solid color-mix(in srgb, var(--series-line) 78%, transparent);
  border-radius: 21px;
  box-shadow: none;
}

.app-shell.home-app-mode .series-tracker-home-button {
  z-index: 1;
  grid-template-areas:
    "icon copy arrow"
    "stats stats stats";
  grid-template-columns: clamp(120px, 15cqi, 176px) minmax(0, 1fr) 48px;
  gap: clamp(18px, 2.4cqi, 34px) clamp(22px, 3cqi, 44px);
  min-height: 370px;
  padding: clamp(34px, 4cqi, 54px);
}

.app-shell.home-app-mode .series-tracker-home-button:hover,
.app-shell.home-app-mode .series-tracker-home-button:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}

.app-shell.home-app-mode .series-tracker-home-icon {
  width: 100%;
  height: auto;
  aspect-ratio: 220 / 190;
  background: url("./series-tracker-books.svg") center / contain no-repeat;
}

.app-shell.home-app-mode .series-tracker-home-copy > strong {
  font-size: clamp(2.7rem, 5.2cqi, 5.1rem);
  line-height: 0.98;
  text-shadow: none;
}

.app-shell.home-app-mode .series-tracker-home-copy > strong::after {
  max-width: 760px;
  margin-top: clamp(10px, 1.2cqi, 18px);
  font-size: clamp(1.05rem, 1.8cqi, 1.7rem);
  font-weight: 500;
  line-height: 1.35;
}

.app-shell.home-app-mode .series-tracker-home-copy > small {
  margin-top: clamp(10px, 1.3cqi, 18px);
  font-size: clamp(0.95rem, 1.55cqi, 1.35rem);
  letter-spacing: 0.01em;
}

.app-shell.home-app-mode .series-tracker-home-stats {
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2.3cqi, 28px);
}

.app-shell.home-app-mode .series-tracker-home-stats > span {
  display: grid;
  grid-template-columns: clamp(72px, 9cqi, 112px) minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  column-gap: clamp(14px, 2cqi, 28px);
  min-height: clamp(112px, 14cqi, 162px);
  padding: clamp(18px, 2.2cqi, 28px);
  color: var(--series-card-title);
  background: color-mix(in srgb, var(--series-surface) 86%, transparent);
  border: 2px solid var(--series-line);
  border-radius: 24px;
  clip-path: none;
  filter: none;
  text-align: left;
}

.app-shell.home-app-mode .series-tracker-home-stats > span::before {
  position: static;
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: stretch;
  width: 100%;
  min-height: 72px;
  border: 0;
  border-right: 2px solid color-mix(in srgb, var(--series-line) 64%, transparent);
  clip-path: none;
  background-position: left center;
  background-repeat: no-repeat;
  mix-blend-mode: multiply;
  background-size: calc(100% - 20px) auto;
}

.app-shell.home-app-mode .series-tracker-home-stats > span:first-child::before {
  background-image: url("./series-tracker-stack.svg");
}

.app-shell.home-app-mode .series-tracker-home-stats > span:last-child::before {
  background-image: url("./series-tracker-open-book.svg");
}

.app-shell.home-app-mode .series-tracker-home-stats strong {
  align-self: end;
  grid-column: 2;
  grid-row: 1;
  color: var(--series-card-title);
  font-size: clamp(2.4rem, 5cqi, 4.7rem);
  line-height: 0.92;
}

.app-shell.home-app-mode .series-tracker-home-stats small {
  grid-column: 2;
  grid-row: 2;
  width: auto;
  margin-top: 8px;
  padding: 0;
  color: var(--series-card-title);
  border: 0;
  font-size: clamp(0.72rem, 1.2cqi, 1.05rem);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.app-shell.home-app-mode .series-tracker-home-button > svg:last-child {
  color: var(--series-arrow);
  width: clamp(30px, 4cqi, 48px);
  height: clamp(30px, 4cqi, 48px);
  stroke-width: 3.25;
}

@container (max-width: 760px) {
  .app-shell.home-app-mode .series-tracker-home-button {
    grid-template-columns: 92px minmax(0, 1fr) 28px;
    gap: 14px 16px;
    min-height: 310px;
    padding: 26px 24px;
  }

  .app-shell.home-app-mode .series-tracker-home-copy > strong {
    font-size: clamp(2rem, 8cqi, 3rem);
  }

  .app-shell.home-app-mode .series-tracker-home-copy > strong::after {
    font-size: clamp(0.82rem, 3cqi, 1rem);
  }

  .app-shell.home-app-mode .series-tracker-home-copy > small {
    font-size: clamp(0.78rem, 2.7cqi, 0.94rem);
  }

  .app-shell.home-app-mode .series-tracker-home-stats > span {
    grid-template-columns: 62px minmax(0, 1fr);
    min-height: 100px;
    padding: 14px;
    border-radius: 18px;
  }
}

@container (max-width: 460px) {
  .app-shell.home-app-mode .series-tracker-home-panel {
    border-radius: 24px;
  }

  .app-shell.home-app-mode .series-tracker-home-panel::after {
    inset: 7px;
    border-radius: 17px;
  }

  .app-shell.home-app-mode .series-tracker-home-button {
    grid-template-columns: 70px minmax(0, 1fr) 22px;
    gap: 12px 10px;
    min-height: 292px;
    padding: 22px 18px;
  }

  .app-shell.home-app-mode .series-tracker-home-copy > strong {
    font-size: clamp(1.65rem, 8.2cqi, 2.05rem);
  }

  .app-shell.home-app-mode .series-tracker-home-copy > strong::after {
    margin-top: 5px;
    font-size: clamp(0.69rem, 3.2cqi, 0.82rem);
    line-height: 1.3;
  }

  .app-shell.home-app-mode .series-tracker-home-copy > small {
    margin-top: 7px;
    font-size: clamp(0.67rem, 3cqi, 0.78rem);
  }

  .app-shell.home-app-mode .series-tracker-home-stats {
    gap: 9px;
  }

  .app-shell.home-app-mode .series-tracker-home-stats > span {
    grid-template-columns: 42px minmax(0, 1fr);
    column-gap: 8px;
    min-height: 84px;
    padding: 10px;
    border-radius: 14px;
  }

  .app-shell.home-app-mode .series-tracker-home-stats > span::before {
    min-height: 54px;
    background-size: calc(100% - 8px) auto;
  }

  .app-shell.home-app-mode .series-tracker-home-stats strong {
    font-size: clamp(1.6rem, 8cqi, 2.15rem);
  }

  .app-shell.home-app-mode .series-tracker-home-stats small {
    margin-top: 4px;
    font-size: clamp(0.52rem, 2.5cqi, 0.65rem);
    letter-spacing: 0.08em;
  }
}

/* The supplied reference is the artwork source; its isolated artwork stays crisp at every size. */
.app-shell.home-app-mode .series-tracker-home-panel,
.app-shell.home-app-mode[data-theme="dark"] .series-tracker-home-panel,
.app-shell.home-app-mode[data-theme="midnightLibrary"] .series-tracker-home-panel,
.app-shell.home-app-mode[data-theme="warmWalnut"] .series-tracker-home-panel,
.app-shell.home-app-mode[data-theme="emeraldStudy"] .series-tracker-home-panel {
  --series-surface: #fbf3e8;
  --series-surface-soft: #f8eddf;
  --series-line: #d9c3a4;
  --series-card-title: #4e2815;
  --series-card-copy: #665443;
  --series-card-status: #50301e;
  --series-arrow: #49389b;
  color-scheme: light;
  background: #f8eadd;
}

.app-shell.home-app-mode .series-tracker-home-icon {
  width: min(100%, 148px);
  aspect-ratio: 740 / 660;
  background-image: url("./series-tracker-reference-assets.png");
  background-size: 195.7% auto;
  background-position: 14.1% 4.7%;
  background-repeat: no-repeat;
}

.app-shell.home-app-mode .series-tracker-home-stats > span::before {
  align-self: center;
  width: 100%;
  min-height: 0;
  border: 0;
  background-image: url("./series-tracker-reference-assets.png");
  background-repeat: no-repeat;
  mix-blend-mode: normal;
}

.app-shell.home-app-mode .series-tracker-home-stats > span {
  background: #faf0e6;
}

.app-shell.home-app-mode .series-tracker-home-stats > span:first-child::before {
  aspect-ratio: 145 / 135;
  background-image: url("./series-tracker-reference.jpg");
  background-size: 883% auto;
  background-position: 12.8% 71.5%;
}

.app-shell.home-app-mode .series-tracker-home-stats > span:last-child::before {
  aspect-ratio: 150 / 135;
  background-image: url("./series-tracker-reference.jpg");
  background-size: 853.4% auto;
  background-position: 61.4% 71.5%;
}

.app-shell.home-app-mode .series-tracker-home-panel::before {
  right: 2%;
  bottom: 0;
  width: auto;
  height: 52%;
  aspect-ratio: 320 / 570;
  background-image: url("./series-tracker-reference-assets.png");
  background-size: 452.5% auto;
  background-position: 86.9% 96.9%;
  background-repeat: no-repeat;
  opacity: 0.3;
  filter: none;
  mix-blend-mode: normal;
}

@container (min-width: 461px) and (max-width: 760px) {
  .app-shell.home-app-mode .series-tracker-home-button {
    grid-template-columns: 118px minmax(0, 1fr) 30px;
    min-height: 350px;
  }
}

@container (max-width: 460px) {
  .app-shell.home-app-mode .series-tracker-home-icon {
    width: 76px;
  }
}

/* Desktop composition follows the supplied 1195 × 655 card proportions. */
@media (min-width: 1100px) {
  .app-shell.home-app-mode .home-dashboard-grid {
    grid-template-areas:
      "current overview"
      "series series"
      "recommended goal"
      "recommended quick"
      "recommended community"
      "read-next read-next";
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr);
    gap: 18px 20px;
  }

  .app-shell.home-app-mode .home-dashboard-main,
  .app-shell.home-app-mode .home-dashboard-lists,
  .app-shell.home-app-mode .home-dashboard-aside {
    display: contents;
  }

  .app-shell.home-app-mode .home-current-card { grid-area: current; }
  .app-shell.home-app-mode .series-tracker-home-panel { grid-area: series; }
  .app-shell.home-app-mode .recommended-panel { grid-area: recommended; }
  .app-shell.home-app-mode .home-dashboard-read-next-wide { grid-area: read-next; }
  .app-shell.home-app-mode .home-dashboard-aside > :nth-child(1) { grid-area: overview; }
  .app-shell.home-app-mode .home-dashboard-aside > :nth-child(2) { grid-area: goal; }
  .app-shell.home-app-mode .home-dashboard-aside > :nth-child(3) { grid-area: quick; }
  .app-shell.home-app-mode .home-dashboard-aside > :nth-child(4) { grid-area: community; }

  .app-shell.home-app-mode .series-tracker-home-button {
    grid-template-areas:
      "icon copy arrow"
      "stats stats stats";
    grid-template-columns: 260px minmax(0, 1fr) 60px;
    grid-template-rows: minmax(260px, 1fr) 185px;
    gap: 28px 4px;
    min-height: 600px;
    padding: 48px 52px;
  }

  .app-shell.home-app-mode .series-tracker-home-icon {
    width: 260px;
    max-width: none;
    transform: translateY(-22px);
  }

  .app-shell.home-app-mode .series-tracker-home-copy {
    transform: translateY(16px);
  }

  .app-shell.home-app-mode .series-tracker-home-copy > strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 5.25rem;
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 0.96;
  }

  .app-shell.home-app-mode .series-tracker-home-copy > strong::after {
    max-width: 620px;
    margin-top: 12px;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 2.25rem;
    font-weight: 400;
    letter-spacing: -0.015em;
    line-height: 1.25;
  }

  .app-shell.home-app-mode .series-tracker-home-copy > small {
    margin-top: 16px;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .app-shell.home-app-mode .series-tracker-home-stats {
    gap: 28px;
  }

  .app-shell.home-app-mode .series-tracker-home-stats > span {
    grid-template-columns: 150px minmax(0, 1fr);
    column-gap: 28px;
    min-height: 185px;
    padding: 26px 32px;
    border-radius: 24px;
  }

  .app-shell.home-app-mode .series-tracker-home-stats strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 4.75rem;
    font-weight: 700;
  }

  .app-shell.home-app-mode .series-tracker-home-stats small {
    margin-top: 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
  }

  .app-shell.home-app-mode .series-tracker-home-button > svg:last-child {
    width: 58px;
    height: 58px;
    transform: translateY(-28px);
  }
}

/* Phone composition keeps the reference character without miniaturising it. */
@container (max-width: 460px) {
  .app-shell.home-app-mode .series-tracker-home-button {
    grid-template-columns: 82px minmax(0, 1fr) 24px;
    grid-template-rows: auto 116px;
    gap: 18px 10px;
    min-height: 350px;
    padding: 26px 18px 22px;
  }

  .app-shell.home-app-mode .series-tracker-home-icon {
    width: 82px;
  }

  .app-shell.home-app-mode .series-tracker-home-copy > strong {
    white-space: nowrap;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.48rem;
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1;
  }

  .app-shell.home-app-mode .series-tracker-home-copy > strong::after {
    margin-top: 9px;
    white-space: normal;
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.36;
  }

  .app-shell.home-app-mode .series-tracker-home-copy > small {
    margin-top: 9px;
    font-size: 0.79rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .app-shell.home-app-mode .series-tracker-home-stats {
    gap: 10px;
  }

  .app-shell.home-app-mode .series-tracker-home-stats > span {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center;
    gap: 0;
    min-height: 116px;
    padding: 10px;
    overflow: hidden;
    border-radius: 16px;
    text-align: center;
  }

  .app-shell.home-app-mode .series-tracker-home-stats > span::before {
    position: absolute;
    top: calc(50% + 42px);
    left: 50%;
    z-index: 0;
    width: 100px;
    height: 116px;
    min-height: 0;
    opacity: 0.24;
    transform: translate(-50%, -50%);
  }

  .app-shell.home-app-mode .series-tracker-home-stats > span:first-child::before {
    background-image: url("./series-tracker-reference-assets.png");
    background-size: 444px 333px;
    background-position: -281px -44px;
  }

  .app-shell.home-app-mode .series-tracker-home-stats > span:last-child::before {
    background-image: url("./series-tracker-reference-assets.png");
    background-size: 405px 303px;
    background-position: -94px -174px;
  }

  .app-shell.home-app-mode .series-tracker-home-stats strong {
    grid-column: 1;
    grid-row: 1;
    place-self: end center;
    z-index: 1;
    width: 100%;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.35rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
  }

  .app-shell.home-app-mode .series-tracker-home-stats small {
    display: block;
    grid-column: 1;
    grid-row: 2;
    z-index: 1;
    width: 100%;
    margin-top: 1px;
    padding: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1;
    text-align: center;
  }

  .app-shell.home-app-mode .series-tracker-home-button > svg:last-child {
    width: 26px;
    height: 26px;
  }
}
