:root {
  --bg: linear-gradient(135deg, #cff3d2 0%, #8cb6ff 100%);
  --card: rgba(255, 255, 255, 0.88);
  --text: #1f2430;
  --muted: #6c7283;
  --primary: #4c6ef5;
  --primary-light: rgba(76, 110, 245, 0.12);
  --secondary: #a78bfa;
  --accent-start: #00e0a1;
  --accent-end: #4c6ef5;
  --border: #d9deed;
  --shadow: 0 20px 40px -24px rgba(43, 57, 136, 0.4);
  --radius-xl: 36px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 12px;
  --header-height: clamp(120px, 18vh, 160px);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
  overflow-x: hidden;
  touch-action: pan-y;
  overscroll-behavior-x: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  position: relative;
  padding-bottom: 96px;
}


.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 24px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 36px);
  border: none;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.brand:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 8px;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(180px, 24vw, 260px);
  height: clamp(180px, 24vw, 260px);
  border-radius: 48px;
  background: linear-gradient(135deg, rgba(0, 224, 161, 0.28), rgba(76, 110, 245, 0.32));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 22px 48px -20px rgba(20, 32, 68, 0.6);
}

.brand-icon-img {
  display: block;
  width: clamp(132px, 18vw, 200px);
  height: clamp(132px, 18vw, 200px);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1;
  letter-spacing: 0.02em;
}

.brand-text strong {
  font-size: inherit;
  font-weight: 700;
}

.hub-accent {
  color: var(--primary);
}

@media (max-width: 900px) {
  .brand {
    gap: clamp(18px, 5vw, 28px);
  }

  .brand-icon {
    width: clamp(140px, 28vw, 200px);
    height: clamp(140px, 28vw, 200px);
  }

  .brand-icon-img {
    width: clamp(110px, 22vw, 160px);
    height: clamp(110px, 22vw, 160px);
  }

  .brand-text {
    font-size: clamp(30px, 7vw, 46px);
  }
}

@media (max-width: 640px) {
  .brand {
    gap: clamp(14px, 5vw, 22px);
  }

  .brand-icon {
    width: clamp(120px, 32vw, 170px);
    height: clamp(120px, 32vw, 170px);
  }

  .brand-icon-img {
    width: clamp(96px, 28vw, 140px);
    height: clamp(96px, 28vw, 140px);
  }

  .brand-text {
    font-size: clamp(26px, 8vw, 40px);
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-link {
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 10px 0;
}

.header-link:hover,
.header-link:focus-visible {
  color: var(--primary);
}


main {
  display: flex;
  flex-direction: column;
  gap: 56px;
  padding-bottom: 40px;
}

.hero {
  padding: clamp(56px, 16vw, 96px) 0 clamp(24px, 6vw, 48px);
  position: relative;
}

.hero.hidden {
  display: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(40px, 9vw, 88px);
  align-items: center;
}

.hero-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}


.hero-main h1 {
  margin: 0;
  font-size: clamp(3rem, 5.6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text);
}

.hero-main p {
  margin: 0;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.7;
  font-size: 1.05rem;
}

.hero-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 18px 36px -26px rgba(31, 36, 48, 0.35);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--primary);
  backdrop-filter: blur(12px);
}

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-link {
  border: none;
  background: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  position: relative;
}

.hero-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: linear-gradient(120deg, var(--accent-start), var(--accent-end));
  border-radius: 999px;
  transform-origin: left;
  transform: scaleX(0.4);
  transition: transform 0.25s ease;
}

.hero-link:hover,
.hero-link:focus-visible {
  color: var(--accent-end);
}

.hero-link:hover::after,
.hero-link:focus-visible::after {
  transform: scaleX(1);
}

.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 2;
  margin-bottom: clamp(-40px, -6vw, -24px);
}

.stage {
  position: relative;
  width: clamp(320px, 45vw, 600px);
  aspect-ratio: 1;
  border-radius: 36px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 60px rgba(31, 36, 48, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  mask-image: radial-gradient(72% 72% at 50% 50%, #000 70%, transparent 100%);
  -webkit-mask-image: radial-gradient(72% 72% at 50% 50%, #000 70%, transparent 100%);
  isolation: isolate;
  cursor: pointer;
}

.stage::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0) 70%);
  filter: blur(14px);
  z-index: -2;
}

.stage::after {
  content: "";
  position: absolute;
  inset: -28% -30% -34% -30%;
  background: linear-gradient(210deg, rgba(126, 220, 143, 0.4), rgba(76, 110, 245, 0.48));
  filter: blur(24px);
  opacity: 0.85;
  z-index: -3;
}

.stage-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.stage--ready .stage-canvas {
  opacity: 1;
}

.stage-fallback {
  position: absolute;
  inset: 12%;
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(0, 224, 161, 0.45), rgba(76, 110, 245, 0.62));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 24px 48px rgba(31, 36, 48, 0.24);
  display: grid;
  place-items: center;
  filter: drop-shadow(0 22px 40px rgba(31, 36, 48, 0.32));
  transition: transform 0.4s ease, opacity 0.4s ease;
  pointer-events: none;
}

.stage--ready .stage-fallback {
  opacity: 0;
  transform: scale(0.94);
}

.stage:hover .stage-fallback,
.stage:focus-visible .stage-fallback {
  transform: scale(1.05) rotate(6deg);
}

.stage:hover .stage-fallback-die,
.stage:focus-visible .stage-fallback-die {
  animation: fallback-die-roll 0.8s ease-out;
}

.stage.stage--nojs .stage-fallback-die {
  animation: fallback-die-float 7s ease-in-out infinite alternate;
}

.stage.stage--nojs:hover .stage-fallback-die,
.stage.stage--nojs:focus-visible .stage-fallback-die {
  animation: fallback-die-roll 0.8s ease-out;
}

.stage-fallback-die {
  width: clamp(140px, 32vw, 220px);
  aspect-ratio: 1;
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.65));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55), 0 18px 36px rgba(31, 36, 48, 0.26);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 12%;
  padding: 18%;
  position: relative;
  transform-origin: 50% 50%;
  animation: fallback-die-float 8s ease-in-out infinite alternate;
}

.stage-fallback-die::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 26px;
  border: 1px solid rgba(76, 110, 245, 0.18);
  pointer-events: none;
}

.stage-fallback .pip {
  display: block;
  width: clamp(12px, 4vw, 26px);
  aspect-ratio: 1;
  border-radius: 999px;
  background: rgba(76, 110, 245, 0.92);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.4);
  place-self: center;
}

@keyframes fallback-die-float {
  0% { transform: rotate3d(0, 0, 1, -4deg) translateY(0); }
  50% { transform: rotate3d(1, 1, 0, 5deg) translateY(-6px); }
  100% { transform: rotate3d(0, 0, 1, 4deg) translateY(0); }
}

@keyframes fallback-die-roll {
  0% { transform: rotate3d(1, 1, 0, 0deg) scale(1); }
  40% { transform: rotate3d(1, 0.3, 0, 210deg) scale(1.04); }
  70% { transform: rotate3d(0.4, 1, 0, 320deg) scale(0.98); }
  100% { transform: rotate3d(1, 1, 0, 360deg) scale(1); }
}

.stage-fallback-die .pip:nth-child(1) { grid-area: 1 / 1; }
.stage-fallback-die .pip:nth-child(2) { grid-area: 1 / 3; }
.stage-fallback-die .pip:nth-child(3) { grid-area: 2 / 2; }
.stage-fallback-die .pip:nth-child(4) { grid-area: 3 / 1; }
.stage-fallback-die .pip:nth-child(5) { grid-area: 3 / 3; }

@media (prefers-reduced-motion: reduce) {
  .stage-canvas {
    transition: none;
  }

  .stage-fallback {
    transition: none;
    transform: none !important;
  }

  .stage-fallback-die {
    animation: none !important;
  }
}

.stage-bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: contents;
}

.bubble {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  color: rgba(31, 36, 48, 0.78);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), 0 18px 40px rgba(31, 36, 48, 0.18);
  backdrop-filter: blur(16px);
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.bubble::after {
  content: "";
  position: absolute;
  inset: -18px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 70%);
  filter: blur(12px);
  opacity: 0.4;
  z-index: -1;
}

.bubble-a {
  top: 14%;
  left: 14%;
  animation-name: bubble-drift-a;
  animation-duration: 14s;
}

.bubble-b {
  top: 36%;
  right: 12%;
  animation-name: bubble-drift-b;
  animation-duration: 16s;
}

.bubble-c {
  bottom: 14%;
  left: 28%;
  animation-name: bubble-drift-c;
  animation-duration: 12s;
}

@keyframes bubble-drift-a {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.85; }
  25% { transform: translate3d(20px, -12px, 0) scale(1.05); opacity: 1; }
  50% { transform: translate3d(10px, 8px, 0) scale(0.96); opacity: 0.72; }
  75% { transform: translate3d(-14px, -8px, 0) scale(1.02); opacity: 0.92; }
  100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.85; }
}

@keyframes bubble-drift-b {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.9; }
  30% { transform: translate3d(-12px, 14px, 0) scale(1.04); opacity: 0.78; }
  60% { transform: translate3d(-22px, -8px, 0) scale(1.08); opacity: 0.96; }
  100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.9; }
}

@keyframes bubble-drift-c {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.88; }
  20% { transform: translate3d(16px, -10px, 0) scale(1.06); opacity: 1; }
  55% { transform: translate3d(6px, 12px, 0) scale(0.95); opacity: 0.7; }
  100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.88; }
}

.stage-badge {
  position: absolute;
  bottom: 28px;
  right: 28px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(31, 36, 48, 0.78);
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  box-shadow: 0 18px 40px rgba(31, 36, 48, 0.22);
}

