@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;1,500&display=swap');

:root {
  color-scheme: light;
  --paper: #faf7f0;
  --white: #fffefa;
  --ink: #41494c;
  --muted: #716f6a;
  --blue: #416f8c;
  --blue-soft: #edf2f3;
  --blue-light: #7eaac2;
  --blue-pale: #dce9ef;
  --line: #e7e1d8;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 78% 18%, rgba(215, 232, 238, .52), transparent 34%),
    radial-gradient(ellipse at 15% 84%, rgba(239, 231, 213, .42), transparent 35%),
    var(--paper);
}
.login-shell {
  width: min(100%, 460px);
  padding: clamp(32px, 8vw, 68px);
  background: rgba(255, 254, 250, .9);
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(41, 57, 79, .1);
}
.login-shell h1 { margin: 0; font: 500 clamp(2.5rem, 10vw, 4rem)/1 var(--serif); }
.login-shell h1 span { color: var(--blue-light); font-style: italic; }
.login-copy { margin: 22px 0 28px; color: var(--muted); line-height: 1.7; }
.login-form { display: grid; gap: 10px; }
.login-form label { font-size: .8rem; font-weight: 700; }
.login-form input, .login-form button {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 0;
}
.login-form input { width: 100%; padding: 0 14px; background: var(--white); color: var(--ink); }
.login-form button {
  padding: 0 18px;
  color: white;
  background: var(--blue);
  font-weight: 700;
}
.login-form button:hover { background: #3b5b70; }
.error { margin: 0 0 18px; color: #8a3f35; font-size: .9rem; }

.app-header {
  position: relative;
  z-index: 2;
  min-height: 78px;
  padding: 0 max(28px, calc((100% - 1120px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.monogram {
  flex: 0 0 auto;
  color: var(--blue);
  font: 600 .96rem var(--serif);
  letter-spacing: .02em;
  text-decoration: none;
}
.monogram span { color: var(--blue-light); font-style: italic; }
.monogram i { padding: 0 5px; color: #a9b5b8; font-style: normal; }
.desktop-nav, .header-actions, .language-switcher { display: flex; align-items: center; }
.desktop-nav { gap: clamp(16px, 2.8vw, 36px); }
.desktop-nav a {
  color: var(--muted);
  font-size: .75rem;
  text-decoration: none;
  transition: color .2s ease;
}
.desktop-nav a:hover, .language-link:hover { color: var(--blue-light); }
.header-actions { gap: 16px; }
.language-switcher { gap: 3px; }
.language-link {
  min-width: 30px;
  padding: 7px 5px;
  color: var(--muted);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-align: center;
  text-decoration: none;
}
.language-link--active { color: var(--blue); background: var(--blue-soft); }
.logout {
  padding: 7px 0 7px 12px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: .72rem;
}

.app-main { width: min(100% - 56px, 1120px); margin: 0 auto; }
.hero {
  min-height: 510px;
  padding: 88px 0 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-copy { width: 100%; max-width: 1040px; padding: 10px 0; }
.eyebrow {
  margin: 0 0 19px;
  color: var(--blue-light);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .17em;
  line-height: 1.5;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 100%;
  margin: 0 auto;
  color: var(--blue);
  font: 500 clamp(3.25rem, 7.2vw, 5.8rem)/1.06 var(--serif);
  letter-spacing: -.045em;
}
.hero h1 em { color: var(--blue-light); font-weight: 500; }
.date-line { margin: 24px 0 8px; color: var(--blue); font-size: clamp(1.2rem, 2.2vw, 1.55rem); font-weight: 700; letter-spacing: .035em; }
.hero-place { margin: 0; color: var(--muted); font-size: 1.05rem; }
.section { padding: 74px 0 82px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.section-heading {
  display: block;
  max-width: 960px;
  margin: 0 0 38px;
  text-align: left;
}
.section h2 {
  margin: 0;
  color: var(--blue);
  font: 500 clamp(2.25rem, 4.4vw, 3.65rem)/1.1 var(--serif);
  letter-spacing: -.035em;
}
.section-intro { max-width: 900px; margin: 12px 0 0; color: var(--muted); line-height: 1.65; }
.timeline { max-width: 850px; margin: 0; padding: 0; list-style: none; }
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 26px;
  padding: 0 0 34px 25px;
  border-left: 1px solid #d7d8d4;
}
.timeline li:last-child { padding-bottom: 0; border-color: transparent; }
.timeline li::before {
  position: absolute;
  top: 4px;
  left: -5px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--blue);
  border-radius: 50%;
  background: var(--paper);
  content: '';
}
.timeline time { color: var(--blue-light); font-size: .76rem; font-weight: 700; letter-spacing: .05em; }
.timeline h3, .place-card h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font: 500 1.35rem/1.25 var(--serif);
}
.timeline p, .place-card > p:not(.place-type), .hotel-card p, .gift-note {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.7;
}
.place-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.place-card { min-height: 220px; padding: 27px 28px 25px; background: var(--white); }
.place-card + .place-card { border-left: 1px solid var(--line); }
.place-card--pending { background: #f5f2eb; }
.place-type { margin: 0 0 18px; color: var(--blue-light); font-size: .65rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.place-card h3 { min-height: 34px; font-size: 1.4rem; }
.place-card > p:not(.place-type) { min-height: 48px; }
.place-image {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  margin-top: 16px;
  object-fit: cover;
  object-position: center;
}
.map-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  padding: 0 0 5px;
  border-bottom: 1px solid #afc8d6;
  color: var(--blue);
  font-size: .75rem;
  font-weight: 700;
  text-decoration: none;
}
.map-link:hover { color: var(--blue-light); border-color: var(--blue-light); }

.hotel-card {
  display: grid;
  grid-template-columns: 1fr .8fr;
  gap: 64px;
  padding: clamp(28px, 5vw, 55px);
  background: #f3efe6;
  color: var(--ink);
}
.hotel-card .place-type { color: var(--blue-light); }
.hotel-card h3 { margin: 0 0 14px; color: var(--ink); font: 500 clamp(2rem, 4vw, 3.2rem)/1.1 var(--serif); }
.hotel-card p { max-width: 500px; color: var(--muted); }
.hotel-details { align-self: center; padding-left: 35px; border-left: 1px solid #ded8ce; }
.hotel-details .map-link { display: flex; width: fit-content; margin-top: 23px; border-color: #bdcbd0; color: var(--blue); }
.hotel-details .map-link:hover { color: #5c7a8c; border-color: #83a7ba; }

.gifts-section { padding-bottom: 72px; }
.gift-note {
  max-width: 850px;
  margin: 17px 0 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.6;
}
.bank-details {
  max-width: 850px;
  margin: 24px 0 0;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  border: 1px solid var(--line);
  background: var(--white);
}
.bank-details div { min-width: 0; }
.bank-details dt {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.bank-details dd {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.15rem;
}
.footer {
  padding: 28px 0 48px;
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 500 .9rem var(--serif);
}
.secret-puzzle-link { color: var(--blue-light); font: 600 .72rem var(--sans); text-decoration: underline; text-decoration-color: #afc8d6; text-underline-offset: 4px; }
.secret-puzzle-link:hover, .secret-puzzle-link:focus-visible { color: var(--blue); }
.footer span:last-child { color: var(--blue-light); font: 600 .67rem var(--sans); letter-spacing: .12em; }
.mobile-nav { display: none; }

@media (max-width: 780px) {
  html { scroll-padding-top: 24px; }
  .app-header { min-height: 68px; padding: 0 22px; }
  .desktop-nav { display: none; }
  .app-main { width: min(100% - 44px, 620px); }
  .hero { min-height: 0; padding: 75px 0 72px; }
  .hero h1 { font-size: clamp(2.9rem, 8.5vw, 4.5rem); }
  .section { padding: 58px 0 64px; }
  .section-heading { margin-bottom: 32px; }
  .place-grid { grid-template-columns: 1fr; }
  .place-card { min-height: 0; padding: 24px; }
  .place-card + .place-card { border-top: 1px solid var(--line); border-left: 0; }
  .place-card h3, .place-card > p:not(.place-type) { min-height: 0; }
  .hotel-card { gap: 35px; }
}

@media (max-width: 560px) {
  .app-header { min-height: 62px; padding: 0 17px; }
  .monogram { font-size: .85rem; }
  .header-actions { gap: 8px; }
  .logout { padding-left: 5px; font-size: .67rem; }
  .language-link { min-width: 26px; padding-right: 3px; padding-left: 3px; }
  .app-main { width: min(100% - 36px, 440px); padding-bottom: 68px; }
  .hero { display: flex; flex-direction: column; align-items: stretch; padding: 62px 0 54px; }
  .hero h1 { max-width: 100%; font-size: clamp(2.5rem, 10.2vw, 3.45rem); }
  .hero-intro { margin: 20px auto 26px; font-size: .93rem; }
  .section { padding: 47px 0 52px; scroll-margin-top: 12px; }
  .section-heading { gap: 12px; margin-bottom: 29px; }
  .section h2 { font-size: clamp(2.2rem, 11vw, 3rem); }
  .section-intro { margin-top: 11px; font-size: .88rem; }
  .timeline li { grid-template-columns: 65px 1fr; gap: 14px; padding-left: 17px; }
  .timeline time { font-size: .68rem; }
  .timeline h3 { font-size: 1.22rem; }
  .timeline p, .place-card > p:not(.place-type), .hotel-card p, .gift-note { font-size: .82rem; }
  .place-grid { width: 100%; }
  .place-card { padding: 21px; }
  .place-type { margin-bottom: 12px; font-size: .6rem; }
  .place-card h3 { font-size: 1.32rem; }
  .map-link { min-height: 44px; margin-top: 11px; padding: 5px 0; }
  .hotel-card { grid-template-columns: 1fr; gap: 24px; padding: 25px 22px; }
  .hotel-card h3 { font-size: 2.5rem; }
  .hotel-details { padding: 21px 0 0; border-top: 1px solid #ded8ce; border-left: 0; }
  .bank-details { grid-template-columns: 1fr; gap: 18px; padding: 18px 20px; }
  .footer { padding: 24px 0 32px; font-size: .82rem; }
  .mobile-nav {
    position: fixed;
    z-index: 5;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 62px;
    padding: 7px max(9px, env(safe-area-inset-left)) calc(7px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    border-top: 1px solid var(--line);
    background: rgba(255, 254, 250, .97);
    backdrop-filter: blur(12px);
  }
  .mobile-nav a {
    min-height: 44px;
    display: grid;
    place-items: center;
    color: var(--blue);
    font-size: clamp(.57rem, 2.7vw, .7rem);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

.challenge-page { min-height: 100vh; }
.challenge-shell {
  width: min(100% - 40px, 640px);
  margin: 0 auto;
  padding: clamp(36px, 8vw, 76px) 0;
}
.challenge-shell--wide { width: min(100% - 40px, 900px); }
.challenge-back {
  display: inline-block;
  margin-bottom: 54px;
  color: var(--blue);
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
}
.challenge-back:hover { color: var(--blue-light); }
.challenge-kicker {
  margin: 0 0 12px;
  color: var(--blue-light);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.challenge-shell h1 {
  margin: 0;
  color: var(--blue);
  font: 500 clamp(2.6rem, 7vw, 4.4rem)/1.05 var(--serif);
  letter-spacing: -.04em;
}
.challenge-intro {
  max-width: 650px;
  margin: 18px 0 28px;
  color: var(--muted);
  line-height: 1.7;
}
.challenge-button {
  min-height: 46px;
  width: fit-content;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--blue);
  color: var(--white);
  background: var(--blue);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
}
.challenge-button:hover { background: #355f79; }
.challenge-button:disabled { cursor: wait; opacity: .65; }
.challenge-button[hidden], .qr-result[hidden] { display: none; }
.challenge-footnote { margin: 18px 0 0; color: var(--muted); font-size: .78rem; }
.puzzle-layout {
  display: grid;
  grid-template-columns: minmax(230px, 390px) minmax(200px, 1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 64px);
}
.puzzle-grid {
  width: min(100%, 390px);
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 0;
  background: var(--white);
  box-shadow: 0 16px 50px rgba(41, 57, 79, .08);
}
.puzzle-tile {
  min-width: 0;
  padding: 0;
  border: 0;
  background-color: var(--white);
  background-image: url("/puzzle-code.svg");
  background-repeat: no-repeat;
  background-size: 300% 300%;
  cursor: pointer;
  touch-action: manipulation;
}
.puzzle-tile:hover { filter: brightness(.96); }
.puzzle-tile:focus-visible, .puzzle-tile--selected {
  position: relative;
  z-index: 1;
  outline: 3px solid var(--blue-light);
  outline-offset: -3px;
}
.puzzle-tile--dragging { opacity: .45; }
.puzzle-tile--drop-target { outline: 2px dashed var(--blue-light); outline-offset: -3px; }
.puzzle-grid--solved .puzzle-tile { cursor: default; pointer-events: none; }
.challenge-status { min-height: 48px; color: var(--blue); font-size: .9rem; line-height: 1.6; }
.challenge-shell--detour { text-align: center; }
.challenge-shell--detour .challenge-kicker { margin-top: clamp(24px, 8vh, 80px); }
.challenge-shell--detour .challenge-intro { margin-right: auto; margin-left: auto; }
.detour-image {
  width: min(100%, 320px);
  height: auto;
  display: block;
  margin: 34px auto;
  box-shadow: 0 14px 34px rgba(41, 57, 79, .16);
}
.sudoku-grid {
  width: min(100%, 460px);
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  border: 2px solid var(--blue);
  background: var(--white);
}
.sudoku-cell {
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-right: 1px solid #d5d8d6;
  border-bottom: 1px solid #d5d8d6;
  border-radius: 0;
  color: var(--blue);
  background: var(--white);
  font-size: clamp(.8rem, 3.3vw, 1.15rem);
  text-align: center;
}
.sudoku-cell:focus { position: relative; z-index: 1; outline: 2px solid var(--blue-light); }
.sudoku-cell[readonly] { color: var(--ink); background: #f3efe6; font-weight: 700; }
.sudoku-cell--right-divider { border-right: 2px solid var(--blue); }
.sudoku-cell--bottom-divider { border-bottom: 2px solid var(--blue); }
#sudoku-form .challenge-status { max-width: 460px; margin: 16px 0; }
#sudoku-form .challenge-button + .challenge-button { margin-left: 8px; }
#wordle-success[hidden] { display: none; }
.challenge-shell--wordle { max-width: 620px; text-align: center; }
.challenge-shell--wordle .challenge-back { display: block; text-align: left; }
.challenge-shell--wordle .challenge-intro { margin-right: auto; margin-left: auto; }
.wordle-board { width: fit-content; margin: 28px auto 14px; display: grid; gap: 6px; }
.wordle-row { display: grid; grid-template-columns: repeat(6, clamp(40px, 11vw, 52px)); gap: 6px; }
.wordle-tile {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid #d5d8d6;
  color: var(--ink);
  background: var(--white);
  font-size: clamp(1.15rem, 5vw, 1.55rem);
  font-weight: 700;
}
.wordle-tile--filled { border: 2px solid #9aa6a8; }
.wordle-tile--correct { border-color: #6c896d; color: var(--white); background: #6c896d; }
.wordle-tile--present { border-color: #c79643; color: var(--white); background: #c79643; }
.wordle-tile--absent { border-color: #81898b; color: var(--white); background: #81898b; }
.wordle-keyboard { width: 100%; max-width: 510px; margin: 20px auto 0; display: grid; gap: 7px; }
.wordle-key-row { display: flex; justify-content: center; gap: clamp(3px, 1vw, 6px); }
.wordle-key {
  min-width: 0;
  min-height: 46px;
  padding: 0;
  flex: 1 1 0;
  border: 0;
  border-radius: 4px;
  color: var(--ink);
  background: #e9e5dc;
  font-size: clamp(.66rem, 2.5vw, .82rem);
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.wordle-key--wide { flex: 1.55 1 0; font-size: clamp(.57rem, 2vw, .72rem); }
.wordle-key--correct { color: var(--white); background: #6c896d; }
.wordle-key--present { color: var(--white); background: #c79643; }
.wordle-key--absent { color: var(--white); background: #81898b; }
#wordle-reset { margin: 0 auto; }
.wordle-success { max-width: 560px; margin: 42px auto 0; }
.wordle-success h2 { margin: 0; color: var(--blue); font: 500 clamp(3rem, 9vw, 5rem)/1 var(--serif); }
.spritz-image { width: min(100%, 390px); height: auto; display: block; margin: 18px auto 10px; }
.wordle-success .challenge-intro { font-size: 1.03rem; }

@media (max-width: 620px) {
  .challenge-shell { width: min(100% - 36px, 460px); padding-top: 32px; }
  .challenge-shell--wide { width: min(100% - 36px, 460px); }
  .challenge-back { margin-bottom: 40px; }
  .puzzle-layout { grid-template-columns: 1fr; gap: 18px; }
  .puzzle-grid { width: min(100%, 390px); margin: 0 auto; }
  .challenge-status { min-height: 28px; }
}
