/* Typing Coach Core v1.87.146: narrow-screen text overflow repair for six
   social psychology short lessons only. Does not alter unrelated practice. */
@media (max-width:900px) {
  html body.tc-stage-practice:has(.tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short]){
    overflow-x:hidden!important;
    overflow-y:auto!important;
    height:auto!important;
    min-height:100dvh!important;
  }
  html body.tc-stage-practice .tc-app-main:has(.tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short]){
    height:auto!important;
    min-height:calc(100dvh - 82px)!important;
    overflow:visible!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short][data-lesson-type="short"]{
    height:auto!important;
    min-height:calc(100dvh - 120px)!important;
    overflow:visible!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-formal,
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-viewport,
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-fit{
    position:relative!important;
    inset:auto!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    transform:none!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-fit{
    display:block!important;
    min-width:0!important;
    padding:0!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    flex:0 1 auto!important;
    padding:12px!important;
    transform:none!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto auto auto auto auto auto auto!important;
    row-gap:10px!important;
    overflow:visible!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-practice-head{
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    grid-template-columns:minmax(0,1fr)!important;
    overflow:visible!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-practice-title{
    min-width:0!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-practice-title h2{
    font-size:clamp(17px,2.6vw,23px)!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-metrics-formal{
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-metric-card{
    min-width:0!important;
    height:auto!important;
    min-height:68px!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas > .tc-sentence-stage.tc-sentence-formal{
    grid-column:1/-1!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    padding:12px!important;
    box-sizing:border-box!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto auto auto!important;
    row-gap:10px!important;
    overflow:visible!important;
    justify-items:stretch!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-current-example{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto auto auto!important;
    row-gap:6px!important;
    align-content:start!important;
    overflow:visible!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-current-example .tc-jp{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:6px 4px 9px!important;
    box-sizing:border-box!important;
    font-size:clamp(19px,2.7vw,25px)!important;
    line-height:1.55!important;
    letter-spacing:.012em!important;
    text-align:center!important;
    white-space:normal!important;
    overflow:visible!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-current-example .tc-jp-line{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    display:block!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    line-break:strict!important;
    text-align:center!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-current-example .tc-kana{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:3px 5px!important;
    box-sizing:border-box!important;
    font-size:clamp(12px,1.8vw,14px)!important;
    line-height:1.55!important;
    white-space:normal!important;
    overflow:visible!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
    text-overflow:clip!important;
    text-align:center!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-current-example .tc-roman{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:5px 4px!important;
    box-sizing:border-box!important;
    font-size:clamp(14px,1.9vw,16px)!important;
    line-height:1.5!important;
    letter-spacing:.025em!important;
    white-space:normal!important;
    overflow:visible!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
    text-align:center!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-long-lookahead{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0 auto!important;
    padding:8px!important;
    box-sizing:border-box!important;
    display:grid!important;
    grid-template-columns:70px minmax(0,1fr)!important;
    gap:8px!important;
    align-items:center!important;
    overflow:visible!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-long-lookahead strong{
    display:block!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    padding:0!important;
    font-size:clamp(12px,1.6vw,15px)!important;
    line-height:1.5!important;
    white-space:normal!important;
    overflow:visible!important;
    overflow-wrap:anywhere!important;
    text-overflow:clip!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-progress-row{
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    min-height:18px!important;
    overflow:visible!important;
  }
}
@media (max-width:430px){
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas{
    padding:8px!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas > .tc-sentence-stage.tc-sentence-formal{
    padding:9px 7px!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-current-example .tc-jp{
    font-size:19px!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-long-lookahead{
    grid-template-columns:64px minmax(0,1fr)!important;
  }
}

/* Only the new short lessons: remove legacy 98/24/32px fixed text lanes. */
@media (max-width:900px){
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-current-example .tc-jp,
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-current-example .tc-kana,
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-current-example .tc-roman {
    display:block!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    white-space:normal!important;
    overflow:visible!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    line-break:strict!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-current-example .tc-jp-line {
    display:block!important;
    height:auto!important;
    white-space:normal!important;
    overflow:visible!important;
    overflow-wrap:anywhere!important;
    line-break:strict!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-current-example .tc-jp {font-size:clamp(19px,2.8vw,25px)!important;line-height:1.5!important;}
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-current-example .tc-kana {font-size:clamp(13px,1.9vw,15px)!important;line-height:1.6!important;}
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-current-example .tc-roman {font-size:clamp(13px,1.9vw,15px)!important;line-height:1.6!important;word-break:break-all!important;}
}


/* v1.87.146: desktop reading lines must wrap rather than clip.
   Applied ONLY to the seeded social psychology short lessons. */
@media (min-width:901px) {
  html body.tc-stage-practice:has(.tc-shell[data-tc-social-short]) {height:auto!important;min-height:100dvh!important;overflow-x:hidden!important;overflow-y:auto!important;}
  html body.tc-stage-practice .tc-app-main:has(.tc-shell[data-tc-social-short]) {height:auto!important;min-height:0!important;overflow:visible!important;}
  html body.tc-stage-practice .tc-shell[data-tc-social-short][data-tc-social-short], html body.tc-stage-practice .tc-shell[data-tc-social-short][data-tc-social-short] .tc-practice-formal,html body.tc-stage-practice .tc-shell[data-tc-social-short][data-tc-social-short] .tc-practice-viewport{height:auto!important;min-height:0!important;overflow:visible!important;}
  html body.tc-stage-practice .tc-shell[data-tc-social-short][data-tc-social-short] .tc-practice-fit{position:relative!important;inset:auto!important;width:100%!important;height:auto!important;min-height:0!important;overflow:visible!important;transform:none!important;display:block!important;}
  html body.tc-stage-practice .tc-shell[data-tc-social-short][data-tc-social-short] .tc-practice-canvas{width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:700px!important;transform:none!important;overflow:visible!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto auto auto auto auto auto!important;}
  html body.tc-stage-practice .tc-shell[data-tc-social-short][data-tc-social-short] .tc-practice-canvas > .tc-sentence-stage.tc-sentence-formal{grid-column:1/-1!important;width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:200px!important;max-height:none!important;overflow:visible!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto!important;}
  html body.tc-stage-practice .tc-shell[data-tc-social-short][data-tc-social-short] .tc-practice-canvas .tc-current-example{width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto auto!important;}
  html body.tc-stage-practice .tc-shell[data-tc-social-short][data-tc-social-short] .tc-practice-canvas .tc-current-example .tc-jp,html body.tc-stage-practice .tc-shell[data-tc-social-short][data-tc-social-short] .tc-practice-canvas .tc-current-example .tc-kana,html body.tc-stage-practice .tc-shell[data-tc-social-short][data-tc-social-short] .tc-practice-canvas .tc-current-example .tc-roman{width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;display:block!important;line-height:1.4!important;}
}


/* v1.87.147: Correct actual desktop readability, not merely scroll clipping.
 * Six seeded psychology SHORT lessons only.  The JP sentence is rendered
 * unbroken by JS, so browser line breaking preserves its full natural text.
 * This deliberately leaves all previous lessons and long lessons untouched. */
@media (min-width: 901px) {
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas > .tc-sentence-stage.tc-sentence-formal {
    padding:12px 24px 8px!important;
    grid-template-rows:auto auto!important;
    row-gap:10px!important;
    min-height:175px!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-current-example {
    grid-template-rows:auto auto auto!important;
    row-gap:8px!important;
    justify-items:stretch!important;
    align-content:center!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-current-example .tc-jp {
    display:block!important;
    width:100%!important;max-width:100%!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    margin:0 auto!important;padding:2px 8px 8px!important;
    box-sizing:border-box!important;
    font-size:clamp(28px,2.35vw,34px)!important;
    line-height:1.42!important;letter-spacing:.018em!important;
    font-weight:650!important;white-space:normal!important;
    overflow-wrap:anywhere!important;word-break:normal!important;
    line-break:strict!important;text-align:center!important;overflow:visible!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-current-example .tc-jp-line {
    display:inline!important;width:auto!important;
    white-space:normal!important;overflow:visible!important;
    overflow-wrap:anywhere!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-current-example .tc-kana {
    display:block!important;width:100%!important;max-width:100%!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    margin:0!important;padding:0 7px!important;
    font-size:clamp(14px,1.16vw,16px)!important;line-height:1.45!important;
    letter-spacing:.02em!important;white-space:normal!important;
    overflow-wrap:anywhere!important;word-break:normal!important;overflow:visible!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-current-example .tc-roman {
    display:block!important;width:100%!important;max-width:100%!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    margin:0!important;padding:0 7px!important;
    font-size:clamp(15px,1.28vw,18px)!important;line-height:1.45!important;
    letter-spacing:.02em!important;white-space:normal!important;
    overflow-wrap:anywhere!important;word-break:break-word!important;overflow:visible!important;
  }
}

/* v1.87.147: the same six lessons, narrow-phone NEXT FINGER column safety.
   The original 176px hand panel can leave the label only 1 character wide. */
@media (max-width: 600px) {
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-next-finger.tc-next-finger-formal {
    grid-template-columns:60px minmax(0,1fr)!important;
    width:100%!important;max-width:100%!important;
    min-height:76px!important;height:auto!important;
    padding:9px 11px!important;gap:12px!important;
    align-items:center!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-next-finger-copy {
    min-width:0!important;width:100%!important;
    text-align:left!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-next-finger-copy>strong {
    font-size:clamp(17px,4.5vw,21px)!important;line-height:1.3!important;
    white-space:normal!important;word-break:keep-all!important;
  }
  html body.tc-stage-practice .tc-shell[data-tc-app][data-lesson-type="short"][data-tc-social-short] .tc-practice-canvas .tc-hands-formal {
    display:none!important;
  }
}