.stage:hover .bubble,
.stage.stage--hover .bubble,
.stage.stage--paused .bubble {
  animation-play-state: paused;
}

.stage:hover .stage-badge,
.stage.stage--hover .stage-badge {
  filter: brightness(1.05);
}

@media (prefers-reduced-motion: reduce) {
  .stage,
  .stage:hover,
  .bubble,
  .bubble::after {
    transition: none !important;
    animation: none !important;
  }
}

.feature-deck {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 24px);
  margin-top: clamp(-16px, -4vw, -24px);
  position: relative;
  z-index: 1;
}

.feature-card {
  border-radius: 20px;
  padding: clamp(24px, 3vw, 28px);
  min-height: 200px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: rgba(255, 255, 255, 0.9);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.feature-card:hover,
.feature-card:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.02);
}

.feature-card-a {
  background: #7edc8f;
}

.feature-card-b {
  background: #59b5f7;
}

.feature-card-c {
  background: #a78bfa;
}

.feature-card-a:hover,
.feature-card-a:focus-visible {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.35), 0 0 24px rgba(126, 220, 143, 0.65);
}

.feature-card-b:hover,
.feature-card-b:focus-visible {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.35), 0 0 24px rgba(89, 181, 247, 0.65);
}

.feature-card-c:hover,
.feature-card-c:focus-visible {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.35), 0 0 24px rgba(167, 139, 250, 0.65);
}

.feature-icon {
  font-size: 28px;
  color: rgba(255, 255, 255, 0.9);
}

.feature-card h3 {
  margin: 0;
  font-size: clamp(18px, 2vw, 20px);
  font-weight: 600;
  line-height: 1.2;
  color: #ffffff;
}

.feature-card p {
  margin: 0;
  font-size: clamp(14px, 1.8vw, 15px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 900px) {
  .feature-deck {
    grid-template-columns: 1fr;
  }
}

.landing-footer {
  padding-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.landing-footer-inner {
  display: flex;
  justify-content: center;
}

.landing-footer-note {
  max-width: 720px;
  width: 100%;
  padding: clamp(22px, 4vw, 32px);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 26px 60px -40px rgba(31, 36, 48, 0.6);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.landing-footer-note h3 {
  margin: 0;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  font-weight: 700;
  color: var(--primary-dark, #2a2f45);
}

.landing-footer-note p {
  margin: 0;
  color: rgba(31, 36, 48, 0.82);
  line-height: 1.55;
}

.landing-footer-meta {
  display: flex;
  justify-content: center;
  text-align: center;
  color: rgba(31, 36, 48, 0.75);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.landing-footer-meta a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.faq-body {
  min-height: 100vh;
}

.faq-page {
  display: flex;
  flex-direction: column;
  gap: 60px;
  padding: clamp(32px, 8vw, 72px) 0 100px;
}

.faq-hero {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.faq-kicker {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(76, 110, 245, 0.12);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.faq-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3rem);
}

.faq-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 680px;
  line-height: 1.6;
}

.faq-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-accordion-list details {
  border-radius: 18px;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(76, 110, 245, 0.12);
  box-shadow: 0 18px 42px -34px rgba(76, 110, 245, 0.55);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.faq-accordion-list details[open] {
  border-color: rgba(76, 110, 245, 0.3);
  box-shadow: 0 24px 54px -38px rgba(76, 110, 245, 0.65);
}

.faq-accordion-list summary {
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
}

.faq-accordion-list summary::-webkit-details-marker {
  display: none;
}

.faq-accordion-list summary::after {
  content: '›';
  font-size: 20px;
  color: var(--primary);
  transition: transform 0.2s ease;
}

.faq-accordion-list details[open] summary::after {
  transform: rotate(90deg);
}

.faq-accordion-list p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.faq-cta {
  display: flex;
  justify-content: center;
}

.faq-cta-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: linear-gradient(135deg, rgba(76, 110, 245, 0.12), rgba(0, 224, 161, 0.12));
  border-radius: 28px;
  padding: clamp(24px, 6vw, 48px);
  box-shadow: 0 28px 60px -45px rgba(76, 110, 245, 0.55);
}

.faq-cta-card h2 {
  margin: 0 0 8px;
}

.legal-body {
  min-height: 100vh;
}

.legal-page {
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 6vw, 56px);
  padding: clamp(32px, 8vw, 72px) 0 clamp(72px, 12vw, 120px);
}

.legal-hero {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 760px;
}

.legal-hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 3.1rem);
}

.legal-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.legal-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 26px;
  padding: clamp(22px, 4vw, 36px);
  box-shadow: 0 26px 60px -42px rgba(31, 36, 48, 0.55);
  border: 1px solid rgba(76, 110, 245, 0.14);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.legal-card h2 {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
}

.legal-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.legal-card address {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-style: normal;
  color: var(--text);
  line-height: 1.55;
}

.legal-card address a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.legal-card address a:hover,
.legal-card address a:focus-visible {
  text-decoration: underline;
}

.legal-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.legal-footer {
  padding: 48px 0;
  background: linear-gradient(135deg, rgba(207, 243, 210, 0.45), rgba(140, 182, 255, 0.6));
}

.legal-footer-inner {
  display: flex;
  justify-content: center;
  text-align: center;
  font-weight: 600;
  color: var(--text);
}

.legal-footer-inner a {
  color: var(--primary);
  text-decoration: none;
}

.legal-footer-inner a:hover,
.legal-footer-inner a:focus-visible {
  text-decoration: underline;
}

.faq-cta-card p {
  margin: 0;
  color: var(--muted);
  max-width: 520px;
}

.faq-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-size: 15px;
}

.btn.btn-pill {
  border-radius: 999px;
  padding-inline: 24px;
}

.btn.btn-outline {
  background: rgba(255, 255, 255, 0.35);
  color: var(--primary);
  border: 1px solid rgba(76, 110, 245, 0.35);
  box-shadow: 0 12px 24px -18px rgba(76, 110, 245, 0.6);
  backdrop-filter: blur(12px);
}

.btn.btn-outline:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.55);
}

.btn.btn-primary {
  background: rgba(76, 110, 245, 0.92);
  color: #fff;
  box-shadow: 0 20px 40px -18px rgba(76, 110, 245, 0.65);
}

.btn.btn-primary:hover:not(:disabled) {
  background: rgba(76, 110, 245, 1);
}

.btn.btn-gradient {
  background: linear-gradient(120deg, var(--accent-start), var(--accent-end));
  color: #fff;
  box-shadow: 0 18px 36px -18px rgba(0, 224, 161, 0.6);
}

.btn.btn-gradient:hover:not(:disabled) {
  box-shadow: 0 24px 44px -20px rgba(0, 224, 161, 0.55);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn.hero-primary {
  background: linear-gradient(120deg, var(--accent-start), var(--accent-end));
  color: #fff;
  box-shadow: 0 14px 30px -18px rgba(0, 224, 161, 0.7);
}

.btn.hero-secondary {
  background: rgba(76, 110, 245, 0.1);
  color: var(--primary);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.6);
  color: var(--primary);
  border: 1px solid rgba(76, 110, 245, 0.2);
}

.input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  font-family: inherit;
  color: inherit;
}

.lbl {
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.lobby-card .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  align-items: flex-start;
}

.canvas {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(76, 110, 245, 0.35);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 0 0 1px rgba(76, 110, 245, 0.12);
  touch-action: none;
  cursor: crosshair;
}

.tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.lobby-card .grid > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.tool-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.tools input[type="color"] {
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 14px;
  background: none;
  box-shadow: inset 0 0 0 2px rgba(76, 110, 245, 0.25);
}

.tools input[type="range"] {
  flex: 1 1 140px;
  accent-color: var(--primary);
}

.tools .btn {
  flex: 1 1 100px;
  min-width: 90px;
}

.tools .btn.active {
  background: linear-gradient(135deg, rgba(0, 224, 161, 0.75), rgba(76, 110, 245, 0.75));
  color: #fff;
  box-shadow: 0 10px 18px -12px rgba(76, 110, 245, 0.6);
}

.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.card-header h2 {
  margin: 0 0 10px;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 36px;
}

.mt-s { margin-top: 12px; }

.bar {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 18px 35px -28px rgba(31, 35, 48, 0.4);
}

.bar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
}

.room-lock {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.16);
  color: var(--secondary);
  font-size: 0.85rem;
}

.hidden {
  display: none !important;
}

.bar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
  width: 100%;
}

.line-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}

.line-control-input {
  display: flex;
  align-items: center;
  gap: 12px;
}

.line-count-value {
  font-weight: 600;
}

.lobby-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.lobby-divider {
  border-top: 1px dashed rgba(76, 110, 245, 0.22);
  margin: 8px 0;
}

