:root {
  --ib-night: #030914;
  --ib-deep: #07172a;
  --ib-card: rgba(7, 24, 40, 0.92);
  --ib-card-soft: rgba(11, 35, 52, 0.78);
  --ib-line: rgba(116, 214, 222, 0.24);
  --ib-cyan: #69e1e0;
  --ib-cyan-bright: #adffff;
  --ib-gold: #f5bb5a;
  --ib-gold-light: #ffe29a;
  --ib-text: #edf9ff;
  --ib-muted: #9fb7c7;
  --ib-error: #ff9384;
  --ib-good: #7de5b0;
  --ib-radius: 22px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ib-night);
}

body.ib-page {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% 0%, rgba(24, 92, 122, 0.2), transparent 31rem),
    radial-gradient(circle at 84% 12%, rgba(29, 68, 113, 0.2), transparent 38rem),
    linear-gradient(180deg, #061426 0%, #030914 52%, #06111d 100%);
  color: var(--ib-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(105, 225, 224, 0.72);
  outline-offset: 3px;
}

.ib-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  color: #061426;
  font-weight: 900;
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}

.ib-skip-link:focus {
  transform: translateY(0);
}

.ib-site-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  width: min(1540px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(117, 212, 220, 0.18);
}

.ib-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: max-content;
  color: var(--ib-text);
  text-decoration: none;
}

.ib-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(105, 225, 224, 0.48);
  border-radius: 50% 50% 45% 55%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.7), transparent 12%),
    linear-gradient(145deg, #75e5e0, #287f98 68%, #113e5a);
  box-shadow: 0 0 22px rgba(85, 222, 221, 0.22);
  color: #031322;
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: -0.04em;
}

.ib-brand strong,
.ib-brand small {
  display: block;
}

