:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #201529;
  background: #b492dd;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
#launcher {
  width: min(100%, 30rem);
  margin-inline: auto;
  padding: 1.4rem 1.1rem;
}
:root { --toolbar-height: 4.25rem; }
.controller-header {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #fff1d1;
  border-bottom: 2px solid #201529;
}
.controller-bar {
  display: flex;
  min-height: var(--toolbar-height);
  max-width: 34rem;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  padding: .35rem .7rem;
}
.brand { display: block; flex: none; object-fit: contain; }
.controller-bar nav { display: flex; align-items: stretch; gap: .3rem; }
.controller-bar button {
  min-height: 2.6rem;
  padding: .24rem .45rem;
  font: inherit;
  font-size: .75rem;
  font-weight: 800;
  color: #201529;
  background: #fff9e9;
  border: 1.5px solid #201529;
  border-radius: .55rem;
  touch-action: manipulation;
}
.controller-bar button span[aria-hidden] { display: block; line-height: 1; font-size: 1rem; }
.controller-bar button[aria-pressed="true"] { background: #e7d2fa; }
.controller-bar button:disabled { opacity: .42; }
.controller-bar button:focus-visible { outline: 2px solid #573077; outline-offset: 2px; }
.card {
  background: #fff1d1;
  border: 3px solid #201529;
  border-radius: 1.25rem;
  box-shadow: 5px 6px #201529;
  padding: 1.25rem;
}
.player { font-weight: 800; margin: 0; }
h1 { font-size: clamp(2.25rem, 12vw, 3.75rem); line-height: 1; margin: .25rem 0 0; }
#status { line-height: 1.4; }
#controls { display: grid; gap: .65rem; }
#launcher button {
  min-height: 3.3rem;
  appearance: none;
  font: inherit;
  font-weight: 800;
  text-align: left;
  color: #201529;
  background: #ffdb4b;
  border: 2px solid #201529;
  border-radius: .75rem;
  box-shadow: 2px 3px #201529;
  padding: .6rem .9rem;
  touch-action: manipulation;
}
#launcher button:active { transform: translate(2px, 3px); box-shadow: none; }
#launcher button:focus-visible { outline: 3px solid #573077; outline-offset: 3px; }
#launcher button:disabled { opacity: .7; }
#feedback { color: #582f65; font-size: .9rem; margin-bottom: 0; }
#game-feedback {
  position: fixed;
  inset: auto 1rem 1rem;
  margin: 0 auto;
  max-width: 28rem;
  padding: .7rem 1rem;
  border-radius: .5rem;
  background: #201529;
  color: white;
}

#avatar-settings {
  background: #f4e6ff;
  color: #201529;
  border-bottom: 2px solid #201529;
}
#avatar-menu {
  max-width: 34rem;
  padding: .45rem .7rem;
  margin: 0 auto;
}
#avatar-menu > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .65rem;
  font-weight: 800;
}
#avatar-menu > summary::-webkit-details-marker { display: none; }
#avatar-menu > summary::after { content: "▾"; margin-left: auto; }
#avatar-menu[open] > summary::after { content: "▴"; }
.avatar-preview {
  overflow: hidden;
  display: grid;
  place-items: center;
  height: 2.65rem;
  width: 2.65rem;
  border-radius: 50%;
  border: 1.5px solid #201529;
  background: #fff1d1;
  font-size: 1.28rem;
}
.avatar-preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
#avatar-live { font-weight: 650; color: #24563c; }
.avatar-panel { padding: .65rem 0 .3rem; }
#avatar-options { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .5rem; }
.avatar-panel button {
  display: inline-block;
  border: 1.5px solid #201529;
  background: #fff9e9;
  color: #201529;
  border-radius: .65rem;
  padding: .43rem .75rem;
  min-height: 2.55rem;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
}
#avatar-options button { padding: .25rem .45rem; min-width: 2.5rem; font-size: 1.16rem; }
#avatar-options button[aria-pressed="true"] { background: #ffdb4b; }
#avatar-note { font-size: .92rem; }

#controls a { color: #573077; font-weight: 800; }
