:root {
  color: #51433c;
  background: #fffaf4;
  font-family: "Gowun Dodum", sans-serif;
  font-synthesis: none;
  --brown: #765d50;
  --rose: #cf8d80;
  --cream: #fffaf4;
  --line: #eadbd0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--cream); }
main { overflow: hidden; }

.invitation {
  min-height: min(92vh, 760px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 72px 24px 64px;
  text-align: center;
  background: radial-gradient(circle at 50% 15%, #fff 0, transparent 42%), var(--cream);
}
.eyebrow { margin: 0; color: var(--rose); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: "Nanum Myeongjo", serif; font-weight: 400; }
h1 { margin-bottom: 0; color: var(--brown); font-size: clamp(40px, 12vw, 68px); line-height: 1.25; letter-spacing: -.08em; }
h1 em { color: var(--rose); font-style: normal; }
.ornament { color: #d9b1a5; font-size: 24px; }
.invitation-copy { margin-bottom: 16px; color: #826f65; font-size: 15px; line-height: 1.9; }
.invitation-date { margin-bottom: 0; color: var(--brown); font-size: 12px; letter-spacing: .08em; }
.event-details { color: #826f65; font-size: 13px; line-height: 1.75; }
.event-details p { margin: 0 0 8px; }
.event-details strong { color: var(--brown); font-family: "Nanum Myeongjo", serif; font-size: 16px; }
.event-details a { color: var(--rose); font-size: 12px; text-decoration: none; }
.invitation-hosts { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 0; color: var(--brown); font-family: "Nanum Myeongjo", serif; font-size: 13px; line-height: 1.6; }

.game-section { padding: 70px 16px 84px; background: #f8eee7; }
.section-heading { margin: 0 auto 26px; text-align: center; }
.section-heading h2 { margin: 9px 0 12px; color: var(--brown); font-size: 34px; letter-spacing: -.06em; }
.section-heading p:last-child { margin-bottom: 0; color: #8f7970; font-size: 14px; line-height: 1.7; }
.game-card { width: min(100%, 620px); margin: auto; padding: 12px 12px 16px; border: 1px solid rgba(207, 141, 128, .24); border-radius: 20px; background: rgba(255, 253, 250, .72); box-shadow: 0 12px 40px rgba(128, 91, 75, .08); }
.score-bar { display: flex; align-items: baseline; justify-content: space-between; padding: 2px 5px 9px; color: #b18c80; font-size: 10px; letter-spacing: .14em; }
.score-bar strong { color: var(--brown); font-family: "Nanum Myeongjo", serif; font-size: 22px; font-weight: 700; letter-spacing: 0; }
.game-wrap { position: relative; width: 100%; overflow: hidden; border-radius: 12px; background: #fffaf4; touch-action: manipulation; }
canvas { display: block; width: 100%; height: clamp(245px, 68vw, 390px); }
.game-message { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; text-align: center; background: rgba(255, 250, 244, .84); transition: opacity .2s ease; }
.game-message.is-hidden { opacity: 0; pointer-events: none; }
.message-icon { display: grid; place-items: center; width: 45px; height: 45px; margin-bottom: 10px; border-radius: 50%; color: var(--rose); background: #f8e4dc; font-size: 27px; }
.game-message h3 { margin-bottom: 5px; color: var(--brown); font-family: "Nanum Myeongjo", serif; font-size: 21px; font-weight: 700; }
.game-message p { margin-bottom: 15px; color: #856f66; font-size: 13px; line-height: 1.6; }
button { border: 0; border-radius: 99px; padding: 11px 24px; color: #fffaf4; background: var(--rose); font: inherit; font-size: 13px; cursor: pointer; box-shadow: 0 5px 12px rgba(184, 114, 99, .2); }
button:active { transform: translateY(1px); }
.game-hint { margin: 13px 0 0; color: #b3978d; font-size: 11px; text-align: center; }
kbd { display: inline-block; margin-left: 3px; padding: 1px 5px; border: 1px solid #dec9bf; border-radius: 4px; color: #967b70; font-size: 9px; }
.brick-section { padding: 70px 16px 84px; background: #f8eee7; }
.brick-card { width: min(100%, 620px); margin: auto; padding: 12px 12px 16px; border: 1px solid rgba(207, 141, 128, .24); border-radius: 20px; background: rgba(255, 253, 250, .72); box-shadow: 0 12px 40px rgba(128, 91, 75, .08); }
.brick-score { display: flex; justify-content: space-between; padding: 2px 5px 9px; color: #b18c80; font-size: 10px; letter-spacing: .12em; }
.brick-score strong { color: var(--brown); font-size: 18px; letter-spacing: 0; }
.brick-wrap { position: relative; overflow: hidden; border-radius: 12px; background: #fffaf4; touch-action: none; }
#brick-canvas { display: block; width: 100%; height: auto; aspect-ratio: 1.125; }
.brick-message { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; text-align: center; background: rgba(255, 250, 244, .84); transition: opacity .2s ease; }
.brick-message.is-hidden { opacity: 0; pointer-events: none; }
.photo-section { padding: 70px 16px 84px; background: #fffaf4; }
.photo-section .section-heading { margin-bottom: 28px; }
.photo-wall { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; gap: 11px; width: min(100%, 620px); margin: auto; }
.photo-tile { position: relative; overflow: hidden; min-width: 0; padding: 0; border: 5px solid #fffdfb; border-radius: 13px; background: #f6e9e1; box-shadow: 0 8px 20px rgba(128, 91, 75, .13); transform: rotate(var(--rotation)); animation: photo-float 4s ease-in-out infinite; animation-delay: var(--delay); }
.photo-tile:nth-child(3n) { grid-row: span 2; }
.photo-tile:nth-child(5n) { grid-column: span 2; }
.photo-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.photo-tile:active img, .photo-tile:focus-visible img { transform: scale(1.08); }
.photo-sentinel { height: 1px; }
@keyframes photo-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
.lightbox { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(66, 48, 42, .82); }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(92vw, 620px); max-height: 82vh; border: 6px solid #fffdfb; border-radius: 14px; box-shadow: 0 18px 60px rgba(0, 0, 0, .25); }
.lightbox-close { position: absolute; top: max(18px, env(safe-area-inset-top)); right: 18px; width: 42px; height: 42px; padding: 0; color: #fffaf4; background: transparent; box-shadow: none; font-family: Arial, sans-serif; font-size: 34px; font-weight: 200; line-height: 1; }
footer { padding: 28px 16px 36px; color: #b49a90; font-size: 11px; letter-spacing: .08em; text-align: center; }

@media (min-width: 640px) { .game-section { padding-inline: 32px; } .game-card { padding: 16px 16px 18px; } }
@media (min-width: 640px) { .photo-wall { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 118px; } }
