/* Main CSS for Jay and Gabi's Wedding Website */
/*
 * The stylesheet is organized from general to specific rules. Each section is
 * labeled so you can quickly find the styles that influence a given component.
 * Shared variables appear first, followed by reset rules, core typography,
 * component-specific styles, and finally responsive tweaks.
 */

:root {
  /* Global design tokens such as colors and fonts used throughout the site */
  --header-height: 80px;
  --emerald: #355845;
  --emerald-dark: #274a3e;
  --emerald-light: #8FE3B0;
  --gold: #D4AF37;
  --gold-light: #F5D76E;
  --gold-dark: #B8860B;
  --white: #FFFFFF;
  --off-white: #F9F9F9;
  --light-gray: #EEEEEE;
  --medium-gray: #999999;
  --dark-gray: #333333;
  --black: #000000;
  --font-primary: 'Cormorant Garamond', serif;
  --font-secondary: 'Montserrat', sans-serif;
}

/* Reset spacing and box sizing so layouts behave predictably across browsers */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

/* Set default typography, spacing, and colors for the page content */
body {
  padding-top: var(--header-height); /* offset for fixed header */
  font-family: var(--font-secondary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark-gray);
  background-color: var(--white);
}

/* Display headings in the serif wedding font for a classic feel */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 400;
  color: var(--dark-gray);
  margin-bottom: 1rem;
}

h1 {
  font-size: 3.5rem;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
}

h2:after {
  content: '';
  position: absolute;
  width: 60px;
  height: 3px;
  background-color: var(--gold);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

h3 {
  font-size: 2rem;
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--emerald);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--emerald-dark);
}

/* Utility class to limit content width while keeping margins responsive */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.home-page .section {
  padding: 72px 0;
}

.home-page .section-title {
  margin-bottom: 40px;
}

/* Button variants used for calls-to-action around the site */
.btn {
  display: inline-block;
  min-height: 44px;
  padding: 12px 30px;
  background-color: var(--emerald);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-family: var(--font-secondary);
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: var(--emerald-dark);
  color: var(--white);
}

.btn-gold {
  background-color: var(--gold);
}

.btn-gold:hover {
  background-color: var(--gold-dark);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--emerald);
  color: var(--emerald);
}

.btn-outline:hover {
  background-color: var(--emerald);
  color: var(--white);
}

/* Disabled CTA state used during pre-launch mode. */
.btn-disabled,
.btn:disabled {
  background-color: var(--medium-gray) !important;
  border-color: var(--medium-gray) !important;
  color: var(--white) !important;
  cursor: not-allowed;
  opacity: 0.8;
  pointer-events: none;
}

/* Header & Navigation
 * Fixed header sits on top of every page with a mobile hamburger toggle. */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgb(253, 251, 244);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: var(--header-height);
  padding: 0 10px;
}

.logo {
  font-family: var(--font-primary);
  font-size: 1.8rem;
  color: var(--dark-gray);
}

.logo span {
  color: var(--emerald);
}

.logo-image {
  max-height: var(--header-height);
  width: auto;
}

img {
  max-width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  color: var(--dark-gray);
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 30px;
}

nav ul li a {
  font-family: var(--font-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--dark-gray);
  transition: all 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--gold);
}

/* Hero Section
 * Full-viewport welcome area with countdown and CTA button. */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  background-color: var(--light-gray);
  background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('../images/hero-placeholder.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  position: relative;
}

@supports (min-height: 100dvh) {
  .hero {
    min-height: 100dvh;
  }
}

.hero-content {
  max-width: 800px;
  padding: 0 20px;
  z-index: 1;
}

.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 20px;
  color: var(--white);
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: 30px;
}

.date-display {
  font-family: var(--font-primary);
  font-size: 2rem;
  margin-bottom: 30px;
  letter-spacing: 2px;
}

.countdown {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.countdown-item {
  margin: 0 15px;
  min-width: 80px;
}

.countdown-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 5px;
}

.countdown-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Hero subtitle color highlights invitation text in gold */
.hero-content h3 {
  color: var(--gold);
}

/* Our Story Section
 * Timeline component showing relationship milestones. */
.our-story {
  background-color: var(--white);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background-color: var(--gold-light);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--white);
  border: 4px solid var(--emerald);
  border-radius: 50%;
  top: 15px;
  z-index: 1;
}

