:root {
  color-scheme: light;
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --blue: #4f8af0;
  --ink: #204d76;
  --sky: #eaf6ff;
  --coral: #ff825f;
  --line: #cfe4f3;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #d8f3ff;
}

body {
  display: grid;
  place-items: center;
}

button {
  font: inherit;
}

#app {
  position: fixed;
  top: 0;
  left: 0;
  width: 1280px;
  height: 720px;
  overflow: hidden;
  color: var(--ink);
  background: var(--sky);
  box-shadow: 0 22px 72px rgb(27 79 118 / 22%);
  transform-origin: left top;
}

.screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.995);
  transition: opacity 220ms ease, transform 220ms ease;
}

.screen.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.intro-screen {
  background: #a9e7fb;
}

.intro-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: intro-background-enter 0.55s ease-out both;
}

.intro-clouds {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.intro-cloud {
  position: absolute;
  left: 0;
  display: block;
  height: auto;
  opacity: 0.88;
  animation: intro-cloud-drift var(--cloud-duration) linear infinite;
  animation-delay: var(--cloud-delay);
  will-change: transform;
}

.intro-cloud-1 {
  top: 38px;
  width: 142px;
  --cloud-duration: 68s;
  --cloud-delay: -3s;
  --cloud-drift-y: -5px;
}

.intro-cloud-2 {
  top: 184px;
  width: 96px;
  opacity: 0.62;
  --cloud-duration: 52s;
  --cloud-delay: -11.6s;
  --cloud-drift-y: 4px;
}

.intro-cloud-3 {
  top: 108px;
  width: 122px;
  opacity: 0.76;
  --cloud-duration: 88s;
  --cloud-delay: -33.2s;
  --cloud-drift-y: -3px;
}

.intro-cloud-4 {
  top: 132px;
  width: 176px;
  opacity: 0.88;
  --cloud-duration: 61s;
  --cloud-delay: -33.2s;
  --cloud-drift-y: 6px;
}

.intro-cloud-5 {
  top: 66px;
  width: 116px;
  opacity: 0.68;
  --cloud-duration: 108s;
  --cloud-delay: -75.6s;
  --cloud-drift-y: 3px;
}

.intro-cloud-6 {
  top: 150px;
  width: 158px;
  opacity: 0.82;
  --cloud-duration: 74s;
  --cloud-delay: -62.1s;
  --cloud-drift-y: -6px;
}

@keyframes intro-cloud-drift {
  from {
    transform: translate3d(-260px, 0, 0);
  }

  50% {
    transform: translate3d(640px, 0, 0);
  }

  to {
    transform: translate3d(1540px, 0, 0);
  }
}

.course-title {
  position: absolute;
  z-index: 5;
  top: 40px;
  left: 50%;
  width: 545px;
  aspect-ratio: 1564 / 558;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
  filter: drop-shadow(0 5px 7px rgb(24 97 138 / 16%));
  animation: course-title-enter 0.72s cubic-bezier(0.22, 1.25, 0.42, 1) 3.75s forwards;
}

.course-title-piece {
  position: absolute;
  display: block;
  height: auto;
  animation: title-piece-bounce 5s ease-in-out infinite both;
}

.course-title-piece-1 {
  top: 2.82%;
  left: 9.5%;
  width: 45.13%;
  transform-origin: 28% 25%;
  animation-delay: 3.84s;
}

.course-title-piece-2 {
  top: 7.58%;
  left: 52.75%;
  width: 40.56%;
  transform-origin: 77% 25%;
  animation-delay: 3.98s;
}

.course-title-piece-3 {
  top: 52.91%;
  left: 6.63%;
  width: 33.13%;
  transform-origin: 21% 75%;
  animation-delay: 4.12s;
}

.course-title-piece-4 {
  top: 53.26%;
  left: 40.38%;
  width: 58.56%;
  transform-origin: 70% 75%;
  animation-delay: 4.26s;
}

.course-title-star {
  position: absolute;
  display: block;
  height: auto;
  opacity: 1;
  transform: scale(0);
  transform-origin: center;
  animation: course-title-star-twinkle 5s ease-in-out infinite;
}

.course-title-star-1 {
  top: 17.99%;
  left: 1%;
  width: 7.69%;
  animation-delay: 4.82s;
}

.course-title-star-2 {
  top: 34.22%;
  left: 6.81%;
  width: 4.75%;
  animation-delay: 4.96s;
}

.course-title-star-3 {
  top: 31.39%;
  left: 92.63%;
  width: 5.06%;
  animation-delay: 5.1s;
}

.course-title-star-4 {
  top: 72.66%;
  left: 2.94%;
  width: 4.94%;
  animation-delay: 5.24s;
}

.character {
  position: absolute;
  z-index: 6;
  width: 120px;
  height: 120px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  transform: translateY(22px) scale(0.62);
  animation:
    intro-character-enter 0.58s cubic-bezier(0.22, 1.35, 0.42, 1) 4.45s forwards,
    character-float 2.8s ease-in-out 5.03s infinite;
}

.character img,
.character-sprite {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 7px 3px rgb(31 82 102 / 16%));
}

.character img {
  object-fit: contain;
}

.character-sprite {
  background-repeat: no-repeat;
  background-position: left top;
  background-size: 500% 400%;
}

.character-sprite-byeoli {
  background-image: url("../characters/byeoli/byeoli-talk-spritesheet.png?v=260731-left7");
}

