/* The loading screen (iteration 89): the owner's key art full bleed (cover: cropped, never stretched), the Season 1:
   Accra logo (contain, its own 16:9), a plain yellow progress line with the stage (owner, review-11), a Twi / Ga / Pidgin phrase and a tip.
   Clear of the notch and the home bar (safe areas; tests set --tc-sa*). On a short landscape screen (a phone on its
   side) it is two columns sized by the height: the logo on the left, the bar, phrase and tip on the right. */
#loading {
  --sa-l: var(--tc-sal, env(safe-area-inset-left, 0px)); --sa-r: var(--tc-sar, env(safe-area-inset-right, 0px));
  --sa-t: var(--tc-sat, env(safe-area-inset-top, 0px)); --sa-b: var(--tc-sab, env(safe-area-inset-bottom, 0px));
  position: fixed; inset: 0; z-index: 100; overflow: hidden; background: #120c08; color: #fff8e7;
  display: flex; align-items: center; justify-content: center;
  padding: calc(12px + var(--sa-t)) calc(16px + var(--sa-r)) calc(12px + var(--sa-b)) calc(16px + var(--sa-l));
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif; transition: opacity .42s ease; user-select: none; -webkit-user-select: none;
}
#loading.ld-out { opacity: 0; pointer-events: none; }
#loading.ld-quick { transition: none; }
#loading.hidden { display: none; }
#loading .ld-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 38% 40%; }
#loading .ld-shade { position: absolute; inset: 0;
  background: radial-gradient(ellipse 75% 70% at 50% 40%, rgba(14,9,5,.42), rgba(14,9,5,.74) 70%, rgba(10,6,3,.92)),
    linear-gradient(to bottom, rgba(10,6,3,0) 45%, rgba(10,6,3,.78)); }
#loading .ld-inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: clamp(6px, 2.2vh, 18px);
  width: min(760px, 100%); max-height: 100%; }
#loading .ld-logo { display: block; height: min(46vh, 330px); width: auto; max-width: 100%; aspect-ratio: 16 / 9; object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.65)); flex: none; }
#loading .ld-side { width: min(560px, 100%); display: flex; flex-direction: column; gap: clamp(8px, 1.8vh, 14px); min-width: 0; }
/* a plain yellow line on a faint track (owner, review-11: not the multi-coloured kente fill) */
#loading .ld-bar { height: 5px; border-radius: 3px; background: rgba(255,248,231,.16); overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,.45); }
#loading .ld-bar i { display: block; height: 100%; width: 3%; border-radius: 3px; transition: width .25s ease-out;
  background: #f2b01e; box-shadow: 0 0 8px rgba(242,176,30,.55); }
#loading .ld-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; font-size: 13px; font-weight: 800;
  letter-spacing: 1.5px; text-transform: uppercase; color: #ffd25a; text-shadow: 0 2px 0 #000; }
#loading .ld-stage { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#loading .ld-pct { flex: none; font-variant-numeric: tabular-nums; opacity: .85; }
#loading .ld-phrase { position: relative; background: rgba(21,16,12,.78); border-left: 5px solid #f2b01e; border-radius: 10px;
  padding: 10px 16px 11px; box-shadow: 0 4px 0 rgba(0,0,0,.35); }
#loading .ld-phrase.ld-in { animation: ldIn .45s ease-out both; }
#loading .ld-lang { position: absolute; top: 9px; right: 12px; font-size: 10px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  color: #15100c; background: #f2b01e; border-radius: 4px; padding: 2px 6px; }
#loading .ld-say { font-size: clamp(20px, 4.2vh, 28px); font-weight: 800; line-height: 1.2; color: #fff8e7; padding-right: 64px;
  font-family: "Trebuchet MS", system-ui, sans-serif; text-shadow: 0 2px 0 #000; }
#loading .ld-gloss { font-size: 15px; font-style: italic; color: #ffd25a; margin-top: 2px; line-height: 1.3; }
#loading .ld-reply { color: #f7ead3; opacity: .8; font-style: normal; }
#loading .ld-tip { display: flex; gap: 10px; align-items: baseline; font-size: 14px; line-height: 1.4; text-shadow: 0 1px 0 #000; }
#loading .ld-tip > b { flex: none; font-size: 10px; letter-spacing: 2px; color: #15100c; background: #fff8e7; border-radius: 4px; padding: 2px 6px; }
#loading .ld-tip b { color: #ffd25a; } #loading .ld-tip > b { color: #15100c; }
#loading kbd { font: inherit; font-weight: 800; font-size: .88em; color: #15100c; background: #fff8e7; border-radius: 4px; padding: 0 5px;
  box-shadow: 0 2px 0 rgba(0,0,0,.5); }
#loading.ld-failed .ld-stage { white-space: normal; color: #ff9a8a; }
@keyframes ldIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* a phone on its side, a short window: two columns, sized by the height */
@media (max-height: 540px) and (min-aspect-ratio: 3 / 2) {
  #loading .ld-inner { flex-direction: row; align-items: center; width: min(980px, 100%); gap: clamp(12px, 3vw, 28px); }
  #loading .ld-logo { height: auto; width: min(48%, calc(72vh * 16 / 9)); }
  #loading .ld-side { flex: 1; width: auto; gap: clamp(6px, 2.4vh, 12px); }
  #loading .ld-row { font-size: 11px; letter-spacing: 1px; margin-top: 5px; }
  #loading .ld-phrase { padding: 7px 12px 8px; }
  #loading .ld-say { font-size: clamp(17px, 5.6vh, 24px); padding-right: 56px; }
  #loading .ld-gloss { font-size: 13px; }
  #loading .ld-tip { font-size: 12.5px; line-height: 1.35; gap: 8px; }
}
@media (max-height: 360px) and (min-aspect-ratio: 3 / 2) {
  #loading .ld-bar { height: 4px; }
  #loading .ld-gloss { font-size: 12px; }
  #loading .ld-tip { font-size: 12px; }
}
/* portrait phones: the logo by the width */
@media (max-aspect-ratio: 1 / 1) {
  #loading .ld-logo { height: auto; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  #loading .ld-phrase.ld-in { animation: none; }
  #loading .ld-bar i { transition: none; }
}
