#glang-preview { color-scheme: light dark; }
  #glang-preview .glang-stage { padding: 22px 12px; min-height: 660px; box-sizing: border-box; }
  #glang-preview .glang-app {
    --glang-bg: light-dark(#fffaf1, #24221e);
    --glang-surface: light-dark(#ffffff, #302e29);
    --glang-ink: light-dark(#272b28, #f1f0e9);
    --glang-muted: light-dark(#66695e, #babcb0);
    --glang-line: light-dark(#e6e4d8, #49483f);
    --glang-blue: #147BE5;
    --glang-orange: #F78A23;
    --glang-green: light-dark(#355c43, #c5e3b7);
    --glang-action: light-dark(#355c43, #c5e3b7);
    --glang-on-action: light-dark(#ffffff, #22351c);
    --glang-soft: light-dark(#edf1e7, #363d2f);
    --glang-radius: 24px;
    color: var(--glang-ink); background: var(--glang-bg); border: 1px solid var(--glang-line);
    border-radius: var(--glang-radius); overflow: hidden; max-width: 760px; margin: 0 auto;
    font-family: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
    font-size: 15px; line-height: 1.55; font-weight: 400;
    box-shadow: 0 12px 30px light-dark(#2833260a, #0000001a);
  }
  #glang-preview .glang-app.basic {
    --glang-bg: light-dark(#f5f6f3, #202421);
    --glang-surface: light-dark(#ffffff, #2a302b);
    --glang-line: light-dark(#dde2da, #424b43);
    --glang-radius: 16px;
  }
  #glang-preview .glang-app * { box-sizing: border-box; }
  #glang-preview .glang-app button { font: inherit; color: inherit; }
  #glang-preview .glang-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; background: var(--glang-surface); }
  #glang-preview .glang-brand { display: flex; align-items: center; gap: 11px; font-weight: 500; }
  #glang-preview .glang-brand small { display: block; font-size: 12px; color: var(--glang-muted); font-weight: 400; margin-top: 2px; }
  #glang-preview .glang-monogram { display: grid; place-items: center; width: 42px; height: 42px; background: var(--glang-soft); color: var(--glang-green); border-radius: 14px; font-size: 27px; font-weight: 500; flex-shrink: 0; }
  #glang-preview .basic .glang-monogram { border-radius: 10px; }
  #glang-preview .glang-tag { color: var(--glang-muted); font-size: 12px; text-align: right; }
  #glang-preview .glang-sound, #glang-preview .glang-listen { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--glang-line); border-radius: 12px; background: var(--glang-surface); white-space: nowrap; }
  #glang-preview .glang-sound { font-size: 12px; }
  #glang-preview .glang-listen:disabled { opacity: .45; }
  #glang-preview .glang-sound svg, #glang-preview .glang-listen svg { width: 16px; height: 16px; flex-shrink: 0; }
  #glang-preview .glang-audio-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 24px 0; }
  #glang-preview .glang-listen { font-size: 13px; color: var(--glang-green); }
  #glang-preview .glang-audio-status { font-size: 12px; color: var(--glang-muted); }
  #glang-preview .glang-steps { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 4px; padding: 17px 24px 0; }
  #glang-preview .glang-step { padding: 8px 2px; font-size: 12px; color: var(--glang-muted); border: 0; border-bottom: 3px solid var(--glang-line); background: transparent; text-align: center; min-height: 44px; white-space: normal; }
  #glang-preview .glang-step.active { color: var(--glang-green); border-color: var(--glang-green); font-weight: 500; }
  #glang-preview .glang-step.done { border-color: var(--glang-blue); }
  #glang-preview .glang-main { padding: 26px 30px 20px; min-height: 422px; }
  #glang-preview .glang-kicker { font-size: 12px; letter-spacing: .04em; color: var(--glang-muted); margin-bottom: 8px; }
  #glang-preview .glang-app h2 { font-size: 26px; line-height: 1.35; font-weight: 500; margin: 0 0 9px; color: var(--glang-ink); }
  #glang-preview .glang-app p { margin: 0; }
  #glang-preview .glang-sub { font-size: 14px; color: var(--glang-muted); }
  #glang-preview .glang-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 14px 24px; font-size: 11px; color: var(--glang-muted); border-top: 1px solid var(--glang-line); }
  #glang-preview b { font-weight: 500; }
  #glang-preview .glang-consonant { color: var(--glang-blue); }
  #glang-preview .glang-vowel { color: var(--glang-orange); }
  #glang-preview .glang-video { background: var(--glang-soft); border-radius: 20px; min-height: 180px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; padding: 26px; margin: 20px 0; position: relative; }
  #glang-preview .glang-video-word { font-size: clamp(42px,9vw,72px); line-height: 1.15; letter-spacing: .04em; font-weight: 500; }
  #glang-preview .glang-video-caption { font-size: 13px; color: var(--glang-muted); margin-top: 12px; }
  #glang-preview .glang-video-symbol { color: var(--glang-green); display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--glang-surface); }
  #glang-preview .glang-video-symbol svg { width: 32px; height: 32px; }
  #glang-preview .glang-time { font-size: 12px; display: block; margin-top: 8px; text-align: center; color: var(--glang-muted); }
  #glang-preview .glang-actions { display: flex; justify-content: flex-end; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
  #glang-preview .glang-button { min-height: 48px; padding: 11px 22px; border: 1px solid var(--glang-line); border-radius: 13px; background: var(--glang-surface); font-weight: 500; }
  #glang-preview .glang-button.primary { color: var(--glang-on-action); background: var(--glang-action); border-color: transparent; }
  #glang-preview .glang-button:disabled { opacity: .4; }
  #glang-preview .glang-options { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 26px 0 16px; flex-wrap: wrap; }
  #glang-preview .glang-letter { border: 2px solid var(--glang-line); border-radius: 22px; background: var(--glang-surface); width: 114px; height: 116px; padding: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
  #glang-preview .glang-letter .glyph { font-size: 53px; line-height: 1.1; font-weight: 500; color: var(--glang-blue); }
  #glang-preview .glang-letter.vowel .glyph { color: var(--glang-orange); }
  #glang-preview .glang-letter small { font-size: 11px; color: var(--glang-muted); }
  #glang-preview .glang-letter.chosen { border-color: var(--glang-green); background: var(--glang-soft); }
  #glang-preview .glang-letter:disabled { opacity: .36; }
  #glang-preview .basic .glang-letter { border-radius: 12px; width: 100px; height: 100px; }
  #glang-preview .basic .glang-letter .glyph { font-size: 44px; }
  #glang-preview .glang-feedback { min-height: 46px; padding: 10px 0; text-align: center; color: var(--glang-green); font-size: 14px; }
  #glang-preview .glang-feedback.hint { color: var(--glang-muted); }
  #glang-preview .glang-equation { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 20px; font-size: 36px; font-weight: 500; }
  #glang-preview .glang-symbol { font-size: 24px; color: var(--glang-muted); }
  #glang-preview .glang-slot { display: grid; place-items: center; width: 65px; height: 70px; border: 2px dashed var(--glang-line); border-radius: 14px; background: var(--glang-surface); }
  #glang-preview .glang-slot.filled { border-style: solid; border-color: var(--glang-line); }
  /* 한글 글꼴의 영문 문장부호 여백을 보정해 물음표 몸통을 칸 중앙에 둔다. */
  #glang-preview .glang-slot-placeholder { display: block; line-height: 1; transform: translateY(-.08em); }
  #glang-preview .glang-equation .glang-letter { width: 70px; height: 70px; }
  #glang-preview .glang-equation .glang-letter .glyph { font-size: 36px; }
  #glang-preview .glang-combine .glang-options { margin: 18px 0 6px; }
  #glang-preview .glang-combine .glang-options .glang-letter { width: 76px; height: 78px; border-radius: 14px; }
  #glang-preview .glang-combine .glang-options .glyph { font-size: 38px; }
  #glang-preview .glang-slots { display: flex; justify-content: center; gap: 12px; margin-top: 22px; font-size: 40px; }
  #glang-preview .glang-word .glang-letter .glyph { color: var(--glang-ink); font-size: 45px; }
  #glang-preview .glang-summary { margin: 24px 0; display: flex; gap: 20px; align-items: center; justify-content: center; padding: 26px; border-radius: 20px; background: var(--glang-soft); }
  #glang-preview .glang-summary svg { width: 52px; height: 52px; color: var(--glang-green); flex-shrink: 0; }
  #glang-preview .glang-summary-word { font-size: 35px; font-weight: 500; letter-spacing: .05em; }
  #glang-preview .glang-summary small { font-size: 13px; color: var(--glang-muted); }
  #glang-preview .glang-detail { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--glang-muted); }
  #glang-preview .glang-lesson-grid { display: grid; grid-template-columns: 1fr; }
  #glang-preview .basic .glang-lesson-grid { grid-template-columns: 150px minmax(0,1fr); gap: 24px; align-items: center; }
  #glang-preview .glang-sidebar { border-left: 3px solid var(--glang-line); padding-left: 16px; margin: 22px 0; }
  #glang-preview .glang-sidebar p { margin: 8px 0; font-size: 13px; color: var(--glang-muted); }
  #glang-preview .play .glang-sidebar { display: none; }
  #glang-preview .basic h2 { font-size: 24px; }
  #glang-preview .basic .glang-video { min-height: 178px; border-radius: 12px; padding: 20px; gap: 12px; }
  #glang-preview .basic .glang-video-word { font-size: 52px; }
  #glang-preview .glang-preview-label { font-size: 11px; color: var(--glang-muted); }
  #glang-preview .glang-read-title {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px;
    width: 100%; min-height: 44px; padding: 0; border: 0; background: transparent;
    text-align: left; border-radius: 12px;
  }
  #glang-preview .glang-read-title .glang-listen { font-size: 13px; flex-shrink: 0; }
  #glang-preview .glang-read-title:disabled { opacity: .65; }
  #glang-preview .glang-audio-status { display: block; min-height: 22px; margin-top: 10px; }
  #glang-preview .glang-hear {
    display: inline-grid; place-items: center; border: 0; padding: 0 6px;
    min-width: 44px; min-height: 44px; border-radius: 12px;
    background: transparent; vertical-align: middle;
  }
  #glang-preview .glang-hear.glang-consonant { color: var(--glang-blue); }
  #glang-preview .glang-hear.glang-vowel { color: var(--glang-orange); }
  #glang-preview .glang-video-word > .glang-hear { font-size: inherit; line-height: inherit; font-weight: inherit; }
  #glang-preview .glang-letter small { display: inline-flex; align-items: center; gap: 4px; }
  #glang-preview .glang-letter small svg { width: 13px; height: 13px; }
  #glang-preview .glang-word .glang-letter.used { opacity: .5; }
  #glang-preview .glang-summary-word .glang-hear { display: inline-flex; gap: 10px; font-size: inherit; }
  #glang-preview .glang-summary-word .glang-hear svg { width: 22px; height: 22px; }
  #glang-preview .glang-app.play {
    color-scheme: light;
    --glang-bg: #fff9e9;
    --glang-surface: #fffefd;
    --glang-ink: #33425c;
    --glang-muted: #616b7a;
    --glang-line: #e7dcc7;
    --glang-blue: #147BE5;
    --glang-orange: #F78A23;
    --glang-green: #287647;
    --glang-action: #ffd34f;
    --glang-on-action: #503b16;
    --glang-soft: #eef9df;
    --glang-radius: 30px;
    --glang-sky: #e3f3ff;
    --glang-sky-edge: #a2d2f2;
    --glang-peach: #fff0de;
    --glang-peach-edge: #f8c38f;
    --glang-yellow: #fff0b2;
    border-color: #ecdfbf;
    box-shadow: 0 10px 0 #dacbb238, 0 18px 40px #30281712;
  }
  #glang-preview .play .glang-header { background: var(--glang-yellow); }
  #glang-preview .play .glang-brand { font-size: 17px; font-weight: 700; }
  #glang-preview .play .glang-monogram {
    background: var(--glang-surface); color: var(--glang-blue);
    border-radius: 15px; box-shadow: 0 3px 0 #e7c86d;
    transform: rotate(-6deg);
  }
  #glang-preview .play .glang-sound { border-color: #e2cb7d; border-radius: 22px; }
  #glang-preview .play .glang-listen {
    background: var(--glang-sky); border-color: var(--glang-sky-edge);
    color: var(--glang-blue); border-radius: 22px; font-weight: 700;
  }
  #glang-preview .play .glang-step { border-radius: 12px 12px 0 0; }
  #glang-preview .play .glang-step.active {
    color: var(--glang-blue); background: var(--glang-sky);
    border-color: var(--glang-blue); font-weight: 700;
  }
  #glang-preview .play .glang-step.done { color: var(--glang-green); border-color: #85bc88; }
  #glang-preview .play h2 { font-weight: 700; }
  #glang-preview .play .glang-kicker {
    display: inline-block; background: var(--glang-peach); color: var(--glang-orange);
    border-radius: 20px; padding: 4px 12px; font-weight: 700;
  }
  #glang-preview .play .glang-video {
    background: var(--glang-sky); border: 2px solid var(--glang-sky-edge);
    border-radius: 28px; box-shadow: 0 5px 0 #c9e4f7;
  }
  #glang-preview .play .glang-video-word { display: flex; align-items: center; gap: 10px; font-weight: 700; }
  #glang-preview .play .glang-video-word > .glang-hear {
    display: inline-grid; place-items: center; min-width: 88px; min-height: 88px;
    background: var(--glang-surface); border-radius: 22px; box-shadow: 0 4px 0 #bad8ed;
  }
  #glang-preview .play .glang-video-word > .glang-vowel {
    background: var(--glang-peach); box-shadow: 0 4px 0 var(--glang-peach-edge);
  }
  #glang-preview .play .glang-video-symbol { background: var(--glang-action); color: var(--glang-on-action); }
  #glang-preview .play .glang-button {
    border-radius: 18px; min-height: 52px; font-weight: 700;
  }
  #glang-preview .play .glang-button.primary { box-shadow: 0 4px 0 #d5a82e; }
  #glang-preview .play .glang-button.primary:active:not(:disabled) { box-shadow: 0 1px 0 #d5a82e; transform: translateY(3px); }
  #glang-preview .play .glang-letter {
    background: var(--glang-sky); border-color: var(--glang-sky-edge);
    box-shadow: 0 5px 0 #c5dff0;
  }
  #glang-preview .play .glang-letter.vowel {
    background: var(--glang-peach); border-color: var(--glang-peach-edge);
    box-shadow: 0 5px 0 #f1d4b6;
  }
  #glang-preview .play .glang-letter .glyph { font-weight: 700; }
  #glang-preview .play .glang-letter.chosen {
    background: var(--glang-soft); border-color: var(--glang-green);
    box-shadow: 0 5px 0 #c5dfb4;
  }
  #glang-preview .play .glang-letter:active:not(:disabled) { transform: translateY(3px); box-shadow: none; }
  #glang-preview .play .glang-slot { border-color: #c9ad75; background: #fffdf5; }
  #glang-preview .play .glang-slot.filled { background: var(--glang-yellow); border-color: #e3be55; }
  #glang-preview .play .glang-summary { background: var(--glang-yellow); border-radius: 28px; }
  #glang-preview .play .glang-summary svg { color: #9b6500; }
  #glang-preview .play .glang-footer { background: #fff4d6; }
  #glang-preview .glang-stage { min-height: 850px; }
  #glang-preview .glang-app { font-size: 17px; font-weight: 600; }
  #glang-preview .glang-main { min-height: 560px; }
  #glang-preview .glang-app h2 { font-size: 30px; font-weight: 800; line-height: 1.45; }
  #glang-preview .glang-app .glang-brand { font-size: 19px; font-weight: 800; }
  #glang-preview .glang-app .glang-brand small { font-size: 13px; font-weight: 600; }
  #glang-preview .glang-app .glang-sub { font-size: 17px; font-weight: 600; line-height: 1.65; }
  #glang-preview .glang-app .glang-step { font-size: 14px; font-weight: 700; }
  #glang-preview .glang-app .glang-kicker { font-size: 14px; font-weight: 700; }
  #glang-preview .glang-app .glang-button { font-size: 18px; font-weight: 800; }
  #glang-preview .glang-app .glang-sound,
  #glang-preview .glang-app .glang-listen { font-size: 15px; font-weight: 700; }
  #glang-preview .glang-app .glang-letter { width: 124px; height: 132px; }
  #glang-preview .glang-app .glang-letter .glyph { font-size: 64px; font-weight: 900; }
  #glang-preview .glang-app .glang-letter small { font-size: 13px; font-weight: 600; }
  #glang-preview .glang-app .glang-feedback { font-size: 17px; font-weight: 700; }
  #glang-preview .glang-app .glang-equation { font-size: 46px; font-weight: 900; }
  #glang-preview .glang-app .glang-combine .glang-options .glang-letter { width: 88px; height: 98px; }
  #glang-preview .glang-app .glang-combine .glang-options .glyph { font-size: 48px; }
  #glang-preview .glang-app .glang-video-word { font-weight: 900; }
  #glang-preview .glang-app .glang-video-caption { font-size: 15px; font-weight: 600; }
  #glang-preview .glang-app .glang-summary-word { font-size: 42px; font-weight: 900; }
  @media (max-width: 560px) {
    #glang-preview .glang-stage { min-height: 720px; padding: 12px 2px; }
    #glang-preview .glang-header { padding: 16px; flex-wrap: wrap; }
    #glang-preview .glang-audio-bar { padding: 12px 16px 0; }
    #glang-preview .glang-main { padding: 22px 16px; min-height: 450px; }
    #glang-preview .glang-steps { padding: 10px 12px 0; }
    #glang-preview .glang-step { font-size: 11px; }
    #glang-preview .glang-app h2 { font-size: 23px; }
    #glang-preview .glang-letter, #glang-preview .basic .glang-letter { width: 76px; height: 88px; border-radius: 14px; }
    #glang-preview .glang-letter .glyph, #glang-preview .basic .glang-letter .glyph { font-size: 40px; }
    #glang-preview .glang-options { gap: 10px; }
    #glang-preview .glang-video { padding: 20px 14px; gap: 10px; }
    #glang-preview .glang-video-symbol { width: 50px; height: 50px; }
    #glang-preview .glang-video-word, #glang-preview .basic .glang-video-word { font-size: 44px; }
    #glang-preview .play .glang-video-word > .glang-hear { min-width: 58px; min-height: 66px; border-radius: 16px; }
    #glang-preview .basic .glang-lesson-grid { grid-template-columns: 1fr; gap: 0; }
    #glang-preview .glang-sidebar { display: none; }
    #glang-preview .glang-equation { gap: 10px; }
    #glang-preview .glang-summary { padding: 22px 14px; gap: 12px; }
    #glang-preview .glang-footer { padding: 12px 16px; }
    #glang-preview .glang-stage { min-height: 920px; }
    #glang-preview .glang-main { min-height: 560px; }
    #glang-preview .glang-app h2 { font-size: 26px; }
    #glang-preview .glang-app .glang-brand { font-size: 18px; }
    #glang-preview .glang-app .glang-step { font-size: 12px; }
    #glang-preview .glang-app .glang-letter,
    #glang-preview .glang-app .glang-combine .glang-options .glang-letter { width: 80px; height: 100px; }
    #glang-preview .glang-app .glang-letter .glyph,
    #glang-preview .glang-app .glang-combine .glang-options .glyph { font-size: 48px; }
    #glang-preview .glang-app .glang-options { gap: 10px; }
    #glang-preview .glang-app .glang-equation { font-size: 42px; gap: 8px; }
  }