.has-cut-dom-layers { position:relative; }
.cut-dom-overlay { position:absolute; inset:0; z-index:8; overflow:hidden; pointer-events:none; }
/* 선택 카드 위젯보다 앞에 놓인 레이어를 그리는 캔버스입니다. #cut-stage 와 같은 규격이어야 합니다. */
.cut-fore-stage { position:absolute; inset:0; z-index:9; display:block; width:100%; height:100%; object-fit:contain; pointer-events:none; }
.cut-video-layer { position:absolute; inset:7% 8% 14%; width:84%; height:79%; border:0; border-radius:22px; background:#10263a; object-fit:contain; pointer-events:auto; box-shadow:0 12px 36px rgba(13,43,68,.28); }
.cut-simple-choices { position:absolute; right:0; bottom:var(--choice-widget-bottom,8%); left:0; display:grid; grid-template-columns:repeat(var(--choice-count,2),minmax(0,1fr)); gap:var(--choice-gap,18px); width:var(--choice-widget-width,88%); margin:0 auto; pointer-events:auto; }
.cut-interaction-question { position:absolute; left:50%; top:12%; width:min(76%,760px); translate:-50% 0; padding:16px 24px; border:4px solid #fff; border-radius:22px; color:#184d76; background:rgba(255,255,255,.94); box-shadow:0 10px 30px rgba(25,73,110,.2); font:900 25px/1.35 inherit; text-align:center; }
.cut-simple-choices button { min-width:148px; padding:14px 22px; border:3px solid #fff; border-radius:999px; background:linear-gradient(180deg,#ff9877,#ff7257); color:#fff; font:800 18px/1.2 inherit; box-shadow:0 7px 0 #d94f3b,0 10px 24px rgba(113,51,37,.2); }
.cut-simple-choices button:hover,.cut-simple-choices button:focus-visible { background:linear-gradient(180deg,#6db2f6,#438be0); box-shadow:0 7px 0 #2d69ae,0 10px 24px rgba(35,83,135,.2); }
.cut-simple-choices button.situation-choice-card { width:auto; min-width:0; padding:10px 10px 15px; border:5px solid #48a6dd; border-radius:28px; background:#edf9ff; color:#17496f; box-shadow:0 9px 0 #2e8fc8,0 14px 30px rgba(26,62,89,.24); overflow:hidden; }
.cut-simple-choices button.has-choice-image img { display:block; width:100%; height:auto; aspect-ratio:16/9; margin:0 0 11px; border-radius:18px; object-fit:cover; }
.cut-simple-choices button.has-choice-image span { display:grid; min-height:54px; place-items:center; padding:0 8px; font:900 clamp(14px,1.7vw,24px)/1.3 inherit; }
.cut-simple-choices button.situation-choice-card:hover,.cut-simple-choices button.situation-choice-card:focus-visible { border-color:#2d8fc9; background:#fff; box-shadow:0 9px 0 #2479ac,0 14px 30px rgba(35,83,135,.28); transform:translateY(-2px); }

.character-sprite-songi {
  background-image: url("../characters/songi/songi-talk-spritesheet.png");
}

.character-byeoli {
  top: 100px;
  left: 268px;
}

.character-songi {
  top: 98px;
  right: 250px;
  animation-delay: 4.62s, 5.2s;
}

.character .speech {
  position: absolute;
  top: 92px;
  left: 50%;
  width: max-content;
  max-width: 230px;
  padding: 9px 15px;
  border: 3px solid #fff;
  border-radius: 20px;
  color: #315d7b;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 6px 15px rgb(49 107 139 / 14%);
  font-size: 14px;
  font-weight: 900;
  opacity: 0;
  transform: translate(-50%, 8px) scale(0.92);
  transition: 160ms ease;
}

.character.is-speaking .speech {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.character .speech-guide {
  top: -4px;
  left: -100px;
  display: grid;
  width: 240px;
  max-width: none;
  height: 114px;
  padding: 0;
  place-items: center;
  overflow: visible;
  isolation: isolate;
  border: 0;
  border-radius: 0;
  white-space: normal;
  line-height: 1.45;
  background: transparent;
  box-shadow: none;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  clip-path: circle(0 at 86% 70%);
  animation:
    guide-speech-reveal 0.62s cubic-bezier(0.2, 1.2, 0.35, 1) 5.35s forwards,
    guide-cloud-float 4s ease-in-out 5.97s infinite;
}

.character .speech-guide::before {
  position: absolute;
  z-index: 0;
  inset: 18px 7px 7px 5px;
  border-radius: 54px 50px 52px 48px;
  background: rgb(255 255 255 / 97%);
  box-shadow:
    inset 0 -7px 0 rgb(207 235 247 / 18%),
    0 10px 22px rgb(49 107 139 / 15%);
  content: "";
}

.character .speech-guide::after {
  position: absolute;
  z-index: 0;
  top: 1px;
  left: 35px;
  width: 74px;
  height: 62px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    62px -14px 0 9px #fff;
  content: "";
}

.speech-guide-text {
  position: relative;
  z-index: 2;
  display: block;
  margin-top: 17px;
  color: #315d7b;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.5;
  text-align: center;
}

.topic {
  position: absolute;
  z-index: 4;
  opacity: 0;
  transform: translateY(34px) scale(0.12, 0.08);
  transform-origin: 50% 100%;
  animation: topic-sprout 0.92s linear forwards;
}

.topic-life {
  animation-delay: 0.55s;
}

.topic-traffic {
  animation-delay: 0.93s;
}

.topic-violence {
  animation-delay: 1.31s;
}

.topic-cyber {
  animation-delay: 1.69s;
}

.topic-disaster {
  animation-delay: 2.07s;
}

.topic-job {
  animation-delay: 2.45s;
}

.topic-firstaid {
  animation-delay: 2.83s;
}

.topic:hover,
.topic:focus-within {
  z-index: 100;
}

.topic-button {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 8px 4px rgb(70 105 55 / 16%));
  transition: transform 150ms ease, filter 150ms ease;
}

.topic-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.topic-title {
  position: absolute;
  z-index: 12;
  bottom: -24px;
  left: 50%;
  width: auto;
  min-width: 0;
  max-width: none;
  height: 37px;
  pointer-events: none;
  filter: drop-shadow(0 4px 2px rgb(72 79 99 / 18%));
  transform: translateX(-50%);
  transform-origin: 50% 50%;
  transition: transform 150ms ease, filter 150ms ease;
}

.topic:hover .topic-title,
.topic:focus-within .topic-title {
  z-index: 111;
  filter: drop-shadow(0 6px 3px rgb(44 103 125 / 22%));
  transform: translate(-50%, -7px) scale(1.05);
}

.topic-cyber .topic-title {
  bottom: 22px;
  left: 130px;
}

.topic-job .topic-title {
  bottom: 22px;
  left: 180px;
}

.topic-button:hover,
.topic-button:focus-visible {
  z-index: 20;
  outline: 0;
  filter: drop-shadow(0 12px 7px rgb(44 103 125 / 25%));
  transform: translateY(-7px) scale(1.08);
}

.topic-button:focus-visible::after {
  position: absolute;
  inset: 2px;
  border: 4px solid #ffcc3d;
  border-radius: 30px;
  content: "";
}

.topic-life {
  top: 330px;
  left: 193px;
  width: 202px;
  height: 124px;
}

.topic-traffic {
  top: 240px;
  left: 508px;
  width: 227px;
  height: 148px;
}

.topic-traffic .topic-title {
  bottom: -7px;
}

.topic-violence {
  top: 330px;
  left: 850px;
  width: 157px;
  height: 130px;
}

.topic-cyber {
  top: 410px;
  left: 567px;
  width: 108px;
  height: 117px;
}

.topic-disaster {
  top: 487px;
  left: 163px;
  width: 163px;
  height: 126px;
}

.topic-job {
  top: 552px;
  left: 515px;
  width: 168px;
  height: 118px;
}

.topic-firstaid {
  top: 471px;
  left: 937px;
  width: 134px;
  height: 142px;
}

.topic-flyout {
  position: absolute;
  z-index: 120;
  top: calc(100% + 8px);
  left: 50%;
  display: flex;
  flex-direction: column;
  width: 230px;
  padding: 12px;
  border: 3px solid #fff;
  border-radius: 22px;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 14px 30px rgb(38 86 118 / 24%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -8px) scale(0.96);
  transition: 150ms ease;
}

.topic:hover .topic-flyout,
.topic:focus-within .topic-flyout {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.topic:hover .topic-button,
.topic:focus-within .topic-button {
  z-index: 110;
}

.topic-flyout strong {
  padding: 3px 8px 8px;
  color: #28699a;
  font-size: 18px;
  text-align: center;
}

.topic-flyout button {
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  color: #48697e;
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  word-break: keep-all;
  cursor: pointer;
}

.topic-flyout button:hover,
.topic-flyout button:focus-visible {
  outline: 0;
  color: #205e8d;
  background: var(--sky);
}

.topic-disaster .topic-flyout,
.topic-job .topic-flyout,
.topic-firstaid .topic-flyout {
  top: auto;
  bottom: calc(100% + 8px);
}

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  width: 100%;
  height: 104px;
  padding: 18px 254px 18px 88px;
  background:
    linear-gradient(180deg, #00b0f0 0%, #58d5f9 50%, #c3f7fd 100%);
}

.skip-link {
  position: absolute;
  z-index: 100;
  top: 8px;
  left: 50%;
  padding: 10px 18px;
  border: 3px solid #153f68;
  border-radius: 18px;
  color: #153f68;
  background: #fff;
  box-shadow: 0 6px 14px rgb(22 69 107 / 22%);
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  opacity: 0;
  transform: translate(-50%, -150%);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.skip-link:focus {
  outline: 0;
  opacity: 1;
  transform: translate(-50%, 0);
}

.home-button {
  position: absolute;
  left: 19px;
  display: grid;
  width: 92px;
  height: 92px;
  padding: 0;
  place-items: center;
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition:
    transform 160ms ease,
    filter 160ms ease;
}

.home-button img {
  display: block;
  width: 92px;
  height: 92px;
  object-fit: contain;
}

.home-button:hover,
.home-button:focus-visible {
  outline: 0;
  filter: drop-shadow(0 5px 5px rgb(25 85 150 / 25%));
  transform: translateY(-1px) scale(1.06);
}

.home-button:focus-visible {
  border-radius: 12px;
  box-shadow: 0 0 0 4px #153f68;
}

.home-button::after {
  position: absolute;
  z-index: 30;
  left: 50%;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 150ms ease,
    transform 150ms ease,
    visibility 150ms ease;
}

.home-button::after {
  top: auto;
  bottom: 7px;
  padding: 7px 12px;
  border: 1px solid #cce4f4;
  border-radius: 14px;
  color: #245879;
  background: #fff;
  box-shadow: 0 6px 14px rgb(35 90 126 / 18%);
  content: "첫 화면으로";
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  transform: translate(-50%, -2px);
}

.home-button:hover::after,
.home-button:focus-visible::after {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, 0);
}

.gnb-shell {
  display: grid;
  width: 860px;
  margin-left: 30px;
  gap: 1px;
  transform: translateY(3px);
}

.gnb {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  width: 100%;
  height: 36px;
  overflow: hidden;
  border: 1px solid #e1eaf4;
  border-radius: 18px;
  background: rgb(255 255 255 / 98%);
  box-shadow: 0 3px 10px rgb(29 83 136 / 12%);
}

.gnb > button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: calc(100% - 8px);
  height: calc(100% - 4px);
  min-width: 0;
  margin: 2px 4px;
  padding: 0 6px;
  border: 1.5px solid transparent;
  border-radius: 15px;
  color: #2f587c;
  background: transparent;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.gnb > button:hover,
.gnb > button.is-previewing {
  outline: 0;
  border-color: #c8dff0;
  color: #234d73;
  background: #eef7fd;
}

.gnb > button:focus-visible {
  z-index: 1;
  outline: 3px solid #153f68;
  outline-offset: -1px;
  color: #153f68;
  background: #e8f5ff;
}

.gnb > button.is-current {
  border: 1.5px solid #ff986f;
  color: #dc523f;
  background: #fff4ef;
}

.gnb-subnav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 27px;
  padding: 2px 8px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: rgb(255 255 255 / 50%);
  box-shadow: none;
}

.gnb-subnav a {
  display: inline-grid;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
  height: 21px;
  padding: 0 10px;
  border-radius: 8px;
  color: #2c5677;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.gnb-subnav a i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9dbbd1;
}

.gnb-subnav a:hover,
.gnb-subnav a:focus-visible {
  outline: 0;
  color: #174f7a;
  background: var(--sky);
}

.gnb-subnav a:focus-visible {
  box-shadow: inset 0 0 0 2px #266b9f;
}

.gnb-subnav a[aria-current="page"] {
  color: #d8503d;
  background: #fff2ec;
}

.gnb-subnav a[aria-current="page"] i {
  background: #f06b55;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
}

.dot-life { background: #f28f65; }
.dot-traffic { background: #f3c84b; }
.dot-violence { background: #54bfa8; }
.dot-cyber { background: #60a8f5; }
.dot-disaster { background: #9a83e5; }
.dot-job { background: #f06464; }
.dot-firstaid { background: #ef7db1; }

.topbar-title {
  position: absolute;
  top: 7px;
  right: 10px;
  width: 232px;
  height: 90px;
  object-fit: contain;
}

.course-layout {
  display: grid;
  grid-template-columns: 212px 1fr;
  height: 616px;
  background: var(--sky);
}

.lesson-sidebar {
  margin: 16px 0 16px 18px;
  padding: 14px 10px;
  border: 1px solid #d4e7f4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 12px rgb(44 95 130 / 8%);
}

.lesson-heading {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: center;
  padding: 0 7px 10px;
  border-bottom: 1px solid #e5eef5;
}

.lesson-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: var(--blue);
  font-size: 20px;
  font-weight: 900;
}

.lesson-heading strong {
  color: #254e70;
  font-size: 14px;
  line-height: 1.25;
}

.toc-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px;
  width: 100%;
  min-height: 140px;
  margin-top: 8px;
  padding: 12px 8px;
  border: 2px solid transparent;
  border-radius: 14px;
  color: #657e91;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.toc-item:hover,
.toc-item:focus-visible {
  outline: 0;
  background: #f4faff;
}

.toc-item.is-current {
  border-color: #abd1ff;
  color: #2e6db8;
  background: #eff7ff;
}

.toc-number {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #9db8cd;
  font-size: 15px;
  font-weight: 900;
}

.toc-item.is-current .toc-number {
  background: #ff8d61;
}

.toc-item strong {
  display: block;
  margin: 3px 0 13px;
  font-size: 17px;
}

.toc-item small {
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.content-panel {
  position: relative;
  min-width: 0;
  padding: 16px 25px 74px 24px;
}

.content-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 54px;
}

.heading-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 50%;
  color: #8a6110;
  background: #ffd563;
  font-size: 25px;
  font-weight: 900;
}

.content-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.15;
}

.player-card {
  height: 484px;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 7px 16px rgb(48 101 137 / 12%);
}

.player-card.is-unpublished .play-button {
  display: none;
}

.player-card.is-unpublished .player-controls {
  opacity: 0.55;
}

.interaction-card {
  height: 456px;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 7px 16px rgb(48 101 137 / 12%);
}

.interaction-card[hidden] {
  display: none;
}

.interaction-stage {
  position: relative;
  height: 100%;
  overflow: hidden;
  padding: 28px 34px;
  background:
    radial-gradient(circle at 12% 20%, rgb(255 231 122 / 36%) 0 58px, transparent 60px),
    radial-gradient(circle at 88% 15%, rgb(136 222 255 / 34%) 0 72px, transparent 74px),
    linear-gradient(155deg, #fafdff 0%, #eef8ff 54%, #fff9e9 100%);
}

.interaction-step-dots {
  position: absolute;
  z-index: 10;
  top: 18px;
  right: 22px;
  display: flex;
  gap: 7px;
}

.interaction-step-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c9dce9;
}

.interaction-step-dots i.is-current {
  width: 24px;
  border-radius: 6px;
  background: var(--coral);
}

.interaction-intro-characters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  width: 720px;
  margin: 4px auto 0;
}

.interaction-character-card {
  position: relative;
  display: grid;
  grid-template-columns: 145px 1fr;
  grid-template-rows: auto 1fr auto;
  gap: 7px 14px;
  min-height: 300px;
  padding: 20px;
  overflow: hidden;
  border: 3px solid #d7e8f4;
  border-radius: 28px;
  color: #315d7b;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 10px 24px rgb(58 105 133 / 13%);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.interaction-character-card:hover,
.interaction-character-card:focus-visible {
  outline: 5px solid #ffe26a;
  outline-offset: 3px;
  transform: translateY(-5px);
}

.interaction-character-card.is-active {
  border-color: #75b2f5;
  box-shadow: 0 12px 28px rgb(64 132 193 / 20%);
}

.interaction-character-card .interaction-mascot-sprite {
  grid-row: 1 / 4;
  align-self: center;
}

.interaction-character-card > strong {
  align-self: end;
  color: #245886;
  font-size: 25px;
}

.interaction-character-card small {
  align-self: end;
  color: #7790a1;
  font-size: 12px;
  font-weight: 800;
}

.interaction-speech {
  display: grid;
  gap: 5px;
  align-content: center;
  min-height: 116px;
  padding: 15px 17px;
  border-radius: 22px 22px 22px 6px;
  color: #315d7b;
  background: #edf8ff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.45;
}

.interaction-character-card:not(.is-active) .interaction-speech {
  color: transparent;
  background:
    repeating-linear-gradient(
      -45deg,
      #f0f6fa 0 8px,
      #e8f1f6 8px 16px
    );
}

.interaction-banner {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: 17px 24px;
  color: #fff;
  background: #2d477e;
  font-size: 27px;
  font-weight: 900;
  text-align: center;
}

.interaction-mascot-sprite {
  display: block;
  width: 145px;
  height: 145px;
  flex: 0 0 145px;
  background-repeat: no-repeat;
  background-position: left top;
  background-size: 500% 400%;
  filter: drop-shadow(0 7px 4px rgb(55 92 114 / 15%));
}

.interaction-mascot-sprite.is-byeoli {
  background-image: url("../characters/byeoli/byeoli-talk-spritesheet.png?v=260731-left7");
}

.interaction-mascot-sprite.is-songi {
  background-image: url("../characters/songi/songi-talk-spritesheet.png");
}

.interaction-reflection-layout,
.interaction-raise-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 26px;
  align-items: center;
  height: 100%;
}

.interaction-mascot-pair {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.interaction-mascot-pair .interaction-mascot-sprite + .interaction-mascot-sprite {
  margin-left: -22px;
  transform: translateY(14px);
}

.interaction-mascot-pair.is-small {
  position: absolute;
  top: -6px;
  left: 28px;
  transform: scale(0.54);
  transform-origin: left top;
}

.interaction-prompt-panel {
  display: grid;
  gap: 16px;
  align-content: center;
  min-height: 275px;
  padding: 32px 38px;
  border-radius: 30px;
  color: #fff;
  background: #2d477e;
  box-shadow: 0 12px 24px rgb(34 63 113 / 18%);
  text-align: center;
}

.interaction-prompt-panel h2,
.danger-question h2 {
  margin: 0;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.28;
  word-break: keep-all;
}

.interaction-prompt-panel p {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.interaction-speaker {
  justify-self: center;
  padding: 7px 15px;
  border-radius: 18px;
  color: #2d477e;
  background: #fff;
  font-size: 14px;
  font-weight: 900;
}

.interaction-action-button,
.choice-submit {
  justify-self: center;
  min-width: 170px;
  height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 24px;
  color: #fff;
  background: var(--coral);
  box-shadow: 0 6px 0 #d65d42;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
}

.interaction-action-button:hover,
.interaction-action-button:focus-visible,
.choice-submit:hover,
.choice-submit:focus-visible {
  outline: 5px solid #ffe26a;
  outline-offset: 3px;
  transform: translateY(-2px);
}

.interaction-action-button.is-complete {
  background: #40b98a;
  box-shadow: 0 6px 0 #278867;
}

.interaction-raise-layout {
  grid-template-columns: 1.25fr 0.75fr;
}

.raise-hand-button {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 20px;
  border: 0;
  color: #315d7b;
  background: transparent;
  cursor: pointer;
}

.raise-hand-button > span {
  display: grid;
  width: 170px;
  height: 170px;
  place-items: center;
  border: 8px solid #fff;
  border-radius: 50%;
  background: #ffd56b;
  box-shadow: 0 12px 26px rgb(109 83 25 / 17%);
  font-size: 92px;
  transform-origin: 50% 100%;
  transition: transform 260ms cubic-bezier(0.2, 1.45, 0.4, 1);
}

.raise-hand-button:hover > span,
.raise-hand-button:focus-visible > span,
.raise-hand-button.is-raised > span {
  transform: translateY(-16px) rotate(-8deg) scale(1.08);
}

.raise-hand-button:focus-visible {
  outline: 5px solid #ffe26a;
  outline-offset: 3px;
  border-radius: 26px;
}

.raise-hand-button strong {
  padding: 10px 20px;
  border-radius: 20px;
  background: #fff;
  font-size: 18px;
}

.danger-question {
  position: relative;
  min-height: 102px;
  padding: 12px 30px 9px 180px;
  text-align: center;
}

.danger-question h2 {
  color: #203e65;
  font-size: 27px;
}

.danger-question > p {
  margin: 8px 0 0;
  color: #658198;
  font-size: 14px;
  font-weight: 800;
}

.danger-question > p strong {
  color: var(--coral);
}

.feedback-message {
  color: #258568 !important;
  font-size: 16px !important;
}

.danger-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.danger-choice {
  position: relative;
  display: grid;
  min-height: 225px;
  padding: 45px 24px 20px;
  place-items: center;
  overflow: hidden;
  border: 4px solid transparent;
  border-radius: 24px;
  color: #fff;
  background: #2d477e;
  box-shadow: 0 8px 18px rgb(42 70 121 / 15%);
  font-size: 24px;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, filter 160ms ease;
}

.danger-choice:hover,
.danger-choice:focus-visible {
  outline: 0;
  border-color: #ffe26a;
  transform: translateY(-5px);
}

.danger-choice.is-selected {
  border-color: #ffd14e;
  filter: brightness(1.13);
  transform: translateY(-7px);
}

.danger-choice.is-selected::after {
  position: absolute;
  top: 12px;
  right: 14px;
  color: #ffd14e;
  content: "✓";
  font-size: 30px;
  font-weight: 900;
}

.danger-choice-number {
  position: absolute;
  top: -2px;
  left: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #df7d70;
  font-size: 28px;
  font-weight: 900;
  transform: translateX(-50%);
}

.danger-choice.is-danger {
  color: rgb(255 255 255 / 45%);
  background: #cfd2d5;
}

.danger-choice.is-safe {
  border-color: #75b2f5;
}

.danger-stamp {
  position: absolute;
  top: 55%;
  left: 50%;
  display: grid;
  width: 122px;
  height: 122px;
  place-items: center;
  border: 8px solid #d71919;
  border-radius: 50%;
  color: #d71919;
  background: rgb(255 255 255 / 66%);
  font-size: 31px;
  font-weight: 900;
  transform: translate(-50%, -50%) rotate(-7deg);
}

.choice-submit {
  position: absolute;
  right: 36px;
  bottom: 19px;
}

.choice-submit:disabled {
  color: #91a4b2;
  background: #dbe6ec;
  box-shadow: 0 5px 0 #c1d1da;
  cursor: not-allowed;
}

.stage-image {
  position: relative;
  height: 416px;
  overflow: hidden;
  border-radius: 13px 13px 7px 7px;
  background: #bdeafa;
}

#cut-stage {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  /* 캔버스 좌표계는 1000x388 입니다. 박스에 맞춰 늘리면 인물이 세로로
     늘어나 편집기에서 맞춘 화면과 달라지므로 비율을 유지합니다. */
  object-fit: contain;
}

.play-button {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  width: 82px;
  height: 82px;
  padding: 0;
  place-items: center;
  border: 3px solid rgb(255 255 255 / 92%);
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--lesson-accent, #ff9f1c),
    var(--lesson-accent-end, #ff7a20)
  );
  box-shadow:
    0 10px 22px var(--lesson-accent-shadow, rgb(226 105 11 / 26%)),
    inset 0 2px 0 rgb(255 255 255 / 38%);
  cursor: pointer;
  transform: translate(-50%, -55%);
  transition:
    opacity 160ms ease,
    visibility 160ms ease,
    transform 130ms ease,
    filter 160ms ease;
}

.play-button:hover,
.play-button:focus-visible {
  outline: 5px solid #ffe27a;
  outline-offset: 3px;
  filter: saturate(1.12) brightness(1.05);
  transform: translate(-50%, -58%) scale(1.06);
}

.play-button span {
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 27px solid #fff;
}

.play-button.is-playing span {
  width: 22px;
  height: 30px;
  margin: 0;
  border: 0;
  border-right: 8px solid #fff;
  border-left: 8px solid #fff;
}

.play-button.is-replay span {
  position: relative;
  width: 34px;
  height: 34px;
  margin: 0;
  border: 5px solid #fff;
  border-left-color: transparent;
  border-radius: 50%;
}

.play-button.is-replay span::after {
  position: absolute;
  top: -8px;
  left: -7px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-right: 11px solid #fff;
  border-bottom: 7px solid transparent;
  content: "";
  transform: rotate(-18deg);
}

.play-button.is-dismissed {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -55%) scale(0.82);
}

.cut-caption {
  position: absolute;
  z-index: 2000;
  bottom: 18px;
  left: 50%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  width: min(84%, 820px);
  min-height: 48px;
  padding: 8px 14px;
  border: 2px solid rgb(255 255 255 / 82%);
  border-radius: 16px;
  color: #fff;
  background: rgb(32 76 105 / 88%);
  box-shadow: 0 6px 18px rgb(24 60 81 / 22%);
  transform: translateX(-50%);
  pointer-events: none;
  transition: opacity 160ms ease, visibility 160ms ease, transform 160ms ease;
}

.cut-caption.is-hidden {
  visibility: hidden;
  opacity: 0;
  transform: translate(-50%, 8px);
}

.cut-caption.is-scene-empty {
  display: none;
}

.cut-caption strong {
  min-width: 74px;
  padding: 6px 9px;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  text-align: center;
}

.cut-caption p {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
  text-align: left;
}

.player-controls {
  display: grid;
  grid-template-columns: 28px 42px 1fr 42px 48px 48px;
  gap: 8px;
  align-items: center;
  height: 38px;
  color: #668095;
  font-size: 11px;
  font-weight: 800;
}

.player-controls button {
  height: 27px;
  padding: 0 5px;
  border: 0;
  border-radius: 8px;
  color: #55738a;
  background: #edf6fb;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.player-controls button.is-active {
  color: #fff;
  background: var(--blue);
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 42%);
}

.player-controls button[aria-pressed="false"] {
  color: #7890a2;
  background: #e4edf3;
  box-shadow: none;
}

.timeline {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #d9e8f1;
}

.timeline i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--coral);
  transition: width 180ms linear;
}

.content-navigation {
  position: absolute;
  right: 25px;
  bottom: 0;
  left: 24px;
  display: grid;
  grid-template-columns: 124px 1fr 124px;
  align-items: center;
}

.nav-button {
  height: 46px;
  border: 2px solid #bad6e9;
  border-radius: 24px;
  color: #55748b;
  background: #fff;
  box-shadow: 0 4px 9px rgb(54 101 132 / 10%);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  transition:
    background 160ms ease,
    filter 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.nav-button:hover {
  outline: 0;
  transform: translateY(-1px);
}

.nav-button:focus-visible {
  outline: 3px solid #153f68;
  outline-offset: 3px;
  transform: translateY(-1px);
}

.nav-next,
.nav-previous:not(.is-disabled) {
  border-color: #b9d6e8;
  color: #426b87;
  background: linear-gradient(135deg, #fff, #eaf5fc);
  box-shadow:
    0 4px 9px rgb(54 101 132 / 10%),
    inset 0 1px 0 rgb(255 255 255 / 70%);
}

.nav-next:hover,
.nav-next:focus-visible,
.nav-previous:not(.is-disabled):hover,
.nav-previous:not(.is-disabled):focus-visible {
  border-color: var(--lesson-accent-end, #ff7a20);
  color: #fff;
  background: linear-gradient(135deg, #ffb72c, #ff6828);
  filter: saturate(1.12) brightness(1.04);
  box-shadow:
    0 8px 16px rgb(226 105 11 / 30%),
    inset 0 1px 0 rgb(255 255 255 / 42%);
}

.nav-button:disabled {
  opacity: 0.42;
  cursor: default;
}

.page-count {
  color: #6f879b;
  font-size: 15px;
  font-weight: 900;
  text-align: center;
}

.toast {
  position: absolute;
  z-index: 100;
  bottom: 24px;
  left: 50%;
  max-width: 520px;
  padding: 12px 20px;
  border: 3px solid #fff;
  border-radius: 25px;
  color: #fff;
  background: #315f80;
  box-shadow: 0 8px 22px rgb(31 68 91 / 24%);
  font-size: 15px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: 170ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes character-float {
  0%,
  100% { margin-top: 0; }
  50% { margin-top: -7px; }
}

@keyframes intro-background-enter {
  from {
    opacity: 0;
    transform: scale(1.025);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes topic-sprout {
  0% {
    opacity: 0;
    transform: translateY(42px) scale(0.14, 0.06);
    animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
  }

  38% {
    opacity: 1;
    transform: translateY(-17px) scale(0.8, 1.2);
    animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
  }

  58% {
    opacity: 1;
    transform: translateY(7px) scale(1.12, 0.88);
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  }

  73% {
    opacity: 1;
    transform: translateY(-7px) scale(0.96, 1.07);
    animation-timing-function: ease-in;
  }

  87% {
    opacity: 1;
    transform: translateY(2px) scale(1.025, 0.98);
    animation-timing-function: ease-out;
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes course-title-enter {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-16px) scale(0.82);
  }

  68% {
    opacity: 1;
    transform: translateX(-50%) translateY(3px) scale(1.035);
  }

  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes intro-character-enter {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.62);
  }

  70% {
    opacity: 1;
    transform: translateY(-6px) scale(1.08);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes guide-speech-reveal {
  0% {
    visibility: hidden;
    opacity: 0;
    clip-path: circle(0 at 86% 70%);
  }

  1% {
    visibility: visible;
  }

  72% {
    visibility: visible;
    opacity: 1;
    clip-path: circle(78% at 86% 70%);
  }

  100% {
    visibility: visible;
    opacity: 1;
    clip-path: circle(115% at 86% 70%);
  }
}

@keyframes title-piece-bounce {
  0%,
  3%,
  16%,
  100% {
    transform: translateY(0) scale(1);
  }
  7% {
    transform: translateY(-8px) scale(1.065, 0.96) rotate(-0.8deg);
  }
  11% {
    transform: translateY(2px) scale(0.985, 1.035) rotate(0.5deg);
  }
}

@keyframes course-title-star-twinkle {
  0%,
  7%,
  25%,
  100% {
    opacity: 1;
    filter: brightness(1) drop-shadow(0 0 0 rgb(255 236 82 / 0%));
    transform: scale(0.88) rotate(-5deg);
  }

  11% {
    opacity: 1;
    filter: brightness(1.35) drop-shadow(0 0 8px rgb(255 236 82 / 95%));
    transform: scale(1.28) rotate(6deg);
  }

  15% {
    opacity: 1;
    filter: brightness(1.08) drop-shadow(0 0 3px rgb(255 236 82 / 55%));
    transform: scale(0.96) rotate(-3deg);
  }

  19% {
    opacity: 1;
    filter: brightness(1.25) drop-shadow(0 0 6px rgb(255 236 82 / 80%));
    transform: scale(1.14) rotate(3deg);
  }
}

@keyframes guide-cloud-float {
  0%,
  100% { transform: translate(-50%, 1px) rotate(-0.4deg); }
  50% { transform: translate(-50%, -9px) rotate(0.5deg); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 컷 애니메이션의 화면 내용 — 편집기에서 넣은 글 상자입니다. */
.cut-content-layer {
  position: absolute;
  top: calc(50% + var(--content-y, 0));
  left: calc(50% + var(--content-x, 0));
  width: min(72%, 620px);
  padding: 16px 20px;
  transform: translate(-50%, -50%) scale(var(--content-scale, 1));
  border-radius: 16px;
  background: rgb(255 255 255 / 88%);
  color: #23405c;
  text-align: center;
}

.cut-content-layer h3 { margin: 0 0 8px; font-size: 24px; }
.cut-content-layer p { margin: 0 0 8px; font-size: 16px; }
.cut-content-layer ul { margin: 0; padding: 0; list-style: none; }
.cut-content-layer li { font-size: 18px; line-height: 1.55; }
.cut-content-layer :is(h3, p, li).has-text-size { font-size: var(--text-size); }
.cut-content-layer :is(h3, p, li).has-text-weight { font-weight: var(--text-weight); }
.cut-content-layer :is(h3, p, li).has-text-color { color: var(--text-color); }
.cut-content-layer :is(h3, p, li).has-text-spacing { letter-spacing: var(--text-spacing); }
.cut-content-layer :is(h3, p, li).has-text-shadows { text-shadow: var(--text-shadows); }
.cut-content-layer :is(h3, p, li).text-font-serif { font-family: "Nanum Myeongjo", "Batang", serif; }
.cut-content-layer :is(h3, p, li).text-font-malgun { font-family: "Malgun Gothic", "맑은 고딕", sans-serif; }
.cut-content-layer :is(h3, p, li).text-font-gulim { font-family: "Gulim", "굴림", sans-serif; }
.cut-content-layer :is(h3, p, li).text-font-dotum { font-family: "Dotum", "돋움", sans-serif; }
.cut-content-layer :is(h3, p, li).text-font-gungsuh { font-family: "Gungsuh", "궁서", serif; }
.cut-content-layer :is(h3, p, li).text-font-notosans { font-family: "Noto Sans KR", sans-serif; }
.cut-content-layer :is(h3, p, li).text-font-nanumgothic { font-family: "Nanum Gothic", sans-serif; }
.cut-content-layer :is(h3, p, li).text-font-nanummyeongjo { font-family: "Nanum Myeongjo", serif; }
.cut-content-layer :is(h3, p, li).text-font-nanumpen { font-family: "Nanum Pen Script", cursive; }
.cut-content-layer :is(h3, p, li).text-font-nanumsquareround { font-family: "NanumSquareRound", sans-serif; }
.cut-content-layer :is(h3, p, li).text-effect-gradient {
  background: linear-gradient(var(--grad-angle, 180deg), var(--text-grad-from, #ffd479), var(--text-grad-to, #ff7e5f));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/*
 * 다음으로 가도록 이끄는 표시 (2026-08-16 합의)
 *
 * 장면을 다 풀면 «다음» 단추가 깜박이고 말풍선이 뜹니다.
 * 켜고 끄는 일은 scene-interaction.js 의 guideNext() 가 맡습니다.
 */
/*
 * 마지막 페이지의 «학습 완료» — 누를 곳이 아니라 다 마쳤다는 표시입니다.
 * 깜박이거나 «클릭하세요» 말풍선을 띄우지 않고, 활성 색만 입힙니다. (2026-09-07)
 */
.nav-button.nav-next.is-complete.is-complete-done {
  border-color: var(--lesson-accent-end, #ff7a20);
  color: #fff;
  background: linear-gradient(135deg, #ffb72c, #ff6828);
  box-shadow:
    0 8px 16px rgb(226 105 11 / 26%),
    inset 0 1px 0 rgb(255 255 255 / 42%);
  opacity: 1;
}

.nav-button.nav-next.is-guided {
  position: relative;
  /*
   * 말풍선은 늘 맨 위에 떠야 합니다. (2026-08-26)
   * 자막 층(.sequence-caption 50 · .cut-caption 2000)보다 위로 올려 두지 않으면
   * 자막이 길게 뜨는 장면에서 말풍선이 자막 뒤로 숨습니다.
   */
  z-index: 2100;
  border-color: var(--lesson-accent-end, #ff7a20);
  animation: nav-next-guide 1.1s ease-in-out infinite;
}

@keyframes nav-next-guide {
  0%, 100% {
    color: #426b87;
    background: linear-gradient(135deg, #fff, #eaf5fc);
    box-shadow: 0 4px 9px rgb(54 101 132 / 10%);
  }

  50% {
    color: #fff;
    background: linear-gradient(135deg, #ffb72c, #ff6828);
    box-shadow: 0 10px 20px rgb(226 105 11 / 38%);
  }
}

/* 말풍선 — 단추 위에 떠서 무엇을 누를지 알려 줍니다. */
.nav-button.nav-next.is-guided::before {
  content: attr(data-guide);
  position: absolute;
  bottom: calc(100% + 16px);
  left: 50%;
  z-index: 5;
  padding: 8px 16px;
  border-radius: 999px;
  background: #2f80b5;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  transform: translateX(-50%);
  box-shadow: 0 6px 14px rgb(47 128 181 / 35%);
  animation: nav-next-guide-float 1.1s ease-in-out infinite;
}

/*
 * 말풍선 꼬리 — 아래로 뾰족하게 «다음» 단추를 가리킵니다. (2026-08-26)
 * 말풍선 아래로 온전히 드러나도록 말풍선과 단추 사이에 놓습니다.
 */
.nav-button.nav-next.is-guided::after {
  content: "";
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  z-index: 5;
  width: 0;
  height: 0;
  border-width: 10px 8px 0;
  border-style: solid;
  border-color: #2f80b5 transparent transparent;
  transform: translateX(-50%);
  filter: drop-shadow(0 3px 4px rgb(47 128 181 / 30%));
  animation: nav-next-guide-float 1.1s ease-in-out infinite;
}

@keyframes nav-next-guide-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -4px; }
}

/* 동작 줄이기를 켠 이용자에게는 깜박임 없이 색과 말풍선만 보입니다. */
@media (prefers-reduced-motion: reduce) {
  .nav-button.nav-next.is-guided,
  .nav-button.nav-next.is-guided::before,
  .nav-button.nav-next.is-guided::after {
    animation: none;
  }

  .nav-button.nav-next.is-guided {
    color: #fff;
    background: linear-gradient(135deg, #ffb72c, #ff6828);
  }
}

/* Scene authoring visibility must override the caption grid layout. */
.cut-caption[hidden] { display: none; }

/* Picture choices shared by the animation preview and learner screen. */
.cut-simple-choices.is-picture-cards{top:var(--choice-card-top,52%);bottom:auto;transform:translateY(-50%);width:100%;grid-template-columns:repeat(var(--choice-count,2),var(--choice-card-width,240px));justify-content:center;gap:var(--choice-gap,18px);}
.cut-simple-choices.is-picture-cards button.situation-choice-card{position:relative;isolation:isolate;box-sizing:border-box;display:grid;grid-template-rows:minmax(0,1fr) auto;gap:8px;align-content:stretch;width:var(--choice-card-width,240px);height:var(--choice-card-height,260px);min-height:0;padding:12px;border:3px solid #fff;border-radius:24px;background:#fff2c2;color:#264e6c;box-shadow:0 8px 18px rgb(39 79 105 / 14%);overflow:hidden;}
.cut-simple-choices.is-picture-cards button.has-choice-image .situation-choice-illustration{position:relative;z-index:5;display:grid;place-items:center;width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;transform-origin:center;}.cut-simple-choices.is-picture-cards button.has-choice-image .situation-choice-illustration img{position:static;width:100%;height:100%;min-height:0;margin:0;border-radius:0;object-fit:contain;}
.cut-simple-choices.is-picture-cards button.situation-choice-card span{position:relative;z-index:1000;display:block;min-height:0;padding:5px 8px;border-radius:14px;background:rgb(255 255 255 / 88%);color:#23485f;font-size:18px;font-weight:800;line-height:1.35;word-break:keep-all;overflow-wrap:break-word;}
.cut-simple-choices.is-picture-cards button.situation-choice-card:hover,.cut-simple-choices.is-picture-cards button.situation-choice-card:focus-visible{border-color:#ffcb31;background:#fff2c2;box-shadow:0 0 0 4px rgb(255 203 49 / 35%),0 8px 18px rgb(39 79 105 / 20%);transform:none;outline:none;}
.cut-dom-overlay:has(.is-picture-cards)>.cut-interaction-question{top:2%;font-size:24px;padding:8px 18px;}

.cut-simple-choices.is-image-situation button.situation-choice-card { padding:10px 10px 12px; border:3px solid #fff; border-radius:20px; background:rgb(36 66 94 / 92%); color:#fff; box-shadow:0 10px 24px rgb(20 40 60 / 35%); transition:transform 150ms ease,box-shadow 150ms ease; }
.cut-simple-choices.is-image-situation button.has-choice-image .situation-choice-illustration { aspect-ratio:16/9; overflow:hidden; border-radius:12px; background:#fff; }
.cut-simple-choices.is-image-situation button.has-choice-image .situation-choice-illustration img { width:100%; height:100%; object-fit:contain; border-radius:12px; margin:0; background:#fff; }
.cut-simple-choices.is-image-situation button.has-choice-image span { min-height:66px; padding:10px 6px 0; font-size:clamp(14px,1.6vw,22px); font-weight:800; line-height:1.35; word-break:keep-all; overflow-wrap:normal; }
.cut-simple-choices.is-image-situation button.situation-choice-card:hover,.cut-simple-choices.is-image-situation button.situation-choice-card:focus-visible { background:rgb(36 66 94 / 92%); border-color:#fff; transform:translateY(-4px); box-shadow:0 14px 30px rgb(20 40 60 / 45%); }
.cut-simple-choices.is-image-situation button:focus-visible { outline:3px solid #ffcc61; outline-offset:4px; }
.cut-dom-overlay:has(.is-image-situation) .cut-interaction-question { top:4%; padding:9px 18px; border:0; border-radius:16px; font-size:clamp(17px,2vw,27px); line-height:1.35; word-break:keep-all; }

/* Optional author-set width for animation screen-content boxes. */
.cut-content-layer {
  width: var(--content-width, min(72%, 620px));
  max-width: calc(100% - 40px);
}

/* ==========================================================================
   양자택일 오답 재도전 공통 버튼 표준 스타일 ('다시 생각해보기')
   - 03차시 p16-retry-button 규격을 전체 차시 공통 표준으로 확장 적용
   ========================================================================== */
.cut-simple-choices.is-retry-widget,
.cut-simple-choices:not(.is-picture-cards):has(button.is-retry-card),
.cut-simple-choices:not(.is-picture-cards):has(button:only-child) {
  position: absolute;
  inset: 0;
  top: auto;
  bottom: var(--choice-widget-bottom, 9%);
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  pointer-events: none;
  z-index: 20;
}

.cut-simple-choices button.is-retry-card,
.cut-simple-choices.is-retry-widget button.situation-choice-card,
.cut-simple-choices:not(.is-picture-cards) button.situation-choice-card:only-child {
  pointer-events: auto !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 220px;
  height: auto;
  padding: 14px 32px !important;
  border: 3px solid #ffffff !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #ff6b57 0%, #e03e2d 100%) !important;
  color: #ffffff !important;
  font-size: 19px !important;
  font-weight: 800 !important;
  letter-spacing: -0.3px;
  box-shadow: 0 10px 24px rgba(20, 40, 60, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.1) !important;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.cut-simple-choices button.is-retry-card:hover,
.cut-simple-choices.is-retry-widget button.situation-choice-card:hover,
.cut-simple-choices:not(.is-picture-cards) button.situation-choice-card:only-child:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 14px 32px rgba(20, 40, 60, 0.45) !important;
  background: linear-gradient(180deg, #ff7e6c 0%, #ea4837 100%) !important;
  outline: none;
}

.cut-simple-choices button.is-retry-card:active,
.cut-simple-choices.is-retry-widget button.situation-choice-card:active,
.cut-simple-choices:not(.is-picture-cards) button.situation-choice-card:only-child:active {
  transform: translateY(-1px) scale(0.99);
}

.cut-simple-choices button.is-retry-card span,
.cut-simple-choices.is-retry-widget button.situation-choice-card span,
.cut-simple-choices:not(.is-picture-cards) button.situation-choice-card:only-child span {
  background: transparent !important;
  color: #ffffff !important;
  font-size: 19px !important;
  font-weight: 800 !important;
  padding: 0 !important;
  min-height: 0 !important;
}

.cut-dom-overlay:has(.is-retry-widget) > .cut-interaction-question,
.cut-dom-overlay:has(button.is-retry-card) > .cut-interaction-question {
  display: block !important;
  white-space: pre-line !important;
  color: #d9463c !important;
  text-align: center !important;
  font-weight: 800 !important;
  font-size: 22px !important;
}
