﻿/* ========================= */
/*  ROOT + RESET + BASE      */
/* ========================= */

:root {
  --bg-main: #050814;
  --bg-alt: #070b1c;
  --accent: #4ff3ff;
  --accent-soft: #8f7bff;
  --accent-warm: #ffb86c;
  --text-main: #f5f7ff;
  --text-muted: #9aa0c6;
  --border-glow: 0 0 18px rgba(79, 243, 255, 0.4);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --blur-bg: blur(18px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #151b3a 0, #050814 55%, #02030a 100%);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.page {
  min-height: 100vh;
}

/* ========================= */
/*  NAVIGATION               */
/* ========================= */

.nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(to right, rgba(5, 8, 20, 0.92), rgba(5, 8, 20, 0.7));
  border-bottom: 1px solid rgba(143, 123, 255, 0.25);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
    float: left;
    width: auto;
    padding: 10px 13px 0 10px;
}

.site_logo {
    background-image: url(../img/LoFriDastTower_Logo.svg);
    width: clamp(46px, 3vw, 56px);
    height: clamp(46px, 2.7vw, 52px);
    display: inline-block;
    background-size: contain;
    background-position: left center;
    background-repeat: no-repeat;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(79, 243, 255, 0.7);
  box-shadow: var(--border-glow);
  background: radial-gradient(circle at 30% 20%, #4ff3ff, #151b3a 55%, #050814 100%);
  position: relative;
  overflow: hidden;
}

.nav-logo-icon::after {
  content: "";
  position: absolute;
  inset: 30% 18%;
  border-radius: 50% 50% 40% 40%;
  border: 1px solid rgba(245, 247, 255, 0.4);
  box-shadow: 0 0 10px rgba(245, 247, 255, 0.4);
}

.nav-logo-text {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 1.25rem;
}

.nav-links a {
  position: relative;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transition: width 0.2s ease-out;
}

.nav-links a:hover {
  color: var(--text-main);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  gap: 0.75rem;
}

.btn {
  border-radius: var(--radius-pill);
  padding: 0.55rem 1.3rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid rgba(79, 243, 255, 0.5);
  background: radial-gradient(circle at top left, rgba(79, 243, 255, 0.2), rgba(5, 8, 20, 0.9));
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.btn span.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(79, 243, 255, 0.9);
}

.btn-primary {
  border-color: rgba(255, 184, 108, 0.7);
  background: linear-gradient(135deg, #ffb86c, #ff6b9c);
  color: #050814;
  box-shadow: 0 0 18px rgba(255, 184, 108, 0.6);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--border-glow);
}

.btn-primary:hover {
  box-shadow: 0 0 24px rgba(255, 184, 108, 0.9);
}

/* ========================= */
/*  MAIN LAYOUT              */
/* ========================= */

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5.5rem 1.5rem 4rem;
}

section {
  margin: 4rem 0;
  position: relative;
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  color: var(--accent-soft);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 560px;
}

.intro-with-cup p + p,
.panel-body p + p {
  margin-top: 0.75rem;
}


/* ========================= */
/*  HERO SECTION             */
/* ========================= */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
  margin-top: 2rem;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.hero-title {
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-title span {
  background: linear-gradient(120deg, #4ff3ff, #8f7bff, #ffb86c);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-text {
  font-size: 0.98rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 1.5rem;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.hero-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hero-meta span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: 0 0 10px rgba(143, 123, 255, 0.9);
}

.hero-visual {
  position: relative;
  min-height: 260px;
}

.hero-orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(79, 243, 255, 0.35);
  opacity: 0.7;
  transform: rotate(-8deg);
}

.hero-orbit::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(79, 243, 255, 0.9);
  top: 8%;
  right: 18%;
}

.hero-planet {
  position: absolute;
  inset: 12% 18%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #f5f7ff, #8f7bff 40%, #151b3a 70%, #050814 100%);
  box-shadow: 0 0 40px rgba(143, 123, 255, 0.9);
  overflow: hidden;
}

.hero-planet::after {
  content: "";
  position: absolute;
  inset: 40% 10% 0 10%;
  background: radial-gradient(circle at 50% 0, rgba(5, 8, 20, 0.9), transparent 60%);
  opacity: 0.9;
}

.hero-turtle {
  position: absolute;
  inset: 30% 10% 10% 10%;
  border-radius: 50%;
  border: 1px solid rgba(245, 247, 255, 0.4);
  box-shadow: 0 0 18px rgba(245, 247, 255, 0.5);
  background:
    radial-gradient(circle at 50% 20%, rgba(245, 247, 255, 0.9), transparent 55%),
    radial-gradient(circle at 50% 80%, rgba(5, 8, 20, 0.95), transparent 60%);
  overflow: hidden;
}

.hero-turtle::before {
  content: "";
  position: absolute;
  bottom: 18%;
  left: 12%;
  right: 12%;
  height: 26%;
  background:
    linear-gradient(to top, rgba(5, 8, 20, 1), rgba(5, 8, 20, 0.1)),
    repeating-linear-gradient(
      to right,
      rgba(245, 247, 255, 0.9) 0,
      rgba(245, 247, 255, 0.9) 1px,
      transparent 1px,
      transparent 6px
    );
  opacity: 0.9;
}

.hero-turtle::after {
  content: "";
  position: absolute;
  top: 32%;
  left: 18%;
  right: 18%;
  height: 18%;
  border-radius: 50% 50% 40% 40%;
  background:
    radial-gradient(circle at 50% 0, rgba(143, 255, 196, 0.9), transparent 70%),
    linear-gradient(to bottom, rgba(5, 8, 20, 0.9), rgba(5, 8, 20, 0.1));
  box-shadow: 0 0 18px rgba(143, 255, 196, 0.7);
}

