.ww-story {
  box-sizing: border-box;
  width: min(1040px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #73664c;
  border-radius: 18px;
  background: #142738;
  color: #fff2d7;
  box-shadow: 0 18px 80px #03101cb3;
  font-family: inherit;
}
.ww-story:not([open]) { display: none; }
.ww-story::backdrop { background: #07101be8; }
.ww-story-fallback {
  position: fixed;
  inset: 0;
  z-index: 999;
  box-shadow: 0 0 0 110vmax #07101be8;
}
.ww-story-page {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(275px, 1fr);
  align-items: center;
}
.ww-story-frame { min-width: 0; background: #0d1d2a; }
.ww-story-art { display: block; width: 100%; height: auto; }
.ww-story-body { padding: clamp(21px, 3vw, 38px); }
.ww-story-number {
  display: block; color: #f8cd7d; font-size: .8rem; font-weight: 800;
  line-height: 1.5; letter-spacing: .08em;
}
.ww-story-title {
  margin: 8px 0 13px; color: #fff2d7; font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.2; text-wrap: balance;
}
.ww-story-copy { margin: 0; color: #dce7e6; font-size: 1rem; line-height: 1.65; }
.ww-story-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.ww-story-actions button {
  appearance: none; min-height: 44px; padding: 8px 15px; margin: 0; border-radius: 10px;
  font: inherit; font-weight: 800; line-height: 1.4; cursor: pointer;
}
.ww-story-back { border: 1px solid #577181; background: transparent; color: #d7e5e7; }
.ww-story-start { border: 1px solid #ffe1a4; background: #ffcd72; color: #30261c; }
.ww-story-actions button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (max-width: 800px) and (min-height: 490px) {
  .ww-story { width: min(620px, calc(100vw - 24px)); }
  .ww-story-page { grid-template-columns: 1fr; }
  .ww-story-frame { display: grid; justify-items: center; }
  .ww-story-art { max-height: 41vh; max-height: 41dvh; width: 100%; object-fit: contain; }
  .ww-story-body { padding: 20px; }
  .ww-story-actions { margin-top: 17px; }
}
@media (max-height: 489px) and (min-width: 650px) {
  .ww-story { width: min(950px, calc(100vw - 16px)); max-height: calc(100dvh - 14px); }
  .ww-story-page { grid-template-columns: 1.2fr 1fr; }
  .ww-story-body { padding: 15px 20px; }
  .ww-story-title { font-size: 1.35rem; margin: 4px 0 8px; }
  .ww-story-copy { font-size: .93rem; line-height: 1.45; }
  .ww-story-actions { margin-top: 12px; }
}
@media (max-width: 649px) and (max-height: 489px) {
  .ww-story-page { grid-template-columns: 1fr; }
  .ww-story-art { max-height: 38vh; object-fit: contain; }
}
