
:root{
  --drrh-blue:#0c4a6e;
  --drrh-blue2:#075985;
  --drrh-yellow:#facc15;
  --drrh-ink:#0f172a;
  --drrh-muted:#64748b;
  --drrh-bg:#f8fafc;
  --drrh-line:#e2e8f0;
  --drrh-card:#ffffff;
  --drrh-red:#b91c1c;
  --drrh-green:#15803d;
  --drrh-radius:20px;
}
.drrh-app{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--drrh-ink);background:var(--drrh-bg);border:1px solid var(--drrh-line);border-radius:24px;overflow:hidden;line-height:1.6}
.drrh-app *{box-sizing:border-box}
.drrh-app button,.drrh-app input{font:inherit}
.drrh-hero{display:flex;justify-content:space-between;gap:24px;align-items:flex-end;padding:34px;background:linear-gradient(135deg,#082f49,#0c4a6e 65%,#075985);color:#fff}
.drrh-kicker,.drrh-eyebrow{font-size:12px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}
.drrh-kicker{color:#fde047}
.drrh-hero h1{font-size:clamp(32px,5vw,58px);line-height:1.02;margin:8px 0 12px;color:#fff}
.drrh-hero p{max-width:800px;margin:0;color:#dbeafe;font-size:16px}
.drrh-hero-actions{display:flex;gap:10px;flex-wrap:wrap}
.drrh-btn{border:1px solid #cbd5e1;background:#fff;color:#0f172a;border-radius:12px;padding:10px 14px;font-weight:800;cursor:pointer;transition:.18s ease}
.drrh-btn:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(15,23,42,.08)}
.drrh-btn-primary{background:var(--drrh-yellow);border-color:var(--drrh-yellow);color:#422006}
.drrh-btn-small{padding:7px 10px;font-size:13px}
.drrh-btn-danger{color:#991b1b;border-color:#fecaca;background:#fff7f7}
.drrh-stats{display:grid;grid-template-columns:repeat(4,1fr);background:#fff;border-bottom:1px solid var(--drrh-line)}
.drrh-stats div{padding:18px 24px;border-right:1px solid var(--drrh-line)}
.drrh-stats div:last-child{border-right:0}
.drrh-stats strong{display:block;font-size:24px;line-height:1.1;color:var(--drrh-blue)}
.drrh-stats span{font-size:12px;color:var(--drrh-muted);font-weight:700}
.drrh-tabs{display:flex;gap:4px;padding:10px 16px;background:#fff;border-bottom:1px solid var(--drrh-line);overflow:auto;position:sticky;top:0;z-index:20}
.drrh-tabs button{border:0;background:transparent;padding:10px 16px;border-radius:10px;white-space:nowrap;font-weight:800;color:#475569;cursor:pointer}
.drrh-tabs button.is-active{background:#e0f2fe;color:#075985}
.drrh-panel{display:none;min-height:600px}
.drrh-panel.is-active{display:block}
.drrh-toolbar{padding:18px 22px;display:flex;gap:12px;border-bottom:1px solid var(--drrh-line);background:#f8fafc}
.drrh-search{flex:1;display:flex;align-items:center;background:#fff;border:1px solid #cbd5e1;border-radius:13px;padding:0 12px;min-width:0}
.drrh-search span{font-size:22px;color:#64748b}
.drrh-search input{width:100%;border:0;outline:0;padding:11px;background:transparent;color:#0f172a}
.drrh-layout{display:grid;grid-template-columns:250px 1fr;min-height:650px}
.drrh-sidebar{padding:22px;border-right:1px solid var(--drrh-line);background:#fff}
.drrh-sidebar h2{font-size:13px;text-transform:uppercase;letter-spacing:.12em;color:#64748b;margin:0 0 12px}
.drrh-group-list{display:flex;flex-direction:column;gap:6px}
.drrh-group-btn{display:flex;gap:10px;align-items:center;border:0;background:transparent;border-radius:11px;padding:10px;width:100%;text-align:left;font-weight:750;cursor:pointer;color:#334155}
.drrh-group-btn:hover{background:#f1f5f9}
.drrh-group-btn.is-active{background:#e0f2fe;color:#075985}
.drrh-group-btn span:first-child{font-size:18px}
.drrh-atlas{padding:26px;min-width:0}
.drrh-section-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-end;margin-bottom:22px}
.drrh-section-head h2{font-size:28px;line-height:1.2;margin:4px 0;color:#0f172a}
.drrh-section-head p{margin:0;color:#64748b;max-width:760px}
.drrh-eyebrow{color:#0369a1}
.drrh-count{font-weight:800;color:#64748b;background:#fff;border:1px solid var(--drrh-line);padding:6px 10px;border-radius:999px}
.drrh-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(265px,1fr));gap:16px}
.drrh-card{background:#fff;border:1px solid var(--drrh-line);border-radius:18px;padding:18px;display:flex;flex-direction:column;gap:12px;box-shadow:0 8px 26px rgba(15,23,42,.03)}
.drrh-card:hover{border-color:#7dd3fc;box-shadow:0 12px 34px rgba(15,23,42,.07)}
.drrh-card-top{display:flex;justify-content:space-between;gap:12px}
.drrh-card .drrh-tag{font-size:11px;font-weight:800;text-transform:uppercase;color:#0369a1;background:#e0f2fe;border-radius:999px;padding:4px 8px}
.drrh-card .drrh-done{font-size:11px;color:#15803d;font-weight:800}
.drrh-card h3{font-size:18px;line-height:1.25;margin:0;color:#0f172a}
.drrh-card p{font-size:13px;color:#64748b;margin:0}
.drrh-card .drrh-recognition{color:#334155;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.drrh-card button{margin-top:auto}
.drrh-reading,.drrh-study-shell,.drrh-quiz-shell{max-width:1180px;margin:0 auto;padding:34px 24px}
.drrh-learning-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.drrh-note{background:#fff;border:1px solid var(--drrh-line);border-radius:18px;padding:22px}
.drrh-note-wide{margin-top:18px}
.drrh-note h3{margin-top:0}
.drrh-note li{margin-bottom:8px}
.drrh-stain-list{display:grid;gap:10px}
.drrh-stain-item{padding:11px 12px;background:#f8fafc;border-radius:12px;border:1px solid #e2e8f0}
.drrh-stain-item b{display:block;color:#075985}
.drrh-muted{color:#64748b}
.drrh-flashcard{max-width:760px;min-height:390px;margin:24px auto;background:linear-gradient(135deg,#0c4a6e,#075985);border-radius:28px;padding:34px;color:#fff;cursor:pointer;box-shadow:0 22px 50px rgba(2,132,199,.18);display:flex;align-items:center;justify-content:center;text-align:center;position:relative}
.drrh-flashcard.is-flipped{background:#fff;color:#0f172a;border:2px solid #0ea5e9}
.drrh-flash-front h3,.drrh-flash-back h3{font-size:34px;margin:0 0 10px}
.drrh-flash-front p{color:#bae6fd}
.drrh-flash-back{display:none;max-width:620px}
.drrh-flashcard.is-flipped .drrh-flash-front{display:none}
.drrh-flashcard.is-flipped .drrh-flash-back{display:block}
.drrh-flash-back ul{text-align:left}
.drrh-center-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.drrh-quiz-card{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr);gap:20px;background:#fff;border:1px solid var(--drrh-line);border-radius:22px;padding:18px}
.drrh-quiz-media{min-height:380px;background:#0f172a;border-radius:16px;overflow:hidden;position:relative;display:flex;align-items:center;justify-content:center}
.drrh-quiz-media img{width:100%;height:100%;object-fit:contain;max-height:500px}
.drrh-image-skeleton{padding:24px;color:#94a3b8;text-align:center}
.drrh-image-source{position:absolute;left:8px;bottom:8px;right:8px;background:rgba(15,23,42,.78);color:#e2e8f0;font-size:11px;padding:6px 8px;border-radius:8px}
.drrh-image-source a{color:#fde047}
.drrh-quiz-content{padding:12px}
.drrh-quiz-clue{font-size:17px;color:#334155}
.drrh-options{display:grid;gap:10px;margin:18px 0}
.drrh-option{border:1px solid #cbd5e1;background:#fff;border-radius:12px;padding:12px;text-align:left;cursor:pointer;font-weight:750}
.drrh-option:hover{border-color:#38bdf8;background:#f0f9ff}
.drrh-option.is-correct{border-color:#86efac;background:#f0fdf4;color:#166534}
.drrh-option.is-wrong{border-color:#fca5a5;background:#fef2f2;color:#991b1b}
.drrh-score{font-size:22px;font-weight:900;color:#075985}
.drrh-feedback{border-radius:12px;padding:12px 14px;background:#f8fafc;border:1px solid var(--drrh-line);margin-bottom:12px}
.drrh-progress-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:18px}
.drrh-progress-summary article{background:#fff;border:1px solid var(--drrh-line);border-radius:16px;padding:18px}
.drrh-progress-summary strong{font-size:28px;color:#075985;display:block}
.drrh-progress-groups{display:grid;gap:10px}
.drrh-progress-row{background:#fff;border:1px solid var(--drrh-line);border-radius:14px;padding:14px}
.drrh-progress-row-head{display:flex;justify-content:space-between;gap:12px;margin-bottom:8px;font-weight:800}
.drrh-progress-bar{height:9px;background:#e2e8f0;border-radius:999px;overflow:hidden}
.drrh-progress-bar i{display:block;height:100%;background:#0ea5e9;border-radius:999px}
.drrh-modal{display:none;position:fixed;inset:0;z-index:999999}
.drrh-modal.is-open{display:block}
.drrh-modal-backdrop{position:absolute;inset:0;background:rgba(2,6,23,.72);backdrop-filter:blur(4px)}
.drrh-modal-card{position:absolute;inset:3vh 3vw;background:#fff;border-radius:24px;overflow:auto;box-shadow:0 30px 90px rgba(0,0,0,.3)}
.drrh-modal-close{position:sticky;top:10px;float:right;z-index:4;margin:12px 12px 0 0;width:40px;height:40px;border:0;border-radius:50%;background:#0f172a;color:#fff;font-size:28px;line-height:1;cursor:pointer}
.drrh-modal-head{display:flex;justify-content:space-between;gap:20px;padding:28px 34px 20px;border-bottom:1px solid var(--drrh-line);clear:both}
.drrh-modal-head h2{font-size:32px;margin:4px 0}
.drrh-modal-head p{margin:0;color:#64748b}
.drrh-modal-actions{display:flex;gap:8px;align-items:flex-start;flex-wrap:wrap}
.drrh-modal-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr)}
.drrh-viewer-wrap{padding:22px;background:#f8fafc;border-right:1px solid var(--drrh-line);min-width:0}
.drrh-viewer{background:#0f172a;border-radius:18px;overflow:hidden}
.drrh-viewer-stage{height:min(62vh,650px);position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;cursor:grab}
.drrh-viewer-stage:active{cursor:grabbing}
.drrh-viewer-stage img{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;user-select:none;transform-origin:center center;will-change:transform}
.drrh-viewer-controls{display:flex;align-items:center;gap:8px;padding:10px;background:#020617;border-top:1px solid #1e293b}
.drrh-viewer-controls button{border:1px solid #334155;background:#0f172a;color:#fff;border-radius:8px;padding:6px 10px;cursor:pointer}
.drrh-viewer-controls input{flex:1}
.drrh-structure-overlay{position:absolute;top:12px;right:12px;max-width:250px;background:rgba(255,255,255,.93);border:1px solid #bae6fd;border-radius:14px;padding:12px;color:#0f172a;box-shadow:0 10px 30px rgba(0,0,0,.15)}
.drrh-structure-overlay b{display:block;font-size:12px;color:#0369a1;margin-bottom:6px}
.drrh-structure-overlay span{display:inline-block;font-size:11px;font-weight:700;margin:2px;padding:4px 7px;border-radius:999px;background:#e0f2fe}
.drrh-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px;margin-top:10px}
.drrh-thumb{border:2px solid transparent;background:#fff;border-radius:10px;overflow:hidden;padding:0;cursor:pointer;aspect-ratio:4/3}
.drrh-thumb.is-active{border-color:#0ea5e9}
.drrh-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.drrh-commons-meta{margin-top:10px;font-size:12px;color:#64748b;min-height:20px}
.drrh-commons-meta a{color:#0369a1;font-weight:700}
.drrh-detail{padding:26px;display:flex;flex-direction:column;gap:20px}
.drrh-detail section{border-bottom:1px solid var(--drrh-line);padding-bottom:17px}
.drrh-detail section:last-child{border-bottom:0}
.drrh-detail h3{font-size:14px;text-transform:uppercase;letter-spacing:.05em;margin:0 0 8px;color:#475569}
.drrh-detail p{margin:0;color:#334155}
.drrh-spotlight{background:#fffbeb;border:1px solid #fde68a!important;border-radius:16px;padding:16px!important}
.drrh-spotlight span{font-size:11px;font-weight:900;letter-spacing:.12em;color:#92400e}
.drrh-spotlight p{font-weight:800!important;color:#422006!important}
.drrh-trap{background:#fff7ed;border:1px solid #fed7aa!important;border-radius:16px;padding:16px!important}
.drrh-chips{display:flex;gap:7px;flex-wrap:wrap}
.drrh-chips span{padding:6px 9px;border-radius:999px;background:#e0f2fe;color:#075985;font-size:12px;font-weight:800}
.drrh-source-note{font-size:12px}
body.drr-histology-focus header.site-header,
body.drr-histology-focus footer,
body.drr-histology-focus .site-footer,
body.drr-histology-focus #secondary,
body.drr-histology-focus .sidebar,
body.drr-histology-focus .widget-area{display:none!important}
body.drr-histology-focus .site-content,
body.drr-histology-focus main,
body.drr-histology-focus .content-area{width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
body.drr-histology-focus .drrh-app{border-radius:0;border:0;min-height:100vh}
.drrh-viewer:fullscreen{width:100vw;height:100vh;border-radius:0}
.drrh-viewer:fullscreen .drrh-viewer-stage{height:calc(100vh - 58px)}

@media (max-width:900px){
  .drrh-hero{align-items:flex-start;flex-direction:column}
  .drrh-stats{grid-template-columns:repeat(2,1fr)}
  .drrh-stats div:nth-child(2){border-right:0}
  .drrh-layout{grid-template-columns:1fr}
  .drrh-sidebar{border-right:0;border-bottom:1px solid var(--drrh-line);padding:14px}
  .drrh-group-list{flex-direction:row;overflow:auto}
  .drrh-group-btn{min-width:max-content}
  .drrh-learning-grid,.drrh-quiz-card,.drrh-modal-grid{grid-template-columns:1fr}
  .drrh-viewer-wrap{border-right:0;border-bottom:1px solid var(--drrh-line)}
  .drrh-progress-summary{grid-template-columns:1fr}
  .drrh-modal-card{inset:1vh 1vw}
}
@media (max-width:600px){
  .drrh-hero{padding:24px 18px}
  .drrh-stats div{padding:14px}
  .drrh-tabs{padding:8px}
  .drrh-toolbar{padding:12px;flex-direction:column}
  .drrh-atlas,.drrh-reading,.drrh-study-shell,.drrh-quiz-shell{padding:20px 14px}
  .drrh-card-grid{grid-template-columns:1fr}
  .drrh-section-head,.drrh-modal-head{align-items:flex-start;flex-direction:column}
  .drrh-modal-head{padding:22px 18px}
  .drrh-viewer-wrap,.drrh-detail{padding:14px}
  .drrh-viewer-stage{height:46vh}
  .drrh-flashcard{min-height:330px;padding:22px}
  .drrh-flash-front h3,.drrh-flash-back h3{font-size:26px}
}


/* ===== v1.1 laptop + theme compatibility fixes ===== */
#drr-histology-app{
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  font-size:14px;
}
#drr-histology-app .drrh-main{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
}
#drr-histology-app img{box-shadow:none!important}
.drrh-thumb.is-broken{opacity:.5;background:#e2e8f0}
.drrh-thumb.is-broken::after{content:"Gambar tidak tersedia";display:flex;align-items:center;justify-content:center;height:100%;padding:8px;font-size:10px;color:#64748b;text-align:center}

/* Laptop landscape: 1024–1600 px */
@media (min-width:901px) and (max-width:1600px){
  .drrh-hero{padding:18px 22px;gap:16px;align-items:center}
  .drrh-hero h1{font-size:36px;margin:5px 0 8px}
  .drrh-hero p{font-size:13px;line-height:1.45;max-width:760px}
  .drrh-hero-actions .drrh-btn{padding:8px 11px;font-size:12px}
  .drrh-stats div{padding:10px 16px}
  .drrh-stats strong{font-size:19px}
  .drrh-tabs{padding:7px 12px}
  .drrh-tabs button{padding:7px 12px;font-size:12px}
  .drrh-toolbar{padding:11px 14px}
  .drrh-layout{grid-template-columns:205px minmax(0,1fr);min-height:520px}
  .drrh-sidebar{padding:14px 11px;max-height:calc(100vh - 205px);overflow:auto}
  .drrh-sidebar h2{margin-bottom:7px}
  .drrh-group-list{gap:2px}
  .drrh-group-btn{padding:7px 8px;font-size:12px;gap:7px}
  .drrh-group-btn span:first-child{font-size:15px}
  .drrh-atlas{padding:16px}
  .drrh-section-head{margin-bottom:14px}
  .drrh-section-head h2{font-size:23px;margin:2px 0}
  .drrh-section-head p{font-size:12px;line-height:1.45}
  .drrh-card-grid{grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px}
  .drrh-card{border-radius:14px;padding:13px;gap:8px}
  .drrh-card h3{font-size:15px}
  .drrh-card p{font-size:11.5px;line-height:1.45}
  .drrh-card .drrh-tag,.drrh-card .drrh-done{font-size:9px}
  .drrh-btn{padding:8px 11px;font-size:12px}
  .drrh-reading,.drrh-study-shell,.drrh-quiz-shell{max-width:none;padding:20px}
  .drrh-note{padding:16px}
  .drrh-flashcard{min-height:300px;max-width:680px;margin:16px auto;padding:24px}
  .drrh-flash-front h3,.drrh-flash-back h3{font-size:27px}

  .drrh-modal-card{
    inset:10px!important;
    border-radius:16px;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  .drrh-modal-close{
    position:absolute;
    top:8px;
    right:8px;
    margin:0;
    width:34px;
    height:34px;
    font-size:22px;
  }
  .drrh-modal-head{
    flex:0 0 auto;
    padding:14px 50px 12px 18px;
    gap:12px;
    align-items:center;
  }
  .drrh-modal-head h2{font-size:24px;margin:1px 0}
  .drrh-modal-head p{font-size:11px}
  .drrh-modal-actions .drrh-btn{font-size:11px;padding:6px 8px}
  .drrh-modal-grid{
    flex:1 1 auto;
    min-height:0;
    overflow:hidden;
    grid-template-columns:minmax(0,1.45fr) minmax(310px,.55fr);
  }
  .drrh-viewer-wrap{
    min-height:0;
    overflow:auto;
    padding:12px;
  }
  .drrh-viewer{border-radius:12px}
  .drrh-viewer-stage{
    height:clamp(300px,calc(100vh - 285px),500px);
    min-height:300px;
  }
  .drrh-viewer-controls{padding:6px 8px}
  .drrh-gallery{
    grid-template-columns:repeat(6,minmax(80px,1fr));
    gap:6px;
    margin-top:7px;
  }
  .drrh-detail{
    min-height:0;
    overflow:auto;
    padding:15px;
    gap:12px;
  }
  .drrh-detail section{padding-bottom:10px}
  .drrh-detail h3{font-size:11px;margin-bottom:5px}
  .drrh-detail p{font-size:12px;line-height:1.45}
  .drrh-spotlight,.drrh-trap{padding:11px!important}
  .drrh-chips{gap:4px}
  .drrh-chips span{padding:4px 7px;font-size:10px}
  .drrh-structure-overlay{max-width:210px;padding:9px}
  .drrh-structure-overlay span{font-size:9px;padding:3px 5px}
  .drrh-quiz-card{padding:12px;gap:14px}
  .drrh-quiz-media{min-height:300px}
}

/* Narrow laptop / tablet landscape */
@media (min-width:901px) and (max-width:1180px){
  .drrh-layout{grid-template-columns:180px minmax(0,1fr)}
  .drrh-group-btn{font-size:11px}
  .drrh-card-grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}
  .drrh-modal-grid{grid-template-columns:minmax(0,1.25fr) minmax(290px,.75fr)}
  .drrh-gallery{grid-template-columns:repeat(4,minmax(75px,1fr))}
}

/* Short laptop screens */
@media (min-width:901px) and (max-height:760px){
  .drrh-hero{padding-top:12px;padding-bottom:12px}
  .drrh-hero h1{font-size:30px}
  .drrh-stats div{padding-top:7px;padding-bottom:7px}
  .drrh-viewer-stage{height:calc(100vh - 250px);min-height:260px}
  .drrh-gallery{grid-template-columns:repeat(6,minmax(70px,1fr))}
}
