:root {
  --ink: #061512;
  --reed: #08201b;
  --panel: #0d2b25;
  --panel-soft: #12382f;
  --water: #1e8092;
  --water-deep: #0f5365;
  --mint: #7ee0a8;
  --green: #46c28f;
  --gold: #f2c14e;
  --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;
}

/* Frameless asset wheel */
.casting-wheel-panel {
  width: min(560px, 100%);
  max-height: calc(100vh - 24px);
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: auto;
}

.casting-wheel-panel > h2 {
  margin: 0 0 4px;
  color: var(--cream);
  font-size: clamp(1.7rem, 5vw, 2.7rem);
  line-height: 1;
  text-align: center;
}

.casting-wheel-panel .casting-wheel-eyebrow { margin: 0; text-align: center; }
.casting-wheel-stage { margin: 6px 0 4px; }

.casting-wheel {
  width: min(440px, 78vw);
  border-width: 9px;
  background: conic-gradient(#e8843a 0 60deg, #176777 60deg 120deg, #f2c14e 120deg 180deg, #286a50 180deg 240deg, #c5543b 240deg 300deg, #529f7b 300deg 360deg);
}

.casting-wheel > span {
  width: 70px;
  height: 70px;
  margin: -35px;
  transform: rotate(calc(var(--slot) * 60deg + 30deg)) translateY(-158px) rotate(calc(var(--slot) * -60deg - 30deg));
  border: 0;
  background: transparent;
}

.casting-wheel > span img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.4));
}

.casting-wheel-result:empty { display: none; }
.casting-wheel-result:not(:empty) {
  min-height: 0;
  max-width: 470px;
  padding: 10px 16px;
  border-top: 1px solid rgba(242, 193, 78, 0.4);
}

@media (max-width: 600px) {
  .casting-wheel-panel { gap: 9px; }
  .casting-wheel { width: min(330px, 82vw); }
  .casting-wheel > span {
    width: 54px;
    height: 54px;
    margin: -27px;
    transform: rotate(calc(var(--slot) * 60deg + 30deg)) translateY(-117px) rotate(calc(var(--slot) * -60deg - 30deg));
  }
  .casting-wheel > span img { width: 43px; height: 43px; }
}

/* Captain's Compass bonus wheel */
body.wheel-open { overflow: hidden; }

.casting-wheel-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 15, 13, 0.92);
  backdrop-filter: blur(10px);
  animation: wheelFadeIn 0.25s ease-out;
}

.casting-wheel-modal.is-closing { opacity: 0; transition: opacity 0.22s ease; }

.casting-wheel-panel {
  width: min(940px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(330px, 1.1fr);
  gap: 34px;
  align-items: center;
  padding: 34px;
  border: 1px solid rgba(126, 224, 168, 0.34);
  border-radius: 8px;
  background: #0b2822;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
}

.casting-wheel-eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.casting-wheel-copy h2 {
  margin: 0;
  color: var(--cream);
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

.casting-wheel-intro { margin: 16px 0 22px; color: var(--muted); line-height: 1.55; }

.casting-wheel-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.casting-wheel-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cream);
  font-size: 0.78rem;
  font-weight: 800;
}

.casting-wheel-legend span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border: 1px solid rgba(242, 193, 78, 0.5);
  border-radius: 50%;
  color: var(--gold);
}

.casting-wheel-stage { position: relative; display: grid; justify-items: center; gap: 14px; }

.casting-wheel {
  position: relative;
  width: min(370px, 72vw);
  aspect-ratio: 1;
  border: 10px solid #173f35;
  border-radius: 50%;
  background: conic-gradient(#e8843a 0 60deg, #176777 60deg 120deg, #f2c14e 120deg 180deg, #286a50 180deg 240deg, #c5543b 240deg 300deg, #529f7b 300deg 360deg);
  box-shadow: 0 0 0 3px var(--gold), 0 20px 45px rgba(0, 0, 0, 0.4);
  transition: transform 3s cubic-bezier(0.12, 0.65, 0.18, 1);
}

.casting-wheel::after {
  content: "BB";
  position: absolute;
  inset: 36%;
  display: grid;
  place-items: center;
  border: 4px solid var(--gold);
  border-radius: 50%;
  background: #09211c;
  color: var(--cream);
  font-size: 1.15rem;
  font-weight: 900;
}

.casting-wheel > span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px;
  transform: rotate(calc(var(--slot) * 60deg + 30deg)) translateY(-135px) rotate(calc(var(--slot) * -60deg - 30deg));
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(5, 20, 17, 0.84);
  color: #fff;
  font-weight: 900;
}

.casting-wheel-pointer {
  position: absolute;
  z-index: 2;
  top: -8px;
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 34px solid var(--cream);
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.4));
}

