/* Saison des Lichts (ui/lightseason.js): the window of the Brunnen des Lichts (#lightwell) and Lumenar's words
   (#light-story). Panels and rows are the framed ones of imperial.css (.fp); a step's row grows with its rewards. */
#ui #lightwell .win-body { display: flex; flex-direction: column; gap: 4px; }
#ui #lightwell .fp + .fp { margin-top: 0; }
#ui #lightwell .lw-sum { display: flex; align-items: center; gap: 6px; padding: 4px 6px; }
#ui #lightwell .lw-art { flex: none; width: 32px; height: 32px; object-fit: contain; image-rendering: auto; }
#ui #lightwell .lw-nums { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
#ui #lightwell .lw-row { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 7px; line-height: 9px; }
#ui #lightwell .lw-row > .dim { flex: none; width: 48px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ui #lightwell .lw-have { display: inline-flex; align-items: center; gap: 2px; font-size: 8px; line-height: 10px; text-shadow: var(--ol); }
#ui #lightwell .lw-have > img { width: 10px; height: 10px; object-fit: contain; image-rendering: auto; }
#ui #lightwell .lw-steps { padding: 1px; }
#ui #lightwell .lw-step { height: auto; min-height: 24px; gap: 5px; padding: 2px 5px; }
#ui #lightwell .lw-step.got .fp-slot { filter: saturate(.55) brightness(.8); }
#ui #lightwell .lw-at { flex: none; width: 22px; text-align: right; font-size: 8px; line-height: 9px; color: #f0deb0; text-shadow: var(--ol); }
#ui #lightwell .lw-step .fp-slots { flex: 1; min-width: 0; }
/* the weapon step: one of these (a gold frame while it can be picked) */
#ui #lightwell .lw-pick { box-shadow: inset 0 0 0 1px #6d5a2e, inset 0 0 0 2px #0a0907; }
#ui #lightwell .lw-pick.on { cursor: pointer; box-shadow: inset 0 0 0 1px #e2bf72, inset 0 0 0 2px #0a0907, 0 0 3px #f2c45a; }
#ui #lightwell .lw-pick.on:hover { background: rgba(242, 196, 90, .16); }
#ui #lightwell .lw-or { align-self: center; font-size: 6px; line-height: 7px; }
#ui #lightwell .lw-state { flex: none; min-width: 40px; text-align: right; font-size: 7px; line-height: 8px; white-space: nowrap; text-shadow: var(--ol); }
#ui #lightwell .lw-btns { width: 100%; margin: 1px 0 0; }
#ui #lightwell .lw-help { padding: 0 4px 1px; text-align: center; line-height: 7px; }

/* the cutscene of the Lichtterrasse (#stage.cutscene while it runs): no HUD, no name tags, two black bars, Lumenar's words
   in the lower one, a black sheet for the cuts between two shots */
#stage.cutscene #overlay { visibility: hidden; }
#stage.cutscene #ui > :not(#light-story, .ls-bar, #light-fade) { visibility: hidden !important; }
#stage.cutscene, #stage.cutscene * { cursor: none !important; }
/* (the height of the bars comes from the script frame by frame, ui/lightseason.js CS_BAR: 13 % of the screen, 18 % on a phone) */
#ui .ls-bar { position: absolute; left: 0; right: 0; z-index: 38; height: 0; background: #000; pointer-events: none; }
#ui .ls-bar.top { top: 0; }
#ui .ls-bar.bottom { bottom: 0; }
#ui #light-fade { position: absolute; inset: 0; z-index: 37; background: #000; opacity: 0; pointer-events: none; }
#ui #light-story { position: absolute; left: 50%; bottom: 0; z-index: 40; translate: -50% 0; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center;
  width: min(420px, calc(100% - 24px)); height: 13%; padding: 0 12px; text-align: center; pointer-events: none; }
#ui #light-story.hidden { display: none; }
#ui #light-story .ls-who { font-size: 8px; line-height: 9px; color: var(--gold); text-shadow: var(--ol); }
#ui #light-story .ls-text { display: grid; place-items: center; min-height: 22px; margin-top: 2px; font-size: 10px; line-height: 11px; color: #fff3d0; text-shadow: var(--ol); overflow-wrap: anywhere; }

/* phone (a low, wide screen): two columns - on the left the count, the buttons and the hint, on the right the steps, which
   scroll inside; nothing else scrolls. Fingers get 44 px */
html.touch #ui #lightwell { width: min(400px, calc((100% - 8px) / var(--wz))) !important; }
html.touch #ui #lightwell .win-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); gap: 4px; overflow: hidden; }
html.touch #ui #lightwell .lw-top { grid-column: 1; grid-row: 1; }
html.touch #ui #lightwell .lw-btns { grid-column: 1; grid-row: 2; margin: 0; }
html.touch #ui #lightwell .lw-help { grid-column: 1; grid-row: 3; align-self: start; }
html.touch #ui #lightwell .lw-list { grid-column: 2; grid-row: 1 / 4; display: flex; flex-direction: column; min-height: 0; }
html.touch #ui #lightwell .lw-steps { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
html.touch #ui #lightwell .lw-art { display: none; }
html.touch #ui #lightwell .lw-btns .btn { min-height: calc(44px / (var(--px) * var(--wz))); }
/* (the HUD of a phone is not scaled like the windows: the words take their scale, --wz - lengths and % inside are then in
   that scale already; the bars are a little higher there, CS_BAR) */
html.touch #ui #light-story { zoom: var(--wz, 2); height: 18%; width: min(340px, calc(100% - 16px)); }
html.touch #ui #light-story .ls-text { min-height: 0; }
