[hidden] { display: none !important; }
.therapy-dialog { border: 1px solid #c8d6bf; border-radius: 20px; padding: 30px; max-width: min(480px, calc(100vw - 32px)); width: 100%; box-sizing: border-box; color: #294737; background: #fffdf5; box-shadow: 0 20px 70px #20362733; }
.therapy-dialog::backdrop { background: #20362788; }
.therapy-dialog h2 { font-size: 23px; line-height: 1.5; margin: 0 0 16px; }
.therapy-dialog p { line-height: 1.8; }
.therapy-dialog label, .manage-form label, .transcript-form label { display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.therapy-dialog input, .manage-form input, .manage-form textarea, .manage-form select, .manage-actions select, .transcript-form textarea, .recording-transcript { box-sizing: border-box; width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid #bdcdb5; border-radius: 9px; background: white; color: #2c4435; font: inherit; max-width: 100%; }
.therapy-dialog input[type=password] { font-size: 27px; letter-spacing: .4em; }
.manage-form { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 22px; margin-top: 22px; }
.manage-form .full-width { grid-column: 1 / -1; }
.manage-form .primary-button { margin-top: 0; }
.manage-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.manage-actions .primary-button { width: auto; margin-top: 0; }
.manage-actions label { flex: 1; min-width: 160px; }
.management-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.content-management-card { padding: 22px; border: 1px solid #d5dfce; border-radius: 14px; background: #f0f4e9; }
.content-management-card p { font-size: 13px; line-height: 1.8; color: #5e7254; }
.content-management-card .secondary-button { display: inline-flex; margin-top: 12px; }
.danger-button { border: 1px solid #c79586; color: #8b382c; background: #fff5f0; border-radius: 9px; padding: 12px 17px; min-height: 44px; font: inherit; font-size: 14px; cursor: pointer; }
.danger-button:disabled, button:disabled { cursor: default; opacity: .55; }
.form-status, #editor-status { font-size: 14px; line-height: 1.7; color: #6b4b34; min-height: 1.7em; }
.editor-picture { margin: 20px 0; padding: 18px; border: 1px solid #d5dfce; border-radius: 12px; display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 16px; }
.editor-picture img, .preview-pictures img, .sentence-picture { width: 100%; height: auto; object-fit: contain; border-radius: 12px; display: block; }
.editor-picture label { margin-bottom: 12px; }
.editor-picture img { max-height: 200px; }
.preview-pictures { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 16px; }
.preview-pictures figure { margin: 0; }
.preview-pictures figcaption { font-size: 18px; line-height: 1.8; margin-top: 10px; }
.recording-entry audio { width: min(600px,100%); display: block; margin: 18px 0; }
.recording-entry p { font-size: 14px; line-height: 1.8; }
.transcript-form { margin: 16px 0; }
.transcript-form button { margin-top: 10px; }
.recording-wave { width: 100%; height: 56px; background: #ecf3e5; border-radius: 8px; margin: 12px 0; }
.recording-review { margin: 12px 0; }
.recording-review .manage-actions { gap: 8px; }
.recording-review label { font-size: 12px; display: block; margin: 12px 0; }
.recording-review .primary-button { width: auto; margin: 0; }
.draft-takes { margin: 10px 0; font-size: 13px; }
.draft-takes button { margin: 8px 0; }
.story-pair.three-pictures { grid-template-columns: minmax(0,1fr) 20px minmax(0,1fr) 20px minmax(0,1fr); }
.ordering-board.three-pictures { grid-template-columns: repeat(3,minmax(0,1fr)); }
.story-thumbnails img { object-fit: contain; flex: 1; min-width: 0; width: 0; }
.home-content-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin: 28px 0; }
.home-content-links a { padding: 15px 22px; border: 1px solid #8ea38a; border-radius: 14px; background: #faf9ef; text-decoration: none; color: #345343; }
.role-button { text-decoration: none; cursor: pointer; }
@media(max-width:650px) {
  .management-grid,.manage-form,.editor-picture { grid-template-columns: 1fr; }
  .editor-picture img { max-width: 320px; margin: auto; }
  .ordering-board.three-pictures { grid-template-columns: 1fr; }
  .ordering-board.three-pictures .order-card img { max-height: 240px; object-fit: contain; }
  .story-pair.three-pictures { grid-template-columns: 1fr; }
  .story-pair.three-pictures .pair-plus { font-size: 24px; }
  .therapy-dialog { padding: 22px; }
  .manage-actions { gap: 8px; }
}

.therapy-dialog .primary-button,.therapy-dialog .secondary-button { display:inline-flex; justify-content:center; align-items:center; padding:12px 20px; border:1px solid #65815d; border-radius:9px; font:inherit; cursor:pointer; min-height:46px; }
.therapy-dialog .primary-button { background:#486c50; color:white; }
.therapy-dialog .secondary-button { background:#f7faef; color:#35523d; }
.keyword-panel .sentence-picture { margin-bottom:20px; }

.order-card { touch-action: none; cursor: grab; user-select: none; }
.order-card.moving { position: relative; z-index: 5; cursor: grabbing; transition: none; }
.story-situation { max-width: 760px; margin: 20px auto; }
.story-situation > p { font-size: clamp(20px, 3vw, 28px); line-height: 1.9; }
.record-selection { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 24px 0 16px; }
.record-select-label { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; cursor: pointer; }
.record-select-label input { width: 22px; height: 22px; accent-color: #486c50; }
.record-table tr:has([data-record-select]:checked),.record-table tr.record-checked { background: #eaf1e3; }
.record-table td.record-selection-cell { min-width:64px; }
.record-choice { width:44px; justify-content:center; padding:6px 8px; border:1px solid #bacbb2; border-radius:9px; background:#fff; white-space:nowrap; box-sizing:border-box; }
.record-choice input { flex-shrink:0; }
.record-checked .record-choice { border-color:#486c50; background:#e5f0df; color:#294737; }
.record-choice:focus-within { outline:3px solid #8ca67d; outline-offset:3px; }
#selected-record-count { font-weight:700; color:#35583f; }
#delete-selected-records { min-height:48px; }

/* 활동 화면의 시선을 그림 → 단어 → 녹음 순서로 모읍니다. */
.sentence-focus { max-width: 700px; margin: 0 auto; }
.sentence-focus .keyword-panel { padding: 22px; }
.sentence-focus .sentence-picture { width: min(100%, 490px); max-height: 310px; object-fit: contain; margin: 0 auto 20px; }
.sentence-focus .keyword-cards { max-width: 550px; justify-content: center; flex-wrap: wrap; gap: 18px; }
.sentence-focus .keyword-card { min-width: 0; flex: 1 1 38%; box-sizing: border-box; padding: 20px 14px; gap: 12px; }
.sentence-focus .keyword-card strong { font-size: clamp(25px, 4vw, 36px); overflow-wrap: anywhere; }
.sentence-focus .keywords-waiting .keyword-card { opacity: 0; }
.sentence-focus .keywords-enter .keyword-card { animation: keyword-boing 780ms cubic-bezier(.2,.7,.3,1) var(--keyword-delay) both; }
.sentence-recording { margin-top: 20px; }
.sentence-recording .recording-caption { text-align: center; }
.sentence-recording .recording-controls { justify-content: center; }
.sentence-recording .record-button { min-width: min(280px, 100%); min-height: 66px; padding: 16px 24px; font-size: 21px; font-weight: 650; border-radius: 16px; }
.sentence-recording .record-button svg { width: 29px; height: 29px; }
@keyframes keyword-boing {
  0% { opacity: 0; transform: translateY(28px) scale(.96); }
  48% { opacity: 1; transform: translateY(-13px) scale(1.015); }
  72% { opacity: 1; transform: translateY(5px) scale(.995); }
  88% { transform: translateY(-3px); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.order-situation { max-width: 850px; margin: 0 auto 28px; text-align: center; }
.order-situation p { font-size: clamp(18px, 2.3vw, 23px); line-height: 1.8; }
.ordering-instruction { text-align: center; font-weight: 650; font-size: 19px; line-height: 1.7; margin: 26px 0 8px; }
.ordering-alternative { text-align: center; font-size: 13px; color: #65775c; }
.order-slot.order-incorrect { border: 3px dashed #b6634b; background: #fff1e9; }
.order-slot.order-incorrect .order-card { outline: 2px solid #b6634b; }
.order-slot.order-correct { border: 3px solid #52835b; background: #e6f2df; }
#order-auto-message { margin-top: 0; }
#order-sound-status { text-align: center; }
.ending-fly { animation: whole-predicate-away 1500ms ease-in forwards; }
.ending-floating { animation: predicate-appear 700ms ease-out both; }
@keyframes whole-predicate-away {
  0% { transform: translate(0, 0); opacity: 1; }
  20% { transform: translate(0, -22px) rotate(-5deg); opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translate(110vw, -150px) rotate(20deg); opacity: 0; }
}
@keyframes predicate-appear { from { opacity: 0; } to { opacity: 1; } }
.next-choice-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; margin: 32px 0; }
.next-choice-card { display: flex; flex-direction: column; gap: 13px; justify-content: center; min-height: 170px; box-sizing: border-box; padding: 26px 30px; border: 2px solid; border-radius: 20px; text-decoration: none; box-shadow: 0 5px 0 #304b3c12; }
.next-choice-card strong { font-size: clamp(21px,2.4vw,27px); }
.next-choice-card > span:last-child { font-size: 15px; line-height: 1.6; }
.next-choice-card b { margin-left: 10px; }
.choice-interest { color: #2f5d45; background: #e8f1df; border-color: #9ebd8e; }
.choice-situation { color: #66502d; background: #fff3d8; border-color: #d5b980; }
.choice-symbol { font-size: 31px; line-height: 1; }
.next-choice-card:hover { filter: brightness(.97); }
.next-choice-card:focus-visible { outline: 3px solid #335d4a; outline-offset: 5px; }
@media(max-width:650px) {
  .sentence-focus .keyword-panel { padding: 15px; }
  .sentence-focus .sentence-picture { max-height: 240px; margin-bottom: 16px; }
  .sentence-focus .keyword-cards { gap: 12px; }
  .sentence-focus .keyword-card { padding: 18px 10px; }
  .sentence-recording { padding: 20px 16px; }
  .order-situation { margin-bottom: 20px; }
  .ordering-instruction { font-size: 17px; }
  .next-choice-cards { grid-template-columns: 1fr; gap: 18px; margin: 26px 0; }
  .next-choice-card { min-height: 142px; padding: 22px 24px; }
}
@media(prefers-reduced-motion:reduce) {
  .sentence-focus .keywords-enter .keyword-card { animation: none; opacity: 1; transform: none; }
  .ending-fly { animation: none; opacity: 0; }
  .ending-floating { animation: none; transform: none; }
}

/* 그림별 자발화와 모방은 같은 크기의 그림 아래에서 녹음합니다. */
.story-speaking-focus { width: min(100%, 760px); margin: 0 auto; display: grid; gap: 18px; }
.story-speaking-focus .picture-panel { padding: 16px; text-align: center; }
.story-speaking-focus .story-picture { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain; margin: 0 auto; }
.story-speaking-focus .speak-button { margin-top: 14px; min-height: 54px; font-size: 1.1rem; }
.story-speaking-focus .activity-card { padding: 22px; }
.story-speaking-focus .recording-controls { justify-content: center; }
.story-speaking-focus .record-button { min-height: 66px; padding: 14px 30px; font-size: 1.15rem; }
.story-speaking-focus .recorder > h3 { text-align: center; }
.activity-start { max-width: 680px; margin: 32px auto; padding: 38px 24px; text-align: center; }
.activity-start .primary-button { margin: 16px auto 0; min-height: 64px; font-size: 1.25rem; }
.entry-waiting { opacity: 0; pointer-events: none; }
.keyword-enter { animation: keyword-boing 780ms both; }
.picture-enter { animation: picture-boing 780ms both; }
@keyframes picture-boing {
  0% { opacity: 0; transform: translateY(28px) scale(.97); }
  45% { opacity: 1; transform: translateY(-12px) scale(1.015); }
  70% { transform: translateY(5px) scale(.995); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.order-card { position: relative; }
.order-card::after { content: ''; position: absolute; inset: 0 0 46px; background: rgba(222, 44, 47, .31); border-radius: 14px; opacity: 0; pointer-events: none; transition: opacity .45s ease; }
.order-slot.order-incorrect .order-card::after { opacity: 1; }
.order-slot.order-incorrect { border-color: #d64a4a; background: #fff1ef; }
.order-slot { transition: background-color .45s, border-color .45s; }
.interest-grid { gap: 24px; }
.interest-grid .interest-card { min-height: 272px; padding: 28px 24px; border: 3px solid rgba(49, 83, 72, .22); border-radius: 24px; }
.interest-grid .interest-icon { width: 96px; height: 96px; }
.interest-grid .interest-icon svg { width: 88px; height: 88px; }
.interest-grid .interest-card h3 { font-size: 1.5rem; }
.interest-grid .interest-card p { font-size: 1rem; line-height: 1.5; }
.interest-grid .interest-card[aria-current="true"] { border-color: #23795e; box-shadow: 0 0 0 4px #c8e5d7; }
.interest-grid .interest-card[aria-current="true"]::after { content: '선택한 관심사'; position: absolute; right: 14px; top: 14px; background: #23795e; color: white; border-radius: 8px; padding: 5px 8px; font-size: .8rem; }
.library-entry { animation: library-boing 650ms both; animation-delay: var(--entry-delay, 0ms); }
@keyframes library-boing {
  0% { opacity: 0; transform: translateY(24px); }
  55% { opacity: 1; transform: translateY(-8px); }
  78% { transform: translateY(3px); }
  100% { opacity: 1; transform: translateY(0); }
}
@media (max-width: 600px) {
  .interest-grid { gap: 16px; }
  .interest-grid .interest-card { min-height: 242px; padding: 22px 16px; }
  .interest-grid .interest-card h3 { font-size: 1.25rem; }
  .interest-grid .interest-icon { width: 80px; height: 80px; }
  .interest-grid .interest-icon svg { width: 76px; height: 76px; }
  .story-speaking-focus .activity-card { padding: 16px; }
  .story-speaking-focus .story-picture { max-height: 320px; }
}
@media (prefers-reduced-motion: reduce) {
  .keyword-enter, .picture-enter, .library-entry { animation-duration: 1ms; }
  .order-card::after, .order-slot { transition-duration: 1ms; }
}
.legacy-activities { margin-top: 28px; padding: 18px 22px; border: 1px solid #c9d9cc; border-radius: 16px; background: #f6f8f0; }
.legacy-activities summary { cursor: pointer; font-weight: 700; }
.picture-speaking-step .activity-intro { max-width: 850px; margin: 20px auto 24px; text-align: center; }
.picture-speaking-step .picture-panel .target-sentence { margin-top: 14px; color: #315b43; font-size: clamp(25px, 3vw, 34px); font-weight: 700; line-height: 1.6; }
[data-navigation-sound].navigation-selected { outline: 3px solid #3b8061; outline-offset: 4px; filter: brightness(1.04); }


.performance-record-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 132px;
  min-height: 56px;
  margin: 4px 0;
  padding: 13px 22px;
  border: 2px solid #35583f;
  border-radius: 12px;
  background: #486c50;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 3px 0 #29473726;
  transition: background-color .15s, box-shadow .15s, transform .15s;
}
@media (hover: hover) {
  .performance-record-button:hover {
    background: #35583f;
    box-shadow: 0 5px 10px #29473726;
    transform: translateY(-2px);
  }
}
.performance-record-button:focus-visible { outline: 3px solid #b48628; outline-offset: 4px; }
.performance-record-button:active { background: #294737; box-shadow: 0 1px 0 #29473726; transform: translateY(1px); }
@media (max-width: 650px) {
  .performance-record-button { min-width: 120px; padding: 13px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .performance-record-button { transition: none; }
  .performance-record-button:hover, .performance-record-button:active { transform: none; }
}

.sync-notice { margin: 20px 0; padding: 16px 20px; border: 1px solid #aac0b2; border-radius: 14px; background: #f0f6f2; color: #294638; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.sync-notice[hidden] { display: none; }
.manage-form small { display: block; font-weight: 400; line-height: 1.6; }
.manage-form input[type="checkbox"] { width: auto; min-width: 22px; min-height: 22px; }

/* 관심사 → 상황 → 세부 수정 관리 화면에만 적용합니다. */
.interest-management-grid,.situation-management-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; margin:24px 0; }
.interest-management-card { padding:20px; border:1px solid #c4d1bd; border-radius:16px; background:#fffdf5; }
.interest-management-link { display:block; text-decoration:none; color:#294737; min-height:190px; }
.interest-management-link svg { width:72px; height:72px; }
.interest-management-link h2,.situation-management-card h2 { font-size:22px; margin:12px 0; overflow-wrap:anywhere; }
.interest-management-link p,.situation-management-card p { font-size:15px; line-height:1.7; overflow-wrap:anywhere; }
.interest-management-link span,.situation-management-card span { display:block; font-size:15px; font-weight:700; margin:16px 0; }
.interest-management-card .manage-actions { margin-top:20px; }
.situation-management-card { display:block; border:1px solid #c4d1bd; border-radius:16px; overflow:hidden; background:#fffdf5; text-decoration:none; color:#294737; transition:transform .15s,box-shadow .15s; }
.situation-management-card img { display:block; width:100%; height:165px; object-fit:contain; background:#f3f5ed; }
.situation-management-card > div { padding:18px; }
.situation-management-card .situation-target { font-size:19px; font-weight:700; }
.situation-management-card:hover { transform:translateY(-3px); box-shadow:0 5px 16px #29473718; }
.interest-management-link:focus-visible,.situation-management-card:focus-visible { outline:3px solid #497258; outline-offset:5px; border-radius:10px; }
@media(max-width:900px){ .interest-management-grid,.situation-management-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:550px){ .interest-management-grid,.situation-management-grid { grid-template-columns:1fr; } .interest-management-link { min-height:0; } }

.interest-card h3,.interest-card p,.situation-copy h2,.situation-copy p { overflow-wrap:anywhere; }
.situation-management-item { display:flex; flex-direction:column; min-width:0; gap:12px; }
.situation-management-item .situation-management-card { flex:1; }
.situation-delete-actions { display:flex; justify-content:flex-end; }
.situation-delete-actions button { min-height:46px; padding:12px 20px; }

/* 콘텐츠 보관소는 기존 관리 화면의 카드와 버튼을 재사용합니다. */
.archive-navigation { margin:20px 0 28px; gap:12px; }
.archive-list { display:grid; gap:24px; }
.archive-item,.archive-card { min-width:0; overflow-wrap:anywhere; }
.archive-version { border-top:1px solid #d7e3df; padding:18px 0; }
.archive-version > summary { cursor:pointer; padding:12px 0; font-weight:700; line-height:1.6; }
.archive-version > .primary-button { margin-top:18px; }
.archive-pictures { display:flex; gap:12px; align-items:flex-start; flex-wrap:wrap; }
.archive-pictures > img,.archive-pictures > figure { width:min(100%,220px); flex:1 1 140px; min-width:0; margin:0; }
.archive-pictures img { max-width:100%; height:180px; object-fit:contain; border-radius:12px; background:#f7faf8; }
.archive-pictures figcaption { line-height:1.6; margin-top:10px; }
.archive-interest-icon { width:90px; height:90px; }
.archive-card .manage-actions { margin-top:18px; }
.situation-delete-actions { display:flex; flex-wrap:wrap; gap:10px; }
#archive-child-choice { display:block; line-height:1.8; margin:16px 0; }
#archive-child-choice[hidden] { display:none; }
#archive-child-choice select { width:100%; min-height:48px; }
#archive-action-status:not(:empty) { position:fixed; bottom:12px; left:16px; right:16px; max-width:760px; margin:0 auto; padding:16px; border:1px solid #83b4a3; border-radius:14px; background:#edf8f2; z-index:2; }
@media(max-width:600px) { .archive-item .section-heading { align-items:stretch; gap:12px; } .archive-navigation > a { flex:1 1 100%; text-align:center; } .archive-item .manage-actions > button { min-height:48px; } }

.content-row-actions { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px; align-items:stretch; }
.content-row-actions > a,.content-row-actions > button { width:100%; min-width:0; min-height:48px; padding:12px 8px; justify-content:center; text-align:center; }
.archive-empty { margin-top:24px; text-align:center; }
.archive-empty h2 { font-size:1.25rem; }
.editor-save-actions { gap:12px; }

.archive-tabs { margin:20px 0; gap:12px; }
.archive-tabs > a { min-height:48px; }
.archive-item-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; flex-shrink:0; }
.archive-item-actions-single { grid-template-columns:minmax(0,1fr); }
.archive-item .archive-item-actions > button { min-height:48px; min-width:100px; padding:12px 16px; margin:0; width:100%; }
@media(max-width:600px) { .archive-item .section-heading { flex-direction:column; } .archive-item-actions { width:100%; } .archive-item .archive-item-actions > button { min-width:0; } }
