:root {
  color-scheme: light;
  --bc-green: #00704a;
  --bc-green-dark: #12a36f;
  --bc-tertiary: var(--bc-green);
  --bc-yellow: #ffc107;
  --bc-red: #ff2d38;
  --surface: #ffffff;
  --surface-low: #f5f5f7;
  --surface-mid: #ececf0;
  --text: #111111;
  --text-soft: #616166;
  --text-muted: #86868b;
  --line: rgba(0, 0, 0, 0.12);
  --line-strong: rgba(0, 0, 0, 0.18);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 12px 32px rgba(0, 0, 0, 0.05);
  --sidebar-width: 248px;
  --radius-card: 8px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--surface-low);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    sans-serif;
  letter-spacing: 0;
  text-rendering: geometricPrecision;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--surface-low);
}

[hidden] {
  display: none !important;
}

body,
button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.app-banner {
  display: none;
}

.app-banner-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: #111;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  object-fit: cover;
}

.app-banner-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.app-banner-title,
.app-banner-subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-banner-title {
  color: var(--text);
  font-size: 17px;
  font-weight: 760;
  line-height: 1.2;
}

.app-banner-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 520;
  line-height: 1.2;
}

.app-banner-action {
  display: inline-flex;
  min-width: 68px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--bc-green);
  color: #fff;
  font-size: 17px;
  font-weight: 780;
  line-height: 1;
}

.app-banner-close {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: #6e6e73;
  cursor: pointer;
  font-size: 30px;
  font-weight: 320;
  line-height: 1;
}

.app-download-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: #111;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.app-download-button img {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.app-download-button:hover {
  background: #242426;
}

.sidebar-cta .app-download-button {
  width: 100%;
}

.download-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.48);
}

.download-modal-card {
  position: relative;
  display: grid;
  width: min(360px, 100%);
  justify-items: center;
  gap: 18px;
  padding: 38px 24px 24px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
  text-align: center;
}

.download-modal-card h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 820;
  line-height: 1.25;
}

.download-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: #6e6e73;
  cursor: pointer;
  font-size: 26px;
  font-weight: 320;
  line-height: 1;
}

.download-qr-wrap {
  display: grid;
  width: 248px;
  height: 248px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.download-qr {
  width: 224px;
  height: 224px;
  object-fit: contain;
}

.download-modal-link {
  color: var(--bc-green);
  font-size: 14px;
  font-weight: 760;
}

.store-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.store-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 18px 20px;
  background: rgba(245, 245, 247, 0.94);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

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

.brand-name {
  display: block;
  margin: 0;
  font-size: 18px;
  font-weight: 760;
  line-height: 1.1;
}

.brand-caption {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin-bottom: 20px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-muted);
  font-size: 14px;
}

.sidebar-search:focus-within,
.topbar-search:focus-within {
  border-color: rgba(0, 112, 74, 0.35);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(0, 112, 74, 0.12);
}

.search-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 2px solid currentColor;
  border-radius: 50%;
  opacity: 0.72;
}

.search-icon::after {
  content: "";
  display: block;
  width: 6px;
  height: 2px;
  margin: 9px 0 0 9px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
}

.sidebar-search input,
.topbar-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-main);
  font: inherit;
}

.sidebar-search input::placeholder,
.topbar-search input::placeholder {
  color: var(--text-muted);
}

.sidebar-nav {
  display: grid;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 590;
}

.nav-item:hover,
.nav-item.is-active {
  background: rgba(0, 112, 74, 0.1);
  color: var(--bc-green);
}

.sidebar-cta {
  position: absolute;
  right: 18px;
  bottom: 20px;
  left: 18px;
  display: grid;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.sidebar-cta small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.store-main {
  min-width: 0;
  padding: 28px clamp(20px, 4vw, 56px) 64px;
}

.store-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto 28px;
  max-width: 1180px;
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  font-weight: 760;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-search {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-muted);
  font-size: 15px;
}

.store-content {
  max-width: 1180px;
  margin: 0 auto;
}

.deck-store-content {
  max-width: 1680px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 590;
}

.breadcrumb a {
  color: var(--bc-green);
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 800;
  line-height: 0.98;
}

.page-subtitle {
  max-width: 660px;
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.45;
}

