.demo-wrap {
  padding: clamp(34px, 6vw, 78px) clamp(18px, 6vw, 88px) clamp(72px, 8vw, 110px);
  background:
    radial-gradient(circle at 85% 4%, rgba(255, 216, 74, .2), transparent 28%),
    linear-gradient(145deg, #eeebf1, #f9f7fb 55%, #ece9ef);
}

.pk-nav-store {
  min-height: 44px;
  padding: 9px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f5b400;
  color: #141416;
  font-size: .72rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.demo-intro {
  max-width: 920px;
  margin: 0 auto 28px;
  text-align: center;
}

.demo-intro h1 {
  margin: 14px 0 12px;
  font: 850 clamp(2.7rem, 6vw, 6.3rem)/.9 "League Spartan", Inter, sans-serif;
  letter-spacing: -.055em;
}

.demo-intro p:last-child {
  max-width: 690px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.pk-demo {
  width: min(1180px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #2a292d;
  border-radius: 34px;
  background: #f2f1f6;
  box-shadow: 0 36px 90px rgba(20, 20, 22, .24);
}

.demo-topbar {
  min-height: 88px;
  padding: 16px clamp(18px, 4vw, 36px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #0d0d0f;
  color: #fff;
}

.demo-brand {
  width: min(310px, 46vw);
  max-height: 58px;
  object-fit: contain;
  object-position: left center;
}

.demo-store {
  min-height: 48px;
  padding: 11px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ffd84a;
  border-radius: 999px;
  background: #f5b400;
  color: #141416;
  font-size: .78rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.demo-tabs {
  padding: 12px 18px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  background: #fff;
  border-bottom: 1px solid #dedbe4;
}

.demo-tab {
  min-height: 48px;
  padding: 10px 12px;
  cursor: pointer;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #55545c;
  font: 800 .82rem/1.1 Inter, sans-serif;
}

.demo-tab[aria-selected="true"] {
  background: #141416;
  color: #ffd84a;
}

.demo-tab:focus-visible,
.demo-book:focus-visible,
.page-step:focus-visible,
.detail-close:focus-visible {
  outline: 3px solid #f5b400;
  outline-offset: 3px;
}

.demo-panel {
  min-height: 620px;
  padding: clamp(24px, 4vw, 46px);
}

.demo-panel[hidden] {
  display: none;
}

.demo-story {
  margin: 0 0 26px;
  color: #7a5900;
  font: 850 clamp(1.15rem, 2.4vw, 1.55rem)/1.2 "League Spartan", Inter, sans-serif;
}

.demo-heading-row {
  margin-bottom: 24px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.demo-heading-row h2 {
  margin: 0;
  font: 850 clamp(2.1rem, 4vw, 4rem)/.95 "League Spartan", Inter, sans-serif;
  letter-spacing: -.045em;
}

.demo-heading-row p {
  max-width: 470px;
  margin: 0;
  color: #666670;
  font-size: .86rem;
}

.demo-library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.demo-book {
  min-height: 330px;
  padding: 20px;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 16px;
  align-content: start;
  cursor: pointer;
  text-align: left;
  border: 1px solid #dedbe4;
  border-radius: 22px;
  background: #fff;
  color: #141416;
  box-shadow: 0 13px 26px rgba(20, 20, 22, .07);
}

.library-goal-row {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.library-goal-card {
  min-height: 132px;
  padding: 20px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 15px;
  align-items: center;
  border: 1px solid #dedbe4;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 13px 26px rgba(20, 20, 22, .07);
}

.goal-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #141416;
  color: #ffd84a;
  font-size: 1.3rem;
  font-weight: 900;
}

.library-goal-card div {
  display: grid;
  gap: 2px;
}

.goal-label,
.goal-caption {
  color: #666670;
  font-size: .7rem;
}

.library-goal-card strong {
  font-size: 1.05rem;
}

.goal-percent {
  color: #9a7000;
  font-size: 1.25rem;
  font-weight: 900;
}

.demo-cover {
  width: 74px;
  aspect-ratio: 2 / 3;
  padding: 8px;
  display: grid;
  place-items: center;
  border-radius: 8px 13px 13px 8px;
  background: linear-gradient(145deg, var(--cover-a), var(--cover-b));
  color: #fff;
  box-shadow: inset 7px 0 rgba(0, 0, 0, .18), 0 8px 16px rgba(0, 0, 0, .2);
  font: 850 .66rem/1.05 Georgia, serif;
  text-align: center;
  text-transform: uppercase;
}

.demo-book strong {
  display: block;
  font-size: 1rem;
  line-height: 1.15;
}

.demo-book small {
  color: #666670;
}

.demo-progress {
  grid-column: 1 / -1;
  align-self: end;
}

.progress-meta {
  margin-bottom: 7px;
  display: flex;
  justify-content: space-between;
  color: #666670;
  font-size: .74rem;
  font-weight: 750;
}

.demo-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e4e8;
}

.demo-meter i {
  width: var(--progress);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #f5b400, #ffd84a);
}

.demo-detail {
  width: min(560px, calc(100% - 28px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 26px;
  background: #f7f5fa;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .42);
}

.demo-detail::backdrop {
  background: rgba(8, 8, 10, .72);
  backdrop-filter: blur(8px);
}

.detail-head {
  padding: 26px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  background: #141416;
  color: #fff;
}

.detail-head h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.05;
}

.detail-head p {
  margin: 7px 0 0;
  color: #c8c8cf;
}

.detail-close {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  cursor: pointer;
  border: 1px solid #55545c;
  border-radius: 50%;
  background: #25252a;
  color: #fff;
  font-size: 1.4rem;
}

.detail-body {
  padding: 26px;
}

.detail-progress-number {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.detail-progress-number strong {
  font-size: 2rem;
}

.page-controls {
  margin: 18px 0 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.page-step {
  min-height: 48px;
  cursor: pointer;
  border: 1px solid #c9c6ce;
  border-radius: 14px;
  background: #fff;
  color: #141416;
  font-weight: 900;
}

.detail-note {
  padding: 17px;
  border-left: 5px solid #f5b400;
  border-radius: 8px 14px 14px 8px;
  background: #fff;
}

.detail-note strong,
.detail-note span {
  display: block;
}

.detail-note span {
  margin-top: 5px;
  color: #666670;
  font-size: .85rem;
}

.demo-shelf {
  padding: 36px 28px 18px;
  display: flex;
  align-items: end;
  gap: 7px;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(#efe4cc, #fff8e9);
  border-bottom: 22px solid #79421f;
  box-shadow: inset 0 -8px #4f2814, 0 18px 38px rgba(74, 41, 18, .16);
}

.book-spine {
  width: clamp(38px, 7vw, 76px);
  height: var(--height);
  padding: 12px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px 6px 2px 2px;
  background: var(--spine);
  color: #fff;
  box-shadow: inset 6px 0 rgba(0, 0, 0, .16), 4px 5px 8px rgba(0, 0, 0, .2);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font: 800 clamp(.58rem, 1.2vw, .78rem)/1 Georgia, serif;
  text-transform: uppercase;
}

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

.demo-card {
  padding: 24px;
  border: 1px solid #dedbe4;
  border-radius: 22px;
  background: #fff;
}

.demo-card h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}

.demo-card p {
  margin: 0;
  color: #666670;
  font-size: .88rem;
}

.due-date {
  margin-top: 20px;
  color: #8a6500;
  font-weight: 900;
}

.reminder-chip {
  margin-top: 12px;
  padding: 9px 12px;
  display: inline-flex;
  border-radius: 999px;
  background: #fff4c4;
  color: #6f5200;
  font-size: .72rem;
  font-weight: 850;
}

.goal-feature {
  grid-column: 1 / -1;
  color: #fff;
  background: #141416;
}

.goal-feature h3 {
  color: #ffd84a;
}

.goal-number {
  margin: 15px 0 8px;
  color: #f5b400;
  font-size: 2.7rem;
  font-weight: 900;
}

.demo-map {
  min-height: 350px;
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background-color: #dedcd3;
  background-image:
    linear-gradient(32deg, transparent 44%, rgba(255,255,255,.9) 45%, rgba(255,255,255,.9) 51%, transparent 52%),
    linear-gradient(112deg, transparent 43%, rgba(255,255,255,.72) 44%, rgba(255,255,255,.72) 49%, transparent 50%);
  border: 1px solid #c8c5bd;
}

.map-water {
  position: absolute;
  right: -12%;
  bottom: -22%;
  width: 55%;
  height: 58%;
  border-radius: 50% 0 0 0;
  background: #b8d8e3;
}

.map-pin {
  width: 46px;
  height: 46px;
  position: absolute;
  display: grid;
  place-items: center;
  border: 4px solid #fff;
  border-radius: 50% 50% 50% 12%;
  background: #f5b400;
  color: #141416;
  box-shadow: 0 8px 18px rgba(0,0,0,.25);
  transform: rotate(-45deg);
  font-weight: 900;
}

.map-pin span {
  transform: rotate(45deg);
}

.map-pin.one { left: 23%; top: 30%; }
.map-pin.two { right: 27%; top: 20%; }
.map-pin.three { left: 46%; bottom: 22%; }

.place-list {
  display: grid;
  gap: 10px;
}

.place-list .demo-card {
  padding: 18px;
}

.demo-disclaimer {
  margin: 18px 0 0;
  color: #666670;
  font-size: .75rem;
}

@media (max-width: 820px) {
  .demo-library-grid { grid-template-columns: 1fr; }
  .demo-book { min-height: 190px; }
  .library-goal-row { grid-template-columns: 1fr; }
  .demo-heading-row { align-items: start; flex-direction: column; }
  .demo-panel { min-height: 560px; }
}

@media (max-width: 650px) {
  .demo-wrap { padding-inline: 10px; }
  .pk-demo { border-radius: 24px; }
  .demo-topbar { min-height: 74px; }
  .demo-brand { width: 185px; }
  .demo-store { padding-inline: 13px; font-size: .68rem; }
  .pk-nav-store { padding-inline: 12px; font-size: .63rem; }
  .demo-tabs { grid-template-columns: repeat(5, minmax(88px, 1fr)); overflow-x: auto; }
  .demo-panel { padding: 24px 18px 34px; }
  .demo-loan-grid, .goal-grid, .nearby-grid { grid-template-columns: 1fr; }
  .goal-feature { grid-column: auto; }
  .library-goal-card { grid-template-columns: 44px 1fr auto; }
  .nearby-grid .demo-map { min-height: 300px; }
}
