/* Indonesian Origin Legends: web edition (layered over the deck's styles.css; built by tools/build_web.py).
   Laptop: the 1920x1080 slides stack and scroll, each zoomed to the window width.
   ?slides: one slide at a time, scaled to fit.  Phone: slides restack into a single column. */
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
html { -webkit-text-size-adjust: 100%; }

/* Laptop and presenter: the story picture is the play button for the legend's film */
.film-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: rgba(12,18,34,.12); transition: background .25s; }
.film-over:hover { background: rgba(12,18,34,.32); }
.film-over:focus-visible { outline: 6px solid var(--gold); outline-offset: -6px; }
.play { position: relative; display: block; width: 128px; height: 128px; border-radius: 50%; background: rgba(22,33,61,.84); border: 5px solid var(--gold); box-shadow: 0 6px 30px rgba(0,0,0,.35); transition: background .2s, transform .25s; }
.play::after { content: ""; position: absolute; left: 50%; top: 50%; margin: -22px 0 0 -12px; border-left: 38px solid var(--gold); border-top: 22px solid transparent; border-bottom: 22px solid transparent; }
.film:hover .play { background: var(--gold); transform: scale(1.06); }
.film:hover .play::after { border-left-color: var(--indigo); }
.film-pill { display: block; padding: 12px 22px 11px; background: rgba(22,33,61,.9); color: var(--cream); font-size: 22px; font-weight: 700; letter-spacing: .04em; text-align: center; }
.film-pill em { display: block; margin-top: 4px; font-style: normal; font-size: 16px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }

/* Phone: a poster card under the synopsis instead */
.film-card { display: none; }
.film-thumb { position: relative; display: block; overflow: hidden; background: var(--indigo); }
.film-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.film-thumb .play { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-width: 3px; }
.film-thumb .play::after { margin: -10px 0 0 -6px; border-left-width: 18px; border-top-width: 10px; border-bottom-width: 10px; }
.film-text { display: block; }

/* Overview chips jump to their legend */
.chips li[data-go] { cursor: pointer; transition: background .2s, color .2s; }
.chips li[data-go]:hover { background: var(--ink); color: var(--cream); }

/* Lightbox: the film large, its scene card beside it */
.lightbox { position: fixed; inset: 0; z-index: 50; display: none; background: #090e1c; color: var(--cream); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.lightbox.open { display: block; }
.lb-wrap { min-height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 64px 4vw 32px; }
.lb-head { position: absolute; top: 0; left: 0; right: 0; height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 3vw 0 4vw; }
.lb-title { flex: 1; min-width: 0; font: 700 13px/1.3 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-btn { padding: 8px 12px; font: 700 12px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--cream); border: 1.5px solid rgba(246,239,224,.4); border-radius: 20px; white-space: nowrap; }
.lb-btn:hover { border-color: var(--gold); color: var(--gold); }
.lb-btn[hidden] { display: none; }
@media (max-width: 600px) { .lb-next .nx { display: none; } .lb-head { gap: 10px; } }
.lb-close { font-size: 34px; line-height: 1; padding: 4px 8px; color: var(--cream); }
.lb-close:hover { color: var(--gold); }
.lb-body { display: flex; gap: 28px; align-items: center; justify-content: center; width: 100%; max-width: 1780px; margin: 0 auto; }
.lb-video { flex: 1 1 auto; min-width: 0; max-width: calc((100vh - 110px) * 16 / 9); }
.lb-video video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.lb-script { flex: 0 0 360px; align-self: center; }
.lb-script .scene { position: static; height: auto; padding: 20px 24px 18px; }
.lb-script .scene .kicker { font-size: 12px; }
.lb-script .slug { font-size: 13px; margin-top: 8px; padding-bottom: 10px; }
.lb-script .shots { margin-top: 12px; }
.lb-script .shots li { grid-template-columns: 74px 1fr; column-gap: 10px; font-size: 14.5px; line-height: 1.4; }
.lb-script .tc { font-size: 12px; line-height: 20.3px; }
.lb-script .dlg .cue { font-size: 11px; line-height: 13px; }
.lb-script .dlg .line { font-size: 16px; }
.lb-script .shots li { transition: opacity .3s; }
.lb-script .shots.live li:not(.on) { opacity: .45; }
@media (max-width: 1100px), (max-aspect-ratio: 4/3) {
  .lb-body { flex-direction: column; align-items: stretch; gap: 20px; }
  .lb-video { max-width: none; }
  .lb-script { flex: none; width: 100%; max-width: 560px; margin: 0 auto; }
}

/* Laptop scroll: slides stack, each zoomed to the window width */
.stage { display: block; }
html.scroll { scroll-snap-type: y proximity; scroll-behavior: smooth; }
.scroll .stage { zoom: var(--z, .5); }
.scroll .slide { margin: 0 0 16px; scroll-snap-align: start; }
.scroll .slide:last-child { margin-bottom: 0; }

/* Presenter (?slides): one slide at a time, scaled to fit */
.present, .present body { height: 100%; overflow: hidden; background: #0c1222; }
.present .stage { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform: translate(-50%, -50%) scale(var(--s, .5)); }
.present .slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s .45s; }
.present .slide.on { opacity: 1; visibility: visible; transition: opacity .45s ease; }
.pnav { display: none; }
.present .pnav { display: block; position: fixed; top: 50%; z-index: 20; width: 54px; height: 54px; margin-top: -27px; border-radius: 50%; background: rgba(12,18,34,.55); opacity: .35; transition: opacity .2s; }
.present .pnav:hover { opacity: 1; }
.present .pnav::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -10px; border-top: 3px solid var(--gold); border-right: 3px solid var(--gold); transform: rotate(45deg); }
.present .pnav.prev { left: 14px; } .present .pnav.prev::after { margin-left: -4px; transform: rotate(-135deg); }
.present .pnav.next { right: 14px; }
.present .pnav:disabled { visibility: hidden; }