#glang-preview .glang-brand-mascot {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}
#glang-preview .glang-companion {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 16px 0 4px;
  min-height: 126px;
}
#glang-preview .glang-mascot {
  display: block;
  width: 130px;
  height: 126px;
  object-fit: contain;
  flex-shrink: 0;
}
#glang-preview .glang-companion-message {
  margin: 0;
  padding: 16px 20px;
  max-width: 240px;
  border-radius: 22px;
  background: var(--glang-surface);
  color: var(--glang-ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}
#glang-preview .play .glang-companion-message { background: #fff0b2; }
#glang-preview .basic .glang-companion { justify-content: flex-start; gap: 16px; min-height: 82px; margin: 12px 0; }
#glang-preview .basic .glang-mascot { width: 82px; height: 82px; }
#glang-preview .basic .glang-companion-message { padding: 8px 0; background: transparent; font-size: 16px; }
#glang-preview .glang-stage { min-height: 940px; }
@media (max-width: 560px) {
  #glang-preview .glang-companion { gap: 12px; min-height: 100px; margin: 12px 0; }
  #glang-preview .glang-mascot { width: 100px; height: 100px; }
  #glang-preview .glang-companion-message { padding: 12px; font-size: 16px; border-radius: 18px; max-width: 180px; }
  #glang-preview .glang-brand-mascot { width: 38px; height: 38px; }
  #glang-preview .glang-stage { min-height: 1040px; }
}

