:root {
  --jp-bg: #f8f2f4;
  --jp-paper: #fffdfb;
  --jp-paper-soft: #fff6ef;
  --jp-ink: #231f20;
  --jp-muted: #665f61;
  --jp-accent: #bf1026;
  --jp-accent-dark: #241f20;
  --jp-peach: #ffd8be;
  --jp-yellow: #fff1a8;
  --jp-cyan: #9dd7de;
  --jp-shadow: 9px 10px 0 rgba(35, 31, 32, 0.9);
  --jp-border: 2px solid #231f20;
}

body {
  background:
    radial-gradient(circle at top left, rgba(255, 213, 196, 0.7), transparent 28%),
    radial-gradient(circle at top right, rgba(206, 218, 255, 0.62), transparent 24%),
    linear-gradient(180deg, #fcf8fb 0%, #f5f2fb 100%);
}

#materi.chapter-canvas .content {
  max-width: 1280px;
  margin: 0 auto;
}

.jp-lesson-hero {
  position: relative;
  margin: 0 auto 2rem;
  max-width: 1240px;
}

.jp-lesson-tabs {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 0;
  margin-left: 1rem;
}

.jp-lesson-tab {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.3rem;
  border: var(--jp-border);
  border-bottom: 0;
  font-weight: 900;
  line-height: 1;
}

.jp-lesson-tab-dark {
  border-radius: 10px 0 0 0;
  background: var(--jp-accent-dark);
  color: var(--jp-ink);
  letter-spacing: 0.03em;
}

.jp-lesson-tab-accent {
  min-width: min(560px, 75vw);
  border-radius: 0 10px 0 0;
  background: var(--jp-accent);
  color: var(--jp-ink);
  font-size: clamp(1rem, 1.1vw + 0.8rem, 1.55rem);
}

.jp-lesson-panel {
  position: relative;
  margin-top: -2px;
  border: 3px solid var(--jp-accent);
  border-radius: 0 14px 14px 14px;
  background: var(--jp-paper);
  box-shadow: 12px 14px 0 rgba(191, 16, 38, 0.12);
  padding: 2.2rem 2.6rem 2rem;
  overflow: hidden;
}

.jp-lesson-panel::after {
  content: "";
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  width: 120px;
  height: 120px;
  background: repeating-linear-gradient(
    135deg,
    rgba(191, 16, 38, 0.22) 0,
    rgba(191, 16, 38, 0.22) 2px,
    transparent 2px,
    transparent 8px
  );
  opacity: 0.7;
  pointer-events: none;
}

.jp-lesson-stamp {
  position: absolute;
  top: 1.1rem;
  right: 1.4rem;
  width: 96px;
  height: 96px;
  border: 3px solid rgba(35, 31, 32, 0.16);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: rgba(35, 31, 32, 0.72);
  background: rgba(255, 255, 255, 0.88);
  font-size: 1.1rem;
  font-weight: 800;
}

.jp-lesson-heading {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  min-height: 190px;
  padding-right: 120px;
}

.jp-lesson-number {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  justify-items: center;
  width: 100%;
  min-height: 150px;
  border-right: 2px solid rgba(191, 16, 38, 0.34);
  color: var(--jp-accent-dark);
}

.jp-lesson-number span {
  font-size: 2rem;
  font-weight: 700;
}

.jp-lesson-number strong {
  color: var(--jp-accent);
  font-size: clamp(4rem, 4vw + 2rem, 6.5rem);
  line-height: 1;
  font-weight: 900;
}

.jp-lesson-heading-copy {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.jp-lesson-heading-copy .neo-chapter-badge {
  align-self: flex-start;
  min-height: auto;
  padding: 0.45rem 0.8rem;
  border: var(--jp-border);
  border-radius: 999px;
  background: #fff3a6;
  color: var(--jp-accent-dark);
  box-shadow: 4px 4px 0 rgba(35, 31, 32, 0.14);
  font-size: 0.88rem;
  font-weight: 900;
}

.jp-lesson-heading-copy h1 {
  margin: 0;
  color: #141222;
  font-size: clamp(2rem, 2.4vw + 1rem, 4rem);
  line-height: 1.06;
  font-weight: 900;
}

.jp-lesson-heading-copy p {
  margin: 0;
  color: var(--jp-accent);
  font-size: clamp(1rem, 0.9vw + 0.78rem, 1.35rem);
  font-weight: 700;
}

.jp-lesson-question {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.35rem;
  border-top: 5px solid var(--jp-accent);
}

.jp-lesson-question-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: var(--jp-accent);
  color: var(--jp-ink);
  font-size: 2.4rem;
  font-weight: 900;
  box-shadow: 5px 5px 0 rgba(191, 16, 38, 0.18);
}

