* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: #2a1d4f;
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  color: #2b2350;
  user-select: none;
}
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#ui { position: fixed; inset: 0; pointer-events: none; }
.hidden { display: none !important; }
.screen { position: absolute; inset: 0; pointer-events: auto; }
kbd {
  display: inline-block; padding: 1px 7px; border-radius: 6px;
  background: #fff; color: #3b2d7a; font: 800 12px 'Nunito', sans-serif;
  box-shadow: 0 2px 0 #b9acef;
}

/* ---------- TITLE ---------- */
#title {
  display: flex; align-items: center; justify-content: flex-start;
  padding: 24px 16px 24px 5vw; overflow-y: auto;
  background: linear-gradient(90deg, rgba(42,29,79,.55) 0%, rgba(42,29,79,.25) 45%, rgba(42,29,79,0) 70%);
}
.title-col { width: min(520px, 100%); display: flex; flex-direction: column; gap: 14px; margin: auto 0; }
.logo {
  font-family: 'Lilita One', 'Arial Black', Impact, sans-serif;
  line-height: .86; letter-spacing: 2px; display: flex; flex-direction: column;
  transform: rotate(-3deg); margin-bottom: 4px;
}
.logo span { font-size: clamp(64px, 11vw, 118px); -webkit-text-stroke: 4px #2b2350; paint-order: stroke fill; }
.logo .l1 { color: #ffd23f; text-shadow: 0 8px 0 #2b2350, 0 14px 22px rgba(0,0,0,.35); animation: wobble 3s ease-in-out infinite; }
.logo .l2 { color: #ff5ea8; text-shadow: 0 8px 0 #2b2350, 0 14px 22px rgba(0,0,0,.35); margin-left: 34px; animation: wobble 3s ease-in-out -1.5s infinite; }
@keyframes wobble { 0%,100% { transform: rotate(0deg) translateY(0);} 50% { transform: rotate(1.5deg) translateY(-4px);} }
.tagline { color: #fff; font-weight: 800; font-size: 17px; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.tagline em { color: #9ff3ff; font-style: normal; }

.panel {
  background: rgba(255,255,255,.93); border-radius: 18px; padding: 12px 14px;
  box-shadow: 0 6px 0 #2b2350, 0 12px 30px rgba(0,0,0,.25); border: 3px solid #2b2350;
}
.panel-h { font-weight: 900; text-transform: uppercase; font-size: 13px; letter-spacing: 1px; color: #7a5cff; margin-bottom: 8px; }
.courses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.course-card {
  text-align: left; border: 3px solid #d9d2ff; background: #f6f3ff; border-radius: 14px;
  padding: 10px; cursor: pointer; font-family: inherit; color: inherit; transition: transform .12s, border-color .12s;
}
.course-card:hover { transform: translateY(-2px); }
.course-card.selected { border-color: #ff5ea8; background: #fff0f7; box-shadow: 0 4px 0 #ff5ea8; }
.cc-name { font-family: 'Lilita One', 'Arial Black', sans-serif; font-size: 19px; line-height: 1.05; color: #2b2350; }
.cc-type { font-weight: 900; font-size: 11px; color: #ff5ea8; letter-spacing: .5px; margin: 2px 0 4px; }
.cc-desc { font-size: 12px; font-weight: 700; color: #5d5486; line-height: 1.3; }

.big-btn {
  font-family: 'Lilita One', 'Arial Black', sans-serif; font-size: 34px; letter-spacing: 2px;
  color: #2b2350; background: #ffd23f; border: 4px solid #2b2350; border-radius: 20px;
  padding: 10px 30px; cursor: pointer; box-shadow: 0 7px 0 #2b2350; transition: transform .08s, box-shadow .08s;
}
.big-btn:hover { transform: translateY(-2px); box-shadow: 0 9px 0 #2b2350; background: #ffdd66; }
.big-btn:active { transform: translateY(5px); box-shadow: 0 2px 0 #2b2350; }
.big-btn.small { font-size: 22px; padding: 8px 20px; border-radius: 16px; box-shadow: 0 5px 0 #2b2350; }
.big-btn.alt { background: #9ff3ff; }
.big-btn.alt:hover { background: #c2f8ff; }
.title-btns { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
#startBtn { align-self: flex-start; animation: pulse 1.6s ease-in-out infinite; }
#customizeBtn { display: flex; flex-direction: column; align-items: flex-start; font-size: 24px; padding: 8px 18px 9px; line-height: 1; max-width: 100%; }
#customizeBtn .cz-btn-sub {
  font: 800 12px 'Nunito', sans-serif; letter-spacing: 0; margin-top: 4px; color: #3b2d7a;
  display: flex; align-items: center; gap: 6px; max-width: 250px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#customizeBtn .cz-btn-sub::before { content: ''; width: 11px; height: 11px; border-radius: 50%; background: var(--sw, #ffd23f); border: 2px solid #2b2350; flex-shrink: 0; }
@keyframes pulse { 0%,100% { transform: scale(1);} 50% { transform: scale(1.05);} }
.controls { display: flex; flex-wrap: wrap; gap: 6px 14px; color: #fff; font-weight: 800; font-size: 13px; text-shadow: 0 1px 0 rgba(0,0,0,.4); }

/* ---------- CUSTOMIZE (Bean Boutique) ---------- */
#customize {
  display: flex; flex-direction: column; color: #2b2350;
  background:
    radial-gradient(circle at 50% 58%, rgba(159,243,255,.28) 0, rgba(159,243,255,0) 38%),
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(160deg, #3a2775 0%, #2a1d4f 55%, #241843 100%);
}
.cz-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px 6px; }
.cz-title {
  font-family: 'Lilita One', 'Arial Black', sans-serif; font-size: clamp(30px, 4vw, 46px); color: #ffd23f; letter-spacing: 1px;
  -webkit-text-stroke: 3px #2b2350; paint-order: stroke fill; text-shadow: 0 5px 0 #2b2350; transform: rotate(-2deg);
}
.cz-head-r { display: flex; align-items: center; gap: 10px; }
.cz-back, .cz-ghost { white-space: nowrap;
  font: 900 15px 'Nunito', sans-serif; color: #fff; background: rgba(255,255,255,.12); border: 3px solid rgba(255,255,255,.55);
  border-radius: 999px; padding: 7px 16px; cursor: pointer; transition: background .12s, transform .12s;
}
.cz-back:hover, .cz-ghost:hover { background: rgba(255,255,255,.24); transform: translateY(-1px); }
#czDone { font-size: 22px; padding: 6px 22px; }

.cz-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 220px minmax(0, 1fr) minmax(320px, 430px); gap: 16px; padding: 8px 20px 20px; }
.cz-tabs { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.cz-tab {
  display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; font-family: inherit; color: #2b2350;
  background: rgba(255,255,255,.9); border: 3px solid #2b2350; border-radius: 16px; padding: 8px 10px;
  box-shadow: 0 4px 0 #2b2350; transition: transform .1s, background .1s;
}
.cz-tab:hover { transform: translateX(3px); }
.cz-tab.on { background: #ffd23f; transform: translateX(8px); }
.cz-tab-n {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: #7a5cff; color: #fff; font-family: 'Lilita One', 'Arial Black', sans-serif; font-size: 17px;
}
.cz-tab.on .cz-tab-n { background: #ff5ea8; }
.cz-tab-t { display: flex; flex-direction: column; min-width: 0; }
.cz-tab-l { font-family: 'Lilita One', 'Arial Black', sans-serif; font-size: 19px; line-height: 1.05; }
.cz-tab-v { font-weight: 800; font-size: 12px; color: #5d5486; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 5px; }
.cz-tab[data-slot="color"] .cz-tab-v::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--sw); border: 2px solid #2b2350; flex-shrink: 0; }

.cz-stage { position: relative; min-height: 0; min-width: 0; }
#czCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#czCanvas:active { cursor: grabbing; }
.cz-name {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px;
  background: #fff; border: 3px solid #2b2350; border-radius: 999px; padding: 5px 6px 5px 16px; box-shadow: 0 5px 0 #2b2350;
}
.cz-name label { font-weight: 900; font-size: 13px; color: #7a5cff; text-transform: uppercase; letter-spacing: 1px; }
.cz-name input {
  width: 170px; font: 800 17px 'Nunito', sans-serif; padding: 5px 12px; border-radius: 999px;
  border: 3px solid #d9d2ff; color: #2b2350; outline: none; text-align: center;
}
.cz-name input:focus { border-color: #7a5cff; }
.cz-spin-hint { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.7); font-weight: 800; font-size: 13px; pointer-events: none; }

.cz-options {
  min-height: 0; display: flex; flex-direction: column; background: rgba(255,255,255,.95); border: 3px solid #2b2350;
  border-radius: 20px; box-shadow: 0 7px 0 #2b2350, 0 14px 30px rgba(0,0,0,.25); padding: 14px 14px 10px;
}
.cz-opt-h { display: flex; align-items: center; gap: 10px; font-family: 'Lilita One', 'Arial Black', sans-serif; font-size: 28px; line-height: 1; }
.cz-opt-n {
  width: 34px; height: 34px; border-radius: 50%; background: #ff5ea8; color: #fff; font-size: 19px;
  display: flex; align-items: center; justify-content: center; border: 3px solid #2b2350;
}
.cz-opt-desc { font-weight: 800; font-size: 13px; color: #5d5486; margin: 6px 0 10px; min-height: 18px; }
.cz-opt-desc.warn { color: #d6336c; }
.cz-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-content: start; padding: 2px 4px 8px 2px; }
.cz-grid.colors { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cz-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; font-family: inherit; color: #2b2350;
  background: #f6f3ff; border: 3px solid #d9d2ff; border-radius: 14px; padding: 4px 4px 7px; transition: transform .1s, border-color .1s;
}
.cz-card:hover { transform: translateY(-2px); border-color: #b9acef; }
.cz-card img { width: 100%; aspect-ratio: 1; display: block; border-radius: 10px; background: radial-gradient(circle at 50% 60%, #fff 0, #ebe5ff 75%); }
.cz-card-l { font-weight: 900; font-size: 12.5px; line-height: 1.15; text-align: center; }
.cz-grid.colors .cz-card { border-bottom: 6px solid var(--sw); }
.cz-card.on { border-color: #ff5ea8; background: #fff0f7; box-shadow: 0 4px 0 #ff5ea8; }
.cz-grid.colors .cz-card.on { border-bottom-color: var(--sw); }
.cz-card.on::after {
  content: '✓'; position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%;
  background: #ff5ea8; color: #fff; font-weight: 900; font-size: 14px; display: flex; align-items: center; justify-content: center; border: 3px solid #2b2350;
}
.cz-card.locked img { filter: grayscale(1) brightness(.85); opacity: .65; }
.cz-card.locked .cz-card-l { color: #8f88ad; }
.cz-lock { position: absolute; top: 8px; right: 8px; font-size: 18px; }

@media (max-width: 1000px) {
  .cz-main { grid-template-columns: 170px minmax(0, 1fr) minmax(280px, 340px); gap: 12px; padding: 6px 12px 14px; }
  .cz-tab-l { font-size: 16px; }
  .cz-grid, .cz-grid.colors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .cz-head { padding: 10px 16px 4px; }
  .cz-ghost { padding: 6px 10px; font-size: 13px; }
  .cz-main { display: flex; flex-direction: column; gap: 10px; padding: 4px 16px 14px; }
  .cz-stage { flex: 0 0 36vh; }
  .cz-tabs { flex-direction: row; overflow-x: auto; justify-content: flex-start; padding: 2px 2px 8px; flex-shrink: 0; }
  .cz-tab { flex-shrink: 0; padding: 6px 10px; }
  .cz-tab:hover, .cz-tab.on { transform: translateY(-2px); }
  .cz-tab-v { display: none; }
  .cz-options { flex: 1; }
  .cz-name input { width: 130px; }
}
@media (max-width: 480px) {
  .cz-hide-sm { display: none; }
  .cz-title { font-size: 24px; -webkit-text-stroke-width: 2px; text-shadow: 0 3px 0 #2b2350; }
  .cz-back { padding: 6px 10px; font-size: 13px; }
  #czDone { font-size: 18px; padding: 5px 14px; }
}

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; }
#hudTop { position: absolute; top: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 0 16px; }
.pill {
  background: rgba(255,255,255,.92); border: 3px solid #2b2350; border-radius: 999px; padding: 4px 14px;
  font-weight: 900; font-size: 16px; box-shadow: 0 4px 0 #2b2350; display: flex; align-items: center;
}
.pill.big { font-family: 'Lilita One', 'Arial Black', sans-serif; font-size: 24px; font-weight: 400; min-width: 92px; justify-content: center; }
/* team scores (Fly Ball Frenzy) */
.ts { background: var(--tc); color: #fff; border-radius: 999px; padding: 0 10px; -webkit-text-stroke: 0; text-shadow: 0 2px 0 rgba(43,35,80,.45); }
.ts.mine { box-shadow: 0 0 0 3px #ffd23f; }
.ts-sep { margin: 0 6px; }
.pill.big.sd { background: #ff4f5e; color: #fff; animation: hintPulse .8s ease-in-out infinite; }
#hudPos {
  position: absolute; top: 70px; left: 50%; transform: translateX(-50%);
  font-family: 'Lilita One', 'Arial Black', sans-serif; color: #fff; font-size: 22px;
  -webkit-text-stroke: 2px #2b2350; paint-order: stroke fill; text-shadow: 0 3px 0 #2b2350;
}
#feed { position: absolute; top: 16px; right: 16px; width: min(360px, 46vw); display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.feed-item {
  background: rgba(43,35,80,.86); color: #fff; font-weight: 800; font-size: 13px; padding: 6px 12px;
  border-radius: 12px; border-left: 5px solid #ff5ea8; animation: feedIn .25s ease-out; max-width: 100%;
}
.feed-item.good { border-left-color: #4ee08a; }
.feed-item.info { border-left-color: #4fc3f7; }
.feed-item.fade { opacity: 0; transition: opacity .6s; }
.feed-item b { color: var(--c, #ffd23f); }
@keyframes feedIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
#banner {
  position: absolute; top: 30%; left: 0; right: 0; text-align: center;
  font-family: 'Lilita One', 'Arial Black', Impact, sans-serif; font-size: clamp(48px, 10vw, 120px);
  color: #ffd23f; -webkit-text-stroke: 5px #2b2350; paint-order: stroke fill; text-shadow: 0 8px 0 #2b2350;
  pointer-events: none; opacity: 0;
}
#banner.show { animation: bannerPop .9s cubic-bezier(.2,1.6,.4,1) forwards; }
#banner.hold { animation: bannerPopHold .5s cubic-bezier(.2,1.6,.4,1) forwards; }
#banner .sub { display: block; font-size: .32em; color: #fff; -webkit-text-stroke: 3px #2b2350; margin-top: 6px; }
@keyframes bannerPop { 0% { opacity: 0; transform: scale(.3);} 25% { opacity: 1; transform: scale(1.08);} 75% { opacity: 1; transform: scale(1);} 100% { opacity: 0; transform: scale(1.2);} }
@keyframes bannerPopHold { 0% { opacity: 0; transform: scale(.3);} 60% { opacity: 1; transform: scale(1.08);} 100% { opacity: 1; transform: scale(1);} }
#toast {
  position: absolute; bottom: 14%; left: 50%; transform: translateX(-50%);
  background: #2b2350; color: #fff; font-weight: 900; font-size: 18px; padding: 8px 18px; border-radius: 14px;
  opacity: 0; transition: opacity .2s; white-space: nowrap; border: 3px solid #fff;
}
#toast.show { opacity: 1; }
#toast.warn { background: #ff5ea8; }
#skipHint { position: absolute; bottom: 6%; left: 50%; transform: translateX(-50%); color: #fff; font-weight: 900; text-shadow: 0 2px 0 #2b2350; }
#mouseHint { position: absolute; bottom: 12%; left: 50%; transform: translateX(-50%); color: #fff; font-weight: 900; text-shadow: 0 2px 0 #2b2350; background: rgba(43,35,80,.55); padding: 8px 16px; border-radius: 999px; white-space: nowrap; animation: hintPulse 1.6s ease-in-out infinite; }
@keyframes hintPulse { 50% { opacity: .65; } }
#muteBtn {
  position: absolute; bottom: 14px; right: 14px; pointer-events: auto; font-size: 20px; width: 44px; height: 44px;
  border-radius: 50%; border: 3px solid #2b2350; background: #fff; cursor: pointer; box-shadow: 0 3px 0 #2b2350;
}

/* ---------- CARDS ---------- */
#pause, #results { display: flex; align-items: center; justify-content: center; background: rgba(42,29,79,.55); padding: 16px; }
.card {
  background: #fff; border: 4px solid #2b2350; border-radius: 24px; padding: 22px 26px; box-shadow: 0 10px 0 #2b2350;
  display: flex; flex-direction: column; gap: 12px; align-items: center; width: min(420px, 100%); text-align: center;
  animation: cardIn .35s cubic-bezier(.2,1.5,.4,1);
}
.card.wide { width: min(560px, 100%); max-height: 100%; overflow-y: auto; }
@keyframes cardIn { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.card-title { font-family: 'Lilita One', 'Arial Black', sans-serif; font-size: 44px; color: #ff5ea8; -webkit-text-stroke: 2px #2b2350; paint-order: stroke fill; line-height: 1; }
.card-title.win { color: #4ee08a; }
.card-sub { font-weight: 800; color: #5d5486; font-size: 16px; }
#resList { list-style: none; padding: 0; margin: 4px 0; width: 100%; display: flex; flex-direction: column; gap: 4px; max-height: 44vh; overflow-y: auto; }
#resList li { display: flex; align-items: center; gap: 10px; padding: 5px 10px; border-radius: 10px; background: #f6f3ff; font-weight: 800; font-size: 14px; text-align: left; }
#resList li.me { background: #fff3b0; outline: 3px solid #ffd23f; }
#resList li.out { opacity: .7; }
#resList .rk { width: 32px; font-family: 'Lilita One', 'Arial Black', sans-serif; font-size: 18px; color: #7a5cff; }
#resList .dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #2b2350; flex-shrink: 0; }
#resList .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#resList .st { font-size: 12px; color: #5d5486; text-align: right; }
#resList li.q .st { color: #1f9d55; }
#resList li.out .st { color: #d6336c; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
#pause .card .big-btn { width: 100%; }

#fatal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: #0a6cd6; color: #fff; font: 800 20px 'Nunito', sans-serif; padding: 30px; text-align: center; white-space: pre-wrap; }

@media (max-width: 720px) {
  #title { padding: 16px; background: rgba(42,29,79,.45); }
  .courses { grid-template-columns: 1fr; }
  #feed { width: calc(100% - 32px); top: 64px; }
}

/* ---------- TOUCH CONTROLS (js/touch.js; body.touch is set on phones and tablets) ---------- */
html, body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
#game { touch-action: none; }
.controls.tc { display: none; }
body.touch .controls.kb { display: none; }
body.touch .controls.tc { display: flex; }
.controls.tc b { color: #ffd23f; }

#touch { --S: clamp(112px, 34vmin, 160px); --b: calc(var(--S) * .5); --bj: calc(var(--S) * .6); --bs: calc(var(--S) * .38);
  position: absolute; inset: 0; pointer-events: none; touch-action: none; }
#tcZone { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; pointer-events: auto; touch-action: none; }
.tc-base {
  position: absolute; width: var(--S); height: var(--S); border-radius: 50%; pointer-events: none; touch-action: none;
  background: rgba(255,255,255,.14); border: 3px solid rgba(255,255,255,.6); box-shadow: 0 0 0 3px rgba(43,35,80,.35), inset 0 0 18px rgba(43,35,80,.25);
}
#tcMoveBase { transform: translate(-50%, -50%); opacity: 0; transition: opacity .1s; }
#tcMoveBase.on { opacity: 1; }
.tc-knob {
  position: absolute; left: 50%; top: 50%; width: calc(var(--S) * .38); height: calc(var(--S) * .38);
  margin: calc(var(--S) * -.19) 0 0 calc(var(--S) * -.19); border-radius: 50%;
  background: rgba(255,255,255,.92); border: 3px solid #2b2350; box-shadow: 0 3px 0 #2b2350;
}
#tcCluster {
  position: absolute; width: var(--S); height: var(--S); pointer-events: none;
  right: calc(14px + env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}
#tcLookBase { inset: 0; pointer-events: auto; background: rgba(159,243,255,.18); }
.tc-btn {
  position: absolute; pointer-events: auto; touch-action: none; padding: 0; cursor: pointer; line-height: 1;
  width: var(--w); height: var(--w); left: calc(50% + var(--cx) - var(--w) / 2); top: calc(50% - var(--cy) - var(--w) / 2);
  border-radius: 50%; border: 4px solid #2b2350; box-shadow: 0 5px 0 #2b2350; color: #2b2350;
  font: 400 calc(var(--w) * .26) 'Lilita One', 'Arial Black', sans-serif; letter-spacing: .5px;
  transition: transform .05s, box-shadow .05s;
}
.tc-btn.on { transform: translateY(4px); box-shadow: 0 1px 0 #2b2350; filter: brightness(1.12); }
/* buttons sit on an arc around the camera stick: jump to its left, dive up-left, grab above, let go beyond jump */
#tcJump { --w: var(--bj); --cx: calc(var(--S) * -.5 - var(--bj) * .5 - 10px); --cy: 0px; background: #ffd23f; }
#tcDive { --w: var(--b); --cx: calc((var(--S) * .5 + var(--b) * .5 + 14px) * -.707); --cy: calc((var(--S) * .5 + var(--b) * .5 + 14px) * .707); background: #ff5ea8; }
#tcGrab { --w: var(--b); --cx: 0px; --cy: calc(var(--S) * .5 + var(--b) * .5 + 14px); background: #9ff3ff; }
#tcLet { --w: var(--bs); --cx: calc(var(--S) * -.5 - var(--bj) - var(--bs) * .5 - 20px); --cy: 0px; background: #fff; font-size: 11px; }
.tc-sys {
  position: absolute; left: calc(12px + env(safe-area-inset-left, 0px)); top: 12px; z-index: 5; pointer-events: auto; touch-action: none;
  width: 44px; height: 44px; border-radius: 50%; border: 3px solid #2b2350; background: #fff; color: #2b2350;
  font-size: 15px; letter-spacing: -2px; box-shadow: 0 3px 0 #2b2350; padding: 0 0 0 0;
}
body.touch #muteBtn { right: auto; bottom: auto; left: calc(12px + env(safe-area-inset-left, 0px)); top: 64px; z-index: 5; }
body.touch #skipHint { pointer-events: auto; z-index: 5; bottom: 4%; background: rgba(43,35,80,.7); padding: 8px 16px; border-radius: 999px; border: 3px solid #fff; }
body.touch #toast { bottom: 24%; }

/* Add to Home Screen how-to (iOS) */
#a2hs { display: flex; align-items: center; justify-content: center; background: rgba(42,29,79,.7); padding: 16px; z-index: 20; overflow-y: auto; }
#a2hs .card { max-height: 100%; overflow-y: auto; }
.a2hs-steps { margin: 0; padding-left: 22px; text-align: left; display: flex; flex-direction: column; gap: 8px; font-weight: 800; font-size: 15px; color: #2b2350; }
.a2hs-ico { width: 20px; height: 20px; vertical-align: -4px; color: #1a73e8; }
.a2hs-note { font-size: 13px; }
@media (max-height: 460px) { #a2hs .card { padding: 12px 18px; gap: 6px; } #a2hs .card-title { font-size: 30px; } .a2hs-steps { font-size: 13px; gap: 4px; } }

/* keep the whole title screen (incl. START) on screen on short displays */
.logo span { font-size: clamp(48px, min(11vw, 13vh), 118px); }
@media (max-height: 820px) {
  .title-col { gap: 9px; }
  .cc-desc { display: none; }
  .panel { padding: 9px 12px; }

  .big-btn { font-size: 28px; padding: 6px 26px; }
  .tagline { font-size: 15px; }
}