#glang-preview .glang-motion {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--glang-muted);
  flex-shrink: 0;
  font: inherit;
}
#glang-preview .glang-motion-frame {
  position: relative;
  display: block;
  width: 176px;
  height: 160px;
}
#glang-preview .glang-motion video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
}
#glang-preview .glang-motion-fallback {
  position: absolute;
  width: 72%;
  height: 72%;
  object-fit: contain;
  left: 14%;
  top: 14%;
}
/* 글랑이 영상에는 투명 여백이 있다. 922px 원본의
   첫 자세 몸 높이 566px, 바닥 y=827, 중심 x=460을 정지 그림과 맞춘다.
   영상 전체를 다시 맞추지 않으므로 점프·손 흔들기의 자연스러운 움직임은 유지한다. */
#glang-preview .glang-character-motion .glang-motion-fallback {
  left: 0;
  top: auto;
  bottom: 14%;
  width: 100%;
  height: 72%;
  object-position: center bottom;
}
#glang-preview .glang-character-motion video {
  inset: auto;
  left: 50%;
  bottom: 1.915194%;
  width: auto;
  max-width: none;
  height: 117.286219%;
  aspect-ratio: 1;
  transform: translateX(-49.89154%);
}
#glang-preview .glang-motion-canvas {
  position:absolute; inset:0; width:100%; height:100%; pointer-events:none;
}
#glang-preview .glang-character-motion .glang-motion-canvas {
  inset:auto; left:50%; bottom:1.915194%; width:auto; max-width:none;
  height:117.286219%; aspect-ratio:1; transform:translateX(-49.89154%);
}
#glang-preview .glang-motion-caption { display: block; font-size: 13px; font-weight: 600; line-height: 1.4; }
#glang-preview .glang-companion { min-height: 178px; }
#glang-preview .basic .glang-character-motion .glang-motion-frame { width: 112px; height: 100px; }
#glang-preview .basic .glang-companion { min-height: 118px; }
#glang-preview .glang-reward-motion .glang-motion-frame { width: 140px; height: 140px; }
#glang-preview .glang-reward-motion .glang-motion-fallback { inset: 0; width: 100%; height: 100%; }
#glang-preview .glang-summary { flex-wrap: wrap; }
#glang-preview .glang-stage { min-height: 1020px; }
@media (max-width: 560px) {
  #glang-preview .glang-character-motion .glang-motion-frame { width: 130px; height: 130px; }
  #glang-preview .glang-companion { min-height: 150px; gap: 8px; }
  #glang-preview .glang-companion-message { max-width: 160px; }
  #glang-preview .glang-stage { min-height: 1120px; }
}
/* 자음을 문 채 모음을 기다리는 동안 오물오물 */
#glang-preview .glang-motion-frame.glang-chewing { animation: glang-chew .62s ease-in-out infinite; transform-origin: 50% 88%; }
@keyframes glang-chew { 0%,100% { transform: scale(1,1); } 50% { transform: scale(1.035,.965); } }
/* 수업 완료 색종이 */
#glang-preview .glang-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; }
#glang-preview .glang-main { position: relative; }
#glang-preview .glang-confetti i { position: absolute; top: -6%; left: var(--x); width: calc(12px * var(--s)); height: calc(18px * var(--s));
  background: var(--c); border-radius: 3px; opacity: 0; transform: rotate(var(--r));
  animation: glang-confetti 2.6s cubic-bezier(.2,.6,.4,1) var(--d) 1 forwards; }
@keyframes glang-confetti { 0% { opacity: 1; transform: translate3d(0,0,0) rotate(var(--r)); }
  85% { opacity: 1; } 100% { opacity: 0; transform: translate3d(calc((var(--s) - 1) * 160px), 105vh, 0) rotate(calc(var(--r) + 540deg)); } }
@media (prefers-reduced-motion: reduce) {
  #glang-preview .glang-motion-frame.glang-chewing { animation: none; }
  #glang-preview .glang-confetti { display: none; }
}
/* 움직이는 보상은 영상 둘레에 투명 여백이 있어 정지 그림보다 크게 둔다. */
#glang-preview button.glang-reward-motion .glang-motion-frame { width: 210px; height: 210px; }
@media (max-width: 560px) {
  #glang-preview button.glang-reward-motion .glang-motion-frame { width: 172px; height: 172px; }
}