.jp-lesson-question-copy small {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: var(--jp-accent);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.jp-lesson-question-copy p {
  margin: 0;
  color: #473f46;
  font-size: clamp(1rem, 0.7vw + 0.86rem, 1.35rem);
  line-height: 1.55;
  font-weight: 600;
}

.jp-reader-toolbar {
  margin-inline: auto;
  margin-bottom: 1.4rem;
  max-width: 1240px;
}

.jp-translation-toggle {
  min-height: 58px;
  padding: 0.9rem 1.45rem;
  border: var(--jp-border);
  border-radius: 999px;
  background: linear-gradient(180deg, #2f1b36 0%, #1b1224 100%);
  box-shadow: 6px 7px 0 rgba(35, 31, 32, 0.82);
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
}

.jp-translation-toggle:hover {
  color: #fff;
  transform: translateY(1px);
}

.jp-html-reader {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.jp-html-page-block {
  margin: 0 auto;
  width: 100%;
  max-width: 1240px;
}

.jp-study-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: var(--jp-border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--jp-paper);
  box-shadow: var(--jp-shadow);
}

.jp-study-card-head {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: stretch;
  background: linear-gradient(180deg, #c51129 0%, #ae0e22 100%);
}

.jp-study-card-step {
  display: grid;
  place-items: center;
  padding: 0.8rem;
  background: #201b1d;
  color: #fff4a3;
  font-size: clamp(1.8rem, 1vw + 1.4rem, 2.7rem);
  font-weight: 900;
  line-height: 1;
}

.jp-study-card-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.95rem 1.15rem;
  background:
    linear-gradient(180deg, rgba(197, 17, 41, 0.98), rgba(174, 14, 34, 0.98)),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.08) 0,
      rgba(255, 255, 255, 0.08) 2px,
      transparent 2px,
      transparent 12px
    );
}

.jp-study-card-copy h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.2rem, 0.9vw + 1rem, 2rem);
  font-weight: 900;
  line-height: 1.15;
}

.jp-study-card-copy p {
  margin: 0;
  color: #fff5b4;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.45;
}

.jp-svg-page-meta {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.85rem;
  padding: 0.4rem 0.85rem;
  border: var(--jp-border);
  border-radius: 999px;
  background: #eef7d8;
  box-shadow: 4px 4px 0 rgba(35, 31, 32, 0.15);
  color: var(--jp-accent-dark);
  font-size: 0.92rem;
  font-weight: 900;
}

.jp-html-page-shell {
  position: relative;
  width: min(100%, 1240px);
  min-height: 240px;
  margin: 0 auto;
  border-top: var(--jp-border);
  overflow: hidden;
  background: var(--jp-paper);
}

.jp-html-page-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.72);
}

.jp-page-image-shell {
  position: relative;
  width: min(100%, 1240px);
  min-height: 240px;
  margin: 0 auto;
  border-top: var(--jp-border);
  overflow: hidden;
  background: var(--jp-paper);
  aspect-ratio: var(--page-width) / var(--page-height);
}

.jp-page-image-inner {
  position: relative;
  width: 0;
  height: 0;
  transform-origin: top left;
  will-change: transform;
}

.jp-page-image {
  position: absolute;
  inset: 0 auto auto 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
}

.jp-audio-hotspot {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.24rem;
  padding: 0;
  border: 1px solid rgba(35, 31, 32, 0.38);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #2b2b2b;
  font-size: 0.86rem;
  font-weight: 800;
  box-shadow: 0 3px 8px rgba(35, 31, 32, 0.16);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.jp-audio-hotspot:hover {
  transform: translateY(-1px);
  background: #fff7c7;
  box-shadow: 0 5px 12px rgba(35, 31, 32, 0.2);
}

.jp-audio-hotspot.is-playing {
  background: #fff1a8;
}

.jp-audio-hotspot-icon,
.jp-audio-hotspot-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.jp-pdf2html-frame-shell {
  position: relative;
  width: min(100%, 1240px);
  margin: 0 auto;
  border: var(--jp-border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--jp-paper);
  box-shadow: var(--jp-shadow);
}

.jp-pdf2html-frame {
  display: block;
  width: 100%;
  min-height: 240px;
  border: 0;
  background: #fff;
}

.jp-html-page-inner {
  position: relative;
  width: 0;
  height: 0;
  transform-origin: top left;
  will-change: transform;
}

.jp-html-image {
  position: absolute;
  z-index: 1;
  display: block;
  max-width: none;
  object-fit: contain;
  image-rendering: auto;
}

.jp-html-text {
  position: absolute;
  z-index: 2;
  display: block;
  padding: 0;
  margin: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--jp-ink);
  text-align: left;
  white-space: pre-wrap;
  overflow: visible;
  line-height: 1.14;
  letter-spacing: 0;
  appearance: none;
  box-shadow: none;
}

