.hero-demo { height: 470px; transform: rotate(1deg); }
.hero-demo .visual-top { gap: 12px; }
.hero-demo-badge { margin-left: auto; padding: 5px 8px; border: 1px solid #36578e; border-radius: 5px; font-size: 10px; letter-spacing: .02em; color: #c3d8f8; }
.hero-demo .editor-card { min-height: 145px; margin-top: 25px; padding-bottom: 65px; }
.hero-composition { border-bottom: 1px solid var(--blue); font-size: 20px; color: #3e5e8e; }
.hero-candidate { position: absolute; top: 174px; left: 58px; right: 30px; z-index: 2; background: white; border: 1px solid #d9e7fa; box-shadow: 0 14px 30px #091b4933; padding: 14px 16px; border-radius: 10px; }
.hero-code { display: block; font: 13px ui-monospace, monospace; color: #7185a3; margin-bottom: 9px; }
.hero-candidate-word { display: inline-block; font-size: 18px; color: #164e9f; padding: 5px 8px; border-radius: 6px; background: #eef5ff; }
.hero-candidate-word small { color: #6982a7; font-size: 12px; margin-left: 8px; }
.hero-candidate kbd { margin-left: 14px; background: #f4f6f9; color: #7a8ca7; padding: 5px 8px; border: 1px solid #dce5f2; border-bottom-width: 3px; font: 11px inherit; border-radius: 5px; }
.hero-candidate.is-selecting .hero-candidate-word { background: var(--blue); color: white; }
.hero-candidate.is-selecting .hero-candidate-word small { color: #d6e8ff; }
.hero-candidate.is-selecting kbd { background: #fff2d9; color: #855300; border-color: #eac16e; }
.hero-demo .learning-card { top: 179px; left: 55px; width: calc(100% - 88px); transform: rotate(-1deg); transition: opacity .23s, translate .23s; }
.hero-demo .learning-card[hidden], .hero-candidate[hidden], .hero-playback[hidden] { display: none; }
.hero-demo .sound { border: 0; cursor: pointer; font-size: 12px; }
.hero-demo .sound:hover { background: #dceaff; }
.hero-demo .learning-bottom { margin-top: 20px; gap: 12px; }
.hero-demo-bottom { position: absolute; left: 25px; right: 25px; bottom: 53px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-stage { color: #f8c967; font-size: 12px; margin: 0; line-height: 1.6; }
.hero-playback { display: flex; gap: 6px; flex-shrink: 0; }
.hero-playback button { border: 1px solid #4f6a9c; background: #ffffff09; border-radius: 7px; color: #d2e2fc; padding: 7px 9px; font-size: 11px; cursor: pointer; }
.hero-playback button:hover { background: #ffffff16; }
.hero-demo-note { position: absolute; left: 25px; right: 25px; bottom: 18px; color: #8da8d4; font-size: 10px; margin: 0; line-height: 1.7; }
.hero-demo.is-running .cursor { animation: caret-blink 1s steps(1) infinite; }
.hero-demo button:focus-visible, .demos button:focus-visible, .demos select:focus-visible, .nav a:focus-visible, .hero-actions a:focus-visible { outline: 3px solid #ffba45; outline-offset: 4px; }
.demos { scroll-margin-top: 78px; padding-bottom: 100px; }
.demo-disclaimer, .demo-voice-note, .demo-audio-status { font-size: 12px; color: var(--muted); line-height: 1.9; }
.demo-disclaimer { max-width: 900px; margin-top: 18px; margin-bottom: 30px; }
.demo-voice-note { margin: 18px 0 0; }
.demo-audio-status { margin: 6px 0 0; color: #1759af; min-height: 23px; }
.demo-pronounce-feedback { position: fixed; z-index: 30; bottom: 22px; left: 50%; translate: -50% 0; width: max-content; max-width: calc(100% - 32px); border: 1px solid #b9d2f4; background: #10265a; color: #fff; box-shadow: 0 8px 26px #10265a33; padding: 12px 18px; border-radius: 9px; font-size: 12px; line-height: 1.7; pointer-events: none; }
@keyframes caret-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@media (max-width: 1100px) and (min-width: 901px) { .nav { gap: 18px; } .nav nav { gap: 19px; } .hero-grid { gap: 30px; } .hero-stage { max-width: 150px; } .hero-demo-bottom { gap: 5px; } }
@media (max-width: 600px) {
  .hero-demo { height: 415px; padding: 18px; }
  .hero-demo .visual-top { gap: 9px; font-size: 11px; }
  .hero-demo-badge { padding: 4px 5px; font-size: 9px; }
  .hero-demo .editor-card { min-height: 125px; margin-top: 23px; font-size: 20px; }
  .hero-demo .learning-card { top: 160px; left: 29px; width: calc(100% - 48px); padding: 18px; }
  .hero-demo .learning-bottom { margin-top: 18px; font-size: 10px; }
  .hero-candidate { left: 29px; right: 19px; top: 157px; padding: 13px; }
  .hero-demo-bottom { left: 19px; right: 19px; bottom: 49px; gap: 8px; }
  .hero-stage { font-size: 10px; max-width: 157px; }
  .hero-playback button { padding: 7px; font-size: 10px; }
  .hero-demo-note { left: 19px; right: 19px; bottom: 17px; font-size: 9px; }
  .demos { padding-bottom: 70px; scroll-margin-top: 66px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .hero-demo.is-running .cursor { animation: none; } .hero-demo .learning-card { transition: none; } .button { transition: none; } }

/* Three core English features are playable directly in the homepage hero. */
.hero-demo { height: 560px; }
.hero-english-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 17px; padding: 4px; background: #071a413e; border: 1px solid #3f5e91; border-radius: 10px; }
.hero-english-tabs button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 39px; padding: 7px 5px; background: transparent; border: 0; border-radius: 6px; color: #a9c0e7; font-size: 12px; cursor: pointer; white-space: nowrap; }
.hero-english-tabs button span { font-size: 9px; opacity: .65; }
.hero-english-tabs button[aria-selected="true"] { color: #10265a; background: #fff; box-shadow: 0 3px 10px #03123144; font-weight: 800; }
.hero-english-tabs button:hover:not([aria-selected="true"]) { background: #ffffff12; color: white; }
.hero-demo .editor-card { margin-top: 18px; }
.hero-demo .hero-candidate { top: 232px; }
.hero-demo .learning-card { top: 232px; }
.hero-demo .learning-card strong { font-size: 25px; line-height: 1.4; overflow-wrap: break-word; }
.hero-demo .ipa { line-height: 1.7; overflow-wrap: anywhere; font-size: 13px; }
.hero-candidate.is-english-focus .hero-candidate-word small { display: inline-block; color: #0b55bb; background: #e2efff; border: 1px solid #bdd7ff; padding: 4px 9px; border-radius: 5px; font-size: 16px; }
.hero-demo #hero-screen:focus-visible { outline: 2px solid #ffb844; outline-offset: 5px; }
.is-sentence-selected { background: #d8eaff; color: #174d9a; box-shadow: 0 0 0 3px #d8eaff; line-height: 1.9; }
.hero-sentence-key { position: absolute; left: 40px; right: 40px; top: 280px; display: flex; align-items: center; justify-content: center; gap: 14px; color: #b4c9e9; font-size: 12px; }
.hero-sentence-key kbd { display: grid; place-items: center; width: 45px; height: 42px; font-family: inherit; font-size: 22px; border: 1px solid #6480ae; border-bottom-width: 4px; border-radius: 7px; background: #ffffff0b; color: #edf5ff; }
.hero-sentence-key.is-pressed kbd { color: #78531b; background: #ffdc9d; border-color: #d2a14f; }
.hero-translation { position: absolute; left: 55px; top: 232px; width: calc(100% - 88px); background: white; border: 1px solid #d6e3f5; border-radius: 12px; padding: 19px 21px; box-shadow: 0 18px 30px #06183c33; transform: rotate(-1deg); }
.hero-translation-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #8d9cb1; font-size: 10px; }
.hero-translation-head strong { color: #304b72; font-size: 12px; }
.hero-translation>small { display: inline-block; margin-top: 9px; background: #fff4da; border-radius: 4px; padding: 3px 6px; font-size: 9px; line-height: 1.7; color: #947336; }
.hero-translation>p { color: #175bb6; font-size: 23px; font-weight: 700; line-height: 1.5; margin: 13px 0 14px; }
.hero-translation-note { display: block; font-size: 10px; line-height: 1.7; color: #7f91ac; border-top: 1px solid #e8eef7; padding-top: 9px; }
.hero-sentence-key[hidden], .hero-translation[hidden] { display: none; }
.hero-candidate-list { list-style: none; margin: 0; padding: 0; }
.hero-candidate-list li { display: grid; grid-template-columns: 18px 32px 1fr; align-items: center; gap: 7px; min-height: 28px; padding: 3px 7px; border-radius: 5px; }
.hero-candidate-list li+li { border-top: 1px solid #edf2f9; }
.hero-candidate-list li>span { font-size: 10px; color: #9aabc2; }
.hero-candidate-list strong { font-size: 16px; line-height: 1.3; font-weight: 600; color: #27476f; }
.hero-candidate-list small { font-size: 12px; line-height: 1.4; color: #5e80ae; }
.hero-candidate-list li:first-child { background: #eaf3ff; }
.hero-candidate-list li:first-child strong { color: #145bb7; }
.is-english-focus .hero-candidate-list small { color: #175bb6; font-weight: 700; }
.hero-candidate-list-note { display: block; margin-top: 9px; font-size: 9px; color: #8b9db6; line-height: 1.5; }
#hero-candidate-list[hidden], #hero-candidate-list-note[hidden], #hero-candidate-single[hidden] { display: none; }
@media (max-width: 600px) {
  .hero-demo { height: 540px; }
  .hero-english-tabs { margin-top: 15px; gap: 2px; padding: 3px; }
  .hero-english-tabs button { min-height: 40px; gap: 4px; font-size: 11px; }
  .hero-english-tabs button span { font-size: 8px; }
  .hero-demo .editor-card { margin-top: 16px; }
  .hero-demo .hero-candidate, .hero-demo .learning-card { top: 222px; }
  .hero-demo .learning-card strong { font-size: 23px; }
  .hero-demo .ipa { font-size: 12px; }
  .hero-sentence-key { top: 267px; left: 25px; right: 25px; }
  .hero-translation { top: 222px; left: 29px; width: calc(100% - 48px); padding: 18px; }
  .hero-translation>p { font-size: 21px; }
  .hero-demo-bottom { bottom: 53px; }
}