.timeline-item:nth-child(odd) {
  left: 0;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-item:nth-child(odd)::after {
  right: -10px;
}

.timeline-item:nth-child(even)::after {
  left: -10px;
}

.timeline-content {
  padding: 20px;
  background-color: var(--off-white);
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.timeline-date {
  font-family: var(--font-primary);
  font-size: 1.2rem;
  color: var(--emerald);
  margin-bottom: 10px;
}

.timeline-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

/* Photo Gallery
 * Reusable grid for imagery across multiple pages. */
.gallery {
  background-color: var(--off-white);
}

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

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  height: 300px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Wedding Details
 * Cards describing logistics for the wedding day. */
.wedding-details {
  background-color: var(--white);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 40px;
}

.detail-card {
  text-align: center;
  padding: 30px;
  background-color: var(--off-white);
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.detail-card:hover {
  transform: translateY(-5px);
}

.detail-icon {
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 20px;
}

.detail-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

/* Registry
 * Three-column layout highlighting registry destinations. */
.registry {
  background-color: var(--off-white);
}

.registry-text {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px;
}

.registry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 30px;
}

.registry-item {
  text-align: center;
  padding: 30px;
  background-color: var(--white);
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.registry-item:hover {
  transform: translateY(-5px);
}

.registry-logo {
  height: 80px;
  margin-bottom: 20px;
  object-fit: contain;
}

/* Accommodations
 * Hotel cards and travel info tiles. */
.accommodations {
  background-color: var(--white);
}

.hotel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 30px;
}

.hotel-card {
  background-color: var(--off-white);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hotel-image {
  height: 200px;
  overflow: hidden;
}

.hotel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hotel-card:hover .hotel-image img {
  transform: scale(1.05);
}

.hotel-info {
  padding: 20px;
}

.hotel-name {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.hotel-distance {
  color: var(--emerald);
  margin-bottom: 10px;
  font-weight: 500;
}

.hotel-description {
  margin-bottom: 15px;
}

/* RSVP Section
 * Styles for the interactive RSVP form and validation states. */
.rsvp {
  background-color: var(--off-white);
}

.rsvp-form {
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--white);
  padding: 40px;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  font-size: 1rem;
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--emerald);
}

.form-control.error {
  border-color: #e74c3c;
}

.radio-group {
  display: flex;
  gap: 20px;
}

.radio-option {
  display: flex;
  align-items: center;
}

.radio-option input {
  margin-right: 8px;
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-submit {
  text-align: center;
  margin-top: 30px;
}

/* Page Title Banner
 * Shared hero banner used at the top of subpages. */
.page-banner {
  position: relative;
  height: 40vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
}

.page-title-container {
  position: relative;
  z-index: 2;
  display: inline-block;
  text-align: center;
  padding: 5px 10px;
  border-radius: 8px;
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.page-title-container h1 {
  color: var(--white);
  margin: 0 0 5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-title-container p {
  margin: 0;
  font-size: 1.2rem;
}

/* Remove box around page titles
 * The original design used a frosted effect; these overrides keep things
 * clean while retaining the same markup for flexibility. */
.page-title-container {
  background-color: transparent !important;
  border: none !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

/* Shared layout classes
 * These classes replace rigid inline layouts so breakpoints can reflow
 * content cleanly on smaller screens while preserving desktop visuals. */
.welcome-cta-group {
  margin: 40px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.welcome-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.home-story-section {
  background-color: var(--off-white);
}

.home-story-intro {
  text-align: center;
  margin-bottom: 32px;
}

.home-teaser-gallery {
  grid-template-columns: repeat(3, 1fr);
}

.split-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

.split-layout-item {
  flex: 1;
  min-width: 300px;
}

.schedule-list {
  max-width: 800px;
  margin: 0 auto;
}

.schedule-row {
  display: flex;
  margin-bottom: 30px;
  align-items: flex-start;
}

.schedule-row:last-child {
  margin-bottom: 0;
}

.schedule-time {
  min-width: 120px;
  text-align: right;
  padding-right: 20px;
  border-right: 2px solid var(--gold);
  padding-top: 5px;
}

.schedule-time h4 {
  margin: 0;
  color: var(--emerald);
}

.schedule-content {
  padding-left: 20px;
}

.schedule-content h3 {
  margin-bottom: 10px;
}

.map-embed {
  height: 400px;
  background-color: #eee;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 30px;
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.card-surface {
  background-color: var(--white);
  padding: 25px;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.honeymoon-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto;
}

.honeymoon-card {
  flex: 1 1 300px;
  min-width: 300px;
  background-color: var(--off-white);
  padding: 30px;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.honeymoon-icon {
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 20px;
}

.engagement-photo-row {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.engagement-photo-card {
  flex: 1 1 360px;
  max-width: 400px;
}

.engagement-photo {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Footer
 * Closing section with thank-you note and subtle social styling. */
footer {
  background-color: var(--dark-gray);
  color: var(--white);
  padding: 40px 0;
  text-align: center;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.footer-logo {
  font-family: var(--font-primary);
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--white);
}

.footer-logo span {
  color: var(--gold);
}

.footer-text {
  margin-bottom: 30px;
}

.social-links {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  margin: 0 10px;
  color: var(--white);
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.social-link:hover {
  background-color: var(--emerald);
  color: var(--white);
}

.copyright {
  font-size: 0.9rem;
  color: var(--medium-gray);
}

/* Responsive Styles
 * Breakpoints gradually reduce spacing and reflow navigation/sections. */
@media (max-width: 992px) {
  h1 {
    font-size: 3rem;
  }
  
  h2 {
    font-size: 2.2rem;
  }
  
  .hero h1 {
    font-size: 3.5rem;
  }
  
  .countdown-item {
    min-width: 70px;
  }
  
  .countdown-number {
    font-size: 2rem;
  }
  
  .page-title-container {
    display: inline-block;
    text-align: center;
    padding: 5px 10px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 72px;
  }

  .section {
    padding: 60px 0;
  }

  .home-page .section {
    padding: 54px 0;
  }

  .home-page .section-title {
    margin-bottom: 34px;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .hero h1 {
    font-size: 3rem;
  }
  
  .hero p {
    font-size: 1.2rem;
  }
  
  .date-display {
    font-size: 1.5rem;
  }
  
  .nav-toggle {
    display: block;
  }
  
  nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: max-height 0.3s ease;
  }
  
  nav.active {
    max-height: calc(100vh - var(--header-height));
    max-height: calc(100dvh - var(--header-height));
  }

  body.nav-open {
    overflow: hidden;
  }
  
  nav ul {
    flex-direction: column;
    padding: 20px;
  }
  
  nav ul li {
    margin: 0 0 15px 0;
  }

  nav ul li a {
    display: block;
    min-height: 44px;
    padding: 10px 0;
  }
  
  .timeline::after {
    left: 31px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  
  .timeline-item:nth-child(even) {
    left: 0;
  }
  
  .timeline-item:nth-child(odd)::after,
  .timeline-item:nth-child(even)::after {
    left: 21px;
  }
  
  .page-title-container {
    display: inline-block;
    text-align: center;
    padding: 5px 10px;
  }

  .page-banner {
    height: 34vh;
    min-height: 220px;
  }

  .home-teaser-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .details-grid,
  .gallery-grid,
  .hotel-grid,
  .cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .split-layout {
    gap: 30px;
  }

  .split-layout-item {
    min-width: 0;
    flex-basis: 100%;
  }

  .schedule-row {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
  }

  .schedule-time {
    min-width: 0;
    text-align: left;
    padding: 0 0 0 12px;
    border-right: none;
    border-left: 3px solid var(--gold);
  }

  .schedule-content {
    padding-left: 0;
  }

  .map-embed {
    height: 300px;
  }

  .honeymoon-card {
    flex: 1 1 calc(50% - 15px);
    min-width: 240px;
  }

  .engagement-photo-card {
    max-width: 100%;
  }
}

@media (max-width: 576px) {
  :root {
    --header-height: 68px;
  }

  .section {
    padding: 50px 0;
  }

  .home-page .section {
    padding: 44px 0;
  }

  .home-page .section-title {
    margin-bottom: 28px;
  }
  
  h1 {
    font-size: 2.2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }

  .page-banner {
    height: 30vh;
    min-height: 190px;
  }
  
  .countdown {
    flex-wrap: wrap;
  }
  
  .countdown-item {
    margin: 10px;
  }
  
  .rsvp-form {
    padding: 30px 20px;
  }
  
  .radio-group {
    flex-direction: column;
    gap: 10px;
  }
  
  .page-title-container {
    display: inline-block;
    text-align: center;
    padding: 5px 10px;
  }
  
  .page-title-container p {
    font-size: 1rem;
  }

  .details-grid,
  .gallery-grid,
  .hotel-grid,
  .registry-grid,
  .cards-grid,
  .info-grid,
  .home-teaser-gallery {
    grid-template-columns: 1fr;
  }

  .welcome-cta-group {
    margin: 30px 0;
    flex-direction: column;
    gap: 12px;
  }

  .welcome-cta-group .btn {
    width: min(100%, 320px);
    text-align: center;
  }

  .map-embed {
    height: 250px;
  }

  .honeymoon-card {
    flex-basis: 100%;
    min-width: 0;
  }

  .engagement-photo-row {
    margin-top: 30px;
  }

  .engagement-photo {
    height: 240px;
  }
}

/* Game Page
 * A playful arcade-style section for the wedding runner mini-game. */
.game-page {
  background: linear-gradient(180deg, #f8fbff 0%, #f7f4ea 55%, #ffffff 100%);
}

.game-banner {
  background-position: center 35%;
}

.game-section {
  padding-top: 70px;
}

.game-shell {
  max-width: 980px;
  margin: 0 auto;
  background: linear-gradient(180deg, #ffffff 0%, #f8f5ec 100%);
  border: 1px solid rgba(53, 88, 69, 0.14);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(39, 74, 62, 0.12);
  padding: 30px;
}

.game-hud {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 14px;
}

.game-label {
  margin-bottom: 6px;
  color: var(--emerald-dark);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.game-message {
  margin-bottom: 0;
  font-size: 1rem;
  color: var(--dark-gray);
}

.game-time-wrap {
  text-align: right;
}

.game-time {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 2.3rem;
  line-height: 1;
  color: var(--emerald-dark);
}

.game-progress {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  color: var(--emerald-dark);
  font-size: 0.82rem;
  font-weight: 600;
}

.game-progress-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(53, 88, 69, 0.14);
  box-shadow: inset 0 0 0 1px rgba(53, 88, 69, 0.18);
}

.game-progress-fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--emerald));
  transition: width 0.16s linear;
}

.game-canvas-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(39, 74, 62, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
  background: #c9e8ff;
  touch-action: manipulation;
}

#wedding-runner-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1100 / 460;
}

.game-actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.game-rules {
  margin-top: 18px;
  text-align: center;
  color: #3e5349;
}

.game-rules p {
  margin-bottom: 10px;
}

.game-rules kbd {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  background: #fff;
  font-family: var(--font-secondary);
  font-size: 0.82rem;
  font-weight: 600;
}

.maze-section-title {
  margin-top: 56px;
  margin-bottom: 32px;
}

.maze-shell {
  background: linear-gradient(180deg, #fcfdff 0%, #f4f8fb 100%);
}

.maze-checklist-wrap {
  margin-bottom: 14px;
}

.maze-item-count {
  color: var(--gold-dark);
  margin-left: 6px;
}

.maze-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.maze-item-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(53, 88, 69, 0.2);
  background: #ffffff;
  color: #40574c;
  padding: 6px 14px;
  font-size: 0.86rem;
  font-weight: 600;
}

.maze-item-chip.collected {
  background: rgba(143, 227, 176, 0.28);
  border-color: rgba(39, 117, 78, 0.45);
  color: #205339;
}

.maze-canvas-wrap {
  background: #d0dce7;
  border-color: rgba(46, 78, 99, 0.28);
}

#wedding-maze-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 31 / 21;
}

.maze-actions {
  margin-top: 16px;
}

.maze-touch-controls {
  display: none;
  margin: 16px auto 0;
  width: fit-content;
  grid-template-columns: repeat(3, 58px);
  grid-template-rows: repeat(2, 58px);
  gap: 10px;
}

.maze-control {
  border: 1px solid rgba(53, 88, 69, 0.25);
  border-radius: 10px;
  background: #ffffff;
  color: #2a493b;
  font-size: 1.25rem;
  font-weight: 700;
  touch-action: manipulation;
}

.maze-control:active {
  transform: translateY(1px);
}

.maze-control-up {
  grid-column: 2;
  grid-row: 1;
}

.maze-control-left {
  grid-column: 1;
  grid-row: 2;
}

.maze-control-down {
  grid-column: 2;
  grid-row: 2;
}

.maze-control-right {
  grid-column: 3;
  grid-row: 2;
}

@media (max-width: 768px) {
  .game-shell {
    padding: 20px;
  }

  .game-hud {
    flex-direction: column;
    align-items: flex-start;
  }

  .game-time-wrap {
    text-align: left;
  }

  .game-time {
    font-size: 1.9rem;
  }

  .game-progress {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .game-progress span {
    font-size: 0.78rem;
  }

  .maze-section-title {
    margin-top: 42px;
    margin-bottom: 24px;
  }

  .maze-touch-controls {
    display: grid;
  }
}

@media (max-width: 576px) {
  .game-shell {
    padding: 16px;
    border-radius: 10px;
  }

  .game-label {
    font-size: 0.78rem;
  }

  .game-message {
    font-size: 0.95rem;
  }

  .game-rules {
    text-align: left;
  }

  .maze-checklist {
    gap: 8px;
  }

  .maze-item-chip {
    padding: 5px 12px;
    font-size: 0.8rem;
  }
}
