/* Rummikub shell polish — landing / rules / tutorial / spectate / replay */
.rk-page {
  --rk-ink: #142d24;
  --rk-muted: #66736d;
  --rk-green: #174d3a;
  --rk-green-2: #186b49;
  --rk-gold: #d9a51c;
  --rk-cream: #f8f4e9;
  --rk-blue: #1766d6;
  --rk-red: #e54436;
  --rk-black: #161616;
  --rk-orange: #f28b21;
  color: var(--rk-ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 218, 107, 0.22), transparent 32%),
    radial-gradient(circle at 88% 8%, rgba(23, 102, 214, 0.08), transparent 28%),
    linear-gradient(180deg, #f8f4e9 0%, #eef5f1 48%, #edf2f8 100%);
}

.rk-page .container {
  max-width: 1120px;
}

/* —— Hero —— */
.rk-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.4rem, 5vw, 3.6rem) 0 clamp(2rem, 4vw, 2.8rem);
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 215, 96, 0.35), transparent 26%),
    linear-gradient(135deg, #12392b 0%, #176042 58%, #102c24 100%);
  color: #fff;
  border-radius: 0 0 28px 28px;
}

.rk-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

.rk-hero .container {
  position: relative;
  z-index: 1;
}

.rk-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.rk-hero-title {
  margin: 14px 0 10px;
  font-size: clamp(1.7rem, 3.4vw, 2.55rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.22;
}

.rk-hero-lead {
  margin: 0 0 1.25rem;
  max-width: 38rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  line-height: 1.7;
}

.rk-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rk-btn-gold {
  background: linear-gradient(180deg, #f3c84a, #d4a017);
  border: 0;
  color: #28350e !important;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.rk-btn-gold:hover {
  filter: brightness(1.04);
  color: #1a2408 !important;
}

.rk-btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff !important;
  font-weight: 800;
}

.rk-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff !important;
}

.rk-stat-card {
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  color: var(--rk-ink);
}

.rk-stat-card .card-body {
  padding: 1.25rem 1.35rem;
}

.rk-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(20, 45, 36, 0.08);
}

.rk-stat-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.rk-stat-row span {
  color: var(--rk-muted);
  font-size: 0.86rem;
}

.rk-stat-row strong {
  font-weight: 900;
}

/* —— Content cards —— */
.rk-section {
  padding: 2.4rem 0 3.2rem;
}

.rk-panel {
  border: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 48px rgba(34, 63, 53, 0.1);
  overflow: hidden;
}

.rk-panel .card-body {
  padding: clamp(1.35rem, 3vw, 2rem);
}

.rk-side-card {
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(34, 63, 53, 0.08);
}

.rk-side-card .card-body {
  padding: 1.25rem 1.35rem;
}

.rk-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 1.4rem;
}

.rk-feature {
  border: 1px solid rgba(23, 77, 58, 0.12);
  border-radius: 16px;
  padding: 1rem 1.05rem;
  background: #fff;
  height: 100%;
}

.rk-feature b {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 900;
}