.jp-kind-meta {
  pointer-events: none;
}

.jp-kind-id {
  color: #595259 !important;
}

body.jp-hide-id .jp-kind-id[data-translation="id"] {
  display: none;
}

.jp-kind-audio-code,
.jp-audio-target {
  cursor: pointer;
}

.jp-audio-target {
  border-radius: 8px;
  transition: background-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.jp-audio-target:hover {
  background: rgba(255, 216, 190, 0.72);
  box-shadow: inset 0 0 0 2px rgba(191, 16, 38, 0.18);
}

.jp-audio-target.is-playing {
  background: rgba(255, 241, 168, 0.96);
  box-shadow: inset 0 0 0 2px rgba(35, 31, 32, 0.22);
}

.jp-kind-audio-code {
  color: var(--jp-accent) !important;
  font-weight: 900 !important;
}

.jp-unused-audio {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1rem 1.1rem 1.2rem;
  border: var(--jp-border);
  border-radius: 16px;
  background: #f0fbfd;
  box-shadow: var(--jp-shadow);
}

.jp-unused-audio h2 {
  margin: 0 0 0.8rem;
  color: var(--jp-ink);
  font-size: 1rem;
  font-weight: 900;
}

.jp-unused-audio-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.jp-unused-audio-grid .btn {
  border: var(--jp-border);
  border-radius: 999px;
  background: #fff7c7;
  color: var(--jp-ink);
  box-shadow: 4px 4px 0 rgba(35, 31, 32, 0.16);
  font-weight: 800;
}

.jp-library-wrap {
  max-width: 1280px;
}

.jp-library-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1.4rem;
  align-items: stretch;
}

.jp-library-hero-copy,
.jp-library-hero-panel,
.jp-series-hero,
.jp-book-card {
  border: var(--jp-border);
  border-radius: 16px;
  background: var(--jp-paper);
  box-shadow: var(--jp-shadow);
}

.jp-library-hero-copy {
  padding: clamp(1.25rem, 2vw, 2rem);
}

.jp-library-eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.8rem;
  padding: 0.4rem 0.75rem;
  border: var(--jp-border);
  border-radius: 999px;
  background: #fff3a6;
  color: var(--jp-accent-dark);
  font-size: 0.88rem;
  font-weight: 900;
}

.jp-library-title {
  margin: 0 0 0.7rem;
  color: #141222;
  font-size: clamp(2rem, 2vw + 1.2rem, 3.7rem);
  line-height: 1.04;
  font-weight: 900;
}

.jp-library-title-sm {
  font-size: clamp(1.7rem, 1.5vw + 1.1rem, 3rem);
}

.jp-library-lead {
  margin: 0;
  color: #544b52;
  font-size: clamp(1rem, 0.6vw + 0.92rem, 1.15rem);
  line-height: 1.7;
}

.jp-library-lead-sm {
  max-width: 56ch;
}

.jp-library-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.jp-library-stat {
  min-width: 136px;
  padding: 0.95rem 1rem;
  border: var(--jp-border);
  border-radius: 14px;
  background: #fff9e8;
  box-shadow: 4px 4px 0 rgba(35, 31, 32, 0.16);
}

.jp-library-stat strong {
  display: block;
  color: var(--jp-accent);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
}

.jp-library-stat span {
  display: block;
  margin-top: 0.35rem;
  color: #4e454d;
  font-size: 0.88rem;
  font-weight: 700;
}

.jp-library-hero-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  align-content: stretch;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 240, 0.96)),
    repeating-linear-gradient(
      135deg,
      rgba(191, 16, 38, 0.08) 0,
      rgba(191, 16, 38, 0.08) 2px,
      transparent 2px,
      transparent 12px
    );
}