.players {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.player {
  background: rgba(76, 110, 245, 0.06);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.player img.avatar {
  width: 84px;
  height: 84px;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: inset 0 0 0 2px rgba(76, 110, 245, 0.18);
}

.player-name {
  font-weight: 600;
}

.player-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 224, 161, 0.18);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.player .kick {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  border: 1px solid rgba(76, 110, 245, 0.25);
  padding: 6px 12px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.lobby-actions {
  display: flex;
  justify-content: flex-end;
}

.game-layout {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.game-left,
.game-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 1024px) {
  .game-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 32px;
  }

  .game-left {
    flex: 0 0 auto;
    width: min(520px, 44vw);
  }

  .game-right {
    flex: 1 1 0;
    min-width: 0;
  }
}

.scorecard-panel {
  align-self: stretch;
}

.scorecard-shell {
  display: block;
}

.scorecard-scroll {
  max-height: calc(100vh - var(--header-height) - 32px);
  overflow: auto;
  padding-right: 8px;
  position: relative;
}

.scorecard-scroll::-webkit-scrollbar {
  width: 8px;
}

.scorecard-scroll::-webkit-scrollbar-thumb {
  background: rgba(76, 110, 245, 0.3);
  border-radius: 999px;
}

.scoreboard-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scoreboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.scoreboard-player {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(76, 110, 245, 0.12);
  position: relative;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.scoreboard-player.active {
  box-shadow: 0 0 0 2px rgba(76, 110, 245, 0.35);
  background: rgba(76, 110, 245, 0.22);
}

.scoreboard-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.scoreboard-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.scoreboard-name {
  font-weight: 600;
}

.scoreboard-status {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--primary);
  background: rgba(76, 110, 245, 0.18);
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  line-height: 1.25;
}

.scoreboard-player.active .scoreboard-status {
  color: #fff;
  background: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32), 0 6px 18px rgba(76, 110, 245, 0.32);
}

.scoreboard-points {
  font-weight: 700;
  color: #1f2430;
}

.scoreboard-empty {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(76, 110, 245, 0.06);
  text-align: center;
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.game-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.turn-info {
  font-weight: 600;
  color: var(--primary);
}

.scorecard-scroll {
  overflow: auto;
  padding-bottom: 12px;
  padding-right: 8px;
}

.scorecard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.scorecard-table thead th {
  text-align: left;
  padding: 8px 12px;
  background: rgba(76, 110, 245, 0.08);
  color: var(--text);
  position: sticky;
  top: 0;
  z-index: 1;
}

.scorecard-table tbody th {
  text-align: left;
  padding: 8px 10px;
  background: rgba(76, 110, 245, 0.05);
  font-weight: 600;
  width: auto;
  min-width: 102px;
}

.scorecard-table tbody th .cat-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.scorecard-table td {
  padding: 6px 8px;
  text-align: center;
  border-left: 1px solid rgba(76, 110, 245, 0.08);
  border-bottom: 1px solid rgba(76, 110, 245, 0.08);
  position: relative;
  font-weight: 600;
  vertical-align: top;
  min-width: clamp(88px, 9vw, 140px);
}

.scorecard-table tbody tr:first-child td {
  border-top: 1px solid rgba(76, 110, 245, 0.08);
}

.scorecard-table tr:last-child td,
.scorecard-table tr:last-child th {
  border-bottom: none;
}

.category-cell {
  padding: 8px 10px;
}

.category-cell.active-column {
  background: rgba(76, 110, 245, 0.06);
}

.cell-lines {
  display: grid;
  grid-template-columns: repeat(var(--line-count, 1), minmax(0, 1fr));
  gap: 4px;
  width: 100%;
}

.cell-line {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 6px;
  border-radius: 10px;
  border: 1px solid rgba(76, 110, 245, 0.12);
  background: rgba(76, 110, 245, 0.04);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  min-height: 40px;
  width: 100%;
  min-width: 0;
}

.cell-line .cell-label {
  font-size: 0.88rem;
  font-weight: 600;
}

.cell-line.clickable {
  cursor: pointer;
  background: rgba(31, 36, 48, 0.08);
  border-color: rgba(31, 36, 48, 0.18);
  color: rgba(31, 36, 48, 0.82);
}

.cell-line.clickable:hover {
  background: rgba(76, 110, 245, 0.16);
  border-color: rgba(76, 110, 245, 0.32);
  transform: translateY(-1px);
}

.cell-line.cell--preview {
  color: rgba(31, 36, 48, 0.78);
}

.cell-line.cell--preview .cell-label {
  opacity: 0.88;
}

.cell-line.cell--scored {
  background: #2a2f45;
  border-color: rgba(19, 23, 40, 0.85);
  color: #ffffff;
  font-weight: 600;
}

.cell-line.cell--zero {
  background: #ef4444;
  border-color: #d62c2c;
  color: #ffffff;
  font-weight: 600;
}

.cell-line.cell--lower-blue {
  background: #4c6ef5;
  border-color: #405ad6;
  color: #ffffff;
  font-weight: 600;
}

.cell-line.cell--lower-dark {
  background: #1f2430;
  border-color: rgba(10, 12, 20, 0.85);
  color: #ffffff;
  font-weight: 600;
}

.cell-line.cell--lower-orange {
  background: #ffa94d;
  border-color: #ff922b;
  color: #4f2c03;
  font-weight: 600;
}

.cell-line.cell--lower-low {
  background: #ef4444;
  border-color: #d62c2c;
  color: #ffffff;
  font-weight: 600;
}

.cell-line.cell--upper-low {
  background: #ffa94d;
  border-color: #ff922b;
  color: #4f2c03;
  font-weight: 600;
}

.cell-line.cell--upper-mid {
  background: #4c6ef5;
  border-color: #405ad6;
  color: #ffffff;
  font-weight: 600;
}

.cell-line.cell--upper-high {
  background: #2a2f45;
  border-color: rgba(19, 23, 40, 0.85);
  color: #ffffff;
  font-weight: 600;
}

.cell-line.hint--low {
  background: rgba(255, 169, 77, 0.28);
  border-color: rgba(255, 169, 77, 0.55);
  color: #5f3610;
}

.cell-line.hint--mid {
  background: rgba(76, 110, 245, 0.24);
  border-color: rgba(76, 110, 245, 0.45);
  color: #14205a;
}

.cell-line.hint--high {
  background: #2a2f45;
  border-color: rgba(19, 23, 40, 0.9);
  color: #ffffff;
}

.scorecard-table td.summary {
  background: rgba(76, 110, 245, 0.08);
  font-weight: 700;
}

.scorecard-table td.summary.multi {
  padding: 10px 12px;
}

.summary-lines {
  display: grid;
  grid-template-columns: repeat(var(--line-count, 1), minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.summary-line {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border-radius: 10px;
  background: rgba(76, 110, 245, 0.08);
  min-width: 0;
  text-align: center;
}

.summary-line .summary-line-value {
  font-size: 1rem;
  font-weight: 700;
}

@media (max-width: 900px) {
  .scorecard-table td {
    padding: 6px 8px;
    min-width: clamp(80px, 22vw, 128px);
  }

  .scorecard-table tbody th {
    padding: 8px 10px;
  }

  .cell-line {
    padding: 6px 6px;
    min-height: 34px;
  }

  .cell-line .cell-label {
    font-size: 0.9rem;
  }

  .summary-line {
    padding: 8px 6px;
  }
}

@media (max-width: 600px) {
  .scorecard-table td {
    padding: 5px 6px;
    min-width: clamp(70px, 34vw, 110px);
    font-size: 0.9rem;
  }

  .scorecard-table tbody th {
    padding: 7px 8px;
    font-size: 0.9rem;
  }

  .cell-line {
    padding: 5px 5px;
    min-height: 32px;
  }

  .cell-line .cell-label {
    font-size: 0.82rem;
  }

  .summary-line {
    padding: 6px 6px;
  }
}


.dice-card {
  background: rgba(76, 110, 245, 0.05);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dice-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dice-tray {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(18px, 4vw, 26px);
  padding: 4px 0;
}

.dice-tray--rolling .die {
  pointer-events: none;
}

.die {
  --die-size: clamp(70px, 16vw, 96px);
  --die-half: calc(var(--die-size) / 2);
  position: relative;
  width: var(--die-size);
  height: var(--die-size);
  border: none;
  padding: 0;
  background: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  perspective: 900px;
  transition: transform 0.2s ease, filter 0.2s ease;
  outline: none;
}

.die::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 35% 25%, rgba(167, 139, 250, 0.45), rgba(76, 110, 245, 0)),
    linear-gradient(140deg, rgba(0, 224, 161, 0.28), rgba(76, 110, 245, 0.36));
  filter: blur(0.5px);
  opacity: 0.95;
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  pointer-events: none;
  box-shadow: 0 18px 44px rgba(54, 72, 134, 0.4);
}

.die:focus-visible {
  outline: 3px solid rgba(76, 110, 245, 0.55);
  outline-offset: 6px;
  border-radius: 28px;
}

.die:hover:not(:disabled):not([aria-disabled="true"]) {
  transform: translateY(-6px) scale(1.04);
}

.die:disabled,
.die[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  filter: saturate(0.85);
}

.die__shadow {
  position: absolute;
  bottom: 10px;
  left: 50%;
  width: 72%;
  height: 20px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(32, 40, 68, 0.3), rgba(32, 40, 68, 0));
  filter: blur(6px);
  pointer-events: none;
  opacity: 0.75;
  transition: opacity 0.28s ease, transform 0.3s ease;
}

.die__throw {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  position: relative;
}

.die__cube {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  border-radius: 28px;
  transform: var(--face-transform, var(--idle-tilt, rotateX(-24deg) rotateY(32deg)));
  transition: transform 0.55s cubic-bezier(0.33, 1, 0.68, 1), filter 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 24px 44px -18px rgba(31, 35, 80, 0.58), inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  background: transparent;
}

.die--held::before {
  opacity: 1;
  transform: scale(1.04);
  box-shadow:
    0 28px 62px rgba(255, 76, 92, 0.38),
    0 0 36px rgba(255, 123, 142, 0.45);
}

.die--held .die__cube {
  box-shadow:
    0 0 0 5px rgba(255, 76, 92, 0.75),
    0 0 36px rgba(255, 123, 142, 0.65),
    0 32px 60px -16px rgba(24, 32, 56, 0.65),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  filter: brightness(1.02) saturate(1.05);
}

.die__face3d {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: linear-gradient(155deg, rgba(167, 139, 250, 0.75), rgba(76, 110, 245, 0.55));
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.55),
    inset 0 0 0 5px rgba(24, 32, 56, 0.22);
  display: grid;
  place-items: center;
  padding: calc(var(--die-size) * 0.14);
}

