/* =========================================================
   THE MIDLAND MIXER — stylesheet (modern / sleek)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');
/* Ancient-scroll menu theme, used only within Walter's overlay
   (#walter-overlay-inner) — additive fonts, doesn't touch the site's
   own --display/--body fonts used everywhere else, including the
   other game on this same page. */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=EB+Garamond:wght@400;500;600&display=swap');

:root{
  --bg:        #F5F6F8;
  --surface:   #FFFFFF;
  --surface-2: #EFF1F5;
  --ink:       #14181F;
  --muted:     #667085;
  --border:    #E4E7EC;

  --blue:   #2851E3;
  --blue-ink: #1B3AA8;
  --red:    #E5484D;
  --yellow: #F6B93B;
  --green:  #12B76A;
  --green-ink: #0E9058;

  --display: 'Space Grotesk', sans-serif;
  --body:    'Inter', sans-serif;
  --mono:    'JetBrains Mono', monospace;

  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;

  --shadow-sm: 0 1px 2px rgba(20,24,31,0.06), 0 1px 1px rgba(20,24,31,0.04);
  --shadow-md: 0 10px 30px -12px rgba(20,24,31,0.25);
  --shadow-lg: 0 24px 60px -20px rgba(20,24,31,0.35);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin:0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; }
img{ max-width:100%; display:block; }
button{ font-family: inherit; }