/* 어린이 화면: 한 질문과 큰 선택 카드가 중심. 태블릿 폭에 따라 옆/위로 재배치. */
#glang-preview .play .glang-header { padding: 16px 24px; background: #fff0a5; }
#glang-preview .play .glang-brand small,
#glang-preview .play .glang-kicker,
#glang-preview .play .glang-sub,
#glang-preview .play .glang-footer,
#glang-preview .play .glang-detail,
#glang-preview .play .glang-companion-message,
#glang-preview .play .glang-video-caption { display: none; }
#glang-preview .play .glang-audio-status {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
#glang-preview .play .glang-steps { display: flex; justify-content: center; gap: 18px; padding: 18px 16px 0; }
#glang-preview .glang-star { display: grid; place-items: center; width: 38px; height: 38px; color: #bca364; }
#glang-preview .glang-star svg { width: 32px; height: 32px; }
#glang-preview .glang-star.active { color: #b17a00; }
#glang-preview .glang-star.active svg { fill: #fff0a5; }
#glang-preview .glang-star.done { color: #b17a00; }
#glang-preview .glang-star.done svg { fill: #ffd34f; }
#glang-preview .play .glang-main { padding: 22px 30px 30px; min-height: 620px; }
#glang-preview .play h2 { font-size: 40px; font-weight: 900; line-height: 1.4; }
#glang-preview .play .glang-read-title { justify-content: center; text-align: center; gap: 14px; }
#glang-preview .play .glang-read-title .glang-listen { font-size: 0; width: 54px; height: 54px; padding: 0; border: 0; border-radius: 50%; background: #dcefff; }
#glang-preview .play .glang-listen svg { width: 27px; height: 27px; }
#glang-preview .play .glang-companion { margin: 6px 0 0; min-height: 260px; }
/* 글자 카드의 공간은 유지하며 몸을 약 24% 키운다.
   정지 그림과 영상이 같은 프레임·바닥 보정 비율을 공유한다. */
