body[data-student-screen] header{height:56px;padding:0 22px}
body[data-student-screen] header .brand{font-size:20px}
body[data-student-screen] header .brand small{font-size:9px}
body[data-student-screen] footer{display:none}
.student-layout{max-width:1600px;width:100%;height:calc(100dvh - 56px);padding:12px 22px;margin:auto}
.student-layout .card{margin:0;padding:16px;border-radius:16px;box-shadow:none}
.student-layout h1{font-size:clamp(20px,2.1vw,28px);line-height:1.3;margin:0 0 5px}
.student-layout h2{font-size:18px;line-height:1.4;margin:0 0 10px}
.student-layout p{margin:0;line-height:1.5}
.student-intro{display:flex;align-items:center;justify-content:space-between;gap:20px;min-width:0}
.student-intro>div{min-width:0}
.student-intro>label{margin:0;width:250px;flex-shrink:0;font-size:12px}
.student-intro select{padding:8px;margin-top:3px}
.student-intro .muted{font-size:13px}
.student-before,.student-analysis{height:100%;display:flex;flex-direction:column;gap:12px;min-height:0}
.before-cards{display:grid;grid-template-columns:1fr 1fr;gap:16px;flex:1;min-height:0}
.before-session,.before-reflection{min-height:0;display:flex;flex-direction:column;gap:12px}
.before-session{justify-content:center}
.before-session h2{font-size:24px;margin:0}
.before-session .pill{align-self:flex-start}
.before-session .hint{font-size:16px;margin-top:5px}
.previous-reflection{white-space:pre-wrap;overflow:auto;flex:1;min-height:36px}
.before-target{display:flex;gap:12px;align-items:center;flex-wrap:wrap;flex-shrink:0}
.before-target strong{font-size:22px}
.student-before .start{height:clamp(110px,24dvh,180px);min-height:110px;flex-shrink:0;font-size:clamp(42px,6vw,72px);border-radius:20px}
.before-note{font-size:12px;flex-shrink:0}
#pre-goal:empty{display:none}
#pre-goal form{display:flex;align-items:end;gap:8px}
#pre-goal .stack{flex:1}
#pre-goal label{margin:0}
#pre-goal input{padding:7px}
#pre-goal button{padding:9px}
.student-workspace{display:grid;grid-template-columns:minmax(0,2fr) minmax(290px,1fr);gap:16px;flex:1;min-height:0}
.analysis-main{display:flex;flex-direction:column;gap:12px;min-height:0;min-width:0}
.result-summary{display:grid;grid-template-columns:1.25fr 1fr .8fr;gap:10px;flex-shrink:0}
.result-summary .card{padding:12px 14px}
.result-summary .card>span{font-size:12px}
.result-summary .stat{font-size:clamp(24px,2.7vw,36px);line-height:1.25;letter-spacing:0;white-space:nowrap;margin:3px 0}
.result-summary p{font-size:11px;color:#718073}
.result-summary .analysis-head p{color:#d1e1d6}
.result-chart{flex:1;min-height:0;display:flex;flex-direction:column}
.result-chart>h2{flex-shrink:0;margin-bottom:4px}
.chart-container{flex:1;min-height:0;display:flex;flex-direction:column}
.chart-slot{flex:1;min-height:75px;position:relative}
.chart-slot .chart{position:absolute;inset:0;width:100%;height:100%;max-height:none}
.chart-container .legend{gap:5px 12px;flex-shrink:0;font-size:11px}
.chart-container .statusline{font-size:10px;margin-top:3px;flex-shrink:0}
.estimate-note{font-size:11px;margin-top:3px!important;color:#7d5b15;flex-shrink:0}
.nearby-comparison{background:white;border:1px solid var(--line);border-radius:14px;flex-shrink:0}
.nearby-comparison summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 14px;list-style:none;font-size:13px}
.nearby-comparison summary::-webkit-details-marker{display:none}
.nearby-comparison summary strong{font-weight:600;margin-left:10px;color:#176952}
.disclosure{font-size:15px;color:#176952;transition:transform .15s ease}
.nearby-comparison[open] .disclosure{transform:rotate(180deg)}
.comparison-body{padding:0 12px 8px;max-height:190px;overflow:auto}
.comparison-body table{font-size:12px}
.comparison-body th,.comparison-body td{padding:5px 6px;line-height:1.5}
.comparison-body .statusline{font-size:10px;margin-top:5px}
.reflection-panel{display:flex;flex-direction:column;gap:12px;min-height:0;min-width:0}
.reflection-writing{display:flex;flex-direction:column;gap:8px;flex:1;min-height:0}
.reflection-writing h2{margin:0}
.reflection-prompt{font-size:14px}
.reflection-label{font-size:12px;margin:0;color:#63766f}
.reflection-writing textarea{flex:1;min-height:70px;height:auto;resize:none;font-size:16px;line-height:1.65;padding:10px}
.reflection-writing .statusline{font-size:11px}
.reflection-goal{flex-shrink:0}
.reflection-goal h2{font-size:16px;margin-bottom:8px}
.reflection-goal fieldset{border:0;margin:0;padding:0}
.reflection-goal label{margin:0;font-size:12px}
.reflection-goal input{padding:8px;margin-top:3px;font-size:18px}
.reflection-goal .statusline{font-size:11px;margin-top:7px}
.student-layout.measure-layout{max-width:none;padding:12px 18px}
.student-layout .measure{height:100%;min-height:0;display:grid;grid-template-columns:minmax(0,1.7fr) minmax(290px,1fr);gap:20px;padding:60px 24px 24px;align-items:center;border-radius:20px}
.measure-primary{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0}
.student-layout .measure h1{font-size:clamp(72px,10vw,165px);white-space:nowrap;margin:0;text-align:center;letter-spacing:-.04em}
.student-layout .measure #warning{font-size:clamp(38px,4.7vw,76px);font-weight:900;line-height:1.3;min-height:1.3em;margin:22px 0 0;text-align:center;color:#78500b;white-space:nowrap}
.student-layout .measure.orange #warning{color:#6d3500}
.live-record{background:#ffffffa8;border:1px solid #d3dec8;border-radius:18px;padding:16px;min-width:0;pointer-events:none}
.live-record h2{font-size:20px;margin:0 0 6px}
.live-record>p{font-size:12px;color:#566650}
.live-chart{position:relative;min-width:0}
.live-chart svg{display:block;width:100%;height:auto;max-height:330px}
.live-chart text{font-family:inherit;fill:#425440;font-size:15px;font-weight:600}
.student-layout .measure .live-empty{position:absolute;left:45px;right:4px;top:45%;font-size:15px;text-align:center;background:#f6f9edcf;padding:8px}
.student-layout .measure .feedback{left:34%;top:50%;transform:translate(-50%,-50%);font-size:230px}
.student-layout .goal{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:20px}
.student-layout .goal h1{font-size:clamp(64px,10vw,100px)}
.student-layout .goal .stat{font-size:clamp(42px,7vw,64px)}
@media(min-width:900px) and (max-height:660px){
  .student-layout{padding:8px 16px}
  .student-before,.student-analysis{gap:8px}
  .student-layout .card{padding:12px}
  .student-intro h1{font-size:22px}
  .student-intro .muted{font-size:12px}
  .before-cards{gap:12px}
  .before-session,.before-reflection{gap:8px}
  .student-before .start{height:115px;font-size:50px}
  .student-workspace,.analysis-main,.reflection-panel{gap:8px}
  .result-summary .card{padding:9px 12px}
  .result-summary .stat{font-size:27px}
  .result-summary p{font-size:10px}
  .result-chart>h2{font-size:16px}
  .reflection-writing{gap:5px}
  .reflection-prompt{font-size:13px}
  .reflection-goal h2{font-size:14px;margin-bottom:4px}
  .reflection-goal input{padding:5px;font-size:16px}
  .comparison-body{max-height:160px}
  .comparison-body th,.comparison-body td{padding:3px 6px}
}
@media(max-width:899px){
  body[data-student-screen] header{padding:0 12px;gap:7px}
  body[data-student-screen] header .brand{font-size:17px}
  .student-layout{height:auto;min-height:calc(100dvh - 56px);padding:12px}
  .student-intro{align-items:flex-start;gap:10px}
  .student-intro>label{width:200px}
  .student-intro h1{font-size:21px}
  .student-workspace{grid-template-columns:1fr}
  .result-chart{min-height:300px}
  .chart-slot{min-height:180px}
  .reflection-writing textarea{min-height:180px}
  .before-cards{min-height:240px}
  .student-before .start{height:140px;margin-top:4px}
  .student-layout.measure-layout{height:calc(100dvh - 56px);min-height:0}
  .student-layout .measure{grid-template-columns:minmax(0,1.5fr) minmax(230px,1fr);gap:12px;padding:58px 12px 12px}
  .student-layout .measure h1{font-size:clamp(60px,10vw,100px)}
  .student-layout .measure #warning{font-size:clamp(25px,4.3vw,50px)}
  .live-record{padding:10px}
}
@media(max-width:560px){
  .student-intro{flex-direction:column}
  .student-intro>label{width:100%}
  .before-cards{grid-template-columns:1fr}
  .previous-reflection{max-height:120px}
  .result-summary{grid-template-columns:1fr 1fr}
  .result-summary .card:last-child{grid-column:1/-1}
  .student-layout .measure{grid-template-columns:1fr;grid-template-rows:1fr auto;padding-top:55px;gap:5px}
  .student-layout .measure h1{font-size:19vw}
  .student-layout .measure #warning{font-size:8vw;margin-top:8px}
  .live-record{padding:8px}
  .live-record h2{font-size:15px}
  .live-chart svg{max-height:165px}
  .live-record>p{font-size:10px}
  .student-layout .measure .feedback{left:50%;top:30%}
}
