:root {
  --ink: #15303e;
  --reed: #204654;
  --panel: #234f5b;
  --panel-soft: #286575;
  --water: #3c97b0;
  --water-deep: #76bfc2;
  --mint: #cbb373;
  --green: #46c28f;
  --gold: #c3784a;
  --orange: #e8843a;
  --cream: #f4ecd2;
  --muted: #9fb8a9;
  --line: rgba(244, 236, 210, 0.14);
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.34);
  --radius: 10px;
  --font-body: "Trebuchet MS", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #15303e 0%, #09211c 48%, #05110f 100%);
  color: var(--cream);
  font-family: var(--font-body);
}

a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 32px;
  background: rgba(6, 21, 18, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: #221303;
  box-shadow: 0 0 24px rgba(242, 193, 78, 0.36);
  font-size: 0.8rem;
}

.site-nav,
.site-footer div {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.site-nav a,
.site-footer a {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a:hover,
.site-footer a:hover { color: var(--mint); }

.lang-switcher {
  position: relative;
}

.lang-button {
  display: inline-flex;
  min-width: 68px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(126, 224, 168, 0.28);
  border-radius: 8px;
  color: var(--cream);
  background: rgba(18, 56, 47, 0.72);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
}

.lang-button:hover,
.lang-button[aria-expanded="true"] {
  border-color: var(--mint);
  background: var(--panel-soft);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  display: none;
  width: 168px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b2822;
  box-shadow: var(--shadow);
}

.lang-menu.open { display: block; }

.lang-option {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--cream);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.lang-option:last-child { border-bottom: 0; }
.lang-option:hover { background: rgba(126, 224, 168, 0.1); }
.lang-option.active { color: var(--mint); background: rgba(126, 224, 168, 0.08); }
.lang-flag { font-size: 1rem; }

main { flex: 1; }

.game-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 28px;
}

.dock-copy {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
  column-gap: 40px;
  align-items: end;
  max-width: none;
  margin-bottom: 14px;
}

.dock-copy .eyebrow,
.dock-copy h1 { grid-column: 1; }

.dock-copy h1 {
  margin-bottom: 0;
  font-size: 3.5rem;
}

.dock-copy > p:last-child {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin-bottom: 4px;
}

.game-frame {
  width: min(100%, calc((100vh - 190px) * 1.6129));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(126, 224, 168, 0.28);
  border-radius: var(--radius);
  background: #0d4f61;
  box-shadow: var(--shadow);
}

.game-frame canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1000 / 620;
  touch-action: none;
  cursor: crosshair;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 6vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  color: var(--mint);
  font-size: 1.2rem;
}

p {
  color: var(--muted);
  line-height: 1.72;
}

.game-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.score-panel,
.control-panel,
.info-card,
.notice-box,
.legal-stack article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 43, 37, 0.88);
  box-shadow: var(--shadow);
}

.score-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.stat {
  min-height: 72px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(6, 21, 18, 0.56);
  border: 1px solid rgba(126, 224, 168, 0.12);
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: 5px;
  color: var(--gold);
  font-size: 1.7rem;
  line-height: 1;
}

.difficulty {
  display: grid;
  gap: 7px;
}

button {
  font: inherit;
}

.diff-btn,
.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
}

.diff-btn {
  min-height: 34px;
  color: var(--muted);
  background: rgba(244, 236, 210, 0.06);
  border: 1px solid rgba(244, 236, 210, 0.12);
}

.diff-btn.active {
  color: #0b1b16;
  background: var(--mint);
}

.water-stage {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #73c4c5 0%, var(--water) 40%, var(--water-deep) 100%);
  box-shadow: var(--shadow);
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 460px;
  cursor: crosshair;
}

.game-message {
  position: absolute;
  left: 16px;
  bottom: 16px;
  max-width: calc(100% - 32px);
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--cream);
  background: rgba(6, 21, 18, 0.7);
  border: 1px solid rgba(244, 236, 210, 0.18);
  font-weight: 800;
}