.hero-tag {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(5, 8, 20, 0.85);
  border: 1px solid rgba(79, 243, 255, 0.6);
  color: var(--accent);
}

/* ========================= */
/*  LEGEND SECTION           */
/* ========================= */

.legend-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

.legend-text p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.legend-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.pill {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(79, 243, 255, 0.5);
  color: var(--text-muted);
  background: rgba(5, 8, 20, 0.9);
}

.legend-panel {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(79, 243, 255, 0.35);
  background: radial-gradient(circle at top, rgba(79, 243, 255, 0.18), rgba(5, 8, 20, 0.96));
  padding: 1.25rem 1.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  position: relative;
  overflow: hidden;
}

.legend-panel::before {
  content: "CITY ARCHIVE // CLASSIFIED";
  position: absolute;
  top: 0.6rem;
  right: 1rem;
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 247, 255, 0.25);
}

.legend-panel h3 {
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.legend-panel ul {
  list-style: none;
  margin-top: 0.5rem;
}

.legend-panel li {
  margin-bottom: 0.35rem;
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
}

.legend-panel li::before {
  content: "â—†";
  font-size: 0.6rem;
  color: var(--accent-soft);
  margin-top: 0.1rem;
}

/* ========================= */
/*  ISLAND MAP SECTION       */
/* ========================= */

.map-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

.map-visual {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(143, 123, 255, 0.5);
  background: radial-gradient(circle at 50% 0, rgba(143, 123, 255, 0.25), rgba(5, 8, 20, 0.98));
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.map-orbit {
  position: relative;
  width: 100%;
  padding-top: 100%;
  border-radius: 50%;
  border: 1px dashed rgba(245, 247, 255, 0.2);
}

.map-layer {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px solid rgba(79, 243, 255, 0.4);
  box-shadow: 0 0 18px rgba(79, 243, 255, 0.4);
  background: radial-gradient(circle at 50% 30%, rgba(143, 255, 196, 0.9), rgba(5, 8, 20, 0.95));
  overflow: hidden;
}

/* MAP PINS */

.map-pin {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(79, 243, 255, 0.9);
}

.map-pin-label {
  position: absolute;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  background: rgba(5, 8, 20, 0.9);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(79, 243, 255, 0.5);
  white-space: nowrap;
}

/* PIN POSITIONS â€” identical to PL version */

.map-pin--garden { top: 22%; left: 58%; }
.map-pin-label--garden { top: 18%; left: 62%; }

.map-pin--lighthouse { top: 40%; left: 24%; }
.map-pin-label--lighthouse { top: 36%; left: 4%; }

.map-pin--spring { top: 62%; left: 64%; }
.map-pin-label--spring { top: 66%; left: 60%; }

.map-pin--sanctum { top: 50%; left: 46%; }
.map-pin-label--sanctum { top: 54%; left: 40%; }

/* MAP LIST */

.map-list {
  display: grid;
  gap: 0.9rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.map-item {
  border-radius: var(--radius-md);
  border: 1px solid rgba(79, 243, 255, 0.35);
  background: rgba(5, 8, 20, 0.9);
  padding: 0.85rem 1rem;
  position: relative;
  overflow: hidden;
}

.map-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(79, 243, 255, 0.16), transparent);
  opacity: 0;
  transition: opacity 0.15s ease-out;
}

.map-item:hover::before {
  opacity: 1;
}

.map-item-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.map-item-meta {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(154, 160, 198, 0.8);
  margin-bottom: 0.25rem;
}

/* ========================= */
/*  TURTLE â€” GUARDIAN        */
/* ========================= */

.turtle-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

.turtle-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(143, 123, 255, 0.6);
  color: var(--accent-soft);
  background: rgba(5, 8, 20, 0.9);
}

.turtle-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.turtle-col h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.turtle-col p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* TURTLE VISUAL */

.turtle-visual {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(79, 243, 255, 0.4);
  background: radial-gradient(circle at 50% 0, rgba(79, 243, 255, 0.25), rgba(5, 8, 20, 0.98));
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.turtle-silhouette {
  position: relative;
  width: 100%;
  padding-top: 60%;
  border-radius: 50%;
  border: 1px solid rgba(245, 247, 255, 0.4);
  box-shadow: 0 0 26px rgba(245, 247, 255, 0.7);
  background:
    radial-gradient(circle at 50% 20%, rgba(245, 247, 255, 0.9), transparent 60%),
    radial-gradient(circle at 50% 80%, rgba(5, 8, 20, 1), transparent 70%);
  overflow: hidden;
}

/* Shell */
.turtle-silhouette::before {
  content: "";
  position: absolute;
  inset: 18% 20% 32% 20%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 20%, rgba(143, 123, 255, 0.9), transparent 70%),
    radial-gradient(circle at 70% 80%, rgba(79, 243, 255, 0.8), transparent 70%);
  box-shadow: 0 0 26px rgba(143, 123, 255, 0.9);
}

/* Head */
.turtle-silhouette::after {
  content: "";
  position: absolute;
  top: 40%;
  left: 10%;
  width: 26%;
  height: 26%;
  border-radius: 50% 40% 40% 50%;
  background: radial-gradient(circle at 30% 20%, rgba(245, 247, 255, 0.9), rgba(143, 123, 255, 0.9));
  box-shadow: 0 0 18px rgba(143, 123, 255, 0.9);
}

.turtle-tag {
  position: absolute;
  bottom: 0.75rem;
  left: 1.25rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(245, 247, 255, 0.7);
}

/* ========================= */
/*  CITY & PARK SECTION      */
/* ========================= */

.city-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

