@import url('vendor/fonts/fonts.css');
:root {
  color-scheme:dark;
  --paper:#e5e4db;
  --muted:#858986;
  --orange:#eb9263;
  --line:#ffffff16;
  font-family:'DM Sans',sans-serif;
  color:var(--paper);
  background:#0a0d0f;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  height:100svh;
  min-height:620px;
  overflow:hidden;
}

button,a {
  -webkit-tap-highlight-color:transparent;
}

button {
  font:inherit;
  color:inherit;
  cursor:pointer;
}

button:disabled {
  cursor:wait;
  opacity:.5;
}

button:focus-visible,a:focus-visible {
  outline:2px solid var(--orange);
  outline-offset:6px;
}

a {
  color:inherit;
  text-decoration:none;
}

button svg {
  width:19px;
  height:19px;
  stroke:currentColor;
  stroke-width:1.5;
}

button {
  border:0;
}

#room {
  position:absolute;
  inset:0;
}

#room canvas {
  display:block;
  width:100%;
  height:100%;
  touch-action:none;
}

.vignette {
  pointer-events:none;
  position:absolute;
  inset:0;
  background:radial-gradient(ellipse at 50% 45%,transparent 35%,#05080944 75%,#050809a0 100%);
}

.topbar {
  position:absolute;
  top:0;
  left:0;
  right:0;
  margin:0 48px;
  display:flex;
  align-items:center;
  height:106px;
  border-bottom:1px solid var(--line);
  gap:24px;
}

.brand {
  display:flex;
  align-items:center;
  font-family:'Space Grotesk',sans-serif;
  font-size:18px;
  font-weight:600;
  letter-spacing:3px;
  gap:13px;
}

.brand svg {
  width:30px;
  height:30px;
  stroke:var(--orange);
  stroke-width:1.4;
}

.brand-dot {
  align-self:flex-start;
  font:10px sans-serif;
  letter-spacing:0;
  margin-left:-8px;
  margin-top:7px;
  color:var(--muted);
}

.top-caption {
  margin-left:auto;
  font-size:9px;
  font-weight:500;
  letter-spacing:2.6px;
  color:#818682;
}

.avatars-button {
  background:#ffffff06;
  border:1px solid var(--line);
  border-radius:20px;
  padding:9px 15px;
  font-size:11px;
  margin-left:auto;
}
.avatars-button span { color:var(--orange); margin-left:7px; font-size:9px; }
.avatars-button:hover,.avatars-button[aria-expanded="true"] { border-color:#eb926377; }
.avatar-panel {
  position:absolute;
  z-index:6;
  right:48px;
  top:164px;
  width:330px;
  padding:22px;
  background:#161c1bf5;
  border:1px solid #ffffff1d;
  border-radius:12px;
  box-shadow:0 15px 70px #0009;
  backdrop-filter:blur(20px);
}
.avatar-panel[hidden] { display:none; }
body.editing-avatars .bottom-panel,body.editing-avatars footer { visibility:hidden; }
.avatar-panel .help-heading { margin-bottom:12px; }
.avatar-intro,.avatar-privacy { font-size:11px; line-height:1.6; color:#a2aba4; }
.avatar-privacy { font-size:9px; margin-bottom:0; padding-top:12px; border-top:1px solid var(--line); color:#79867c; }
.avatar-row { display:flex; align-items:center; gap:10px; margin:20px 0; }
.avatar-row>div { flex:1; min-width:0; }
.avatar-row strong { display:block; font-size:12px; font-weight:500; }
.avatar-row small { display:block; font-size:9px; color:#859288; margin-top:4px; }
.avatar-dot { width:12px; height:12px; border-radius:50%; flex-shrink:0; }
.player-one { background:#799bb4; }
.player-two { background:#d69c72; }
.player-three { background:#94a77c; }
.player-four { background:#ad859c; }
.photo-button { position:relative; border:1px solid #ffffff2a; border-radius:6px; padding:8px 12px; font-size:10px; cursor:pointer; }
.photo-button input { position:absolute; inset:0; opacity:0; width:100%; cursor:pointer; }
.photo-button:focus-within { outline:2px solid var(--orange); outline-offset:3px; }
.reset-face { background:transparent; padding:6px; color:#99a59b; font-size:19px; }

.icon-button {
  background:transparent;
  display:flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  border:1px solid var(--line);
  border-radius:50%;
  color:#a6aaa6;
}

.icon-button:hover {
  color:var(--paper);
  border-color:#ffffff4a;
}

.topbar .icon-button {
  margin-left:25px;
}

.room-note {
  position:absolute;
  top:136px;
  left:49px;
  font:10px 'Space Grotesk',sans-serif;
  letter-spacing:1.8px;
  color:#858a87;
  display:flex;
  align-items:center;
  gap:12px;
}

.tiny-line {
  width:20px;
  height:1px;
  background:var(--orange);
}

.note-slash {
  color:#424846;
  margin:0 1px;
}

.scene-caption {
  position:absolute;
  right:48px;
  top:136px;
  display:flex;
  flex-direction:column;
  gap:9px;
  align-items:flex-end;
  font-size:8px;
  letter-spacing:1.8px;
  color:#636c68;
}

.signal {
  font-family:'Space Grotesk',sans-serif;
  letter-spacing:1px;
  font-size:10px;
  display:flex;
  align-items:center;
  gap:7px;
}

.signal i {
  width:4px;
  height:4px;
  background:#718974;
  border-radius:50%;
}

.bottom-panel {
  position:absolute;
  left:48px;
  right:48px;
  bottom:84px;
  display:flex;
  justify-content:space-between;
  align-items:end;
  pointer-events:none;
}

.game-info,.actions {
  pointer-events:auto;
}

.eyebrow {
  font-family:'Space Grotesk',sans-serif;
  font-size:9px;
  letter-spacing:1.5px;
  display:flex;
  align-items:center;
  gap:8px;
  color:#858d88;
}

.live-dot {
  width:5px;
  height:5px;
  background:var(--orange);
  border-radius:50%;
  box-shadow:0 0 8px #ed976355;
}

.sep {
  margin:0 5px;
  color:#4e5551;
}

h1 {
  font-family:'Space Grotesk',sans-serif;
  letter-spacing:-3px;
  font-size:58px;
  font-weight:600;
  line-height:1;
  margin:14px 0 12px;
}

.title-period {
  color:var(--orange);
}

.game-info p {
  font-size:12px;
  color:#969b95;
  margin:0;
  letter-spacing:.15px;
}

.actions {
  width:282px;
}

.play-button {
  width:100%;
  height:53px;
  padding:0 18px;
  background:var(--orange);
  color:#211c17;
  display:flex;
  align-items:center;
  gap:13px;
  border-radius:5px;
  font-size:12px;
  font-weight:700;
  transition:background .2s,transform .2s;
  box-shadow:0 4px 30px #0003;
}

.play-button:hover {
  background:#f6ad7f;
  transform:translateY(-2px);
}

.play-button svg {
  fill:currentColor;
  stroke:none;
  width:17px;
}

.play-button kbd {
  margin-left:auto;
  background:#2b1d1312;
  border-color:#2b1d1333;
  color:#674a37;
}

.secondary-actions {
  margin-top:17px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
}

.text-button {
  padding:3px 0;
  background:transparent;
  display:flex;
  align-items:center;
  gap:7px;
  font-size:10px;
  color:#9ba19a;
  white-space:nowrap;
}

.text-button:hover {
  color:var(--paper);
}

.text-button svg {
  width:16px;
  height:16px;
}

.control-divider {
  width:1px;
  height:10px;
  background:var(--line);
}

#pause-icon {
  font-size:13px;
}

.help-icon {
  border:1px solid #9ba19a88;
  border-radius:50%;
  width:13px;
  height:13px;
  font-size:9px;
  text-align:center;
  line-height:12px;
}

footer {
  position:absolute;
  bottom:0;
  height:54px;
  left:48px;
  right:48px;
  border-top:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:8px;
  letter-spacing:1.8px;
  color:#626b65;
}

footer a {
  letter-spacing:1px;
  font-size:9px;
}

footer a:hover {
  color:var(--orange);
}

.orbit-hint {
  display:flex;
  gap:8px;
  align-items:center;
  letter-spacing:.5px;
  font-size:9px;
  color:#7c847d;
}

.orbit-hint svg {
  width:17px;
  height:17px;
  stroke:currentColor;
  stroke-width:1;
}

kbd {
  display:inline-block;
  min-width:21px;
  text-align:center;
  border:1px solid #ffffff22;
  background:#ffffff06;
  border-radius:3px;
  padding:3px 5px;
  font:10px 'DM Sans',sans-serif;
}

.help-panel {
  position:absolute;
  right:48px;
  bottom:203px;
  width:320px;
  background:#161c1bf5;
  border:1px solid #ffffff1d;
  border-radius:9px;
  padding:21px;
  box-shadow:0 15px 70px #0009;
  backdrop-filter:blur(20px);
  z-index:5;
}

.help-panel[hidden] {
  display:none;
}

.help-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:0 0 20px;
  font-size:14px;
}

.help-heading .icon-button {
  width:24px;
  height:24px;
  font-size:20px;
}

.help-panel>div:not(:first-child) {
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:11px;
  color:#a9afa6;
  margin:12px 0;
}

.help-panel p {
  font-size:10px;
  line-height:1.7;
  color:#717c73;
  border-top:1px solid var(--line);
  padding-top:14px;
  margin-bottom:0;
}

.status {
  position:absolute;
  left:50%;
  top:46%;
  transform:translate(-50%,-50%);
  font-size:12px;
  color:#d7e2db;
  background:#101916ef;
  border:1px solid #ffffff18;
  padding:14px 20px;
  border-radius:5px;
  max-width:85%;
  text-align:center;
}

.status[hidden] {
  display:none;
}

.status.error {
  border-color:#d6916688;
  color:#f3bc9a;
}

#touch-controls[hidden] {
  display:none;
}

#touch-controls {
  position:absolute;
  left:20px;
  right:20px;
  bottom:220px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  pointer-events:none;
}

#touch-controls button {
  pointer-events:auto;
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
  background:#27322ca0;
  border:1px solid #ffffff24;
  color:#c8d0c3;
  font-size:17px;
  border-radius:50%;
  width:45px;
  height:45px;
  backdrop-filter:blur(10px);
}

#touch-controls button:active {
  background:var(--orange);
  color:#111;
}

.dpad {
  display:grid;
  grid-template-columns:repeat(3,42px);
  grid-template-rows:repeat(2,42px);
  gap:3px;
}

.dpad button:first-child {
  grid-column:2;
}

.dpad button:nth-child(2) {
  grid-column:1;
  grid-row:2;
}

.dpad button:nth-child(3) {
  grid-column:2;
  grid-row:2;
}

.dpad button:nth-child(4) {
  grid-column:3;
  grid-row:2;
}

.ab {
  display:flex;
  gap:12px;
  transform:rotate(-15deg);
}

.ab button:last-child {
  margin-top:-16px;
}

@media(min-width:1600px) {
  .topbar {
    margin:0 65px;
  }
  .room-note {
    left:66px;
  }
  .scene-caption {
    right:65px;
  }
  .bottom-panel {
    left:65px;
    right:65px;
    bottom:96px;
  }
  footer {
    left:65px;
    right:65px;
  }
  h1 {
    font-size:68px;
  }
  .game-info p {
    font-size:13px;
  }
  .actions {
    width:310px;
  }
}

@media(max-width:700px) {
  body {
    min-height:560px;
  }
  .topbar {
    height:80px;
    margin:0 23px;
  }
  .brand {
    font-size:14px;
    letter-spacing:2px;
    gap:10px;
  }
  .brand svg {
    width:25px;
  }
  .top-caption {
    display:none;
  }
  .topbar .icon-button {
    margin-left:auto;
    width:32px;
    height:32px;
  }
  .topbar .avatars-button { margin-left:auto; padding:8px 11px; font-size:10px; }
  .topbar .icon-button { margin-left:0; }
  .topbar { gap:12px; }
  .avatar-panel { top:auto; bottom:24px; right:24px; width:calc(100vw - 48px); padding:17px 20px; }
  .avatar-panel .avatar-row { margin:10px 0; }
  .avatar-panel .avatar-intro { display:none; }
  .avatar-panel .avatar-intro { margin:8px 0; font-size:10px; }
  .avatar-panel .avatar-privacy { padding-top:9px; font-size:9px; }
  .room-note {
    left:24px;
    top:103px;
    font-size:8px;
    gap:8px;
  }
  .scene-caption {
    right:24px;
    top:104px;
    font-size:7px;
    letter-spacing:1px;
  }
  .signal {
    font-size:8px;
  }
  .bottom-panel {
    left:24px;
    right:24px;
    bottom:76px;
    gap:22px;
  }
  .eyebrow {
    font-size:7px;
    letter-spacing:.7px;
    gap:5px;
  }
  .eyebrow .sep {
    margin:0 1px;
  }
  h1 {
    font-size:39px;
    letter-spacing:-2px;
    margin:12px 0 9px;
  }
  .game-info p {
    font-size:10px;
    max-width:165px;
    line-height:1.5;
  }
  .actions {
    width:164px;
    flex-shrink:0;
  }
  .play-button {
    height:45px;
    padding:0 11px;
    font-size:10px;
    gap:7px;
  }
  .play-button kbd {
    display:none;
  }
  .play-button svg {
    width:13px;
  }
  .secondary-actions {
    gap:8px;
    flex-wrap:wrap;
    justify-content:flex-start;
    margin-top:10px;
  }
  .text-button {
    font-size:9px;
    gap:5px;
  }
  .secondary-actions .control-divider {
    display:none;
  }
  #help {
    margin-left:4px;
  }
  footer {
    left:24px;
    right:24px;
    height:47px;
    font-size:6px;
    letter-spacing:1px;
  }
  .orbit-hint {
    display:none;
  }
  .help-panel {
    right:24px;
    bottom:197px;
    width:min(320px,calc(100vw - 48px));
  }
}

@media(max-width:370px) {
  .topbar { margin:0 18px; gap:8px; }
  .brand { font-size:12px; letter-spacing:1.2px; gap:8px; }
  .topbar .avatars-button { padding:8px 9px; }
  .avatars-button span { display:none; }
  .bottom-panel {
    gap:10px;
    left:18px;
    right:18px;
  }
  .actions {
    width:146px;
  }
  h1 {
    font-size:34px;
  }
  .eyebrow {
    font-size:6px;
  }
  .game-info p {
    font-size:9px;
  }
  .play-button {
    font-size:9px;
  }
  .scene-caption>span:first-child {
    display:none;
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation:none!important;
    transition:none!important;
  }
}

.controller-take-hint {
  position:fixed;
  left:50%;
  bottom:max(32px,env(safe-area-inset-bottom));
  transform:translateX(-50%);
  color:#f2f0e8;
  font-size:14px;
  font-weight:500;
  letter-spacing:.02em;
  text-shadow:0 1px 5px #000,0 0 16px #000;
  white-space:nowrap;
  pointer-events:none;
  user-select:none;
  z-index:20;
}
.controller-take-hint[hidden] { display:none; }

.cart-toast {
  position:absolute;
  left:50%;
  bottom:9%;
  transform:translateX(-50%);
  font-size:13px;
  color:#d7e2db;
  background:#101916ef;
  border:1px solid #ffffff18;
  padding:12px 18px;
  border-radius:5px;
  max-width:85%;
  text-align:center;
  pointer-events:none;
  z-index:5;
}

.cart-toast[hidden] {
  display:none;
}

.cart-toast.error {
  border-color:#d6916688;
  color:#f3bc9a;
}