/* Phone: one column, slide by slide */
.phone, .phone body { background: var(--paper); }
.phone .slide { width: auto; height: auto; margin: 0; overflow: visible; border-bottom: 8px solid var(--gold); }
.phone .slide:last-child { border-bottom: 0; }
.phone .motif { display: none; }
.phone .kicker { font-size: 12px; }

.phone .title-slide::after { content: none; }
.phone .title-img { position: static; display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; border-bottom: 6px solid var(--gold); }
.phone .title-body { position: static; transform: none; padding: 30px 20px 40px; }
.phone .title-body h1 { font-size: 44px; margin-top: 14px; }
.phone .rule { width: 80px; height: 4px; margin: 26px 0 22px; }
.phone .subtitle { font-size: 21px; }

.phone .page-head { position: static; padding: 34px 20px 0; }
.phone .page-head h2 { font-size: 34px; }
.phone .kinds { position: static; display: block; padding: 22px 16px 32px; }
.phone .kind { grid-template-columns: 1fr 104px; column-gap: 16px; padding: 22px 18px 24px; border-top-width: 6px; }
.phone .kind + .kind { margin-top: 18px; }
.phone .kind-img { width: 104px; height: 104px; }
.phone .kind-num { font-size: 20px; }
.phone .kind h3 { font-size: 22px; margin: 4px 0 8px; }
.phone .kind p { font-size: 16px; }
.phone .chips { gap: 8px; margin-top: 16px; }
.phone .chips li { font-size: 14px; padding: 6px 12px; border-width: 1.5px; }

.phone .legend { display: flex; flex-direction: column; }
.phone .legend .side { display: contents; }
.phone .legend .side::after { content: none; }
.phone .side-body { position: static; order: 1; padding: 26px 20px 22px; border-top: 0; }
.phone .num { font-size: 36px; }
.phone .side-body h2 { font-size: 34px; margin: 8px 0 8px; }
.phone .place { font-size: 17px; margin-bottom: 14px; }
.phone .type { font-size: 12px; padding-top: 12px; border-top-width: 1px; }
.phone .legend .main { position: static; order: 2; display: block; padding: 26px 20px 4px; }
.phone .syn { font-size: 18px; line-height: 1.55; }
.phone .facts { margin-top: 22px; border-left-width: 5px; padding: 2px 0 2px 18px; }
.phone .facts p { font-size: 16px; }
.phone .facts b { font-size: 12px; }
.phone .film-over { display: none; }
.phone .film-card { display: block; width: 100%; margin-top: 24px; padding: 0 0 16px; background: var(--cream); border-top: 5px solid var(--gold); text-align: left; color: var(--ink); }
.phone .film-thumb { width: 100%; aspect-ratio: 16 / 9; }
.phone .film-text { padding: 14px 16px 0; }
.phone .film-text .kicker { font-size: 11px; }
.phone .film-text b { display: block; font-family: var(--head); font-weight: 600; font-size: 22px; line-height: 1.15; margin: 4px 0 4px; }
.phone .film-meta { display: block; font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.phone .scene { position: static; order: 3; height: auto; margin: 22px 20px 26px; padding: 18px 18px 16px; border-top-width: 5px; }
.phone .scene .kicker { font-size: 11px; }
.phone .slug { font-size: 12.5px; margin-top: 6px; padding-bottom: 10px; }
.phone .shots { margin-top: 12px; }
.phone .shots li { grid-template-columns: 70px 1fr; column-gap: 10px; font-size: 14.5px; line-height: 1.4; }
.phone .tc { font-size: 12px; line-height: 20.3px; }
.phone .dlg .cue { font-size: 11px; line-height: 13px; }
.phone .dlg .line { font-size: 16px; }
.phone .pics { position: static; order: 4; width: auto; height: auto; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: none; border-left: 0; border-top: 6px solid var(--gold); }
.phone .pics figure, .phone .pics figure + figure { width: auto; height: auto; border-top: 0; }
.phone .pics figure + figure { border-left: 3px solid var(--gold); }
.phone .pics img { width: 100%; height: auto; aspect-ratio: 1; }
.phone .pics figcaption { left: 8px; bottom: 8px; font-size: 10px; padding: 4px 7px 3px; }

.phone .closing { padding: 34px 20px 36px; }
.phone .closing-note, .phone .sources, .phone .closing-img { position: static; width: auto; }
.phone .closing-img { display: block; width: 100%; }
.phone .closing-note .quote { font-size: 24px; margin-top: 16px; }
.phone .closing-note::after { width: 80px; height: 4px; margin-top: 26px; }
.phone .closing-img { height: auto; aspect-ratio: 820 / 260; margin-top: 26px; border-top-width: 4px; }
.phone .sources { margin-top: 26px; padding: 24px 20px; border-top-width: 4px; }
.phone .sources ul { margin-top: 12px; }
.phone .sources li { font-size: 15px; padding: 10px 0; }
.phone .sources li span { font-size: 13px; }

/* The web edition never prints its controls */
@media print { .film, .lightbox, .pnav { display: none !important; } .stage { zoom: 1 !important; } }
