#parkour-shop {
  --shop-accent:#ffd38c;
  --shop-wash:#423228;
  box-sizing:border-box;
  width:min(590px, calc(100vw - 22px));
  max-height:calc(100dvh - 22px);
  padding:clamp(13px, 4vw, 27px);
  border-color:color-mix(in srgb, var(--shop-accent) 48%, transparent);
  background:radial-gradient(ellipse at top right, var(--shop-wash), #172125 65%);
  overflow:auto;
  overscroll-behavior:contain;
}
#parkour-shop[data-shop=bookseller] {--shop-accent:#e4c9fb;--shop-wash:#392943}
#parkour-shop[data-shop=burger] {--shop-accent:#ffbf9c;--shop-wash:#4a2d2a}
#parkour-shop::backdrop {background:#080d13b3;backdrop-filter:blur(3px)}
#parkour-shop .shop-location {
  color:var(--shop-accent);
  font:750 11px ui-monospace, monospace;
  letter-spacing:.14em;
}
#parkour-shop h2 {
  margin:.18em 0 .36em;
  font-size:clamp(25px, 5.8vw, 42px);
  letter-spacing:-.055em;
  line-height:1.02;
}
#parkour-shop h2:focus {outline:none}
#parkour-shop .shop-meters {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px;
}
#parkour-shop .shop-meters > div {
  display:grid;
  gap:2px;
  padding:7px 9px;
  border:1px solid #f5e5c42f;
  border-radius:6px;
  background:#10191bae;
}
#parkour-shop .shop-meters span {font-size:clamp(10px, 2.8vw, 12px);color:#d8ded9}
#parkour-shop .shop-meters strong {
  font:800 clamp(14px, 3.7vw, 19px) ui-monospace, monospace;
  color:var(--shop-accent);
  font-variant-numeric:tabular-nums;
}
#parkour-shop[data-urgent=true] [data-shop-time] {color:#ffb49b}
#parkour-shop form {margin-top:10px}
#parkour-shop table {width:100%;border-collapse:collapse;text-align:left}
#parkour-shop caption {
  margin:2px 0 4px;
  text-align:left;
  color:#fff5e6;
  font-size:clamp(15px, 4vw, 19px);
  font-weight:750;
}
#parkour-shop thead th {
  color:var(--shop-accent);
  font:700 10px ui-monospace, monospace;
  letter-spacing:.07em;
  text-transform:uppercase;
}
#parkour-shop th, #parkour-shop td {padding:0 6px;border-bottom:1px solid #f5e5c427}
#parkour-shop th {padding-block:4px}
#parkour-shop th:last-child, #parkour-shop td:last-child {text-align:right;white-space:nowrap}
#parkour-shop td {font-size:clamp(11px, 3vw, 14px);line-height:1.18}
#parkour-shop td:last-child {color:var(--shop-accent);font-weight:750}
#parkour-shop td label {
  display:flex;
  align-items:center;
  gap:7px;
  min-height:43px;
  padding-block:4px;
  font-weight:680;
  cursor:pointer;
}
#parkour-shop input[type=radio] {flex:none;margin:0;accent-color:var(--shop-accent)}
#parkour-shop tr:has(input:checked) {background:color-mix(in srgb, var(--shop-accent) 16%, transparent)}
#parkour-shop tr:has(input:disabled) td {color:#a0aaa7}
#parkour-shop label:has(input:disabled) {cursor:default}
#parkour-shop #parkour-shop-note, #parkour-shop .shop-status {
  margin:6px 0 0;
  font-size:clamp(11px, 2.8vw, 12px);
  line-height:1.28;
}
#parkour-shop .shop-status {color:#ffb49b}
#parkour-shop .shop-status:empty {margin:0}
#parkour-shop .shop-actions {display:flex;justify-content:flex-end;gap:8px;margin-top:11px}
#parkour-shop .shop-actions button {
  min-height:42px;
  padding:7px 12px;
  font-size:clamp(12px, 3.6vw, 14px);
  touch-action:manipulation;
}
#parkour-shop .shop-actions button:disabled {opacity:.5;cursor:default}

