* { box-sizing: border-box; }
body { margin: 0; font: 17px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; color: #1d2433; background: #f4f6f9; }
header { padding: 20px 24px 4px; }
h1 { margin: 0; font-size: 26px; }
h2 { margin-top: 0; font-size: 20px; }
h3 { margin: 16px 0 6px; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: #526079; }
.sub { margin: 4px 0 0; color: #526079; }
main { padding: 12px 24px 32px; }
.card { background: #fff; border-radius: 10px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); max-width: 720px; margin-bottom: 16px; }
.warn { border-left: 5px solid #c2410c; }
button { font: inherit; padding: 8px 14px; border-radius: 8px; border: 1px solid #1f4fbf; background: #2457d6; color: #fff; cursor: pointer; }
button.secondary { background: #fff; color: #1f4fbf; }
button:disabled { opacity: .5; cursor: default; }
input { font: inherit; padding: 7px 10px; border: 1px solid #b6bfcc; border-radius: 8px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.col { display: flex; flex-direction: column; gap: 6px; }
.col .item { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.col .item span { min-width: 210px; }
.msg { color: #526079; min-height: 1.5em; }
.hint { font-size: 15px; color: #526079; }
#notice-accept { margin-top: 6px; }
#visit:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
/* THE VISIT BAR (Ed 2026-12-03 item 2): the status and "End the visit", always on screen during a visit at any window
   size, above the renderer. It spans the grid, sticks to the top of the viewport when the page scrolls, and sits on a
   stacking layer above the stage. The End control used to be the last thing in the side card, whose height is capped,
   so it scrolled out of sight inside the card. */
#visit-bar { grid-column: 1 / -1; position: sticky; top: 0; z-index: 20; display: flex; gap: 12px; align-items: center;
             justify-content: space-between; background: #fff; border-radius: 10px; padding: 8px 12px; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
#visit-bar .msg { margin: 0; }
#end { flex: none; background: #b42318; border-color: #912018; }
#stage-wrap { position: relative; z-index: 1; }
#stage { background: #000; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; }
#stage iframe { width: 100%; height: 100%; border: 0; display: block; }
/* AFTER THE HAND-BACK (item 3): the platform closes the face; this plain panel covers the stage until the face comes
   back or the visit ends. The schedule in the side card stays usable. */
#handback { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center;
            align-items: center; text-align: center; padding: 24px; border-radius: 10px; background: #1d2433; color: #fff; }
#handback[hidden] { display: none; }
#handback p { max-width: 34em; margin: 6px 0; }
#handback .handback-title { font-size: 24px; font-weight: 600; }
#visit aside { max-width: none; max-height: calc(100vh - 120px); overflow: auto; }
#texts { padding-left: 20px; font-size: 15px; }
#texts li { margin-bottom: 6px; }
@media (max-width: 960px) { #visit:not([hidden]) { grid-template-columns: 1fr; } }
/* THE DEMO CLOCK (round 7 item 2): in the side card, in the flow of the page; it never covers End or the schedule. */
#democlock .clock-line { margin: 0; font-size: 20px; font-weight: 600; }
#democlock #clock-note { font-size: 15px; font-weight: 400; min-height: 0; }
#democlock .hint { margin: 2px 0 6px; }
