/* Language shares the site's approved font, mark and Grady's pixel cloud world. */
body.language-course-shell { height:100dvh; min-height:0; overflow:hidden; }
body.developer-shell.language-course-shell { background:#9fdaff; isolation:isolate; }
body.developer-shell.language-course-shell::before,body.developer-shell.language-course-shell::after {
  content:''; position:fixed; inset:0; width:auto; height:auto; z-index:-1;
  background-size:cover; background-position:center; box-shadow:none; pointer-events:none;
  image-rendering:pixelated; transform:none;
}
body.developer-shell.language-course-shell::before { background-image:url('/racs/img/language/sky-workshop-v1.png'); }
/* Only the selected workshop is public. The library stays an unselected
   manifest alternative until a separate approval. */
body.developer-shell.language-course-shell::after { content:none; }
.language-course-shell > .teacher-brand { height:46px; min-height:46px; }
[data-language-course-host] { color:#123967; font-family:var(--sans,system-ui,sans-serif); }
.language-shell { max-width:1280px; height:calc(100dvh - 46px); margin:0 auto; padding:10px 14px 12px; display:grid; grid-template-rows:auto auto auto minmax(0,1fr); gap:8px; }
.language-header { display:flex; align-items:center; justify-content:space-between; gap:12px; background:#ffffffd9; border:2px solid #74b3df; padding:8px 12px; box-shadow:inset 2px 2px 0 #fff,3px 3px 0 #175f9c; }
.language-header > div:first-child { min-width:0; }
.language-header h1 { margin:2px 0 0; font:700 clamp(20px,2.4vw,28px)/1.1 'Brainpower Pixel',system-ui,sans-serif; color:#123967; overflow-wrap:anywhere; }
.language-kicker { font-weight:800; font-size:.75rem; color:#235e8d; }
.language-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.language-source-link { color:#164c7b; font-size:.8rem; font-weight:700; white-space:nowrap; min-height:44px; display:inline-flex; align-items:center; padding-inline:4px; }
.language-button { min-height:44px; display:inline-flex; align-items:center; justify-content:center; padding:7px 11px; border:2px solid #12518a; border-top-color:#fff; border-left-color:#fff; border-radius:0; color:#123967; background:#eefaff; box-shadow:inset -2px -2px 0 #8ec6e4,3px 3px 0 #12518a; text-decoration:none; font:700 16px/1.1 'Brainpower Pixel',system-ui,sans-serif; cursor:pointer; }
.language-button.primary { background:#1a70bd; color:white; box-shadow:inset -2px -2px 0 #0b4f97,3px 3px 0 #123967; text-shadow:1px 1px 0 #123967; }
.language-button:disabled { opacity:.55; cursor:default; }
.language-button:not(:disabled):active { transform:translate(2px,2px); box-shadow:1px 1px 0 #123967; }
.language-shell :is(button,input,select,textarea,a):focus-visible { outline:3px solid #b05d05; outline-offset:3px; }
.language-status { margin:0; min-width:0; min-height:24px; padding:3px 10px; font-size:.82rem; line-height:1.3; font-weight:700; background:#ffffffed; overflow-wrap:anywhere; }
.language-picker-row { display:flex; gap:10px; align-items:flex-end; }
.language-picker-label { flex:1; min-width:0; }
.language-shell label { display:flex; flex-direction:column; gap:4px; font-size:.82rem; font-weight:700; }
.language-shell :is(input,select,textarea) { color:#123967; border:2px solid #5c9bc8; background:#fffffff5; border-radius:0; font:1rem/1.35 var(--sans,system-ui,sans-serif); padding:7px; max-width:100%; width:100%; }
.language-shell select,.language-shell input { min-height:44px; }
.language-shell textarea { resize:none; }
.language-main { min-width:0; min-height:0; display:flex; flex-direction:column; gap:12px; padding:16px 20px; background:#f7fcffdb; border:2px solid #6da9d4; box-shadow:inset 2px 2px 0 #fff,4px 4px 0 #12518a; overflow:auto; overscroll-behavior:contain; scrollbar-color:#4489be #e3f4ff; scroll-padding:12px; }
.language-main > * { flex-shrink:0; min-width:0; }
.language-main:has(.language-lesson-page) { overflow:hidden; }
.language-main > .language-lesson-page { display:flex; flex-direction:column; gap:12px; flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; padding:2px 4px 5px 0; scrollbar-color:#4489be #e3f4ff; }
.language-lesson-page > * { flex-shrink:0; min-width:0; }
.language-main :is(h2,h3) { margin:0; color:#124575; font-family:'Brainpower Pixel',var(--sans,system-ui,sans-serif); line-height:1.12; }
.language-main h2 { font-size:clamp(22px,2.5vw,30px); }
.language-main p { margin:0; white-space:pre-line; overflow-wrap:anywhere; line-height:1.55; }
.language-detail-top { display:grid; gap:5px; }
.language-starter-preview { display:flex; flex-direction:column; gap:12px; }
.language-starter-preview > p { padding:12px; background:#e1f4ffd9; border-left:5px solid #2790cc; font-size:1rem; }
.language-word-strip { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.language-word { display:flex; flex-direction:column; gap:8px; padding:16px; border:2px solid #6da9d4; background:#e5f6fff0; box-shadow:3px 3px 0 #235e8d; }
.language-word > strong { font-size:clamp(23px,3vw,38px); line-height:1.2; color:#115b9b; overflow-wrap:anywhere; }
.language-word > span { font-size:1rem; color:#255f8d; }
.language-word-strip .language-word { padding:10px; gap:4px; background:none; border:0; border-left:2px solid #6da9d4; box-shadow:none; }
.language-word-strip .language-word > strong { font-size:1.1rem; }
.language-word-strip .language-word > span,.language-word-strip .language-word p { font-size:.8rem; }
.language-workshop-actions { margin-top:auto; display:flex; gap:9px; flex-wrap:wrap; }
.language-empty { margin:auto; display:flex; flex-direction:column; align-items:center; gap:16px; text-align:center; max-width:100%; }
.language-denied,.language-loading { height:calc(100dvh - 46px); min-height:0; padding:24px; justify-content:center; color:#123967; overflow:auto; background:#f7fcffed; }
.language-reading { padding:20px; background:#e3f4ffbb; border-left:6px solid #2383ca; font-size:clamp(18px,2.3vw,25px); }
.language-question { padding:0; margin:0; border:0; display:flex; flex-direction:column; gap:12px; }
.language-question legend { font-weight:800; font-size:clamp(18px,2.2vw,24px); padding-bottom:14px; line-height:1.35; }
.language-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.language-choices > label { min-height:70px; display:flex; flex-direction:row; align-items:center; gap:10px; background:#fff; padding:16px; border:2px solid #73a8ce; box-shadow:3px 3px 0 #235e8d; font-size:1.1rem; cursor:pointer; }
.language-choices input { width:18px; height:18px; min-height:0; padding:0; flex-shrink:0; accent-color:#1266b0; }
.language-choices .selected { background:#c9edff; border-color:#1465b4; }
.language-step-nav { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:auto; padding-top:12px; }
.language-step-nav > span { font:800 1rem/1.2 var(--sans,system-ui,sans-serif); color:#124575; font-variant-numeric:tabular-nums; white-space:nowrap; }
.language-step-nav:has([data-language-action="save"]) { display:grid; grid-template-columns:auto auto minmax(0,1fr) auto; gap:8px; }
.language-step-nav:has([data-language-action="save"]) .language-button { padding-inline:8px; font-size:15px; }
.language-editor-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.language-editor-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.language-editor,.language-feedback-form { display:flex; flex-direction:column; gap:9px; }
.language-editor > .language-button { align-self:flex-end; }
.language-two-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.language-feedback { padding:12px; border-left:5px solid #1266b0; background:#e1f4ff; text-align:left; }
.language-saved-answer { padding:12px; border-left:5px solid #1266b0; background:#e1f4ff; display:flex; flex-direction:column; gap:10px; }
.language-stamp { color:#1d613e; border:2px solid #267848; padding:10px 15px; font-weight:800; background:#e7fbe8; }
@media(max-height:650px) and (min-width:700px) { .language-shell { padding:7px 10px 10px; gap:6px; } .language-header { padding:5px 10px; } .language-main { gap:9px; padding:12px 16px; } .language-starter-preview { gap:8px; } .language-word-strip .language-word { padding:7px; } .language-editor { gap:6px; } .language-editor input,.language-editor select { padding:4px 7px; } .language-editor textarea { max-height:104px; } .language-main.is-editor { gap:8px; } }
@media(max-width:699px) { .language-shell { padding:7px 8px 10px; gap:7px; } .language-header { flex-direction:column; align-items:stretch; gap:8px; padding:8px 10px; } .language-header > .language-actions { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; } .language-header h1 { font-size:23px; } .language-header .language-button { padding-inline:4px; font-size:14px; } .language-header .language-source-link { justify-content:center; font-size:.76rem; } .language-picker-row { gap:7px; } .language-picker-row > .language-button { padding-inline:8px; max-width:110px; } .language-main { padding:12px; gap:12px; } .language-word-strip { grid-template-columns:1fr; gap:6px; } .language-word-strip .language-word { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:3px 8px; } .language-word-strip .language-word p { grid-column:1 / -1; } .language-starter-preview > p { font-size:1rem; padding:10px; } .language-workshop-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; } .language-workshop-actions .language-button { font-size:15px; } .language-reading { font-size:19px; padding:14px 12px; } .language-choices { grid-template-columns:1fr; gap:10px; } .language-choices > label { min-height:58px; padding:10px; } .language-question legend { font-size:19px; } .language-editor-tabs { gap:5px; } .language-editor-tabs .language-button { padding-inline:4px; font-size:14px; } .language-editor { gap:8px; } .language-editor textarea { max-height:126px; } .language-shell label { font-size:.78rem; } .language-two-fields { gap:7px; } .language-question textarea { min-height:125px; } }
@media(max-height:450px) and (min-width:700px) { .language-header h1 { font-size:21px; } .language-header .language-button { font-size:15px; padding-inline:8px; } .language-picker-label { display:grid!important; grid-template-columns:auto minmax(0,1fr); gap:8px!important; align-items:center; } .language-reading { font-size:18px; padding:12px; } .language-main,.language-main > .language-lesson-page { gap:8px; } .language-step-nav { padding-top:3px; } .language-choices > label { min-height:54px; padding:8px; font-size:1rem; } }
@media(prefers-reduced-motion:reduce) { .language-button { transform:none!important; } }
.language-header .language-chinese-button { color:#fff4b7; background:#8b1737; border-color:#ffd06a #4e1027 #4e1027 #ffe39b; box-shadow:inset 2px 2px 0 #b9474d,inset -2px -2px 0 #5e102e,4px 4px 0 #172e50; }
.language-header .language-chinese-button:hover { background:#a02141; }

/* The public entrance uses the same illustrated workshop as the course. */
body.auth-shell.language-login-shell {
  background:#467caa url('/racs/img/language/sky-workshop-v1.png') center center / cover no-repeat;
  image-rendering:pixelated;
}
body.language-login-shell .auth-page {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto minmax(24px,1fr) auto;
  align-items:start;
  justify-content:normal;
  gap:0;
  width:min(1120px,calc(100% - 80px));
  margin:auto;
  padding:clamp(20px,5dvh,54px) 0 clamp(54px,8dvh,82px);
}
body.language-login-shell .auth-entry-hero {display:block; width:100%; text-align:left}
body.language-login-shell .auth-entry-brand {display:block; width:min(420px,100%); margin:0 auto; padding:0; transform:none}
body.language-login-shell .auth-entry-controls {grid-row:3; justify-self:center; width:min(390px,100%)}
body.language-login-shell .auth-card {
  padding:20px 22px 22px;
  background:#f2fbff;
  border:3px solid #12334f;
  box-shadow:inset 3px 3px #fff,inset -3px -3px #accbe1,5px 5px #12334f;
}
body.language-login-shell .auth-card h1.language-entry-title {
  margin:0 0 10px;
  color:#143957;
  font:700 clamp(26px,3vw,38px)/1.17 'Brainpower Pixel',system-ui,sans-serif;
  letter-spacing:0;text-shadow:none;
}
body.language-login-shell .auth-card #auth-status {margin:0;color:#274c65;font-size:16px;line-height:1.4}
body.language-login-shell .auth-card #teacher-login {display:block;margin:14px 0 0;padding:0;border:0;background:transparent}
body.auth-shell.language-login-shell .auth-card #teacher-login #google-login {
  width:100%;min-height:48px;margin:0;
  border:2px solid #193d59;
  color:#112f49;background:#b6e9ff;
  box-shadow:inset 2px 2px #e5f8ff,inset -2px -2px #79b6d7,3px 3px #193d59;
  font-size:20px;transform:none;
}
body.auth-shell.language-login-shell .auth-card #teacher-login #google-login:hover {background:#caefff}
body.auth-shell.language-login-shell .auth-card #teacher-login #google-login:active {transform:translate(2px,2px);box-shadow:1px 1px #193d59}
body.language-login-shell :is(.auth-entry-brand,#google-login):focus-visible {outline:3px solid #ffcc54;outline-offset:4px}
@media (max-width:700px) {
  body.auth-shell.language-login-shell {background-position:18% center}
  body.language-login-shell .auth-page {width:calc(100% - 40px); padding:24px 0 max(36px,env(safe-area-inset-bottom,0px))}
  body.language-login-shell .auth-entry-brand {width:min(280px,90%); margin:0 auto}
  body.language-login-shell .auth-card {padding:16px 18px 18px}
}
@media (max-height:420px) {
  body.language-login-shell .auth-page {padding:8px 0 14px;grid-template-rows:auto minmax(4px,1fr) auto}
  body.language-login-shell .auth-entry-brand {width:200px}
}
