/* ===== 기본 (폰 · 세로 화면: 위에서 아래로 스크롤) ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: #f4f9ed; color: #263f30;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", Arial, sans-serif;
  font-size: 16px; line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none;
  -webkit-text-size-adjust: 100%;
}
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
button:disabled { cursor: default; }
button:not(:disabled):active { transform: translateY(2px) scale(.98); }
[hidden] { display: none !important; }
.ic { flex-shrink: 0; }

.picnic-app { max-width: 1080px; margin: auto; padding: 25px 30px 55px; padding-bottom: max(55px, env(safe-area-inset-bottom)); }
.picnic-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
h1 { letter-spacing: -1.3px; margin: 5px 0 0; font-size: clamp(23px, 3.3vw, 36px); line-height: 1.35; }
h1 span { color: #2b7747; }
.header-buttons { display: flex; gap: 8px; }
.quiet {
  color: #365a36; background: #fff; border: 1px solid #bbcdb0; border-radius: 13px;
  display: inline-flex; justify-content: center; align-items: center; gap: 7px;
  min-height: 46px; padding: 9px 16px; font-size: 15px; font-weight: 700;
}
.chapters { order: 3; width: 100%; color: #7d8976; display: flex; justify-content: center; gap: 45px; margin: 3px 0 0; padding: 0; font-size: 15px; font-weight: 700; list-style: none; }
.chapters li { display: flex; align-items: center; gap: 8px; }
.chapters li > span { background: #e1e8d8; border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; }
.chapters li[aria-current] { color: #245f36; }
.chapters li[aria-current] > span { color: #fff; background: #2e7546; }

.stage-row { margin-top: 20px; }
.storybook {
  position: relative; width: 100%; aspect-ratio: 2.1; overflow: hidden; isolation: isolate;
  border: 5px solid #fff; border-radius: 27px; box-shadow: 0 8px 30px #26482114;
  background-size: cover; background-position: 50% 60%; scroll-margin-top: 10px;
}
.forest { background-image: url(images/picnic-v2/forest.webp); background-position: 50%; }
.creek { background-image: url(images/picnic-v3/creek.webp); }
.scene-art { position: absolute; inset: 0; }
.forest .scene-art::after {
  content: ""; pointer-events: none; z-index: 50; position: absolute; inset: 0;
  background: url(images/picnic-v2/forest.webp) 50% / cover;
  -webkit-mask-image: linear-gradient(#0000 80%, #0004 100%); mask-image: linear-gradient(#0000 80%, #0004 100%);
}
.scene-label, .friend-count { z-index: 100; position: absolute; top: 15px; background: #ffffffeb; border-radius: 30px; padding: 5px 12px; font-size: 14px; font-weight: 700; }
.scene-label { left: 15px; }
.friend-count { right: 15px; color: #476b31; }
.creek .friend-count { top: auto; bottom: 10px; right: 12px; }

.sprite {
  position: absolute; display: block; pointer-events: none; aspect-ratio: 1;
  background-image: url(images/picnic-v1/sprites.webp); background-repeat: no-repeat; background-size: 400% 400%;
}
.sprite.supplemental { background-image: url(images/picnic-v1/supplemental.webp); }
.scene-art .sprite { filter: saturate(.82) contrast(.94); }
.scene-art .sprite:is([data-sprite=rabbit], [data-sprite=hen], [data-sprite=chick])::after {
  content: ""; z-index: -1; position: absolute; bottom: -1.5%; left: 13%; width: 76%; height: 7%;
  background: radial-gradient(#4e512b88 0%, #51562d40 48%, #0000 73%); border-radius: 50%; transform: translateY(20%);
}
.scene-art .sprite[data-sprite=chick]::after { width: 62%; left: 20%; }
.traveler { transition: left .75s ease-in-out, top .75s ease-in-out, transform .8s ease-in-out, opacity .7s; }
.stone { z-index: 1; }
.painted-scene { z-index: 60; position: absolute; inset: 0; margin: 0; background-repeat: no-repeat; background-size: 200% 200%; animation: scene-arrive .35s ease-out; }

.speech { background: #fff; border-radius: 20px; display: flex; align-items: center; gap: 16px; min-height: 88px; margin: 14px 0; padding: 14px 22px; box-shadow: 0 4px 14px #18381908; }
.speech p { flex: 1; margin: 0; font-size: 17px; font-weight: 600; word-break: keep-all; }
.speech-icon { flex-shrink: 0; color: #47722e; background: #e9f2df; border-radius: 15px; width: 45px; height: 45px; display: grid; place-items: center; }
.listening { letter-spacing: 4px; font-size: 23px; animation: pulse 1s infinite; }
.audio-error { color: #71420b; background: #fff0d6; border: 1px solid #e1a73e; border-radius: 12px; padding: 12px; margin: 0 0 14px; }

.play-panel { text-align: center; background: #fff; border: 1px solid #e0e9d6; border-radius: 24px; padding: 23px 28px; }
.play-panel h2 { letter-spacing: -.7px; margin: 0 0 19px; font-size: 23px; line-height: 1.4; }
.primary, .sound-button {
  color: #fff; background: #2c7244; border: 0; border-radius: 16px; box-shadow: 0 4px #184e2b;
  display: inline-flex; justify-content: center; align-items: center; gap: 10px;
  min-height: 54px; padding: 12px 26px; font-size: 17px; font-weight: 800;
}
.primary:disabled, .sound-button:disabled { opacity: .5; }
.sound-button { background: #315f9e; box-shadow: 0 4px #1e4276; margin: 0 0 13px; }
.letter-row { display: flex; justify-content: center; gap: 15px; max-width: 650px; margin: 0 auto 24px; }
.letter-card {
  color: #273d2d; background: #fffdf3; border: 2px solid #d8d6bd; border-radius: 20px; box-shadow: 0 4px #e5e5d5;
  display: flex; flex-direction: column; justify-content: center; align-items: center; width: 112px; min-width: 0; padding: 10px 15px;
}
.letter-card b { font-family: "Trebuchet MS", Arial, sans-serif; font-size: 64px; font-weight: 700; line-height: 1.2; }
.letter-card span { display: flex; align-items: center; gap: 5px; margin-top: 9px; font-size: 14px; }
.letter-card.playing { background: #eaf5df; border-color: #2e7945; }
.letter-card:disabled { opacity: .6; }
.answer-row { margin: 8px auto 10px; }
.answer-row .letter-card { min-height: 103px; }
.question-title { display: flex; justify-content: center; align-items: baseline; gap: 18px; }
.question-title > span { color: #64815a; font-size: 15px; }
.hint { color: #5d6d57; margin: 15px 0 0; font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; margin-top: 18px; }
.panel-title + .actions { margin-top: 0; }

.word-intro { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.word-intro .word-card { width: auto; }
.word-intro .word-picture { height: 110px; }
.word-game { display: flex; justify-content: center; align-items: center; gap: 30px; }
.reference-word { background: #f0f6e8; border-radius: 20px; width: 190px; padding: 12px; }
.small-label { color: #507441; font-size: 14px; font-weight: 700; }
.word-options { display: flex; gap: 15px; }
.word-card { position: relative; border: 2px solid #dee4d7; border-radius: 18px; width: 180px; padding: 10px; }
.word-card.selected { background: #f0f7e9; border-color: #2b7142; }
.word-picture { position: relative; width: 100%; height: 135px; }
.word-picture .sprite { max-width: 140px; }
.word-picture .word-art { position: absolute; left: 7%; top: 5%; width: 86%; height: 90%; object-fit: contain; }
.word-picture.bag { background: url(images/picnic-v1/supplemental.webp) 0 100% / 200% 200% no-repeat; }
.word-picture.zip-demo { animation: bag-cycle 1.3s step-end infinite; }
.demo-slider { position: absolute; z-index: 5; top: 41%; left: 28%; width: 8px; height: 12px; background: #eac26a; border: 2px solid #e5b144; border-radius: 3px; }
.zip-demo .demo-slider { animation: zip 1.2s ease-in-out infinite alternate; }
.zip-label { display: block; color: #665437; margin-bottom: 5px; font-size: 14px; line-height: 1.3; }
.listen-word {
  color: #244e78; background: #eef5ff; border: 0; border-radius: 10px;
  display: flex; justify-content: center; align-items: center; gap: 5px; width: 100%; min-height: 43px; padding: 9px 6px; font-size: 15px; font-weight: 700;
}
.listen-word:disabled, .pick-word:disabled { opacity: .55; }
.pick-word { color: #365b2f; background: #fff; border: 1px solid #b8c9ae; border-radius: 10px; width: 100%; min-height: 43px; margin-top: 8px; font-size: 14px; font-weight: 700; }
.selected .pick-word { color: #fff; background: #2b7142; }
.word-result { display: flex; justify-content: center; gap: 35px; margin: 0; font-family: Arial, sans-serif; font-size: 34px; font-weight: 700; color: #263f30; }
.word-result strong { color: #ae5010; background: #fff0c8; border-radius: 7px; padding: 0 4px; }

.wiggle { animation: wiggle .16s infinite alternate; }
.emerge { animation: emerge .7s ease-out; }
@keyframes pulse { 50% { opacity: .3; } }
@keyframes wiggle { to { rotate: 7deg; } }
@keyframes emerge { 0% { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: 0; } }
@keyframes zip { to { left: 65%; } }
@keyframes bag-cycle { 0%, to { background-position: 0 100%; } 50% { background-position: 100% 100%; } }
@keyframes hop-a { 50% { translate: 0 -20px; } }
@keyframes hop-b { 50% { translate: 0 -20px; } }
@keyframes scene-arrive { 0% { opacity: .55; } to { opacity: 1; } }

@media (max-width: 650px) {
  .picnic-app { padding: 15px 12px 30px; }
  .picnic-header { gap: 8px; }
  .picnic-header .quiet { min-width: 46px; padding: 9px; }
  .picnic-header .btn-text { display: none; }
  h1 { letter-spacing: -1px; font-size: 23px; }
  .chapters { gap: 17px; margin: 8px 0 0; font-size: 14px; }
  .chapters li { gap: 5px; }
  .stage-row { margin-top: 12px; }
  .storybook { border-width: 3px; border-radius: 20px; }
  .scene-label, .friend-count { padding: 4px 8px; font-size: 12px; top: 9px; }
  .scene-label { left: 8px; }
  .friend-count { right: 8px; }
  .speech { gap: 10px; min-height: 82px; padding: 12px; }
  .speech p { font-size: 16px; }
  .speech-icon { border-radius: 10px; width: 34px; height: 34px; }
  .play-panel { padding: 19px 12px; }
  .play-panel h2 { font-size: 20px; }
  .letter-row { gap: 7px; }
  .letter-card { flex: 1; border-radius: 13px; padding: 10px 4px; }
  .letter-card b { font-size: 49px; }
  .letter-card span { gap: 2px; font-size: 14px; }
  .letter-card span svg { width: 13px; }
  .answer-row .letter-card { max-width: 120px; min-height: 80px; }
  .primary, .sound-button { font-size: 16px; }
  .question-title { gap: 10px; }
  .question-title > span { font-size: 14px; }
  .word-game { align-items: stretch; gap: 10px; }
  .reference-word { display: flex; flex-direction: column; justify-content: center; width: 29%; padding: 6px; }
  .word-options { gap: 7px; width: 69%; }
  .word-card { width: 50%; padding: 6px; }
  .word-picture { height: 95px; }
  .listen-word { flex-wrap: wrap; gap: 2px; font-size: 14px; }
  .listen-word svg { width: 15px; }
  .pick-word { padding: 5px 2px; font-size: 14px; }
  .hint { font-size: 14px; }
  .word-result { font-size: 29px; }
  .word-intro { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .word-intro .word-picture { height: 120px; }
}

/* ===== 전자칠판 · 태블릿 가로 · PC (1600×900 판을 화면에 꽉 맞게 확대/축소, 스크롤 없음) ===== */
body.board { position: fixed; inset: 0; overflow: hidden; }
.board #app {
  position: absolute; left: 0; top: 0; transform-origin: 0 0;
  width: 1600px; height: 900px; max-width: none; margin: 0; padding: 20px 34px 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.board .picnic-header { flex-wrap: nowrap; gap: 30px; }
