/* visitor.css -- play.html, the simple visitor page. Quiet, dark, small; the art fills the screen. */
:root {
  --bg: #000;
  --glass: rgba(10, 10, 12, .58);
  --glass-2: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .12);
  --text: #d6d6da;
  --dim: #8a8b92;
  --on: #e8e8ec;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; overscroll-behavior: none; }
body { font: 12px/1.4 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: transparent; }

#stage { position: fixed; inset: 0; background: #000; }
#screen { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; image-rendering: auto; }
body.three #screen { object-fit: fill !important; }
#loading { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); color: var(--dim); font-size: 12px; pointer-events: none; transition: opacity .8s; }
#loading.done { opacity: 0; }

/* the controls fade together, and the cursor with them */
#bar, #hint, #backLink { transition: opacity .7s ease; }
body.idle #bar, body.idle #backLink { opacity: 0; pointer-events: none; }
body.idle, body.idle * { cursor: none !important; }

#bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom));
  width: min(calc(100% - 24px), 1100px); z-index: 10;
  display: flex; align-items: center; gap: 10px; padding: 6px 8px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 12px;
  -webkit-backdrop-filter: blur(10px) saturate(120%); backdrop-filter: blur(10px) saturate(120%);
}
.moods { display: flex; gap: 4px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.moods::-webkit-scrollbar { display: none; }
.tools { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }

button, select { font: inherit; color: var(--text); }
.chip, #next, #fullscreen, select {
  background: var(--glass-2); border: 1px solid transparent; border-radius: 999px; padding: 5px 11px; cursor: pointer; white-space: nowrap; flex: 0 0 auto;
}
.chip:hover, #next:hover, #fullscreen:hover, select:hover { border-color: var(--line); color: var(--on); }
.chip[aria-pressed="true"] { background: rgba(255, 255, 255, .2); color: #fff; }
select { -webkit-appearance: none; appearance: none; padding-right: 22px; max-width: 150px;
  background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 12px) 52%, calc(100% - 8px) 52%; background-size: 4px 4px; background-repeat: no-repeat; }
select option, select optgroup { background: #151518; color: var(--text); }
:focus-visible { outline: 1px solid rgba(255, 255, 255, .55); outline-offset: 1px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; color: var(--dim); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 26px; height: 15px; border-radius: 999px; background: rgba(255, 255, 255, .16); position: relative; transition: background .2s; flex: 0 0 auto; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #bbb; transition: transform .2s; }
.switch input:checked + .track { background: rgba(160, 190, 230, .55); }
.switch input:checked + .track::after { transform: translateX(11px); background: #fff; }
.switch input:checked ~ span:last-child { color: var(--text); }
.switch input:focus-visible + .track { outline: 1px solid rgba(255, 255, 255, .55); outline-offset: 2px; }

.links { display: inline-flex; gap: 10px; margin-left: 4px; white-space: nowrap; }
.links a { color: var(--dim); text-decoration: none; font-size: 11px; }
.links a:hover { color: var(--on); text-decoration: underline; }
.info { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--dim); font: italic 600 12px/1 Georgia, serif; cursor: pointer; flex: 0 0 auto; padding: 0; }
.info:hover { color: var(--on); }

#hint {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 9; pointer-events: none;
  padding: 8px 14px; border-radius: 999px; background: rgba(0, 0, 0, .5); color: var(--text); font-size: 13px; white-space: nowrap; max-width: calc(100% - 32px);
}
#hint.gone { opacity: 0; }

.modal { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .45); }
.modal[hidden] { display: none; }
.card { position: relative; max-width: 440px; width: 100%; max-height: calc(100% - 32px); overflow-y: auto; padding: 18px 20px 14px; border-radius: 12px;
  background: rgba(16, 16, 19, .9); border: 1px solid var(--line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-size: 13px; line-height: 1.5; }
.card h2 { margin: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--on); }
.card h3 { margin: 14px 0 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.card p { margin: 0 0 8px; }
.card .dim { color: var(--dim); font-size: 12px; }
.card .credits { margin: 0 0 10px; padding: 0; list-style: none; font-size: 12px; line-height: 1.45; color: var(--dim); }
.card .credits li { margin: 0 0 3px; }
.card .credits li.now { color: var(--text); }
.card .credits b { color: var(--on); font-weight: 600; }
.card .credit { margin-top: 12px; }
.card a { color: #a9c0e0; }
.close { position: absolute; top: 8px; right: 10px; background: none; border: 0; color: var(--dim); font-size: 20px; line-height: 1; cursor: pointer; }
.close:hover { color: var(--on); }

/* phones and narrow windows: moods on their own scrolling row, tools beneath */
@media (max-width: 760px) {
  #bar { flex-direction: column; align-items: stretch; gap: 6px; width: calc(100% - 16px); bottom: max(8px, env(safe-area-inset-bottom)); padding: 6px; }
  .tools { flex-wrap: wrap; row-gap: 6px; justify-content: flex-start; }
  .links { margin-left: auto; order: 9; }
  .info { order: 10; }
  #bar .tools > .links:first-of-type { flex: 0 0 auto; }
  select { max-width: 130px; }
  .chip, #next, #fullscreen, select { padding: 6px 11px; }
}
@media (prefers-reduced-motion: reduce) {
  #bar, #hint, #loading, .switch .track, .switch .track::after { transition-duration: .01s; }
}

/* Way back to the site: top left, fades with the bar */
#backLink { position: fixed; top: max(12px, env(safe-area-inset-top)); left: 12px; z-index: 11; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; min-height: 40px; box-sizing: border-box; font: 500 15px/1 system-ui, -apple-system, sans-serif; color: #fff; text-decoration: none; background: var(--glass); border: 1px solid var(--line); border-radius: 12px; -webkit-backdrop-filter: blur(10px) saturate(120%); backdrop-filter: blur(10px) saturate(120%); }
#backLink:hover, #backLink:focus-visible { border-color: rgba(255,255,255,.6); }
