@font-face {
  font-family: "OngeulipRound";
  src: url("./assets/ongleip-round.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --cream: #fff9df;
  --body: #f8e8b9;
  --body-deep: #edcf91;
  --chestnut: #7a442b;
  --chestnut-dark: #4c2a20;
  --mint: #cde6aa;
  --mint-dark: #6e8f50;
  --sky: #cceafb;
  --peach: #ffc8b8;
  --yellow: #f8d96a;
  --ink: #4c342b;
  --paper: #fffdf2;
  --shadow: 0 8px 0 rgba(76, 42, 32, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--body);
  font-family: "OngeulipRound", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: -.01em;
}
button, select, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 999;
  padding: .75rem 1rem;
  border: 3px solid var(--chestnut-dark);
  border-radius: 1rem;
  background: white;
}
.skip-link:focus { top: 1rem; }

.landing {
  min-height: max(100svh, 50rem);
  position: relative;
  display: grid;
  place-items: start center;
  padding: clamp(2rem, 8vh, 5.5rem) 1.25rem 4.5rem;
  overflow: hidden;
  background: #cceafb url("./assets/chestnut-meadow.png") center/cover no-repeat;
}
.landing::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.08);
  pointer-events: none;
}
.landing-badge {
  position: absolute;
  top: 1.2rem;
  left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  z-index: 1;
  white-space: nowrap;
  padding: .45rem .9rem;
  border: 3px solid var(--chestnut-dark);
  border-radius: 999px;
  background: var(--cream);
  font-weight: 700;
  box-shadow: 0 4px 0 rgba(76,42,32,.14);
}
.landing-copy {
  position: relative;
  z-index: 1;
  width: min(42rem, 92vw);
  margin-top: clamp(3rem, 10vh, 7rem);
  text-align: center;
}
.eyebrow, .kicker {
  margin: 0 0 .4rem;
  color: var(--chestnut);
  font-weight: 700;
  letter-spacing: .05em;
}
.landing h1 {
  margin: 0;
  color: var(--chestnut);
  font-family: "OngeulipRound", sans-serif;
  font-size: clamp(3.5rem, 9vw, 6.8rem);
  line-height: 1;
  letter-spacing: -.04em;
  -webkit-text-stroke: 4px var(--chestnut-dark);
  paint-order: stroke fill;
  text-shadow: 0 8px 0 var(--cream), 0 12px 0 rgba(76,42,32,.15);
  transform: rotate(-1deg);
}
.landing-note {
  display: inline-block;
  margin: 1.5rem 0 1.6rem;
  padding: .55rem 1rem;
  border: 3px dashed var(--chestnut);
  border-radius: 1rem;
  background: rgba(255,249,223,.92);
  font-weight: 700;
}
.enter-button {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .8rem 1.5rem .72rem;
  border: 4px solid var(--chestnut-dark);
  border-radius: 1.2rem 1.2rem 1.5rem 1rem;
  color: white;
  background: var(--chestnut);
  font-family: "OngeulipRound", sans-serif;
  font-size: 1.45rem;
  box-shadow: 0 7px 0 var(--chestnut-dark);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.enter-button:hover { transform: translateY(-2px) rotate(1deg); box-shadow: 0 9px 0 var(--chestnut-dark); }
.enter-button:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--chestnut-dark); }
.landing-like-wrap { margin-top: 1.4rem; }
.landing-like-counter { position: relative; display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .7rem .45rem .5rem; border: 3px solid var(--chestnut-dark); border-radius: 1.45rem 1.1rem 1.5rem 1.15rem; background: var(--body); color: var(--chestnut-dark); font-weight: 700; box-shadow: inset 0 -4px 0 rgba(122,68,43,.1), 0 4px 0 var(--chestnut-dark), 0 8px 12px rgba(76,42,32,.1); transform: rotate(1deg); }
.landing-like-counter::after { content: ""; position: absolute; right: 1.15rem; bottom: -.48rem; width: .8rem; height: .8rem; border-right: 3px solid var(--chestnut-dark); border-bottom: 3px solid var(--chestnut-dark); border-radius: 0 0 .25rem 0; background: var(--body); transform: rotate(38deg); }
.landing-like-nut { display: block; width: 2.1rem; height: 2.1rem; flex: 0 0 auto; transform: rotate(-8deg); }
.landing-like-nut svg { display: block; width: 100%; height: 100%; }
.landing-like-label { white-space: nowrap; font-size: 1.02rem; }
.landing-like-counter strong { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; min-width: 2.35rem; min-height: 2rem; padding: .05rem .45rem 0; border: 2px solid var(--chestnut-dark); border-radius: 999px; background: var(--paper); color: var(--chestnut); font-size: .95rem; line-height: 1; }
.falling-nuts { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.falling-nut { position: absolute; top: -4rem; display: grid; place-items: center; width: 3.4rem; height: 3.4rem; padding: .2rem; border: 0; background: transparent; filter: drop-shadow(0 4px 1px rgba(76,42,32,.2)); cursor: pointer; pointer-events: auto; animation: falling-nut var(--fall-time) linear forwards; }
.falling-nut svg { width: 100%; height: 100%; }
.falling-nut:hover svg, .falling-nut:focus-visible svg { transform: scale(1.2); }
.falling-nut.is-settled { animation: nut-settle .3s ease-out both; }
.falling-nut.is-collected { animation: none; opacity: 0; transform: scale(1.5) rotate(18deg); transition: opacity .25s ease, transform .25s ease; pointer-events: none; }
@keyframes falling-nut { from { transform: translateY(0) rotate(-16deg); } to { transform: translateY(var(--fall-distance)) rotate(20deg); } }
@keyframes nut-settle { 0% { transform: translateY(-8px) rotate(var(--rest-rotation)); } 60% { transform: translateY(2px) rotate(var(--rest-rotation)); } 100% { transform: translateY(0) rotate(var(--rest-rotation)); } }
.landing-disclaimer {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: .75rem;
  width: min(46rem, 92vw);
  transform: translateX(-50%);
  margin: 0;
  color: #fffdf2;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.55;
  text-align: center;
  text-shadow: 0 1px 4px var(--chestnut-dark);
}

.loading-layer {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-content: center;
  background: var(--cream);
  text-align: center;
  font-family: "OngeulipRound", sans-serif;
}
.nut-spinner { display: flex; gap: .6rem; font-size: 2.2rem; }
.nut-spinner span { display: inline-block; animation: nut-hop .75s infinite alternate ease-in-out; }
.nut-spinner span:nth-child(2) { animation-delay: .15s; }
.nut-spinner span:nth-child(3) { animation-delay: .3s; }
@keyframes nut-hop { to { transform: translateY(-1.1rem) rotate(16deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

.site-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 17rem minmax(0, 1fr);
  background: var(--cream);
}
.site-sidebar {
  position: sticky;
  top: 0;
  z-index: 50;
  align-self: start;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: 1.35rem 1rem 1rem;
  border-right: 4px solid var(--chestnut-dark);
  background: var(--body);
}
.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .45rem;
  color: var(--chestnut);
  font-family: "OngeulipRound", sans-serif;
  font-size: 1.55rem;
  text-decoration: none;
}
.brand-mark { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border: 3px solid var(--chestnut-dark); border-radius: 50% 45% 48% 52%; background: var(--cream); }
.sidebar-caption {
  margin: 1.2rem .55rem .8rem;
  color: var(--chestnut);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.55;
}
.side-nav { display: grid; gap: .6rem; }
.side-nav a {
  display: grid;
  grid-template-columns: 2rem 1fr;
  align-items: center;
  gap: .6rem;
  padding: .8rem .75rem;
  border: 3px solid transparent;
  border-radius: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}
.side-nav a span:first-child { font-size: 1.25rem; text-align: center; }
.side-nav a:hover, .side-nav a:focus-visible { border-color: var(--chestnut); background: var(--cream); }
.side-nav a.is-active {
  border-color: var(--chestnut-dark);
  background: var(--chestnut);
  color: white;
  box-shadow: 0 5px 0 var(--chestnut-dark);
}
.side-nav a[hidden] { display: none; }
.site-content { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.site-content main { flex: 1; }
.sidebar-toggle, .sidebar-scrim { display: none; }

.ambient-player {
  position: absolute;
  top: clamp(30rem, 62vh, 42rem);
  left: 50%;
  z-index: 60;
  width: 320px;
  padding: .55rem;
  transform: translateX(-50%);
  border: 3px solid var(--chestnut-dark);
  border-radius: 1.15rem;
  background: var(--cream);
  box-shadow: 0 6px 0 rgba(76,42,32,.2);
  text-align: center;
}
.ambient-player-heading { color: var(--chestnut); font-weight: 700; line-height: 1.3; }
.ambient-player #ambient-video {
  display: block;
  width: 100%;
  height: 200px;
  margin-top: .3rem;
  border: 0;
  border-radius: .5rem;
  background: #171717 url("https://i.ytimg.com/vi/sDY-xyMVqDg/hqdefault.jpg") center/cover no-repeat;
}
.ambient-player p { margin: .35rem 0 0; font-size: .75rem; line-height: 1.35; }
.ambient-sound-button { display: block; width: 100%; margin-top: .35rem; padding: .35rem .5rem; border: 2px solid var(--chestnut-dark); border-radius: .6rem; background: var(--yellow); color: var(--chestnut-dark); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.ambient-sound-button:hover, .ambient-sound-button:focus-visible { background: var(--mint); }
.ambient-sound-button:disabled { opacity: .65; cursor: wait; }
.ambient-sound-button[hidden] { display: none; }
body.inside-world .ambient-player {
  position: fixed;
  top: auto;
  bottom: 1rem;
  left: 1rem;
  width: 240px;
  transform: none;
}

.section { min-height: 100vh; padding: clamp(3rem, 7vw, 6rem) clamp(1.25rem, 5vw, 5rem); }
.section-heading { max-width: 60rem; margin: 0 auto 2rem; }
.section-heading h2, .correction-box h2 {
  margin: 0;
  color: var(--chestnut);
  font-family: "OngeulipRound", sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.15;
}
.section-heading > p:last-child { margin: .6rem 0 0; }
.row-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; }

.paper-card, .news-card, .episode-card, .pairing-card, .correction-box {
  border: 4px solid var(--chestnut-dark);
  border-radius: 1.4rem 1.1rem 1.6rem 1rem;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.profile-section { background: var(--cream); }
.profile-hero { position: relative; display: grid; grid-template-columns: minmax(14rem, .72fr) minmax(0, 1.28fr); align-items: center; gap: clamp(1rem, 4vw, 2.5rem); max-width: 70rem; margin: 0 auto 2.25rem; padding: clamp(1.25rem, 4vw, 2.2rem); overflow: visible; background: linear-gradient(135deg, var(--paper) 0 47%, var(--body) 47% 100%); transform: rotate(-.3deg); }
.profile-hero-copy { position: relative; z-index: 2; }
.profile-hero-copy h2 { margin: 0; color: var(--chestnut); font-family: "OngeulipRound", sans-serif; font-size: clamp(2.6rem, 5.8vw, 4.8rem); line-height: .98; letter-spacing: -.04em; }
.profile-hero-copy > p:not(.kicker) { margin: 1rem 0 0; }
.profile-chant { padding: .75rem .9rem; border: 3px dashed var(--chestnut); border-radius: 1rem; background: var(--mint); font-weight: 700; }
.profile-chant strong { color: var(--chestnut); font-size: 1.2em; }
.profile-hero-collage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.55rem, 1.6vw, 1rem); padding: 3.3rem .65rem .65rem; }
.profile-hero-thumb { position: relative; display: block; overflow: hidden; border: 3px solid var(--chestnut-dark); border-radius: .8rem 1rem .7rem 1.05rem; background: var(--paper); box-shadow: 0 6px 0 rgba(76,42,32,.15); text-decoration: none; transform: rotate(-2deg); transition: transform .15s ease, box-shadow .15s ease; }
.profile-hero-thumb:nth-child(2) { transform: rotate(2deg) translateY(.4rem); }
.profile-hero-thumb:nth-child(3) { transform: rotate(1.5deg) translateX(.35rem); }
.profile-hero-thumb:nth-child(4) { transform: rotate(-1.5deg) translateY(.55rem); }
.profile-hero-thumb:hover, .profile-hero-thumb:focus-visible { z-index: 3; transform: rotate(0) translateY(-3px); box-shadow: 0 9px 0 rgba(76,42,32,.16); }
.profile-hero-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.profile-hero-thumb span { position: absolute; right: .4rem; bottom: .4rem; padding: .12rem .48rem; border: 2px solid var(--chestnut-dark); border-radius: 999px; background: var(--yellow); color: var(--chestnut-dark); font-size: .8rem; line-height: 1.45; font-weight: 700; }
.profile-hero-source { grid-column: 1 / -1; margin: -.25rem 0 0; color: #6e554b; font-size: .875rem; line-height: 1.55; text-align: right; }
.profile-grid { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 1.5rem; max-width: 70rem; margin: auto; }
.profile-visual { padding: 1rem; transform: rotate(-1deg); }
.official-thumb { display: block; overflow: hidden; border: 3px solid var(--chestnut-dark); border-radius: 1rem; background: var(--body); text-decoration: none; }
.official-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.official-thumb span { display: block; padding: .7rem; background: var(--chestnut); color: white; font-weight: 700; text-align: center; }
.source-note { margin: .75rem 0 0; font-size: .875rem; line-height: 1.55; color: #6e554b; }
.related-links { margin: 1rem 0 .2rem; padding: 1rem; border: 3px solid var(--chestnut-dark); border-radius: 1.1rem .85rem 1.2rem .9rem; background: var(--cream); box-shadow: 0 4px 0 rgba(76,42,32,.12); }
.related-links h3 { margin: 0 0 .55rem; color: var(--chestnut); font-size: 1.25rem; }
.related-links a { display: flex; justify-content: space-between; gap: .7rem; padding: .45rem .25rem; border-bottom: 2px dotted var(--body-deep); font-weight: 700; text-decoration: none; }
.related-links a:last-child { border-bottom: 0; }
.related-links a:hover, .related-links a:focus-visible { color: var(--chestnut); text-decoration: underline; }
.profile-copy { position: relative; padding: clamp(1.25rem, 4vw, 2rem); }
.mini-stamp { position: absolute; right: 1rem; top: -1.3rem; padding: .45rem .7rem; border: 3px solid var(--chestnut-dark); border-radius: 50%; background: var(--yellow); font-family: "OngeulipRound", sans-serif; transform: rotate(9deg); }
.fact-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .75rem; margin: 0 0 1.5rem; }
.fact-list div { padding: .85rem; border: 3px dashed var(--body-deep); border-radius: 1rem; background: var(--cream); }
.fact-list dt { color: var(--chestnut); font-weight: 700; }
.fact-list dd { margin: .15rem 0 0; }
.fact-list small { display: block; margin-top: .15rem; color: #73594e; font-size: .82em; line-height: 1.45; }
.charm-points h3 { margin-bottom: .6rem; font-family: "OngeulipRound", sans-serif; font-size: 1.4rem; }
.charm-points ul { display: grid; gap: .7rem; padding: 0; margin: 0; list-style: none; }
.charm-points li { display: grid; grid-template-columns: 2rem 1fr; align-items: center; gap: .6rem; }
.charm-points li span { display: grid; place-items: center; width: 2rem; height: 2rem; border: 2px solid var(--chestnut); border-radius: 50%; background: var(--peach); font-weight: 700; }
.episodes-section { background: var(--sky); border-block: 4px solid var(--chestnut-dark); }
.nut-select-wrap { min-width: 14rem; display: grid; gap: .25rem; color: var(--chestnut); font-weight: 700; }
select { width: 100%; padding: .65rem 2.4rem .65rem .8rem; border: 3px solid var(--chestnut-dark); border-radius: 1rem; color: var(--ink); background: var(--cream); cursor: pointer; }
.episode-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; max-width: 70rem; margin: auto; }
.episode-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: 1rem; }
.episode-number { display: grid; place-items: center; width: 3.8rem; height: 3.8rem; border: 3px solid var(--chestnut-dark); border-radius: 48% 52% 46% 54%; background: var(--body); color: var(--chestnut); font-family: "OngeulipRound", sans-serif; font-size: 1.2rem; }
.episode-card h3 { margin: 0 0 .2rem; font-family: "OngeulipRound", sans-serif; font-size: 1.2rem; }
.episode-card p { margin: 0; font-size: .95rem; }
.status-tag { display: inline-block; margin-top: .4rem; padding: .2rem .6rem; border: 2px solid var(--chestnut-dark); border-radius: 999px; font-size: .875rem; line-height: 1.45; font-weight: 700; }
.tag-alcohol { background: var(--peach); }
.tag-soft { background: var(--mint); }
.tag-other { background: #eee6d5; }
.play-button { padding: .55rem .75rem; border: 3px solid var(--chestnut-dark); border-radius: .9rem; background: var(--yellow); font-weight: 700; cursor: pointer; box-shadow: 0 4px 0 var(--chestnut-dark); }
.play-button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--chestnut-dark); }

