.listen-complete-word-dialog { width: min(740px, calc(100vw - 24px)); max-width: 740px; max-height: calc(100dvh - 24px); margin: auto; padding: 0; overflow: auto; border: 1px solid #dce3d5; border-radius: 24px; background: #fffdf7; color: #233d35; box-shadow: 0 18px 80px #17332645; font-family: 'Nunito', sans-serif; }
.listen-complete-word-dialog::backdrop { background: #163b2d80; backdrop-filter: blur(5px); }
.listen-complete-word-dialog *, .listen-complete-word-dialog *::before, .listen-complete-word-dialog *::after { box-sizing: border-box; }
.listen-complete-word-dialog [hidden] { display: none !important; }
.listen-complete-word-dialog button { min-height: 48px; padding: 12px 17px; border: 1px solid #b8cbb3; border-radius: 13px; background: #fffefb; color: #286744; font: 800 16px/1.3 'Nunito', sans-serif; cursor: pointer; }
.listen-complete-word-dialog button:hover:enabled { background: #edf4e8; border-color: #44764d; }
.listen-complete-word-dialog button:disabled { opacity: .48; cursor: default; }
.listen-complete-word-dialog button:focus-visible { outline: 3px solid #3768b6; outline-offset: 3px; }
.listen-complete-word-dialog .lcw-primary { color: #fff; background: #286744; border-color: #286744; }
.listen-complete-word-dialog .lcw-primary:hover:enabled { background: #205738; border-color: #205738; }
.lcw-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 26px; border-bottom: 1px solid #e2e7db; position: sticky; top: 0; z-index: 2; background: #fffdf7; }
.lcw-eyebrow { margin: 0 0 6px; color: #58704f; font-size: 11px; font-weight: 900; letter-spacing: 1.2px; }
.lcw-header h3 { margin: 0; font-size: clamp(23px, 4vw, 29px); line-height: 1.25; }
.lcw-body h4:focus, .lcw-header h3:focus { outline: none; }
.listen-complete-word-dialog .lcw-close { flex: 0 0 48px; width: 48px; padding: 0; border-radius: 50%; font-size: 30px; font-weight: 600; line-height: 1; }
.lcw-body { padding: 24px 26px 28px; }
.lcw-body h4 { margin: 0 0 12px; font-size: clamp(23px, 4vw, 29px); line-height: 1.3; text-align: center; }
.lcw-intro { margin: 0 0 23px; color: #536b4d; font-size: 17px; line-height: 1.6; text-align: center; }
.lcw-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lcw-levels button { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; min-height: 174px; padding: 20px 8px; text-align: center; background: #f4f7ed; }
.lcw-levels small { font-size: 12px; font-weight: 800; }
.lcw-levels strong { font-size: 20px; line-height: 1.25; }
.lcw-levels span:not(.lcw-level-stars) { font-size: 13px; font-weight: 700; }
.lcw-level-stars { min-height: 31px; color: #ae851e; font-size: 25px; letter-spacing: 3px; }
.lcw-helper { margin: 20px 0 0; color: #536b4d; font-size: 14px; text-align: center; }
.lcw-progress-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; color: #536b4d; font-size: 13px; font-weight: 800; }
.lcw-progress-row p { margin: 0; }
.lcw-level-name { padding: 6px 11px; border-radius: 20px; background: #eaf1e3; }
.lcw-paws { display: flex; justify-content: center; gap: 10px; margin: 10px 0 12px; padding: 0; list-style: none; }
.lcw-paws li { width: 26px; height: 26px; color: #d5ddcf; }
.lcw-paws li.is-complete { color: #387553; }
.lcw-paws svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.listen-complete-word-dialog .lcw-hear { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 54px; margin-top: 10px; font-size: 20px; }
.lcw-hear svg { width: 27px; height: 27px; flex: 0 0 27px; }
.lcw-voice-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px; align-items: center; gap: 8px; height: 64px; padding: 6px 0; }
.lcw-voice-row p { margin: 0; color: #536b4d; font-size: 13px; line-height: 1.3; }
.listen-complete-word-dialog .lcw-small { min-height: 44px; padding: 8px; font-size: 13px; }
.lcw-clue { position: relative; height: 120px; border: 1px solid #e0dfc7; border-radius: 17px; background: #faf4df; }
.lcw-clue-placeholder { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 16px; color: #536b4d; font-size: 16px; line-height: 1.5; text-align: center; }
.lcw-clue-content { display: flex; align-items: center; justify-content: center; gap: 25px; height: 100%; padding: 12px; }
.lcw-picture { flex: 0 0 82px; font-family: 'Segoe UI Emoji', 'Apple Color Emoji', sans-serif; font-size: 70px; line-height: 1; text-align: center; }
.lcw-incomplete { min-width: 0; margin: 0; color: #233d35; font-size: 48px; font-weight: 900; letter-spacing: .09em; line-height: 1.2; white-space: nowrap; }
.lcw-clue.is-complete { background: #eaf3e2; border-color: #a7c499; }
.lcw-clue.is-complete .lcw-incomplete { color: #286744; }
.lcw-body .lcw-question { margin: 12px 0 10px; font-size: 18px; line-height: 1.35; }
.lcw-pad { position: relative; width: 100%; aspect-ratio: 1.8; min-height: 230px; max-height: 300px; overflow: hidden; border: 2px solid #a6b9a0; border-radius: 18px; background: #fff; }
.lcw-pad canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; background: #fff; touch-action: none; user-select: none; -webkit-user-select: none; }
.lcw-writing-actions { display: grid; grid-template-columns: minmax(80px, .65fr) minmax(0, 1.35fr); gap: 10px; margin: 13px 0 0; }
.lcw-writing-actions button { min-height: 54px; }
.lcw-writing-actions button, .lcw-feedback-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.lcw-writing-actions button svg, .lcw-feedback-actions button svg { flex: 0 0 23px; width: 23px; height: 23px; }
.lcw-feedback-panel { position: relative; margin-top: 20px; padding: 18px; border: 1px solid #d6e2cd; border-radius: 17px; background: #f0f5e9; scroll-margin-top: 125px; }
.lcw-feedback-panel[data-kind='wrong'] { background: #fbf2e8; border-color: #ead7c0; }
.lcw-feedback-panel p { margin: 0 0 12px; color: #286744; font-size: 21px; font-weight: 900; line-height: 1.4; text-align: center; }
.lcw-feedback-panel[data-kind='error'] p { font-size: 16px; }
.lcw-feedback-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lcw-feedback-actions button { flex: 1 1 110px; }
.lcw-feedback-actions:empty { display: none; }
.lcw-stars { position: absolute; top: -33px; left: 0; right: 0; display: flex; justify-content: center; gap: 18px; height: 32px; pointer-events: none; color: #ae851e; font-size: 27px; }
.lcw-stars span { animation: lcw-star-pop 850ms ease-out both; }
.lcw-stars span:nth-child(2) { animation-delay: 90ms; }
.lcw-stars span:nth-child(3) { animation-delay: 180ms; }
@keyframes lcw-star-pop { 0% { opacity: 0; transform: scale(.65) translateY(7px); } 45% { opacity: 1; transform: scale(1.12) translateY(-4px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
.listen-complete-word-dialog .lcw-change-level { display: block; margin: 20px auto 0; border-color: transparent; background: transparent; font-size: 14px; }
.lcw-complete { padding: 18px 0 14px; text-align: center; }
.lcw-complete-star { color: #ae851e; font-size: 76px; }
.lcw-complete h4 { margin-top: 15px; }
.lcw-complete p { margin: 0 0 23px; font-size: 18px; line-height: 1.6; }
.lcw-complete-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
@media (max-width: 520px) {
  .listen-complete-word-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 18px; }
  .lcw-header { padding: 13px 14px; gap: 10px; }
  .lcw-header h3 { font-size: 21px; }
  .lcw-body { padding: 14px 12px 18px; }
  .lcw-levels { grid-template-columns: 1fr; gap: 10px; }
  .lcw-levels button { display: grid; grid-template-columns: 80px 1fr; grid-template-rows: auto auto auto; min-height: 108px; padding: 13px 15px; gap: 3px 10px; text-align: left; }
  .lcw-level-stars { grid-row: 1 / 4; align-self: center; font-size: 21px; letter-spacing: 0; }
  .lcw-levels strong { font-size: 19px; }
  .lcw-intro { font-size: 15px; }
  .lcw-paws { margin: 8px 0 10px; gap: 9px; }
  .lcw-paws li { width: 23px; height: 23px; }
  .listen-complete-word-dialog .lcw-hear { min-height: 48px; margin-top: 8px; font-size: 18px; }
  .lcw-progress-row { gap: 6px; font-size: 12px; }
  .lcw-level-name { padding: 5px 8px; }
  .lcw-clue { height: 106px; }
  .lcw-clue-content { gap: 13px; padding: 9px; }
  .lcw-picture { flex-basis: 58px; font-size: 53px; }
  .lcw-incomplete { font-size: clamp(32px, 10.5vw, 40px); letter-spacing: .07em; }
  .lcw-body .lcw-question { margin: 10px 0 8px; font-size: 16px; }
  .lcw-pad { height: 210px; min-height: 210px; max-height: 210px; aspect-ratio: auto; }
  .lcw-writing-actions { gap: 8px; }
  .lcw-writing-actions button { padding: 11px 9px; font-size: 14px; }
  .lcw-writing-actions button svg { flex-basis: 20px; width: 20px; height: 20px; }
  .lcw-feedback-panel { padding: 17px 12px; }
  .lcw-feedback-panel p { font-size: 19px; }
  .lcw-voice-row { height: 64px; }
  .listen-complete-word-dialog .lcw-change-level { margin-top: 10px; }
}
@media (prefers-reduced-motion: reduce) { .lcw-stars span { animation: none; } }
