/* 기존 색상과 카드 모양을 사용하고 새 활동에 필요한 배치만 추가합니다. */
.header-links {
  display: flex;
  gap: 10px;
  align-items: center;
}
.therapy-main {
  padding-top: 20px;
}
.participant-chip {
  font-size: 13px;
  color: #5b725e;
  padding: 7px 12px;
  border-radius: 8px;
  background: #e9efdf;
}
.activity-progress {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 22px 0 30px;
  font-size: 12px;
}
.activity-progress li {
  flex: 1;
  padding: 12px;
  border-bottom: 3px solid #dbe2d3;
  color: #73806c;
}
.activity-progress [aria-current] {
  color: var(--green);
  border-color: var(--green);
  font-weight: 700;
}
.activity-intro {
  margin: 20px 0 24px;
}
.activity-intro h2 {
  margin: 9px 0;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.5;
  letter-spacing: -0.8px;
}
.activity-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.learning-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 24px;
}
.activity-card {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 26px;
  border-radius: 17px;
  margin-bottom: 24px;
}
.activity-card h2 {
  font-size: 23px;
}
.activity-card h3 {
  font-size: 17px;
}
.activity-card .primary-button {
  width: 100%;
  margin-top: 22px;
}
.keyword-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 22px 20px;
  background: #eaf0e2;
  border: 1px solid #d7e0cf;
  border-radius: 18px;
}
.keyword-cards {
  display: flex;
  gap: 18px;
  width: 100%;
}
.keyword-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  padding: 26px 15px;
  border: 1px solid #d1dcc7;
  border-bottom: 4px solid #cbd6c1;
  border-radius: 12px;
  background: #fffdf3;
}
.keyword-card small {
  font-size: 11px;
  color: #718168;
}
.keyword-card strong {
  font-size: 32px;
  font-weight: 700;
}
.keyword-panel > p {
  color: #68765e;
  font-size: 14px;
  margin: 20px 0 0;
}
.learning-mascot {
  width: 132px;
  height: 132px;
  margin-top: 14px;
}
.recording-caption {
  margin-bottom: 16px;
}
.recording-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.record-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid #acbeb0;
  border-radius: 9px;
  background: #eef4e8;
  color: #315b44;
}
.record-button svg {
  width: 22px;
  height: 22px;
}
.record-button:disabled {
  opacity: 0.45;
}
.recording-clock {
  color: #66765e;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.recording-status {
  color: #65725c;
  font-size: 13px;
  margin: 13px 0;
  min-height: 22px;
}
.recorder audio,
.review-take audio {
  width: 100%;
  margin: 8px 0;
  min-height: 40px;
}
.recorder .retry-upload {
  margin-bottom: 12px;
}
.take-history {
  margin: 12px 0;
  padding: 10px;
  border: 1px solid #e0e6d8;
  border-radius: 8px;
}
.take-history summary {
  cursor: pointer;
  font-size: 12px;
}
.take-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}
.take-list li {
  margin-top: 12px;
  font-size: 12px;
}
.observation-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: #607058;
  line-height: 1.8;
}
.observation-check input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--green);
  margin-top: 3px;
}
.recording-note {
  font-size: 11px;
  color: #7e886f;
  margin: 0;
}
.target-sentence {
  margin: 20px 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.7;
  text-align: center;
  font-weight: 700;
  color: #294c3c;
  letter-spacing: -0.7px;
}
.picture-panel .target-sentence {
  font-size: 25px;
}
.picture-panel > .speak-button {
  margin: 0 auto 24px;
  display: block;
}
.target-banner {
  border: 1px solid #d4dfc8;
  border-radius: 16px;
  background: #eaf0e2;
  padding: 20px 30px 27px;
  margin-bottom: 24px;
  text-align: center;
}
.target-banner .text-button {
  display: block;
  margin: 14px auto 0;
}
.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 23px 0 11px;
}
.outcome-select,
.evaluation-form select {
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #c2d0b9;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 14px;
}
.recording-wide,
.evaluation-form {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.review-take {
  margin: 16px 0;
}
.review-take small {
  display: block;
  color: #5f715e;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.speech-status {
  font-size: 13px;
  color: #6d7457;
}
.notice-panel {
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 32px;
  background: var(--paper);
  margin: 24px 0;
}
.notice-panel h1,
.notice-panel h2 {
  font-size: 26px;
}
.notice-panel .primary-button {
  display: inline-flex;
}
.completion-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 24px 0;
  flex-wrap: wrap;
}
.story-library {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 32px 0;
}
.story-library-card {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 16px;
  overflow: hidden;
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.story-library-card:hover {
  transform: translateY(-3px);
  border-color: #96ac88;
}
.story-thumbnails {
  display: flex;
  gap: 4px;
  padding: 14px 10px;
  align-items: center;
  background: #eaf0e2;
}
.story-thumbnails img {
  display: block;
  width: calc(50% - 12px);
  border-radius: 6px;
}
.story-thumbnails > span {
  font-size: 21px;
  color: #7f9570;
}
.story-library-copy {
  position: relative;
  padding: 19px;
}
.story-library-copy h2 {
  font-size: 18px;
  margin: 8px 20px 0 0;
}
.story-library-copy .card-arrow {
  top: 39px;
  right: 18px;
  font-size: 16px;
}
.story-picture {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}
.ordering-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.order-slot {
  padding: 18px;
  border: 2px dashed #c6d4ba;
  border-radius: 18px;
  background: #eff3e8;
}
.order-slot h3 {
  text-align: center;
  font-size: 16px;
  margin: 0 0 14px;
  color: #607a58;
}
.order-card {
  background: #fffdf5;
  border: 1px solid #d2dcc9;
  border-radius: 12px;
  overflow: hidden;
  cursor: grab;
}
.order-card img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}
.drag-handle {
  display: block;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-top: 1px solid #e0e6d6;
  background: #fffdf5;
  color: #617754;
  font-size: 13px;
  touch-action: none;
  cursor: grab;
}
.drag-handle:disabled {
  cursor: default;
  opacity: 0.55;
}
.order-card.moving {
  opacity: 0.6;
  transform: scale(0.98);
}
.order-slot.drop-ready {
  background: #d9e8ce;
  border-color: #6f905c;
}
.ordering-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 24px 0 10px;
  flex-wrap: wrap;
}
.order-feedback {
  min-height: 26px;
  text-align: center;
  font-size: 15px;
  color: #527648;
}
#order-next {
  margin: 15px auto 0;
}
.story-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 24px 0;
}
.story-pair figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--paper);
}
.story-pair figcaption {
  font-size: clamp(16px, 2.3vw, 22px);
  font-weight: 600;
  text-align: center;
  margin: 15px 2px 4px;
}
.pair-plus {
  display: block;
  font-size: 48px;
  color: #88a173;
  text-align: center;
  font-weight: 400;
  transition: opacity 1s;
}
.animation-panel {
  padding: 40px 26px;
  border: 1px solid #d3ddc8;
  border-radius: 18px;
  background: #f1f4e9;
  text-align: center;
  overflow: hidden;
}
.animation-sentences {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  min-height: 160px;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 650;
  line-height: 2;
}
#ending-before,
#ending-after {
  display: inline-block;
  padding: 0 3px;
  border-radius: 5px;
}
.ending-highlight {
  background: #f1d89b;
  box-shadow: 0 0 0 4px #f1d89b;
}
.ending-fly {
  animation: ending-away 1.6s forwards;
  background: #f1d89b;
}
.ending-new {
  color: #356b56;
  background: #dbe9ca;
  transform: translateY(0);
  transition:
    transform 1.4s,
    opacity 1.4s;
}
.ending-floating {
  transform: translateY(-40px);
  outline: 2px dashed #9db78d;
}
.joining-hidden {
  opacity: 0;
  width: 0;
  overflow: hidden;
}
.animation-explanation {
  min-height: 54px;
  max-width: 730px;
  margin: 22px auto;
  color: #667a55;
  font-size: 16px;
}
.animation-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
#animation-done {
  margin: 24px auto 0;
  max-width: 380px;
}
@keyframes ending-away {
  to {
    transform: translate(95px, -140px) rotate(18deg);
    opacity: 0;
  }
}
.record-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  margin: 24px 0;
}
.record-filters label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  color: #64715a;
}
.record-filters input,
.record-filters select {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #c6d0be;
  border-radius: 7px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: white;
  max-width: 100%;
}
.record-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
}
.record-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
.record-table th {
  background: #edf2e5;
  padding: 16px;
  font-size: 12px;
  white-space: nowrap;
}
.record-table td {
  padding: 20px 16px;
  border-top: 1px solid var(--line);
  min-width: 100px;
}
.record-table td:first-child {
  min-width: 170px;
}
.record-table small,
.record-kind {
  display: block;
  font-size: 11px;
  color: #718064;
  margin: 5px 0;
}
.record-table strong {
  display: block;
}
.record-table .secondary-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  white-space: nowrap;
}
.record-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 25px 0;
  font-size: 13px;
}
.record-results dl {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 12px 20px;
  font-size: 14px;
}
.record-results dt {
  color: #63725a;
}
.record-results dd {
  margin: 0;
  font-weight: 600;
}
.recording-group {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.recording-group h3 {
  font-size: 16px;
}
.recording-group p {
  font-size: 13px;
  color: var(--muted);
}
.saved-take {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin: 12px 0;
}
.saved-take strong {
  width: 100px;
  font-size: 13px;
}
.saved-take audio {
  width: min(360px, 100%);
}
.saved-take a {
  font-size: 12px;
}
.record-privacy-note {
  font-size: 12px;
  color: #6b765f;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 900px) {
  .story-library {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .learning-grid {
    gap: 16px;
  }
  .activity-card {
    padding: 22px;
  }
  .keyword-card {
    padding: 24px 12px;
  }
  .keyword-card strong {
    font-size: 28px;
  }
  .recording-controls {
    gap: 7px;
  }
}
@media (max-width: 760px) {
  .header-links {
    gap: 6px;
  }
  .header-links .header-back {
    padding: 8px;
    font-size: 10px;
  }
  .learning-grid {
    grid-template-columns: 1fr;
  }
  .keyword-panel {
    padding: 24px;
  }
  .learning-mascot {
    display: none;
  }
  .keyword-panel > p {
    margin-bottom: 5px;
  }
  .activity-progress {
    font-size: 10px;
    gap: 5px;
  }
  .activity-progress li {
    padding: 10px 3px;
  }
  .ordering-board {
    gap: 12px;
  }
  .order-slot {
    padding: 12px;
  }
  .story-pair {
    grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
    gap: 8px;
  }
  .pair-plus {
    font-size: 36px;
  }
  .story-pair figure {
    padding: 7px;
  }
  .story-pair figcaption {
    font-size: 16px;
  }
  .animation-panel {
    padding: 24px 16px;
  }
  .animation-sentences {
    font-size: 23px;
    gap: 14px;
  }
}
@media (max-width: 480px) {
  .site-header .brand {
    font-size: 18px;
    gap: 6px;
  }
  .site-header {
    padding: 13px 14px;
  }
  .site-header .brand-mark {
    width: 29px;
    height: 29px;
  }
  .header-links .header-back {
    padding: 7px 6px;
    font-size: 9px;
  }
  .therapy-main {
    padding-top: 12px;
  }
  .participant-chip {
    font-size: 11px;
  }
  .activity-intro h2 {
    font-size: 23px;
  }
  .activity-intro p {
    font-size: 12px;
  }
  .activity-card {
    padding: 21px 17px;
  }
  .activity-progress {
    margin-bottom: 20px;
  }
  .keyword-card strong {
    font-size: 29px;
  }
  .keyword-cards {
    gap: 12px;
  }
  .target-banner {
    padding: 15px 18px 22px;
  }
  .target-sentence {
    font-size: 24px;
  }
  .story-library {
    grid-template-columns: 1fr;
  }
  .story-library-copy h2 {
    font-size: 21px;
  }
  .ordering-board {
    gap: 9px;
  }
  .order-slot {
    padding: 8px;
  }
  .order-slot h3 {
    font-size: 13px;
  }
  .drag-handle {
    font-size: 11px;
  }
  .story-pair {
    gap: 5px;
    grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr);
  }
  .story-pair figcaption {
    font-size: 14px;
  }
  .story-pair figure {
    padding: 5px;
    border-radius: 9px;
  }
  .story-picture {
    border-radius: 8px;
  }
  .pair-plus {
    font-size: 30px;
  }
  .animation-sentences {
    font-size: 21px;
  }
  .animation-explanation {
    font-size: 14px;
  }
  .animation-controls {
    gap: 8px;
  }
  .animation-controls button {
    font-size: 12px;
    padding: 9px 12px;
  }
  .record-filters {
    padding: 17px;
    gap: 12px;
  }
  .record-filters label {
    width: 100%;
  }
  .record-results dl {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .record-results dd {
    margin-bottom: 13px;
  }
  .saved-take {
    gap: 8px;
  }
  .saved-take audio {
    width: 100%;
  }
  .recording-caption {
    font-size: 16px;
  }
  .observation-check {
    font-size: 11px;
  }
  .evaluation-form select {
    font-size: 12px;
    padding: 11px 7px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ending-fly {
    animation: none;
    opacity: 0.35;
  }
  .ending-new,
  .pair-plus,
  .story-library-card {
    transition: none;
  }
}

/* 3컷도 같은 연결 동작을 두 번 보여 주고, 완성된 앞 문장은 유지합니다. */
.animation-tail { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 22px; font-size: clamp(22px, 3vw, 32px); font-weight: 650; line-height: 2; }
.connection-settings { padding: 20px; border: 1px solid #d7dfcf; border-radius: 16px; background: #f7f9f3; }
.connection-settings h2 { margin-top: 0; }
.connection-setting-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; margin-top: 16px; }
#connection-preview { white-space: pre-line; font-weight: 600; color: #356b56; }
#connection-preview.connection-warning { color: #795b28; font-weight: 400; }
#animation-intermediate { margin: 24px 0; }

/* 연결 연습에서 사용한 문장의 빈칸을 두 선택지로 완성합니다. */
.quiz-card { max-width:900px; margin:24px auto; text-align:center; }
.quiz-sentence { font-size:clamp(25px,3.4vw,38px); font-weight:700; line-height:2; overflow-wrap:anywhere; white-space:pre-wrap; }
.quiz-blank { display:inline-block; min-width:110px; padding:0 12px; margin:0 4px; border:3px dashed #75957a; border-radius:12px; background:#eef5e9; vertical-align:baseline; }
.quiz-filled { border-style:solid; color:#285b3b; background:#e1f0db; }
.quiz-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; margin:32px 0 20px; }
.quiz-choice { display:flex; align-items:center; justify-content:center; gap:18px; min-height:100px; padding:20px; border:2px solid #a6baa0; border-radius:18px; font:inherit; font-size:clamp(23px,3vw,30px); font-weight:700; background:#fffdf5; color:#294737; cursor:pointer; overflow-wrap:anywhere; }
.quiz-number { flex-shrink:0; font-size:20px; padding:8px; border-radius:10px; background:#edf2e5; }
.quiz-choice:hover:not(:disabled) { background:#f0f6e9; border-color:#486c50; }
.quiz-choice:focus-visible { outline:4px solid #748b41; outline-offset:4px; }
.quiz-choice.quiz-incorrect { border-color:#c48b60; background:#fff2e5; }
.quiz-choice.quiz-correct { border-color:#487e51; background:#e5f3df; }
.quiz-choice:disabled { opacity:1; cursor:default; }
.quiz-feedback { min-height:2em; font-size:24px; font-weight:700; color:#35583f; }
.quiz-card #quiz-next { width:auto; }
@media(max-width:600px) { .quiz-choices { grid-template-columns:1fr; gap:16px; } .quiz-choice { min-height:84px; } .quiz-blank { min-width:80px; } }