.segmented {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.segment {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 30px;
  white-space: nowrap;
}

.segment.is-active {
  background: var(--bc-green);
  color: #fff;
}

.section {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.section:last-child {
  border-bottom: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-head-count-only {
  justify-content: flex-end;
}

.section-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
}

.section-link {
  color: var(--bc-green);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.deck-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.deck-row-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.book-card,
.deck-card {
  position: relative;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
}

.book-card {
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  justify-items: center;
  padding: 18px 16px;
  text-align: center;
}

.card-click-target {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.card-click-target:focus-visible {
  outline: 3px solid rgba(0, 112, 74, 0.42);
  outline-offset: 2px;
}

.book-card:hover,
.deck-card:hover {
  border-color: rgba(0, 112, 74, 0.34);
  box-shadow: var(--shadow);
}

.rank {
  position: static;
  display: grid;
  width: auto;
  min-height: 132px;
  align-items: start;
  justify-items: start;
  justify-self: stretch;
  border-radius: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  box-shadow: none;
}

.book-cover {
  grid-column: 2;
  width: min(132px, 48%);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 20px;
  background: #111;
}

.book-card > div,
.book-card > p,
.book-card > .tag-row,
.book-card > .button-row {
  grid-column: 1 / -1;
}

.book-card > div:not(.tag-row):not(.button-row) {
  width: 100%;
  min-width: 0;
}

.book-card > :not(.card-click-target) {
  position: relative;
  z-index: 2;
}

.deck-card > :not(.card-click-target) {
  position: relative;
  z-index: 2;
}

.book-cover img,
.deck-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-title,
.deck-title {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.2;
}

.book-card .book-title,
.book-card .book-meta {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-meta,
.deck-meta,
.metric-label {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 590;
  line-height: 1.3;
}

.book-desc,
.deck-desc {
  display: -webkit-box;
  min-height: 40px;
  margin: 0;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.book-card .tag-row,
.book-card .button-row {
  justify-content: center;
}

.book-card .book-desc {
  text-align: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(0, 112, 74, 0.1);
  color: var(--bc-green);
  font-size: 12px;
  font-weight: 750;
}

.tag.is-yellow {
  background: rgba(255, 193, 7, 0.22);
  color: #7c5c00;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 760;
  white-space: nowrap;
}

.btn-primary {
  background: var(--bc-green);
  color: #fff;
}

.btn-primary:hover {
  background: #005f40;
}

.btn-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

.btn-soft {
  background: rgba(0, 112, 74, 0.1);
  color: var(--bc-green);
}

.chart-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
  border-top: 1px solid var(--line);
}

.chart-row {
  display: grid;
  grid-template-columns: 34px 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.chart-rank {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 760;
  text-align: right;
}

.chart-icon {
  width: 62px;
  height: 62px;
  overflow: hidden;
  border-radius: 8px;
  background: #111;
}

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

.chart-copy {
  min-width: 0;
  overflow: hidden;
}

.chart-title {
  display: block;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 720;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-subtitle {
  display: block;
  max-width: 100%;
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-hero {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  background: #151515;
  color: #fff;
}

.book-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.book-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  filter: blur(34px) saturate(1.22);
  transform: scale(1.12);
}

.book-hero::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.22)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0));
  content: "";
}

.book-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  min-height: 340px;
  padding: 48px clamp(28px, 5vw, 64px);
}

.book-hero-art {
  overflow: hidden;
  width: 240px;
  height: 240px;
  border-radius: 52px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 26px 70px rgba(0, 0, 0, 0.28);
}

.book-hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-hero-copy {
  min-width: 0;
}

.book-hero .detail-eyebrow {
  color: #fff;
  opacity: 0.94;
}

.book-hero .detail-title {
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.24);
}

.book-hero .detail-subtitle {
  color: rgba(255, 255, 255, 0.84);
}

.book-hero .tag {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.book-hero .tag.is-free {
  background: rgba(0, 112, 74, 0.82);
}

.book-hero .tag.is-yellow {
  background: rgba(255, 193, 7, 0.86);
  color: #2b2100;
}

.book-hero-actions {
  margin-top: 22px;
}

.book-hero-primary {
  min-height: 42px;
  padding: 0 20px;
  background: var(--bc-green);
  color: #fff;
}

.book-hero-download {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  backdrop-filter: blur(18px);
}

.book-hero-download:hover {
  background: rgba(255, 255, 255, 0.28);
}

.book-stat-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 44px;
  padding: 24px 18px 26px;
  background: #151515;
  color: #d7d7dc;
}

.book-stat {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 8px;
  padding: 0 14px;
  text-align: center;
}

.book-stat + .book-stat {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.book-stat span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.2;
}

.book-stat strong {
  overflow: hidden;
  max-width: 100%;
  color: #f5f5f7;
  font-size: 23px;
  font-weight: 820;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-lockup {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: end;
  padding: 10px 0 28px;
  border-bottom: 1px solid var(--line);
}

.book-detail-lockup,
.book-preview-section {
  border-bottom: 0;
}

.detail-art {
  overflow: hidden;
  border-radius: 8px;
  background: #111;
  box-shadow: var(--shadow);
}

.detail-art img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.detail-eyebrow {
  margin: 0 0 8px;
  color: var(--bc-green);
  font-size: 13px;
  font-weight: 800;
}

.detail-title {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 820;
  line-height: 0.98;
}

.detail-subtitle {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 19px;
  line-height: 1.35;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  max-width: 720px;
  margin: 24px 0 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric-value {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
}

.media-gallery {
  display: flex;
  gap: 16px;
  margin: 0 calc(clamp(20px, 4vw, 56px) * -1);
  padding: 2px clamp(20px, 4vw, 56px) 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding-inline: clamp(20px, 4vw, 56px);
  scroll-snap-type: x mandatory;
  scrollbar-color: rgba(0, 112, 74, 0.32) transparent;
}

.media-shot {
  flex: 0 0 clamp(250px, 31vw, 360px);
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  scroll-snap-align: start;
}

.media-shot img {
  width: 100%;
  aspect-ratio: 9 / 16;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.copy-block {
  max-width: 820px;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.58;
}

.deck-card {
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  padding: 12px 0;
  border-width: 0 0 1px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#decks .deck-card:not(.is-group) {
  cursor: pointer;
}

.deck-row-list .deck-card:hover {
  background: rgba(0, 112, 74, 0.04);
  border-color: var(--line);
  box-shadow: none;
}

#decks .deck-card:not(.is-group) {
  border-bottom-color: transparent;
}

#decks .deck-row-list {
  border-top: 0;
}

#decks .deck-row-list .deck-card:not(.is-group):hover {
  border-bottom-color: transparent;
}

.deck-card.is-group {
  grid-template-columns: minmax(0, 1fr);
  min-height: 58px;
  padding: 22px 0 9px;
  cursor: default;
  border-bottom-color: var(--line-strong);
}

.deck-row-list .deck-card.is-group:hover {
  background: transparent;
  border-color: transparent;
  border-bottom-color: var(--line-strong);
}

.deck-card.is-group .deck-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
}