.city-photo {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(143, 123, 255, 0.5);
  background:
    linear-gradient(to top, rgba(5, 8, 20, 1), rgba(5, 8, 20, 0.1)),
    radial-gradient(circle at 50% 0, rgba(79, 243, 255, 0.25), rgba(5, 8, 20, 0.98));
  padding: 1.2rem;
  position: relative;
  overflow: hidden;
}

.city-skyline {
  position: relative;
  width: 100%;
  padding-top: 52%;
  border-radius: var(--radius-md);
  background:
    linear-gradient(to top, #050814 0, #151b3a 40%, #4ff3ff 100%);
  overflow: hidden;
}

.city-skyline::before {
  content: "";
  position: absolute;
  inset: 40% 8% 0 8%;
  background:
    linear-gradient(to top, rgba(5, 8, 20, 1), rgba(5, 8, 20, 0.1)),
    repeating-linear-gradient(
      to right,
      rgba(245, 247, 255, 0.9) 0,
      rgba(245, 247, 255, 0.9) 1px,
      transparent 1px,
      transparent 7px
    );
  opacity: 0.9;
}

.city-skyline::after {
  content: "";
  position: absolute;
  inset: 64% 10% 0 10%;
  border-radius: 50% 50% 0 0;
  background: radial-gradient(circle at 50% 0, #3adf9b, #050814 80%);
  opacity: 0.9;
}

.city-floating-island {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 40%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 20%, rgba(245, 247, 255, 0.9), transparent 60%),
    radial-gradient(circle at 50% 80%, rgba(5, 8, 20, 1), transparent 70%);
  box-shadow: 0 0 26px rgba(245, 247, 255, 0.9);
}

.city-floating-island::before {
  content: "";
  position: absolute;
  inset: 30% 18% 40% 18%;
  border-radius: 50% 50% 40% 40%;
  background:
    radial-gradient(circle at 50% 0, rgba(143, 255, 196, 0.9), transparent 70%),
    linear-gradient(to bottom, rgba(5, 8, 20, 0.9), rgba(5, 8, 20, 0.1));
  box-shadow: 0 0 18px rgba(143, 255, 196, 0.7);
}

.city-floating-island::after {
  content: "";
  position: absolute;
  inset: 52% 20% 18% 20%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, rgba(143, 123, 255, 0.9), rgba(5, 8, 20, 1));
  box-shadow: 0 0 18px rgba(143, 123, 255, 0.9);
}

.city-caption {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.city-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.city-col h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

/* ========================= */
/*  EXPERIENCES SECTION      */
/* ========================= */

.experiences-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.experience-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(79, 243, 255, 0.35);
  background: rgba(5, 8, 20, 0.95);
  padding: 0.9rem 1rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
  overflow: hidden;
}

.experience-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(79, 243, 255, 0.12), transparent);
  opacity: 0;
  transition: opacity 0.15s ease-out;
}

.experience-card:hover::before {
  opacity: 1;
}

.experience-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.experience-meta {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(154, 160, 198, 0.8);
}

.experience-price {
  font-size: 0.8rem;
  color: var(--accent-warm);
  margin-top: 0.25rem;
}

.experience-cta {
  margin-top: 0.4rem;
}

.btn-ghost {
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.9rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  border: 1px solid rgba(79, 243, 255, 0.4);
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s ease-out, transform 0.15s ease-out;
}

.btn-ghost:hover {
  background: rgba(79, 243, 255, 0.12);
  transform: translateY(-1px);
}

/* ========================= */
/*  CHRONICLE SECTION        */
/* ========================= */

.chronicle-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

/* TIMELINE */

.timeline {
  border-left: 1px solid rgba(79, 243, 255, 0.4);
  padding-left: 1.25rem;
  display: grid;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.25rem;
  top: 0.25rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: 0 0 12px rgba(143, 123, 255, 0.9);
}

.timeline-date {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(154, 160, 198, 0.9);
  margin-bottom: 0.15rem;
}

.timeline-title {
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 0.15rem;
}

/* PANEL */

.chronicle-panel {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(143, 123, 255, 0.5);
  background: radial-gradient(circle at top, rgba(143, 123, 255, 0.2), rgba(5, 8, 20, 0.98));
  padding: 1.25rem 1.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  position: relative;
  overflow: hidden;
}

.chronicle-panel h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.chronicle-form {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.6rem;
}

.chronicle-form input,
.chronicle-form textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(79, 243, 255, 0.4);
  background: rgba(5, 8, 20, 0.9);
  color: var(--text-main);
  padding: 0.5rem 0.7rem;
  font-size: 0.8rem;
  resize: vertical;
}

.chronicle-form input::placeholder,
.chronicle-form textarea::placeholder {
  color: rgba(154, 160, 198, 0.7);
}

.chronicle-form button {
  justify-self: flex-start;
}

/* ========================= */
/*  FOOTER                   */
/* ========================= */