.die__face3d--front {
  transform: translateZ(var(--die-half));
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: calc(var(--die-size) * 0.05);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.98), rgba(212, 226, 255, 0.9));
}

.die__face3d--back {
  transform: rotateY(180deg) translateZ(var(--die-half));
  background: linear-gradient(150deg, rgba(76, 110, 245, 0.78), rgba(167, 139, 250, 0.66));
}

.die__face3d--right {
  transform: rotateY(90deg) translateZ(var(--die-half));
  background: linear-gradient(150deg, rgba(0, 224, 161, 0.7), rgba(76, 110, 245, 0.7));
}

.die__face3d--left {
  transform: rotateY(-90deg) translateZ(var(--die-half));
  background: linear-gradient(150deg, rgba(167, 139, 250, 0.82), rgba(76, 110, 245, 0.66));
}

.die__face3d--top {
  transform: rotateX(90deg) translateZ(var(--die-half));
  background: linear-gradient(160deg, rgba(196, 219, 255, 0.9), rgba(126, 165, 255, 0.72));
}

.die__face3d--bottom {
  transform: rotateX(-90deg) translateZ(var(--die-half));
  background: linear-gradient(160deg, rgba(76, 110, 245, 0.6), rgba(44, 74, 180, 0.52));
}

.die__pip {
  width: calc(var(--die-size) * 0.16);
  height: calc(var(--die-size) * 0.16);
  border-radius: 50%;
  background: #000;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.28),
    0 1px 4px rgba(6, 10, 18, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.18);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.die__pip--on {
  opacity: 1;
  transform: scale(1);
}

.die--held .die__pip {
  background: #000;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.32),
    0 1px 4px rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.32);
}

.die__cube--hold-spin {
  animation: die-hold-roll 0.62s cubic-bezier(0.3, 0.7, 0.22, 1) forwards;
}

.die__cube--release-sway {
  animation: die-release-bob 0.52s cubic-bezier(0.33, 0.8, 0.3, 1) forwards;
}

@keyframes die-hold-roll {
  0% {
    transform: var(--face-transform) rotateZ(0deg) scale(1);
  }
  38% {
    transform: var(--face-transform) rotateZ(22deg) scale(1.05);
  }
  72% {
    transform: var(--face-transform) rotateZ(-14deg) scale(1.02);
  }
  100% {
    transform: var(--face-transform) rotateZ(0deg) scale(1);
  }
}

@keyframes die-release-bob {
  0% {
    transform: var(--face-transform) rotateZ(0deg) scale(1);
  }
  46% {
    transform: var(--face-transform) rotateZ(-16deg) scale(0.98);
  }
  100% {
    transform: var(--face-transform) rotateZ(0deg) scale(1);
  }
}

.die__badge {
  position: absolute;
  top: 8px;
  right: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(76, 110, 245, 0.9), rgba(167, 139, 250, 0.82));
  color: #fff;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.die--held .die__badge {
  opacity: 1;
  transform: translateY(0);
  background: linear-gradient(135deg, rgba(255, 76, 92, 0.95), rgba(255, 143, 163, 0.9));
}

.die--animating .die__throw {
  animation: die-lift var(--roll-duration, 2100ms) var(--roll-delay, 0ms) cubic-bezier(0.2, 0.8, 0.12, 1) forwards;
}

.die--animating .die__cube {
  animation: die-spin var(--roll-duration, 2100ms) var(--roll-delay, 0ms) cubic-bezier(0.2, 0.82, 0.12, 1) forwards;
}

.die--animating .die__shadow {
  animation: die-shadow var(--roll-duration, 2100ms) var(--roll-delay, 0ms) cubic-bezier(0.2, 0.8, 0.12, 1) forwards;
}

@keyframes die-lift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  10% {
    transform: translate3d(0, calc(-1 * var(--throw-lift, 64px)), 0);
  }
  24% {
    transform: translate3d(0, 0, 0);
  }
  42% {
    transform: translate3d(0, calc(-1 * var(--throw-lift, 64px) * 0.45), 0);
  }
  60% {
    transform: translate3d(0, calc(-1 * var(--throw-lift, 64px) * 0.24), 0);
  }
  78% {
    transform: translate3d(0, calc(-1 * var(--throw-lift, 64px) * 0.12), 0);
  }
  94% {
    transform: translate3d(0, calc(-1 * var(--throw-lift, 64px) * 0.05), 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes die-spin {
  0% {
    transform: var(--start-transform, rotateX(-24deg) rotateY(32deg));
  }
  14% {
    transform: rotateX(-90deg) rotateY(0deg);
  }
  28% {
    transform: rotateX(0deg) rotateY(90deg);
  }
  42% {
    transform: rotateX(90deg) rotateY(0deg);
  }
  58% {
    transform: rotateX(0deg) rotateY(-90deg);
  }
  72% {
    transform: rotateX(180deg) rotateY(0deg);
  }
  86% {
    transform: rotateX(-45deg) rotateY(45deg);
  }
  100% {
    transform: var(--face-transform, rotateX(-24deg) rotateY(32deg));
  }
}

@keyframes die-shadow {
  0% {
    transform: translateX(-50%) scale(1);
    opacity: 0.75;
  }
  14% {
    transform: translateX(-50%) scale(0.64);
    opacity: 0.34;
  }
  34% {
    transform: translateX(-50%) scale(1.16);
    opacity: 0.46;
  }
  56% {
    transform: translateX(-50%) scale(0.88);
    opacity: 0.4;
  }
  80% {
    transform: translateX(-50%) scale(1.05);
    opacity: 0.48;
  }
  94% {
    transform: translateX(-50%) scale(0.94);
    opacity: 0.44;
  }
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 0.75;
  }
}

@media (prefers-reduced-motion: reduce) {
  .die,
  .die__cube,
  .die__throw {
    transition: none !important;
  }

  .die--animating .die__throw,
  .die--animating .die__cube,
  .die--animating .die__shadow {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.action-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(248, 249, 251, 0.85);
  border-radius: 16px;
  padding: 16px 20px;
  border: 1px solid rgba(76, 110, 245, 0.08);
}

.action-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.action-bar .btn {
  min-width: 120px;
}

.hold-status {
  color: var(--muted);
  font-size: 0.9rem;
}

.dice-scoreboard {
  background: rgba(76, 110, 245, 0.08);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dice-chat {
  background: rgba(76, 110, 245, 0.08);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dice-chat__header h3 {
  margin: 0 0 4px;
}

.dice-chat__messages {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 6px;
}

.dice-chat__messages::-webkit-scrollbar {
  width: 8px;
}

.dice-chat__messages::-webkit-scrollbar-thumb {
  background: rgba(76, 110, 245, 0.3);
  border-radius: 999px;
}

.dice-chat__form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.dice-chat__form .input {
  flex: 1 1 auto;
  min-width: 0;
}

.dice-chat__form .btn {
  flex: 0 0 auto;
}

.chat-empty {
  text-align: center;
  font-size: 0.9rem;
}

.chat-message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.chat-message--self {
  flex-direction: row-reverse;
}

.chat-message__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 6px 14px rgba(31, 36, 48, 0.16);
}

.chat-message__bubble {
  background: rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  padding: 10px 14px;
  box-shadow: 0 14px 32px -18px rgba(31, 36, 48, 0.4);
  backdrop-filter: blur(8px);
  max-width: 100%;
}

.chat-message--self .chat-message__bubble {
  background: linear-gradient(135deg, rgba(76, 110, 245, 0.9), rgba(167, 139, 250, 0.85));
  color: #fff;
  text-align: right;
}

.chat-message__meta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: rgba(31, 36, 48, 0.58);
}

.chat-message--self .chat-message__meta {
  color: rgba(255, 255, 255, 0.7);
}

.chat-message__text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  word-break: break-word;
}

.chat-message--self .chat-message__text {
  color: #fff;
}

.chat-message__text:empty::before {
  content: '…';
}

.dice-scoreboard .scoreboard-header h3 {
  margin: 0;
}

.roll-counter {
  margin-top: 16px;
  text-align: right;
  font-weight: 600;
  color: var(--primary);
}

@media (max-width: 600px) {
  .action-bar {
    padding: 14px;
  }

  .action-bar .btn {
    flex: 1 1 auto;
  }

  .dice-chat__messages {
    max-height: 200px;
  }
}

.dialog {
  border: none;
  border-radius: var(--radius-md);
  padding: 28px;
  width: min(420px, 92vw);
  background: var(--card);
  box-shadow: var(--shadow);
}

.dialog::backdrop {
  background: rgba(15, 22, 32, 0.35);
}

.dialog menu {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 0;
  margin-top: 18px;
}

.winner-celebration {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 80;
}

.winner-message {
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-lg);
  padding: 22px 32px;
  box-shadow: 0 18px 40px -24px rgba(31, 35, 48, 0.6);
  text-align: center;
  backdrop-filter: blur(12px);
  animation: winner-pop 0.6s ease;
}

.winner-avatars {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 6vw, 42px);
  margin-bottom: clamp(18px, 4vw, 36px);
  animation: winner-pop 0.6s ease;
}

.winner-avatar {
  width: clamp(320px, 70vw, 720px);
  height: clamp(320px, 70vw, 720px);
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 26px 60px -22px rgba(18, 26, 40, 0.55);
  border: 8px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.6);
}