@media (max-height:510px) {
  #parkour-shop {padding-block:10px}
  #parkour-shop td label {min-height:33px}
  #parkour-shop .shop-actions button {min-height:35px}
}

#parkour-shop {
  --dialog-width: 940px;
  width: min(var(--dialog-width), calc(100vw - 24px));
  max-width: none;
}
#parkour-shop .shop-layout { display:grid; grid-template-columns:minmax(0, .97fr) minmax(0, 1.03fr); gap:16px; align-items:start; margin-top:12px }
#parkour-shop .shop-layout form { margin-top:0; min-width:0 }
.shop-interior { position:relative; margin:0; overflow:hidden; border:1px solid #d2b38b70; border-radius:9px; background:#211e1c }
.shop-interior canvas { display:block; width:100%; height:auto; aspect-ratio: 8 / 5 }
.shop-interior figcaption {
  position:absolute; left:0; right:0; bottom:0; padding:7px 9px;
  background:linear-gradient(0deg,#110f12ef,#14101712); color:#ffebcb; font-size:12px; font-weight:750
}
.shop-recovery {
  position:absolute; inset:0; display:grid; align-content:center; justify-items:center; gap:7px; padding:15px;
  background:radial-gradient(ellipse at 50% 44%,#306340f2,#132722df 64%); color:#e5ffd5; text-align:center
}
.shop-recovery strong { font-size:clamp(18px, 4vw, 30px); line-height:1.1 }
.shop-recovery span { color:#bff8ac; font:750 14px ui-monospace,monospace }
.shop-recovery-bar { width: min(190px,80%); height:8px; border:1px solid #d6eeb36e; border-radius:9px; background:#172d25; overflow:hidden }
.shop-recovery-bar i { display:block; width:var(--energy-to); height:100%; border-radius:9px; background:linear-gradient(90deg,#67c09b,#d3ff95) }
#parkour-shop[data-recovering="true"] .shop-recovery-bar i { animation: shop-fill .69s cubic-bezier(.19,.55,.24,1) both }
@keyframes shop-fill { from {width:var(--energy-from)} to {width:var(--energy-to)} }
@media (prefers-reduced-motion: reduce) {
  #parkour-shop[data-recovering="true"] .shop-recovery-bar i { animation:none }
}
@media (max-width: 700px) {
  #parkour-shop .shop-layout { grid-template-columns:1fr; gap:7px; margin-top:8px }
  .shop-interior canvas { max-height:clamp(105px,20dvh,170px); object-fit:cover }
  #parkour-shop .shop-layout form { margin-top:0 }
  #parkour-shop h2 { margin-bottom:.24em }
}

#parkour-shop .shop-book-gift {
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);
  gap:16px;
  align-items:center;
  margin-top:12px;
  font-size:clamp(13px,2.7vw,16px);
  line-height:1.5;
}
.shop-book-gift p {margin:.45em 0 .7em}
.shop-book-gift .book-author {color:#ead2ff;letter-spacing:.11em;font-size:12px}
.shop-book-gift button {min-height:44px;font-size:clamp(12px,2.7vw,14px)}
.book-gift-prize {
  position:relative;
  display:grid;
  justify-items:center;
  gap:8px;
  isolation:isolate;
  overflow:hidden;
  padding:17px 8px 12px;
  border:1px solid #e8b75c65;
  border-radius:10px;
  background:radial-gradient(ellipse at 50% 28%,#9b6b25,#34281f 72%);
  text-align:center;
}
.book-box {
  position:relative;
  width:82px;
  height:53px;
  margin:14px 0 4px;
  border:1px solid #ffe1a180;
  border-radius:4px 4px 8px 8px;
  background:linear-gradient(90deg,transparent 41%,#ffc76b 41% 59%,transparent 59%),linear-gradient(135deg,#ee6d65,#a63251);
  box-shadow:0 7px 12px #1e0b095c;
}
.book-box span {
  position:absolute;
  top:-8px;
  left:-5px;
  right:-5px;
  height:17px;
  border:1px solid #ffe1a1;
  border-radius:4px;
  background:linear-gradient(90deg,transparent 41%,#fff3a2 41% 59%,transparent 59%),linear-gradient(135deg,#ff9d75,#d94e65);
  transform-origin:8% 100%;
}
[data-book-gift][data-opened=true] .book-box span {
  transform:translate(-5px,-15px) rotate(-19deg);
  transition:transform .38s cubic-bezier(.16,1,.3,1);
}
.book-confetti {position:absolute;inset:0;pointer-events:none}
.book-confetti i {
  position:absolute;
  top:45%;
  left:50%;
  width:7px;
  height:10px;
  border-radius:1px;
  animation:book-burst .85s cubic-bezier(.13,.61,.44,1) both;
}
@keyframes book-burst {
  from {opacity:1;transform:translate(0,0) rotate(0)}
  to {opacity:0;transform:translate(var(--x),var(--y)) rotate(var(--turn))}
}
.shop-book-gift .book-reward {z-index:1;color:#ffe391;font-weight:850;margin:0;font-variant-numeric:tabular-nums}
@media(max-width:550px) {
  #parkour-shop .shop-book-gift {grid-template-columns:1fr;gap:10px}
  .book-gift-prize {padding-top:10px}
}
@media(prefers-reduced-motion:reduce) {
  [data-book-gift][data-opened=true] .book-box span {transition:none}
}
.book-voice-credit{display:block;margin-top:.48rem;color:#a8b8a9;font-size:.71rem}

.book-stars {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:clamp(7px,2vw,14px);
}
.book-star {
  z-index:1;
  width:clamp(64px,15vw,100px);
  aspect-ratio:1;
  background:linear-gradient(145deg,#fffbc0 8%,#ffda4e 45%,#f6a222 95%);
  clip-path:polygon(50% 0,64% 34%,100% 38%,74% 62%,81% 98%,50% 80%,19% 98%,26% 62%,0 38%,36% 34%);
  animation:book-star-reveal .47s cubic-bezier(.17,.86,.4,1.2) both;
}
.book-star:not(:nth-child(2)) {width:clamp(24px,7vw,42px);animation-delay:.09s}
.book-star:first-child {align-self:end;margin-bottom:13px}
.book-star:last-child {align-self:start;margin-top:12px}
.book-confetti[data-phase=arrival] i {top:29%}
.book-confetti[data-phase=opened] i {top:37%}
.book-gift-details {
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:clamp(8px,2vw,14px);
  width:100%;
  max-width:340px;
  padding:7px 2px 2px;
}
.book-gift-details:focus-visible {outline:2px solid #ffe1a1;outline-offset:2px}
.book-gift-details img {
  flex:none;
  width:clamp(72px,22vw,102px);
  height:auto;
  border:1px solid #ffe1a180;
  border-radius:4px;
  box-shadow:0 6px 14px #1e0b0980;
}
.book-gift-links {display:grid;gap:7px;min-width:0}
.book-gift-links :is(a,button) {
  display:grid;
  place-items:center;
  min-height:44px;
  padding:.44rem .65rem;
  font-size:clamp(12px,2.7vw,14px);
  line-height:1.26;
}
.book-gift-links a {
  border:1px solid #ffd38c80;
  border-radius:6px;
  background:#2b251f;
  color:#ffe3ac;
  text-decoration:none;
}
.book-gift-links a:is(:hover,:focus-visible) {border-color:#ffe1a1;text-decoration:underline}
@keyframes book-star-reveal {
  from {opacity:.25;transform:scale(.38) rotate(-24deg)}
  to {opacity:1;transform:scale(1) rotate(0)}
}
@media(max-height:650px) {
  .book-gift-prize {gap:6px;padding:8px 6px}
  .book-star {width:58px}
  .book-star:not(:nth-child(2)) {width:23px}
  .book-box {width:62px;height:36px}
  .book-gift-details img {width:min(76px,32%)}
}
@media(prefers-reduced-motion:reduce) {
  .book-star,.book-confetti i {animation:none}
}