.board h1 { font-size: 38px; margin: 0; line-height: 1.25; }
.board .chapters { order: 0; width: auto; flex: 1; margin: 0; gap: 46px; font-size: 21px; }
.board .chapters li { gap: 11px; }
.board .chapters li > span { width: 36px; height: 36px; font-size: 18px; }
.board .header-buttons { gap: 12px; }
.board .quiet { min-height: 58px; padding: 10px 22px; font-size: 19px; border-radius: 16px; }

.board.narrow .header-buttons .btn-text { display: none; }
.board.narrow .header-buttons .quiet { width: 58px; padding: 0; }
.board.narrow .chapters { gap: 30px; }
.board .stage-row { margin: 0; flex: 0 1 var(--row, 540px); min-height: 0; display: flex; gap: 24px; }
.board .storybook { height: 100%; width: auto; flex: none; border-width: 6px; border-radius: 30px; }
.board .scene-label, .board .friend-count { font-size: 18px; padding: 6px 16px; top: 16px; }
.board .creek .friend-count { top: auto; bottom: 14px; }
.board .speech {
  flex: 1; min-width: 0; margin: 0; padding: 26px 28px; border-radius: 30px;
  flex-direction: column; align-items: flex-start; justify-content: center; gap: 18px;
}
.board .speech p { flex: none; font-size: 28px; line-height: 1.55; font-weight: 700; }
.board .speech-icon { width: 58px; height: 58px; border-radius: 18px; }
.board .listening { font-size: 34px; line-height: 1; }
.board .audio-error { position: absolute; z-index: 10; top: 96px; left: 50%; transform: translateX(-50%); margin: 0; font-size: 20px; padding: 14px 24px; box-shadow: 0 8px 30px #0002; }

.board .play-panel {
  flex: 1 0 auto; padding: 18px 30px; border-radius: 30px; text-align: left;
  display: grid; grid-template-columns: 1fr auto; align-content: center; align-items: center; column-gap: 24px; row-gap: 12px;
  grid-template-areas: "title actions" "body body" "hint hint";
}
.board .panel-title { grid-area: title; }
.board .panel-body { grid-area: body; }
.board .hint { grid-area: hint; margin: 0; font-size: 20px; text-align: center; }
.board .actions { grid-area: actions; margin: 0; flex-wrap: nowrap; }
.board .actions .quiet { min-height: 70px; padding: 14px 26px; font-size: 22px; border-radius: 20px; }
.board .play-panel h2 { margin: 0; font-size: 32px; }
.board .question-title { justify-content: flex-start; gap: 20px; }
.board .question-title > span { font-size: 22px; font-weight: 700; }
.board .primary, .board .sound-button { min-height: 70px; padding: 14px 32px; font-size: 24px; border-radius: 20px; box-shadow: 0 5px #184e2b; }
.board .primary.big { min-height: 84px; padding: 16px 44px; font-size: 28px; }
.board .sound-button { box-shadow: 0 5px #1e4276; margin: 0; min-height: 110px; padding: 18px 36px; font-size: 28px; }
.board .choice-row { display: flex; justify-content: center; align-items: center; gap: 40px; }
.board .letter-row { max-width: none; margin: 0 auto; gap: 22px; }
.board .answer-row { margin: 0; }
.board .letter-card { width: 170px; padding: 12px 16px; border-radius: 24px; border-width: 3px; box-shadow: 0 5px #e5e5d5; }
.board .letter-card b { font-size: 88px; line-height: 1.1; }
.board .letter-card span { font-size: 19px; margin-top: 6px; }
.board .answer-row .letter-card { width: 190px; min-height: 150px; }
.board .answer-row .letter-card b { font-size: 104px; }

.board .word-intro { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 12px; }
.board .word-intro .word-card { padding: 8px; }
.board .word-intro .word-picture { height: 104px; }
.board .word-intro .zip-label { font-size: 13px; margin: -4px 0 4px; }
.board .listen-word { min-height: 52px; font-size: 19px; border-radius: 12px; }
.board .pick-word { min-height: 52px; font-size: 18px; border-radius: 12px; margin-top: 8px; }

.board .word-game { gap: 34px; }
.board .word-options { gap: 20px; }
.board .word-game .word-card, .board .reference-word {
  flex: 0 1 360px; min-width: 0; width: auto; padding: 12px 14px; border-radius: 22px;
  display: grid; grid-template-columns: 150px 1fr; column-gap: 14px; align-content: center; align-items: center;
}
.board .word-game .word-picture { grid-row: 1 / span 3; height: 138px; }
.board .word-game .word-picture .sprite { max-width: 150px; }
.board .word-game .zip-label { font-size: 15px; margin: 0; }
.board .reference-word { flex-basis: 370px; }
.board .reference-word .small-label { grid-column: 1 / -1; }
.board .reference-word .word-picture { grid-row: auto; }
.board .small-label { font-size: 18px; }
.board .word-result { font-size: 46px; gap: 50px; }

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { transition: none !important; animation: none !important; }
}
.copyright { text-align: center; color: #5d6d57; opacity: .75; font-size: 12px; margin: 0; padding: 0 0 12px; }
body.board .copyright { position: fixed; left: 0; right: 0; bottom: 0; padding-bottom: 2px; font-size: 11px; line-height: 15px; pointer-events: none; }