footer {
  border-top: 1px solid rgba(143, 123, 255, 0.4);
  background: linear-gradient(to top, #050814, rgba(5, 8, 20, 0.96));
  padding: 1.75rem 1.5rem 2.25rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.footer-logo-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(79, 243, 255, 0.7);
  box-shadow: var(--border-glow);
  background: radial-gradient(circle at 30% 20%, #4ff3ff, #151b3a 55%, #050814 100%);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.footer-links a {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  color: rgba(154, 160, 198, 0.9);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-newsletter {
  display: grid;
  gap: 0.5rem;
}

.footer-newsletter label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(154, 160, 198, 0.9);
}

.footer-newsletter-row {
  display: flex;
  gap: 0.5rem;
}

.footer-newsletter input {
  flex: 1;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(79, 243, 255, 0.4);
  background: rgba(5, 8, 20, 0.9);
  color: var(--text-main);
  padding: 0.45rem 0.8rem;
  font-size: 0.8rem;
}

.footer-newsletter input::placeholder {
  color: rgba(154, 160, 198, 0.7);
}

.footer-meta {
  font-size: 0.7rem;
  color: rgba(154, 160, 198, 0.7);
  margin-top: 0.75rem;
}

/* ========================= */
/*  RESPONSIVE               */
/* ========================= */

@media (max-width: 960px) {
  .hero,
  .legend-grid,
  .map-grid,
  .turtle-grid,
  .city-grid,
  .chronicle-grid,
  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .nav-inner {
    flex-wrap: wrap;
  }

  .nav-links {
    display: none;
  }

  .experiences-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  main {
    padding-inline: 1rem;
  }

  .hero {
    margin-top: 1.5rem;
  }

  .experiences-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .turtle-columns,
  .city-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ========================= */
/*  EMOLKKY LOGS LAYOUT     */
/* ========================= */
.logs-page .nav {
      position: sticky;
    }

    .logs-page .nav-inner {
      max-width: 1200px;
    }

    .logs-page .nav-inner {
      display: flex;
      align-items: center;
      gap: 1rem;
    }

    .nav-menu {
      margin-left: auto;
      position: relative;
      display: flex;
      align-items: center;
    }

    .nav-toggle {
      display: none;
      width: 42px;
      height: 42px;
      border-radius: 10px;
      border: 1px solid rgba(79, 243, 255, 0.45);
      background: rgba(5, 8, 20, 0.92);
      cursor: pointer;
      align-items: center;
      justify-content: center;
      padding: 0;
    }

    .nav-toggle .hamburger-icon {
      position: relative;
      display: block;
      width: 19px;
      height: 2px;
      border-radius: 2px;
      background: var(--accent);
      box-shadow:
        0 -6px 0 var(--accent),
        0 6px 0 var(--accent),
        0 0 8px rgba(79, 243, 255, 0.45);
    }

    .nav-menu .nav-links {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.4rem;
    }

    .nav-menu .nav-links .nav-links-row {
      display: flex;
      align-items: center;
      gap: 0.85rem;
      flex-wrap: wrap;
    }

    .nav-menu .nav-links .nav-links-row.top {
      margin-bottom: 0.1rem;
    }

    .nav-menu .nav-links .nav-links-row.top a {
      font-size: 0.9rem;
      letter-spacing: 0.1em;
    }

    .logs-page main {
      max-width: 1200px;
      margin: 0 auto;
      padding: 2rem 1.5rem 3rem;
    }

    #logsHero,
    #lastWinner,
    #topPlayers,
    #stepsHistory {
      scroll-margin-top: 84px;
    }

    .logs-hero {
      border-radius: var(--radius-lg);
      border: 1px solid rgba(79, 243, 255, 0.35);
      background:
        radial-gradient(circle at 12% 12%, rgba(79, 243, 255, 0.2), transparent 45%),
        radial-gradient(circle at 88% 12%, rgba(143, 123, 255, 0.24), transparent 48%),
        linear-gradient(145deg, rgba(5, 8, 20, 0.96), rgba(7, 11, 28, 0.96));
      padding: 0;
      box-shadow: var(--border-glow);
      margin-bottom: 1.1rem;
      overflow: hidden;
    }

    .logs-hero-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
      gap: 0;
      align-items: stretch;
    }

    .logs-hero-media {
      min-height: 220px;
      background-image: url("../img/eMolkkyPage.jpg");
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
    }

    .logs-hero-content {
      min-width: 0;
      padding: 1.4rem 1.5rem;
    }

    .logs-kicker {
      text-transform: uppercase;
      letter-spacing: 0.16em;
      font-size: 0.68rem;
      color: var(--accent);
      margin-bottom: 0.45rem;
    }

    .nav-logo-text {
      float: none;
      width: auto;
      text-align: left;
      margin: 0;
      overflow: hidden;
      text-transform: none;
      letter-spacing: normal;
      font-size: inherit;
      color: inherit;
    }

    .nav-logo-text h1 {
      margin: 15px 0 0;
      display: block;
      min-height: 0;
      font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
      font-size: 20px;
      font-weight: 700;
      letter-spacing: normal;
      text-transform: none;
      color: #4ff3ff;
      line-height: normal;
    }

    .logs-title {
      font-size: clamp(1.55rem, 3.6vw, 2.4rem);
      line-height: 1.12;
      margin: 0 0 0.45rem;
    }

    .logs-sub {
      color: var(--text-muted);
      font-size: 0.92rem;
    }

    .nav-logo-text p {
      display: block;
      margin: 0 0 16.5px;
      font-family: Verdana, Helvetica, Arial, sans-serif;
      font-size: 11px;
      font-weight: 400;
      letter-spacing: normal;
      text-transform: none;
      color: #c8cdea;
      line-height: 14.3px;
    }

    .logs-status {
      margin-top: 0.8rem;
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      font-size: 0.84rem;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      color: var(--text-muted);
      border: 1px solid rgba(143, 123, 255, 0.45);
      border-radius: var(--radius-pill);
      padding: 0.35rem 0.85rem;
      background: rgba(5, 8, 20, 0.8);
    }

    .logs-status .dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #2fdf8f;
      box-shadow: 0 0 12px rgba(47, 223, 143, 0.8);
    }

    .logs-status.error {
      color: #ff9e9e;
      border-color: rgba(255, 95, 95, 0.5);
    }

    .logs-status.error .dot {
      background: #ff5f5f;
      box-shadow: 0 0 12px rgba(255, 95, 95, 0.85);
    }

    .logs-actions {
      margin-top: 0.8rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 0.7rem;
    }

    .logs-hero .nav-cta {
      margin-left: auto;
      display: flex;
      flex-wrap: wrap;
      gap: 0.7rem;
    }

    .summary-layout {
      margin-top: 1rem;
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
      gap: 1rem;
    }

    .summary-left {
      display: grid;
      gap: 1rem;
      align-content: start;
    }

    .summary-layout .logs-table-card {
      margin-top: 0;
    }

    .logs-card {
      border-radius: var(--radius-md);
      border: 1px solid rgba(79, 243, 255, 0.3);
      background: rgba(5, 8, 20, 0.9);
      overflow: hidden;
    }

    .logs-card h2 {
      margin: 0;
      padding: 0.8rem 0.95rem;
      font-size: 0.78rem;
      text-transform: uppercase;
      letter-spacing: 0.15em;
      border-bottom: 1px solid rgba(79, 243, 255, 0.2);
      color: var(--accent);
      background: rgba(5, 8, 20, 0.95);
    }

    .meta {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 0.5rem 0.7rem;
      padding: 0.9rem 1rem;
      font-size: 0.86rem;
      color: var(--text-main);
    }

    .meta .k {
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.1em;
      font-size: 0.68rem;
      margin-top: 0.22rem;
    }

    .stat {
      padding: 1rem;
    }

    .stat .n {
      font-size: clamp(1.3rem, 3vw, 2.1rem);
      line-height: 1;
      color: var(--accent);
      font-weight: 700;
      text-shadow: 0 0 16px rgba(79, 243, 255, 0.45);
    }

    .stat .t {
      margin-top: 0.5rem;
      color: var(--text-muted);
      font-size: 0.85rem;
      text-transform: uppercase;
      letter-spacing: 0.1em;
    }

    .logs-table-card {
      margin-top: 1rem;
      border-radius: var(--radius-md);
      border: 1px solid rgba(143, 123, 255, 0.42);
      background: rgba(5, 8, 20, 0.9);
      overflow: hidden;
    }

    .logs-table-card h2 {
      margin: 0;
      padding: 0.85rem 1rem;
      font-size: 0.78rem;
      text-transform: uppercase;
      letter-spacing: 0.15em;
      color: var(--accent-soft);
      border-bottom: 1px solid rgba(143, 123, 255, 0.28);
      background: rgba(7, 11, 28, 0.95);
    }

    .section-header-inline {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 0.8rem;
      flex-wrap: wrap;
    }

    .inline-stat {
      display: inline-flex;
      align-items: baseline;
      gap: 0.5rem;
      text-transform: none;
      letter-spacing: normal;
      color: var(--text-main);
    }

    .inline-stat .n {
      font-size: clamp(1.05rem, 2.2vw, 1.4rem);
      line-height: 1;
      color: var(--accent);
      font-weight: 700;
      text-shadow: 0 0 14px rgba(79, 243, 255, 0.35);
    }

    .inline-stat .t {
      font-size: 0.78rem;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.1em;
    }

    .table-wrap {
      overflow: auto;
      max-height: calc(100vh - 260px);
    }

    .steps-table {
      width: 100%;
      min-width: 860px;
      border-collapse: collapse;
      font-size: 0.9rem;
    }

    .steps-table th,
    .steps-table td {
      text-align: left;
      vertical-align: top;
      padding: 0.62rem 0.72rem;
      border-bottom: 1px solid rgba(79, 243, 255, 0.18);
    }

    .steps-table th {
      position: sticky;
      top: 0;
      z-index: 1;
      font-size: 0.68rem;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: rgba(154, 160, 198, 0.95);
      background: rgba(10, 16, 40, 0.98);
    }

    .steps-table tbody tr:hover {
      background: rgba(79, 243, 255, 0.06);
    }

    .step-cell {
      padding: 0 !important;
    }

    .step-grid {
      width: 100%;
      min-width: 680px;
      border-collapse: collapse;
      font-size: 0.86rem;
      background: transparent;
    }

    .step-grid td {
      width: 33.33%;
      padding: 0.6rem 0.66rem;
      border-bottom: 1px dashed rgba(143, 123, 255, 0.25);
      vertical-align: top;
    }

    .step-grid td.col-mid {
      width: 92px;
      min-width: 92px;
      padding: 0;
      position: relative;
      overflow: visible;
      vertical-align: middle;
    }

    .col-mid-inner {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%) rotate(-90deg);
      transform-origin: center;
      display: inline-flex;
      gap: 0.4rem;
      white-space: nowrap;
      align-items: normal;
      flex-direction: column;
    }

    .col-mid-inner .v {
      white-space: nowrap;
      word-break: normal;
      text-align: right;
    }

    .step-grid tr:last-child td {
      border-bottom: 0;
    }

    .step-grid .k {
      color: var(--text-muted);
      font-size: 0.66rem;
      text-transform: uppercase;
      letter-spacing: 0.11em;
      margin-bottom: 0.1rem;
    }

    .step-grid .v {
      line-height: 1.35;
      word-break: break-word;
      color: var(--text-main);
    }

    .step-grid .user-badge {
      background: rgba(79, 243, 255, 0.09);
      color: var(--text-main);
    }

    .step-grid .v-winner .user-badge {
      color: #79ffd7;
      border-color: rgba(121, 255, 215, 0.42);
    }

    .step-grid .v-vs .user-badge {
      color: #ff9595;
      border-color: rgba(255, 149, 149, 0.42);
    }

    .step-grid .v-with .user-badge {
      color: #9ec7ff;
      border-color: rgba(158, 199, 255, 0.42);
    }

    .step-empty {
      color: rgba(154, 160, 198, 0.48);
    }

    .badge {
      display: inline-flex;
      align-items: center;
      border-radius: var(--radius-pill);
      padding: 0.18rem 0.58rem;
      border: 1px solid rgba(79, 243, 255, 0.42);
      font-size: 0.66rem;
      text-transform: uppercase;
      letter-spacing: 0.11em;
      background: rgba(5, 8, 20, 0.82);
      color: var(--accent);
    }

    .badge.mode-solo {
      border-color: rgba(79, 243, 255, 0.55);
      color: var(--accent);
    }

    .badge.mode-ffa {
      border-color: rgba(255, 184, 108, 0.6);
      color: var(--accent-warm);
    }

    .badge.mode-team {
      border-color: rgba(255, 107, 156, 0.52);
      color: #ff8cb8;
    }

    .log-view {
      font-family: Consolas, "Courier New", monospace;
      letter-spacing: 0.02em;
      word-break: break-all;
      white-space: normal;
    }

    .bonus {
      display: inline-flex;
      align-items: center;
      border-radius: 6px;
      padding: 0.16rem 0;
      font-weight: 700;
      background: rgba(70, 70, 70, 0.25);
    }

    .bonus-red {
      color: #ff9292;
      background: rgba(185, 77, 77, 0.23);
    }

    .bonus-green {
      color: #7ddf88;
      background: rgba(29, 100, 45, 0.26);
    }

    .bonus-gray {
      color: #bcc5df;
      background: rgba(154, 160, 198, 0.2);
    }

    .bonus-left {
      border-top-right-radius: 0;
      border-bottom-right-radius: 0;
      padding-right: 0;
    }

    .bonus-right {
      border-top-left-radius: 0;
      border-bottom-left-radius: 0;
      padding-left: 0;
    }

    .empty {
      padding: 1rem;
      color: var(--text-muted);
      font-size: 0.9rem;
    }

    .foot {
      margin-top: 0.9rem;
      color: rgba(154, 160, 198, 0.75);
      font-size: 0.74rem;
      text-align: center;
      text-transform: uppercase;
      letter-spacing: 0.11em;
    }

    .foot .foot-links {
      justify-content: center;
      gap: 1.1rem;
    }

    .ranking-table {
      width: 100%;
      min-width: 620px;
      border-collapse: collapse;
      font-size: 0.88rem;
    }

    .ranking-table th,
    .ranking-table td {
      text-align: left;
      padding: 0.58rem 0.72rem;
      border-bottom: 1px solid rgba(79, 243, 255, 0.18);
      vertical-align: middle;
    }

    .ranking-table th {
      font-size: 0.68rem;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: rgba(154, 160, 198, 0.95);
      background: rgba(10, 16, 40, 0.98);
      position: sticky;
      top: 0;
      z-index: 1;
    }

    .ranking-table th:nth-child(4),
    .ranking-table th:nth-child(5) {
      text-align: right;
    }

    .ranking-table td:nth-child(1) {
      width: 56px;
      color: var(--text-muted);
    }

    .ranking-table td:nth-child(4),
    .ranking-table td:nth-child(5) {
      text-align: right;
    }

    .ranking-table td:nth-child(3),
    .ranking-table td:nth-child(4) {
      font-size: 0.8rem;
      color: var(--text-muted);
    }

    .emas-value {
      color: #7cffca;
      font-size: 1rem;
      font-weight: 700;
      text-shadow: 0 0 14px rgba(124, 255, 202, 0.28);
    }

    @media (max-width: 960px) {
      .summary-layout {
        grid-template-columns: 1fr;
      }

      .logs-hero-layout {
        grid-template-columns: 1fr;
      }

      .logs-hero-media {
        display: none;
      }
    }

    @media (max-width: 1100px) {
      .nav-toggle {
        display: inline-flex;
      }

      .nav-menu {
        margin-left: auto;
      }

      .nav-menu .nav-links {
        position: absolute;
        top: 100%;
        right: 0;
        z-index: 12;
        min-width: 240px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0.2rem;
        margin-top: 0;
        padding: 0.65rem;
        border-radius: 12px;
        border: 1px solid rgba(79, 243, 255, 0.35);
        background: rgba(7, 11, 28, 0.98);
        box-shadow: 0 10px 32px rgba(2, 4, 12, 0.55);
      }

      .nav-menu .nav-links .nav-links-row {
        display: contents;
      }

      .nav-menu .nav-links .nav-links-row.top a:nth-child(1) {
        order: 1;
      }

      .nav-menu .nav-links .nav-links-row.top a:nth-child(2) {
        order: 2;
      }

      .nav-menu .nav-links .nav-links-row.top a:nth-child(3) {
        order: 3;
      }

      .nav-menu .nav-links .nav-links-row.bottom a:nth-child(1) {
        order: 4;
      }

      .nav-menu .nav-links .nav-links-row.bottom a:nth-child(2) {
        order: 5;
      }

      .nav-menu .nav-links .nav-links-row.bottom a:nth-child(3) {
        order: 6;
      }

      .nav-menu .nav-links .nav-links-row.bottom a:nth-child(4) {
        order: 7;
      }

      .nav-menu .nav-links .nav-links-row.top a:nth-child(4) {
        order: 8;
      }

      .nav-menu .nav-links .nav-links-row.bottom a {
        margin-left: 0.9rem;
        padding-left: 0.55rem;
        border-left: 2px solid rgba(79, 243, 255, 0.35);
      }

      .nav-menu .nav-links a {
        width: 100%;
      }

      .nav-menu:hover .nav-links,
      .nav-menu.is-open .nav-links,
      .nav-menu .nav-links:focus-within {
        display: flex;
      }
    }

    @media (max-width: 760px) {
      .logs-page main {
        padding: 1rem;
      }

      .logs-page .nav-inner {
        gap: 0.55rem;
      }

      .logs-hero {
        padding: 1rem;
      }

      .logs-actions {
        align-items: flex-start;
      }

      .logs-hero .nav-cta {
        width: 100%;
        margin-left: 0;
      }

      .table-wrap {
        overflow-x: visible;
        max-height: none;
      }

      .steps-table {
        min-width: 0;
        font-size: 0.85rem;
      }

      .ranking-table {
        min-width: 0;
      }

      .steps-table th,
      .steps-table td {
        padding: 0.5rem;
      }

      .steps-table > thead > tr > th:first-child,
      .steps-table > tbody > tr > td:first-child {
        width: 40px;
        min-width: 40px;
        text-align: center;
      }

      .step-grid {
        min-width: 0;
      }

      .step-grid tbody,
      .step-grid tr {
        display: block;
      }

      .step-grid td {
        display: block;
        width: 100%;
      }

      .step-grid td.col-mid {
        width: 100%;
        min-width: 0;
        padding: 0.45rem 0.66rem;
      }

      .col-mid-inner {
        position: static;
        transform: none;
        white-space: normal;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
      }

      .col-mid-inner .v {
        white-space: normal;
      }
    }

    @media (max-width: 640px) {
      .nav-logo-text h1 {
        font-size: 0.74rem;
      }

      .nav-logo-text p {
        font-size: 0.68rem;
      }
    }

