/* Student studio: simple white panels and a fitted central workspace. */
body { background: #f8fafc; color: #0f172a; }
.gov-tricolor-strip { height: 4px; background: #f97316; }
.student-clean-header { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 64px; padding: 10px 16px; background: white; border-bottom: 1px solid #fdba74; }
.student-clean-header .btn { font-size: 12px; min-height: 36px; border-radius: 6px; }
.student-home { color: #0f172a; font-size: 13px; font-weight: 700; text-decoration: none; }
.student-page-title { font-size: 14px; font-weight: 800; margin-right: 20px; }
.student-guidance { padding: 9px 16px; background: #fff7ed; color: #9a3412; font-size: 13px; }
.student-setup-bar { background: #fff; padding: 8px 14px; border: 0; gap: 12px; }
.student-setup-bar .asset-pills { width: 440px; gap: 6px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.student-setup-bar .asset-pill { background: white; color: #334155; box-shadow: none; border: 1px solid #fed7aa; min-height: 36px; border-radius: 6px; }
.student-setup-bar .asset-pill.active { color: #ea580c; background: #fff7ed; border-color: #f97316; }
.studio-workspace-grid { padding: 0 12px 16px; gap: 12px; background: #f8fafc; }
.floating-tools-sidebar { background: white; border: 1px solid #fed7aa; border-radius: 12px; box-shadow: none; }
.sidebar-card-box { background: #fff; padding: 12px; border-bottom: 1px solid #fed7aa; gap: 10px; }
.sidebar-card-box:first-child { border-radius: 12px 12px 0 0; }
.sidebar-card-box:last-child { border-radius: 0 0 12px 12px; }
.sidebar-card-title { margin: -12px -12px 2px; padding: 12px; font-size: 13px; border-bottom: 1px solid #fed7aa; color: #0f172a; min-height: 44px; }
.sidebar-card-box .form-label { font-size: 12px !important; color: #475569; }
.sidebar-card-box .form-control, .sidebar-card-box .form-select { border: 1px solid #fdba74; border-radius: 6px; font-size: 12px !important; min-height: 32px; background: #fff; color: #0f172a; }
.sidebar-card-box .form-range { width: 100%; }
.lighting-pill, .scale-pill { box-shadow: none; border: 1px solid #fed7aa; background: #fff; }
.stage-main-wrapper { border: 0; box-shadow: none; background: #fff; border-radius: 0; }
.stage-top-bar { background: #fff; border-bottom: 1px solid #fed7aa; padding: 10px 12px; gap: 8px; }
.stage-step-pills { background: #f1f5f9; border-radius: 6px; }
.stage-step-pill { padding: 8px 12px; }
.stage-top-bar > div:last-child { margin-left: auto; }
.stage-live-badge { font-size: 11px; font-weight: 600; padding: 4px 8px; }
.wa-stage-toolbar { order: 3; background: #fff; box-shadow: none; border: 0; border-top: 1px solid #fed7aa; border-radius: 0; max-width: 100%; width: 100%; margin: 0; padding: 10px; gap: 6px; }
.wa-toolbar-btn { color: #334155; background: #fff; border: 1px solid #fed7aa; border-radius: 6px; font-size: 12px; min-height: 34px; }
.wa-toolbar-btn:hover { color: #ea580c; background: #fff7ed; border-color: #f97316; }
.wa-toolbar-btn.primary { background: #ea580c; box-shadow: none; border-radius: 6px; }
.stage-viewport-box { background: #edf0f3; background-image: none; overflow: hidden; padding: 24px; border: 1px solid #fed7aa; border-radius: 12px 12px 0 0; }
#stdViewCropWrap { min-height: 0; gap: 16px; }
#stdCropCanvas, #stdOutputCanvas { max-width: 100%; max-height: 100%; object-fit: contain; flex-shrink: 0; border-radius: 0; box-shadow: 0 4px 22px #0f172a20; }
.crop-live-hud { display: none !important; }
.std-dropzone-box { min-height: 260px; padding: 32px; border: 1px solid #d1d5db; border-radius: 0; box-shadow: 0 6px 24px #0f172a15; }
.std-dropzone-box::before { display: none; }
#stdViewOutputWrap { min-height: 0; padding: 0; gap: 8px; }
.preview-box-container { padding: 6px; max-height: 65%; min-height: 0; box-shadow: none; }
.preview-box-container #stdOutputCanvas { max-height: 100%; }
.studio-stats-bar { margin-top: 0; gap: 6px; }
.studio-stat-item { padding: 4px 8px; min-width: 0; }
.kb-quota-meter { background: #fff7ed; }
@media (min-width: 1100px) {
  .studio-workspace-grid { grid-template-columns: 300px minmax(0, 1fr) 300px; align-items: start; }
  .stage-main-wrapper { height: calc(100dvh - 166px); min-height: 480px; position: sticky; top: 10px; }
  .stage-viewport-box { flex: 1 1 0; min-height: 0; }
}
@media (max-width: 1099px) {
  .stage-viewport-box { height: 52vh; min-height: 300px; }
}
@media (max-width: 680px) {
  .student-clean-header { justify-content: flex-start; padding: 8px; gap: 8px; }
  .student-page-title { margin-right: auto; }
  .student-clean-header #stdHeaderBtnDownload { display: none; }
  .student-clean-header .btn { min-height: 40px; }
  .student-setup-bar { padding: 8px; }
  .student-setup-bar .asset-pills { width: 100%; }
  .student-setup-bar .asset-pill { flex-direction: column; min-width: 0; padding: 6px 2px; }
  .studio-workspace-grid { padding: 0 8px 12px; }
  .stage-top-bar > div:last-child { margin-left: 0; }
  .stage-top-bar .stage-step-pill { font-size: 12px; }
  .stage-viewport-box { height: 44vh; min-height: 280px; padding: 16px; }
  .wa-toolbar-btn { min-height: 44px; }
  .sidebar-card-box .form-control, .sidebar-card-box .form-select { min-height: 44px; font-size: 16px !important; }
  .std-dropzone-box { min-height: 170px; padding: 20px; }
  .student-sample { min-height: 40px; }
}

/* Output image gets the viewport; facts and actions sit in a compact footer. */
.student-output-fit-note { margin: 0; flex-shrink: 0; font-size: 11px; color: #475569; text-align: center; max-width: 100%; }
.student-output-footer { display: none; flex-shrink: 0; padding: 10px 12px; background: #fff; border-top: 1px solid #fed7aa; }
.is-output .student-output-footer { display: block; }
.is-output .wa-stage-toolbar { display: none !important; }
#stdViewOutputWrap { justify-content: flex-start; gap: 8px; overflow: hidden; }
#stdViewOutputWrap > div:first-child { max-width: none !important; margin-bottom: 0 !important; flex-shrink: 0; box-shadow: none !important; }
.preview-box-container { flex: 1 1 0; width: 100%; max-width: 100%; min-height: 0; max-height: none; padding: 12px; border: none; background: transparent; overflow: hidden; }

.student-output-footer .studio-stats-bar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; max-width: none; background: transparent; padding: 0; margin: 0; border: 0; box-shadow: none; }
.student-output-footer .studio-stat-item { padding: 6px 4px; min-width: 0; background: #f8fafc; border: 0; text-align: center; }
.student-output-footer .studio-stat-label { font-size: 9px; }
.student-output-footer .studio-stat-val { font-size: 11px; }
.student-output-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.student-output-actions .btn { min-height: 38px; padding: 8px 12px !important; font-size: 12px !important; }
.student-output-actions #stdBtnDownloadMain { flex: 0 1 auto !important; min-width: 0 !important; }
@media (max-width: 680px) {
  .student-output-footer { padding: 8px; }
  .student-output-footer .studio-stats-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .student-output-actions { justify-content: center; }
  .student-output-actions .btn { min-height: 44px; }
  .student-output-actions #stdBtnDownloadMain { display: none; }
}

/* Compact top controls give more space to the image. */
@media (min-width: 681px) {
  .student-clean-header { min-height: 44px; padding: 5px 12px; gap: 8px; }
  .student-clean-header .btn { min-height: 30px; padding: 5px 10px; font-size: 12px; }
  .student-page-title { margin-right: 10px; font-size: 13px; }
  .student-guidance { padding: 4px 14px; font-size: 11px; line-height: 18px; }
  .student-setup-bar { padding: 5px 12px; gap: 8px; }
  .student-setup-bar .asset-pills { width: 380px; gap: 5px; }
  .student-setup-bar .asset-pill { min-height: 28px; padding: 4px 7px; font-size: 12px; gap: 5px; }
  .stage-top-bar { padding: 5px 10px; min-height: 40px; gap: 6px; }
  .stage-step-pill { padding: 5px 10px; font-size: 12px; }
  .stage-live-badge { padding: 3px 7px; font-size: 10px; }
  .wa-stage-toolbar { padding: 6px 8px; gap: 5px; }
  .wa-toolbar-btn { min-height: 30px; padding: 5px 9px; }
}
@media (min-width: 1100px) {
  .stage-main-wrapper { height: calc(100dvh - 122px); }
}
@media (max-width: 680px) {
  .student-clean-header { gap: 6px; padding: 6px 8px; }
  .student-guidance { padding: 4px 8px; font-size: 11px; }
  .student-setup-bar { gap: 5px; padding: 5px 8px; }
  .stage-top-bar { padding: 6px 8px; gap: 5px; }
}
