/* Super-stories: the theatre view (super.js). The map fills the window; the film's words and controls sit over it. */
body.ss-on #mapPane{position:fixed;inset:0;z-index:60;display:flex;padding:0;gap:0;background:var(--sea)}
body.ss-on #mapWrap{border:0;border-radius:0}
body.ss-on #mapHead,body.ss-on .msrc,body.ss-on #mapAsOf,body.ss-on #mapWin,body.ss-on #mapFocus,body.ss-on #mapTip{display:none!important}
/* a page read while paused: the detail panel comes in from the right, over the film */
body.ss-on #side{display:none}
body.ss-on.ss-read #side{display:flex;position:fixed;top:0;right:0;bottom:0;width:min(440px,100vw);max-height:none;height:auto;z-index:80;box-shadow:-3px 0 0 var(--shade)}
body.ss-on.ss-read.sfold #side>.detail{display:block}
body.ss-on.ss-read .ss-stage{right:min(440px,100vw)}
body.ss-on.ss-read .sfoldb{display:grid}   /* with a card open too: it closes the drawer */
body.ss-on.ss-read.hascard .detail{padding-top:34px}

/* the film's own look, as in the Historia Civilis videos: khaki ground, blue water, paper for the words */
:root.ss-hc{--sea:#a9cbdd;--land:#c6ca9c}

/* the theatre: the corners of the screen darken while it plays */
.ss-vig{position:fixed;inset:0;z-index:66;pointer-events:none;opacity:0;transition:opacity .9s ease;
  background:radial-gradient(130% 105% at 50% 44%,rgba(10,8,6,0) 48%,rgba(10,8,6,.34) 72%,rgba(10,8,6,.78) 100%)}
body.ss-on .ss-vig{display:block}
body:not(.ss-on) .ss-vig{display:none}
body.ss-playing .ss-vig{opacity:1}

.ss-stage{position:absolute;inset:0;z-index:5;pointer-events:none;font-family:var(--body);color:var(--ink)}
.ss-stage>*{pointer-events:auto}
body:not(.ss-on) .ss-stage{display:none}   /* gone with the film */
.ss-stage [hidden]{display:none!important}
.ss-dim{position:absolute;inset:0;background:rgba(18,14,10,.30);opacity:0;transition:opacity .7s ease;pointer-events:none!important}
.ss-dim.on{opacity:1}
.ss-title~.ss-dim,.ss-dim.on:has(~.ss-title:not([hidden])){background:rgba(18,14,10,.5)}

/* the year and the chapter, top left */
.ss-head{position:absolute;left:18px;top:16px;pointer-events:none!important;z-index:3;background:color-mix(in srgb,var(--surface) 94%,transparent);border-radius:var(--r);padding:10px 16px 10px;box-shadow:var(--shadow);border-left:5px solid #c8410b;max-width:380px}
.ss-head:has(.ss-year:empty){display:none}
.ss-year{font-family:'Pixelta',var(--display);font-size:66.666px;line-height:.9;color:#c8410b}
.ss-chap{margin-top:6px;display:flex;flex-direction:column;gap:2px}
.ss-chap small{font-size:13px;font-weight:600;color:var(--muted)}
.ss-chap b{font-family:'Pixelta',var(--display);font-weight:400;font-size:20px;line-height:1.05}

/* the title card at each chapter's start */
.ss-title{position:absolute;left:50%;top:44%;transform:translate(-50%,-50%);text-align:center;color:#fbf7ee;pointer-events:none!important;z-index:2;animation:ssFade .7s ease both;width:min(90%,900px)}
.ss-title small{display:block;font-size:16px;font-weight:600;opacity:.8;margin-bottom:10px}
.ss-title h2{font-family:'Pixelta',var(--display);font-weight:400;font-size:66.666px;line-height:1.05;margin:0;text-wrap:balance}
.ss-title span{display:block;margin-top:12px;font-size:18px;font-weight:500;opacity:.85}
@keyframes ssFade{from{opacity:0;transform:translate(-50%,-46%)}to{opacity:1;transform:translate(-50%,-50%)}}

/* the caption strip, across the foot of the map, as in the Historia Civilis videos */
.ss-cap{position:absolute;left:0;right:0;bottom:0;z-index:4;background:color-mix(in srgb,var(--surface) 95%,transparent);border-top:1px solid var(--line-strong);
  min-height:92px;display:flex;align-items:center;justify-content:center;padding:14px 28px;pointer-events:none!important}
.ss-cap p{margin:0;max-width:60ch;text-align:center;font-size:23px;line-height:1.35;text-wrap:balance;animation:ssCapA .4s ease both}
.ss-cap p.b{animation-name:ssCapB}   /* each new sentence fades in: the class flips so the fade runs again */
@keyframes ssCapA{from{opacity:0}to{opacity:1}}
@keyframes ssCapB{from{opacity:0}to{opacity:1}}
.ss-cap.hook p{font-weight:600}
.ss-cap.empty p{opacity:0}

/* people: drawn on the map as squares (super.js ssFig); here only the lobby's copies */
.ss-face{flex:none;display:block}
.ss-face.pic{border-radius:var(--r);overflow:hidden;margin:12px 0 8px;image-rendering:pixelated}
.ss-face.pic .head{display:block;width:100%;height:100%}

/* a source's words: a paper comic bubble from the speaker's square, as in Hari's Historia Civilis videos; the source in a tag at the top right */
.ss-quote{position:absolute;z-index:3;width:max-content;max-width:min(480px,calc(100% - 24px));transition:opacity .16s ease-out,transform .16s ease-out}
.ss-quote.wait{opacity:0;transform:scale(.94)}   /* a bubble pops: it does not drift in */
.ss-src.wait{opacity:0}
.ss-quote.free{left:22px;bottom:166px}
.ss-bub{position:relative;background:#fff;color:#1c1b1f;border:3px solid #1c1b1f;border-radius:26px;padding:13px 20px}
.ss-bub:before{content:"";position:absolute;left:-11px;top:50%;margin-top:-9px;width:16px;height:16px;background:#fff;border-left:3px solid #1c1b1f;border-bottom:3px solid #1c1b1f;transform:rotate(45deg)}
.ss-quote.flip .ss-bub:before{left:auto;right:-11px;transform:rotate(225deg)}
.ss-quote.ss-up .ss-bub:before{left:50%;top:auto;bottom:-11px;margin:0 0 0 -8px;transform:rotate(-45deg)}
.ss-quote.free .ss-bub:before{display:none}
.ss-bub p{margin:0;font-family:"Iowan Old Style","Palatino Linotype",Palatino,"Book Antiqua",Georgia,serif;font-size:22px;line-height:1.3;font-weight:400}
.ss-src{position:absolute;right:66px;top:19px;z-index:3;background:#fffdf8;color:#4a525c;border:1.5px solid #1c1b1f;border-radius:0;padding:4px 10px;font-size:13.5px;max-width:min(420px,50%);transition:opacity .2s ease}
/* leave: top right, always there */
.ss-x{position:absolute;right:16px;top:14px;z-index:8;width:38px;height:38px;border-radius:50%;border:1px solid var(--line-strong);background:color-mix(in srgb,var(--surface) 94%,transparent);color:var(--ink);display:grid;place-items:center;cursor:pointer;padding:0;box-shadow:2px 2px 0 var(--shade);transition:opacity .5s ease}
.ss-x svg{width:15px;height:15px}
.ss-x:hover{border-color:var(--ink)}
body.ss-calm .ss-x{opacity:.6}
@keyframes ssPop{from{opacity:0;transform:scale(.94)}to{opacity:1;transform:none}}
@keyframes ssUp{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* a note: a disputed number, a legend */
.ss-chip{position:absolute;right:22px;bottom:166px;z-index:3;max-width:340px;background:#fff3c4;color:#1c1b1f;border:2px solid #1c1b1f;border-radius:0;padding:8px 12px;font-size:13.5px;line-height:1.38;animation:ssUp .3s ease both}
.ss-chip b{display:block;font-size:12.5px;color:#a2650c;margin-bottom:1px}

.ss-hint{position:absolute;left:50%;top:16px;transform:translateX(-50%);z-index:3;background:var(--surface);border:1px solid var(--line-strong);border-radius:20px;padding:6px 14px;font-size:13.5px;font-weight:500;pointer-events:none!important}
.ss-big{position:absolute;left:50%;top:46%;transform:translate(-50%,-50%);z-index:3;width:84px;height:84px;border-radius:50%;background:var(--surface);border:2px solid var(--ink);color:var(--ink);display:grid;place-items:center;opacity:.92;box-shadow:2px 2px 0 var(--shade);pointer-events:none!important}
.ss-big svg{width:40px;height:40px;margin-left:5px}
.ss-tip{position:absolute;z-index:6;background:var(--surface);border:1px solid var(--line-strong);border-radius:var(--r);padding:6px 10px;font-size:13px;max-width:260px;box-shadow:var(--shadow);pointer-events:none!important;display:flex;flex-direction:column;gap:1px}
.ss-tip{max-width:300px} .ss-tip ul{margin:5px 0 2px;padding-left:15px;font-size:12.5px;line-height:1.35} .ss-tip li{margin:2px 0}
.ss-tip span{color:var(--muted)} .ss-tip i{font-style:normal;color:var(--accent);font-weight:600;font-size:12px}

/* the controls: above the caption strip; they fade while it plays and the pointer rests */
.ss-ctrl{position:absolute;left:14px;right:14px;bottom:102px;z-index:5;display:flex;align-items:center;gap:8px;background:color-mix(in srgb,var(--surface) 92%,transparent);
  border:1px solid var(--line-strong);border-radius:var(--r);padding:6px 8px;box-shadow:var(--shadow);transition:opacity .5s ease,transform .5s ease}
body.ss-calm .ss-quote.free,body.ss-calm .ss-chip{bottom:108px}
/* the narrator is on and the words are off: no caption strip, the controls sit at the foot */
body.ss-nocap .ss-ctrl{bottom:14px}
body.ss-nocap .ss-quote.free,body.ss-nocap .ss-chip{bottom:78px}
body.ss-nocap.ss-calm .ss-quote.free,body.ss-nocap.ss-calm .ss-chip{bottom:20px}
body.ss-calm .ss-ctrl{opacity:0;transform:translateY(8px);pointer-events:none}
body.ss-calm .ss-stage{cursor:none}
.ss-b{flex:none;height:34px;min-width:34px;border:1px solid var(--line-strong);border-radius:var(--r);background:var(--surface);color:var(--ink);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0 8px;font:500 13.5px var(--body)}
.ss-b svg{width:15px;height:15px}
.ss-b:hover{border-color:var(--ink)}
.ss-play{background:var(--ink);color:var(--surface);border-color:var(--ink);min-width:44px}
.ss-bar{position:relative;flex:1;height:30px;cursor:pointer;touch-action:none}
.ss-segs{position:absolute;left:0;right:0;top:12px;height:6px}
.ss-segs i{position:absolute;top:0;height:6px;background:var(--line);border-left:2px solid var(--surface)}
.ss-fill{position:absolute;left:0;top:12px;height:6px;background:#c8410b;border-radius:3px 0 0 3px;pointer-events:none}
.ss-knob{position:absolute;top:8px;width:14px;height:14px;margin-left:-7px;border-radius:50%;background:#c8410b;border:2px solid var(--surface);pointer-events:none}
.ss-bartip{position:absolute;bottom:32px;transform:translateX(-50%);white-space:nowrap;background:var(--ink);color:var(--surface);font-size:12.5px;padding:3px 8px;border-radius:var(--r);pointer-events:none}
.ss-time{flex:none;font:500 13px 'JetBrains Mono',var(--label);color:var(--muted);min-width:84px;text-align:center}

/* the poster before it plays */
.ss-lobby{position:absolute;inset:0;z-index:7;display:flex;align-items:center;justify-content:center;background:rgba(14,11,8,.55)}
.ss-lbox{background:var(--surface);border-radius:var(--r);padding:26px 30px 22px;max-width:min(620px,calc(100% - 32px));box-shadow:6px 6px 0 rgba(0,0,0,.4);text-align:center}
.ss-lbox small{font-size:14px;font-weight:600;color:var(--accent)}
.ss-lbox h2{font-family:'Pixelta',var(--display);font-weight:400;font-size:66.666px;line-height:1;margin:6px 0 8px}
.ss-lbox>p{margin:0 auto;max-width:48ch;font-size:16px;line-height:1.45;color:var(--muted)}
.ss-cast{display:flex;flex-wrap:wrap;justify-content:center;gap:10px 12px;margin:18px 0 18px}
.ss-cm{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:0;width:66px}
.ss-cm i{font-style:normal;font-size:11.5px;line-height:1.15;color:var(--muted)}
.ss-go{display:inline-flex;align-items:center;gap:10px;height:48px;padding:0 26px;border:0;border-radius:var(--r);background:#c8410b;color:#fff;font:600 18px var(--body);cursor:pointer}
.ss-go svg{width:18px;height:18px}
.ss-go:hover{filter:brightness(1.07)}
.ss-go0{display:block;margin:10px auto 0;border:0;background:none;color:var(--muted);font:500 14px var(--body);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.ss-go0:hover{color:var(--ink)}
.ss-lbox .ss-meta{margin-top:12px;font-size:13px}

@media (max-width:759px){
  .ss-head{left:12px;top:10px} .ss-year{font-size:33.333px} .ss-chap b{font-size:20px}
  .ss-hint{display:none}
  .ss-quote.free{left:12px;bottom:190px} .ss-bub p{font-size:17px} .ss-src{right:auto;max-width:calc(100% - 24px);font-size:12px}
  .ss-x{right:10px;top:10px}
  .ss-chip{left:12px;right:12px;top:auto;bottom:190px;max-width:none}
  body.ss-calm .ss-quote.free,body.ss-calm .ss-chip{bottom:108px}
  .ss-cap{min-height:96px;padding:10px 14px} .ss-cap p{font-size:18px}
  .ss-ctrl{left:8px;right:8px;bottom:104px;gap:5px;flex-wrap:wrap} .ss-time{display:none} .ss-bar{order:9;flex-basis:100%;height:22px} .ss-segs,.ss-fill{top:8px} .ss-knob{top:4px}
  body.ss-nocap .ss-ctrl{bottom:10px} body.ss-nocap .ss-quote.free,body.ss-nocap .ss-chip{bottom:100px}
  body.ss-nocap.ss-calm .ss-quote.free,body.ss-nocap.ss-calm .ss-chip{bottom:16px}
  .ss-title h2,.ss-lbox h2{font-size:40px}
}

/* the Library's row for a film: its play time sits at the end of its name */
.ssitem b{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.ssitem .ssdur{flex:none;font:500 13px var(--label);font-style:normal;color:var(--muted);font-variant-numeric:tabular-nums}