#glang-preview .play .glang-character-motion .glang-motion-frame { width: 300px; height: 310px; }
#glang-preview .play .glang-motion-caption { display: none; }
#glang-preview .play .glang-options { gap: 26px; margin: 16px 0 10px; }
#glang-preview .play .glang-letter,
#glang-preview .play .glang-combine .glang-options .glang-letter {
  width: 220px; height: 228px; border-radius: 30px; border: 3px solid #96ccec;
  background: #e2f3ff; box-shadow: 0 7px 0 #b2d8ef;
}
#glang-preview .play .glang-letter.vowel { border-color: #f2bd85; background: #fff0dc; box-shadow: 0 7px 0 #f0c79a; }
#glang-preview .play .glang-letter .glyph,
#glang-preview .play .glang-combine .glang-options .glyph { font-size: 124px; font-weight: 900; }
#glang-preview .play .glang-letter small { font-size: 0; }
#glang-preview .play .glang-letter small svg { width: 22px; height: 22px; }
#glang-preview .play .glang-letter.chosen { border-color: #409664; background: #dff4ce; box-shadow: 0 7px 0 #a5d49f; }
#glang-preview .play .glang-feedback { margin: 14px 0 0; padding: 6px; min-height: 42px; font-size: 24px; font-weight: 800; }
#glang-preview .play .glang-feedback.hint { font-size: 21px; }
#glang-preview .glang-auto-note { min-height: 26px; text-align: center; color: var(--glang-muted); font-size: 15px; }
#glang-preview .play .glang-equation { font-size: 66px; margin: 8px 0; }
#glang-preview .play .glang-slots { margin: 8px 0 16px; font-size: 60px; }
#glang-preview .play .glang-slot { width: 88px; height: 92px; border-radius: 20px; }
#glang-preview .play .glang-word .glang-options { gap: 16px; }
#glang-preview .play .glang-word .glang-letter { width: 150px; height: 166px; }
#glang-preview .play .glang-word .glang-letter .glyph { font-size: 84px; }
#glang-preview .play .glang-actions { justify-content: center; gap: 16px; margin-top: 22px; }
#glang-preview .play .glang-button { min-height: 60px; border-radius: 22px; font-size: 22px; padding: 12px 28px; }
#glang-preview .play .glang-button[data-action="start"] { min-width: 200px; }
#glang-preview .play .glang-button svg { width: 22px; height: 22px; display: inline; vertical-align: middle; margin-right: 6px; }
#glang-preview .play .glang-video { margin: 10px 0; min-height: 140px; }
#glang-preview .play .glang-summary { margin: 8px 0 18px; padding: 12px; }
#glang-preview .play .glang-summary small { display: none; }
#glang-preview .play .glang-summary-word { font-size: 44px; }
#glang-preview .glang-stage { min-height: 1060px; }
#glang-preview .glang-reference { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 10px 0; font-size: 62px; font-weight: 900; color: var(--glang-blue); }
#glang-preview .glang-reference .glang-hear { background: var(--glang-surface); border: 2px dashed var(--glang-blue); border-radius: 22px; min-width: 100px; min-height: 90px; }
#glang-preview .glang-reference.help .glang-hear { border-style: solid; box-shadow: 0 0 0 5px var(--glang-soft); }
#glang-preview .glang-reference.vowel,
#glang-preview .glang-slot.glang-vowel { color: var(--glang-orange); }
#glang-preview .glang-reference.vowel .glang-hear,
#glang-preview .glang-slot.glang-vowel,
#glang-preview .play .glang-slot.glang-vowel.filled {
  border-color: var(--glang-orange);
  background: var(--glang-peach, #fff0de);
}
/* 오답 뒤 작은 본보기만 두 번 두근거리고 쉬며 다시 볼 곳을 알려준다. */
#glang-preview .play .glang-reference.hint-pulse .glang-hear {
  border-style: solid;
  background: #fff5cc;
  animation: glang-reference-heartbeat 1600ms ease-in-out infinite;
}
@keyframes glang-reference-heartbeat {
  0%, 44%, 100% { transform: scale(1); box-shadow: 0 0 0 5px var(--glang-soft); }
  13% { transform: scale(1.12); box-shadow: 0 0 0 10px rgb(255 211 79 / 45%); }
  24% { transform: scale(1.02); box-shadow: 0 0 0 6px rgb(255 211 79 / 25%); }
  34% { transform: scale(1.09); box-shadow: 0 0 0 9px rgb(255 211 79 / 40%); }
}
/* 움직임 줄이기 환경에서는 요청한 두근거림의 폭과 속도를 낮춘다. */
@media (prefers-reduced-motion: reduce) {
  #glang-preview .play .glang-reference.hint-pulse .glang-hear {
    animation-name: glang-reference-heartbeat-soft;
    animation-duration: 2000ms;
  }
}
@keyframes glang-reference-heartbeat-soft {
  0%, 44%, 100% { transform: scale(1); box-shadow: 0 0 0 5px var(--glang-soft); }
  13% { transform: scale(1.05); box-shadow: 0 0 0 8px rgb(255 211 79 / 35%); }
  24% { transform: scale(1.01); box-shadow: 0 0 0 6px rgb(255 211 79 / 20%); }
  34% { transform: scale(1.04); box-shadow: 0 0 0 7px rgb(255 211 79 / 30%); }
}
#glang-preview .glang-ghost { opacity: .48; }
#glang-preview .glang-slot.current { border: 3px solid var(--glang-blue); }
#glang-preview .play .glang-meet .glang-letter { width: 270px; height: 270px; }
#glang-preview .play .glang-meet .glyph { font-size: 164px; }
#glang-preview .play .glang-combine .glang-options .glang-letter.vowel { border-color: #f2bd85; background: #fff0dc; box-shadow: 0 7px 0 #f0c79a; }
#glang-preview .play .glang-combine .glang-options .glang-letter.chosen { border-color: #409664; background: #dff4ce; box-shadow: 0 7px 0 #a5d49f; }
#glang-preview .basic .glang-steps { display: flex; flex-wrap: wrap; }
#glang-preview .basic .glang-step { flex: 1 1 75px; }
/* 영상 전 첫 만남에서만 캐릭터를 중앙에 크게 보여준다. */
#glang-preview .play[data-step="0"]:not([data-greeting="video"]) .glang-main { display:block; text-align:center; }
#glang-preview .play[data-step="0"]:not([data-greeting="video"]) .glang-companion { display:flex; justify-content:center; }
/* 칭찬과 진행 안내는 소리로 전달한다. 읽기 보조 정보만 남기고 화면 공간은 글자에 쓴다. */
#glang-preview .play .glang-feedback,
#glang-preview .play .glang-auto-note {
  position:absolute; width:1px; height:1px; min-height:0; padding:0; margin:-1px;
  overflow:hidden; clip-path:inset(50%); white-space:nowrap;
}
@media (min-width: 900px) {
  #glang-preview .glang-app.play { max-width: 1040px; }
  #glang-preview .play .glang-main { display: grid; grid-template-columns: 300px minmax(0,1fr); column-gap: 26px; align-content: start; min-height: 510px; }
  #glang-preview .play .glang-combine,
  #glang-preview .play .glang-word { display: contents; }
  #glang-preview .play h2 { grid-column: 1 / -1; margin-bottom: 28px; }
  #glang-preview .play .glang-companion { grid-column: 1; grid-row: 2 / span 5; align-self: center; }
  #glang-preview .play .glang-options,
  #glang-preview .play .glang-reference,
  #glang-preview .play .glang-equation,
  #glang-preview .play .glang-slots,
  #glang-preview .play .glang-feedback,
  #glang-preview .play .glang-auto-note,
  #glang-preview .play .glang-summary,
  #glang-preview .play .glang-lesson-grid,
  #glang-preview .play .glang-actions { grid-column: 2; }
}
@media (max-width: 560px) {
  #glang-preview .play .glang-main { padding: 20px 14px 26px; }
  #glang-preview .play h2 { font-size: 27px; }
  #glang-preview .play .glang-read-title .glang-listen { width: 46px; height: 46px; }
  #glang-preview .play .glang-letter,
  #glang-preview .play .glang-combine .glang-options .glang-letter { width: 112px; height: 132px; border-radius: 26px; }
  #glang-preview .play .glang-letter .glyph,
  #glang-preview .play .glang-combine .glang-options .glyph { font-size: 76px; }
  #glang-preview .play .glang-word .glang-letter { width: 80px; height: 105px; }
  #glang-preview .play .glang-word .glang-letter .glyph { font-size: 54px; }
  #glang-preview .play .glang-word .glang-options { gap: 10px; }
  #glang-preview .play .glang-character-motion .glang-motion-frame { width: 240px; height: 216px; }
  #glang-preview .play .glang-companion { min-height: 216px; }
  #glang-preview .play .glang-slot { width: 65px; height: 72px; }
  #glang-preview .play .glang-equation { gap: 6px; font-size: 44px; }
}
/* 글랑이를 크게: 넓은 화면일수록 왼쪽 칸과 함께 키운다. 오른쪽 카드 자리(약 650px)는 유지한다. */
@media (min-width: 1000px) {
  #glang-preview .glang-app.play { max-width: 1100px; }
  #glang-preview .play .glang-main { grid-template-columns: 360px minmax(0,1fr); }
  #glang-preview .play .glang-character-motion .glang-motion-frame,
  #glang-preview .play .glang-feed-character .glang-motion-frame { width: 360px; height: 372px; }
  #glang-preview .play .glang-companion { min-height: 320px; }
}
@media (min-width: 1200px) {
  #glang-preview .glang-app.play { max-width: 1180px; }
  #glang-preview .play .glang-main { grid-template-columns: 400px minmax(0,1fr); }
  #glang-preview .play .glang-character-motion .glang-motion-frame,
  #glang-preview .play .glang-feed-character .glang-motion-frame { width: 400px; height: 413px; }
  #glang-preview .play .glang-companion { min-height: 360px; }
}
/* 끝 화면: 글랑이와 보상을 크게, 단어는 보상 아래, 버튼은 맨 아래 한 줄 */
#glang-preview .play h2.glang-title-row { display: flex; align-items: center; justify-content: center; gap: 12px; }
#glang-preview .play .glang-music { display: grid; place-items: center; width: 54px; height: 54px; padding: 0; border: 0; border-radius: 50%; background: #fff0a5; color: #9b6500; flex-shrink: 0; }
#glang-preview .play .glang-music svg { width: 27px; height: 27px; }
#glang-preview .play .glang-music.playing { background: #ffd34f; color: #5c3b00; box-shadow: 0 0 0 5px rgb(255 211 79 / 35%); }
#glang-preview .play .glang-music:disabled { opacity: .45; }
#glang-preview .play[data-step="6"] .glang-summary { flex-direction: column; flex-wrap: nowrap; gap: 4px; margin: 0; padding: 16px 16px 22px; align-self: center; }
#glang-preview .play[data-step="6"] button.glang-reward-motion .glang-motion-frame { width: 300px; height: 300px; }
#glang-preview .play[data-step="6"] div.glang-reward-motion .glang-motion-frame { width: 250px; height: 250px; }
#glang-preview .play[data-step="6"] .glang-summary-word { font-size: 56px; }
#glang-preview .play[data-step="6"] .glang-actions { grid-column: 1 / -1; display: flex; flex-wrap: nowrap; justify-content: center; gap: 14px; margin-top: 20px; }
#glang-preview .play[data-step="6"] .glang-actions .glang-button { flex: 1 1 0; min-width: 0; max-width: 230px; padding: 12px 10px; white-space: nowrap; }
@media (max-width: 560px) {
  #glang-preview .play h2.glang-title-row { gap: 8px; }
  #glang-preview .play .glang-music { width: 46px; height: 46px; }
  #glang-preview .play[data-step="6"] button.glang-reward-motion .glang-motion-frame { width: 210px; height: 210px; }
  #glang-preview .play[data-step="6"] div.glang-reward-motion .glang-motion-frame { width: 180px; height: 180px; }
  #glang-preview .play[data-step="6"] .glang-summary-word { font-size: 40px; }
  #glang-preview .play[data-step="6"] .glang-actions { gap: 6px; }
  #glang-preview .play[data-step="6"] .glang-actions .glang-button { min-height: 52px; padding: 8px 4px; font-size: 15px; border-radius: 18px; }
}
#glang-preview .play h2.glang-title-row .glang-read-title { width: auto; }
/* 끝 화면은 글랑이와 보상이 한 덩어리로 보이게 가운데로 붙인다(영상 둘레 투명 여백만큼 살짝 겹침). */
@media (min-width: 900px) {
  #glang-preview .play[data-step="6"] .glang-main { grid-template-columns: auto auto; justify-content: center; column-gap: 0; }
  #glang-preview .play[data-step="6"] .glang-companion { justify-self: end; margin-right: -28px; }
  #glang-preview .play[data-step="6"] .glang-summary { justify-self: start; min-width: 380px; position: relative; }
}
/* 1024x768 태블릿에서도 버튼 줄이 화면 안에 들어오게 보상을 조금 줄인다. */
@media (min-width: 900px) and (max-width: 1199px) {
  #glang-preview .play[data-step="6"] button.glang-reward-motion .glang-motion-frame { width: 260px; height: 260px; }
  #glang-preview .play[data-step="6"] .glang-summary { min-width: 340px; padding-top: 10px; padding-bottom: 14px; }
}

