:root {
  --paper: #f3ecdf;
  --ink: #1c1915;
  --muted: #5c5348;
  --line: #d9cbb8;
  --card: #fffaf3;
  --sea: #1f4e5f;
  --sea-deep: #163846;
  --clay: #8c3b22;
  --fit: #1d6b45;
  --stretch: #8a5a12;
  --blocked: #8d2436;
  --outside: #1f4e5f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

a { color: var(--sea); }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 7vw;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.brand img {
  width: 42px;
  height: 42px;
  display: block;
}

main { width: min(1120px, 94vw); margin: 0 auto; padding: 36px 0 72px; }

.ad-seat { margin: 16px 0; }
.adsense-live-wrap { max-height: 0; overflow: hidden; opacity: 0; }
.adsense-live-wrap.is-filled { max-height: none; overflow: visible; opacity: 1; }
.adsense-micro-label { font-size: 0.72rem; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 4px; }
.house-sponsor-fallback {
  margin: 0;
  padding: 10px 14px;
  border-radius: 16px;
  background: #fffaf3;
  color: var(--muted);
  font-size: 0.86rem;
}
.house-sponsor-fallback a { color: inherit; }

.kicker { margin: 0; color: var(--clay); font-weight: 700; }

h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.lead, .prose p { color: var(--muted); max-width: 68ch; }

.sheet {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}

label { display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; color: var(--muted); }

input, select, button {
  font: inherit;
  color: var(--ink);
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 12px;
}

button {
  align-self: end;
  background: var(--sea);
  color: #fff;
  border: 0;
  cursor: pointer;
}

button:hover { background: var(--sea-deep); }

.actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }

button.lucky {
  background: #fff;
  color: var(--sea);
  border: 1px solid var(--sea);
}