.deck-thumb {
  overflow: hidden;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: #111;
}

.deck-copy {
  min-width: 0;
}

.deck-title {
  display: -webkit-box;
  overflow: hidden;
  max-width: 620px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.deck-card.is-group .deck-title {
  display: block;
  overflow: visible;
  max-width: none;
  color: var(--bc-tertiary);
  white-space: normal;
  -webkit-box-orient: initial;
  -webkit-line-clamp: initial;
}

.deck-desc {
  min-height: 0;
  margin-top: 5px;
  max-width: 720px;
  -webkit-line-clamp: 1;
}

.deck-action {
  justify-self: end;
}

.deck-actions {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
  flex-wrap: nowrap;
}

.info-table {
  width: 100%;
  max-width: 760px;
  border-collapse: collapse;
  font-size: 15px;
}

.info-table th,
.info-table td {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.info-table th {
  width: 180px;
  color: var(--text-muted);
  font-weight: 650;
  vertical-align: top;
}

.info-value-block {
  display: grid;
  gap: 4px;
}

.info-primary {
  color: var(--text);
  font-weight: 600;
  line-height: 1.4;
}

.info-secondary {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.deck-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.deck-hero-copy {
  min-width: 0;
}

.deck-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.deck-audio-button {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: var(--surface);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  cursor: pointer;
}

.deck-audio-button:disabled {
  cursor: not-allowed;
  opacity: 0.44;
}

.deck-audio-button.is-playing {
  background: var(--bc-green);
}

.deck-audio-glyph {
  display: block;
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-left: 19px solid currentColor;
}

.deck-audio-button.is-playing .deck-audio-glyph {
  width: 18px;
  height: 18px;
  margin-left: 0;
  border: 0;
  border-radius: 3px;
  background: currentColor;
}

.deck-audio-button.is-loading .deck-audio-glyph {
  width: 24px;
  height: 24px;
  margin-left: 0;
  border: 3px solid rgba(255, 255, 255, 0.32);
  border-top-color: currentColor;
  border-radius: 999px;
  animation: card-audio-spin 0.82s linear infinite;
}

.deck-audio-button.deck-row-audio-button {
  z-index: 4;
  width: 34px;
  height: 34px;
  background: rgba(0, 112, 74, 0.1);
  color: var(--bc-green);
  box-shadow: none;
}

.deck-audio-button.deck-row-audio-button.is-playing {
  background: var(--bc-green);
  color: var(--surface);
}

.deck-audio-button.deck-row-audio-button .deck-audio-glyph {
  margin-left: 3px;
  border-top-width: 7px;
  border-bottom-width: 7px;
  border-left-width: 10px;
}

.deck-audio-button.deck-row-audio-button.is-playing .deck-audio-glyph {
  width: 10px;
  height: 10px;
  margin-left: 0;
  border-radius: 2px;
}

.deck-audio-button.deck-row-audio-button.is-loading .deck-audio-glyph {
  width: 16px;
  height: 16px;
  margin-left: 0;
  border-width: 2px;
  border-color: rgba(0, 112, 74, 0.18);
  border-top-color: currentColor;
}

.deck-hero-copy .button-row {
  margin-top: 18px;
}

.deck-summary {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.48;
}

.flashcard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 18px;
}

.self-rating-card {
  position: relative;
  z-index: 0;
  isolation: isolate;
  display: grid;
  min-width: 0;
  min-height: 840px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.04), 0 12px 30px rgba(0, 0, 0, 0.05);
}

.self-rating-card[data-card-learning-url] {
  cursor: pointer;
}

.self-rating-card[data-card-learning-url]:focus-visible {
  outline: 3px solid rgba(0, 112, 74, 0.32);
  outline-offset: 3px;
}

.self-rating-card[data-card-learning-url]:hover {
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.05), 0 16px 34px rgba(0, 0, 0, 0.08);
}