/* 글자 먹기는 기존 태블릿의 캐릭터 크기와 선택 카드 자리를 공유한다. */
#glang-preview .glang-feed-character .glang-motion-frame { width:300px; height:310px; }
#glang-preview .glang-feed-character video,
#glang-preview .glang-feed-poster,
#glang-preview .glang-feed-still {
  position:absolute; left:50%; bottom:1.915194%; width:auto; max-width:none;
  height:117.286219%; aspect-ratio:1; object-fit:contain; transform:translateX(-49.89154%);
}
#glang-preview .glang-feed-character video { opacity:0; pointer-events:none; }
#glang-preview .glang-feed-still { pointer-events:none; }
#glang-preview .glang-feed-equation { display:flex; align-items:center; justify-content:center; gap:24px; font-size:72px; font-weight:900; }
#glang-preview .glang-feed-equation .eaten { text-decoration:underline; text-decoration-thickness:5px; text-underline-offset:12px; }
#glang-preview .glang-feed-plus { font-size:.65em; color:var(--glang-muted); }
#glang-preview .glang-feed-result { text-align:center; font-size:170px; line-height:1.2; font-weight:900; color:var(--glang-blue); padding:12px 0; }
#glang-preview .glang-feed-result[hidden],
#glang-preview .glang-feed-options[hidden] { display:none; }
#glang-preview .feeding-busy button[data-feed-locked] { opacity:1; cursor:default; }
.glang-feeding-flight { position:fixed; z-index:1000; pointer-events:none; font-family:"Noto Sans KR",sans-serif; font-weight:900; line-height:1; opacity:0; }
.glang-feeding-flight.blue { color:#147BE5; }
.glang-feeding-flight.orange { color:#F78A23; }
@media (min-width:900px) {
  #glang-preview .glang-feeding { display:contents; }
  /* 카드가 결과 글자로 바뀌어 오른쪽 높이가 줄어도 글랑이는 같은 자리에 둔다. */
  #glang-preview .play .glang-feed-character { align-self:start; margin-top:30px; }
  #glang-preview .glang-feed-equation,
  #glang-preview .glang-feed-result { grid-column:2; }
}
@media (max-width:899px) {
  #glang-preview .glang-feed-character { display:flex; justify-content:center; }
}
@media (max-width:560px) {
  #glang-preview .glang-feed-character .glang-motion-frame { width:240px; height:216px; }
  #glang-preview .glang-feed-equation { font-size:54px; }
  #glang-preview .glang-feed-result { font-size:128px; }
}

/* 묶음에 포함한 Noto Sans KR 400~900 굵기의 실제 획 사이 여백에서 나눈다.
   바: 자음 끝 57.1%, 모음 시작 67.0% / 나: 63.9%~67.0%.
   글자 셀의 단순한 50% 지점은 자음 획을 가르므로 사용하지 않는다. */
#glang-preview .glang-colored-syllable {
  display:inline-block; letter-spacing:0; font-family:"Noto Sans KR",sans-serif;
  background:linear-gradient(var(--syllable-direction,90deg),var(--glang-blue) 0 var(--syllable-split),var(--glang-orange) var(--syllable-split) 100%);
  background-clip:text; -webkit-background-clip:text;
  color:transparent; -webkit-text-fill-color:transparent;
}
#glang-preview .syllable-ba { --syllable-split:62%; }
#glang-preview .syllable-na { --syllable-split:65%; }
#glang-preview .syllable-gi { --syllable-split:70%; }
#glang-preview .syllable-cha { --syllable-split:65%; }
/* 자음과 모음이 한 줄로 나뉘지 않는 글자(고·오·너…): 주황 글자 위에 파랑 글자를 겹쳐 자음 부분만 남긴다. */
#glang-preview .glang-colored-syllable.glang-split-shape {
  position:relative; background:none; color:var(--glang-orange); -webkit-text-fill-color:var(--glang-orange);
}
#glang-preview .glang-colored-syllable.glang-split-shape::after {
  content:attr(data-letter); content:attr(data-letter) / "";
  position:absolute; inset:0; pointer-events:none;
  color:var(--glang-blue); -webkit-text-fill-color:var(--glang-blue); clip-path:var(--syllable-clip);
}
@media (forced-colors:active) {
  #glang-preview .glang-colored-syllable { background:none; color:CanvasText; -webkit-text-fill-color:CanvasText; }
  #glang-preview .glang-colored-syllable.glang-split-shape::after { display:none; }
}