.ib-brand strong {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.ib-brand small {
  margin-top: -2px;
  color: var(--ib-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ib-header-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.ib-header-links a,
.ib-user-pill {
  border: 1px solid rgba(143, 215, 224, 0.18);
  border-radius: 999px;
  background: rgba(5, 21, 37, 0.56);
  color: #d9edf5;
  font-size: 13px;
  font-weight: 800;
}

.ib-header-links a {
  padding: 8px 13px;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.ib-header-links a:hover {
  border-color: rgba(105, 225, 224, 0.56);
  background: rgba(20, 70, 87, 0.58);
  transform: translateY(-1px);
}

.ib-user-pill {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 220px;
  padding: 8px 13px;
}

.ib-user-pill span {
  color: var(--ib-cyan);
}

.ib-user-pill strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ib-game-section {
  width: min(1540px, calc(100% - 32px));
  margin: 18px auto 0;
}

.ib-game-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 5px 2px 13px;
}

.ib-eyebrow {
  margin: 0 0 4px;
  color: var(--ib-gold);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.ib-game-toolbar h1 {
  margin: 0;
  font-size: clamp(23px, 3vw, 38px);
  letter-spacing: -0.045em;
  line-height: 1.03;
}

.ib-game-toolbar h1 span {
  display: inline-block;
  margin-left: 8px;
  color: var(--ib-gold-light);
  font-size: 0.46em;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.ib-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ib-tool-button,
.ib-position-controls button {
  min-height: 40px;
  border: 1px solid rgba(118, 214, 221, 0.26);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(17, 58, 76, 0.94), rgba(7, 31, 47, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: #e8faff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  transition: border-color 0.18s ease, filter 0.18s ease, transform 0.18s ease;
}

.ib-tool-button {
  padding: 8px 13px;
}

.ib-tool-button:hover:not(:disabled),
.ib-position-controls button:hover:not(:disabled) {
  border-color: rgba(105, 225, 224, 0.7);
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.ib-tool-button:disabled,
.ib-position-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.ib-tool-button-new {
  border-color: rgba(245, 187, 90, 0.34);
  color: #ffe5aa;
}

.ib-scoreboard {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(119, 210, 220, 0.2);
  border-radius: 17px 17px 0 0;
  background:
    linear-gradient(180deg, rgba(10, 38, 56, 0.96), rgba(4, 19, 32, 0.97));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.ib-frames {
  display: grid;
  grid-template-columns: repeat(9, minmax(66px, 1fr)) minmax(92px, 1.35fr);
  flex: 1;
  min-width: 760px;
  gap: 4px;
}

.ib-frame-box {
  position: relative;
  min-height: 62px;
  overflow: hidden;
  border: 1px solid rgba(143, 213, 221, 0.16);
  border-radius: 9px;
  background: rgba(2, 14, 25, 0.68);
}

.ib-frame-box.is-current {
  border-color: rgba(245, 187, 90, 0.76);
  box-shadow: 0 0 14px rgba(245, 187, 90, 0.14);
}

.ib-frame-number {
  display: block;
  padding: 2px 6px;
  background: rgba(116, 208, 218, 0.09);
  color: #9db9c7;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.ib-frame-rolls {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  min-height: 23px;
}

.ib-frame-box:last-child .ib-frame-rolls {
  grid-template-columns: repeat(3, 1fr);
}

.ib-frame-rolls span {
  display: grid;
  min-width: 18px;
  place-items: center;
  border-left: 1px solid rgba(143, 213, 221, 0.12);
  border-bottom: 1px solid rgba(143, 213, 221, 0.12);
  color: #f4fbff;
  font-size: 12px;
  font-weight: 900;
}

.ib-frame-score {
  display: block;
  padding-top: 3px;
  text-align: center;
  color: #ffe2a0;
  font-size: 15px;
  font-weight: 1000;
}

.ib-total {
  display: grid;
  min-width: 92px;
  place-content: center;
  border: 1px solid rgba(245, 187, 90, 0.34);
  border-radius: 11px;
  background:
    radial-gradient(circle at 50% 0%, rgba(245, 187, 90, 0.16), transparent 70%),
    rgba(8, 23, 35, 0.85);
  text-align: center;
}

.ib-total small {
  color: #b9cbd4;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.ib-total strong {
  color: var(--ib-gold-light);
  font-size: 28px;
  line-height: 1;
}

.ib-game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 14px;
}

.ib-stage-column {
  min-width: 0;
}

.ib-stage {
  position: relative;
  width: 100%;
  min-height: 460px;
  overflow: hidden;
  border: 1px solid rgba(96, 210, 218, 0.34);
  border-top: 0;
  border-radius: 0 0 var(--ib-radius) var(--ib-radius);
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(180deg, rgba(1, 8, 18, 0.02), rgba(1, 7, 14, 0.08)),
    url("../images/insel-bowling-hafenbahn-spielkulisse-v2.webp") center / cover no-repeat,
    #02070e;
  box-shadow:
    0 24px 55px rgba(0, 0, 0, 0.42),
    0 0 40px rgba(29, 151, 166, 0.08);
  isolation: isolate;
  touch-action: pan-y;
}

#ibCanvas {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  filter: saturate(1.04) contrast(1.025);
}

.ib-stage-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(2, 9, 17, 0.03), transparent 25%, transparent 78%, rgba(2, 8, 14, 0.12)),
    radial-gradient(ellipse at center, transparent 57%, rgba(0, 5, 10, 0.1) 100%);
  pointer-events: none;
}

.ib-loading,
.ib-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-content: center;
  text-align: center;
}

.ib-loading {
  gap: 5px;
  background:
    radial-gradient(circle at center, rgba(18, 81, 100, 0.38), transparent 34%),
    rgba(2, 10, 18, 0.95);
}

.ib-loading[hidden],
.ib-overlay[hidden] {
  display: none;
}

.ib-loading strong {
  margin-top: 6px;
  font-size: 16px;
}

.ib-loading small {
  color: var(--ib-muted);
}

.ib-loading-pearl,
.ib-overlay-pearl {
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 auto;
  border: 1px solid rgba(199, 255, 255, 0.92);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 25%, #fff 0 7%, #bcffff 9%, transparent 20%),
    radial-gradient(circle at 60% 66%, rgba(82, 146, 255, 0.7), transparent 38%),
    linear-gradient(145deg, #d7ffff, #4fbcc5 58%, #275885);
  box-shadow: 0 0 28px rgba(105, 225, 224, 0.52);
}

.ib-loading-pearl {
  animation: ibPearlPulse 1.4s ease-in-out infinite;
}

@keyframes ibPearlPulse {
  50% {
    transform: translateY(-5px) scale(1.04);
    box-shadow: 0 0 38px rgba(105, 225, 224, 0.7);
  }
}

.ib-overlay {
  padding: 18px;
  background: rgba(1, 8, 15, 0.62);
  backdrop-filter: blur(4px);
}

.ib-overlay-card {
  width: 100%;
  max-width: 390px;
  padding: 24px 24px 22px;
  border: 1px solid rgba(105, 225, 224, 0.62);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% -18%, rgba(105, 225, 224, 0.15), transparent 52%),
    linear-gradient(150deg, rgba(6, 31, 47, 0.98), rgba(3, 19, 32, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58), 0 0 30px rgba(36, 170, 178, 0.12);
}

.ib-overlay-pearl {
  width: 40px;
  height: 40px;
}

.ib-overlay-kicker {
  margin: 12px 0 4px;
  color: var(--ib-gold);
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ib-overlay h2 {
  margin: 0;
  font-size: clamp(21px, 4vw, 27px);
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.ib-overlay p:not(.ib-overlay-kicker) {
  margin: 11px 0 0;
  color: #bed0da;
  font-size: 14px;
}

.ib-overlay-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.ib-primary-button {
  min-width: 168px;
  min-height: 43px;
  padding: 10px 18px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffe09a, #f2ad42);
  box-shadow: 0 8px 24px rgba(239, 164, 53, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: #2c1804;
  cursor: pointer;
  font-weight: 950;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.ib-primary-button:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.ib-primary-button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.ib-hud {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: flex;
  gap: 7px;
  pointer-events: none;
}

.ib-hud > div,
.ib-aim-readout span {
  min-width: 74px;
  padding: 6px 9px;
  border: 1px solid rgba(135, 218, 226, 0.22);
  border-radius: 10px;
  background: rgba(2, 15, 26, 0.76);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(5px);
}

.ib-hud small,
.ib-aim-readout small {
  display: block;
  color: #8eafbe;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ib-hud strong,
.ib-aim-readout strong {
  display: block;
  color: #effdff;
  font-size: 13px;
}

.ib-aim-readout {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  display: flex;
  gap: 6px;
  pointer-events: none;
}

.ib-aim-readout[hidden] {
  display: none;
}

.ib-aim-readout span {
  min-width: 88px;
}

.ib-swipe-cue {
  position: absolute;
  left: 50%;
  bottom: 11%;
  z-index: 3;
  display: grid;
  place-items: center;
  color: rgba(230, 252, 255, 0.88);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 2px 8px #000;
  transform: translateX(-50%);
  transition: opacity 0.2s ease;
}

.ib-stage.is-ready .ib-swipe-cue {
  opacity: 1;
}

.ib-swipe-cue span {
  width: 3px;
  height: 55px;
  margin-bottom: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, #8cffff);
  box-shadow: 0 0 12px rgba(105, 225, 224, 0.76);
  animation: ibSwipeHint 1.3s ease-in-out infinite;
}

@keyframes ibSwipeHint {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(9px) scaleY(0.82);
  }
  50% {
    opacity: 1;
    transform: translateY(-3px) scaleY(1);
  }
}

.ib-throw-panel {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.ib-position-controls,
.ib-gesture-zone {
  min-height: 78px;
  border: 1px solid rgba(110, 212, 221, 0.24);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(75, 180, 189, 0.08), transparent 70%),
    rgba(6, 25, 40, 0.88);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}

.ib-position-controls {
  display: grid;
  grid-template-columns: 45px 1fr 45px;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

.ib-position-controls button {
  width: 43px;
  min-height: 48px;
  padding: 0;
}

.ib-position-controls div {
  min-width: 0;
  text-align: center;
}

.ib-position-controls small,
.ib-position-controls strong {
  display: block;
}

.ib-position-controls small {
  color: var(--ib-muted);
  font-size: 10px;
  font-weight: 800;
}

.ib-position-controls strong {
  overflow: hidden;
  color: var(--ib-gold-light);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ib-gesture-zone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  overflow: hidden;
  padding: 12px 18px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.ib-gesture-zone:active,
.ib-gesture-zone.is-dragging {
  cursor: grabbing;
}

.ib-gesture-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(105, 225, 224, 0.08), transparent);
  opacity: 0;
  transform: translateX(-70%);
  transition: opacity 0.18s ease;
}

.ib-gesture-zone.is-dragging::before {
  opacity: 1;
  animation: ibGestureGlow 1s linear infinite;
}

@keyframes ibGestureGlow {
  to {
    transform: translateX(70%);
  }
}

.ib-gesture-ball {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid rgba(201, 255, 255, 0.72);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 26%, #fff 0 5%, #8af4f1 7%, transparent 15%),
    radial-gradient(circle at 60% 60%, rgba(89, 111, 255, 0.8), transparent 36%),
    linear-gradient(145deg, #61d8da, #183d73 48%, #040b20);
  box-shadow: 0 0 20px rgba(76, 212, 216, 0.3);
  transition: transform 0.12s ease;
}

.ib-gesture-zone.is-dragging .ib-gesture-ball {
  transform: translateY(-7px) scale(1.05);
}

.ib-gesture-arrow {
  position: relative;
  z-index: 1;
  width: 3px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, #aaffff, rgba(105, 225, 224, 0.16));
}

.ib-gesture-arrow::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 11px;
  height: 11px;
  border-top: 3px solid #aaffff;
  border-left: 3px solid #aaffff;
  transform: translateX(-50%) rotate(45deg);
}

.ib-gesture-zone div {
  position: relative;
  z-index: 1;
}

.ib-gesture-zone strong,
.ib-gesture-zone small {
  display: block;
}

.ib-gesture-zone strong {
  color: #ebfdff;
  font-size: 14px;
}

.ib-gesture-zone small {
  color: var(--ib-muted);
  font-size: 11px;
}

.ib-throw-panel.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.ib-game-message {
  min-height: 24px;
  margin: 9px 3px 0;
  color: #bdd2dc;
  font-size: 13px;
  font-weight: 700;
}

.ib-noscript {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 194, 91, 0.38);
  border-radius: 12px;
  background: rgba(80, 41, 8, 0.42);
  color: #ffe0a4;
  text-align: center;
}

.ib-game-message.is-good {
  color: var(--ib-good);
}

.ib-game-message.is-error {
  color: var(--ib-error);
}

.ib-game-message.is-info {
  color: #9fe8ed;
}

.ib-side-column {
  display: grid;
  align-content: start;
  gap: 12px;
  padding-top: 0;
}

.ib-rank-card,
.ib-help-card {
  border: 1px solid rgba(114, 210, 219, 0.2);
  border-radius: 17px;
  background:
    radial-gradient(circle at 100% 0%, rgba(63, 166, 178, 0.1), transparent 55%),
    linear-gradient(150deg, rgba(8, 33, 50, 0.94), rgba(4, 20, 33, 0.95));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.ib-rank-card {
  padding: 16px;
}

.ib-my-rank {
  min-height: 132px;
  display: grid;
  align-content: center;
}

.ib-rank-value {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.ib-rank-value strong {
  color: var(--ib-gold-light);
  font-size: 38px;
  letter-spacing: -0.05em;
  line-height: 1;
}

.ib-rank-value span {
  padding-bottom: 3px;
  color: #b7cbd4;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ib-my-rank > p:last-child {
  margin: 8px 0 0;
  color: var(--ib-muted);
  font-size: 12px;
}

.ib-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ib-card-heading h2,
.ib-help-card h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.ib-live-dot {
  padding: 3px 7px;
  border: 1px solid rgba(105, 225, 224, 0.32);
  border-radius: 999px;
  background: rgba(105, 225, 224, 0.09);
  color: #9dffff;
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: 0.12em;
}

.ib-leaderboard {
  display: grid;
  gap: 5px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: bowling-rank;
}

.ib-leaderboard li {
  counter-increment: bowling-rank;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 4px 7px;
  border: 1px solid rgba(126, 206, 214, 0.1);
  border-radius: 9px;
  background: rgba(1, 13, 23, 0.46);
}

.ib-leaderboard li::before {
  content: counter(bowling-rank);
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: rgba(112, 203, 212, 0.11);
  color: #a9c6d1;
  font-size: 10px;
  font-weight: 950;
}

.ib-leaderboard li:nth-child(1)::before {
  background: linear-gradient(145deg, #ffe69a, #d99127);
  color: #2a1704;
}

.ib-leaderboard li:nth-child(2)::before {
  background: linear-gradient(145deg, #eff6fb, #9aaabd);
  color: #18202b;
}

.ib-leaderboard li:nth-child(3)::before {
  background: linear-gradient(145deg, #eab275, #995226);
  color: #281509;
}

.ib-leaderboard .ib-player-name {
  overflow: hidden;
  color: #e7f7fc;
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ib-leaderboard .ib-player-score {
  color: var(--ib-gold-light);
  font-size: 12px;
  font-weight: 950;
}

.ib-leaderboard .ib-empty-rank {
  display: block;
  padding: 12px 6px;
  color: var(--ib-muted);
  font-size: 12px;
  text-align: center;
}

.ib-leaderboard .ib-empty-rank::before {
  display: none;
}

.ib-help-card {
  padding: 16px;
}

.ib-help-card ul {
  display: grid;
  gap: 8px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.ib-help-card li {
  display: grid;
  grid-template-columns: 25px 1fr;
  align-items: center;
  gap: 8px;
  color: #d3e5eb;
  font-size: 12px;
}

.ib-help-card li span {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid rgba(245, 187, 90, 0.28);
  border-radius: 50%;
  background: rgba(245, 187, 90, 0.08);
  color: var(--ib-gold-light);
  font-size: 10px;
  font-weight: 950;
}

.ib-help-card > p:last-child {
  margin: 12px 0 0;
  color: var(--ib-muted);
  font-size: 11px;
}

.ib-intro,
.ib-feature-grid,
.ib-faq {
  width: min(1180px, calc(100% - 32px));
  margin: 58px auto 0;
}

.ib-intro {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: start;
  gap: 40px;
  padding: 34px;
  border: 1px solid rgba(113, 208, 217, 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 20%, rgba(105, 225, 224, 0.1), transparent 34%),
    rgba(5, 22, 36, 0.7);
}

.ib-intro h2,
.ib-faq > h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.ib-intro > p {
  margin: 0;
  color: #bed1db;
  font-size: clamp(15px, 2vw, 18px);
}

.ib-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.ib-feature-grid article {
  min-height: 230px;
  padding: 24px;
  border: 1px solid rgba(113, 208, 217, 0.16);
  border-radius: 20px;
  background:
    linear-gradient(150deg, rgba(9, 37, 54, 0.78), rgba(3, 17, 29, 0.82));
}

.ib-feature-grid article > span {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 19px;
  place-items: center;
  border: 1px solid rgba(245, 187, 90, 0.34);
  border-radius: 14px;
  background: rgba(245, 187, 90, 0.08);
  color: var(--ib-gold-light);
  font-size: 19px;
}

.ib-feature-grid h2 {
  margin: 0;
  font-size: 20px;
}

.ib-feature-grid article > p:last-child {
  margin: 10px 0 0;
  color: var(--ib-muted);
  font-size: 14px;
}

.ib-faq {
  margin-bottom: 70px;
}

.ib-faq details {
  margin-top: 9px;
  border: 1px solid rgba(113, 208, 217, 0.16);
  border-radius: 14px;
  background: rgba(6, 26, 41, 0.72);
}

.ib-faq summary {
  padding: 15px 18px;
  cursor: pointer;
  font-weight: 900;
}

.ib-faq details p {
  margin: 0;
  padding: 0 18px 17px;
  color: var(--ib-muted);
}

.ib-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 35px;
  border-top: 1px solid rgba(113, 208, 217, 0.14);
  color: #7893a2;
  font-size: 12px;
}

.ib-footer p {
  margin: 0;
}

.ib-footer a {
  color: #b4dce2;
}

@media (max-width: 1180px) {
  .ib-game-layout {
    grid-template-columns: 1fr;
  }

  .ib-side-column {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 860px) {
  .ib-site-header {
    grid-template-columns: 1fr auto;
  }

  .ib-header-links {
    display: none;
  }

  .ib-scoreboard {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-color: rgba(105, 225, 224, 0.42) transparent;
  }

  .ib-total {
    position: sticky;
    right: 0;
    z-index: 2;
    background: #071c2d;
  }

  .ib-side-column {
    grid-template-columns: 1fr 1fr;
  }

  .ib-help-card {
    grid-column: 1 / -1;
  }

  .ib-feature-grid {
    grid-template-columns: 1fr;
  }

  .ib-feature-grid article {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  .ib-site-header,
  .ib-game-section,
  .ib-intro,
  .ib-feature-grid,
  .ib-faq,
  .ib-footer {
    width: min(100% - 20px, 1000px);
  }

  .ib-site-header {
    min-height: 64px;
  }

  .ib-brand-mark {
    width: 34px;
    height: 34px;
  }

  .ib-user-pill {
    max-width: 150px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .ib-game-toolbar {
    align-items: flex-start;
    padding-bottom: 10px;
  }

  .ib-game-toolbar h1 span {
    display: block;
    margin: 4px 0 0;
    font-size: 0.48em;
  }

  .ib-toolbar-actions {
    gap: 5px;
  }

  .ib-tool-button {
    min-width: 44px;
    min-height: 44px;
    padding: 7px 9px;
    font-size: 0;
  }

  .ib-tool-button > span:first-child {
    font-size: 17px;
  }

  .ib-tool-button > span[data-sound-label] {
    display: none;
  }

  .ib-stage {
    min-height: min(70vh, 610px);
    aspect-ratio: auto;
  }

  .ib-hud {
    top: 7px;
    left: 7px;
    gap: 4px;
  }

  .ib-hud > div {
    min-width: 60px;
    padding: 5px 6px;
  }

  .ib-hud strong {
    font-size: 11px;
  }

  .ib-aim-readout {
    right: 7px;
    bottom: 7px;
  }

  .ib-aim-readout span {
    min-width: 65px;
    padding: 5px 6px;
  }

  .ib-aim-readout strong {
    font-size: 10px;
  }

  .ib-throw-panel {
    grid-template-columns: 1fr;
  }

  .ib-position-controls {
    min-height: 62px;
  }

  .ib-gesture-zone {
    min-height: 92px;
  }

  .ib-side-column {
    grid-template-columns: 1fr;
  }

  .ib-help-card {
    grid-column: auto;
  }

  .ib-intro {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 42px;
    padding: 24px;
  }

  .ib-feature-grid,
  .ib-faq {
    margin-top: 42px;
  }

  .ib-footer {
    display: block;
  }

  .ib-footer p + p {
    margin-top: 8px;
  }
}

@media (max-width: 420px) {
  .ib-game-toolbar h1 {
    font-size: 22px;
  }

  .ib-overlay {
    padding: 10px;
  }

  .ib-overlay-card {
    width: 100%;
    max-width: 100%;
    padding: 20px 16px 18px;
  }

  .ib-gesture-zone {
    justify-content: flex-start;
    gap: 12px;
    padding-inline: 14px;
  }

  .ib-gesture-ball {
    width: 43px;
    height: 43px;
    flex-basis: 43px;
  }

  .ib-gesture-arrow {
    height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