.winner-avatars[data-count="2"] .winner-avatar {
  width: clamp(280px, 60vw, 600px);
  height: clamp(280px, 60vw, 600px);
}

.winner-avatars[data-count="3"] .winner-avatar,
.winner-avatars[data-count="4"] .winner-avatar,
.winner-avatars[data-count="5"] .winner-avatar,
.winner-avatars[data-count="6"] .winner-avatar {
  width: clamp(240px, 52vw, 520px);
  height: clamp(240px, 52vw, 520px);
}

.winner-message strong {
  display: block;
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.winner-message span {
  color: var(--muted);
  font-weight: 600;
}

.confetti-piece {
  position: absolute;
  top: -12vh;
  width: 12px;
  height: 26px;
  border-radius: 6px;
  opacity: 0;
  animation: confetti-fall var(--duration, 3.6s) ease-in forwards;
  left: var(--offset, 0%);
  background: var(--color, var(--accent-start));
  animation-delay: var(--delay, 0s);
  transform: rotate(var(--rotation, 0deg));
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(var(--rotation, 0deg));
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translateY(120vh) rotate(calc(var(--rotation, 0deg) + 360deg));
    opacity: 0;
  }
}

@keyframes winner-pop {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 1024px) {
  .game-layout {
    gap: 24px;
  }

  .dice-card {
    order: 2;
  }
}

@media (max-width: 720px) {
  .hero {
    padding: 56px 0 24px;
  }

  .hero-grid {
    gap: 40px;
  }

  .hero-main {
    align-items: flex-start;
  }

  .hero-orbit {
    width: min(320px, 85vw);
  }

  .floating-die-a { left: 4%; }
  .floating-die-b { right: 4%; }
  .floating-card-chat { left: -2%; }
  .floating-card-share { right: -2%; }

  .bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .bar-right {
    justify-content: flex-start;
  }

  .players {
    grid-template-columns: 1fr;
  }

  .action-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .roll-counter {
    text-align: left;
  }
}

/* === Playcra landing === */
body.landing--playcra {
  font-family: 'Poppins', var(--font-sans, 'Inter'), system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #d6f1f0 0%, #c7d8ff 35%, #f3e8ff 100%);
  min-height: 100vh;
  color: #1f2430;
}

.site-header--landing {
  padding-top: clamp(24px, 5vw, 48px);
  padding-bottom: clamp(12px, 3vw, 24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 4vw, 32px);
  height: auto;
}

.brand--playcra {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-icon--xl {
  width: clamp(48px, 8vw, 80px);
  height: clamp(48px, 8vw, 80px);
}

.brand-sub {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 2px;
  color: rgba(31, 36, 48, 0.68);
}

.hero--playcra {
  padding: clamp(48px, 10vw, 96px) 0;
}

.hero-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 5vw, 28px);
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(76, 110, 245, 0.12);
  color: #4c6ef5;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.hero-copy p {
  font-size: clamp(1rem, 2.6vw, 1.12rem);
  max-width: 520px;
  color: rgba(31, 36, 48, 0.78);
}

.hero-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-visual--stack {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-dice-stack {
  position: relative;
  width: min(420px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 36px;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 40px 80px rgba(69, 91, 158, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  overflow: hidden;
  transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.hero-dice-stack::before {
  content: '';
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.75), transparent 70%);
  z-index: 0;
}

.hero-dice-stack.is-animated {
  transform: translateY(-6px);
  box-shadow: 0 48px 120px rgba(76, 110, 245, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0.5px);
  opacity: 0.6;
  z-index: 0;
}

.hero-orb-a {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle at 30% 30%, rgba(0, 224, 161, 0.4), rgba(76, 110, 245, 0.12));
  top: 12%;
  left: 16%;
}

.hero-orb-b {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at 70% 70%, rgba(167, 139, 250, 0.45), rgba(76, 110, 245, 0.1));
  bottom: 10%;
  right: 12%;
}

.hero-die {
  position: absolute;
  width: clamp(120px, 30%, 160px);
  height: clamp(120px, 30%, 160px);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.55));
  border-radius: 26px;
  box-shadow: 0 26px 60px rgba(31, 36, 48, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 20px;
  gap: 14px;
  z-index: 1;
  transition: transform 0.6s ease;
}

.hero-die .pip {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(31, 36, 48, 0.85);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.hero-die-a { top: 18%; left: 20%; }
.hero-die-b { bottom: 18%; right: 18%; }
.hero-die-c { top: 34%; right: 28%; width: clamp(90px, 24%, 120px); height: clamp(90px, 24%, 120px); grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); padding: 16px; }

.hero-social {
  position: absolute;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  background: rgba(31, 36, 48, 0.12);
  color: rgba(31, 36, 48, 0.65);
  padding: 12px 20px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  z-index: 2;
}

.hero-social-a { top: 12%; right: 16%; }
.hero-social-b { bottom: 14%; left: 20%; }
.hero-social-c { bottom: 8%; right: 36%; }

.hero-dice-stack.is-animated .hero-die-a { transform: rotate(-8deg) translate(-10px, -12px); }
.hero-dice-stack.is-animated .hero-die-b { transform: rotate(6deg) translate(12px, 14px); }
.hero-dice-stack.is-animated .hero-die-c { transform: rotate(-14deg) translate(-6px, 8px); }

.games {
  padding: clamp(48px, 9vw, 80px) 0;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-kicker {
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(31, 36, 48, 0.52);
  font-size: 0.75rem;
}

.games-grid {
  display: grid;
  gap: clamp(24px, 5vw, 32px);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.game-card {
  position: relative;
  border-radius: 24px;
  padding: clamp(24px, 6vw, 32px);
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 45px rgba(58, 78, 140, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.65);
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 320px;
}

.game-card h3 {
  font-size: 1.5rem;
}

.game-card p {
  color: rgba(31, 36, 48, 0.72);
}

.game-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  color: rgba(31, 36, 48, 0.7);
}

.game-card footer {
  margin-top: auto;
}

.game-card--yachtcra {
  background: linear-gradient(150deg, rgba(76, 110, 245, 0.22), rgba(0, 224, 161, 0.18));
}

.game-card--scribcra {
  background: linear-gradient(150deg, rgba(167, 139, 250, 0.26), rgba(255, 182, 255, 0.18));
}

.game-card--crabo {
  background: linear-gradient(150deg, rgba(255, 187, 120, 0.26), rgba(255, 118, 146, 0.18));
}

.game-card--cradichnicht {
  background: linear-gradient(150deg, rgba(250, 216, 120, 0.28), rgba(122, 201, 255, 0.22));
}

.game-card--codecra {
  background: linear-gradient(150deg, rgba(89, 181, 247, 0.26), rgba(76, 110, 245, 0.18));
}

.highlights {
  padding: clamp(48px, 10vw, 96px) 0 clamp(64px, 12vw, 120px);
}

.highlights-grid {
  display: grid;
  gap: clamp(24px, 5vw, 32px);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.highlight-card {
  padding: clamp(24px, 5vw, 32px);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 16px 32px rgba(58, 78, 140, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.highlight-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.landing-footer--playcra .landing-footer-inner {
  padding: clamp(32px, 7vw, 48px) 0;
}

.landing-footer--playcra .landing-footer-note {
  background: rgba(31, 36, 48, 0.1);
  border-radius: 24px;
  padding: clamp(24px, 5vw, 32px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.landing-footer--playcra .landing-footer-meta {
  justify-content: center;
}

@media (max-width: 768px) {
  .hero-dice-stack {
    width: min(320px, 100%);
  }

  .games-grid {
    grid-template-columns: 1fr;
  }
}

/* Brand tweaks reused across pages */
.brand .brand-sub {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 4px;
  color: inherit;
}

.site-header:not(.site-header--landing) .brand .brand-sub {
  color: rgba(255, 255, 255, 0.72);
}

.site-header--landing .brand .brand-sub {
  color: rgba(31, 36, 48, 0.68);
}

/* Crabo layout */
.crabo-game {
  display: grid;
  gap: clamp(24px, 4vw, 40px);
  grid-template-columns: minmax(280px, 320px) 1fr;
  align-items: start;
}

@media (max-width: 980px) {
  .crabo-game {
    grid-template-columns: 1fr;
  }
}

.crabo-sidebar {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3vw, 24px);
}

.crabo-scoreboard {
  display: flex;
  flex-direction: column;
  gap: 16px;
  backdrop-filter: blur(16px);
}

.crabo-scoreboard__header h2 {
  font-size: clamp(18px, 3.4vw, 22px);
  margin-bottom: 4px;
}

.crabo-scoreboard__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.crabo-scoreboard__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 12px 32px rgba(76, 110, 245, 0.12);
}

.crabo-scoreboard__item.is-active {
  background: linear-gradient(135deg, rgba(0, 224, 161, 0.35), rgba(76, 110, 245, 0.45));
  border-color: rgba(76, 110, 245, 0.6);
  box-shadow: 0 18px 36px rgba(76, 110, 245, 0.18);
}

.crabo-scoreboard__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(31, 36, 48, 0.16);
}

.crabo-scoreboard__label {
  font-weight: 600;
}

.crabo-scoreboard__score {
  font-weight: 600;
  color: #4c6ef5;
}

.crabo-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 320px;
  overflow: hidden;
}

.crabo-log__list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
  color: rgba(31, 36, 48, 0.72);
}

.crabo-table {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 3vw, 28px);
  padding: clamp(20px, 3.4vw, 28px);
  min-height: 540px;
}

.crabo-table__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.crabo-table__header h2 {
  margin-bottom: 4px;
}

.crabo-table__actions {
  display: flex;
  gap: 12px;
}