/* ========================= */
/*  TOURNAMENTS PAGE         */
/* ========================= */

body.tournaments-page {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at 10% -10%, rgba(79, 243, 255, 0.14), transparent 38%),
    radial-gradient(circle at 85% 0%, rgba(143, 123, 255, 0.16), transparent 42%),
    radial-gradient(circle at 50% 120%, rgba(255, 184, 108, 0.1), transparent 40%),
    linear-gradient(180deg, #070b1c 0%, #050814 100%);
  color: #f5f7ff;
}

.tournaments-page .container {
  margin: 0 auto;
  width: min(1200px, 100%);
  padding: 5.5rem 1.5rem 2rem;
}

.tournaments-page #overview,
.tournaments-page #registration,
.tournaments-page #group,
.tournaments-page #elimination,
.tournaments-page #playoffs {
  scroll-margin-top: 88px;
}


.tournaments-page .meta {
  margin: 0 0 20px;
  color: #9aa0c6;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.tournaments-page .toolbar {
  background: rgba(5, 8, 20, 0.9);
  border: 1px solid rgba(79, 243, 255, 0.35);
  border-radius: 14px;
  padding: 12px 16px;
  margin: 0 0 14px;
  box-shadow: 0 0 18px rgba(79, 243, 255, 0.22);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.tournaments-page .registration-layout,
.tournaments-page .group-stage-layout,
.tournaments-page .elimination-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.tournaments-page .group-stage-layout,
.tournaments-page .elimination-layout {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: start;
}

.tournaments-page .registration-block {
  min-width: 0;
}

.tournaments-page .registration-controls .toolbar {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.tournaments-page .registration-block .toolbar {
  margin: 0;
}

.tournaments-page .toolbar label {
  color: #9aa0c6;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 600;
}

.tournaments-page .toolbar select,
.tournaments-page .toolbar button {
  font: inherit;
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  border: 1px solid rgba(79, 243, 255, 0.5);
  background: radial-gradient(circle at top left, rgba(79, 243, 255, 0.15), rgba(5, 8, 20, 0.95));
  color: #f5f7ff;
}

.tournaments-page .toolbar button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(79, 243, 255, 0.4);
}

.tournaments-page .panel,
.tournaments-page .text-panel {
  background: rgba(5, 8, 20, 0.92);
  border: 1px solid rgba(143, 123, 255, 0.35);
  border-radius: 14px;
  margin-bottom: 18px;
  overflow: hidden;
  box-shadow: 0 0 18px rgba(143, 123, 255, 0.22);
}

.tournaments-page .text-panel {
  border-color: rgba(79, 243, 255, 0.35);
  padding: 12px 16px;
  box-shadow: 0 0 18px rgba(79, 243, 255, 0.22);
}

.tournaments-page .panel h2 {
  margin: 0;
  padding: 12px 16px;
  background: linear-gradient(90deg, rgba(79, 243, 255, 0.14), rgba(143, 123, 255, 0.14));
  border-bottom: 1px solid rgba(79, 243, 255, 0.28);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #4ff3ff;
}

.tournaments-page .summary-box {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 184, 108, 0.35);
  border-radius: 10px;
  background: rgba(255, 184, 108, 0.08);
}

