.grade-page [hidden] { display: none !important; }
.grade-workspace { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 40px; align-items: start; }
.grade-upload { background: #fff; border: 1px solid #dedee2; border-radius: 8px; padding: 24px; min-width: 0; }
.grade-drop { display: flex; align-items: center; justify-content: center; position: relative; min-height: 256px; padding: 20px; text-align: center; background: #f6f8f8; border: 2px dashed #c2cecb; border-radius: 6px; cursor: pointer; }
.grade-drop:focus-within, .grade-drop.is-dragging { outline: 2px solid #16735b; outline-offset: 3px; background: #edf6f2; }
.grade-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.grade-drop img { display: block; width: 100%; max-height: 260px; object-fit: contain; }
#preview-container { min-width: 0; width: 100%; }
#file-name { overflow-wrap: anywhere; }
.grade-report { min-width: 0; border-top: 2px solid #276c59; padding-top: 24px; scroll-margin-top: 88px; }
.grade-empty { min-height: 360px; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.grade-summary { display: flex; gap: 20px; align-items: start; justify-content: space-between; padding-bottom: 24px; border-bottom: 1px solid #ddd; }
.grade-total { flex-shrink: 0; display: flex; align-items: baseline; gap: 3px; color: #18674f; }
.grade-total strong { font-size: 36px; font-weight: 600; line-height: 1.2; }
.grade-total span { font-size: 16px; color: #66736d; }
.grade-scores { display: grid; gap: 12px; margin-top: 24px; }
.grade-score-row { display: grid; grid-template-columns: 100px minmax(0, 1fr) 36px; gap: 12px; align-items: center; font-size: 13px; }
.grade-score-row meter { width: 100%; height: 12px; border: 0; border-radius: 4px; background: #e3e8e6; }
.grade-score-row meter::-webkit-meter-bar { background: #e3e8e6; border: 0; height: 8px; }
.grade-score-row meter::-webkit-meter-optimum-value { background: #327c65; }
.grade-score-row meter::-moz-meter-bar { background: #327c65; }
.grade-score-row output { text-align: right; font-variant-numeric: tabular-nums; }
.grade-list { padding-left: 20px; list-style: disc; color: #4b5563; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.grade-list li + li { margin-top: 6px; }
.grade-details { border-block: 1px solid #ddd; }
.grade-details dt { font-weight: 500; margin-top: 16px; }
.grade-details dd { font-size: 14px; line-height: 1.8; color: #4b5563; margin: 6px 0 16px; overflow-wrap: anywhere; }
.grade-error { color: #9d2630; background: #fff2f3; padding: 12px; margin-top: 16px; border-left: 3px solid #bf4051; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.grade-upload button:disabled { background: #d1d5db; color: #4b5563; cursor: not-allowed; }
@media (max-width: 767px) {
    .grade-workspace { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .grade-upload { padding: 20px; }
    .grade-summary { gap: 12px; }
    .grade-total strong { font-size: 32px; }
    .grade-score-row { grid-template-columns: 90px minmax(0, 1fr) 36px; gap: 8px; }
}
