:root {
  --sky: #e0f4ff;
  --canvas: #f5fbff;
  --sand: #fff8e4;
  --sand-border: #efd38e;
  --navy: #0e356d;
  --navy-deep: #071e42;
  --ink: #0f2744;
  --muted: #45607d;
  --cyan: #0ea5e9;
  --cyan-soft: #bae6fd;
  --straw: #e63946;
  --straw-dark: #b91c1c;
  --gold: #facc15;
  --card: #ffffff;
  --border: #c8def4;
  --radius: 16px;
  --radius-sm: 10px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.66;
  color: var(--ink);
  background: linear-gradient(180deg, #dff3ff 0%, #f5fbff 320px, #f7fbff 100%);
  overflow-x: clip;
  max-width: 100%;
}

img { max-width: 100%; height: auto; display: block; }
a { color: #0369a1; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 8px 0;
  font-weight: 700;
}
.skip-link:focus { left: 12px; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 16px;
}

/* Header */
.site-header {
  background: var(--navy);
  color: #fff;
  border-bottom: 3px solid var(--cyan);
}

.header-inner {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-block: 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--cyan-soft); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.site-nav a {
  color: #e0f2fe;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 7px 12px;
  border-radius: 999px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  padding: 10px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: #fff;
  border-radius: 2px;
}

@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 10px 12px; }
}

/* Main */
.site-main {
  padding-block: 14px 56px;
}

/* Hero / Game Zone */
.hero-zone {
  padding-bottom: 22px;
}

.hero-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 10px;
}

.hero-title-group h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.15;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.hero-sub {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  max-width: 72ch;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
}

/* Desktop 2-column Hero Grid */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 16px;
  align-items: start;
}

.stage-col { min-width: 0; }

.hero-aside {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 15px;
  box-shadow: 0 6px 0 rgba(14, 53, 109, 0.08);
}

.hero-aside h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 7px;
}

.aside-controls {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aside-controls li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #ebf4fc;
  font-size: 0.84rem;
}

.aside-controls li:last-child { border-bottom: 0; padding-bottom: 0; }
.aside-action { color: var(--muted); font-weight: 600; }

.aside-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1.5px solid #e2eefb;
}

.aside-links a {
  flex: 1 1 auto;
  text-align: center;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
  background: #edf6ff;
  border: 1px solid var(--border);
  padding: 5px 8px;
  border-radius: 8px;
}

.aside-links a:hover { background: var(--sky); }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* Stage */
.stage-shell {
  position: relative;
  border: 3px solid var(--navy);
  border-radius: var(--radius);
  background: var(--navy-deep);
  box-shadow: 0 8px 0 rgba(14, 53, 109, 0.14);
  overflow: hidden;
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 62%, #0e356d 100%);
  overflow: hidden;
}

.stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #0e356d;
}

.stage:fullscreen, [data-gf-frame]:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  border: 0;
  border-radius: 0;
}

[data-gf-cover] {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

[data-gf-cover] img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-scrim {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 24px;
  margin: 10px;
  text-align: center;
  border-radius: var(--radius);
  background: rgba(7, 30, 66, 0.72);
  backdrop-filter: blur(4px);
  border: 2px solid rgba(186, 230, 253, 0.45);
}

.cover-caption {
  margin: 0;
  color: #e0f2fe;
  font-size: 0.86rem;
  font-weight: 600;
}

[data-gf-play] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 12px 26px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ef4444 0%, var(--straw) 100%);
  color: #fff;
  font-size: 1.04rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 5px 0 var(--straw-dark), 0 10px 24px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

[data-gf-play]:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--straw-dark), 0 14px 28px rgba(0, 0, 0, 0.4);
}

[data-gf-play]:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--straw-dark);
}

[data-gf-loading] {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 60%, #0e356d 100%);
}

[data-gf-frame][data-gf-state="loading"] [data-gf-loading] {
  display: flex;
}

[data-gf-frame][data-gf-state="loading"] [data-gf-cover],
[data-gf-frame][data-gf-state="playing"] [data-gf-cover],
[data-gf-frame][data-gf-state="playing"] [data-gf-loading] {
  display: none;
}