.tournaments-page #tournamentSummaryBox {
  width: 100%;
  flex: 1 1 100%;
  box-sizing: border-box;
}

.tournaments-page #tournamentSummary {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
}

.tournaments-page .hero-panel {
  margin-bottom: 1rem;
  border: 1px solid rgba(79, 243, 255, 0.35);
  border-radius: 14px;
  padding: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(79, 243, 255, 0.15), transparent 45%),
    radial-gradient(circle at 88% 12%, rgba(143, 123, 255, 0.18), transparent 48%),
    linear-gradient(145deg, rgba(5, 8, 20, 0.96), rgba(7, 11, 28, 0.96));
  box-shadow: 0 0 18px rgba(79, 243, 255, 0.22);
  overflow: hidden;
}

.tournaments-page .hero-panel-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: stretch;
}

.tournaments-page .hero-panel-media {
  min-height: 220px;
  background-image: url("../img/molkkyPuchar.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.tournaments-page .hero-panel-content {
  min-width: 0;
  padding: 1rem 1.1rem;
}

.tournaments-page .hero-kicker,
.tournaments-page .rule-intro {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  color: #4ff3ff;
}

.tournaments-page .hero-subtitle,
.tournaments-page .panel-body p,
.tournaments-page .intro-with-cup p {
  color: #c8cdea;
}

.tournaments-page .panel-body {
  padding: 0.9rem 1rem 1rem;
}

.tournaments-page .svg-wrap {
  width: 100%;
  min-height: 140px;
}

.tournaments-page .svg-wrap object {
  display: block;
  width: 100%;
  border: 0;
  background: rgba(5, 8, 20, 0.82);
}

.tournaments-page .feature-list {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.48rem;
}

.tournaments-page .feature-list li {
  margin: 0;
  padding: 0.6rem 0.72rem 0.6rem 1.1rem;
  border: 1px solid rgba(79, 243, 255, 0.24);
  border-radius: 10px;
  background: rgba(79, 243, 255, 0.06);
  position: relative;
  line-height: 1.46;
}

.tournaments-page .feature-list li::before {
  content: "";
  position: absolute;
  top: 0.95rem;
  left: 0.42rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ff3ff;
  box-shadow: 0 0 10px rgba(79, 243, 255, 0.8);
}

.tournaments-page .ordered-list {
  margin: 0.65rem 0 0;
  padding-left: 1.25rem;
}

.tournaments-page .ordered-list > li {
  margin-bottom: 0.48rem;
  padding-left: 0.2rem;
}

.tournaments-page .ordered-list--compact {
  margin-top: 0.45rem;
}

@media (max-width: 960px) {
  .tournaments-page .hero-panel-layout {
    grid-template-columns: 1fr;
  }

  .tournaments-page .hero-panel-media {
    display: none;
  }
}

@media (max-width: 760px) {
  .tournaments-page .container {
    padding: 5rem 1rem 1.2rem;
  }

  .tournaments-page .registration-layout,
  .tournaments-page .group-stage-layout,
  .tournaments-page .elimination-layout {
    grid-template-columns: 1fr;
  }

  .tournaments-page .toolbar {
    padding: 10px 12px;
  }

  .tournaments-page #overview,
  .tournaments-page #registration,
  .tournaments-page #group,
  .tournaments-page #elimination,
  .tournaments-page #playoffs {
    scroll-margin-top: 98px;
  }
}

