* { box-sizing: border-box; }
:root { color-scheme: light; font: 15px/1.42 system-ui, sans-serif; color: #152e32; }
html, body { width: 100%; height: 100%; margin: 0; }
main { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto; width: 100%; height: 100%; background: #e7ecea; }
#stage { position: relative; min-height: 0; overflow: hidden; isolation: isolate; }
#surface, #poster { display: block; width: 100%; height: 100%; }
#surface { position: absolute; inset: 0; opacity: 0; touch-action: none; }
[data-viewer-state="ready"] #surface { opacity: 1; }
#surface:focus-visible { outline: 3px solid #ffbd62; outline-offset: -3px; }
#poster { object-fit: contain; background: #324e54; }
.identity, #status, #full { position: absolute; color: #133236; background: rgba(249,252,249,.95); border-radius: 6px; }
.identity { z-index: 2; top: 12px; left: 12px; padding: 7px 13px; display: flex; flex-direction: column; pointer-events: none; }
.identity strong { font-size: clamp(17px, 2vw, 24px); line-height: 1.16; }
.identity span, footer p { font-size: 13px; }
#status { left: 50%; transform: translateX(-50%); bottom: 12px; width: max-content; max-width: 95%; padding: 6px 12px; text-align: center; }
#full { right: 12px; top: 12px; width: 40px; height: 40px; font: 25px/1 system-ui; }
button { cursor: pointer; font: inherit; border: 1px solid #b5c3bf; }
button:focus-visible { outline: 3px solid #038387; outline-offset: 2px; }
footer { display: flex; align-items: center; gap: 1.1rem; justify-content: space-between; padding: 10px 14px; background: #f5f7f4; border-top: 1px solid #bac8c3; }
nav { display: flex; align-items: stretch; gap: 5px; flex-shrink: 0; }
nav button { background: #fff; color: #173638; border-radius: 5px; padding: .46em .75em; min-height: 38px; }
nav button[aria-pressed="true"] { background: #204344; border-color: #204344; color: #fff; }
footer p { margin: 0; max-width: 65ch; color: #405758; line-height: 1.4; }
[hidden] { display: none !important; }
@media (max-width: 1100px) {
  footer { display: grid; gap: 5px; }
  nav { flex-wrap: wrap; }
}
@media (max-width: 750px) {
  main { grid-template-rows: auto minmax(0,1fr) auto; }
  .identity { position: static; flex-direction: row; align-items: baseline; gap: 8px; border-radius: 0; padding: 6px 10px; }
  .identity strong { font-size: 15px; }
  footer { display: grid; gap: 5px; padding: 7px 9px; }
  footer p { font-size: 12px; }
  nav { flex-wrap: wrap; }
  nav button { font-size: 13px; min-height: 36px; }
}
@media (max-height: 340px) {
  footer { display: block; padding: 4px 7px; }
  footer p { font-size: 11px; }
  nav button { min-height: 28px; padding: .25em .55em; }
}