/* 홈과 목록은 수업 레이아웃에 종속되지 않는다. */
#glang-preview [hidden] { display:none !important; }
#glang-preview .glang-hub {
  --glang-blue:#147be5; --glang-orange:#f78a23; --glang-muted:#65705e;
  color-scheme:light; color:#334537; background:#fff9e9; min-height:100dvh;
  font-family:"Noto Sans KR",sans-serif; font-weight:700; line-height:1.5;
}
.glang-hub *, .glang-hub *::before, .glang-hub *::after { box-sizing:border-box; }
.glang-hub button { font:inherit; color:inherit; cursor:pointer; }
.glang-hub button:focus-visible, .hub-lesson-home:focus-visible { outline:4px solid #147be5; outline-offset:5px; }
.glang-hub h1, .glang-hub h2, .glang-hub p { margin:0; }
.glang-hub h1 { font-size:clamp(32px,4.2vw,54px); font-weight:900; line-height:1.3; letter-spacing:-.055em; }
.glang-hub h2 { font-size:25px; font-weight:900; }
.hub-header { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:20px max(24px,calc((100% - 1080px)/2)); border-bottom:2px solid #f0e7c8; }
.hub-brand { display:flex; gap:10px; align-items:center; font-size:23px; font-weight:900; letter-spacing:-.06em; }
.hub-brand img { object-fit:contain; }
.hub-body { max-width:1136px; margin:auto; padding:32px 28px 42px; }
.hub-back,.hub-sound,.hub-text-button { display:inline-flex; align-items:center; justify-content:center; gap:10px; background:#fffdf6; border:2px solid #e9dfbd; border-radius:18px; min-height:52px; padding:10px 18px; }
.hub-sound { font-size:16px; }
.hub-text-button { font-size:16px; background:transparent; border:0; padding:10px 4px; color:#5c6b4b; }
.hub-eyebrow { display:block; font-size:16px; color:#737e5d; margin-bottom:12px; }
.hub-hero { display:grid; grid-template-columns:1.2fr 1fr; align-items:center; gap:12px; min-height:340px; background:#f0f5da; border:2px solid #dee7bc; border-radius:38px; padding:30px 42px; position:relative; overflow:hidden; }
.hub-hero h1 em { font-style:normal; color:#4d7442; }
.hub-character { position:relative; display:grid; place-items:center; align-self:stretch; }
#glang-preview .hub-character .glang-motion-frame { width:310px; height:300px; }
.hub-spark { position:absolute; color:#e3b642; pointer-events:none; font-size:44px; }
.spark-one { top:10%; right:4%; }.spark-two { left:0; bottom:22%; font-size:30px; }
.hub-start { border:2px solid #d6ad38; background:#ffda67; box-shadow:0 5px 0 #dfbb52; border-radius:24px; padding:10px 24px 10px 12px; display:flex; align-items:center; gap:12px; min-height:94px; margin-top:24px; min-width:260px; text-align:left; }
.hub-start img { width:65px; height:65px; object-fit:contain; }
.hub-start > span:first-child { font-size:46px; }
.hub-start > span { font-size:27px; font-weight:900; }
.hub-start small { display:flex; align-items:center; gap:10px; font-size:17px; font-weight:800; }
.hub-start small svg { width:20px; height:20px; }
.hub-section-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:28px 0 16px; }
.hub-category-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:14px; }
.hub-category { border:2px solid #e4d9bb; background:#fffdf6; box-shadow:0 5px 0 #e9dfc5; border-radius:25px; min-height:166px; padding:18px 12px; display:flex; flex-direction:column; align-items:center; gap:8px; position:relative; }
.hub-category strong { font-size:24px; font-weight:900; }
.hub-category > svg { position:absolute; right:12px; bottom:15px; width:17px; height:17px; color:#8b8e7d; }
.hub-category-mark { display:inline-grid; place-items:center; width:67px; height:67px; border-radius:22px; font-weight:900; font-size:43px; }
.hub-category-mark.orange { color:#f78a23; background:#fff0dc; }
.hub-category-mark.blue { color:#147be5; background:#e2f3ff; }
.hub-category-mark.yellow { color:#826006; background:#fff1b0; }
.hub-category-mark.pink { color:#a15665; background:#fde6e4; }
.hub-category-mark.green { color:#4d7442; background:#e8efd9; }
.hub-note { color:#777c69; font-size:15px; text-align:center; margin-top:26px !important; }
.hub-description { color:#76806b; font-size:20px; margin:12px 0 24px !important; }
.hub-filters { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:24px; }
.hub-filters button { border:2px solid #e7ddbf; border-radius:100px; background:#fffdf7; padding:12px 18px; min-height:50px; display:flex; gap:10px; }
.hub-filters button[aria-pressed="true"] { border-color:#647f4e; background:#eaf2da; }
.hub-filters span { color:#788363; }
.hub-word-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; }
.hub-word-card { display:flex; flex-direction:column; align-items:center; gap:4px; position:relative; min-height:246px; padding:14px 16px 18px; border:2px solid #e8ddbf; border-radius:28px; background:#fffdf6; box-shadow:0 5px 0 #e9dfc6; }
.hub-card-top { display:flex; align-items:center; justify-content:space-between; width:100%; gap:5px; }
.hub-order { color:#8b8c7b; font-size:15px; }
.hub-badge { display:inline-block; border-radius:100px; background:#efecdf; color:#777b6c; font-size:13px; padding:5px 10px; white-space:nowrap; }
.hub-badge.ready,.hub-badge.started { background:#fff0a9; color:#806006; }
.hub-badge.completed { background:#e0efd4; color:#437031; }
.hub-word-picture { display:grid; place-items:center; width:120px; height:115px; font-size:64px; line-height:1; }
.hub-word-picture img { width:120px; height:115px; object-fit:contain; }
.hub-word-card strong { font-size:27px; font-weight:900; letter-spacing:-.04em; }
.hub-consonant { color:#147be5; font-weight:900; }
.hub-word-card .hub-consonant { font-size:23px; }
.hub-word-card.ready,.hub-word-card.started { background:#fff5ca; border-color:#e6c55c; box-shadow:0 5px 0 #e4ca77; }
.hub-word-card.completed { background:#f0f6e3; border-color:#b7cf92; }
.hub-button { display:inline-flex; align-items:center; justify-content:center; min-height:58px; border:2px solid #dfd2ad; background:#fffdf5; border-radius:20px; padding:12px 24px; font-size:21px !important; font-weight:900 !important; }
.hub-primary { background:#ffda67; border-color:#dab743; box-shadow:0 4px 0 #dfbb52; }
.hub-empty { text-align:center; padding:40px 20px; border:2px dashed #e3d8b5; border-radius:32px; background:#fffcf3; }
.hub-empty > span { display:block; font-size:65px; }
.hub-empty p { font-size:19px; color:#76806b; margin:12px 0 25px; }
.hub-empty-character { display:flex; justify-content:center; }
.hub-related-title { margin:28px 0 20px !important; }
.hub-detail { display:grid; grid-template-columns:1fr 1fr; align-items:center; gap:40px; min-height:60vh; }
.hub-detail-picture { display:grid; place-items:center; min-height:300px; background:#f4f0dc; border-radius:45px; font-size:140px; }
.hub-detail-picture img { width:290px; height:290px; object-fit:contain; max-width:100%; }
.hub-detail h1 { margin-bottom:12px; }
.hub-detail p { margin:24px 0; font-size:21px; line-height:1.8; }
.hub-lesson-home { display:flex; align-items:center; justify-content:center; gap:8px; min-width:68px; min-height:52px; padding:10px 14px; border:2px solid #e0c76e; border-radius:18px; background:#fff9e8; }
.hub-lesson-home svg { width:24px; height:24px; }
.hub-lesson-home + .glang-brand { margin-right:auto; }
.glang-hub button:active { transform:translateY(2px); }
@media(max-width:900px) {
  .hub-category-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .hub-word-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .hub-hero { padding:24px; }
  #glang-preview .hub-character .glang-motion-frame { width:260px; height:270px; }
}
@media(max-width:600px) {
  .hub-header { padding:14px 16px; }.hub-brand { font-size:19px; }.hub-brand img { width:40px; height:40px; }
  .hub-sound { padding:8px 12px; font-size:13px; }.hub-sound svg { width:20px; }
  .hub-body { padding:20px 16px 30px; }.hub-hero { grid-template-columns:1fr; padding:24px; text-align:center; }
  .hub-hero-copy { z-index:1; }.hub-hero h1 br { display:none; }.hub-start { margin:20px auto 0; justify-content:center; }
  .hub-character { grid-row:1; height:190px; }#glang-preview .hub-character .glang-motion-frame { width:210px; height:200px; }
  .hub-category-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.hub-category { min-height:145px; }
  .hub-word-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }.hub-word-card { min-height:222px; padding:12px; }
  .hub-word-card strong { font-size:24px; }.hub-word-picture { width:100px; height:100px; font-size:56px; }.hub-word-picture img { width:100px; height:100px; }
  .hub-section-heading { gap:8px; }.glang-hub h2 { font-size:22px; }.hub-text-button { font-size:14px; }
  .hub-detail { grid-template-columns:1fr; gap:24px; text-align:center; }.hub-detail-picture { min-height:220px; }.hub-detail-picture img { height:200px; }
}

.hub-account {font:inherit;border:2px solid #e1d6b6;background:#fffdf6;color:#496443;border-radius:18px;min-height:52px;padding:10px 16px;cursor:pointer;}
.hub-header-actions{display:flex;align-items:center;gap:12px;}
.account-layout{max-width:1120px;margin:auto;padding:48px 28px;display:grid;grid-template-columns:.85fr 1.15fr;gap:50px;align-items:start;}
.account-intro{padding:28px 10px;text-align:center;}.account-intro img{object-fit:contain;width:min(85%,280px);height:auto;margin:22px 0 8px;}
.account-intro p{font-size:22px;color:#738163;line-height:1.7;}
.account-card{border:2px solid #e6ddbf;border-radius:30px;background:#fffefa;padding:30px;box-shadow:0 8px 0 #eee5cc;}
.account-card h2{font-size:28px!important;margin:14px 0 22px!important;}
.account-card p{font-size:17px;line-height:1.7;margin:14px 0!important;}
.account-card label{display:block;font-size:18px;margin:18px 0 8px;}
.account-card input:not([type=checkbox]){display:block;width:100%;box-sizing:border-box;font:inherit;font-size:20px;border:2px solid #dbddcd;border-radius:14px;min-height:58px;background:#fff;padding:12px 14px;margin-top:8px;color:#334537;}
.account-card input:focus{outline:3px solid #147be5;outline-offset:2px;}
.account-card .hub-button{width:100%;margin-top:12px;}.account-card button:disabled{opacity:.5;cursor:wait;}
.account-tabs{display:flex;gap:8px;padding:5px;background:#f0f3e5;border-radius:17px;}
.account-tabs button{flex:1;border:0;background:transparent;font:inherit;min-height:48px;border-radius:13px;}
.account-tabs button[aria-pressed=true]{background:#fff;box-shadow:0 2px 6px #35472219;color:#46703d;}
.account-help,.account-environment{font-size:14px!important;color:#74806e;}
.account-environment{border-top:1px solid #ece6d4;padding-top:16px;}
.account-links{display:flex;justify-content:space-between;gap:16px;margin-top:22px;flex-wrap:wrap;}
.account-links button{font:inherit;color:#53794a;background:none;border:none;text-decoration:underline;min-height:44px;}
.account-parent{font-size:18px;color:#687a59;}
.account-recovery{display:block;overflow-wrap:anywhere;font:800 24px/1.8 monospace;letter-spacing:1px;background:#fff2be;border:2px dashed #e4c871;border-radius:16px;padding:18px;margin:20px 0;}
.account-delete{margin-top:28px;border-top:1px solid #eee1d3;padding-top:18px;color:#87645d;}
.account-delete summary{cursor:pointer;padding:8px 0;}
.account-delete .account-check{display:flex;align-items:center;gap:10px;font-size:15px;}
.account-delete input[type=checkbox]{width:22px;height:22px;}
.account-danger{font:inherit;border:2px solid #d3b2a5;border-radius:14px;background:#fff3ed;color:#815c50;padding:14px;min-height:52px;}
.account-conflict{border:2px solid #e7bf6b;border-radius:18px;padding:14px;margin-top:20px;background:#fff8df;}
[data-account-message]{color:#516b42;min-height:1.5em;overflow-wrap:anywhere;}
@media(max-width:780px){.account-layout{grid-template-columns:1fr;gap:16px;padding:22px 20px;max-width:600px;}.account-intro{display:none;}.account-card{padding:24px 20px;}.hub-header-actions{gap:6px;}.hub-account{font-size:14px;padding:8px 10px;}}

/* 복습은 본편 화면과 분리하고 큰 듣기·선택 버튼을 사용한다. */
.hub-review-entry {margin-top:20px;}
.hub-review-button {width:100%;display:flex;align-items:center;justify-content:center;gap:16px;min-height:88px;padding:14px 24px;border:2px solid #c4d6ae;border-radius:24px;background:#f1f7e5;text-align:left;font-size:25px!important;font-weight:900!important;}
.hub-review-button>svg {width:34px;height:34px;color:#4d7442;}
.hub-review-button small {display:block;font-size:15px;font-weight:700;color:#637350;margin-top:3px;}
.review-heading {margin-bottom:24px;}
.review-heading p {margin-top:10px!important;font-size:21px;color:#66745b;}
.review-list {display:grid;gap:18px;}
.review-lesson {display:flex;align-items:center;gap:26px;background:#fffdf7;border:2px solid #e6ddc5;border-radius:28px;padding:24px;}
.review-lesson img {object-fit:contain;flex-shrink:0;}
.review-lesson h2 {font-size:32px!important;}
.review-lesson p {margin-top:6px!important;color:#6e7664;}
.review-actions {display:flex;gap:12px;flex-wrap:wrap;margin-top:18px;}
.review-actions .hub-button {min-height:58px;font-size:21px;}
.review-lobby {display:grid;grid-template-columns:340px 1fr;align-items:center;gap:32px;padding:24px;background:#f0f5da;border-radius:32px;}
.review-lobby p {font-size:24px;margin:10px 0!important;}
.review-empty {text-align:center;padding:24px;}
.review-empty p {font-size:20px;margin:12px 0 24px!important;}
/* 수업 화면과 같은 크기 느낌: 영상 둘레 여백을 보정한 글랑이를 더 크게 */
#glang-preview .review-character .glang-motion-frame {width:320px;height:331px;}
/* 글랑이 영상에는 투명 여백이 있어 수업 화면과 같은 비율로 키우고 바닥을 맞춘다(motion.css의 글랑이 맞춤과 같음). */
#glang-preview .review-character .glang-motion-fallback {left:0;top:auto;bottom:14%;width:100%;height:72%;object-position:center bottom;}
#glang-preview .review-character video,
#glang-preview .review-character .glang-motion-canvas {inset:auto;left:50%;bottom:1.915194%;width:auto;max-width:none;height:117.286219%;aspect-ratio:1;transform:translateX(-49.89154%);}
#glang-preview .review-character .glang-motion-caption {display:none;}
.review-save,.review-storage-note {text-align:center;font-size:14px;color:#71796b;margin-top:24px!important;}
.review-progress {display:flex;align-items:center;justify-content:center;gap:14px;margin-bottom:16px;}
.review-progress span {display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:#f1e9d2;color:#b4a885;}
.review-progress .current {background:#ffdf76;color:#825f06;}
.review-progress .done {background:#e2efd5;color:#4e753a;}
.review-question-title {text-align:center;font-size:42px!important;}
.review-play-area {display:grid;grid-template-columns:320px minmax(0,1fr);gap:16px;align-items:center;margin-top:28px;}
.review-play-area aside {display:flex;align-items:center;justify-content:center;}
.review-question {min-width:0;}
.review-audio-actions {display:flex;gap:14px;justify-content:center;align-items:center;flex-wrap:wrap;margin-bottom:24px;}
.review-audio-actions button {display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:62px;font-size:23px;}
.review-options {display:flex;align-items:stretch;justify-content:center;gap:22px;}
.review-choice {display:grid;place-items:center;flex:1;max-width:230px;min-width:0;min-height:205px;border:3px solid #9dcced;border-radius:28px;box-shadow:0 7px 0 #bddaf0;background:#e3f3ff;font-size:114px!important;font-weight:900!important;color:#147BE5!important;}
.review-choice.vowel {color:#F78A23!important;background:#fff0de;border-color:#f3c48f;box-shadow:0 7px 0 #f0d3b3;}
.review-choice.word {font-size:48px!important;display:block;line-height:1.5;}
.review-choice.correct {border-color:#7ca35a;background:#ecf6db;box-shadow:0 7px 0 #bdd6a5;}
.review-choice.try-again {border-color:#dcb448;background:#fff5d7;box-shadow:0 7px 0 #e8d6a1;}
.review-choice:active:not(:disabled) {transform:translateY(3px);box-shadow:none;}
.review-choice:disabled {cursor:default;}
.review-audio-actions button:disabled {opacity:.65;}
.review-feedback {min-height:38px;text-align:center;color:#65735b;font-size:20px;margin-top:22px!important;}
.review-hint {text-align:center;margin:0 0 18px;}
.review-hint span {display:block;color:#68725e;font-size:16px;}
.review-hint strong {display:inline-block;border:3px solid #e2bf60;border-radius:18px;padding:0 14px;margin-top:7px;font-size:48px;color:#147BE5;background:#fff9df;}
.review-hint strong.vowel {color:#F78A23;}
.review-bottom {display:flex;justify-content:center;margin-top:24px;}
.review-bottom button {font-size:18px;}
.review-result {display:grid;grid-template-columns:320px 1fr;gap:32px;align-items:center;}
.review-result-group {background:#f1f6e5;border-radius:22px;padding:18px 24px;margin-bottom:14px;}
.review-result-group.helped {background:#fff0d9;}
.review-result-group.practice {background:#e8f1fb;}
.review-result-group h2 {font-size:22px!important;margin-bottom:12px!important;}
.review-result-group>div {display:flex;gap:12px;flex-wrap:wrap;}
.review-chip {display:inline-block;border-radius:15px;background:#fff;padding:8px 16px;font-size:36px;color:#147BE5;font-weight:900;}
.review-chip.vowel {color:#F78A23;}
.review-chip small {display:block;color:#718066;font-size:13px;}
.review-next {background:#fff5d7;border:2px solid #f0dfaa;border-radius:24px;padding:20px 24px;margin-top:20px;}
.review-next>p {font-size:22px;}
@media(max-width:850px){
 .review-play-area {grid-template-columns:170px minmax(0,1fr);gap:16px;}
 #glang-preview .review-play-area .review-character .glang-motion-frame {width:170px;height:195px;}
 .review-choice {font-size:88px!important;min-height:185px;}
 .review-choice.word {font-size:37px!important;}
 .review-result {grid-template-columns:190px minmax(0,1fr);gap:16px;}
 #glang-preview .review-result .review-character .glang-motion-frame {width:190px;height:210px;}
 .review-lobby {grid-template-columns:190px 1fr;gap:20px;}
 #glang-preview .review-lobby .review-character .glang-motion-frame {width:190px;height:215px;}
}
@media(max-width:560px){
 .review-body {padding:24px 14px;}
 .review-heading h1,.review-question-title {font-size:30px!important;}
 .review-heading p {font-size:18px;}
 .review-play-area {grid-template-columns:1fr;gap:8px;margin-top:10px;}
 #glang-preview .review-play-area .review-character .glang-motion-frame {width:145px;height:140px;}
 .review-audio-actions {gap:8px;margin-bottom:18px;}
 .review-audio-actions button {font-size:19px;padding:10px 16px;}
 .review-options {gap:14px;}
 .review-choice {min-height:160px;font-size:90px!important;}
 .review-choice.word {font-size:35px!important;}
 .review-lobby,.review-result {display:flex;flex-direction:column;padding:16px;gap:12px;}
 .review-result {padding:0;}
 .review-result-groups {width:100%;}
 .review-lesson {padding:18px;gap:12px;align-items:flex-start;}
 .review-lesson img {width:70px;height:70px;}
 .review-lesson h2 {font-size:28px!important;}
 .review-actions .hub-button {font-size:18px;}
 .hub-review-button {padding:12px;font-size:22px!important;}
}

html,body { margin:0; background:#f6ecd4; }
body { font-family:"Noto Sans KR",sans-serif; }
#glang-preview .glang-stage { min-height:0; }
#glang-preview .glang-app { width:100%; }
#glang-preview .glang-video-lesson { grid-column:2; text-align:center; }
#glang-preview .glang-youtube { display:block; width:100%; aspect-ratio:16/9; min-height:200px; background:#302e29; border:0; border-radius:16px; }
#glang-preview .glang-video-status { font-size:16px; padding:8px; }
#glang-preview .glang-video-auto-note { text-align:center; font-size:16px; color:#616b7a; margin:12px 0; }
#glang-preview [data-action="retry-video"][hidden] { display:none; }
#glang-preview .glang-video-lesson a { color:#1468bf; font-size:16px; display:inline-block; padding:12px; min-height:44px; }
#glang-preview .play[data-step="0"] .glang-main { display:block; }
#glang-preview .play[data-step="0"] .glang-companion { display:none; }
#glang-preview .play[data-step="0"] .glang-video-lesson { max-width:800px; margin:auto; }
.glang-save-status { color:#616b7a; font-size:14px; text-align:center; margin:14px; }
@media(min-width:900px) { #glang-preview .play .glang-main { min-height:530px; } }

/* 화면·학습 스타일은 공통 파일에 둔다. 여기서는 기기 가장자리 여백만 다룬다. */
body {
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px)
    env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
#glang-preview[hidden] { display: none; }
#glang-loading { padding: 32px; text-align: center; font-size: 24px; font-weight: 800; }

@font-face{font-family:"Noto Sans KR";src:url("fonts/noto-sans-kr/NotoSansKR-Variable.ttf") format("truetype");font-weight:100 900;font-display:swap;}