/* -------------------- Logo mark -------------------- */
.mark{
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

/* -------------------- Header / nav -------------------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner{
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 24px;
  display:flex;
  align-items:center;
  gap:16px;
  position: relative;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color: var(--ink);
  margin-right:auto;
}
.brand-title{
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}
.main-nav{
  display:flex;
  gap: 4px;
}
.main-nav a{
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration:none;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.15s ease, color .15s ease;
}
.main-nav a:hover,
.main-nav a:focus-visible{
  color: var(--ink);
  background: var(--surface-2);
  outline: none;
}
.main-nav a.active{
  background: var(--ink);
  color: var(--surface);
}
.main-nav a.cta{
  background: var(--blue);
  color: var(--surface);
}
.main-nav a.cta:hover{ background: var(--blue-ink); }

.nav-toggle{
  display:none;
  align-items:center;
  justify-content:center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  flex-shrink: 0;
  color: var(--ink);
}
.nav-toggle:hover{ background: var(--surface-2); }
.nav-toggle svg{ width: 20px; height: 20px; }
.nav-toggle .icon-close{ display: none; }
.nav-toggle.open .icon-menu{ display: none; }
.nav-toggle.open .icon-close{ display: block; }

@media (max-width: 760px){
  .nav-toggle{ display: flex; }

  .main-nav{
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: none;
    box-shadow: var(--shadow-md);
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px 16px;
    border-radius: 0 0 var(--r-md) var(--r-md);
  }
  .main-nav.open{ display: flex; }
  .main-nav a{
    width: 100%;
    padding: 13px 14px;
    border-radius: var(--r-sm);
    font-size: 1rem;
  }
  .main-nav a.cta{
    margin-top: 8px;
    text-align: center;
  }
}

/* Game page: no full site nav — brand + one back link only */
.game-back{
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.15s ease, color .15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.game-back:hover,
.game-back:focus-visible{
  color: var(--ink);
  background: var(--surface-2);
  outline: none;
}

/* -------------------- Ticker (updates banner) -------------------- */
.ticker-wrap{
  background: var(--ink);
  overflow: hidden;
  white-space: nowrap;
}
.ticker-track{
  display:inline-block;
  padding: 9px 0;
  animation: ticker 30s linear infinite;
}
.ticker-track span{
  font-family: var(--mono);
  font-weight:600;
  color: var(--surface);
  font-size: 0.82rem;
  letter-spacing: 0.2px;
  margin: 0 2.5rem;
}
.ticker-track span b{ color: var(--yellow); }
@keyframes ticker{
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce){
  .ticker-track{ animation: none; }
  .ticker-wrap{ white-space: normal; padding: 8px 16px; }
  .ticker-track span{ display:block; margin: 4px 0; }
}

/* -------------------- Page shell -------------------- */
.page{
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 90px;
}
.page-head{
  margin-bottom: 36px;
  max-width: 62ch;
}
.page-kicker{
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 8px;
}
.page-title{
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 12px;
}
.page-lede{
  color: var(--muted);
  font-size: 1.02rem;
}

/* -------------------- Event grid -------------------- */
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.card{
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-align: left;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color .16s ease;
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.card:hover, .card:focus-visible{
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #D6DAE2;
  outline: none;
}

.card-top{
  display:flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.card h3{
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.22rem;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.2;
}

.pill{
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.pill.confirmed{ background: #E7F7EF; color: var(--green); }
.pill.rain-delay{ background: #FEF3D6; color: #92650E; }
.pill.canceled{ background: #FCE8E8; color: var(--red); }
.pill.relocated{ background: #E8EDFC; color: var(--blue-ink); }
.pill.going{ background: #E7F7EF; color: var(--green); }
.pill.not-going{ background: var(--surface-2); color: var(--muted); }

.card-meta{
  display:flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.85rem;
  color: var(--muted);
}
.card-meta span{ display:flex; align-items:center; gap:6px; }
.card-meta svg{ width:15px; height:15px; flex-shrink:0; opacity:0.7; }

.card p.desc{
  font-size: 0.9rem;
  color: #3B4350;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-foot{
  margin-top: auto;
  padding-top: 8px;
  display:flex;
  justify-content: space-between;
  align-items:center;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.card-foot .rsvp-tag{ font-weight: 600; }

.empty-note{
  font-family: var(--body);
  color: var(--muted);
  text-align:center;
  padding: 60px 20px;
  grid-column: 1/-1;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
}
.empty-note a{ color: var(--blue); font-weight:600; text-decoration: underline; }

/* -------------------- Modal -------------------- */
.modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(20,24,31,0.5);
  backdrop-filter: blur(3px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.modal-overlay.open{ opacity: 1; pointer-events: auto; }

.modal{
  background: var(--surface);
  border-radius: var(--r-lg);
  max-width: 520px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.18s ease;
  position: relative;
}
.modal-overlay.open .modal{ transform: translateY(0) scale(1); }

.modal-close{
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 1.1rem;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition: background .15s ease;
}
.modal-close:hover, .modal-close:focus-visible{ background: var(--border); outline:none; }

.modal .pill{ margin-bottom: 14px; }
.modal h2{
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  padding-right: 30px;
}
.modal-meta{
  display:flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.modal-meta .row{
  display:flex;
  align-items:center;
  gap: 10px;
  font-size: 0.92rem;
  color: #3B4350;
}
.modal-meta .row svg{ width:17px; height:17px; flex-shrink:0; color: var(--blue); }
.modal-meta .row b{ font-weight: 600; }

.modal .status-note{
  margin-bottom: 18px;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: #FCE8E8;
  color: #A31D22;
  border-left: 3px solid var(--red);
}
.modal.status-rain-delay .status-note{ background:#FEF3D6; color:#7A5300; border-color: var(--yellow); }
.modal.status-relocated .status-note{ background:#E8EDFC; color: var(--blue-ink); border-color: var(--blue); }
.modal.status-confirmed .status-note{ display:none; }

.modal-desc{
  font-size: 0.95rem;
  color: #2B323D;
  margin-bottom: 24px;
}

.rsvp-block{
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 16px 18px;
}
.rsvp-block .rsvp-label{
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.rsvp-buttons{
  display:flex;
  gap: 10px;
}
.rsvp-btn{
  flex:1;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.rsvp-btn:hover{ border-color: #C7CCD6; }
.rsvp-btn.going.selected{
  background: var(--green);
  border-color: var(--green);
  color: var(--surface);
}
.rsvp-btn.not-going.selected{
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}
.rsvp-confirm{
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* -------------------- Lore Letter feed -------------------- */
.lore-feed{ display:flex; flex-direction:column; gap: 18px; }
.entry{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
}
.entry-head{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap: 12px;
  flex-wrap:wrap;
  margin-bottom: 8px;
}
.entry-title{
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.entry-meta{
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
}
.entry-body{
  font-size: 0.94rem;
  color: #3B4350;
  margin:0;
}

.submit-box{
  margin-top: 32px;
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--r-lg);
  padding: 26px 28px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 20px;
  flex-wrap: wrap;
}
.submit-box h3{
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  margin: 0 0 4px;
}
.submit-box p{ margin:0; font-size: 0.88rem; max-width: 44ch; color: #B8BFCC; }

/* -------------------- Buttons -------------------- */
.btn{
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.94rem;
  background: var(--blue);
  color: var(--surface);
  border: none;
  padding: 12px 22px;
  border-radius: var(--r-sm);
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap: 8px;
  transition: background .15s ease, transform .15s ease;
  cursor:pointer;
}
.btn:hover, .btn:focus-visible{
  background: var(--blue-ink);
  outline: none;
}
.btn.light{
  background: var(--surface);
  color: var(--ink);
}
.btn.light:hover{ background: var(--surface-2); }
.btn.green{
  background: var(--green);
  color: var(--surface);
}
.btn.green:hover{ background: var(--green-ink); }
.btn.block{
  width: 100%;
  justify-content: center;
  margin-bottom: 20px;
  border: 1.5px solid var(--border);
}

/* -------------------- Submit Event form -------------------- */
.form-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 40px);
  max-width: 640px;
  box-shadow: var(--shadow-sm);
}
.form-row{
  display:flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.form-row.two-col{
  flex-direction: row;
  gap: 16px;
}
.form-row.two-col > div{ flex:1; display:flex; flex-direction:column; gap:6px; }
.form-row label{
  font-weight: 600;
  font-size: 0.88rem;
}
.form-row .hint{
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 400;
}
input, textarea{
  font-family: var(--body);
  font-size: 0.95rem;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  width: 100%;
}
input:focus, textarea:focus{
  outline: none;
  border-color: var(--blue);
  background: var(--surface);
}
textarea{ resize: vertical; min-height: 110px; }

.form-note{
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 14px;
}

@media (max-width: 520px){
  .form-row.two-col{ flex-direction: column; }
}

/* -------------------- Squad member cards -------------------- */
.member-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px 22px 22px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  display:flex;
  flex-direction: column;
  align-items:center;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.member-card:hover{
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.member-photo{
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
  border: 3px solid var(--surface-2);
  background: var(--surface-2);
}
.member-photo-fallback{
  display:flex;
  align-items:center;
  justify-content:center;
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--surface);
  background: linear-gradient(135deg, var(--blue), var(--red));
}
.member-card h3{
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin: 0;
}
.member-occupation{
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 2px;
}
.member-submeta{
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 6px;
}
.member-bio{
  font-size: 0.88rem;
  color: #3B4350;
  margin: 12px 0 4px;
}
.member-social{
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  display:inline-flex;
  align-items:center;
  gap: 5px;
}
.member-social svg{ width:14px; height:14px; }
.member-social:hover{ color: var(--blue-ink); }

.file-input-wrap{
  border: 1.5px dashed var(--border);
  border-radius: var(--r-sm);
  padding: 14px;
  background: var(--bg);
}

/* -------------------- Chat -------------------- */
.chat-window{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  height: 480px;
  overflow-y: auto;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chat-message{
  max-width: 88%;
}
.chat-message .chat-head{
  display:flex;
  align-items:baseline;
  gap: 8px;
  margin-bottom: 3px;
}
.chat-message .chat-name{
  font-weight: 700;
  font-size: 0.86rem;
}
.chat-message .chat-time{
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}
.chat-message .chat-bubble{
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 9px 13px;
  font-size: 0.92rem;
  color: #2B323D;
  display: inline-block;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-form{
  margin-top: 16px;
  display:flex;
  gap: 10px;
  align-items:flex-start;
}
.chat-form input[name="name"]{
  flex: 0 0 150px;
}
.chat-form input[name="message"]{
  flex: 1;
}
.chat-form button{
  flex-shrink: 0;
}
@media (max-width: 560px){
  .chat-form{ flex-wrap: wrap; }
  .chat-form input[name="name"]{ flex: 1 1 100%; }
}

/* -------------------- RSVPs page -------------------- */
.rsvp-section-title{
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin: 36px 0 16px;
}
.rsvp-section-title:first-child{ margin-top: 0; }

.rsvp-event-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.rsvp-event-head{
  display:flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.rsvp-event-head h3{
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0 0 4px;
}
.rsvp-event-head .card-meta{ margin: 0; }

.rsvp-columns{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
@media (max-width: 520px){
  .rsvp-columns{ grid-template-columns: 1fr; }
}
.rsvp-column h4{
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 0 0 8px;
}
.rsvp-column.going h4{ color: var(--green); }
.rsvp-column.not-going h4{ color: var(--muted); }
.rsvp-names{
  list-style: none;
  margin: 0;
  padding: 0;
  display:flex;
  flex-direction: column;
  gap: 4px;
}
.rsvp-names li{
  font-size: 0.9rem;
  color: #3B4350;
}
.rsvp-names.empty li{
  color: var(--muted);
  font-style: italic;
}

/* -------------------- Leaderboard -------------------- */
.leaderboard-list{
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.leaderboard-list li{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.leaderboard-list li:first-child{ border-radius: var(--r-md) var(--r-md) 0 0; }
.leaderboard-list li:last-child{ border-radius: 0 0 var(--r-md) var(--r-md); }
.leaderboard-list li + li{ border-top: none; }
.leaderboard-rank{
  font-family: var(--mono);
  font-weight: 700;
  color: var(--muted);
  width: 22px;
  flex-shrink: 0;
}
.leaderboard-list li:nth-child(1) .leaderboard-rank{ color: var(--yellow); }
.leaderboard-list li:nth-child(2) .leaderboard-rank{ color: #9CA3AF; }
.leaderboard-list li:nth-child(3) .leaderboard-rank{ color: #B8860B; }
.leaderboard-name{
  flex: 1;
  font-weight: 600;
  font-size: 0.94rem;
}
.leaderboard-scores{
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}
.leaderboard-score{
  font-family: var(--mono);
  font-weight: 700;
  color: var(--blue);
  min-width: 34px;
  text-align: right;
}
.leaderboard-score-doom{
  color: var(--red);
}
.leaderboard-header{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}
.leaderboard-header .leaderboard-rank{ width: 22px; flex-shrink: 0; }
.leaderboard-header .leaderboard-name{ flex: 1; }
.leaderboard-header .leaderboard-scores{ gap: 16px; }
.leaderboard-header .leaderboard-score{ min-width: 34px; text-align: right; }

/* -------------------- Dino Game -------------------- */
.game-wrap{
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
#game-canvas,
#walter-canvas,
#doom-canvas{
  display: block;
  width: 100%;
  height: auto;
  background: var(--surface);
  touch-action: manipulation;
  cursor: pointer;
}
#game-canvas:focus-visible,
#walter-canvas:focus-visible,
#doom-canvas:focus-visible{
  outline: 2.5px solid var(--blue);
  outline-offset: -2px;
}
.game-overlay{
  position: absolute;
  inset: 0;
  background: rgba(20,24,31,0.74);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.game-overlay-inner{
  text-align: center;
  color: var(--surface);
  max-width: 320px;
  width: 100%;
  margin: auto;
}
.game-overlay-inner h3{
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  margin: 0 0 6px;
}
.game-overlay-inner p{
  margin: 0 0 12px;
  color: #D9DDE1;
  font-size: 0.86rem;
  line-height: 1.4;
}
.game-overlay-inner .form-row{ margin-bottom: 10px; }
.game-overlay-inner input{ text-align: center; }
.game-overlay-inner .btn{ margin: 4px; padding: 11px 18px; font-size: 0.88rem; }
.game-overlay-inner .form-note{ color: #D9DDE1; }

/* =========================================================
   WALTER'S ANCIENT-SCROLL MENU THEME
   Scoped entirely to #walter-overlay-inner (ID, not the shared
   .game-overlay-inner class) so this can never affect the other
   game's menus on this same page, which reuse that same class.
   Static cosmetics only — no roll/unroll animation.
   ========================================================= */
#walter-overlay{
  background: rgba(38,26,14,0.72); /* warm torch-lit dark, instead of the site's cool blue-black backdrop */
}
#walter-overlay-inner{
  max-width: 380px;
  padding: 28px 26px 22px;
  border-radius: 6px;
  color: #3A2A18;
  text-align: center;
  background:
    radial-gradient(ellipse at 20% 15%, rgba(120,90,50,0.16), transparent 55%),
    radial-gradient(ellipse at 85% 80%, rgba(120,90,50,0.14), transparent 50%),
    radial-gradient(ellipse at 60% 40%, rgba(160,130,80,0.10), transparent 60%),
    linear-gradient(180deg, #EFE0BC 0%, #E6D3A5 45%, #DFC994 100%);
  box-shadow:
    inset 0 0 0 2px #B89457,
    inset 0 0 0 6px #EFE0BC,
    inset 0 0 0 8px #8A6A3B,
    0 18px 46px -12px rgba(20,12,4,0.55);
}
/* Rolled-dowel caps top and bottom, suggesting a scroll without any
   actual unroll motion or animation. */
#walter-overlay-inner::before,
#walter-overlay-inner::after{
  content: "";
  position: absolute;
  left: -14px;
  right: -14px;
  height: 16px;
  background: linear-gradient(180deg, #9C7A45, #6E5228 55%, #52391A);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.35);
  z-index: -1;
}
#walter-overlay-inner{ position: relative; margin-top: 8px; margin-bottom: 8px; }
#walter-overlay-inner::before{ top: -8px; }
#walter-overlay-inner::after{ bottom: -8px; }

#walter-overlay-inner h3{
  font-family: 'Cinzel', var(--display);
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: 1.35rem;
  color: #5C3E1C;
  text-shadow: 0 1px 0 rgba(255,240,210,0.5);
  margin: 4px 0 10px;
}
#walter-overlay-inner p{
  font-family: 'EB Garamond', var(--body);
  font-size: 0.98rem;
  line-height: 1.5;
  color: #4A3620;
}
#walter-overlay-inner .form-note{ color: #6B5636; font-family: 'EB Garamond', var(--body); }
#walter-overlay-inner input{
  font-family: 'EB Garamond', var(--body);
  background: #F5EACB;
  border: 1.5px solid #B89457;
  color: #3A2A18;
  border-radius: 4px;
}

/* Carved-plaque buttons, replacing the site's flat blue .btn only
   within this scroll — the shared .btn class itself is untouched, so
   every other page on the site keeps its normal button styling. */
#walter-overlay-inner .btn{
  font-family: 'Cinzel', var(--body);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #A9803F, #7C5B2C);
  color: #FBF0D6;
  border: 1px solid #5A3F1C;
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255,235,195,0.35), 0 2px 3px rgba(30,18,6,0.35);
  text-shadow: 0 1px 1px rgba(20,10,0,0.4);
}
#walter-overlay-inner .btn:hover, #walter-overlay-inner .btn:focus-visible{
  background: linear-gradient(180deg, #BD9247, #8C6832);
  outline: none;
}
#walter-overlay-inner .btn.light{
  background: linear-gradient(180deg, #F5EACB, #E5D2A0);
  color: #4A3620;
  border-color: #B89457;
  text-shadow: none;
}
#walter-overlay-inner .btn.light:hover{ background: linear-gradient(180deg, #F9F1DA, #EDDCAE); }
#walter-overlay-inner .btn.green{
  background: linear-gradient(180deg, #5C7A3E, #3F5A28);
  border-color: #2E4319;
}
#walter-overlay-inner .btn.green:hover{ background: linear-gradient(180deg, #6C8C4A, #4A6A30); }

/* Captain's Map — each landmass is a real clickable button now, not
   decoration sitting above a separate list. Opacity-only feedback
   (not a transform/scale) since SVG transform-origin per-element is
   unreliable and this just needs to feel responsive without any risk
   of visibly shifting a landmass out of position on hover. */
.wvw-landmass{ transition: opacity 0.15s ease; }
.wvw-landmass:hover{ opacity: 0.72; }

/* =========================================================
   DOOM SCROLLER'S LATVERIAN THRONE-ROOM THEME
   Scoped entirely to #doom-overlay-inner (ID, not the shared
   .game-overlay-inner class), same isolation approach as Walter's
   scroll skin just above — so this can never affect the other two
   games' menus on this same page.
   ========================================================= */
#doom-overlay{
  background: rgba(14,20,16,0.78); /* cold gunmetal-green, distinct from the other two games' backdrops */
}
#doom-overlay-inner{
  max-width: 380px;
  padding: 26px 26px 22px;
  border-radius: 4px;
  color: #DDE6E0;
  text-align: center;
  background: linear-gradient(180deg, #1F2A22 0%, #14201A 60%, #0E1712 100%);
  box-shadow:
    inset 0 0 0 2px #C9A227,
    inset 0 0 0 4px #14201A,
    0 18px 46px -12px rgba(0,0,0,0.6);
}
#doom-overlay-inner h3{
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.3rem;
  color: #C9A227;
  text-transform: uppercase;
  margin: 4px 0 10px;
}
#doom-overlay-inner p{
  font-size: 0.92rem;
  line-height: 1.5;
  color: #BFCBC4;
}
#doom-overlay-inner .btn{
  background: linear-gradient(180deg, #3A5A42, #223B28);
  border: 1px solid #C9A227;
  color: #EDE6D6;
}
#doom-overlay-inner .btn:hover, #doom-overlay-inner .btn:focus-visible{
  background: linear-gradient(180deg, #46693F, #2C4A32);
  outline: none;
}

@media (max-height: 480px){
  .game-overlay-inner h3{ font-size: 1.1rem; margin-bottom: 4px; }
  .game-overlay-inner p{ font-size: 0.8rem; margin-bottom: 8px; }
  .game-overlay-inner .btn{ padding: 9px 16px; font-size: 0.84rem; margin: 3px; }
}
.game-instructions{
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 14px 0 0;
}

/* -------------------- Footer -------------------- */
.site-footer{
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align:center;
  padding: 28px 20px;
  font-family: var(--body);
  font-size: 0.82rem;
}

/* -------------------- Focus visibility -------------------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 2.5px solid var(--blue);
  outline-offset: 2px;
}