.control-panel {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.control-panel p {
  margin: 0 0 0 auto;
  font-size: 0.9rem;
}

.primary-btn,
.secondary-btn {
  min-width: 130px;
  min-height: 44px;
  color: #1f1404;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 10px 24px rgba(232, 132, 58, 0.24);
}

.secondary-btn {
  color: var(--cream);
  background: linear-gradient(135deg, var(--green), #1b907a);
}

.after-game {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto 42px;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.info-card,
.notice-box,
.legal-stack article {
  padding: 22px;
}

.explanation-block {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 22px;
  padding: 28px 0;
}

.explanation-block + .explanation-block {
  border-top: 1px solid var(--line);
}

.section-number {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.story-block {
  padding-left: 12%;
}

.editorial-grid {
  width: min(1080px, calc(100% - 32px));
  margin: 18px auto 48px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px 32px;
  align-items: start;
}

.editorial-grid h2 {
  color: var(--cream);
  font-size: 1.55rem;
}

.section-label {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-feature {
  grid-column: 1 / span 7;
  grid-row: 1 / span 2;
  padding: 34px 44px 34px 0;
  border-top: 3px solid var(--gold);
  border-bottom: 1px solid var(--line);
}

.guide-feature h2 {
  max-width: 590px;
  font-size: 2rem;
}

.guide-feature p:not(.section-label) {
  max-width: 650px;
}

.story-feature {
  grid-column: 8 / -1;
  padding: 28px 0 20px;
  border-top: 1px solid var(--line);
}

.home-contact {
  grid-column: 7 / -1;
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(0, 1.3fr);
  gap: 24px;
  padding: 25px;
  background: #286575;
  border-left: 3px solid var(--mint);
}

.home-contact h2 {
  margin-bottom: 0;
  font-size: 1.15rem;
}

.home-contact-links {
  display: grid;
  gap: 10px;
}

.home-contact-links a {
  min-width: 0;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.home-contact-links a:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.home-contact-links span,
.home-contact-links strong {
  display: block;
}

.home-contact-links span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.home-contact-links strong {
  margin-top: 3px;
  color: var(--mint);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.page-main,
.legal-main,
.team-main,
.contact-main {
  width: min(1000px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
}

.team-main {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  gap: 42px;
  width: min(1100px, calc(100% - 32px));
}

.team-intro {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: end;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.team-intro h1,
.contact-heading h1 { margin-bottom: 0; }

.team-intro > p { margin-bottom: 0; }

.crew-list { display: grid; }

.crew-member {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.crew-member:first-child { padding-top: 0; }

.crew-initials {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(242, 193, 78, 0.45);
  border-radius: 50%;
  color: var(--gold);
  font-weight: 900;
}

.crew-role {
  margin-bottom: 4px;
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.crew-member h2 { margin-bottom: 6px; }
.crew-member p:last-child { margin-bottom: 0; }

.team-note {
  align-self: start;
  padding: 24px;
  border-left: 3px solid var(--gold);
  background: rgba(13, 43, 37, 0.65);
}

.text-link {
  color: var(--mint);
  font-weight: 900;
  text-decoration: none;
}

.contact-main { width: min(920px, calc(100% - 32px)); }

.contact-heading {
  max-width: 760px;
  padding-bottom: 30px;
}

.contact-directory { border-top: 1px solid var(--line); }

.contact-route {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 22px;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.contact-route > span {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 900;
}

.contact-route h2 { margin-bottom: 5px; }
.contact-route p { margin-bottom: 8px; }
.contact-route strong { color: var(--cream); overflow-wrap: anywhere; }
.contact-route:hover h2 { color: var(--gold); }

.contact-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 34px;
  background: var(--line);
  border: 1px solid var(--line);
}

.contact-meta div {
  min-width: 0;
  padding: 18px;
  background: var(--reed);
}

.contact-meta span,
.contact-meta strong,
.contact-meta a { display: block; }

.contact-meta span {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-meta a {
  color: var(--mint);
  font-weight: 900;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.page-hero {
  padding: 36px 0 26px;
}

.page-hero.compact {
  padding-bottom: 10px;
}

.page-hero h1 {
  max-width: 760px;
}

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

.legal-stack {
  display: grid;
  gap: 14px;
}

.notice-box {
  color: var(--cream);
  background: rgba(242, 193, 78, 0.14);
  border-color: rgba(242, 193, 78, 0.32);
  font-weight: 800;
}

.last-updated {
  font-size: 0.9rem;
  font-style: italic;
}

.contact-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.contact-card {
  min-width: 0;
  padding: 14px;
  border-radius: 8px;
  background: rgba(6, 21, 18, 0.45);
  border: 1px solid rgba(244, 236, 210, 0.1);
}

.contact-card span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-card a {
  display: inline-block;
  margin-top: 5px;
  color: var(--mint);
  font-weight: 800;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding: 20px 32px;
  color: var(--muted);
  background: rgba(5, 17, 15, 0.96);
  border-top: 1px solid var(--line);
}

@media (max-width: 860px) {
  .dock-copy {
    grid-template-columns: 1fr;
  }

  .dock-copy > p:last-child {
    grid-column: 1;
    grid-row: auto;
    margin-top: 10px;
  }

  .game-layout,
  .after-game,
  .content-grid,
  .team-main,
  .team-intro {
    grid-template-columns: 1fr;
  }

  .team-intro { gap: 14px; }

  .contact-meta { grid-template-columns: 1fr; }

  .editorial-grid {
    grid-template-columns: 1fr 1fr;
  }

  .guide-feature {
    grid-column: 1 / -1;
    grid-row: auto;
    padding-right: 0;
  }

  .story-feature { grid-column: 1; }

  .home-contact {
    grid-column: 2;
    grid-template-columns: 1fr;
  }

  .score-panel {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .control-panel {
    grid-column: auto;
    flex-wrap: wrap;
  }

  .control-panel p {
    flex-basis: 100%;
    margin-left: 0;
  }

  .contact-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .difficulty {
    grid-template-columns: 1fr;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
  }

  .explanation-block {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
  }

  .story-block { padding-left: 0; }

  .editorial-grid { grid-template-columns: 1fr; }

  .story-feature,
  .home-contact { grid-column: 1; }

  .guide-feature { padding-top: 24px; }

  .game-shell {
    width: calc(100% - 16px);
    padding-top: 22px;
  }

  .game-frame {
    width: 100%;
    overflow-x: auto;
  }

  .game-frame canvas {
    width: max(100%, 720px);
  }
}

/* unique-domain-style: zudradutiwyq.info; template: 8; organic river palette */
