/* A reading desk in landscape; the compact sentence card remains on phones. */
.practice-stage,.practice-reading,.practice-reading-body{display:contents}
.practice-companion,.practice-reading-head{display:none}
#sentenceText{font-family:Georgia,"Times New Roman",serif}
body.practice-landscape .sentence-panel{
  padding:clamp(16px,3vw,36px) clamp(58px,6vw,96px);
  grid-template-rows:auto minmax(260px,1fr) auto auto auto;
  gap:16px;overflow-y:auto;
  background:radial-gradient(ellipse at 0 30%,color-mix(in srgb,var(--purple) 12%,transparent),transparent 60%),#f3f5f8;
}
body.practice-landscape .sentence-card-top{grid-row:1;gap:10px;max-width:1280px;width:100%;margin:auto}
body.practice-landscape .sentence-card-top>button{min-height:44px;font:inherit;font-size:14px}
body.practice-landscape .card-practice-tabs{margin-left:auto}
body.practice-landscape .card-practice-tabs button{min-height:44px;font:inherit;font-size:16px;font-weight:700}
body.practice-landscape .study-toolbar button{min-height:40px;font-size:14px}
body.practice-landscape #saveHint{font-size:14px!important;line-height:1.4;flex:1 1 260px;color:#5d6470}
body.practice-landscape .practice-stage{grid-row:2;display:grid;grid-template-columns:210px minmax(0,1fr);gap:28px;min-height:0;max-width:1280px;width:100%;margin:0 auto}
body.practice-landscape .practice-companion{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;min-width:0;padding:16px 0}
body.practice-landscape #practicePortraitSlot{width:100%;max-width:190px}
body.practice-landscape .sei-practice-face{display:block;width:100%;height:clamp(160px,32dvh,300px);padding:0;border-radius:28px;background:white;box-shadow:0 12px 32px color-mix(in srgb,var(--purple) 15%,transparent);border:5px solid white;cursor:pointer}
body.practice-landscape .sei-practice-face .sei-portrait{border-radius:23px}
body.practice-landscape #practiceFriendName{font-size:20px;color:var(--purple);text-align:center}
body.practice-landscape #practiceGuideSlot{width:100%;max-width:230px}
body.practice-landscape #practiceGuideSlot #sentenceGuide{display:block;margin:0;text-align:center;font-size:16px;line-height:1.65;color:#525966;word-break:keep-all}
body.practice-landscape .practice-reading{display:flex;flex-direction:column;min-width:0;min-height:0;background:#fff;border:1px solid color-mix(in srgb,var(--purple) 18%,#e4e8ed);border-top:4px solid var(--purple);border-radius:24px;box-shadow:0 14px 44px #2233440b;overflow:hidden}
body.practice-landscape .practice-reading-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;padding:20px 28px;border-bottom:1px solid #edf0f4;color:#69717e;font-size:14px}
body.practice-landscape #sentenceCount{padding:6px 12px;border-radius:20px;background:var(--purple2);color:var(--purple);font-size:16px;font-weight:700;white-space:nowrap}
body.practice-landscape .practice-reading-body{display:flex;align-items:center;flex:1;min-height:0;overflow:auto;padding:24px clamp(22px,3.5vw,56px)}
body.practice-landscape #sentenceText{display:block!important;width:100%;max-width:850px;min-height:0;margin:auto;padding:0;font-size:clamp(1.7rem,2.8vw,2.65rem);line-height:1.55;text-align:left;color:#262c38;overflow-wrap:anywhere;touch-action:pan-y}
body.practice-landscape #sentenceText.long-sentence{font-size:clamp(1.5rem,2.3vw,2.2rem);line-height:1.6}
body.practice-landscape #sentenceText.very-long-sentence{font-size:clamp(1.3rem,2vw,1.85rem);line-height:1.65}
body.practice-landscape .sentence-progress{display:block;grid-row:3;width:100%;max-width:1280px;height:5px;margin:0 auto;background:#dfe5eb}
body.practice-landscape .sentence-listen{grid-row:4;max-width:1280px;gap:10px;margin:0 auto;padding:14px 18px;border:1px solid #e0e6ed;border-radius:20px;background:white;justify-content:flex-start;box-shadow:0 5px 20px #22334406}
body.practice-landscape .sentence-listen>button{min-height:46px;padding:10px 16px;font-size:16px}
body.practice-landscape .sentence-listen #speed{min-height:46px;font-size:16px}
body.practice-landscape .sentence-listen>#sentenceGuide{display:block;flex:0 0 100%;margin:0 0 4px;text-align:left;font-size:16px;line-height:1.5}
body.practice-landscape .sentence-listen>#sentenceGuide.speak-now{color:#a53d32}
body.practice-landscape .sentence-listen .sei-voice-status{font-size:14px}
body.practice-landscape #recordControls{grid-row:5;margin:0 auto;width:100%;max-width:1280px}
body.practice-landscape .sentence-nav{left:10px;right:10px}
body.practice-landscape .sentence-nav button{width:42px;height:54px;border-radius:16px;box-shadow:none}
body.practice-landscape button:focus-visible{outline:3px solid var(--purple);outline-offset:3px}
@media(max-width:900px){
  body.practice-landscape .practice-stage{grid-template-columns:150px minmax(0,1fr);gap:18px}
  body.practice-landscape .practice-reading-head{padding:12px 18px}
  body.practice-landscape #practiceFriendName{font-size:17px}
}
@media(max-height:540px){
  body.practice-landscape .sentence-panel{padding:10px 54px max(10px,env(safe-area-inset-bottom));gap:8px;grid-template-rows:auto minmax(90px,1fr) auto auto auto}
  body.practice-landscape .sentence-card-top{gap:6px}
  body.practice-landscape .card-practice-tabs button{font-size:14px;padding:6px 10px;min-height:40px}
  body.practice-landscape .practice-stage{grid-template-columns:112px minmax(0,1fr);gap:14px}
  body.practice-landscape .practice-companion{display:grid;grid-template-rows:minmax(0,1fr) auto;justify-items:center;gap:8px;padding:0;min-height:0}
  body.practice-landscape #practicePortraitSlot{width:auto;max-width:100%;height:100%;max-height:130px;min-height:0;aspect-ratio:418/500;overflow:hidden}
  body.practice-landscape .sei-practice-face{height:100%;border-radius:18px;border-width:3px}
  body.practice-landscape #practiceFriendName{font-size:14px}
  body.practice-landscape #practiceGuideSlot{display:none}
  body.practice-landscape #saveHint{display:none}
  body.practice-landscape .practice-reading-head{padding:8px 16px}
  body.practice-landscape .practice-reading-head>span{display:none}
  body.practice-landscape .practice-reading-body{padding:14px 22px}
  body.practice-landscape #sentenceText,body.practice-landscape #sentenceText.long-sentence{font-size:1.4rem;line-height:1.5}
  body.practice-landscape #sentenceText.very-long-sentence{font-size:1.2rem}
  body.practice-landscape .sentence-listen{padding:8px 12px;gap:6px}
  body.practice-landscape .sentence-listen>button{min-height:40px;padding:8px 10px;font-size:14px}
}
@media(max-width:580px){
  body.practice-landscape .sentence-panel{padding:12px 50px max(12px,env(safe-area-inset-bottom));grid-template-rows:auto minmax(90px,1fr) auto auto auto}
  body.practice-landscape .practice-stage{grid-template-columns:minmax(0,1fr)}
  body.practice-landscape .practice-companion{display:none}
  body.practice-landscape .card-practice-tabs{width:100%;margin:0}
  body.practice-landscape .card-practice-tabs button{flex:1;padding:8px 4px;font-size:14px}
  body.practice-landscape .practice-reading-body{padding:18px}
}
/* Error-only save controls must stay hidden even when moved into the practice header. */
#saveBtn[hidden],#saveHint[hidden],.result-actions[hidden],#original[hidden]{display:none!important}

/* Fullscreen dvh can differ from the actual visible viewport on Android. */
body.practice-landscape .result{height:var(--sei-viewport-height,100dvh)}
body.practice-landscape #sentencePanel{height:100%;min-height:0}

/* All landscape modes share inline progress immediately after speed. */
body.practice-landscape .sentence-listen.practice-progress-inline>.practice-repeat-progress{display:inline-flex;align-items:center;flex:0 0 auto;min-width:0;order:0;padding:0 4px;margin:0;border-radius:0;background:transparent;color:#525966;font-size:14px;line-height:1.5;white-space:nowrap}
body.practice-landscape .sentence-listen.practice-progress-complete>#sentenceGuide,
body.practice-landscape .sentence-listen.practice-progress-complete .semantic-practice-player>.sentence-guide{display:none}

/* Shadow controls leave the reading card room; overflow starts at the first line. */
body.practice-landscape #sentencePanel:has([data-card-practice="shadow"].active) #recordStatus:has(>.record-idle-hint){display:none}
body.practice-landscape #sentencePanel:has([data-card-practice="shadow"].active) .practice-reading-body{align-items:flex-start}
body.practice-landscape #sentencePanel:has([data-card-practice="shadow"].active) #sentenceText{flex-shrink:0;min-height:0;margin:0 auto}

/* Suppress only redundant playback/recording prose in landscape shadow. */
body.practice-landscape #sentencePanel:has([data-card-practice="shadow"].active) .shadow-redundant-status{display:none}

/* Landscape shadow keeps only the recording buttons in this controls area. */
body.practice-landscape #sentencePanel:has([data-card-practice="shadow"].active) #recordControls>.hide-words{display:none}