.self-rating-card.is-media-empty {
  grid-template-rows: auto minmax(300px, 1fr) auto auto;
}

.self-rating-card.is-media-empty .slot-front {
  align-content: center;
}

.card-index {
  padding: 14px 16px 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.slot {
  display: grid;
  align-content: center;
  min-height: 124px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.slot:last-child {
  border-bottom: 0;
}

.slot-front {
  min-height: 138px;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.card-term {
  min-width: 0;
  margin: 0;
  font-size: clamp(30px, 3.2vw, 42px);
  font-weight: 830;
  line-height: 1.05;
  text-align: left;
}

.card-audio-button {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--surface-mid);
  color: var(--text-soft);
  cursor: pointer;
}

.card-audio-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.card-audio-button.is-playing {
  background: var(--text);
  color: var(--surface);
}

.card-audio-glyph {
  display: block;
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid currentColor;
}

.card-audio-button.is-playing .card-audio-glyph {
  width: 12px;
  height: 12px;
  margin-left: 0;
  border: 0;
  border-radius: 2px;
  background: currentColor;
}

.card-audio-button.is-loading .card-audio-glyph {
  width: 18px;
  height: 18px;
  margin-left: 0;
  border: 2px solid rgba(0, 0, 0, 0.16);
  border-top-color: currentColor;
  border-radius: 999px;
  animation: card-audio-spin 0.82s linear infinite;
}

@keyframes card-audio-spin {
  to {
    transform: rotate(360deg);
  }
}

.card-hint {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.3;
  text-align: left;
}

.card-media-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: #111;
  border-bottom: 1px solid var(--line);
}

.card-media-strip {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.card-media-strip::-webkit-scrollbar {
  display: none;
}

.card-media-slide {
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: start;
}

.card-media-slide img,
.card-media-slide video {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card-media-slide video {
  display: block;
  background: #111;
}

.media-nav {
  position: absolute;
  top: 50%;
  display: grid;
  width: 32px;
  height: 58px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 42px;
  font-weight: 520;
  line-height: 1;
  transform: translateY(-50%);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.54);
}

.media-prev {
  left: 8px;
}

.media-next {
  right: 8px;
}

.media-nav:hover {
  color: rgba(255, 255, 255, 0.82);
}

.media-dots {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: flex;
  gap: 5px;
}

.media-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.media-dots .is-active {
  width: 16px;
  background: #fff;
}

.slot-back {
  min-height: 122px;
}

.slot-back.has-media {
  align-content: start;
}

.answer {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
}

.slot-media-carousel {
  margin-top: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
}

.answer + .slot-media-carousel {
  margin-top: 14px;
}

.example {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.46;
  text-align: left;
  white-space: pre-line;
}

.rating-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0;
  padding: 16px;
  border-top: 1px solid var(--line);
}

.rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 58px;
  place-items: center;
  border: 0;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 800;
}

.rating strong {
  font-size: 28px;
  font-weight: 520;
  line-height: 1;
}

