/* The Boardroom online: phone home screen, host-on-the-phone controls, slides on phones.
   Same color jobs as the party: green room, paper cards, red for actions and labels, yellow for numbers. */

.phone-page { min-height: 100%; }
.phone-page .field span { text-transform: none; letter-spacing: 0; font-size: 15px; }
.cta:disabled { opacity: 1; background: rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.55); }
.stack { display: grid; gap: 20px; }
.stack-tight { display: grid; gap: 6px; }
.phone h2 { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.05; margin: 0; text-transform: uppercase; }
.phone .fine, .fine { font-size: 14px; line-height: 1.45; color: var(--muted); }
.fine strong { color: var(--white); }
.fine a { color: var(--yellow); }

/* Home */
.home-head { display: grid; gap: 14px; padding-top: 18px; }
.home-title { font-size: 64px !important; line-height: 0.92 !important; }
.home-title::after { content: ""; display: block; width: 72px; height: 8px; background: var(--red); margin-top: 16px; }
.home-choice { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--paper); }
.choice { background: transparent; border: 0; color: var(--white); font-family: var(--display); font-weight: 700; font-size: 20px;
  text-transform: uppercase; padding: 14px 8px; cursor: pointer; }
.choice[aria-selected="true"] { background: var(--paper); color: var(--ink); }
.form-stack { display: grid; gap: 16px; }
.home-screen-link { border-top: 1px solid rgba(255, 255, 255, 0.18); padding-top: 16px; }

/* Lobby: the room code card the host shows people across the table */
.join-card { background: var(--paper); color: var(--ink); padding: 16px; display: grid; grid-template-columns: 1fr auto; gap: 12px 16px; align-items: center; }
.join-card-label { font-size: 13px; font-weight: 600; color: rgba(0, 0, 0, 0.6); }
.join-card-code { font-family: var(--display); font-weight: 700; font-size: 64px; line-height: 1; letter-spacing: 0.06em; }
.join-card-url { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.join-card-qr { width: 108px; height: 108px; }
.join-card-qr svg { width: 100%; height: 100%; display: block; }
.join-card .pick { grid-column: 1 / -1; }

.host-box { border: 2px solid rgba(255, 255, 255, 0.28); padding: 16px; display: grid; gap: 12px; }
.host-box h2 { font-size: 22px; }
.settings summary { cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 20px; text-transform: uppercase; }
.settings[open] summary { margin-bottom: 4px; }
.toggle { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; cursor: pointer; }
.toggle input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--red); }
.toggle > span { display: grid; gap: 2px; }
.toggle strong { font-size: 17px; }

.notice { background: var(--yellow); color: var(--ink); padding: 14px 16px; display: grid; gap: 10px; }
.notice p { color: var(--ink) !important; font-weight: 600; }
.phone .err { background: var(--ink); padding: 10px 12px; }

