html, body { margin: 0; padding: 0; overflow-x: hidden; background: #fff; color: #000; }
body { font-family: Helvetica, Arial, sans-serif; }
header { padding: 2.5rem 4rem 1rem; }
a {
  color: #0000ff;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  display: inline-block;
  transition: transform .15s ease;
}
a:hover { transform: translateY(-3px) scale(1.05); }
a:active { transform: translateY(0) scale(1); }
header a { font-size: 3.5rem; }
.main { padding: 2.5rem 0.25rem 6rem; }
.main p, .main h2 { margin: 0; line-height: 1; max-width: 40ch; }
.main .glyphs { margin-bottom: 4rem; }
.glyphs { font-size: 3.5rem; font-weight: bold; }
article { display: flex; align-items: flex-start; gap: 0.5rem; }
article h2 { font-size: 5.5rem; font-weight: bold; margin-top: -0.35rem; }
article p { font-size: 3.5rem; }
p.error { font-size: 2.5rem; }

.players { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 3rem; margin: 4rem 0.25rem 0; }
.switch {
  appearance: none; -webkit-appearance: none;
  position: relative; width: 12rem; height: 6rem; margin: 0;
  background: #eee; border: 2px solid #999; border-radius: 3rem;
  cursor: pointer; transition: background .25s;
}
.switch::before {
  content: "🦗"; position: absolute; top: 0.4rem; left: 0.4rem;
  width: 5rem; height: 5rem; border-radius: 50%; background: #fff;
  display: grid; place-items: center; font-size: 3rem; line-height: 1;
  filter: grayscale(1); transition: transform .25s, filter .25s;
}
.switch:checked { background: #2e7051; border-color: #2e7051; }
.switch:checked::before { transform: translateX(6rem); filter: none; }
.switch:focus-visible { outline: 3px solid #0000ff; outline-offset: 3px; }


.toast {
  position: fixed; left: 50%; top: 50%; z-index: 10;
  transform: translate(-50%, -50%);
  color: #ff0000; font-size: 5rem; font-weight: bold;
  -webkit-text-stroke: 1px #000;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .18), 1px 0 0 #000, -1px 0 0 #000, 0 1px 0 #000, 0 -1px 0 #000;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  opacity: 0; pointer-events: none; transition: opacity .25s;
  max-width: 92vw; text-align: center; overflow-wrap: break-word;
}
.toast.show { opacity: 1; }
.player { animation: popin .4s ease; }
@keyframes popin {
  0% { transform: scale(1.15); opacity: 0; }
  60% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 800px) {
  header { padding: 1.5rem 1rem 0.5rem; }
  header a, .glyphs, article p { font-size: 2rem; }
  article h2 { font-size: 3.2rem; }
  .switch { width: 8rem; height: 4rem; }
  .switch::before { width: 3.2rem; height: 3.2rem; font-size: 2rem; }
  .switch:checked::before { transform: translateX(4rem); }
  .toast { font-size: 3rem; -webkit-text-stroke-width: 0.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .player { animation: none; }
}