/* Tournaments page refinements after inline-style migration */
.tournaments-page a {
  color: #4ff3ff;
}

.tournaments-page a:hover {
  color: #ffb86c;
}

.tournaments-page .text-panel h3 {
  margin: 0 0 10px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #4ff3ff;
}

.tournaments-page .text-panel ul {
  margin: 0;
  padding-left: 18px;
}

.tournaments-page .text-panel li {
  margin: 6px 0;
}

.tournaments-page .summary-box p {
  margin: 0;
  line-height: 1.5;
  color: #f5f7ff;
}

.tournaments-page .summary-details {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 184, 108, 0.35);
}

.tournaments-page .summary-points {
  margin: 8px 0 0;
  padding-left: 1.1rem;
}

.tournaments-page .summary-points li {
  margin-bottom: 0.35rem;
  color: #f5f7ff;
}

.tournaments-page .summary-standings-title {
  margin-bottom: 8px;
}

.tournaments-page .group-stage-layout .panel,
.tournaments-page .group-stage-layout .text-panel,
.tournaments-page .elimination-layout .panel,
.tournaments-page .elimination-layout .text-panel {
  margin-bottom: 0;
}

.tournaments-page .group-stage-matrix .svg-wrap,
.tournaments-page .elimination-matrix .svg-wrap {
  min-height: 0;
}

