body.in-storm { overflow: hidden; }
body.in-storm #app { visibility: hidden; }
.st-screen { position: fixed; inset: 0; z-index: 950; box-sizing: border-box; overflow: hidden; color: var(--deck-ivory); }
.st-bg, .st-shade { position: absolute; inset: 0; pointer-events: none; }
.st-bg { background: var(--deck-night) center / cover no-repeat; }
.st-pane { display: contents; }
.st-pane.st-still, .st-pane.st-still * { animation: none !important; }
.st-who .st-line[hidden] { display: none; }
.st-card .st-notes li, .st-card .st-landed li { grid-template-columns: minmax(0, 1fr); }
.st-card .st-landed li.ok { color: var(--jade-hi); font-weight: 600; }
.st-card .st-landed li.bad { color: var(--blood-hi); font-weight: 600; }
.st-stamp { display: inline-block; margin: .5rem 0 .2rem; padding: .15rem .7rem; letter-spacing: .14em; text-transform: uppercase; }
.st-card footer .sf-net span { max-width: 28rem; }
.st-card footer button:disabled { opacity: .45; cursor: default; transform: none; }
@keyframes st-rise { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: translateY(0); } }

/* a rough storm: a notice under the top edge with Roxana's picture, her line, the hull lost and the mending bill.
   It stays --st-stay (storm.js BANNER_MS) while the bar along its foot runs down, then fades over --st-fade. */
.st-banner { position: fixed; top: 1rem; left: 50%; z-index: 940; display: flex; align-items: stretch; gap: 1.1rem;
  width: min(48rem, calc(100% - 1.6rem)); box-sizing: border-box; padding: .9rem 1rem 1.1rem .9rem; overflow: hidden;
  transform: translateX(-50%); color: var(--deck-ivory); border: 2px solid var(--brass-hi); border-radius: 6px;
  background: color-mix(in srgb, var(--deck-night) 95%, transparent);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, .7), 0 0 2.2rem color-mix(in srgb, var(--brass-hi) 28%, transparent);
  transition: opacity var(--st-fade, 1.4s) ease-in, transform var(--st-fade, 1.4s) ease-in;
  animation: st-drop .6s cubic-bezier(.2, 1.3, .4, 1) both; }
.st-banner.leaving { opacity: 0; transform: translate(-50%, -1.2rem); pointer-events: none; }
.st-bwho { flex: none; width: 9.5rem; height: 12rem; object-fit: cover; object-position: 50% 12%;
  border: 1px solid var(--deck-brass); border-radius: 4px; background: var(--deck-night); }
