/* Santoko — glossy aqua glass, hard highlights, very 2007. */

:root {
  --aqua: #4fd2f5;
  --aqua-deep: #1287c9;
  --aqua-ink: #06405f;
  --lime: #9ae83f;
  --sun: #ffd257;
  --glass: rgba(255, 255, 255, 0.34);
  --glass-strong: rgba(255, 255, 255, 0.62);
  --stroke: rgba(255, 255, 255, 0.75);
  --shadow: 0 18px 40px rgba(3, 52, 84, 0.28), 0 3px 10px rgba(3, 52, 84, 0.18);
  --radius: 22px;
  font-family: "Segoe UI", "Frutiger", "Helvetica Neue", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #0a2c46;
  color: var(--aqua-ink);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

kbd {
  display: inline-block;
  min-width: 1.5em;
  padding: 1px 6px;
  border-radius: 7px;
  font: inherit;
  font-size: 0.82em;
  font-weight: 700;
  text-align: center;
  color: #0a4a6d;
  background: linear-gradient(#ffffff, #d6eef9);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18), inset 0 -2px 3px rgba(60, 130, 170, 0.25);
}

/* ------------------------------------------------------------ glass panels */

.panel,
.card {
  position: relative;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.34) 46%, rgba(190, 231, 249, 0.42) 47%, rgba(140, 210, 240, 0.5) 100%);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
}

/* The signature top-half gloss. */
.panel::after,
.card::after {
  content: "";
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 44%;
  border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 50% 50% / calc(var(--radius) - 2px) calc(var(--radius) - 2px) 22px 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.06));
  pointer-events: none;
}

/* --------------------------------------------------------------------- HUD */

#hud { position: fixed; inset: 0; pointer-events: none; }
#hud[hidden] { display: none; }

#crosshair {
  position: absolute;
  left: 50%; top: 50%;
  width: 22px; height: 22px;
  translate: -50% -50%;
  display: grid; place-items: center;
}
#crosshair span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, rgba(255, 255, 255, 0.35) 60%, rgba(255, 255, 255, 0) 70%);
  box-shadow: 0 0 0 1.5px rgba(6, 64, 95, 0.55), 0 0 10px rgba(255, 255, 255, 0.9);
}