.pairings-section { background: var(--body); }
.section-heading .recipe-ai-note { color: #6d5146; font-size: .9rem; line-height: 1.6; }
.pairing-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); align-items: start; gap: 1rem; max-width: 72rem; margin: auto; }
.pairing-card { align-self: start; overflow: hidden; }
.pairing-card summary { position: relative; min-height: 11rem; padding: 1.25rem 4rem 1.25rem 1.25rem; cursor: pointer; list-style: none; }
.pairing-card summary::-webkit-details-marker { display: none; }
.pairing-card summary::after { content: "+"; position: absolute; right: 1rem; top: 1rem; display: grid; place-items: center; width: 2rem; height: 2rem; border: 3px solid var(--chestnut-dark); border-radius: 50%; background: white; font-family: "OngeulipRound", sans-serif; }
.pairing-card[open] summary::after { content: "−"; }
.pairing-emoji { font-size: 2rem; }
.pairing-card h3 { margin: .5rem 0 .2rem; color: var(--chestnut); font-family: "OngeulipRound", sans-serif; font-size: 1.35rem; }
.pairing-card summary p { margin: 0; }
.pairing-body { padding: 1.15rem; border-top: 3px dashed var(--chestnut); background: var(--cream); }
.pairing-meta { display: inline-block; margin: 0 0 .55rem; padding: .25rem .6rem; border: 2px solid var(--chestnut-dark); border-radius: 999px; background: var(--yellow); font-size: .9rem; font-weight: 700; }
.pairing-body h4 { margin: .8rem 0 .3rem; color: var(--chestnut); font-family: "OngeulipRound", sans-serif; }
.pairing-body h4:first-child { margin-top: 0; }
.pairing-body ul, .pairing-body ol { margin: .3rem 0; padding-left: 1.3rem; }
.pairing-body li { margin: .35rem 0; line-height: 1.6; }
.chef-tip { margin: .8rem 0 0; padding: .65rem .7rem; border: 2px solid var(--chestnut); border-radius: .8rem; background: var(--yellow); line-height: 1.6; }
.substitute { margin-top: .8rem; padding: .6rem .7rem; border: 2px dashed var(--mint-dark); border-radius: .8rem; background: var(--mint); }
.original-ingredient { margin: .65rem 0 0; padding: .6rem .7rem; border: 2px dashed var(--chestnut); border-radius: .8rem; background: #fff0e7; color: #684336; }
.adult-note { max-width: 72rem; margin: 1.4rem auto 0; font-size: .95rem; line-height: 1.65; }

.official-section { background: var(--cream); }
.checked-date { flex: 0 0 auto; padding: .45rem .75rem; border: 3px solid var(--chestnut); border-radius: 999px; background: var(--yellow); font-weight: 700; }
.news-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; max-width: 70rem; margin: auto; }
.news-card { padding: 1.3rem; }
.featured-news { background: #fff0e7; transform: rotate(-.4deg); }
.news-type { margin: .5rem 0 .2rem; color: var(--chestnut); font-weight: 700; }
.news-card h3 { margin: 0; font-family: "OngeulipRound", sans-serif; font-size: 1.45rem; }
.news-card > p:not(.news-type) { margin: .5rem 0 1rem; }
.news-status { display: inline-block; padding: .25rem .65rem; border: 2px solid var(--chestnut-dark); border-radius: 999px; font-size: .875rem; line-height: 1.45; font-weight: 700; }
.news-status.live { background: var(--peach); }
.news-status.soon { background: var(--yellow); }
.news-status.info { background: var(--sky); }
.news-status.official { background: var(--mint); }
.news-card a { display: inline-block; padding: .5rem .75rem; border: 3px solid var(--chestnut-dark); border-radius: .8rem; background: var(--chestnut); color: white; font-weight: 700; text-decoration: none; }
.goods-list { padding-left: 1.2rem; }
.button-row { display: flex; flex-wrap: wrap; gap: .5rem; }

.correction-box { display: flex; align-items: center; gap: 1rem; max-width: 60rem; margin: 2rem auto 0; padding: 1.2rem; background: var(--mint); }
.correction-box h2 { font-size: 1.6rem; }
.correction-box p { margin: .3rem 0 0; }
.feedback-link { padding: 0; border: 0; border-bottom: 2px solid currentColor; background: transparent; color: var(--chestnut); font: inherit; font-weight: 700; cursor: pointer; }
.feedback-link:hover { color: var(--chestnut-dark); }
.wobble-nut { font-size: 2.8rem; animation: wobble 1.3s infinite alternate ease-in-out; }
@keyframes wobble { to { transform: rotate(14deg) translateY(-3px); } }

footer { padding: 2.5rem 1rem; border-top: 4px solid var(--chestnut-dark); background: var(--chestnut); color: var(--cream); text-align: center; }
footer p { max-width: 55rem; margin: .25rem auto; font-size: .9rem; line-height: 1.65; }
footer button { margin-top: 1rem; padding: .55rem .8rem; border: 3px solid var(--cream); border-radius: 1rem; color: var(--cream); background: transparent; cursor: pointer; }
.admin-signin { display: block; width: fit-content; margin: 1rem auto 0; color: var(--cream); font-size: .8rem; }
.admin-signin[hidden] { display: none; }

.video-dialog { width: min(52rem, calc(100vw - 2rem)); padding: 1rem; border: 4px solid var(--chestnut-dark); border-radius: 1.4rem; background: var(--cream); box-shadow: 0 10px 0 rgba(76,42,32,.25); }
.video-dialog::backdrop { background: rgba(76,42,32,.62); }
.feedback-dialog { width: min(32rem, calc(100vw - 2rem)); padding: 1.25rem; border: 4px solid var(--chestnut-dark); border-radius: 1.4rem; background: var(--cream); color: var(--ink); box-shadow: 0 10px 0 rgba(76,42,32,.25); }
.feedback-dialog::backdrop { background: rgba(76,42,32,.62); }
.feedback-dialog label { display: block; margin: .5rem 0; font-weight: 700; }
.feedback-dialog textarea { display: block; box-sizing: border-box; width: 100%; min-height: 10rem; padding: .8rem; resize: vertical; border: 3px solid var(--chestnut-dark); border-radius: .8rem; background: var(--paper); color: var(--ink); font: inherit; line-height: 1.5; }
.feedback-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: .7rem; }
.feedback-actions span, .feedback-note { color: #665047; font-size: .85rem; }
.feedback-actions button, .more-feedback { padding: .55rem 1rem; border: 3px solid var(--chestnut-dark); border-radius: .8rem; background: var(--yellow); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 4px 0 var(--chestnut-dark); }
.feedback-actions button:disabled, .more-feedback:disabled { opacity: .6; cursor: wait; }
.feedback-status { min-height: 1.5em; margin: .7rem 0 .3rem; font-weight: 700; }
.feedback-note { margin: .2rem 0 0; }
.feedback-list { display: grid; gap: .85rem; max-width: 60rem; margin: 0 auto; }
.feedback-item { padding: 1rem 1.2rem; border: 3px solid var(--chestnut-dark); border-radius: 1rem; background: var(--paper); box-shadow: var(--shadow); }
.feedback-item time { color: var(--chestnut); font-size: .85rem; font-weight: 700; }
.feedback-item p { margin: .5rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.more-feedback { display: block; margin: 1.5rem auto 0; }
.more-feedback[hidden] { display: none; }
.dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .8rem; }
.dialog-top span { color: var(--chestnut); font-weight: 700; }
.dialog-top h2 { margin: 0; font-family: "OngeulipRound", sans-serif; }
.close-dialog { padding: .45rem .7rem; border: 3px solid var(--chestnut-dark); border-radius: .8rem; background: var(--peach); cursor: pointer; }
.video-frame { overflow: hidden; aspect-ratio: 16/9; border: 3px solid var(--chestnut-dark); border-radius: 1rem; background: var(--chestnut-dark); }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video-actions { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .7rem; }
.youtube-link { display: inline-block; color: var(--chestnut); font-weight: 700; }
.timestamp-button { padding: .55rem .8rem; border: 3px solid var(--chestnut-dark); border-radius: .9rem; background: var(--yellow); color: var(--ink); font-weight: 700; cursor: pointer; box-shadow: 0 4px 0 var(--chestnut-dark); }
.timestamp-button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--chestnut-dark); }