.st-bbody { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.st-banner b { display: flex; align-items: center; gap: .55rem; font: 1.15rem/1.2 var(--special); letter-spacing: .14em;
  text-transform: uppercase; color: var(--brass-hi); }
.st-bemblem svg { display: block; width: 2rem; height: 2rem; fill: none; stroke: var(--brass-hi); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.st-bsay { margin: .5rem 0 0; font: italic clamp(1.15rem, 2.1vw, 1.5rem)/1.3 var(--serif); }
.st-bby { margin: .4rem 0 0; font: .9rem/1.2 var(--special); letter-spacing: .06em; color: var(--brass-hi); }
.st-bfacts { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; margin: .7rem 0 0; padding-top: .55rem;
  border-top: 1px solid color-mix(in srgb, var(--brass-hi) 40%, transparent); font: 600 1rem/1.3 var(--sans); color: var(--muted); }
.st-bfacts em { font-style: normal; color: var(--blood-hi); }
.st-bfacts span + span em { color: var(--brass-hi); }
.st-banner button { flex: none; align-self: flex-start; width: 2.2rem; height: 2.2rem; padding: 0; font-size: 1.6rem; line-height: 1;
  color: var(--muted); background: none; border: 0; cursor: pointer; }
.st-banner button:hover { color: var(--deck-ivory); }
.st-btime { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; transform-origin: 0 50%; background: var(--brass-hi);
  opacity: .8; animation: st-time var(--st-stay, 20s) linear both; }
.st-banner.held .st-btime { animation-play-state: paused; }
@keyframes st-drop { from { opacity: 0; transform: translate(-50%, -2rem) scale(.96); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes st-time { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 640px) {
  .st-banner { gap: .7rem; padding: .7rem .6rem .9rem .7rem; }
  .st-bwho { width: 5.5rem; height: 7.5rem; }
  .st-banner b { font-size: .95rem; }
  .st-bfacts { font-size: .9rem; }
}


.st-screen { --wet-paper: #b8bbb0; --wet-ink: #222e32; --salt: #c1d4d7; background: #0c191f; font-family: var(--serif); }
.st-bg { filter: saturate(.38) brightness(.57) contrast(1.2); animation: none; }
.st-shade { background: linear-gradient(90deg, #07141b22, #07141b80 45%, #07141be6),linear-gradient(0deg,#07141bdd,transparent 55%); }
.st-screen::after { content: ""; position: absolute; inset: -10%; z-index: 4; pointer-events: none; opacity: .2;
 background: repeating-linear-gradient(112deg,transparent 0 31px,#b1d7df55 32px,transparent 33px 88px); transform: translateX(-10px); }
.st-screen::before { content:""; position:absolute; inset:0; pointer-events:none; z-index:5;
 background:radial-gradient(ellipse at 0 45%,transparent 50%,#05121999),repeating-linear-gradient(3deg,transparent 0 141px,#d4e2e609 142px,transparent 143px 295px); }
.st-result { grid-template-columns:minmax(0,1fr) min(59rem,66%); background:none; padding:2rem; gap:2rem; }
.st-who { width:40%; }
.st-who > img,.st-who > video { filter:saturate(.55) brightness(.83) contrast(1.12); object-position:50% 10%; }
.st-who .st-line { left:2.5rem; bottom:2.5rem; width:calc(100% - 5rem); padding:0; border:0; border-radius:0; background:none;box-shadow:none; }
.st-line header,.st-by { display:none; }
.st-line p { display:block; color:white; font:italic 1.35rem/1.5 var(--serif); text-shadow:0 2px 4px #000,0 0 20px #000; }
.st-beat .st-cap { position:absolute; z-index:2; box-sizing:border-box; right:5%; bottom:12%; width:46%; padding:0; border:0; background:none;box-shadow:none; border-radius:0; }
.st-story-title { margin:.7rem 0 1.8rem; font:400 clamp(2.8rem,4.8vw,5rem)/1.1 var(--title); color:#e5e9de; text-shadow:0 3px 20px #041018; }
.st-eyebrow { font:400 .95rem var(--special); color:#b8cdd1; letter-spacing:.14em; }
.st-say { font:italic 400 clamp(1.4rem,2.4vw,2rem)/1.5 var(--serif); color:white; text-shadow:0 2px 5px #000; }
.st-cap footer { margin-top:2rem; justify-content:flex-start; }
.st-hint { padding:.7rem 0; border-top:1px solid #96bac177; font:400 .9rem var(--special); letter-spacing:.1em; color:#c0d1d1; }
.st-card.sf-card { --result-accent:#374e57; --figures:var(--serif); --muted:#4c5a5d; --rule:#43575b44; --blood-hi:#873e32; --jade-hi:#305b50; --brass-hi:#344e58;
 color:var(--wet-ink); font-family:var(--serif); gap:1.1rem; padding:2rem 2rem 2.3rem; border:0; outline:0;border-radius:0;
 background:radial-gradient(ellipse at 2% 5%,#304d5266,transparent 38%),radial-gradient(ellipse at 96% 98%,#243c4477,transparent 40%),
 repeating-linear-gradient(0deg,transparent 0 29px,#344c5210 30px,transparent 31px),var(--wet-paper);
 clip-path:polygon(0 1%,7% 0,19% 1.3%,34% .3%,53% 1.1%,72% 0,88% 1.1%,99% 0,100% 15%,99% 33%,100% 58%,99.4% 79%,100% 99%,89% 98%,73% 100%,51% 98.7%,28% 100%,11% 98.8%,0 100%,.6% 72%,0 49%);
 transform:rotate(.4deg);box-shadow:none;animation:st-rise .5s ease-out both; }
.st-card::before,.st-card::after,.st-card > header::before { display:none; }
.st-card .sf-remblem { display:none; }
.st-card .sf-rheading h2 { font:400 clamp(2rem,3.4vw,3.4rem)/1.1 var(--title); color:#273c44!important; text-shadow:none; }
.st-card .eyebrow { color:#40575e; font:400 .85rem var(--special); }
.st-card .sf-rreason { color:#33464b; font:italic 1.05rem/1.4 var(--serif); }
.st-card .sf-rows { gap:0; padding:.6rem 0; border-top:2px solid #344c5277; border-bottom:1px solid #344c5277; }
.st-card .sf-rows > div { padding:.25rem .75rem; background:none; border:0; border-right:1px solid #344c5244; border-radius:0; }
.st-card .sf-rows > div:first-child { padding-left:0; }
.st-card .sf-rows > div:last-child { border:0; }
.st-card .sf-rows small { font:.85rem var(--special); color:#435558; }
.st-card .sf-rows b { font:700 2rem/1.2 var(--serif);color:#273e46; }
.st-card .sf-rows .dn b { color:#873e32; }
.st-card .sf-cols { grid-template-columns:1.1fr 1fr;gap:1.6rem; }
.st-card .sf-cols h3 { color:#273e46; border-color:#344c5266; font:700 1rem var(--special); }
.st-card .sf-rship > b,.st-card .sf-rcargo li b { color:#273e46; }
.st-card .sf-rcondition > span,.st-card .sf-rarms { font:.9rem var(--serif); }
.st-card .sf-rhull { height:.45rem;background:#899590;border-color:#5b6d6b; }
.st-card .sf-rhull i.now { background:#45695f; }
.st-card .sf-rhull i.gone { background:repeating-linear-gradient(135deg,#873e32 0 3px,#ac7562 3px 6px); }
.st-card .sf-rships li.lost > b { color:#873e32; }
.st-card .st-notes li { color:#485b5d;font-size:1rem; }
.st-card .sf-rcargo li em { font:700 1rem var(--serif); }
.st-card .st-stamp { border-radius:0; color:#873e32; border:2px solid #873e3299; transform:rotate(-6deg); font:.85rem var(--special); }
.st-card .sf-note { color:#33464b; background:#344c5214;border:1px dashed #344c5277;border-radius:0;padding:.5rem;font-size:.95rem; }
.st-card footer { border-top:1px solid #344c5266; }
.st-card footer .sf-net span { font:italic 1.05rem/1.4 var(--serif);color:#33464b; }
body.player .st-card button.st-go { background:#263e48;color:#edf0df;border:1px solid #71858a;border-radius:0;box-shadow:3px 3px 0 #30475055;
 font:400 1.3rem "MedievalSharp",var(--serif); min-height:3rem;padding:.6rem 1.4rem; }
@media(max-width:900px) {
 .st-screen { overflow-x:hidden; overflow-y:auto; }
 .st-result { position:relative!important; min-height:100%;padding:1.2rem;display:flex;flex-direction:column;overflow:visible; }
 .st-who { position:relative; width:100%;min-height:28rem; }
 .st-who > img,.st-who > video { z-index:0;opacity:1;mask-image:linear-gradient(0deg,transparent,#000 30% 85%,transparent); }
 .st-who .st-line { display:block;position:relative;left:auto;bottom:auto;width:auto;margin:18rem 0 0;z-index:1; }
 .st-beat .st-who { position:absolute;inset:0;height:100%; }
 .st-beat .st-cap { position:relative;left:auto;right:auto;bottom:auto;width:auto;margin:50vh 0 2rem; }
 .st-beat .st-who .st-line[hidden] { display:none; }
 .st-card.sf-card { max-height:none;width:100%;padding:1.5rem; }
 .st-card .sf-cols { overflow:visible;grid-template-columns:1fr; }
 .st-card .sf-rows { grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem; }
 .st-card .sf-rship { grid-template-columns:1fr; }
 .st-card .sf-rcolumns { display:none; }
 .st-card .sf-rarms { text-align:left; }
 .st-card .st-notes { display:grid; }
 .st-card footer button { width:100%; }
}
@media(prefers-reduced-motion:reduce) { .st-screen * { animation:none!important; } }
.st-who { width:34%; }
.st-who .st-line { left:2rem; bottom:2rem; width:calc(100% - 4rem); }
.st-card.sf-card { max-height:calc(100dvh - 4rem); gap:.9rem; padding:1.7rem 2rem 2rem;
 background:radial-gradient(ellipse at 0% 100%,transparent 0 12%,#3b514b30 12.5% 13%,transparent 13.5% 18%,#3b514b35 18.5% 19%,transparent 20%),
 linear-gradient(174deg,transparent 43%,#142e3a18 43.2%,#e2e4d24d 43.8%,transparent 44.5%),
 radial-gradient(ellipse at 2% 5%,#304d5277,transparent 38%),radial-gradient(ellipse at 96% 98%,#243c4477,transparent 40%),
 repeating-linear-gradient(0deg,transparent 0 29px,#344c5210 30px,transparent 31px),var(--wet-paper); }
.st-card .sf-rheading h2 { font-size:clamp(2rem,3vw,3rem); }
.st-card .sf-cols { min-height:12rem; }
@media(max-width:900px) { .st-who { width:100%; } .st-card.sf-card { max-height:none;padding:1.5rem; } .st-who .st-line { width:auto;left:auto;bottom:auto; } }
@media(max-width:900px) { .st-card .sf-rows b { font-size:1.65rem;white-space:nowrap; } }

@media (min-width: 901px) and (max-height: 650px) {
 .st-screen { overflow-x: hidden; overflow-y: auto; }
 .st-result { position: relative !important; min-height: 100%; overflow: visible; }
 .st-card.sf-card { max-height: none; }
 .st-card .sf-cols { overflow: visible; }
}
@media (prefers-reduced-motion: reduce) {
 .st-banner, .st-btime { animation: none; }
 .st-banner { transition: opacity var(--st-fade, 1.4s) linear; }
}
