/* Laptop/TV start screen; scoped away from phone controllers and game rooms. */
.host-menu {
  position: fixed;
  inset: 0;
  min-height: 0;
  overflow: hidden;
  background: #030504;
  color: #e2dfd3;
  isolation: isolate;
}
.host-menu > header { display: none; }
.host-menu main { max-width: none; height: 100%; padding: 0; margin: 0; }
.host-scene { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: #030504; }
.host-scene video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 62% center; }
.host-scene-shade { position: absolute; inset: 0; background: linear-gradient(90deg, #000b 0%, #0005 23%, transparent 48%), linear-gradient(0deg, #0008, transparent 16%, transparent 90%, #0003); }
.host-scene-grain { position: absolute; inset: 0; background: url('/grain.svg') repeat; opacity: .055; }
.host-menu-actions { position: absolute; left: clamp(30px, 8.3vw, 180px); top: 50%; transform: translateY(-50%); max-width: 38vw; transition: opacity 650ms ease, transform 900ms cubic-bezier(.2,.7,.2,1); }
.host-start {
  position: relative;
  display: block;
  padding: 20px 30px 20px 18px;
  min-height: 64px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #e5dfd0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(24px, 2.7vw, 52px);
  font-weight: 400;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 1px 2px 2px #000, 0 0 14px #000;
  isolation: isolate;
}
.host-start::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: -8%; right: -6%; top: 23%; bottom: 20%;
  background: linear-gradient(90deg, #6e1716bb, #852221a6 60%, #3c090400);
  clip-path: polygon(0 27%, 9% 19%, 7% 7%, 47% 13%, 79% 5%, 100% 29%, 90% 42%, 100% 76%, 66% 86%, 38% 78%, 4% 98%, 8% 75%);
  transition: background .18s;
}
.host-start::after { content: ''; position: absolute; left: -23px; top: calc(50% - 4px); width: 8px; height: 8px; background: #d9c9ae; transform: rotate(45deg); box-shadow: 0 0 9px #ba866b55; }
.host-start:hover, .host-start:focus-visible { color: #fff8e8; text-shadow: 1px 2px 2px #000, 0 0 14px #e6caa344; }
.host-start:hover::before, .host-start:focus-visible::before { background: linear-gradient(90deg, #962220, #a52f2ab3 60%, #3c090400); }
.host-menu button:focus-visible { outline: 1px solid #d4c5a4; outline-offset: 6px; }
.host-start[aria-busy="true"] { opacity: .6; }
.host-media-controls { position: absolute; bottom: max(22px, env(safe-area-inset-bottom)); left: clamp(24px, 8.3vw, 180px); display: flex; gap: 14px; align-items: center; }
.host-media-control { display: flex; align-items: center; gap: 9px; padding: 10px 4px; border-radius: 0; background: none; color: #a7aba1; min-width: 44px; min-height: 44px; font-size: 11px; font-weight: 400; letter-spacing: .08em; text-shadow: 0 1px 3px #000; }
.host-media-control:hover { color: #eee9d9; }
.host-media-control svg { width: 20px; height: 20px; flex: 0 0 auto; }
.sound-on-mark, .motion-play-mark { display: none; }
[aria-pressed="true"] .sound-on-mark, [aria-pressed="true"] .motion-play-mark { display: block; }
[aria-pressed="true"] .sound-off-mark, [aria-pressed="true"] .motion-pause-mark { display: none; }
.host-menu #notice { position: static; transform: none; width: auto; max-width: 340px; border: 0; border-left: 2px solid #914237; border-radius: 0; background: #130908d9; color: #e9c9b4; margin-top: 24px; font: 14px/1.5 Arial, sans-serif; padding: 12px 16px; }
.host-scene { transition: opacity 1100ms ease, filter 1100ms ease; }
.host-entering-lobby .host-menu-actions { opacity: 0; transform: translateY(-62%); pointer-events: none; }
.host-entering-lobby .host-scene { opacity: .28; filter: blur(3px) saturate(.5); }
.host-in-lobby { background: radial-gradient(ellipse at 50% 35%, #161916, #030504 82%); }
.host-lobby {
  position: absolute; inset: 0;
  opacity: 0; transform: translateY(10px);
  transition: opacity 950ms ease, transform 1200ms cubic-bezier(.16,1,.3,1);
  pointer-events: none;
  font-family: Georgia, 'Times New Roman', serif;
}
.host-lobby.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.host-lobby:focus { outline: none; }
.lobby-code-line { position: absolute; top: clamp(32px, 8vh, 110px); left: 8%; right: 8%; text-align: center; }
.lobby-code {
  border: 0; border-radius: 0; background: none; padding: 8px 16px;
  color: #e1dcca; font: 400 clamp(25px, 3.2vw, 54px)/1.2 Georgia, serif;
  letter-spacing: .13em; text-shadow: 0 2px 3px #000, 0 0 20px #e1dcca18;
}
.lobby-code > span { color: #99998c; font-size: .65em; letter-spacing: .15em; }
.lobby-code > strong { font-weight: 400; }
.lobby-copy-status { display: block; height: 22px; font: 11px/22px Arial, sans-serif; letter-spacing: .08em; color: #99998c; }
.lobby-roster-area { position: absolute; top: 25%; bottom: 23%; left: 10%; right: 10%; border-top: 1px solid #c2bfa01b; border-bottom: 1px solid #c2bfa01b; overflow: auto; scrollbar-width: thin; scrollbar-color: #48493b #0000; }
.lobby-empty { position: absolute; inset: 0; margin: 0; display: grid; place-content: center; text-align: center; font-size: clamp(20px, 2.2vw, 34px); font-weight: 400; letter-spacing: .06em; color: #8f9485; text-shadow: 0 0 16px #c3d1b017; }
.lobby-empty[hidden] { display: none; }
.lobby-empty > span { display: inline; }
.lobby-roster { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-content: start; gap: 8px 26px; list-style: none; margin: 0; padding: 16px 12px; }
.lobby-player { position: relative; display: grid; grid-template-columns: 9px 1fr; align-content: center; gap: 6px 16px; min-height: 58px; border-bottom: 1px solid #c2bfa014; color: #e1decb; }
.lobby-player-mark { align-self: center; width: 5px; height: 5px; transform: rotate(45deg); background: #a78064; box-shadow: 0 0 8px #bd8b632b; }
.lobby-player-name { position: relative; padding: 6px 18px 6px 0; min-height: 44px; min-width: 0; border: 0; border-radius: 0; background: none; color: inherit; font: 400 clamp(20px, 1.8vw, 29px)/1.25 Georgia, serif; text-align: left; letter-spacing: .025em; overflow-wrap: anywhere; text-shadow: 0 2px 4px #000; }
.lobby-player-name::after { content: '×'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font: 16px Arial, sans-serif; opacity: 0; color: #c87769; }
.lobby-player-name:hover:not(:disabled), .lobby-player-name:focus-visible { color: #df9b88; }
.lobby-player-name:hover::after, .lobby-player-name:focus-visible::after { opacity: 1; }
.lobby-player small { grid-column: 2; color: #848779; font: 10px Arial, sans-serif; letter-spacing: .09em; }
.lobby-player small:empty { display: none; }
.lobby-player.is-away .lobby-player-name { color: #9d9e8e; }
.lobby-player.just-arrived { animation: lobby-arrival 850ms cubic-bezier(.16,1,.3,1) both; }
@keyframes lobby-arrival { from { opacity: 0; transform: translateY(10px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
.lobby-footer { position: absolute; left: 10%; right: 10%; bottom: 10%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.lobby-count { margin: 0 0 9px; color: #b8baa9; font-size: 17px; letter-spacing: .08em; }
.lobby-address { margin: 0; color: #808779; font: 12px/1.4 Arial, sans-serif; letter-spacing: .035em; overflow-wrap: anywhere; }
.lobby-connection { margin: 5px 0 0; color: #b48d70; font: 11px Arial, sans-serif; }
.lobby-connection:empty { display: none; }
.lobby-continue { background: none; border: 0; border-radius: 0; color: #d5cfba; font: 400 clamp(20px, 2vw, 30px) Georgia, serif; letter-spacing: .07em; padding: 14px 0 14px 20px; white-space: nowrap; text-shadow: 0 2px 3px #000; }
.lobby-continue span { color: #a78268; margin-left: 12px; }
.lobby-continue:disabled { opacity: .25; }
.host-intro { position: fixed; inset: 0; z-index: 20; background: #030504; }
.host-intro-film { width: 100%; height: 100%; object-fit: contain; display: block; }
.host-intro-skip, .host-intro-resume, .host-intro-next { position: absolute; border: 0; border-radius: 0; background: #030504a8; color: #c6c3b4; padding: 12px 18px; font: 18px Georgia, serif; text-shadow: 0 2px 4px #000; }
.host-intro-next { bottom: max(26px, env(safe-area-inset-bottom)); right: 4%; font-size: 28px; }
.host-intro-skip { bottom: max(26px, env(safe-area-inset-bottom)); right: 4%; }
.host-intro-skip span { margin-left: 12px; color: #a78268; }
.host-intro-resume { top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 28px; }
.host-intro button:hover { color: #fff7df; }
.host-intro button:focus-visible { outline: 1px solid #c6c3b4; outline-offset: 4px; }
.host-intro-status { position: absolute; bottom: 20%; left: 15%; right: 15%; text-align: center; color: #c6c3b4; font: 16px Arial, sans-serif; text-shadow: 0 2px 4px #000; }
.host-intro #notice { position: absolute; bottom: 14%; left: 15%; right: 15%; }
.host-playing-intro .host-media-controls { z-index: 21; }
.host-playing-intro #host-motion { display: none; }
.host-playing-intro .host-lobby { display: none; }
.lobby-continue:hover:not(:disabled) { color: #fff7df; }
.host-lobby #notice { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); font-size: 12px; }
@media (max-width: 1100px) {
  .lobby-roster { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .lobby-roster-area { left: 7%; right: 7%; top: 22%; bottom: 27%; }
  .lobby-roster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; padding-inline: 0; }
  .lobby-player-name { font-size: 19px; }
  .lobby-player { gap: 5px 10px; }
  .lobby-footer { left: 7%; right: 7%; bottom: 13%; }
  .lobby-continue { font-size: 20px; padding-left: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .host-lobby, .host-menu-actions, .host-scene { transition: none; }
  .lobby-player.just-arrived { animation: none; }
}
@media (max-width: 640px) {
  .host-scene video { object-position: 61% center; }
  .host-menu-actions { left: 32px; top: 70%; max-width: calc(100% - 64px); }
  .host-start { font-size: 26px; padding-left: 12px; }
  .host-start::after { left: -14px; width: 6px; height: 6px; }
  .host-scene-shade { background: linear-gradient(0deg, #000b, #0004 40%, transparent 65%); }
}
.lobby-editor { display:inline-block; margin-top:10px; color:#8e947f; font:12px Georgia,serif; text-decoration:none; }
.lobby-editor:hover { color:#d9d3ba; }