.characters-section { background: var(--body); }
.character-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; max-width: 70rem; margin: auto; }
.character-loading { grid-column: 1 / -1; margin: 0; padding: 2rem; border: 3px dashed var(--chestnut); border-radius: 1.2rem; background: var(--paper); text-align: center; }
.character-card { display: block; width: 100%; padding: .8rem; border: 4px solid var(--chestnut-dark); border-radius: 1.4rem 1.1rem 1.6rem 1rem; background: var(--paper); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; text-align: left; transition: transform .15s ease, box-shadow .15s ease; }
.character-card:nth-child(2) { transform: rotate(.55deg); }
.character-card:nth-child(3) { transform: rotate(-.5deg); }
.character-card:hover, .character-card:focus-visible { transform: translateY(-4px) rotate(0); box-shadow: 0 11px 0 rgba(76,42,32,.16); }
.character-card:active { transform: translateY(2px); }
.character-card-image { position: relative; overflow: hidden; border: 3px solid var(--chestnut-dark); border-radius: .8rem 1rem .9rem 1.05rem; background: var(--cream); }
.character-card-image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.character-card-image span { position: absolute; right: .7rem; bottom: .65rem; padding: .2rem .65rem; border: 2px solid var(--chestnut-dark); border-radius: 999px; background: var(--cream); color: var(--chestnut-dark); font-size: .88rem; font-weight: 700; }
.character-card-body { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .8rem .25rem .2rem; }
.character-card-body strong { color: var(--chestnut); font-family: "OngeulipRound", sans-serif; font-size: clamp(1.55rem, 2.5vw, 2rem); line-height: 1.2; }
.character-card-body span { flex: 0 0 auto; padding: .28rem .65rem; border: 2px solid var(--chestnut-dark); border-radius: 999px; background: var(--mint); font-size: .88rem; font-weight: 700; }
.character-card-intro { margin: 0; padding: 0 .25rem .45rem; color: #665047; font-size: .95rem; line-height: 1.55; }
.character-source-note { max-width: 70rem; margin: 1rem auto 0; color: #665047; font-size: .9rem; line-height: 1.55; }
.character-dialog { width: min(56rem, calc(100vw - 2rem)); max-height: min(86vh, 60rem); overflow: auto; padding: 1.2rem; border: 4px solid var(--chestnut-dark); border-radius: 1.4rem; background: var(--cream); box-shadow: 0 10px 0 rgba(76,42,32,.25); }
.character-dialog::backdrop { background: rgba(76,42,32,.62); }
.character-dialog-summary { margin: -.3rem 0 1rem; }
.character-dialog-note { margin: 0 0 1rem; padding: .75rem .85rem; border: 2px dashed var(--chestnut); border-radius: .8rem; background: var(--paper); font-size: .9rem; line-height: 1.55; }
.character-episode-list { display: grid; gap: .75rem; }
.character-episode { display: grid; grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: .65rem; border: 3px solid var(--chestnut-dark); border-radius: 1rem .8rem 1.1rem .9rem; background: var(--paper); }
.character-episode img { width: 100%; aspect-ratio: 16/9; border-radius: .55rem; object-fit: cover; }
.character-episode h3 { margin: 0; color: var(--chestnut); font-family: "OngeulipRound", sans-serif; font-size: 1.25rem; }
.character-episode p { margin: .15rem 0 0; font-size: .86rem; line-height: 1.45; }
.character-episode button { padding: .55rem .7rem; border: 3px solid var(--chestnut-dark); border-radius: .8rem; background: var(--yellow); color: var(--ink); font-weight: 700; cursor: pointer; }
.character-episode button:hover, .character-episode button:focus-visible { background: var(--mint); }

:focus-visible { outline: 4px solid #1671a5; outline-offset: 3px; }

@media (max-width: 880px) {
  .profile-hero { grid-template-columns: 1fr; padding-top: 5.4rem; background: linear-gradient(165deg, var(--paper) 0 42%, var(--body) 42% 100%); }
  .profile-hero-collage { padding-top: .65rem; }
  .profile-grid, .pairing-grid { grid-template-columns: 1fr; }
  .episode-list, .news-grid { grid-template-columns: 1fr; }
  .character-grid { gap: 1rem; }
  .pairing-card summary { min-height: auto; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .landing { min-height: max(36rem, calc(100svh - 245px)); padding-top: 4rem; background-position: 58% center; }
  .landing h1 { -webkit-text-stroke-width: 3px; }
  .ambient-player, body.inside-world .ambient-player {
    position: static;
    top: auto;
    bottom: auto;
    left: auto;
    width: 230px;
    margin: 1rem auto;
    padding: .3rem;
    transform: none;
    border-radius: .8rem;
    box-shadow: 0 4px 0 rgba(76,42,32,.2);
  }
  .ambient-player-heading, .ambient-player p { display: none; }
  .ambient-player #ambient-video { margin-top: 0; border-radius: .4rem; }
  .site-shell { display: block; }
  .site-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 90;
    width: min(19rem, 84vw);
    transform: translateX(-105%);
    transition: transform .2s ease;
    box-shadow: 10px 0 0 rgba(76,42,32,.14);
  }
  .site-shell.sidebar-open .site-sidebar { transform: translateX(0); }
  .sidebar-toggle {
    position: fixed;
    left: .75rem;
    top: .75rem;
    z-index: 80;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .55rem .75rem;
    border: 3px solid var(--chestnut-dark);
    border-radius: 1rem;
    color: white;
    background: var(--chestnut);
    font-weight: 700;
    box-shadow: 0 4px 0 var(--chestnut-dark);
    cursor: pointer;
  }
  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 85;
    display: block;
    width: 100%;
    border: 0;
    background: rgba(76,42,32,.52);
    cursor: pointer;
  }
  .section { padding-top: 5.5rem; }
  .row-heading { display: block; }
  .nut-select-wrap, .checked-date { margin-top: 1rem; }
  .episode-card { grid-template-columns: auto 1fr; }
  .play-button { grid-column: 1 / -1; width: 100%; }
  .video-actions { align-items: stretch; flex-direction: column; }
  .timestamp-button { width: 100%; }
  .character-grid { grid-template-columns: 1fr; }
  .character-episode { grid-template-columns: minmax(6rem, 8rem) minmax(0, 1fr); gap: .65rem; }
  .character-episode button { grid-column: 1 / -1; }
  .profile-hero-source { text-align: center; }
  .fact-list { grid-template-columns: 1fr; }
  .section { padding-inline: 1rem; }
}