button.lucky:hover { background: #f3ecdf; color: var(--sea-deep); }

.plan { margin: 8px 0 16px; padding: 12px 14px; background: #fff; border-radius: 14px; border: 1px solid var(--line); }

.plan ol { margin: 8px 0; padding-left: 1.2em; }

.error { color: var(--blocked); }

.limits, .card, .prose {
  margin-top: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.limits { padding: 14px 18px; color: var(--muted); }

.card { padding: 18px 20px 16px; }

.card header { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }

.card h2 { margin: 0; font-size: 1.45rem; letter-spacing: -0.03em; }
.card h3 { margin: 16px 0 6px; font-size: 0.98rem; letter-spacing: -0.02em; }

.status { font-weight: 750; }
.status.fit { color: var(--fit); }
.status.stretch { color: var(--stretch); }
.status.blocked { color: var(--blocked); }
.status.outside_ledger { color: var(--outside); }
.status.visa_check { color: var(--clay); }

.meta { color: var(--muted); margin: 6px 0 10px; }

.reasons { margin: 0; padding-left: 1.1rem; }

.days { display: grid; gap: 8px; }
.day { background: #f7f1e6; border-radius: 12px; padding: 8px 12px; }
.day strong { display: block; }
.places { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.places li { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; background: #fff; }

.links { display: grid; gap: 10px; margin-top: 12px; }

.creator {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7f1e6;
  text-decoration: none;
}

.creator strong { color: var(--ink); }

.hits { color: var(--muted); font-size: 0.92rem; }

footer { padding: 0 7vw 40px; color: var(--muted); }

footer .visitors {
  margin: 14px 0 6px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.prose { padding: 8px 22px 22px; }

@media (max-width: 800px) {
  .sheet { grid-template-columns: 1fr 1fr; }
  .top { padding-inline: 4vw; }
}

body.festive {
  background:
    radial-gradient(900px 420px at 10% -10%, #f6d7b8 0%, transparent 55%),
    radial-gradient(800px 480px at 100% 0%, #24365f 0%, transparent 50%),
    #f6efe4;
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.hero-art, .balloon-mark {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 28px;
  display: block;
}

.balloon-mark {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  justify-self: end;
}

.hero-copy h1 { margin-bottom: 8px; }

.say {
  margin: 0;
  padding: 12px 16px 16px;
  background: #fffaf3;
  border-radius: 18px 18px 18px 6px;
  box-shadow: 0 8px 0 rgba(196, 106, 58, 0.12);
}

.dream { display: grid; gap: 12px; margin-top: 14px; }
.lead-copy { display: grid; gap: 6px; }
.edge { margin: 8px 0 0; font-size: 1.05rem; line-height: 1.55; }
.trait, .dream .note, .pick li span { color: var(--muted); line-height: 1.45; }
.trait, .dream .note { margin: 0; }
.episodes { display: grid; gap: 8px; }
.episode {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 10px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  background: #fffaf3;
  border-radius: 16px;
  overflow: hidden;
}
.episode img { width: 148px; height: 92px; object-fit: cover; display: block; background: #24365f; }
.episode span { padding-right: 12px; }
.picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pick { background: #fffaf3; border-radius: 16px; padding: 12px 12px 8px; }
.pick h3 { margin: 0 0 8px; font-size: 0.98rem; letter-spacing: -0.03em; }
.pick ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pick li { display: grid; gap: 2px; }
.pick b { font-weight: 750; }
.pick a { color: inherit; }

.ticket { margin-top: 0; }

.regions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }

.region, .pill {
  font: inherit;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: #fffaf3;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
}

.region.on { background: #e07a62; color: #fffaf3; }

.mini {
  font: inherit;
  display: grid;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #fffaf3;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.mini img { width: 100%; height: 96px; object-fit: cover; display: block; background: #24365f; }
.mini span { padding: 8px 10px 10px; font-weight: 750; }

.map-frame { position: relative; }

.map-slot {
  background: #1a2c4c;
  border-radius: 28px;
  overflow: hidden;
  min-height: 280px;
}

.map-slot svg { width: 100%; height: auto; display: block; cursor: grab; touch-action: none; }
.map-frame.dragging svg { cursor: grabbing; }

.zoom {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  gap: 8px;
  z-index: 2;
}

.zoom button {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 14px;
  background: #fffaf3;
  color: #163846;
  font-size: 1.4rem;
  font-weight: 750;
  line-height: 1;
  box-shadow: 0 4px 0 rgba(22, 56, 70, 0.16);
}

.zoom button:hover { background: #fff; color: #163846; }
.zoom button:disabled { opacity: 0.38; cursor: default; }

.pin { cursor: pointer; }
.pin text { fill: #fffaf3; font-family: "Noto Sans KR", sans-serif; }
.pin ellipse { fill: #f3e6cf; stroke: #fff; stroke-width: 0.8; }
.pin .string { stroke: rgba(255, 250, 243, 0.7); stroke-width: 1; }
.pin .leader { stroke: rgba(255, 250, 243, 0.72); stroke-width: 1px; vector-effect: non-scaling-stroke; pointer-events: none; }
.pin path { fill: #fffaf3; }
.pin.fit ellipse { fill: #e07a62; }
.pin.stretch ellipse { fill: #e7b15a; }
.pin.blocked ellipse { fill: #8d93a3; }
.pin.visa_check ellipse { fill: #c46a3a; }
.pin.outside_ledger ellipse { fill: #7eb8c9; }
.pin.fit .bob { animation: bob 2.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }

.stage { display: grid; gap: 14px; margin-top: 16px; }
.city {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  min-width: 0;
}
.city header { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.city h2 { margin: 0 0 8px; font-size: 1.5rem; }
.city h2 span { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.reel.strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 12px;
  padding-bottom: 6px;
}
.reel.strip .shot { flex: 0 0 210px; }
.reel.spread {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.reel.spread .lead { grid-column: span 2; grid-row: span 2; }
.reel .shot {
  position: relative;
  display: block;
  min-width: 0;
  border-radius: 16px;
  overflow: hidden;
  color: #fffaf3;
  text-decoration: none;
  background: #24365f;
}
.reel .shot img {
  width: 100%;
  height: 132px;
  aspect-ratio: auto;
  object-fit: cover;
  display: block;
  background: #24365f;
}
.reel.spread .lead img { height: 100%; min-height: 280px; }
.reel .shot span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 10px 8px;
  background: linear-gradient(to top, rgba(22, 56, 70, 0.92), rgba(22, 56, 70, 0));
  color: #fffaf3;
  font-size: 0.82rem;
  line-height: 1.35;
}
.reel .shot i, .reel .shot b { display: block; font-style: normal; }
.reel .shot i { opacity: 0.8; font-size: 0.75rem; }
.reel .shot b { font-weight: 750; }
.reel .shot em {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-style: normal;
  font-weight: 500;
  margin-top: 2px;
}
.reel.strip .shot em { display: none; }
.opener { margin-top: 12px; }
.opener .shot img { width: 100%; height: min(420px, 52vw); min-height: 240px; object-fit: cover; }
.lane { margin-top: 16px; }
.lane h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  letter-spacing: -0.03em;
}
.lane .reel.spread { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lane .reel.spread .shot img { height: 148px; min-height: 0; }
.stamps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.stamp {
  background: #fffaf3;
  border-radius: 999px;
  padding: 6px 12px;
  box-shadow: 0 4px 0 rgba(196, 106, 58, 0.14);
}
.open-city {
  margin-top: 10px;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: #e07a62;
  color: #fffaf3;
  cursor: pointer;
  font: inherit;
}
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.shot {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  background: #f7f1e6;
  border-radius: 16px;
  overflow: hidden;
}
.shot img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: #24365f; }
.shot span, .hint, .memo { color: var(--muted); }
.shot span { padding: 0 10px 10px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.minis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.memo { margin-top: 10px; }
.pill { display: inline-block; background: #24365f; color: #fffaf3; }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art, .balloon-mark { height: 180px; width: 100%; border-radius: 22px; }
  .minis { grid-template-columns: 1fr 1fr; }
  .reel.spread { grid-template-columns: 1fr 1fr; }
  .reel.spread .lead { grid-column: span 2; grid-row: auto; }
  .reel.spread .lead img { min-height: 180px; }
  .reel.strip .shot { flex-basis: 168px; }
  .picks { grid-template-columns: 1fr; }
  .episode { grid-template-columns: 112px 1fr; }
  .episode img { width: 112px; height: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  .pin.fit .bob { animation: none; }
}
