:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #5b667a;
  --line: #d9e0ea;
  --paper: #f7fafc;
  --white: #ffffff;
  --teal: #0f766e;
  --blue: #2563eb;
  --rose: #e85d4f;
  --amber: #d9961a;
  --navy: #152033;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--teal);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  padding: 8px 10px;
  border-radius: 8px;
}

.nav a:hover {
  background: #eef5f7;
  color: var(--ink);
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px clamp(18px, 4vw, 56px) 70px;
}

.hero-panel {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
}

.muted {
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.card,
.form-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.form-card {
  margin-top: 22px;
}

.tabs,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.social-register {
  display: grid;
  gap: 8px;
  margin: 4px 0 20px;
  padding: 14px;
  border: 1px solid #dbe7f3;
  border-radius: 8px;
  background: #f8fbff;
}

.social-register p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.google-register-button {
  width: fit-content;
  min-height: 46px;
  padding: 10px 18px 10px 12px;
  border-color: #d7dce5;
  color: #172033;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
}

.google-register-button:hover {
  border-color: #b8c4d6;
  background: #fff;
}

.google-pay-button {
  border-color: #172033;
  color: #172033;
  background: #fff;
}

.google-pay-button:hover {
  border-color: #000;
  background: #f8fafc;
}

.apple-pay-button {
  border-color: #000;
  color: #fff;
  background: #050505;
}

.apple-pay-button:hover {
  border-color: #000;
  background: #1f2937;
}

.apple-mark {
  font-weight: 900;
  letter-spacing: 0;
}

.google-g {
  display: inline-grid;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: conic-gradient(from -45deg, #4285f4, #34a853, #fbbc05, #ea4335, #4285f4);
  font-weight: 900;
}

button,
.button,
input,
select,
textarea {
  font: inherit;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.button.primary,
button.primary {
  border-color: var(--rose);
  color: #fff;
  background: var(--rose);
}

.button.good,
button.good {
  border-color: var(--teal);
  color: #fff;
  background: var(--teal);
}

.button.warn,
button.warn {
  border-color: var(--amber);
  color: #fff;
  background: var(--amber);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.tab.active {
  color: #fff;
  border-color: var(--navy);
  background: var(--navy);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

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

.full {
  grid-column: 1 / -1;
}

.message {
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid #b8decf;
  border-radius: 8px;
  background: #ecfdf5;
  color: #065f46;
}

.notice {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #f2d38b;
  border-radius: 8px;
  background: #fff8e5;
  color: #6b4a05;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #eef5f7;
}

.pill {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e5e7eb;
  font-size: 12px;
  font-weight: 800;
}

.pill.approved,
.pill.paid {
  color: #065f46;
  background: #d1fae5;
}

.pill.pending {
  color: #92400e;
  background: #fef3c7;
}

.pill.rejected,
.pill.unpaid {
  color: #991b1b;
  background: #fee2e2;
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-section {
  margin-top: 26px;
}

.material-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: space-between;
}

.finance-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 6px;
}

.finance-strip article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.finance-strip strong {
  display: block;
  font-size: 24px;
}

.finance-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.subscription-panel {
  margin: 18px 0 8px;
  padding: 22px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f0fdf4);
  box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
}

.subscription-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.subscription-head h2 {
  margin-bottom: 0;
}

.subscription-head > strong {
  display: inline-flex;
  min-width: 96px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: var(--teal);
  box-shadow: 0 12px 22px rgba(15, 118, 110, .22);
}

.subscription-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.subscription-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
}

.subscription-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.subscription-grid strong {
  display: block;
  margin-top: 4px;
}

.subscription-meter {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.subscription-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #16a34a, #2563eb);
}

.subscription-chart {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(239, 246, 255, .78));
}

.subscription-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.subscription-chart-header strong {
  color: var(--ink);
}

.subscription-chart-svg {
  display: block;
  width: 100%;
  min-height: 160px;
  border-radius: 8px;
  background:
    linear-gradient(rgba(37, 99, 235, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, .08) 1px, transparent 1px),
    #ffffff;
  background-size: 100% 34px, 64px 100%, auto;
}

.subscription-chart-svg line {
  stroke: #94a3b8;
  stroke-width: 2;
}

.subscription-chart-svg polygon {
  fill: rgba(34, 197, 94, .18);
}

.subscription-chart-svg polyline {
  fill: none;
  stroke: #16a34a;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.subscription-chart-svg .today-line {
  stroke: #2563eb;
  stroke-dasharray: 7 7;
}

.subscription-chart-svg circle {
  fill: #2563eb;
  stroke: #ffffff;
  stroke-width: 4;
}

.subscription-chart-svg text {
  fill: #334155;
  font-size: 18px;
  font-weight: 800;
}

.subscription-chart-labels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.subscription-chart-labels span {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.subscription-chart-labels strong {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}

.subscription-alert {
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid #f2d38b;
  border-radius: 8px;
  color: #6b4a05;
  background: #fff8e5;
  font-weight: 800;
}

.subscription-alert.danger {
  border-color: #fecaca;
  color: #991b1b;
  background: #fff1f2;
}

.live-class-section {
  margin: 18px 0 8px;
  padding: 22px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f0fdf4);
  box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
}

.live-class-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.live-class-head h2,
.live-class-card h3 {
  margin-top: 0;
}

.live-class-badge {
  display: inline-flex;
  min-width: 132px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #16a34a, #2563eb);
  box-shadow: 0 12px 22px rgba(22, 163, 74, .22);
  font-weight: 900;
}

.live-class-form {
  margin-top: 18px;
  padding: 16px;
  border: 1px dashed #86efac;
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
}

.live-class-form textarea {
  min-height: 88px;
  resize: vertical;
}

.live-class-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.live-class-card {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.live-class-card p {
  margin: 8px 0 0;
}

.live-class-actions {
  display: flex;
  min-width: 230px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.notice.mini {
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
}

.button.danger {
  border-color: #fecaca;
  color: #991b1b;
  background: #fff1f2;
}

@media (max-width: 820px) {
  .grid,
  .form-grid,
  .finance-strip,
  .subscription-grid {
    grid-template-columns: 1fr;
  }

  .subscription-head {
    flex-direction: column;
  }

  .subscription-chart-header,
  .subscription-chart-labels {
    grid-template-columns: 1fr;
  }

  .subscription-chart-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .live-class-head,
  .live-class-card {
    flex-direction: column;
  }

  .live-class-actions {
    min-width: 0;
    justify-content: flex-start;
  }
}

.shop-store-body {
  background: #f1f1f1;
}

.shop-store-header {
  min-height: 146px;
  padding: 24px clamp(22px, 4vw, 58px);
  border-top: 8px solid #263092;
  background: #fff;
}

.shop-store-brand {
  align-items: center;
  color: #0f172a;
  font-size: 20px;
}

.shop-store-brand .mark {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(15, 118, 110, .22);
}

.shop-market {
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px clamp(18px, 3vw, 44px) 70px;
}

.shop-promo-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  padding: 0 0 78px;
}

.shop-promo-card {
  min-height: 292px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  border-radius: 0;
  color: #0f172a;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .04);
}

.shop-promo-card span {
  color: #0f766e;
  font-weight: 900;
  text-transform: uppercase;
}

.shop-promo-card h1,
.shop-promo-card h2 {
  margin: 12px 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.shop-promo-card p {
  margin: 0;
  font-weight: 800;
}

.shop-promo-card a {
  width: max-content;
  margin-top: 18px;
  padding: 12px 24px;
  border-radius: 8px;
  color: #fff;
  background: #b91c1c;
  font-weight: 900;
}

.promo-grammar {
  background:
    radial-gradient(circle at 90% 0%, #dc2626 0 12%, transparent 13%),
    radial-gradient(circle at 8% 86%, rgba(220, 38, 38, .2) 0 16%, transparent 17%),
    linear-gradient(135deg, #fff3ee, #f8e2d9);
}

.promo-books {
  color: #fff;
  background:
    linear-gradient(45deg, rgba(255,255,255,.86) 0 2px, transparent 2px 42px),
    linear-gradient(135deg, #0f766e, #2563eb);
}

.promo-collection {
  color: #fff;
  background:
    radial-gradient(circle at 78% 24%, rgba(255,255,255,.48) 0 4%, transparent 5%),
    radial-gradient(circle at 18% 78%, rgba(255,255,255,.28) 0 12%, transparent 13%),
    linear-gradient(135deg, #a16207, #334155);
}

.shop-featured {
  margin-top: 0;
  text-align: center;
}

.shop-featured h2 {
  color: #12185f;
  font-size: clamp(28px, 4vw, 36px);
}

.shop-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 26px;
}

.shop-category-grid button {
  display: grid;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #12185f;
  font-size: 21px;
  cursor: pointer;
}

.shop-category-grid button.active .category-picture,
.shop-category-grid button:hover .category-picture {
  outline: 4px solid #f59e0b;
  outline-offset: 4px;
}

.category-picture {
  display: block;
  aspect-ratio: 4 / 2.65;
  border-radius: 8px;
  background: #ddd;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .12);
}

.cat-digital {
  background:
    linear-gradient(135deg, rgba(0,0,0,.25), transparent),
    repeating-linear-gradient(90deg, #0f172a 0 14px, #0f766e 14px 24px, #e0f2fe 24px 36px);
}

.cat-grammar {
  background:
    radial-gradient(circle at 50% 50%, #f97316 0 18%, transparent 19%),
    radial-gradient(circle at 35% 35%, #facc15 0 8%, transparent 9%),
    linear-gradient(135deg, #fff7ed, #fecaca);
}

.cat-reading {
  background:
    radial-gradient(circle at 65% 45%, rgba(255,255,255,.65) 0 10%, transparent 11%),
    linear-gradient(135deg, #0f766e, #38bdf8);
}

.cat-listening {
  background:
    radial-gradient(circle at 72% 38%, #fff 0 9%, transparent 10%),
    radial-gradient(circle at 32% 62%, #fde68a 0 14%, transparent 15%),
    linear-gradient(135deg, #1d4ed8, #111827);
}

.shop-panel {
  margin-top: 68px;
  padding: 28px;
  border-radius: 8px;
  background: #fff;
}

.shop-panel-head,
.shop-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.shop-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  color: #12185f;
  font-weight: 900;
}

.shop-summary div {
  padding: 9px 12px;
  border-radius: 999px;
  background: #eef2ff;
}

.shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  margin-top: 22px;
}

.shop-sidebar {
  align-self: start;
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.shop-cart,
.shop-service {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.shop-cart-top {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(360px, 1.1fr);
  gap: 18px;
  align-items: start;
  margin: 0 0 20px;
  background: linear-gradient(135deg, #ffffff, #f4fff7);
  box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
}

.shop-cart-top h2 {
  margin: 4px 0 14px;
}

.shop-cart-top .shop-checkout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shop-cart-top .shop-checkout button,
.shop-cart-top .shop-checkout .message {
  grid-column: 1 / -1;
}

.shop-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.shop-filters button {
  min-height: 38px;
  border-radius: 999px;
}

.shop-filters button.active {
  color: #fff;
  border-color: var(--teal);
  background: var(--teal);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

.shop-product {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 0 0 16px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 24px rgba(15, 23, 42, .08);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

.shop-product:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, .14);
}

.shop-product-media {
  position: relative;
  display: grid;
  min-height: 240px;
  aspect-ratio: 3 / 4;
  place-items: center;
  padding: 22px;
  color: rgba(15, 23, 42, .94);
  background: linear-gradient(135deg, #0f766e, #2563eb);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  box-shadow: inset 0 -32px 70px rgba(15, 23, 42, .15);
  font-size: 15px;
  font-weight: 900;
  isolation: isolate;
  letter-spacing: 0;
  line-height: 1;
  overflow: hidden;
  text-shadow: none;
  text-transform: none;
}

.shop-product-media.has-real-cover {
  display: block;
  padding: 12px;
  background: #f8fafc;
  box-shadow: inset 0 -28px 60px rgba(15, 23, 42, .08);
}

.shop-product-media.has-real-cover::before,
.shop-product-media.has-real-cover::after {
  display: none;
}

.shop-product-media.has-real-cover img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 216px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .14);
  pointer-events: none;
  user-select: none;
}

.shop-product-media::before,
.shop-product-media::after {
  content: "";
  position: absolute;
  border-radius: 6px;
  background: rgba(255, 255, 255, .86);
}

.shop-product-media::before {
  inset: 18px 20px 18px 34px;
  width: auto;
  height: auto;
  border-left: 8px solid rgba(15, 23, 42, .16);
  box-shadow: 0 16px 34px rgba(15, 23, 42, .16);
  transform: rotate(-2deg);
}

.shop-product-media::after {
  content: attr(data-cover-title);
  z-index: 1;
  inset: auto 34px 46px 50px;
  width: auto;
  height: auto;
  padding: 12px 10px;
  color: #0f172a;
  background: transparent;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.08;
  white-space: pre-line;
  text-align: left;
  overflow-wrap: anywhere;
}

.shop-product-media span {
  position: absolute;
  z-index: 1;
  top: 36px;
  left: 50px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #075e4d;
  background: #dcfce7;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.shop-product-media[style*="background-image"]::before,
.shop-product-media[style*="background-image"]::after {
  display: none;
}

.shop-product-media[style*="background-image"] {
  background-color: #f8fafc;
  background-size: contain;
}

.shop-product .shop-product-media[style*="background-image"] {
  min-height: 230px;
  background-size: contain;
}

.shop-product .shop-product-media.has-real-cover {
  min-height: 230px;
}

.media-reading-books,
.media-learn-to-read,
.media-story-library,
.media-math-books,
.media-worksheets {
  background:
    radial-gradient(circle at 82% 18%, rgba(255,255,255,.42) 0 13%, transparent 14%),
    linear-gradient(145deg, #dbeafe, #bbf7d0 48%, #fef3c7);
}

.media-learn-to-read {
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.5) 0 12%, transparent 13%),
    linear-gradient(145deg, #cffafe, #bfdbfe 48%, #dcfce7);
}

.media-story-library {
  background:
    radial-gradient(circle at 78% 22%, rgba(255,255,255,.48) 0 12%, transparent 13%),
    linear-gradient(145deg, #fee2e2, #fef3c7 48%, #dbeafe);
}

.media-math-books {
  background:
    radial-gradient(circle at 82% 18%, rgba(255,255,255,.5) 0 12%, transparent 13%),
    linear-gradient(145deg, #ccfbf1, #d9f99d 48%, #e0e7ff);
}

.media-worksheets {
  background:
    repeating-linear-gradient(0deg, rgba(15, 23, 42, .08) 0 1px, transparent 1px 22px),
    linear-gradient(145deg, #f8fafc, #dbeafe);
}

.media-grammar {
  background:
    radial-gradient(circle at 72% 28%, #fbbf24 0 9%, transparent 10%),
    radial-gradient(circle at 28% 68%, #fb7185 0 11%, transparent 12%),
    linear-gradient(135deg, #fff7ed, #f97316);
}

.media-reading {
  background:
    linear-gradient(90deg, rgba(255,255,255,.78) 0 2px, transparent 2px 18px),
    linear-gradient(135deg, #2563eb, #0f766e);
}

.media-writing {
  background:
    radial-gradient(circle at 70% 28%, rgba(255,255,255,.8) 0 7%, transparent 8%),
    linear-gradient(135deg, #7c3aed, #0f766e);
}

.media-listening {
  background:
    radial-gradient(circle at 34% 42%, rgba(255,255,255,.86) 0 12%, transparent 13%),
    radial-gradient(circle at 66% 42%, rgba(255,255,255,.5) 0 12%, transparent 13%),
    linear-gradient(135deg, #0ea5e9, #111827);
}

.media-digital-books {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.35) 0 8px, transparent 8px 16px),
    linear-gradient(135deg, #0f172a, #16a34a);
}

.media-flashcards {
  background:
    radial-gradient(circle at 30% 34%, #fde68a 0 13%, transparent 14%),
    linear-gradient(135deg, #14b8a6, #2563eb);
}

.media-tests {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.24) 0 2px, transparent 2px 16px),
    linear-gradient(135deg, #be123c, #1d4ed8);
}

.media-bundles {
  background:
    radial-gradient(circle at 80% 22%, #fef3c7 0 11%, transparent 12%),
    linear-gradient(135deg, #a16207, #0f172a);
}

.shop-product > div:not(.shop-product-media),
.shop-product .shop-price {
  padding-inline: 16px;
}

.shop-product h3,
.shop-cart h2,
.shop-sidebar h2,
.shop-service h2 {
  margin-bottom: 6px;
}

.shop-product h3 {
  min-height: 52px;
  font-size: 20px;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.shop-product .muted {
  display: -webkit-box;
  min-height: 66px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.shop-price {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.shop-price .button,
.shop-price button {
  min-height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
}

.shop-tag {
  padding: 5px 9px;
  border-radius: 999px;
  color: #075e4d;
  background: #dff8ec;
  font-size: 12px;
  font-weight: 800;
}

.shop-cart-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.shop-cart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.shop-cart-row button {
  min-height: 34px;
  padding: 7px 10px;
}

.shop-total {
  display: flex;
  justify-content: space-between;
  margin: 14px 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 20px;
  font-weight: 900;
}

.shop-checkout {
  display: grid;
  gap: 10px;
}

.shop-service {
  display: grid;
  gap: 10px;
}

.shop-service p {
  margin: 0;
  color: var(--muted);
}

.shop-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .62);
}

.shop-detail-modal[hidden] {
  display: none;
}

.shop-detail-card {
  position: relative;
  width: min(1160px, calc(100vw - 40px));
  max-height: 88vh;
  overflow: auto;
  padding: 56px 24px 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .34);
}

.shop-detail-close {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 36px;
  padding: 7px 12px;
}

.shop-detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 430px) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.shop-book-preview-layout {
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 44px);
}

.shop-book-preview-cover {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
}

.shop-detail-image {
  width: 100%;
  min-height: 320px;
  max-height: 440px;
  border-radius: 8px;
  background-color: #f8fafc;
  background-size: contain;
}

.shop-detail-image.has-real-cover {
  min-height: 420px;
  max-height: none;
}

.shop-detail-image.has-real-cover img {
  min-height: 390px;
  max-height: 560px;
}

.shop-preview-badge {
  justify-self: start;
  padding: 9px 12px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #065f46;
  background: #ecfdf5;
  font-size: 13px;
  font-weight: 900;
}

.shop-detail-info {
  min-width: 0;
}

.shop-book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-book-meta span {
  padding: 8px 11px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: #1e3a8a;
  background: #eff6ff;
  font-size: 13px;
  font-weight: 900;
}

.shop-detail-info h2 {
  margin: 14px 0 10px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.shop-book-summary {
  margin: 0 0 16px;
  max-width: 720px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.shop-detail-section {
  margin-top: 14px;
}

.shop-detail-section h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.shop-detail-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.shop-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.shop-detail-list div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.shop-detail-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.shop-detail-list dd {
  margin: 4px 0 0;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.shop-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.shop-detail-actions-top {
  margin: 12px 0 18px;
}

.shop-preview-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(120px, 0.75fr);
  gap: 12px;
  margin-top: 12px;
  align-items: stretch;
}

.shop-player-section {
  margin-top: 26px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background:
    radial-gradient(circle at 14% 10%, rgba(34, 197, 94, .13), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(59, 130, 246, .12), transparent 32%),
    linear-gradient(135deg, #f8fbff, #f0fdf4);
}

.shop-player-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  max-width: 1080px;
  margin: 0 auto 18px;
}

.shop-player-head h3 {
  margin: 0 0 6px;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.1;
}

.shop-player-head span {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  color: #065f46;
  background: #ecfdf5;
  font-size: 12px;
  font-weight: 900;
}

.shop-book-player {
  display: grid;
  gap: 14px;
  max-width: 1080px;
  margin: 0 auto;
}

.shop-player-stage {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  gap: 16px;
  align-items: center;
  min-height: min(70vh, 760px);
  padding: clamp(16px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, .05) 0 1px, transparent 1px 28px),
    linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), 0 18px 42px rgba(15, 23, 42, .1);
  overflow: hidden;
}

.shop-player-nav {
  position: relative;
  z-index: 2;
  width: 56px;
  min-height: 76px;
  padding: 0;
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 42px;
  line-height: 1;
}

.shop-player-page {
  margin: 0;
  min-width: 0;
}

.shop-player-page img {
  display: block;
  width: min(100%, 680px);
  max-height: min(66vh, 720px);
  margin: 0 auto;
  object-fit: contain;
  border: 12px solid #fff;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .22);
}

.shop-player-page figcaption {
  margin-top: 10px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 900;
}

.shop-player-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(78px, 1fr)) minmax(120px, .72fr);
  gap: 10px;
}

.shop-player-thumbs button {
  position: relative;
  min-height: 0;
  padding: 8px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.shop-player-thumbs button.active {
  border-color: #16a34a;
}

.shop-player-thumbs img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  border-radius: 6px;
  background: #f8fafc;
}

.shop-player-thumbs button span {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #16a34a;
  font-size: 12px;
  font-weight: 900;
}

.shop-preview-page {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.shop-preview-page img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: #f8fafc;
}

.shop-preview-page figcaption {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.shop-preview-lock,
.shop-preview-empty,
.shop-lock-box {
  border: 1px dashed #16a34a;
  border-radius: 8px;
  background: #f0fdf4;
  color: #052e16;
}

.shop-preview-lock {
  display: grid;
  place-content: center;
  min-height: 180px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
}

.shop-preview-lock strong {
  font-size: 20px;
}

.shop-preview-lock span,
.shop-lock-box span {
  color: #166534;
  font-weight: 800;
}

.shop-player-lock-panel {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 44px);
  background: rgba(15, 23, 42, .68);
  backdrop-filter: blur(3px);
}

.shop-player-lock-panel[hidden] {
  display: none;
}

.shop-player-lock-card {
  width: min(780px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .34);
  text-align: center;
}

.shop-player-lock-card h3 {
  margin: 6px 0 10px;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 36px);
}

.shop-player-lock-card p {
  margin: 0 auto 16px;
  max-width: 620px;
  color: var(--muted);
  line-height: 1.6;
}

.shop-player-lock-card .shop-detail-actions {
  justify-content: center;
}

.shop-player-related {
  margin-top: 22px;
}

.shop-player-related h4 {
  margin: 0 0 14px;
  color: #1e3a8a;
  font-size: 19px;
}

.shop-player-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.shop-preview-empty {
  padding: 16px;
  font-weight: 800;
}

.shop-locked-material {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.shop-lock-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
}

.shop-similar-books {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.shop-similar-book {
  display: grid;
  gap: 9px;
  min-height: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.shop-similar-book span {
  display: -webkit-box;
  min-height: 38px;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.shop-similar-cover {
  min-height: 150px;
  aspect-ratio: 3 / 4;
  padding: 8px;
}

.shop-similar-cover.has-real-cover img {
  min-height: 132px;
}

@media (max-width: 1180px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }

  .shop-sidebar {
    position: static;
  }

  .shop-cart-top {
    grid-template-columns: 1fr;
  }

  .shop-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .shop-promo-row,
  .shop-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .shop-promo-row,
  .shop-category-grid,
  .shop-grid {
    grid-template-columns: 1fr;
  }

  .shop-panel-head,
  .shop-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .shop-store-header {
    min-height: auto;
  }

  .shop-cart-top .shop-checkout {
    grid-template-columns: 1fr;
  }

  .shop-detail-layout,
  .shop-detail-list {
    grid-template-columns: 1fr;
  }

  .shop-book-preview-cover {
    position: static;
  }

  .shop-preview-strip {
    grid-template-columns: 1fr;
  }

  .shop-player-head,
  .shop-player-stage {
    grid-template-columns: 1fr;
  }

  .shop-player-stage {
    min-height: auto;
  }

  .shop-player-nav {
    width: 100%;
    min-height: 48px;
    font-size: 30px;
  }

  .shop-player-thumbs,
  .shop-player-related-grid {
    grid-template-columns: 1fr;
  }

  .shop-similar-books {
    grid-template-columns: 1fr;
  }

  .shop-price {
    grid-template-columns: 1fr;
  }
}
.checkout-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 34px) 0 48px;
}

.checkout-empty {
  max-width: 960px;
}

.checkout-hero {
  background: linear-gradient(135deg, #f8fff8, #eef6ff);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(20px, 3vw, 34px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 20px;
  align-items: start;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.checkout-status-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: grid;
  gap: 6px;
}

.checkout-status-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.checkout-status-card strong {
  overflow-wrap: anywhere;
}

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) 380px;
  gap: 22px;
  align-items: start;
  margin-top: 20px;
}

.checkout-main,
.checkout-summary {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.checkout-summary {
  position: sticky;
  top: 96px;
}

.checkout-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}

.checkout-detail {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
  padding: 12px;
}

.checkout-detail span,
.checkout-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.checkout-detail strong {
  display: block;
  font-size: 18px;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.checkout-access-box {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 14px;
  margin: 12px 0 16px;
  padding: 14px 16px;
}

.checkout-access-box p {
  color: var(--muted);
  margin: 6px 0 0;
}

.policy-strip {
  align-items: center;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 18px;
  padding: 14px;
}

.policy-strip strong {
  width: 100%;
}

.policy-strip a,
.checkout-links a {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-weight: 800;
  min-height: 36px;
  padding: 8px 12px;
  text-decoration: none;
}

.payment-method-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 14px;
}

.payment-method-grid button,
.payment-method-grid .button,
.checkout-review-button {
  min-height: 46px;
}

.checkout-review-button {
  justify-content: center;
  margin-bottom: 12px;
  width: 100%;
}

.checkout-row {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 10px 0;
}

.checkout-row strong {
  overflow-wrap: anywhere;
  text-align: right;
}

.checkout-total strong {
  color: var(--green-dark);
  font-size: 24px;
}

.checkout-wide {
  justify-content: center;
  margin: 14px 0;
  width: 100%;
}

.checkout-support {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 12px;
  padding: 14px;
}

.checkout-support h3 {
  margin-top: 0;
}

.checkout-support p {
  color: var(--muted);
  margin: 8px 0;
}

.checkout-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.checkout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 900px) {
  .checkout-hero,
  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .checkout-summary {
    position: static;
  }
}

@media (max-width: 640px) {
  .checkout-detail-grid {
    grid-template-columns: 1fr;
  }

  .payment-method-grid button,
  .payment-method-grid .button,
  .policy-strip a,
  .checkout-links a {
    justify-content: center;
    width: 100%;
  }

  .checkout-row {
    display: block;
  }

  .checkout-row strong {
    display: block;
    margin-top: 4px;
    text-align: left;
  }
}
