/* ============ Olivia's America Adventure — MoMA design system ============
   White ground, big black Noto Sans, thin-line cards, seven flat accents.
   No gradients, no 3D shadows — color is used as a point, not a wash.
======================================================================== */

@font-face {
  font-family: 'Noto Sans KR';
  src: url('../assets/fonts/NotoSansKR-Regular.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Noto Sans KR';
  src: url('../assets/fonts/NotoSansKR-Bold.woff2') format('woff2');
  font-weight: 700; font-display: swap;
}
@font-face {
  font-family: 'Noto Sans KR';
  src: url('../assets/fonts/NotoSansKR-Black.woff2') format('woff2');
  font-weight: 900; font-display: swap;
}

:root {
  --red: #E32619;
  --blue: #0057FF;
  --yellow: #FFD400;
  --green: #00A36C;
  --orange: #FF6A00;
  --purple: #7A3FF2;
  --pink: #FF4FA3;
  --ink: #111;
  --muted: #666;
  --line: #e8e8e8;
  --bg: #fff;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: 'Noto Sans KR', -apple-system, 'Apple SD Gothic Neo', Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: -0.02em;
  min-height: 100%;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 18px;
  padding-top: max(18px, env(safe-area-inset-top));
  border-bottom: 2px solid var(--ink);
  margin-bottom: 20px;
}
.topbar h1 {
  font-size: clamp(26px, 4.5vw, 40px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  margin: 0; flex: 1;
}
.btn-home {
  font-size: 20px; text-decoration: none;
  background: var(--bg); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 0;
  padding: 8px 16px; font-weight: 900; line-height: 1;
}
.chip {
  background: var(--bg); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 0;
  padding: 8px 16px;
  font-size: 17px; font-weight: 700;
}

button, .bigbtn {
  font-family: inherit; font-size: 19px; font-weight: 900;
  letter-spacing: -0.02em;
  border: 2px solid transparent; border-radius: 0;
  padding: 12px 24px;
  background: var(--red); color: #fff;
  cursor: pointer;
}
button:active { transform: translateY(2px); }
button.secondary { background: var(--blue); color: #fff; }
button.ghost { background: var(--bg); color: var(--ink); border-color: var(--ink); }
button:disabled { opacity: .4; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.wrap { max-width: 1024px; margin: 0 auto; padding: 0 18px 48px; }

/* ---- home grid: each game is a MoMA color card ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tile {
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 8px solid var(--ink);
  border-radius: 0;
  padding: 20px 18px 18px;
  text-align: left; text-decoration: none; color: var(--ink);
  position: relative;
  transition: transform .12s ease;
}
.tile:active { transform: translateY(-3px); }
.tile:nth-child(6n+1) { border-top-color: var(--red); }
.tile:nth-child(6n+2) { border-top-color: var(--blue); }
.tile:nth-child(6n+3) { border-top-color: var(--yellow); }
.tile:nth-child(6n+4) { border-top-color: var(--green); }
.tile:nth-child(6n+5) { border-top-color: var(--purple); }
.tile:nth-child(6n+6) { border-top-color: var(--pink); }
.tile .emoji { font-size: 52px; display: block; }
.tile .name {
  font-size: 24px; font-weight: 900; letter-spacing: -0.04em;
  margin-top: 10px; display: block; line-height: 1.05;
}
.tile .sub { font-size: 14px; color: var(--muted); display: block; margin-top: 6px; }
.tile .done { position: absolute; top: 12px; right: 14px; font-size: 24px; }

/* ---- stamp popup ---- */
.stamp-overlay {
  position: fixed; inset: 0; background: rgba(17,17,17,.6);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.stamp-card {
  background: var(--bg); border: 3px solid var(--ink); border-radius: 0;
  padding: 34px 46px; text-align: center;
  animation: pop .35s cubic-bezier(.2,1.6,.4,1);
  max-width: 86vw;
}
.stamp-card .big { font-size: 90px; animation: stampIn .5s cubic-bezier(.2,2,.4,1); display: block; }
.stamp-card h2 {
  margin: 8px 0 4px; font-size: 30px; font-weight: 900; letter-spacing: -0.05em;
  color: var(--red);
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
@keyframes stampIn { 0% { transform: scale(3) rotate(-30deg); opacity: 0; } 60% { transform: scale(.9) rotate(6deg); } }

/* ---- generic card ---- */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 22px;
  margin-bottom: 16px;
}
.card img.photo { width: 100%; display: block; }

/* ---- confetti ---- */
.confetti { position: fixed; top: -20px; font-size: 26px; z-index: 1200; animation: fall linear forwards; pointer-events: none; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---- passport: the black poster block ---- */
.passport {
  background: var(--ink); color: #fff;
  border-radius: 0; padding: 30px 26px;
}
.passport h2 {
  text-align: left; letter-spacing: -0.05em; margin: 0 0 2px;
  font-size: clamp(34px, 6vw, 54px); font-weight: 900; line-height: .95;
  color: var(--yellow);
}
.passport .sub { text-align: left; font-size: 13px; color: #bbb; margin-bottom: 20px; letter-spacing: .02em; }
.stamp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; }
.stamp-slot {
  background: var(--bg); color: var(--ink); border-radius: 0; padding: 10px 6px;
  text-align: center; min-height: 96px;
}
.stamp-slot.empty { background: transparent; color: #888; border: 1px dashed #555; }
.stamp-slot .se { font-size: 38px; display: block; transform: rotate(-8deg); }
.stamp-slot .sl { font-size: 12px; font-weight: 700; display: block; margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