/* The draw: six number boxes */
.num-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.num { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.num input { font-family: var(--display); font-weight: 700; font-size: 40px; text-align: center; padding: 8px 4px; border: 0;
  background: var(--paper); color: var(--ink); width: 100%; border-radius: 0; }
.num.opener input { background: var(--ink); color: var(--yellow); }
.num input:focus { outline: 4px solid var(--red); outline-offset: 2px; }
.num input:disabled { opacity: 1; -webkit-text-fill-color: currentColor; }

/* Slides on phones */
.talk-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.talk-head h1 { font-size: 34px; }
.talk-name { font-size: 30px !important; overflow-wrap: anywhere; }
.talk-prog { font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--yellow); white-space: nowrap; }
.slide-box { background: #000; aspect-ratio: 16 / 9; cursor: zoom-in; margin: 0 -18px; }
.slide-box img { width: 100%; height: 100%; object-fit: contain; display: block; }
.slide-box.small { width: 55%; margin: 0; justify-self: start; opacity: 0.9; }
.slide-missing { height: 100%; display: grid; place-items: center; padding: 16px; text-align: center; color: var(--muted); font-size: 15px; }
.host-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.host-tools .pick { background: transparent; border-color: var(--paper); color: var(--white); }
.host-tools .pick.main { background: var(--red); border-color: var(--red); }
.host-tools .pick:disabled { opacity: 0.35; }
.slide-full { position: fixed; inset: 0; background: #000; z-index: 20; display: grid; place-items: center; }
.slide-full img { max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; object-fit: contain; }
.slide-full-close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; background: rgba(0, 0, 0, 0.6);
  color: #fff; border: 1px solid rgba(255, 255, 255, 0.4); padding: 8px 12px; font-size: 15px; }
/* Turn the phone sideways and the slide fills it */
@media (orientation: landscape) and (max-height: 500px) {
  .slide-box { margin: 0; }
}

/* Score on phones without a big screen */
.phone-reveal { background: var(--red); padding: 28px 16px; display: grid; justify-items: center; gap: 10px; text-align: center; transition: background-color 0.2s; }
.phone-reveal .pr-who { font-family: var(--display); font-weight: 700; font-size: 30px; text-transform: uppercase; overflow-wrap: anywhere; }
.phone-reveal .phone-score { font-variant-numeric: tabular-nums; }
.phone-reveal .pr-outof { font-weight: 600; opacity: 0; transition: opacity 0.4s 0.2s; }
.phone-reveal.won { background: #43e07f; color: #0c3a1d; }
.phone-reveal.won .phone-score { color: #0c3a1d; animation: land 1s both; }
.phone-reveal.won .pr-outof { opacity: 1; }

/* Who's at the table */
.table-list { display: grid; gap: 8px; }
.table-list h2 { font-size: 20px; }
.table-list ul { list-style: none; margin: 0; padding: 0; display: grid; }
.table-list li { border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
.tl-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%; padding: 10px 0;
  background: none; border: 0; color: var(--white); text-align: left; font: inherit; }
button.tl-line { cursor: pointer; }
button.tl-line::after { content: "+"; font-family: var(--display); font-weight: 700; color: var(--muted); margin-left: 8px; }
button.tl-line[aria-expanded="true"]::after { content: "-"; }
.tl-name { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.tl-tags { font-size: 13px; color: var(--muted); margin-left: auto; text-align: right; }
.tl-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 0 12px; }
.tl-acts .pick { background: transparent; border-color: var(--paper); color: var(--white); }
.tl-acts .pick.main { background: var(--red); border-color: var(--red); }
.tl-acts .pick:disabled { opacity: 0.35; }

/* Screen: code entry */
.screen-gate form { display: grid; gap: 2vh; justify-items: center; }
.screen-gate input { font-family: var(--display); font-weight: 700; font-size: 10vh; width: 5.2ch; text-align: center; letter-spacing: 0.12em;
  background: var(--yellow); color: var(--ink); border: 0; padding: 1vh 2vh; }
.screen-gate button { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 3.4vh; background: var(--red);
  color: #fff; border: 0; padding: 1.6vh 4vh; cursor: pointer; }
.screen-gate .err { color: var(--yellow); font-size: 2.4vh; min-height: 3vh; }
.draw-vals { display: flex; gap: 1.6vw; justify-content: center; flex-wrap: wrap; }
.draw-vals div { width: 11vh; height: 13vh; display: grid; place-items: center; background: var(--paper); border: 0.5vh solid var(--ink);
  font-family: var(--display); font-weight: 700; font-size: 8vh; color: var(--ink); }
.draw-vals div.opener { background: var(--ink); color: var(--yellow); }
.screen-leave { position: fixed; bottom: 1.4vh; right: 1.6vw; font-size: 1.6vh; color: rgba(255, 255, 255, 0.5); background: none; border: 0;
  text-decoration: underline; cursor: pointer; z-index: 50; opacity: 0; transition: opacity 0.3s; }
body:not(.idle) .screen-leave { opacity: 1; }