.rk-feature span {
  display: block;
  color: var(--rk-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.rk-tile-strip {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin: 0.4rem 0 1rem;
}

.rk-tile-strip span {
  width: 42px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #fff, #e9e5da);
  border: 2px solid #fff;
  font-size: 1.15rem;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.rk-tile-strip span:nth-child(1) { color: var(--rk-blue); }
.rk-tile-strip span:nth-child(2) { color: var(--rk-red); transform: translateY(-8px); }
.rk-tile-strip span:nth-child(3) { color: var(--rk-black); }
.rk-tile-strip span:nth-child(4) { color: var(--rk-orange); transform: translateY(-12px); }

.rk-flow-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rk-flow-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(23, 77, 58, 0.12);
  background: #fff;
  color: var(--rk-ink) !important;
  text-decoration: none !important;
  font-weight: 800;
  font-size: 0.9rem;
}

.rk-flow-list a:hover {
  border-color: rgba(23, 77, 58, 0.35);
  background: #f4faf6;
}

.rk-flow-list a i {
  color: var(--rk-green);
}

.rk-tour-link {
  display: block;
  border: 1px solid rgba(23, 77, 58, 0.12);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  background: #fff;
  color: inherit !important;
  text-decoration: none !important;
}

.rk-tour-link:hover {
  border-color: rgba(23, 77, 58, 0.32);
}

/* —— Rules / tutorial shared —— */
.rk-rules-hero {
  position: relative;
  overflow: hidden;
  min-height: min(42vh, 360px);
  display: grid;
  place-items: end center;
  border-radius: 0 0 28px 28px;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 215, 96, 0.4), transparent 28%),
    linear-gradient(135deg, #12392b, #176042 55%, #102c24);
  color: #fffaf2;
}

.rk-rules-hero::before {
  content: "";
  position: absolute;
  inset: auto -5% -40% 40%;
  height: 110%;
  transform: rotate(-8deg);
  border-radius: 40%;
  background: rgba(255, 255, 255, 0.06);
}

.rk-rules-hero-inner {
  position: relative;
  z-index: 1;
  width: min(840px, calc(100% - 32px));
  padding: 0 0 28px;
  text-align: center;
}

.rk-rules-hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(1.55rem, 3.4vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.28;
}

.rk-rules-hero p {
  margin: 0 auto;
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
}

.rk-rules-wrap {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.rk-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}

.rk-toc a {
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(23, 77, 58, 0.18);
  color: var(--rk-green);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.rk-toc a:hover {
  background: #eef7f2;
}

.rk-callout {
  margin: 0 0 24px;
  padding: 18px 20px;
  border-radius: 18px;
  background: #fff4d6;
  border-left: 5px solid var(--rk-gold);
}

.rk-callout strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.02rem;
}

.rk-callout p {
  margin: 0;
  line-height: 1.75;
  color: #5a3a10;
}

.rk-chapter {
  margin: 0 0 2rem;
}

.rk-chapter h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 900;
}

.rk-chapter p,
.rk-chapter li {
  color: var(--rk-muted);
  line-height: 1.7;
}

.rk-steps {
  display: grid;
  gap: 12px;
  margin: 1rem 0;
}

.rk-step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(23, 77, 58, 0.1);
}

.rk-step b {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--rk-green);
  color: #fff;
  font-weight: 900;
}

.rk-step p {
  margin: 0;
}

.rk-cards-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.rk-mini-card {
  border-radius: 16px;
  border: 1px solid rgba(23, 77, 58, 0.1);
  background: #fff;
  padding: 1rem 1.05rem;
}

.rk-mini-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 900;
}

.rk-mini-card p {
  margin: 0;
  font-size: 0.9rem;
}

.rk-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1.5rem;
}

/* —— Spectate / replay —— */
.rk-spectate-page,
.rk-replay-page {
  padding: 1.5rem 0 3rem;
}

.rk-shell-hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 1.6rem 1.5rem;
  margin-bottom: 1.25rem;
  color: #fff;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 215, 96, 0.35), transparent 30%),
    linear-gradient(135deg, #12392b, #176042 60%, #102c24);
}

.rk-shell-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1rem;
}

.rk-shell-hero-actions .btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-weight: 800;
}

.rk-shell-hero-actions .btn:hover,
.rk-shell-hero-actions .btn.is-primary {
  background: linear-gradient(180deg, #f3c84a, #d4a017);
  border-color: transparent;
  color: #28350e;
}

.rk-match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.rk-match-card {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(23, 77, 58, 0.12);
  border-radius: 16px;
  padding: 1rem 1.05rem;
  background: #fff;
  box-shadow: 0 8px 20px rgba(34, 63, 53, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rk-match-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(34, 63, 53, 0.12);
}

.rk-match-card .rk-match-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.45rem;
}

.rk-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e8f8ef;
  color: #0f7a45;
  font-size: 0.72rem;
  font-weight: 900;
}

.rk-live-pill.is-paused {
  background: #f3f1ea;
  color: #6b6558;
}

@media (max-width: 991px) {
  .rk-feature-grid,
  .rk-cards-2 {
    grid-template-columns: 1fr;
  }
}