/* Custom Ocean + Striped Straw Loader */
.sip-rig {
  position: relative;
  width: 90px;
  height: 90px;
}

.sip-cup {
  position: absolute;
  bottom: 6px;
  left: 11px;
  width: 68px;
  height: 58px;
  border-radius: 10px 10px 18px 18px;
  border: 3.5px solid #fff;
  background: rgba(14, 53, 109, 0.35);
  overflow: hidden;
}

.sip-water {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 0;
  height: 75%;
  background: linear-gradient(180deg, #7dd3fc 0%, #0284c7 100%);
  border-top: 4px solid #e0f2fe;
  animation: sipDrain 1.6s ease-in-out infinite alternate;
}

.sip-straw {
  position: absolute;
  top: 2px;
  right: 20px;
  width: 12px;
  height: 60px;
  border-radius: 6px;
  border: 2px solid #fff;
  transform: rotate(18deg);
  background: repeating-linear-gradient(
    -35deg,
    #ef4444 0 7px,
    #ffffff 7px 14px
  );
  animation: strawBob 0.9s ease-in-out infinite alternate;
}

.loader-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
}

.loader-sub {
  margin: 0;
  font-size: 0.88rem;
  color: #e0f2fe;
}

@keyframes sipDrain {
  0% { height: 78%; transform: translateY(0); }
  100% { height: 24%; transform: translateY(2px); }
}

@keyframes strawBob {
  0% { transform: rotate(16deg) translateY(0); }
  100% { transform: rotate(20deg) translateY(-4px); }
}

/* Action Bar */
.action-bar {
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.action-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #f8fcff;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, transform 0.1s ease;
}

.btn-action:hover {
  background: #e0f2fe;
  border-color: var(--cyan);
}

.btn-action[data-gf-liked],
.btn-action[aria-pressed="true"] {
  background: #fee2e2;
  border-color: var(--straw);
  color: var(--straw-dark);
}

.btn-share-sm {
  min-height: 40px;
  padding: 6px 10px;
  font-size: 0.8rem;
}

.share-msg {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0369a1;
}

.btn-fullscreen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--navy-deep);
}

.btn-fullscreen:hover { background: #164993; }

@media (max-width: 640px) {
  .action-bar { padding: 9px; }
  .action-group:last-child, .btn-fullscreen { width: 100%; }
  .cover-scrim { padding: 10px 14px; gap: 5px; margin: 8px; }
  .cover-caption { font-size: 0.76rem; }
  [data-gf-play] { min-height: 44px; padding: 9px 18px; font-size: 0.94rem; }
}

@media (max-width: 440px) {
  .cover-caption { display: none; }
}

/* Sections & Content */
.content-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.panel {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 28px);
}

.panel-sand {
  background: var(--sand);
  border-color: var(--sand-border);
}

.panel h2 {
  margin: 0 0 12px;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  line-height: 1.25;
  color: var(--navy);
}

.panel h3 {
  margin: 18px 0 8px;
  font-size: 1.08rem;
  color: var(--navy);
}

.panel p { margin: 0 0 12px; max-width: 74ch; }
.panel p:last-child { margin-bottom: 0; }

.lead-answer {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  background: #eff8ff;
  border-left: 4px solid var(--cyan);
  padding: 11px 14px;
  border-radius: 0 10px 10px 0;
  margin-bottom: 14px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

@media (max-width: 780px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.mini-card {
  background: #f8fcff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.mini-card h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  color: var(--navy);
}

.mini-card p { margin: 0; font-size: 0.94rem; color: var(--muted); }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 9px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy-deep);
  font-size: 0.78rem;
  font-weight: 800;
}

/* Gameplay Figure */
.hud-figure {
  margin: 16px 0 0;
  background: #f8fcff;
  border: 2px solid var(--navy);
  border-radius: 14px;
  overflow: hidden;
}

.hud-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 780 / 516;
  object-fit: cover;
}

.hud-figure figcaption {
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--muted);
  background: #fff;
  border-top: 1.5px solid var(--border);
}

/* Controls Table */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 12px;
}

.controls-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  background: #fff;
}

.controls-table th, .controls-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #e2eefb;
}

