/* Results layout: desktop and tablets in landscape; phones retain mobile UI. */
@media (min-width: 1024px), (min-width: 768px) and (min-height: 600px) and (orientation: landscape) {
  #modal-hasil .dr-mobile-layout { display: none; }
  #modal-hasil .dr-desktop-layout { display: flex; height: 100%; min-width: 0; }
  body:has(#modal-hasil:not(.hidden) .desktop-results) { overflow: hidden; }
  #modal-hasil .desktop-results {
    --dr-bg: #081b2d;
    --dr-line: #27455f;
    --dr-muted: #b8cce4;
    width: 100%; height: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden;
    background: var(--dr-bg); color: #f5f8fc; font-family: Inter, sans-serif;
    scrollbar-color: #38536b var(--dr-bg);
  }
  #modal-hasil .desktop-results * { box-sizing: border-box; }
  #modal-hasil .desktop-results h1,
  #modal-hasil .desktop-results h2,
  #modal-hasil .desktop-results h3,
  #modal-hasil .desktop-results h4,
  #modal-hasil .desktop-results p { margin: 0; }
  #modal-hasil .dr-navbar { flex-shrink: 0; min-height: 54px; border-bottom: 1px solid var(--dr-line); display: flex; align-items: center; justify-content: space-between; padding: 8px max(34px, calc((100% - 1190px) / 2)); gap: 20px; }
  #modal-hasil .dr-logo { width: 190px; height: 48px; margin-block: -10px; object-fit: contain; }
  #modal-hasil .dr-actions { display: flex; gap: 12px; }
  #modal-hasil .dr-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--dr-line); border-radius: 6px; padding: 9px 14px; color: #f5f8fc; background: transparent; font-size: 12px; font-weight: 600; line-height: 1.4; transition: background .15s; }
  #modal-hasil .dr-button:hover:not(:disabled) { background: #17334c; }
  #modal-hasil .dr-button-primary { background: #075eff; border-color: #075eff; }
  #modal-hasil .dr-button-primary:hover:not(:disabled) { background: #2473ff; }
  #modal-hasil .dr-button:disabled { opacity: .45; cursor: default; }
  #modal-hasil .desktop-results button:focus-visible { outline: 2px solid #8fc5ff; outline-offset: 4px; }
  #modal-hasil .dr-icon { width: 18px; height: 18px; flex-shrink: 0; }
  #modal-hasil .dr-content { width: 100%; max-width: 1440px; padding: 18px 34px 20px; margin: 0 auto; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  #modal-hasil .dr-summary { flex-shrink: 0; border-bottom: 1px solid var(--dr-line); padding: 0 0 16px; margin-bottom: 8px; }
  #modal-hasil .dr-title { text-align: center; margin-bottom: 16px; }
  #modal-hasil .dr-title h1 { font-size: 17px; font-weight: 750; line-height: 1.3; }
  #modal-hasil .dr-title p { color: var(--dr-muted); font-size: 12px; font-weight: 600; margin-top: 3px; overflow-wrap: anywhere; }
  #modal-hasil .dr-summary-row { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-items: center; row-gap: 16px; }
  #modal-hasil .dr-score { width: 88px; height: 88px; position: relative; }
  #modal-hasil .dr-score-value { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
  #modal-hasil .desktop-results #animated-score-desktop { color: #f5f8fc; font-size: 28px; font-weight: 800; line-height: 1.2; text-shadow: none; }
  #modal-hasil .dr-score-group { display: flex; flex-direction: column; align-items: center; gap: 6px; }
  #modal-hasil .desktop-results .dr-score-label { font-size: 11px; line-height: 1.3; color: var(--dr-muted); white-space: nowrap; }
  #modal-hasil .dr-stats { width: 100%; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; }
  #modal-hasil .dr-stats > div { display: flex; flex-direction: column-reverse; align-items: center; justify-content: center; padding: 2px 8px; gap: 3px; border-left: 1px solid var(--dr-line); }
  #modal-hasil .dr-stats > div:first-child { border-left: 0; }
  #modal-hasil .dr-stats dt { color: var(--dr-muted); font-size: 11px; line-height: 1.5; }
  #modal-hasil .dr-stats dd { font-size: 18px; line-height: 1.3; font-weight: 700; margin: 0; font-variant-numeric: tabular-nums; }
  #modal-hasil .dr-workspace { flex: 1; min-height: 0; overflow: hidden; display: grid; grid-template-columns: minmax(0, 7fr) minmax(238px, 3fr); padding-top: 0; }
  #modal-hasil .dr-review { min-height: 0; overflow: hidden; min-width: 0; padding-right: 24px; }
  #modal-hasil .desktop-results .dr-question { height: 100%; min-height: 0; display: flex; flex-direction: column; background: transparent; border: 0; border-radius: 0; box-shadow: none; color: #f5f8fc; }
  #modal-hasil .desktop-results .dr-question.hidden { display: none; }
  #modal-hasil .dr-review-body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding-right: 10px; scrollbar-width: thin; scrollbar-color: #38536b var(--dr-bg); }
  #modal-hasil .dr-review-heading { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
  #modal-hasil .dr-review-title { display: flex; align-items: center; gap: 26px; align-self: stretch; }
  #modal-hasil .dr-review-title h2 { font-size: 15px; font-weight: 700; display: flex; align-items: center; }
  #modal-hasil .dr-review-title span { font-size: 12px; color: var(--dr-muted); }
  #modal-hasil .dr-review-tools { display: flex; align-items: center; gap: 17px; }
  #modal-hasil .desktop-results .dr-report { background: transparent; border: 0; box-shadow: none; color: #e1edf9; padding: 7px 0; min-height: 0; font-size: 10px; border-radius: 0; gap: 7px; }
  #modal-hasil .desktop-results .dr-report .question-report-label { display: inline; }
  #modal-hasil .dr-status { font-size: 12px; font-weight: 700; border-left: 1px solid var(--dr-line); padding-left: 17px; }
  #modal-hasil .dr-status--correct { color: #64f7b0; }
  #modal-hasil .dr-status--wrong { color: #ff858b; }
  #modal-hasil .dr-status--empty { color: var(--dr-muted); }
  #modal-hasil .dr-question-text { font-size: 14px; line-height: 1.75; color: #dce7f6; padding: 15px 0 12px; overflow-wrap: anywhere; }
  #modal-hasil .desktop-results mjx-container[display="true"] { text-align: left; overflow-x: auto; overflow-y: hidden; padding: 3px 0; }
  #modal-hasil .dr-answer { border-left: 3px solid currentColor; display: flex; align-items: center; gap: 19px; padding: 7px 19px; margin: 0 0 12px; }
  #modal-hasil .dr-answer--correct { color: #64f7b0; }
  #modal-hasil .dr-answer--wrong { color: #ff858b; }
  #modal-hasil .dr-answer--empty { color: var(--dr-muted); }
  #modal-hasil .dr-answer .dr-icon { width: 27px; height: 27px; }
  #modal-hasil .dr-answer h4 { font-size: 13px; font-weight: 700; }
  #modal-hasil .dr-answer .pembahasan-math-wrapper { font-size: 14px; color: #edf4ff; margin-top: 4px; }
  #modal-hasil .dr-explanation { border-top: 1px solid var(--dr-line); padding: 13px 0 17px; font-size: 14px; line-height: 1.75; color: #cbdcf0; overflow-wrap: anywhere; }
  #modal-hasil .dr-explanation h3 { font-size: 15px; font-weight: 700; color: #f5f8fc; margin-bottom: 4px; }
  #modal-hasil .dr-review-footer { flex-shrink: 0; padding-top: 15px; display: flex; justify-content: space-between; gap: 14px; }
  #modal-hasil .dr-navigation { min-height: 0; display: flex; flex-direction: column; overflow: hidden; min-width: 0; border-left: 1px solid var(--dr-line); padding-left: 26px; }
  #modal-hasil .dr-nav-heading { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid var(--dr-line); min-height: 44px; }
  #modal-hasil .dr-nav-heading h2 { font-size: 15px; font-weight: 700; }
  #modal-hasil .dr-nav-heading span { color: var(--dr-muted); font-size: 10px; }
  #modal-hasil .dr-nav-grid { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #38536b var(--dr-bg); align-content: start; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 17px 0 20px; }
  #modal-hasil .desktop-results .navigator-btn { border: 1px solid #078345; background: #083d2c; color: #effbf5; border-radius: 6px; box-shadow: none; font-size: 14px; transform: none; scale: 1; transition-property: background-color, border-color, filter; aspect-ratio: 1.1; max-height: 52px; }
  #modal-hasil .desktop-results .navigator-btn.bg-red-100 { border-color: #8c424d; background: #3b2635; color: #ffb9bf; }
  #modal-hasil .desktop-results .navigator-btn.bg-slate-100 { border-color: #3d5672; background: #182d43; color: #c4d5e8; }
  #modal-hasil .desktop-results .navigator-btn:hover { filter: brightness(1.2); transform: none; scale: 1; }
  #modal-hasil .desktop-results .navigator-btn:focus-visible { outline-offset: -3px; }
  #modal-hasil .desktop-results .navigator-btn.navigator-active { background: #075eff; color: white; border-color: #075eff; outline: none; box-shadow: none; }
  #modal-hasil .dr-legend { flex-shrink: 0; display: flex; gap: 20px; border-top: 1px solid var(--dr-line); padding-top: 19px; color: #cbdcf0; font-size: 11px; flex-wrap: wrap; }
  #modal-hasil .dr-legend span { display: flex; align-items: center; gap: 8px; }
  #modal-hasil .dr-legend i { width: 11px; height: 11px; border-radius: 50%; }
  #modal-hasil .dr-dot-correct { background: #00d56e; }
  #modal-hasil .dr-dot-wrong { background: #ff686e; }
  #modal-hasil .dr-dot-empty { background: #adc8ed; }
  #modal-hasil .desktop-results .table-wrapper { background: transparent; color: #dce7f6; }
  #modal-hasil .desktop-results .complex-summary-table-wrapper { background: transparent; border: 0; border-radius: 0; box-shadow: none; }
  #modal-hasil .desktop-results .complex-summary-table thead th { background: transparent; color: var(--dr-muted); border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--dr-line); }
  #modal-hasil .desktop-results .complex-summary-table tbody tr { background: transparent; }
  #modal-hasil .desktop-results .complex-summary-table tbody td { color: #dce7f6; border-color: var(--dr-line); border-radius: 0; }
  #modal-hasil .desktop-results .complex-summary-table td.user-cell-correct { background: #083d2c; color: #92ebbd; }
  #modal-hasil .desktop-results .complex-summary-table td.user-cell-wrong { background: #3b2635; color: #ffb9bf; }
  #modal-hasil .desktop-results .complex-summary-table td.user-cell-neutral { background: #182d43; color: var(--dr-muted); }
  #modal-hasil .dr-options { margin: 0 0 18px; }
  #modal-hasil .dr-options h3, #modal-hasil .dr-complex h3 { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
  #modal-hasil .dr-options ol { list-style: none; padding: 0; margin: 0; }
  #modal-hasil .dr-options ol { display: grid; gap: 12px; }
  #modal-hasil .dr-option { color: #dce7f6; border-radius: 14px; overflow: hidden; background: #12283c; }
  #modal-hasil .dr-option-surface { display: flex; gap: 16px; align-items: center; padding: 14px 18px; border: 1px solid #36516c; border-radius: 14px; }
  #modal-hasil .dr-option-letter { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 50%; font-size: 14px; font-weight: 700; color: #f5f8fc; background: #28445e; }
  #modal-hasil .dr-option-text { min-width: 0; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; white-space: normal; }
  #modal-hasil .dr-option--correct { background: #188042; }
  #modal-hasil .dr-option--correct .dr-option-surface { background: #145c34; border: 2px solid #22c55e; }
  #modal-hasil .dr-option--correct .dr-option-letter { background: #16a34a; }
  #modal-hasil .dr-option--wrong { background: #a33443; }
  #modal-hasil .dr-option--wrong .dr-option-surface { background: #592936; border: 2px solid #f87171; }
  #modal-hasil .dr-option--wrong .dr-option-letter { background: #dc4b5d; }
  #modal-hasil .dr-option-tags { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 7px 12px; font-size: 11px; line-height: 1.4; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: #ffffff; }
  #modal-hasil .dr-option-tags i { width: 1px; height: 12px; background: #ffffff80; }
  #modal-hasil .dr-complex { padding: 4px 0 20px; }
  #modal-hasil .dr-complex-options { display: flex; flex-wrap: wrap; gap: 6px; color: var(--dr-muted); font-size: 13px; line-height: 1.7; margin-bottom: 14px; }
  #modal-hasil .dr-complex-scroll { overflow-x: auto; scrollbar-width: thin; scrollbar-color: #38536b var(--dr-bg); }
  #modal-hasil .desktop-results .dr-complex-table { min-width: 600px; width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
  #modal-hasil .desktop-results .dr-complex-table thead th { text-align: left; padding: 12px; font-size: 12px; text-transform: none; letter-spacing: 0; background: #122c42; color: #e6f0fb; position: static; }
  #modal-hasil .desktop-results .dr-complex-table tbody tr:nth-child(even) { background: #0c2235; }
  #modal-hasil .desktop-results .dr-complex-table tbody td,
  #modal-hasil .desktop-results .dr-complex-table tbody th { padding: 16px 12px; vertical-align: top; text-align: left; line-height: 1.75; white-space: normal; overflow-wrap: anywhere; border-bottom: 1px solid var(--dr-line); }
  #modal-hasil .desktop-results .dr-complex-table .dr-statement { font-weight: 400; color: #e1ecfa; }
  #modal-hasil .dr-statement-number { color: var(--dr-muted); margin-right: 8px; }
  #modal-hasil .desktop-results .dr-complex-table .dr-cell--correct, #modal-hasil .desktop-results .dr-complex-table .dr-cell-key { color: #92ebbd; }
  #modal-hasil .desktop-results .dr-complex-table .dr-cell--wrong { color: #ffb9bf; }
  #modal-hasil .desktop-results .dr-complex-table .dr-cell--empty { color: var(--dr-muted); }
  #modal-hasil .dr-table-status { font-size: 12px; font-weight: 600; }

}
@media (min-width: 1024px) and (max-width: 1199px), (min-width: 768px) and (max-width: 1199px) and (min-height: 600px) and (orientation: landscape) {
  #modal-hasil .dr-content { padding-left: 26px; padding-right: 26px; }
  #modal-hasil .dr-review-title { gap: 12px; }
  #modal-hasil .dr-review-tools { gap: 8px; }
  #modal-hasil .dr-status { padding-left: 8px; }
  #modal-hasil .dr-navigation { padding-left: 19px; }
  #modal-hasil .dr-nav-grid { gap: 6px; }
}
/* Compact the desktop workspace on landscape tablets without changing phones. */
@media (min-width: 768px) and (max-width: 1199px) and (min-height: 600px) and (orientation: landscape) {
  #modal-hasil .dr-navbar { min-height: 46px; padding: 6px 20px; gap: 12px; }
  #modal-hasil .dr-logo { width: 160px; height: 40px; margin-block: -8px; }
  #modal-hasil .dr-actions { gap: 8px; }
  #modal-hasil .dr-button { font-size: 11px; padding: 7px 11px; gap: 6px; }
  #modal-hasil .dr-icon { width: 16px; height: 16px; }
  #modal-hasil .dr-content { padding: 12px 18px 14px; }
  #modal-hasil .dr-workspace { grid-template-columns: minmax(0, 7fr) minmax(200px, 3fr); }
  #modal-hasil .dr-review { padding-right: 16px; }
  #modal-hasil .dr-navigation { padding-left: 16px; }
  #modal-hasil .dr-summary { padding-bottom: 12px; margin-bottom: 6px; }
  #modal-hasil .dr-title { margin-bottom: 12px; }
  #modal-hasil .dr-title h1 { font-size: 15px; }
  #modal-hasil .dr-title p { font-size: 11px; }
  #modal-hasil .dr-summary-row { --dr-tablet-score: clamp(60px, 6.5vw, 76px); grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
  #modal-hasil .dr-score { width: var(--dr-tablet-score); height: var(--dr-tablet-score); }
  #modal-hasil .desktop-results #animated-score-desktop { font-size: clamp(20px, 2.1vw, 24px); }
  #modal-hasil .desktop-results .dr-score-label { font-size: 10px; }
  #modal-hasil .dr-stats dd { font-size: 16px; }
  #modal-hasil .dr-stats dt { font-size: 10px; }
  #modal-hasil .dr-review-heading, #modal-hasil .dr-nav-heading { min-height: 36px; gap: 8px; }
  #modal-hasil .dr-review-title h2, #modal-hasil .dr-nav-heading h2 { font-size: 13px; }
  #modal-hasil .dr-review-tools { gap: 8px; }
  #modal-hasil .desktop-results .dr-report { font-size: 9px; gap: 5px; }
  #modal-hasil .dr-status { font-size: 11px; padding-left: 8px; }
  #modal-hasil .dr-review-body { padding-right: 6px; }
  #modal-hasil .dr-question-text { font-size: 13px; line-height: 1.65; padding: 12px 0 10px; }
  #modal-hasil .dr-options { margin-bottom: 14px; }
  #modal-hasil .dr-options h3, #modal-hasil .dr-complex h3, #modal-hasil .dr-explanation h3 { font-size: 13px; }
  #modal-hasil .dr-options ol { gap: 9px; }
  #modal-hasil .dr-option-surface { padding: 10px 12px; gap: 12px; }
  #modal-hasil .dr-option-letter { width: 28px; height: 28px; font-size: 12px; }
  #modal-hasil .dr-option-text { font-size: 13px; line-height: 1.6; }
  #modal-hasil .dr-option-tags { font-size: 10px; padding: 5px 10px; }
  #modal-hasil .dr-answer { gap: 12px; padding: 6px 12px; margin-bottom: 10px; }
  #modal-hasil .dr-answer .dr-icon { width: 23px; height: 23px; }
  #modal-hasil .dr-answer h4 { font-size: 12px; }
  #modal-hasil .dr-answer .pembahasan-math-wrapper { font-size: 13px; }
  #modal-hasil .dr-explanation { font-size: 13px; line-height: 1.65; padding: 10px 0 14px; }
  #modal-hasil .dr-review-footer { padding-top: 10px; gap: 10px; }
  #modal-hasil .dr-nav-grid { gap: 6px; padding: 12px 0 14px; }
  #modal-hasil .desktop-results .navigator-btn { font-size: 12px; max-height: 44px; }
  #modal-hasil .dr-legend { font-size: 10px; gap: 12px; padding-top: 12px; }
  #modal-hasil .dr-legend span { gap: 5px; }
  #modal-hasil .dr-legend i { width: 9px; height: 9px; }
  #modal-hasil .dr-complex-options { font-size: 12px; margin-bottom: 10px; }
  #modal-hasil .desktop-results .dr-complex-table { font-size: 13px; }
  #modal-hasil .desktop-results .dr-complex-table thead th { font-size: 11px; padding: 10px; }
  #modal-hasil .desktop-results .dr-complex-table tbody td,
  #modal-hasil .desktop-results .dr-complex-table tbody th { padding: 12px 10px; line-height: 1.6; }
  #modal-hasil .dr-table-status { font-size: 11px; }
}