.tournaments-page .group-stage-matrix .svg-wrap {
  display: flex;
  justify-content: flex-start;
}

.tournaments-page .group-stage-matrix .svg-wrap object {
  width: 90%;
  max-width: 90%;
  margin: 0 auto;
}

.tournaments-page .hero-subtitle {
    margin-bottom: 1.6rem;
    margin-top: -.6rem;
    font-size: 0.92rem;
    color: #f5f7ff;
}

.tournaments-page .panel-body p {
  margin-top: 0;
  line-height: 1.5;
}

.tournaments-page .intro-with-cup {
  display: flow-root;
  gap: 14px;
  align-items: flex-start;
}

.tournaments-page .intro-with-cup p {
  margin-top: 0;
  line-height: 1.28;
  margin-bottom: 0.8rem;
}

.tournaments-page .cup-image {
  width: 220px;
  float: left;
  height: auto;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid rgba(79, 243, 255, 0.25);
  box-shadow: 0 0 20px rgba(79, 243, 255, 0.2);
  margin-right: 14px;
  margin-bottom: 8px;
}

.tournaments-page ol,
.tournaments-page ul {
  color: #d5daf5;
}

.tournaments-page li {
  margin-bottom: 0.35rem;
}

.tournaments-page .rule-intro {
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  color: #9aa0c6;
}

@media (max-width: 1100px) {
  .tournaments-page .nav-menu .nav-links .nav-links-row.top a:nth-child(1) { order: 1; }
  .tournaments-page .nav-menu .nav-links .nav-links-row.top a:nth-child(2) { order: 2; }
  .tournaments-page .nav-menu .nav-links .nav-links-row.bottom a:nth-child(1) { order: 3; }
  .tournaments-page .nav-menu .nav-links .nav-links-row.bottom a:nth-child(2) { order: 4; }
  .tournaments-page .nav-menu .nav-links .nav-links-row.bottom a:nth-child(3) { order: 5; }
  .tournaments-page .nav-menu .nav-links .nav-links-row.bottom a:nth-child(4) { order: 6; }
  .tournaments-page .nav-menu .nav-links .nav-links-row.bottom a:nth-child(5) { order: 7; }
  .tournaments-page .nav-menu .nav-links .nav-links-row.top a:nth-child(3) { order: 8; }
  .tournaments-page .nav-menu .nav-links .nav-links-row.top a:nth-child(4) { order: 9; }
}

@media (max-width: 760px) {
  .tournaments-page .cup-image {
    float: none;
    width: min(260px, 100%);
    margin-right: 0;
    margin-bottom: 12px;
  }
}