.crabo-piles {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: clamp(16px, 3vw, 28px);
  align-items: center;
}

@media (max-width: 720px) {
  .crabo-piles {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

.crabo-pile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 36px rgba(31, 36, 48, 0.1);
  color: #1f2430;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.crabo-pile:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.crabo-pile:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(76, 110, 245, 0.16);
}

.crabo-pile__label {
  font-weight: 600;
  font-size: 0.95rem;
}

.crabo-pile__count,
.crabo-pile__card {
  font-size: 1.4rem;
  font-weight: 700;
}

.crabo-drawn {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 120px;
  border-radius: 20px;
  border: 1px dashed rgba(76, 110, 245, 0.4);
  background: rgba(76, 110, 245, 0.08);
  padding: 12px;
  text-align: center;
}

.crabo-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  min-height: 112px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.85), rgba(203, 211, 255, 0.85));
  box-shadow: 0 20px 40px rgba(76, 110, 245, 0.18);
  font-size: 1.2rem;
  font-weight: 700;
  color: rgba(31, 36, 48, 0.82);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.crabo-card:not(:disabled):hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px rgba(76, 110, 245, 0.28);
}

.crabo-card.is-visible {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.72));
}

.crabo-hand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.crabo-section__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.crabo-hand__cards {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.crabo-hand__cards.is-replacing .crabo-card {
  box-shadow: 0 0 0 3px rgba(76, 110, 245, 0.65), 0 24px 50px rgba(76, 110, 245, 0.25);
}

.crabo-opponents__list {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.crabo-opponent {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.crabo-opponent__header {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.crabo-opponent__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.crabo-opponent__badge {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 224, 161, 0.6), rgba(76, 110, 245, 0.7));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}

.crabo-opponent__cards {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.crabo-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.crabo-table__footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.crabo-winner {
  margin-top: clamp(24px, 4vw, 40px);
  padding: clamp(18px, 3vw, 28px);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.78), rgba(76, 110, 245, 0.72));
  color: #fff;
  text-align: center;
  box-shadow: 0 28px 60px rgba(76, 110, 245, 0.32);
}

.crabo-winner__avatars {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 12px 0;
}

.crabo-winner__avatars img {
  width: clamp(72px, 18vw, 120px);
  height: clamp(72px, 18vw, 120px);
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

/* --- Scribcra --- */
.scribcra-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px clamp(16px, 6vw, 48px);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(76, 110, 245, 0.12);
}

.scribcra-header__brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.scribcra-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #1f2430;
  font-weight: 700;
  font-size: clamp(20px, 4vw, 28px);
}

.scribcra-logo img {
  width: clamp(48px, 7vw, 72px);
  height: clamp(48px, 7vw, 72px);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(76, 110, 245, 0.25);
}

.scribcra-header__subtitle {
  font-size: clamp(16px, 3.2vw, 20px);
  font-weight: 600;
  color: #4c6ef5;
}

.scribcra-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.scribcra-main {
  padding: clamp(16px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 5vw, 48px);
}

.scribcra-hero {
  display: grid;
  gap: clamp(24px, 5vw, 64px);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: center;
}

.scribcra-hero__card {
  background: linear-gradient(135deg, rgba(207, 243, 210, 0.85), rgba(140, 182, 255, 0.85));
  padding: clamp(24px, 6vw, 48px);
  border-radius: 28px;
  box-shadow: 0 20px 40px rgba(76, 110, 245, 0.18);
  color: #1f2430;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.scribcra-hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.scribcra-hero__preview {
  display: flex;
  justify-content: center;
  align-items: center;
}

.scribcra-preview__stage {
  width: min(100%, 420px);
  aspect-ratio: 1 / 1;
  position: relative;
  border-radius: 32px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(140, 182, 255, 0));
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 24px 40px rgba(79, 108, 255, 0.18);
}

.scribcra-preview__card {
  position: absolute;
  width: 60%;
  height: 36%;
  border-radius: 20px;
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 32px rgba(31, 36, 48, 0.18);
}

.scribcra-preview__card--primary {
  background: linear-gradient(135deg, rgba(126, 220, 143, 0.85), rgba(76, 110, 245, 0.75));
  top: 12%;
  left: 20%;
}

.scribcra-preview__card--secondary {
  background: linear-gradient(135deg, rgba(89, 181, 247, 0.85), rgba(167, 139, 250, 0.75));
  bottom: 18%;
  left: 8%;
}

.scribcra-preview__card--tertiary {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(203, 211, 255, 0.6));
  right: 10%;
  top: 32%;
}

.scribcra-preview__brush {
  position: absolute;
  width: 32%;
  height: 32%;
  border-radius: 20px;
  background: linear-gradient(135deg, #4c6ef5, #a78bfa);
  bottom: 10%;
  right: 14%;
  box-shadow: 0 20px 48px rgba(31, 36, 48, 0.25);
}

.scribcra-section {
  background: rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  padding: clamp(24px, 5vw, 48px);
  box-shadow: 0 24px 52px rgba(31, 36, 48, 0.18);
  backdrop-filter: blur(18px);
}

.scribcra-lobby {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}

.scribcra-avatar {
  display: grid;
  gap: 16px;
}

.scribcra-avatar__canvas {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(76, 110, 245, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.scribcra-avatar__tools {
  display: grid;
  gap: 12px;
}

.scribcra-roominfo {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(76, 110, 245, 0.08);
}

.scribcra-roominfo__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.scribcra-roominfo__link {
  display: flex;
  gap: 8px;
}

.scribcra-playerlist__items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.scribcra-playerlist__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 12px 26px rgba(31, 36, 48, 0.1);
}

.scribcra-playerlist__avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  object-fit: cover;
}

.scribcra-playerlist__meta {
  flex: 1;
  display: grid;
  gap: 4px;
}

.scribcra-playerlist__name {
  font-weight: 600;
  color: #1f2430;
}

.scribcra-playerlist__tag {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(76, 110, 245, 0.15);
  color: #4c6ef5;
  width: fit-content;
}

.scribcra-playerlist__tag.is-host {
  background: rgba(0, 224, 161, 0.15);
  color: #0f9c7f;
}

.scribcra-lobby__start {
  display: flex;
  justify-content: flex-end;
}

.scribcra-game {
  display: grid;
  gap: clamp(16px, 3vw, 32px);
  grid-template-columns: minmax(220px, 280px) 1fr minmax(220px, 320px);
}

.scribcra-sidebar {
  display: grid;
  gap: 16px;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  padding: 20px;
  box-shadow: inset 0 0 0 1px rgba(76, 110, 245, 0.12);
}

.scribcra-sidebar__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scribcra-roundinfo {
  font-size: 14px;
  color: rgba(31, 36, 48, 0.65);
}

.scribcra-sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.scribcra-sidebar__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(31, 36, 48, 0.1);
  position: relative;
}

.scribcra-sidebar__item.is-drawing {
  box-shadow: 0 16px 28px rgba(76, 110, 245, 0.18);
  border: 1px solid rgba(76, 110, 245, 0.35);
}

.scribcra-sidebar__item.has-guessed {
  border: 1px solid rgba(0, 224, 161, 0.38);
  box-shadow: 0 16px 28px rgba(0, 224, 161, 0.18);
}

.scribcra-sidebar__avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  object-fit: cover;
}

.scribcra-sidebar__meta {
  display: grid;
  gap: 4px;
  color: #1f2430;
}

.scribcra-sidebar__score {
  font-size: 13px;
  color: rgba(31, 36, 48, 0.65);
}

.scribcra-sidebar__badge {
  position: absolute;
  right: 12px;
  top: 12px;
  background: rgba(76, 110, 245, 0.18);
  color: #4c6ef5;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.scribcra-sidebar__badge--success {
  background: rgba(0, 224, 161, 0.18);
  color: #0f9c7f;
}

.scribcra-board {
  display: grid;
  gap: 16px;
}

.scribcra-wordbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.85);
  padding: 16px 20px;
  border-radius: 20px;
  box-shadow: 0 16px 28px rgba(31, 36, 48, 0.12);
}