.casting-wheel-spin,
.casting-wheel-continue {
  min-height: 46px;
  padding: 10px 22px;
  border: 0;
  border-radius: 6px;
  background: var(--gold);
  color: #1e1505;
  cursor: pointer;
  font: 900 0.82rem var(--font-body);
}

.casting-wheel-spin:disabled { cursor: wait; opacity: 0.65; }
.casting-wheel-continue { background: var(--mint); }

.casting-wheel-result { min-height: 62px; text-align: center; }
.casting-wheel-result small,
.casting-wheel-result strong,
.casting-wheel-result span { display: block; }
.casting-wheel-result small { color: var(--muted); font-size: 0.7rem; text-transform: uppercase; }
.casting-wheel-result strong { margin-top: 3px; color: var(--gold); font-size: 1.15rem; }
.casting-wheel-result span { max-width: 430px; margin-top: 4px; color: var(--cream); font-size: 0.8rem; }

@keyframes wheelFadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 720px) {
  .casting-wheel-modal { padding: 10px; }
  .casting-wheel-panel { max-height: calc(100vh - 20px); grid-template-columns: 1fr; gap: 20px; padding: 20px 16px; }
  .casting-wheel-copy h2 { font-size: 2rem; }
  .casting-wheel-intro { margin: 10px 0 14px; font-size: 0.86rem; }
  .casting-wheel-legend { gap: 6px 10px; }
  .casting-wheel-legend li { font-size: 0.68rem; }
  .casting-wheel { width: min(286px, 72vw); border-width: 7px; }
  .casting-wheel > span { transform: rotate(calc(var(--slot) * 60deg + 30deg)) translateY(-103px) rotate(calc(var(--slot) * -60deg - 30deg)); }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #061512 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,
.footer-links {
  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: #12382f;
  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;
}

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

.legal-stack article h2 {
  margin-bottom: 9px;
  color: var(--cream);
  font-size: 1.04rem;
}

.legal-stack article p {
  color: var(--muted);
  line-height: 1.72;
}

.legal-stack article a {
  color: var(--mint);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.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: block;
  margin-top: auto;
  padding: 0 32px;
  color: var(--muted);
  background: rgba(5, 17, 15, 0.96);
  border-top: 1px solid var(--line);
}

.footer-disclosure {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.footer-owner {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 18px 36px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.footer-owner strong {
  color: var(--cream);
  font-size: 0.9rem;
}

.footer-owner span,
.footer-notices p {
  font-size: 0.78rem;
  line-height: 1.65;
}

.footer-notices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.footer-notices p {
  padding: 20px 22px;
  border-right: 1px solid var(--line);
}

.footer-notices p:first-child { padding-left: 0; }
.footer-notices p:last-child { padding-right: 0; border-right: 0; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0 20px;
}

@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;
  }

  .footer-notices {
    grid-template-columns: 1fr;
  }

  .footer-notices p,
  .footer-notices p:first-child,
  .footer-notices p:last-child {
    padding: 14px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .footer-notices p:last-child { border-bottom: 0; }
}

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

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

  .footer-owner {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .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);
  }
}

/* Final frameless asset-wheel overrides */
.casting-wheel-modal { overflow:hidden; padding:clamp(8px,2vh,20px); }
.casting-wheel-panel { width:min(560px,calc(100vw - 24px)); max-height:none; grid-template-columns:1fr; justify-items:center; gap:12px; padding:0; border:0; background:transparent; box-shadow:none; overflow:visible; }
.casting-wheel-panel > h2 { margin:0 0 4px; color:var(--cream); font-size:clamp(1.7rem,5vw,2.7rem); line-height:1; text-align:center; }
.casting-wheel-panel .casting-wheel-eyebrow { margin:0; text-align:center; }
.casting-wheel-stage { margin:6px 0 4px; }
.casting-wheel { width:min(440px,78vw,calc(100vh - 235px)); border-width:9px; }
.casting-wheel > span { width:70px; height:70px; margin:-35px; transform:rotate(calc(var(--slot) * 60deg + 30deg)) translateY(-158px) rotate(calc(var(--slot) * -60deg - 30deg)); border:0; background:transparent; }
.casting-wheel > span img { width:56px; height:56px; object-fit:contain; filter:drop-shadow(0 3px 3px rgba(0,0,0,.4)); }
.casting-wheel-result:empty { display:none; }
.casting-wheel-result:not(:empty) { min-height:0; max-width:470px; padding:10px 16px; border-top:1px solid rgba(242,193,78,.4); }
@media (max-width:600px) {
  .casting-wheel-panel { gap:9px; padding:0; }
  .casting-wheel { width:min(330px,82vw,calc(100vh - 220px)); }
  .casting-wheel > span { width:54px; height:54px; margin:-27px; transform:rotate(calc(var(--slot) * 60deg + 30deg)) translateY(-117px) rotate(calc(var(--slot) * -60deg - 30deg)); }
  .casting-wheel > span img { width:43px; height:43px; }
}
