/* TV display: everything here is designed to look like matte e-paper. */
:root {
  --paper: #e8e6de;
  --ink: #1e2024;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Noto Serif", serif;
}
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: var(--paper); color: var(--ink);
  cursor: none; user-select: none; -webkit-user-select: none;
}
[hidden] { display: none !important; }

#stage { position: fixed; inset: 0; will-change: transform; }
#art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: var(--paper); display: block;
}
#art:not([src]) { visibility: hidden; }
#fx { position: absolute; inset: 0; pointer-events: none; }

/* Paper grain + slightly uneven "front light" */
#paper {
  position: fixed; inset: 0; pointer-events: none;
  mix-blend-mode: multiply; opacity: .5; background-repeat: repeat;
}
#paper::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 38%, rgba(255, 255, 255, 0) 55%, rgba(70, 60, 40, .12) 100%);
}

#dim { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; }
#sleep { position: fixed; inset: 0; background: #000; display: none; }
body.sleeping #sleep { display: block; }

/* Museum-style placard */
.placard {
  position: fixed; right: 3.2vw; bottom: 4.2vh; max-width: 30vw;
  background: #efede6; color: var(--ink);
  padding: 1.6vh 1.6vw; font-family: var(--serif);
  border: 1px solid #c9c6bd; box-shadow: 0 1px 0 #d8d5cc;
}
.placard .t { font-size: 2.1vh; font-weight: 600; line-height: 1.25; }
.placard .s { font-size: 1.5vh; font-style: italic; margin-top: .4vh; opacity: .75; }
.placard .p { font-size: 1.5vh; margin-top: .9vh; line-height: 1.4; opacity: .85; }
.placard .p:empty, .placard .s:empty { display: none; }

/* Pairing / message screens */
.card-screen {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: var(--paper); font-family: var(--serif); text-align: center;
}
.pair-box { max-width: 70vw; }
.pair-box .logo { width: 9vh; height: 9vh; }
.pair-box h1 { font-size: 6vh; margin: 2vh 0 3vh; font-weight: 600; }
.pair-box p { font-size: 3vh; margin: 1vh 0; }
.pair-box .url { font: 600 3.6vh ui-monospace, Menlo, monospace; }
.pair-box .code {
  font: 700 14vh ui-monospace, Menlo, "Roboto Mono", monospace; letter-spacing: 2vh;
  margin: 3vh 0; padding: 1vh 4vh; border: .5vh solid var(--ink); display: inline-block;
}
.pair-box .small { font-size: 2.2vh; opacity: .7; }