.roster {
  position: absolute;
  top: 16px; left: 16px;
  width: 248px;
  padding: 10px 12px 12px;
  pointer-events: auto;
}
.roster header { display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
.roster .glyph { font-size: 17px; filter: drop-shadow(0 1px 2px rgba(255,255,255,0.9)); }
.roster h2 {
  margin: 0; flex: 1;
  font-size: 15px; font-weight: 700; letter-spacing: 0.01em;
  color: #08405f; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}
.roster ul { list-style: none; margin: 9px 0 0; padding: 0; position: relative; z-index: 1; }
.roster li {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 6px; border-radius: 11px;
  font-size: 13px; font-weight: 600;
  color: #0a4665;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
.roster li + li { margin-top: 2px; }
.roster li.me { background: rgba(255, 255, 255, 0.5); box-shadow: inset 0 1px 0 rgba(255,255,255,0.9); }
.roster li .dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 3px rgba(0, 40, 70, 0.4), inset 0 -3px 4px rgba(0, 0, 0, 0.22), inset 0 2px 2px rgba(255,255,255,0.7);
  flex: none;
}
.roster li .who { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster li .tagline { font-size: 11px; opacity: 0.7; font-weight: 600; }
.roster li .score {
  font-variant-numeric: tabular-nums; font-weight: 800;
  color: #06557d;
}

.code-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: linear-gradient(180deg, #ffffff, #cfeefb 52%, #a5ddf3 53%, #8ed2f0);
  box-shadow: 0 2px 6px rgba(4, 60, 92, 0.28), inset 0 1px 0 rgba(255,255,255,0.9);
  cursor: pointer; font: inherit; color: #06405f;
}
.code-chip em { font-style: normal; font-weight: 800; letter-spacing: 0.1em; font-size: 13px; white-space: nowrap; }
.code-chip .copy { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.6; }
.code-chip:hover { filter: brightness(1.06); }
.code-chip:active { transform: translateY(1px); }
.code-chip.big { padding: 8px 16px; }
.code-chip.big em { font-size: 23px; letter-spacing: 0.08em; }

.game-banner {
  position: absolute;
  top: 16px; left: 50%; translate: -50% 0;
  min-width: 300px; max-width: 420px;
  padding: 10px 16px 12px;
  text-align: center;
}
.game-banner .game-title {
  display: flex; align-items: baseline; justify-content: center; gap: 12px;
  position: relative; z-index: 1;
  font-size: 17px; font-weight: 800; color: #07445f;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}
.game-banner .timer { font-variant-numeric: tabular-nums; color: #0a6a97; font-size: 15px; }
.game-banner .game-blurb {
  position: relative; z-index: 1;
  margin-top: 2px; font-size: 12px; font-weight: 600; color: #0d5c84; opacity: 0.85;
}
.game-bar {
  position: relative; z-index: 1;
  margin-top: 8px; height: 7px; border-radius: 999px;
  background: rgba(6, 64, 95, 0.18);
  box-shadow: inset 0 1px 3px rgba(0, 40, 70, 0.35);
  overflow: hidden;
}
.game-bar i {
  display: block; height: 100%; width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7ef0c0, #56d6f7 55%, #3aa8ef);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: width 0.25s linear;
}

#promptBar {
  position: absolute;
  bottom: 20%; left: 50%; translate: -50% 0;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px; font-weight: 700;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(20, 120, 175, 0.72), rgba(6, 70, 108, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 6px 18px rgba(0, 40, 70, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  text-shadow: 0 1px 2px rgba(0, 30, 50, 0.6);
}
#promptBar[hidden] { display: none; }

.chat {
  position: absolute;
  left: 16px; bottom: 16px;
  width: 340px; max-width: 46vw;
  pointer-events: none;
}
.chat ul { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.chat li {
  align-self: flex-start;
  max-width: 100%;
  padding: 5px 11px;
  border-radius: 14px;
  font-size: 13px; font-weight: 600; line-height: 1.35;
  color: #06405f;
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(214,240,252,0.7));
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 12px rgba(4, 60, 92, 0.2), inset 0 1px 0 rgba(255,255,255,0.9);
  animation: pop 0.22s ease-out;
  word-break: break-word;
}
.chat li.system { background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(190,225,245,0.5)); font-style: italic; opacity: 0.9; }
.chat li b { font-weight: 800; }
.chat form { pointer-events: auto; }
.chat input {
  width: 100%;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: linear-gradient(180deg, #ffffff, #e7f6fd);
  box-shadow: 0 6px 16px rgba(4, 60, 92, 0.25), inset 0 2px 4px rgba(60, 130, 170, 0.2);
  font: inherit; font-size: 14px; color: #06405f;
  outline: none;
}

@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.96); } }

.hints {
  position: absolute;
  right: 16px; bottom: 16px;
  padding: 9px 13px;
  font-size: 11.5px; font-weight: 600;
  color: #0a4665;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  line-height: 1.9;
}
.hints > div { position: relative; z-index: 1; }
.hints .emotes { opacity: 0.85; }

/* --------------------------------------------------------------- overlays */

.overlay {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  padding: 24px;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(140, 225, 255, 0.55), transparent 60%),
    linear-gradient(180deg, rgba(6, 60, 100, 0.55), rgba(3, 40, 70, 0.72));
  backdrop-filter: blur(6px);
  z-index: 10;
  overflow: auto;
}
.overlay[hidden] { display: none; }

.aurora {
  position: absolute; inset: -20%;
  background:
    radial-gradient(38% 32% at 22% 26%, rgba(120, 255, 220, 0.35), transparent 70%),
    radial-gradient(42% 36% at 78% 30%, rgba(110, 200, 255, 0.4), transparent 70%),
    radial-gradient(46% 40% at 50% 88%, rgba(160, 240, 255, 0.3), transparent 70%);
  filter: blur(30px);
  animation: drift 26s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes drift {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

.card {
  position: relative;
  width: min(620px, 100%);
  padding: 26px 28px 22px;
  --radius: 28px;
  animation: rise 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.card > * { position: relative; z-index: 1; }
.card[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.98); } }

.brand { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.brand h1 {
  margin: 0;
  font-size: 40px; font-weight: 800; letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff, #bfeaff 48%, #56b9e8 52%, #1d7fc0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 3px rgba(3, 55, 90, 0.4));
}
.brand p { margin: 2px 0 0; font-size: 13.5px; font-weight: 600; color: #0b4f74; opacity: 0.9; }

.orb {
  width: 62px; height: 62px; border-radius: 50%; flex: none;
  background:
    radial-gradient(circle at 32% 26%, rgba(255,255,255,0.98), rgba(255,255,255,0.15) 32%, transparent 44%),
    radial-gradient(circle at 68% 78%, rgba(160, 255, 230, 0.6), transparent 50%),
    linear-gradient(160deg, #8ef0ff, #24a7e6 55%, #0d6bb0);
  box-shadow: 0 10px 22px rgba(6, 70, 110, 0.45), inset 0 -8px 14px rgba(3, 50, 85, 0.35);
  animation: bobble 4.5s ease-in-out infinite;
}
.orb.big { width: 84px; height: 84px; margin: 0 auto 14px; }
@keyframes bobble { 50% { transform: translateY(-7px) scale(1.03); } }

.field { display: block; margin-bottom: 14px; }
.field span {
  display: block; margin-bottom: 5px;
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase;
  color: #0b5478; opacity: 0.85;
}
.field input {
  width: 100%;
  padding: 11px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: linear-gradient(180deg, #ffffff, #e9f7fd);
  box-shadow: inset 0 2px 5px rgba(60, 130, 170, 0.28), 0 1px 0 rgba(255,255,255,0.8);
  font: inherit; font-size: 16px; font-weight: 600; color: #06405f;
  outline: none;
}
.field input:focus { box-shadow: inset 0 2px 5px rgba(60,130,170,0.28), 0 0 0 3px rgba(90, 205, 245, 0.5); }
#codeInput { letter-spacing: 0.16em; text-transform: uppercase; font-weight: 800; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.split .join, .split .make { display: flex; flex-direction: column; }
/* The two columns hold different content, so pin the buttons to the bottom of
   each rather than letting them float at whatever height the field ended. */
.split .field { margin-bottom: 0; }

.btn {
  display: block; width: 100%;
  padding: 12px 18px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: linear-gradient(180deg, #ffffff, #dff2fb 50%, #b7e2f6 51%, #96d3ef);
  box-shadow: 0 6px 16px rgba(4, 60, 92, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -3px 6px rgba(30, 110, 160, 0.22);
  font: inherit; font-size: 15px; font-weight: 700; color: #05496b;
  cursor: pointer;
  transition: filter 0.12s ease, transform 0.08s ease;
  text-align: center;
}
.btn:hover { filter: brightness(1.06) saturate(1.08); }
.btn:active { transform: translateY(1px); box-shadow: 0 3px 8px rgba(4,60,92,0.3), inset 0 2px 6px rgba(30,110,160,0.35); }
.btn strong { display: block; font-size: 16px; }
.btn small { display: block; margin-top: 3px; font-size: 11.5px; font-weight: 600; opacity: 0.72; }
.btn.primary {
  color: #ffffff;
  background: linear-gradient(180deg, #7fe6ff, #35b6ee 50%, #1d94d8 51%, #0f6fb5);
  border-color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 2px rgba(3, 55, 90, 0.5);
  box-shadow: 0 8px 20px rgba(8, 90, 140, 0.4), inset 0 1px 0 rgba(255,255,255,0.75), inset 0 -4px 8px rgba(4, 60, 100, 0.35);
}
.btn.big { padding: 16px 22px; font-size: 17px; }
.btn.subtle {
  background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(200,230,246,0.45));
  color: #0a5175; font-weight: 600;
}
.split .make .btn, .split .join .btn { margin-top: 12px; }

/* ------------------------------------------------------------ saved worlds */

.worlds { margin-top: 18px; }
.worlds header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.worlds h3 {
  margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.09em;
  text-transform: uppercase; color: #0b4f74; opacity: 0.75;
}
.linkish {
  border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 11.5px; font-weight: 700; color: #0b6fa4; opacity: 0.7;
}
.linkish:hover { opacity: 1; text-decoration: underline; }

#worldList {
  list-style: none; margin: 0; padding: 0 2px 0 0;
  display: flex; flex-direction: column; gap: 7px;
  /* Long lists scroll inside the card rather than growing it off the screen.
     The fade tells you there is more without needing a visible scrollbar. */
  max-height: 190px; overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(11, 111, 164, 0.35) transparent;
  mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 22px), transparent 100%);
}
#worldList:not(:hover) { scrollbar-color: rgba(11, 111, 164, 0.18) transparent; }
#worldList li { display: flex; gap: 6px; align-items: stretch; }

.world-open {
  flex: 1; min-width: 0; text-align: left; cursor: pointer;
  padding: 9px 13px; border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(198,231,247,0.5));
  box-shadow: 0 3px 9px rgba(4, 60, 92, 0.14), inset 0 1px 0 rgba(255,255,255,0.9);
  font: inherit; color: #05496b;
  transition: filter 0.12s ease, transform 0.08s ease;
}
.world-open:hover { filter: brightness(1.05) saturate(1.06); }
.world-open:active { transform: translateY(1px); }
.world-open strong {
  display: block; font-size: 14px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.world-open em {
  display: block; margin-top: 1px;
  font-style: normal; font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; color: #0b4f74; opacity: 0.66;
}

.world-forget {
  flex: 0 0 auto; width: 32px; cursor: pointer;
  border-radius: 11px; border: 1px solid rgba(255,255,255,0.7);
  background: rgba(255, 255, 255, 0.34);
  font: inherit; font-size: 17px; font-weight: 700; line-height: 1; color: #0a5175;
  opacity: 0.55; transition: opacity 0.12s ease, background 0.12s ease;
}
.world-forget:hover { opacity: 1; background: rgba(255, 168, 168, 0.5); }

.row { display: flex; gap: 12px; margin-top: 12px; }
.row .btn { flex: 1; }

.error {
  margin: 14px 0 0; padding: 9px 14px;
  border-radius: 12px;
  font-size: 13px; font-weight: 700; color: #7e2138;
  background: linear-gradient(180deg, rgba(255, 226, 232, 0.95), rgba(255, 196, 210, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.8);
}
.error[hidden] { display: none; }

.foot { margin: 16px 0 0; font-size: 12px; font-weight: 600; color: #0b4f74; opacity: 0.72; text-align: center; }

.loading { text-align: center; max-width: 420px; }
.loading h2 { margin: 0 0 16px; font-size: 20px; color: #06405f; font-weight: 700; }
.bar { height: 10px; border-radius: 999px; background: rgba(6, 64, 95, 0.2); box-shadow: inset 0 1px 4px rgba(0,40,70,0.4); overflow: hidden; }
.bar i {
  display: block; height: 100%; width: 4%;
  border-radius: 999px;
  background: linear-gradient(90deg, #a8f5d8, #56d6f7 60%, #2f9fe8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
  transition: width 0.3s ease;
}

.enter, .pause, .results { text-align: center; max-width: 460px; }
.enter h2, .pause h2, .games h2, .results h2 { margin: 0 0 10px; font-size: 26px; font-weight: 800; color: #06405f; }
.enter p { font-size: 14px; font-weight: 600; color: #0b4f74; }
.enter b { letter-spacing: 0.2em; font-size: 20px; color: #0a6a97; }
.enter .btn { margin-top: 8px; }

.invite { margin: 6px 0 18px; }
.invite > span { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: #0b5478; margin-bottom: 8px; }
.invite small { display: block; margin-top: 10px; font-size: 12px; font-weight: 600; color: #0b4f74; opacity: 0.75; word-break: break-all; }

.games { max-width: 560px; }
.games .sub { margin: 0 0 16px; font-size: 13.5px; font-weight: 600; color: #0b4f74; opacity: 0.85; }
.game-list { display: flex; flex-direction: column; gap: 10px; }
.game-card {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px;
  border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(226,244,253,0.6) 50%, rgba(178,224,246,0.6));
  box-shadow: 0 5px 14px rgba(4, 60, 92, 0.2), inset 0 1px 0 rgba(255,255,255,0.95);
  cursor: pointer; text-align: left; font: inherit;
  transition: transform 0.1s ease, filter 0.12s ease;
}
.game-card:hover { filter: brightness(1.05); transform: translateY(-1px); }
.game-card:disabled { opacity: 0.55; cursor: not-allowed; filter: grayscale(0.3); }
.game-card .icon {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%; font-size: 22px;
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,0.95), rgba(255,255,255,0.1) 40%, transparent 55%), linear-gradient(160deg, #8ef0ff, #2ba7e0);
  box-shadow: 0 4px 10px rgba(6, 70, 110, 0.35), inset 0 -5px 9px rgba(3, 50, 85, 0.3);
}
.game-card .text b { display: block; font-size: 15.5px; font-weight: 800; color: #06405f; }
.game-card .text span { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 600; color: #0b5478; opacity: 0.85; }

.results ol { list-style: none; margin: 0 0 18px; padding: 0; text-align: left; }
.results li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; margin-bottom: 8px;
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(206,238,251,0.6));
  border: 1px solid rgba(255,255,255,0.85);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.95);
  font-weight: 700; color: #06405f;
}
.results li.first {
  background: linear-gradient(180deg, rgba(255, 246, 210, 0.95), rgba(255, 220, 130, 0.7));
  box-shadow: 0 4px 14px rgba(180, 130, 20, 0.28), inset 0 1px 0 rgba(255,255,255,0.95);
}
.results li .rank { width: 26px; font-size: 15px; opacity: 0.75; }
.results li .dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.95); box-shadow: inset 0 -3px 4px rgba(0,0,0,0.22); }
.results li .who { flex: 1; }
.results li .pts { font-variant-numeric: tabular-nums; font-weight: 800; color: #0a6a97; }

.slider { display: block; margin: 4px 0 16px; }
.slider span {
  display: block; margin-bottom: 8px;
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase;
  color: #0b5478; opacity: 0.85;
}
.slider input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 10px; margin: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(6,64,95,0.28), rgba(6,64,95,0.14));
  box-shadow: inset 0 2px 4px rgba(0,40,70,0.35), 0 1px 0 rgba(255,255,255,0.6);
  outline: none;
}
.slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.9);
  background:
    radial-gradient(circle at 34% 28%, #ffffff, rgba(255,255,255,0.25) 42%, transparent 56%),
    linear-gradient(160deg, #8ef0ff, #2ba7e0);
  box-shadow: 0 3px 8px rgba(6,70,110,0.45);
  cursor: pointer;
}
.slider input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.9);
  background: linear-gradient(160deg, #8ef0ff, #2ba7e0);
  box-shadow: 0 3px 8px rgba(6,70,110,0.45);
  cursor: pointer;
}

.note {
  margin: 14px 0 0; padding: 10px 14px;
  border-radius: 13px;
  font-size: 12.5px; font-weight: 600; line-height: 1.45;
  color: #6a4a12;
  background: linear-gradient(180deg, rgba(255,246,214,0.95), rgba(255,231,163,0.85));
  border: 1px solid rgba(255,255,255,0.8);
  text-align: left;
}
.note[hidden] { display: none; }

.enter .btn + .btn { margin-top: 10px; }

#lookHint { opacity: 0.85; font-style: italic; }
body.dragging-look #scene { cursor: grabbing; }
body.dragging-look { user-select: none; }

/* ----------------------------------------------------------------- toast */

#toast {
  position: fixed;
  left: 50%; top: 22px; translate: -50% 0;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  z-index: 20; pointer-events: none;
}
#toast div {
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13.5px; font-weight: 700; color: #ffffff;
  background: linear-gradient(180deg, rgba(38, 160, 214, 0.9), rgba(10, 92, 145, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 22px rgba(0, 40, 70, 0.35), inset 0 1px 0 rgba(255,255,255,0.6);
  text-shadow: 0 1px 2px rgba(0, 30, 50, 0.5);
  animation: toastIn 0.3s ease-out;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }

/* --------------------------------------------------------- touch controls */

#touch { position: absolute; inset: 0; pointer-events: none; }
#touch[hidden] { display: none; }
.stick {
  position: absolute; left: 26px; bottom: 26px;
  width: 128px; height: 128px; border-radius: 50%;
  background: radial-gradient(circle at 40% 34%, rgba(255,255,255,0.5), rgba(255,255,255,0.12) 60%, rgba(255,255,255,0.04));
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 2px 8px rgba(0, 40, 70, 0.25);
  pointer-events: auto; touch-action: none;
}
.stick i {
  position: absolute; left: 50%; top: 50%;
  width: 52px; height: 52px; margin: -26px 0 0 -26px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #ffffff, rgba(255,255,255,0.3) 42%, transparent 56%), linear-gradient(160deg, #8ef0ff, #2ba7e0);
  box-shadow: 0 4px 10px rgba(6, 70, 110, 0.4);
}
.tbtn {
  position: absolute; right: 26px;
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: linear-gradient(180deg, #ffffff, #cfeefb 50%, #9ed7f2 51%, #7cc6ec);
  box-shadow: 0 6px 16px rgba(4, 60, 92, 0.3), inset 0 1px 0 rgba(255,255,255,0.95);
  font: inherit; font-size: 20px; font-weight: 800; color: #06405f;
  pointer-events: auto; touch-action: none;
}
#btnJump { bottom: 110px; }
#btnAct { bottom: 26px; right: 112px; }

@media (max-width: 720px) {
  .split { grid-template-columns: 1fr; }
  .brand h1 { font-size: 32px; }
  .roster { width: 200px; }
  .hints { display: none; }
  .chat { width: 62vw; bottom: 130px; }
}