.controls-table th {
  background: var(--navy);
  color: #fff;
  font-weight: 700;
}

.controls-table tr:last-child td { border-bottom: 0; }

kbd {
  display: inline-block;
  padding: 2px 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82em;
  font-weight: 700;
  color: var(--navy);
  background: #edf6ff;
  border: 1.5px solid #b8d4f2;
  border-radius: 6px;
  white-space: nowrap;
}

/* Ocean Progression Strip */
.ocean-track {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ocean-pill {
  padding: 7px 13px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--navy);
}

/* Tips list */
.tip-list {
  margin: 10px 0 0;
  padding-left: 20px;
}
.tip-list li { margin-bottom: 8px; }
.tip-list li:last-child { margin-bottom: 0; }

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.faq-item {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f9fcff;
  overflow: hidden;
}

.faq-item summary {
  padding: 13px 16px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 800;
  color: #0369a1;
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "−"; }

.faq-answer {
  padding: 10px 16px 14px;
  color: var(--ink);
  border-top: 1px solid #e2eefb;
}

/* Comments */
.comments-panel .comments-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.comment-count-badge {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  background: #f8fcff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
}

.reply-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 11px;
  background: #e0f2fe;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
}

.comment-form[data-gf-replying] .reply-banner { display: flex; }

.reply-cancel-btn {
  border: 1px solid var(--navy);
  background: #fff;
  color: var(--navy);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.comment-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.comment-input, .comment-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.comment-input { max-width: 280px; }
.comment-textarea { min-height: 82px; resize: vertical; }

.comment-form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.btn-submit {
  min-height: 42px;
  padding: 9px 20px;
  border: 0;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.btn-submit:hover { background: #164993; }

.comment-msg {
  font-size: 0.88rem;
  font-weight: 600;
  color: #0369a1;
}

[data-gf-comments] {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

[data-gf-comments][data-gf-off] { display: none; }

[data-gf-comments][data-gf-empty]::before {
  content: "No shore comments yet. Tell fellow players how far your Ocean Drunk % reached or share a starter tip!";
  display: block;
  padding: 16px;
  background: var(--sand);
  border: 1.5px dashed var(--sand-border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 0.94rem;
  text-align: center;
}

.comment-item, .reply-item {
  padding: 12px 14px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
}

[data-gf-owner] {
  background: #fefce8;
  border-color: #eab308;
}

[data-gf-c-owner] {
  display: none;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy-deep);
  font-size: 0.74rem;
  font-weight: 800;
}

[data-gf-owner] > .comment-head [data-gf-c-owner],
[data-gf-owner] .comment-head [data-gf-c-owner] {
  display: inline-flex;
}

.comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 0.86rem;
}

.comment-author { font-weight: 800; color: var(--navy); }
.comment-time { color: var(--muted); font-size: 0.8rem; }
.comment-to { font-weight: 700; color: #0369a1; }
.comment-body { margin: 0 0 8px; font-size: 0.95rem; word-break: break-word; }

.reply-btn {
  border: 1px solid var(--border);
  background: #f0f8ff;
  color: var(--navy);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.comment-replies {
  margin-top: 10px;
  padding-left: 14px;
  border-left: 3px solid var(--cyan-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Subpages & Legal */
.prose-page {
  max-width: 820px;
  margin-inline: auto;
}

.prose-page h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  color: var(--navy);
}

.prose-meta {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: var(--muted);
}

.prose-body h2 {
  margin: 24px 0 8px;
  font-size: 1.25rem;
  color: var(--navy);
}

.prose-body p, .prose-body ul, .prose-body ol {
  margin: 0 0 12px;
}

.prose-body ul, .prose-body ol { padding-left: 20px; }

.error-box {
  max-width: 640px;
  margin: 40px auto;
  text-align: center;
}

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: #cbd5e1;
  padding-block: 28px;
  border-top: 3px solid var(--cyan);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-brand strong {
  color: #fff;
  font-size: 1.05rem;
}

.footer-brand p {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: #bae6fd;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-links a {
  color: #e0f2fe;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.footer-links a:hover { text-decoration: underline; }

.footer-copy {
  margin: 0;
  font-size: 0.82rem;
  color: #94a3b8;
}