.scribcra-wordbar__word {
  font-size: clamp(20px, 4vw, 32px);
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.scribcra-wordbar__choices {
  grid-column: span 2;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.scribcra-wordchoice {
  border: none;
  border-radius: 16px;
  padding: 10px 16px;
  cursor: pointer;
  background: linear-gradient(135deg, #59b5f7, #a78bfa);
  color: #fff;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scribcra-wordchoice:hover,
.scribcra-wordchoice:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(76, 110, 245, 0.3);
}

.scribcra-wordbar__timer {
  font-size: clamp(18px, 4vw, 28px);
  font-weight: 600;
  color: #4c6ef5;
}

.scribcra-canvaswrap {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 24px;
  padding: clamp(12px, 3vw, 20px);
  box-shadow: 0 24px 52px rgba(31, 36, 48, 0.16);
}

.scribcra-canvaswrap canvas {
  width: 100%;
  height: clamp(320px, 45vw, 520px);
  display: block;
  border-radius: 20px;
  background: repeating-conic-gradient(from 45deg, rgba(207, 243, 210, 0.28) 0deg 90deg, rgba(140, 182, 255, 0.18) 90deg 180deg);
  box-shadow: inset 0 0 0 1px rgba(76, 110, 245, 0.18);
  cursor: crosshair;
}

.scribcra-toolbox {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.scribcra-chat {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  padding: 20px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  box-shadow: 0 24px 52px rgba(31, 36, 48, 0.14);
}

.scribcra-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.scribcra-chat__messages {
  overflow-y: auto;
  display: grid;
  gap: 12px;
  padding-right: 8px;
}

.scribcra-chat__message {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 12px 24px rgba(31, 36, 48, 0.1);
}

.scribcra-chat__message.is-system {
  background: rgba(76, 110, 245, 0.12);
  color: #1f2430;
  font-weight: 600;
}

.scribcra-chat__message.is-correct {
  background: rgba(0, 224, 161, 0.18);
  color: #0f9c7f;
  font-weight: 600;
}

.scribcra-chat__meta {
  font-size: 13px;
  margin-bottom: 4px;
  color: rgba(31, 36, 48, 0.65);
}

.scribcra-chat__form {
  display: flex;
  gap: 12px;
}

@media (max-width: 1200px) {
  .scribcra-game {
    grid-template-columns: 1fr;
  }
  .scribcra-chat {
    order: 3;
  }
  .scribcra-board {
    order: 2;
  }
  .scribcra-sidebar {
    order: 1;
  }
}

@media (max-width: 768px) {
  .scribcra-header {
    flex-wrap: wrap;
    gap: 16px;
  }
  .scribcra-section {
    padding: 20px;
    border-radius: 22px;
  }
  .scribcra-chat__form {
    flex-direction: column;
  }
  .scribcra-chat__form button {
    width: 100%;
  }
  .scribcra-toolbox {
    justify-content: center;
  }
  .scribcra-wordbar {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .scribcra-wordbar__choices {
    grid-column: 1;
    justify-content: center;
  }
}


/* Cra dich nicht */
.cradi-hero-board {
  position: relative;
  width: clamp(260px, 32vw, 380px);
  aspect-ratio: 1;
  border-radius: 36px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(203, 213, 255, 0.55));
  box-shadow: 0 20px 60px rgba(76, 110, 245, 0.25);
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.cradi-hero-track {
  width: 82%;
  height: 82%;
  border-radius: 28px;
  border: 16px solid rgba(31, 36, 48, 0.1);
  filter: blur(0.5px);
}

.cradi-hero-pawn {
  position: absolute;
  width: clamp(48px, 11vw, 72px);
  height: clamp(48px, 11vw, 72px);
  border-radius: 26px;
  box-shadow: 0 12px 24px rgba(31, 36, 48, 0.18);
  animation: floaty 6s ease-in-out infinite;
  opacity: 0.95;
}

.cradi-hero-pawn::after {
  content: '';
  position: absolute;
  inset: 18%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.4);
}

.cradi-hero-pawn--red { background: linear-gradient(160deg, #ff8a8a, #f25f5c); top: 14%; left: 18%; animation-delay: 0s; }
.cradi-hero-pawn--blue { background: linear-gradient(160deg, #93b4ff, #4c6ef5); top: 18%; right: 18%; animation-delay: 0.4s; }
.cradi-hero-pawn--green { background: linear-gradient(160deg, #9bf6a7, #40c057); bottom: 18%; right: 16%; animation-delay: 0.8s; }
.cradi-hero-pawn--yellow { background: linear-gradient(160deg, #ffe37a, #fcc419); bottom: 16%; left: 18%; animation-delay: 1.1s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.05); }
}

.cradi-layout {
  display: grid;
  grid-template-columns: minmax(280px, 320px) 1fr;
  gap: clamp(20px, 3vw, 32px);
  align-items: start;
  padding-block: clamp(24px, 4vw, 36px);
}

@media (max-width: 900px) {
  .cradi-layout {
    grid-template-columns: 1fr;
  }
}

.cradi-sidebar {
  display: grid;
  gap: clamp(16px, 2vw, 20px);
}

.cradi-turn {
  display: grid;
  gap: 16px;
}

.cradi-dice-display {
  width: clamp(88px, 10vw, 104px);
  aspect-ratio: 1;
  border-radius: 22px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.9), rgba(203, 213, 255, 0.7));
  color: #1f2430;
  font-size: clamp(36px, 6vw, 42px);
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-inline: auto;
  box-shadow: inset 0 0 0 1px rgba(76, 110, 245, 0.2), 0 16px 30px rgba(31, 36, 48, 0.12);
}

.cradi-turn-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.cradi-scoreboard__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cradi-scoreboard__list {
  display: grid;
  gap: 12px;
}

.cradi-scoreboard__item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.cradi-scoreboard__item.is-active {
  box-shadow: 0 12px 26px rgba(76, 110, 245, 0.18);
  border-color: rgba(76, 110, 245, 0.45);
}

.cradi-scoreboard__avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 8px 16px rgba(31, 36, 48, 0.15);
}

.cradi-scoreboard__body {
  display: grid;
  gap: 4px;
}

.cradi-scoreboard__name {
  font-weight: 600;
}

.cradi-scoreboard__meta {
  font-size: 13px;
  color: rgba(31, 36, 48, 0.6);
}

.cradi-log__list {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: rgba(31, 36, 48, 0.72);
  max-height: 220px;
  overflow-y: auto;
  padding-right: 6px;
}

.cradi-chat {
  display: grid;
  gap: 12px;
}

.cradi-chat__messages {
  max-height: 260px;
  overflow-y: auto;
  display: grid;
  gap: 10px;
  padding-right: 8px;
}

.cradi-chat__message {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  background: rgba(255, 255, 255, 0.42);
  border-radius: 18px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
}

.cradi-chat__avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
}

.cradi-chat__headerline {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(31, 36, 48, 0.7);
}

.cradi-chat__text {
  font-size: 14px;
  color: #1f2430;
}

.cradi-boardwrap {
  display: grid;
}

.cradi-board-card {
  display: grid;
  gap: 16px;
}

.cradi-board {
  --grid-size: 11;
  display: grid;
  grid-template-columns: repeat(var(--grid-size), minmax(0, 1fr));
  aspect-ratio: 1;
  gap: 4px;
  background: linear-gradient(180deg, rgba(248, 249, 251, 0.9), rgba(203, 213, 255, 0.4));
  padding: clamp(12px, 2vw, 18px);
  border-radius: 28px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 24px 60px rgba(31, 36, 48, 0.18);
}

.cradi-cell {
  position: relative;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.4);
  min-height: 0;
}

.cradi-cell--track {
  background: rgba(76, 110, 245, 0.12);
}

.cradi-cell--center {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 0 0 3px rgba(76, 110, 245, 0.18);
}

.cradi-cell--red { border-color: rgba(242, 95, 92, 0.45); }
.cradi-cell--blue { border-color: rgba(76, 110, 245, 0.45); }
.cradi-cell--green { border-color: rgba(64, 192, 87, 0.45); }
.cradi-cell--yellow { border-color: rgba(252, 196, 25, 0.45); }

.cradi-pawn {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(31, 36, 48, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cradi-pawn::after {
  content: '';
  position: absolute;
  inset: 24%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.45);
}

.cradi-pawn--red { background: linear-gradient(150deg, #ffb3b3, #f25f5c); }
.cradi-pawn--blue { background: linear-gradient(150deg, #aec2ff, #4c6ef5); }
.cradi-pawn--green { background: linear-gradient(150deg, #b8f7c3, #40c057); }
.cradi-pawn--yellow { background: linear-gradient(150deg, #ffeeb0, #fcc419); }

.cradi-pawn.is-movable {
  box-shadow: 0 16px 32px rgba(0, 224, 161, 0.35);
  transform: translateY(-2px) scale(1.04);
}

.cradi-pawn:focus-visible {
  outline: 3px solid rgba(0, 224, 161, 0.8);
  outline-offset: 2px;
}

.cradi-chat__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.cradi-winner {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(31, 36, 48, 0.55);
  backdrop-filter: blur(10px);
  z-index: 20;
  text-align: center;
  padding: 24px;
}

.cradi-winner.hidden {
  display: none;
}

.cradi-winner h2 {
  font-size: clamp(28px, 6vw, 42px);
  margin-bottom: 12px;
  color: #ffffff;
}

.cradi-winner__avatars {
  display: flex;
  gap: clamp(20px, 5vw, 32px);
  justify-content: center;
  margin-bottom: 16px;
}

.cradi-winner__avatars img {
  width: clamp(120px, 16vw, 180px);
  height: clamp(120px, 16vw, 180px);
  border-radius: 30px;
  object-fit: cover;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
  border: 6px solid rgba(255, 255, 255, 0.8);
}

.cradi-winner p {
  color: #f8f9fb;
  font-size: clamp(18px, 3vw, 22px);
}

.players .player {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-avatar {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  object-fit: cover;
}

.player-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.player-badge {
  display: inline-flex;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 999px;
  background: rgba(76, 110, 245, 0.12);
  color: #4c6ef5;
}

.player-kick {
  margin-left: auto;
}

@media (max-width: 720px) {
  .cradi-board {
    gap: 2px;
    padding: 12px;
  }
  .cradi-pawn {
    inset: 16%;
  }
  .cradi-sidebar {
    grid-template-columns: 1fr;
  }
}

/* --- Codecra layout --- */
.codecra-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(16px, 3vw, 28px) clamp(20px, 6vw, 48px);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 10px 40px rgba(32, 46, 94, 0.08);
}

.codecra-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.codecra-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2430;
  text-decoration: none;
}

.codecra-logo img {
  width: clamp(44px, 6vw, 64px);
  height: clamp(44px, 6vw, 64px);
  object-fit: contain;
}

.codecra-logo__text {
  letter-spacing: 0.04em;
}

.codecra-header__subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(31, 36, 48, 0.64);
}

.codecra-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.codecra-main {
  background: linear-gradient(140deg, rgba(207, 243, 210, 0.45), rgba(140, 182, 255, 0.5));
  min-height: 100vh;
}

.codecra-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(24px, 5vw, 64px);
  padding: clamp(48px, 8vw, 88px) clamp(24px, 8vw, 96px);
  align-items: center;
}

.codecra-hero__content h1 {
  font-size: clamp(2.25rem, 5vw, 3rem);
  margin-bottom: 12px;
}

.codecra-hero__badge {
  display: inline-flex;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(76, 110, 245, 0.12);
  color: #4c6ef5;
  font-weight: 600;
  margin-bottom: 18px;
}

.codecra-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.codecra-hero__preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(240px, 40vw, 380px);
}

.codecra-preview__glow {
  position: absolute;
  inset: 12% 14%;
  border-radius: 32px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
  filter: blur(10px);
  z-index: 0;
}

.codecra-preview__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 16px;
  z-index: 1;
}

.codecra-preview__card {
  padding: 24px;
  border-radius: 18px;
  font-weight: 600;
  text-align: center;
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(31, 36, 48, 0.16);
  backdrop-filter: blur(12px);
}

.codecra-preview__card--red {
  background: linear-gradient(135deg, #f25f5c, #ff8a7a);
}

.codecra-preview__card--blue {
  background: linear-gradient(135deg, #4c6ef5, #7d94ff);
}

.codecra-preview__card--neutral {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(207, 215, 235, 0.9));
  color: #1f2430;
}

.codecra-preview__card--assassin {
  background: linear-gradient(135deg, #2a2f45, #1b1f32);
}

.codecra-section.hidden {
  display: none;
}

.codecra-lobby {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(320px, 1fr);
  gap: clamp(24px, 5vw, 48px);
  padding: clamp(32px, 6vw, 72px) clamp(20px, 6vw, 72px);
}

.codecra-lobby__profile {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  padding: clamp(24px, 4vw, 40px);
  box-shadow: 0 18px 40px rgba(31, 36, 48, 0.14);
  backdrop-filter: blur(14px);
  display: grid;
  gap: 18px;
}

.codecra-avatar {
  display: grid;
  gap: 18px;
}

.codecra-avatar canvas {
  width: 100%;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 0 0 1px rgba(31, 36, 48, 0.08);
  cursor: crosshair;
}

.codecra-avatar__tools {
  display: grid;
  gap: 10px;
}

.codecra-avatar__tools .tool-row {
  display: flex;
  gap: 10px;
}

.codecra-lobby__selectors {
  display: grid;
  gap: 12px;
}

.codecra-lobby__actions {
  display: flex;
  justify-content: flex-end;
}

.codecra-lobby__room {
  background: rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  padding: clamp(28px, 4vw, 44px);
  box-shadow: 0 18px 40px rgba(31, 36, 48, 0.12);
  backdrop-filter: blur(14px);
  display: grid;
  gap: 24px;
}

.codecra-roominfo {
  display: grid;
  gap: 16px;
}

.codecra-roominfo__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
}

.codecra-roominfo__link {
  display: flex;
  gap: 10px;
  width: 100%;
}

.codecra-teaminfo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.codecra-teaminfo__block {
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 1px rgba(31, 36, 48, 0.08);
}

.codecra-teaminfo__block--red {
  border-top: 4px solid #f25f5c;
}

.codecra-teaminfo__block--blue {
  border-top: 4px solid #4c6ef5;
}

.codecra-teamlist {
  display: grid;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.codecra-teamlist--compact {
  gap: 8px;
  margin-top: 12px;
}

.codecra-teamlist__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 1px rgba(31, 36, 48, 0.06);
}

.codecra-teamlist__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.codecra-teamlist__meta {
  display: grid;
  gap: 4px;
}

.codecra-teamlist__name {
  font-weight: 600;
  color: #1f2430;
}

.codecra-teamlist__role {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(31, 36, 48, 0.6);
}

.codecra-teamlist__role--spymaster {
  color: #4c6ef5;
}

.codecra-teamlist__kick {
  margin-left: auto;
  border: none;
  background: rgba(242, 95, 92, 0.12);
  color: #f25f5c;
  padding: 6px 10px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.codecra-teamlist__kick:hover {
  background: rgba(242, 95, 92, 0.2);
}

.codecra-teamlist__host {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(76, 110, 245, 0.12);
  color: #4c6ef5;
  font-weight: 600;
}

.codecra-lobby__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.codecra-game {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(320px, 1fr) minmax(220px, 280px);
  gap: clamp(20px, 4vw, 40px);
  padding: clamp(28px, 6vw, 72px) clamp(20px, 6vw, 72px);
}

.codecra-sidebar,
.codecra-boardwrap,
.codecra-chat {
  background: rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  box-shadow: 0 18px 42px rgba(31, 36, 48, 0.12);
  backdrop-filter: blur(16px);
  padding: clamp(20px, 3vw, 32px);
  display: grid;
  gap: 18px;
}

.codecra-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.codecra-turn {
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  background: rgba(31, 36, 48, 0.08);
  color: #1f2430;
}

.codecra-turn[data-team="red"] {
  background: rgba(242, 95, 92, 0.18);
  color: #c92a2a;
}

.codecra-turn[data-team="blue"] {
  background: rgba(76, 110, 245, 0.18);
  color: #2647d8;
}

.codecra-scoreboard {
  display: grid;
  gap: 10px;
}

.codecra-score {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(31, 36, 48, 0.06);
}

.codecra-score--red {
  background: rgba(242, 95, 92, 0.12);
  color: #c92a2a;
}

.codecra-score--blue {
  background: rgba(76, 110, 245, 0.12);
  color: #2647d8;
}

.codecra-teamslive {
  display: grid;
  gap: 16px;
}

.codecra-teamslive__group h3 {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.codecra-clueform {
  display: grid;
  gap: 12px;
}

.codecra-clueform__row {
  display: flex;
  gap: 10px;
}

.codecra-clueform .input--number {
  max-width: 88px;
}

.codecra-actions {
  display: flex;
  justify-content: flex-end;
}

.codecra-status {
  font-weight: 600;
  color: rgba(31, 36, 48, 0.7);
}

.codecra-history {
  display: grid;
  gap: 10px;
}

.codecra-history ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.codecra-history__item {
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(31, 36, 48, 0.05);
  font-size: 0.85rem;
}

.codecra-history__item[data-kind="clue"] {
  background: rgba(76, 110, 245, 0.14);
  color: #2647d8;
}

.codecra-history__item[data-kind="reveal"] {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 1px rgba(31, 36, 48, 0.08);
}

.codecra-history__item[data-kind="win"],
.codecra-history__item[data-kind="assassin"] {
  background: rgba(242, 95, 92, 0.18);
  color: #912018;
}

.codecra-boardwrap {
  position: relative;
}

.codecra-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(100px, 1fr));
  gap: clamp(10px, 2vw, 18px);
}

.codecra-card {
  position: relative;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  padding: clamp(16px, 3vw, 24px);
  text-transform: uppercase;
  font-weight: 700;
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: #1f2430;
  letter-spacing: 0.04em;
  box-shadow: 0 20px 40px rgba(31, 36, 48, 0.14);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}

.codecra-card:disabled {
  cursor: default;
}

.codecra-card--active:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(31, 36, 48, 0.16);
}

.codecra-card--revealed {
  color: #ffffff;
}

.codecra-card--revealed[data-type="red"] {
  background: linear-gradient(135deg, #f25f5c, #d94841);
}

.codecra-card--revealed[data-type="blue"] {
  background: linear-gradient(135deg, #4c6ef5, #2743c7);
}

.codecra-card--revealed[data-type="neutral"] {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(206, 214, 236, 0.9));
  color: #1f2430;
}

.codecra-card--revealed[data-type="assassin"] {
  background: linear-gradient(135deg, #2a2f45, #111323);
}

.codecra-card--hint-red:not(.codecra-card--revealed) {
  box-shadow: inset 0 0 0 3px rgba(242, 95, 92, 0.35);
}

.codecra-card--hint-blue:not(.codecra-card--revealed) {
  box-shadow: inset 0 0 0 3px rgba(76, 110, 245, 0.35);
}

.codecra-card--hint-neutral:not(.codecra-card--revealed) {
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.45);
}

.codecra-card--hint-assassin:not(.codecra-card--revealed) {
  box-shadow: inset 0 0 0 3px rgba(42, 47, 69, 0.45);
}

.codecra-card__word {
  display: block;
  text-align: center;
  word-break: break-word;
}

.codecra-card__badge {
  position: absolute;
  inset: auto 12px 12px 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.22);
}

.codecra-chat {
  max-height: 100%;
}

.codecra-chat__messages {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.codecra-chat__item {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 1px rgba(31, 36, 48, 0.06);
}

.codecra-chat__name {
  font-weight: 600;
  color: #1f2430;
}

.codecra-chat__message {
  font-size: 0.9rem;
  color: rgba(31, 36, 48, 0.7);
}

.codecra-chat__form {
  display: flex;
  gap: 10px;
  align-items: center;
}

@media (max-width: 1200px) {
  .codecra-game {
    grid-template-columns: minmax(220px, 280px) minmax(320px, 1fr);
    grid-template-areas: 'sidebar board' 'chat board';
  }
  .codecra-sidebar { grid-area: sidebar; }
  .codecra-boardwrap { grid-area: board; }
  .codecra-chat { grid-area: chat; }
}

@media (max-width: 900px) {
  .codecra-lobby {
    grid-template-columns: 1fr;
  }
  .codecra-game {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .codecra-board {
    grid-template-columns: repeat(5, minmax(72px, 1fr));
    gap: 8px;
  }
  .codecra-card {
    padding: 14px;
    font-size: 0.75rem;
  }
  .codecra-chat__messages {
    max-height: 260px;
  }
}