.rating span {
  display: block;
  font-size: 10px;
  font-weight: 760;
  line-height: 1.1;
}

.rating.is-again {
  background: var(--bc-red);
  color: #fff;
}

.rating.is-hard {
  background: #e7e7e8;
  color: #202124;
}

.rating.is-good {
  background: var(--bc-green-dark);
  color: #fff;
}

.qna-section {
  padding-bottom: 0;
}

.qna-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.qna-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 0 18px;
  cursor: pointer;
  list-style: none;
}

.qna-panel summary::-webkit-details-marker {
  display: none;
}

.qna-panel summary::after {
  color: var(--text-muted);
  font-size: 20px;
  font-weight: 760;
  content: "+";
}

.qna-panel[open] summary {
  border-bottom: 1px solid var(--line);
}

.qna-panel[open] summary::after {
  content: "-";
}

.qna-panel summary span {
  font-size: 22px;
  font-weight: 820;
}

.qna-panel summary small {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.qna-list {
  display: grid;
}

.qna-item {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.qna-item:last-child {
  border-bottom: 0;
}

.qna-item h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.qna-item p {
  max-width: 760px;
  margin: 7px 0 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.45;
}

@media (max-width: 1040px) {
  .book-grid,
  .deck-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-list,
  .flashcard-grid {
    grid-template-columns: 1fr;
  }

  .media-shot {
    flex-basis: clamp(240px, 42vw, 320px);
  }
}

@media (max-width: 820px) {
  .app-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: max(12px, env(safe-area-inset-top)) 14px 12px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
  }

  .store-shell {
    display: block;
  }

  .store-sidebar {
    display: none;
  }

  .store-main {
    padding: 18px 16px 44px;
  }

  .mobile-brand {
    display: flex;
  }

  .topbar-search {
    display: flex;
    flex: 1 1 160px;
    margin-left: auto;
  }

  .store-topbar {
    position: sticky;
    top: 0;
    z-index: 3;
    flex-wrap: wrap;
    margin: -18px -16px 22px;
    padding: 12px 16px;
    background: rgba(245, 245, 247, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
  }

  .store-topbar .segmented {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .page-header {
    display: grid;
    align-items: start;
  }

  .deck-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .book-hero {
    min-height: 300px;
  }

  .book-hero-inner {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 22px;
    min-height: 300px;
    padding: 34px 28px;
  }

  .book-hero-art {
    width: 160px;
    height: 160px;
    border-radius: 36px;
  }

  .book-stat-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 22px;
  }

  .book-stat:nth-child(4) {
    border-left: 0;
  }

  .detail-lockup {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 16px;
  }

  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 600px) {
  .book-grid {
    grid-template-columns: 1fr;
  }

  .media-gallery {
    margin-right: -16px;
    margin-left: -16px;
    padding-right: 16px;
    padding-left: 16px;
    scroll-padding-inline: 16px;
  }

  .media-shot {
    flex-basis: min(74vw, 300px);
  }

  .page-title,
  .detail-title {
    font-size: 34px;
  }

  .book-hero {
    margin-right: -16px;
    margin-left: -16px;
  }

  .book-hero-inner {
    grid-template-columns: 1fr;
    gap: 20px;
    justify-items: start;
    padding: 32px 20px 34px;
  }

  .book-hero-art {
    width: 132px;
    height: 132px;
    border-radius: 30px;
  }

  .book-hero .detail-title {
    font-size: 38px;
  }

  .book-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-right: -16px;
    margin-left: -16px;
    padding: 22px 10px 24px;
  }

  .book-stat:nth-child(odd) {
    border-left: 0;
  }

  .book-stat:nth-child(4) {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
  }

  .book-stat strong {
    font-size: 21px;
  }

  .detail-lockup {
    grid-template-columns: 1fr;
  }

  .detail-art {
    width: min(180px, 60vw);
  }

  .chart-row {
    grid-template-columns: 24px 56px minmax(0, 1fr);
  }

  .chart-row .btn {
    grid-column: 2 / 4;
    justify-self: start;
  }

  .deck-card {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
  }

  .deck-thumb {
    width: 58px;
    height: 58px;
  }

  .deck-action {
    grid-column: 2;
    justify-self: start;
  }

  .deck-actions {
    grid-column: 2;
    justify-self: start;
  }

  .deck-actions .deck-action {
    grid-column: auto;
  }

  .self-rating-card {
    min-height: 0;
  }

  .rating-row {
    grid-template-columns: 1fr;
  }
}