.jp-library-hero-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 150px;
  padding: 1.15rem 1.2rem;
  border: var(--jp-border);
  border-radius: 16px;
  box-shadow: 5px 6px 0 rgba(35, 31, 32, 0.16);
}

.jp-library-hero-card span,
.jp-library-hero-card small {
  color: #4e454d;
  font-weight: 700;
}

.jp-library-hero-card strong {
  margin: 0.15rem 0 0.3rem;
  color: #141222;
  font-size: clamp(1.8rem, 1vw + 1.3rem, 2.6rem);
  font-weight: 900;
}

.jp-accent-red {
  background: #ffe4df;
}

.jp-accent-ink {
  background: #ebf8ff;
}

.jp-book-card {
  display: block;
  height: 100%;
  overflow: hidden;
  color: var(--jp-ink);
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.jp-book-card:hover {
  color: var(--jp-ink);
  transform: translate(4px, 4px);
  box-shadow: 4px 5px 0 rgba(35, 31, 32, 0.9);
}

.jp-book-card-media {
  border-bottom: var(--jp-border);
  background:
    radial-gradient(circle at 78% 22%, rgba(191, 16, 38, 0.12), transparent 18%),
    linear-gradient(180deg, #f8efe5 0%, #f6e8e0 100%);
}

.jp-book-card-media img {
  display: block;
  width: 100%;
  height: auto;
}

.jp-book-card-body {
  padding: 18px 20px 20px;
}

.jp-book-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.jp-book-card-meta span {
  color: #655c63;
  font-size: 0.88rem;
  font-weight: 800;
}

.jp-series-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
  gap: 1.25rem;
  align-items: center;
  padding: clamp(1rem, 2vw, 1.5rem);
}

.jp-series-hero-copy {
  min-width: 0;
}

.jp-series-hero-media img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(35, 31, 32, 0.15);
  border-radius: 8px;
  background: #fff;
}

.jp-chapter-catalog-card {
  height: 100%;
}

.jp-chapter-catalog-media {
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 320px;
  background:
    linear-gradient(180deg, rgba(255, 244, 244, 0.98), rgba(250, 235, 228, 0.98));
}

.jp-chapter-catalog-media img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.jp-chapter-catalog-body {
  display: flex;
  flex-direction: column;
  min-height: 168px;
}

.jp-chapter-catalog-sub {
  color: var(--jp-accent);
  font-weight: 800;
}

@media (max-width: 991.98px) {
  .jp-library-hero,
  .jp-series-hero {
    grid-template-columns: 1fr;
  }

  .jp-lesson-panel {
    padding: 1.8rem 1.3rem 1.5rem;
  }

  .jp-lesson-heading {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-right: 0;
  }

  .jp-lesson-number {
    grid-template-columns: 28px auto 28px;
    justify-content: flex-start;
    width: fit-content;
    min-height: auto;
    padding-right: 1rem;
    border-right: 0;
    border-bottom: 2px solid rgba(191, 16, 38, 0.34);
  }

  .jp-lesson-stamp {
    width: 72px;
    height: 72px;
    font-size: 0.92rem;
  }
}

@media (max-width: 575.98px) {
  .jp-library-stat {
    flex: 1 1 calc(50% - 0.85rem);
    min-width: 0;
  }

  .jp-lesson-tabs {
    margin-left: 0;
  }

  .jp-lesson-tab {
    min-height: 46px;
    padding: 0.65rem 0.85rem;
  }

  .jp-lesson-tab-accent {
    min-width: 0;
    flex: 1 1 auto;
  }

  .jp-lesson-panel {
    border-radius: 0 0 14px 14px;
  }

  .jp-lesson-stamp {
    top: 0.9rem;
    right: 0.9rem;
    width: 64px;
    height: 64px;
  }

  .jp-lesson-question {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .jp-lesson-question-icon {
    width: 50px;
    height: 50px;
    font-size: 1.9rem;
  }

  .jp-translation-toggle {
    width: 100%;
    font-size: 0.96rem;
  }

  .jp-study-card-head {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .jp-study-card-copy {
    padding: 0.85rem 0.95rem;
  }

  .jp-svg-page-meta {
    margin-bottom: 0.7rem;
  }

  .jp-html-page-shell {
    border-radius: 12px;
  }

  .jp-pdf2html-frame-shell {
    border-radius: 12px;
  }

  .jp-chapter-catalog-media {
    min-height: 240px;
  }
}
