/* Kandidat responsif: dimuat setelah seluruh stylesheet halaman.
   ID phone dipertahankan untuk kompatibilitas sheet/CRUD yang sudah ada. */
:root{padding:0}
body{background:var(--bg);overflow:hidden}
.stage{position:fixed;inset:0;display:block;width:100%;height:100%}
.phone.app-shell{width:100%;height:100%;height:100dvh;min-height:0;border:0;border-radius:0;box-shadow:none;overflow:hidden;isolation:isolate}
.app-shell>.screen{min-width:0;min-height:0;scrollbar-width:thin;scrollbar-color:var(--line) transparent;padding-top:max(14px,env(safe-area-inset-top,0px));padding-left:max(18px,env(safe-area-inset-left,0px));padding-right:max(18px,env(safe-area-inset-right,0px));overscroll-behavior-y:contain}
.app-shell>.screen::-webkit-scrollbar{display:block;width:7px}
.app-shell>.screen::-webkit-scrollbar-thumb{background:var(--line);border-radius:8px}
.app-shell.auth-shell>.screen{padding-bottom:max(28px,env(safe-area-inset-bottom,0px))}
.web-brand,.web-nav-heading,.web-account{display:none}
.skip-link{position:absolute;left:12px;top:8px;transform:translateY(-160%);z-index:100;background:var(--gold);color:#3a2a00;padding:12px 16px;border-radius:10px;font-weight:700}
.skip-link:focus{transform:none}
.app-shell>.toast{white-space:normal;overflow-wrap:anywhere;text-align:center;width:max-content}
.app-shell .sheet{padding-bottom:max(22px,env(safe-area-inset-bottom,0px))}
/* Short mobile/landscape viewports still leave room for scrollable content. */
@media(max-width:899px){
  .app-shell>.nav{padding-left:max(8px,env(safe-area-inset-left,0px));padding-right:max(8px,env(safe-area-inset-right,0px))}
  .academic-page{padding-left:0;padding-right:0}
}
@media(max-width:350px){
  .app-shell>.screen{padding-left:max(12px,env(safe-area-inset-left,0px));padding-right:max(12px,env(safe-area-inset-right,0px))}
  .app-shell>.nav{padding-left:3px;padding-right:3px}
  .management-tab{min-width:96px}
  .record-item{flex-wrap:wrap}
  .record-actions{width:100%;flex-direction:row;justify-content:flex-end;flex-wrap:wrap}
}
/* Tablets use the available width without changing the familiar bottom menu. */
@media(min-width:600px){
  .admin-dashboard .admin-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
  .admin-dashboard .admin-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* PC workspace: one existing nav becomes a sidebar; no duplicate controls. */
@media(min-width:900px){
  .phone.app-shell.has-nav{display:grid;grid-template-columns:240px minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
  .app-shell.has-nav>.screen{grid-column:2;grid-row:1;padding:28px max(32px,calc((100% - 1280px)/2)) 40px}
  .app-shell>.nav{grid-column:1;grid-row:1;min-height:0;border:0;border-right:1px solid var(--line);padding:28px 16px 18px;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:7px;overflow-y:auto;z-index:10}
  .web-brand{display:flex;align-items:center;gap:11px;color:var(--ink);text-decoration:none;font-family:'Bricolage Grotesque',sans-serif;font-weight:800;font-size:18px;line-height:1.2;padding:0 5px 28px}
  .web-brand-mark{display:grid;place-items:center;flex:none;width:40px;height:44px;background:var(--teal);color:#fff;border-radius:13px}
  .web-brand small{display:block;font:500 11px/1.5 'Plus Jakarta Sans',sans-serif;color:var(--muted);margin-top:5px}
  .web-nav-heading{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.12em;color:var(--muted);font-weight:700;padding:0 14px 8px}
  .app-shell>.nav .nb{flex:none;flex-direction:row;justify-content:flex-start;gap:12px;min-height:48px;border-radius:13px;padding:8px 12px;font-size:13px;font-weight:600;text-align:left}
  .app-shell>.nav .nb .pill{width:30px;height:30px;flex:none;background:none}
  .app-shell>.nav .nb.on{background:var(--mint);color:var(--ink);font-weight:800}
  .app-shell>.nav .nb:hover{background:color-mix(in srgb,var(--mint) 55%,var(--card))}
  .app-shell>.nav .fab{order:1;width:100%;height:48px;min-height:48px;margin:18px 0 8px;border:0;border-radius:13px;box-shadow:none;gap:8px;display:flex;align-items:center;justify-content:center}
  .app-shell>.nav .fab::after{content:'Tambah materi';font-size:12px;font-weight:800}
  .web-account{order:2;margin-top:auto;border-top:1px solid var(--line);padding:18px 4px 0;display:flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;min-width:0}
  .web-account>span:last-child{min-width:0}
  .web-account strong{display:block;font-size:12px;overflow-wrap:anywhere}
  .web-account small{display:block;font-size:10px;color:var(--muted);margin-top:4px}
  .academic-status{margin-bottom:24px;color:var(--muted);border:1px solid var(--line);background:var(--card);border-radius:12px}
  .admin-dashboard,.admin-management,.admin-assignments,.academic-page{max-width:none;margin:0;padding:0 0 32px}
  .admin-dashboard .admin-hero h1{font-size:38px}
  .admin-dashboard .admin-lede{font-size:14px;max-width:620px}
  .admin-dashboard .admin-hero{margin-bottom:24px}
  .admin-dashboard .admin-stats{gap:16px}
  .admin-dashboard .admin-stat{padding:22px;border-radius:20px}
  .admin-dashboard .admin-stat strong{font-size:32px}
  .admin-dashboard .admin-shortcut{padding:18px}
  .admin-dashboard .admin-tools{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:26px}
  .admin-dashboard .admin-tool-link{margin-top:0;flex:none}
  .admin-management .management-tab{flex:0 1 190px}
  .admin-management .field-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .admin-management #excel-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:20px}
  .admin-management #excel-tools>.section-heading,.admin-management #excel-tools>.section-note{grid-column:1/-1}
  .admin-management .record-item{padding:16px}
  .admin-assignments .filter-form{grid-template-columns:repeat(3,minmax(0,1fr)) auto}
  .admin-assignments .filter-form .field:nth-child(3){grid-column:auto}
  .assignments{padding-bottom:32px}
  .assignments .assign-filters{grid-template-columns:minmax(160px,1.5fr) repeat(3,minmax(0,1fr)) auto}
  .assignments .assign-filters>input,.assignments .assign-filters>button{grid-column:auto}
  .assignments .assign-form,.assignments .grade-form{max-width:900px}
  .app-shell .hs{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:16px;margin:0;padding:2px 0 12px;overflow:visible}
  .app-shell .hs .card{width:100%;min-width:0}
  .app-shell .chips{flex-wrap:wrap;overflow:visible}
  .app-shell #list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .app-shell #list>.row{margin-bottom:0}
  .app-shell .hero{padding:30px;min-height:190px}
  .app-shell .hero h2{font-size:30px}
  .app-shell .who b{max-width:none}
  .app-shell .simp canvas{height:340px}
  .app-shell .viewer{left:240px}
  .app-shell .sheet{position:fixed;left:50%;right:auto;top:50%;bottom:auto;width:min(600px,calc(100vw - 64px));max-height:calc(100dvh - 64px);padding:24px;border-radius:24px;transform:translate(-50%,calc(50vh + 100%));visibility:hidden;scrollbar-width:thin}
  .app-shell.open-sheet .sheet{transform:translate(-50%,-50%);visibility:visible}
  .app-shell .sheet .grab{display:none}
  .app-shell .scrim{position:fixed}
  .app-shell>.toast{left:calc(50% + 120px);bottom:28px;max-width:calc(100% - 280px)}
  .app-shell.auth-shell>.screen{width:100%;max-width:1000px;margin:auto;flex:none;max-height:100%;padding:48px 32px;overflow-y:auto}
  body[data-auth="0"] .auth-shell>.screen{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:36px}
  body[data-auth="0"] .auth-shell .hero{min-height:420px!important;height:100%;padding:40px;display:flex!important;align-items:center}
  body[data-auth="0"] .auth-shell .hero h2{font-size:42px;line-height:1.1}
  body[data-auth="0"] .auth-shell .hero p{font-size:15px}
  body[data-auth="0"] .auth-shell .lgf{margin:0;padding:28px}
  .auth-shell>.toast{left:50%;max-width:90%}
}
@media(min-width:1200px){
  .admin-dashboard .admin-shortcuts{grid-template-columns:repeat(3,minmax(0,1fr))}
  .admin-management .field-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* FAB adalah tautan menuju kontrol tambah materi yang sudah ada. */
.app-shell .fab{text-decoration:none}

/* Perapian guru di HP; seluruh selector dibatasi peran dan viewport. */
@media(max-width:899px){
  body[data-role="guru"] .app-shell>.screen{padding-top:max(12px,env(safe-area-inset-top,0px));padding-bottom:24px;scroll-padding-block:16px;scrollbar-width:none}
  body[data-role="guru"] .app-shell>.screen::-webkit-scrollbar{display:none}
  body[data-role="guru"] .academic-status{border:1px solid var(--line);border-radius:12px;background:var(--card);line-height:1.6;margin-bottom:12px}
  body[data-role="guru"] .academic-context{background:var(--card);border-radius:14px!important;margin:12px 0 16px!important;padding:12px!important}
  body[data-role="guru"] .academic-context form{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:8px!important}
  body[data-role="guru"] .academic-context label{grid-column:1/-1;font-weight:700;color:var(--muted)}
  body[data-role="guru"] .academic-context select{min-width:0;max-width:100%;width:100%;height:44px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--ink);padding:0 9px;font:inherit;font-size:16px}
  body[data-role="guru"] .academic-context button{min-height:44px;padding:0 12px;border-radius:10px;background:var(--mint);font-weight:700}
  body[data-role="guru"] .top{gap:10px;align-items:center;margin-bottom:16px}
  body[data-role="guru"] .who{min-width:0;flex:1;gap:9px}
  body[data-role="guru"] .who .av{flex:none;width:44px;height:44px}
  body[data-role="guru"] .who>div{min-width:0}
  body[data-role="guru"] .who b{display:block;font-size:14px;line-height:1.4;overflow-wrap:anywhere}
  body[data-role="guru"] .who small{font-size:10px;line-height:1.6}
  body[data-role="guru"] .top>div:not(.who){flex:none;gap:6px!important}
  body[data-role="guru"] .ib{min-width:44px;min-height:44px;flex:none}
  body[data-role="guru"] .top h1{min-width:0;overflow-wrap:anywhere}
  body[data-role="guru"] a.row,body[data-role="guru"] a.card{color:var(--ink);text-decoration:none}
  body[data-role="guru"] a.gold,body[data-role="guru"] a.nb{text-decoration:none}
  body[data-role="guru"] .sec{gap:12px;margin-top:22px}
  body[data-role="guru"] .sec h3{min-width:0;font-size:17px;overflow-wrap:anywhere}
  body[data-role="guru"] .sec>a,body[data-role="guru"] .rm>a{color:var(--ink);font-size:12px;font-weight:700;text-underline-offset:3px}
  body[data-role="guru"] .sec>a{min-height:44px;display:inline-flex;align-items:center;flex:none}
  body[data-role="guru"] .sec button,body[data-role="guru"] .gold{min-height:44px;justify-content:center;flex-shrink:0}
  body[data-role="guru"] .hero{border-radius:22px;min-height:0;padding:20px;margin-top:16px}
  body[data-role="guru"] .hero h2{font-size:24px;line-height:1.18;margin:10px 0 8px;overflow-wrap:anywhere}
  body[data-role="guru"] .hero p{font-size:12px;line-height:1.65;max-width:40ch;margin-bottom:14px}
  body[data-role="guru"] .hero .gold{font-size:13px}
  body[data-role="guru"] .stats{gap:9px;margin-top:12px}
  body[data-role="guru"] .stat{min-width:0;padding:14px 12px;border:1px solid var(--line);border-radius:16px;box-shadow:none}
  body[data-role="guru"] .stat b{font-size:23px;overflow-wrap:anywhere}
  body[data-role="guru"] .stat span{display:block;font-size:11px;margin-top:5px}
  body[data-role="guru"] .row{gap:11px;padding:12px;border-radius:17px;min-height:80px}
  body[data-role="guru"] .cov{width:50px;height:50px;border-radius:14px}
  body[data-role="guru"] .rm b{white-space:normal;overflow-wrap:anywhere;line-height:1.45}
  body[data-role="guru"] .rm span{line-height:1.65}
  body[data-role="guru"] .card{border-radius:18px}
  body[data-role="guru"] .card b{overflow-wrap:anywhere;line-height:1.4}
  body[data-role="guru"] .card .cv{height:80px}
  body[data-role="guru"] .chip{min-height:44px}
  body[data-role="guru"] .chips{padding-block:4px;overscroll-behavior-x:contain}
  body[data-role="guru"] .chips.wrap .chip{height:auto;white-space:normal;padding-block:10px;overflow-wrap:anywhere;max-width:100%}
  body[data-role="guru"] .seg{margin-bottom:12px}
  body[data-role="guru"] .seg a{min-width:0;min-height:44px;font-size:12px;text-align:center}
  body[data-role="guru"] .del{width:44px;height:44px}
  body[data-role="guru"] .del.wide{width:100%}
  body[data-role="guru"] .rwrap .del{margin-top:18px}
  body[data-role="guru"] .srow{align-items:flex-start;padding:13px 12px;flex-wrap:wrap}
  body[data-role="guru"] .srow .rm{flex:1 1 150px;overflow-wrap:anywhere}
  body[data-role="guru"] .srow .acts{display:flex;gap:6px;margin-left:auto;flex:none}
  body[data-role="guru"] .pwv{overflow-wrap:anywhere}
  body[data-role="guru"] .frm input,body[data-role="guru"] .frm select,body[data-role="guru"] .frm textarea,
  body[data-role="guru"] .sheet input,body[data-role="guru"] .sheet select,body[data-role="guru"] .sheet textarea,
  body[data-role="guru"] .assign-form input,body[data-role="guru"] .assign-form select,body[data-role="guru"] .assign-form textarea,
  body[data-role="guru"] .grade-form input,body[data-role="guru"] .grade-form textarea,
  body[data-role="guru"] .assign-filters input,body[data-role="guru"] .assign-filters select{min-width:0;max-width:100%;font-size:16px;min-height:46px}
  body[data-role="guru"] input[type="checkbox"]{min-height:0}
  body[data-role="guru"] .sheet{max-height:calc(100% - 24px);padding:12px 18px max(24px,env(safe-area-inset-bottom,0px));overscroll-behavior-y:contain;scroll-padding-block:18px}
  body[data-role="guru"] .sheet select[multiple]{min-height:120px}
  body[data-role="guru"] .primary{min-height:48px}
  body[data-role="guru"] .sheet h3,body[data-role="guru"] .sheet p{overflow-wrap:anywhere}
  body[data-role="guru"] .assignments{padding-bottom:8px;min-width:0}
  body[data-role="guru"] .assign-head{align-items:center;flex-wrap:wrap;gap:12px}
  body[data-role="guru"] .assign-head h1{font-size:26px;overflow-wrap:anywhere}
  body[data-role="guru"] .assign-head .timezone{margin:5px 0 0}
  body[data-role="guru"] .btn{min-height:44px}
  body[data-role="guru"] .assignments .assign-filters{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px;background:var(--card);border:1px solid var(--line);border-radius:17px;gap:9px}
  body[data-role="guru"] .assign-card,body[data-role="guru"] .detail-hero,body[data-role="guru"] .grade-panel{padding:16px;border:1px solid var(--line);box-shadow:none;min-width:0}
  body[data-role="guru"] .assign-card-head{display:flex;align-items:flex-start;flex-wrap:wrap;gap:9px}
  body[data-role="guru"] .assign-card-head>a,body[data-role="guru"] .assign-card-head>div{flex:1 1 180px;min-width:0}
  body[data-role="guru"] .assign-card-head .assign-status{margin:0}
  body[data-role="guru"] .assign-card h2,body[data-role="guru"] .detail-hero h1,body[data-role="guru"] .assign-meta,
  body[data-role="guru"] .assign-sub,body[data-role="guru"] .submission-files a{overflow-wrap:anywhere}
  body[data-role="guru"] .assign-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  body[data-role="guru"] .assign-summary span{font-size:11px;line-height:1.5}
  body[data-role="guru"] .assign-actions,body[data-role="guru"] .form-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  body[data-role="guru"] .assign-actions>.btn,body[data-role="guru"] .assign-actions>form,body[data-role="guru"] .form-actions>.btn{width:100%;min-width:0;white-space:normal;text-align:center}
  body[data-role="guru"] .assign-actions form .btn{width:100%}
  body[data-role="guru"] .form-actions>.primary{grid-column:1/-1}
  body[data-role="guru"] .assign-form{gap:9px}
  body[data-role="guru"] .assign-form textarea{min-height:170px}
  body[data-role="guru"] .filter-chips{padding:3px 0 6px;overscroll-behavior-x:contain}
  body[data-role="guru"] .filter-chips .btn{flex:none}
  body[data-role="guru"] .student-main{overflow-wrap:anywhere}
  body[data-role="guru"] .student-state{min-width:0;flex:0 1 40%;overflow-wrap:anywhere;line-height:1.6}
  body[data-role="guru"] .pcard h2,body[data-role="guru"] .pcard .note{overflow-wrap:anywhere}
  body[data-role="guru"] .app-shell>.nav{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));align-items:center;gap:2px;padding:8px max(6px,env(safe-area-inset-right,0px)) max(10px,env(safe-area-inset-bottom,0px)) max(6px,env(safe-area-inset-left,0px));box-shadow:0 -4px 20px rgba(15,46,44,.04)}
  body[data-role="guru"] .app-shell>.nav .nb{min-width:0;min-height:50px;justify-content:center;gap:4px;font-size:10px;line-height:1.3;border-radius:12px}
  body[data-role="guru"] .app-shell>.nav .nb .pill{width:40px;height:28px}
  body[data-role="guru"] .app-shell>.nav .fab{width:44px;height:44px;min-width:44px;margin:0;justify-self:center;align-self:center;border:0;border-radius:14px;box-shadow:0 3px 8px rgba(244,185,62,.2)}
}
@media(max-width:359px){
  body[data-role="guru"] .app-shell>.screen{padding-inline:12px}
  body[data-role="guru"] .who b{font-size:12px}
  body[data-role="guru"] .who .av{width:36px;min-height:44px;border-radius:12px}
  body[data-role="guru"] .who{gap:6px}
  body[data-role="guru"] .hero h2{font-size:22px}
  body[data-role="guru"] .hero{padding:18px}
  body[data-role="guru"] .assignments .assign-filters{grid-template-columns:minmax(0,1fr)}
  body[data-role="guru"] .assign-actions{grid-template-columns:minmax(0,1fr)}
  body[data-role="guru"] .student-row{flex-wrap:wrap}
  body[data-role="guru"] .student-state{flex-basis:100%;text-align:left}
}

@media(max-width:899px){
  body[data-role="guru"] .sec .gold{color:#3a2a00}
}

@media(max-width:899px){
  body[data-role="guru"] .hs{margin-inline:0;padding-inline:0;overscroll-behavior-x:contain}
}

@media(max-width:899px){
  body[data-role="guru"] .sheet .rmchk{display:flex;align-items:center;gap:10px}
  body[data-role="guru"] .sheet .rmchk input[type="checkbox"]{width:20px;height:20px;min-height:20px;flex:none;margin:0;padding:0}
  body[data-role="guru"] .sheet .rmchk span{flex:1;min-width:0}
}

/* Kandidat revisi: tambah konten guru, terpisah dari pengelolaan data admin. */
body[data-role="guru"] .teacher-add-dialog{position:fixed;inset:0;width:min(480px,calc(100vw - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:22px;background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:24px;box-shadow:0 24px 80px rgba(0,0,0,.24);overflow-y:auto;overscroll-behavior:contain}
body[data-role="guru"] .teacher-add-dialog::backdrop{background:rgba(6,24,22,.62)}
body[data-role="guru"] .teacher-add-heading{display:flex;align-items:flex-start;gap:12px;justify-content:space-between;margin-bottom:20px}
body[data-role="guru"] .teacher-add-heading>div{min-width:0}
body[data-role="guru"] .teacher-add-heading h2{font-size:23px;line-height:1.2;margin:0 0 8px;overflow-wrap:anywhere}
body[data-role="guru"] .teacher-add-heading p{font-size:12px;line-height:1.6;color:var(--muted);margin:0}
body[data-role="guru"] .teacher-add-heading .ib{min-width:44px;min-height:44px;flex:none;font-size:26px}
body[data-role="guru"] .teacher-add-choices{display:grid;gap:10px}
body[data-role="guru"] .teacher-add-choices a{display:flex;align-items:center;gap:12px;min-height:76px;padding:13px 12px;border:1px solid var(--line);border-radius:16px;color:var(--ink);background:var(--bg);text-decoration:none}
body[data-role="guru"] .teacher-add-choices a>span:nth-child(2){flex:1;min-width:0}
body[data-role="guru"] .teacher-add-choices b{display:block;font-size:15px;line-height:1.5;overflow-wrap:anywhere}
body[data-role="guru"] .teacher-add-choices small{display:block;font-size:11px;line-height:1.6;color:var(--muted);margin-top:2px}
body[data-role="guru"] .add-choice-icon{display:grid;place-items:center;flex:none;width:44px;height:44px;border-radius:13px;background:var(--mint);color:var(--ink)}
body[data-role="guru"] .teacher-add-choices a:nth-child(2) .add-choice-icon{background:var(--gold);color:#3a2a00}
body[data-role="guru"] .teacher-add-choices a:focus-visible,body[data-role="guru"] #teacher-add-button:focus-visible{outline:3px solid var(--teal2);outline-offset:3px}
body[data-role="guru"] .teacher-content-form{max-width:640px;margin-top:20px;padding-bottom:24px}
body[data-role="guru"] .teacher-content-form .content-check{display:flex;align-items:center;gap:10px;line-height:1.6}
body[data-role="guru"] .teacher-content-form .content-check input{width:20px;height:20px;min-height:20px;margin:0;padding:0;flex:none}
body[data-role="guru"] .content-error{border:1px solid var(--coral);padding:14px;border-radius:14px;margin-top:16px;font-size:13px;line-height:1.6}
body[data-role="guru"] .content-error ul{margin:8px 0 0;padding-left:20px}
@media(max-width:899px){
  body[data-role="guru"] .app-shell>.nav{grid-template-columns:repeat(5,minmax(0,1fr))}
  body[data-role="guru"] #nav .nb[data-tab="home"]{order:0}
  body[data-role="guru"] #nav .nb[data-tab="materi"]{order:1}
  body[data-role="guru"] #nav .fab{order:2}
  body[data-role="guru"] #nav .nb[aria-label="Tugas"]{order:3}
  body[data-role="guru"] #nav .nb[data-tab="lab"]{order:4}
  body[data-role="guru"] .teacher-add-dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);margin:auto auto max(12px,env(safe-area-inset-bottom,0px));inset:auto 0 0;border-radius:24px;padding:20px}
}
@media(min-width:900px){body[data-role="guru"] .app-shell>.nav .fab::after{content:'Tambah konten'}}
@media(max-width:359px){
  body[data-role="guru"] .teacher-add-heading h2{font-size:21px}
  body[data-role="guru"] .teacher-add-dialog{padding:17px}
  body[data-role="guru"] .teacher-add-choices a{gap:9px;padding:11px}
}

/* Revisi 3: identitas beranda guru menggantikan blok tahun ajaran. */
body[data-role="guru"] .teacher-home-header .who{align-items:flex-start;flex:1;min-width:0}
body[data-role="guru"] .teacher-home-header .av{display:grid;place-items:center;text-decoration:none;color:var(--ink);flex:none}
body[data-role="guru"] .teacher-home-header .teacher-identity{flex:1;min-width:0}
body[data-role="guru"] .teacher-home-header .teacher-identity b{display:block;max-width:none;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.45;margin:2px 0}
body[data-role="guru"] .teacher-home-header .teacher-identity .teacher-identity-meta{display:block;font-size:11px;line-height:1.6;overflow-wrap:anywhere;color:var(--muted)}
body[data-role="guru"] #teacher-profile-link:focus-visible{outline:3px solid var(--teal2);outline-offset:3px}
@media(max-width:359px){body[data-role="guru"] .teacher-home-header .teacher-identity .teacher-identity-meta{font-size:10px}}
body[data-role="guru"] .teacher-home-header #teacher-profile-link{min-width:44px;min-height:44px}

/* Revisi 4: kartu identitas guru, nama tampilan mandiri, ikon menu mobile. */
body[data-role="guru"] .teacher-home-header{display:flex;flex-direction:column;align-items:stretch;gap:17px;padding:16px;border:1px solid var(--line);border-radius:24px;background:radial-gradient(ellipse at 100% 100%,color-mix(in srgb,var(--mint) 65%,transparent),transparent 65%),var(--card);box-shadow:0 8px 28px -22px rgba(15,46,44,.36);margin:2px 0 18px}
body[data-role="guru"] .teacher-home-header>.teacher-header-topline{display:flex;flex:none;align-items:center;justify-content:space-between;gap:12px!important;width:100%}
body[data-role="guru"] .teacher-space-label{display:flex;align-items:center;gap:7px;font-size:10px;font-weight:800;letter-spacing:.13em;text-transform:uppercase;color:var(--muted)}
body[data-role="guru"] .teacher-space-label i{width:6px;height:6px;background:var(--teal2);border-radius:50%;flex:none}
body[data-role="guru"] .teacher-header-actions{display:flex;align-items:center;gap:7px}
body[data-role="guru"] .teacher-header-actions .ib{border:1px solid var(--line);background:var(--card);box-shadow:none;border-radius:14px;width:44px;height:44px}
body[data-role="guru"] .teacher-home-header .who{display:flex;align-items:center;gap:14px;min-width:0;width:100%}
body[data-role="guru"] .teacher-home-header #teacher-profile-link{position:relative;width:58px;height:64px;min-width:58px;background:linear-gradient(145deg,#FAD67D,#F4B93E);color:#3a2a00;border:2px solid color-mix(in srgb,var(--card) 65%,transparent);border-radius:19px;font-size:24px;box-shadow:0 8px 20px -14px rgba(180,125,12,.8);overflow:visible}
body[data-role="guru"] .teacher-avatar-edit{position:absolute;bottom:-5px;right:-5px;display:grid;place-items:center;width:23px;height:23px;border:2px solid var(--card);border-radius:9px;color:var(--heroink);background:var(--teal)}
body[data-role="guru"] .teacher-home-header .teacher-identity>small:first-child{font-size:11px;letter-spacing:.01em;line-height:1.5}
body[data-role="guru"] .teacher-home-header .teacher-identity b{font-family:'Bricolage Grotesque',sans-serif;font-size:21px;font-weight:800;line-height:1.2;letter-spacing:-.025em;margin:4px 0 7px}
body[data-role="guru"] .teacher-home-header .teacher-identity .teacher-identity-meta{font-size:10px;line-height:1.6;letter-spacing:.01em}
body[data-role="guru"] .teacher-home-header .teacher-identity .teacher-year-badge{display:inline-flex;align-items:center;gap:5px;max-width:100%;font-size:10px;line-height:1.5;margin-top:6px;padding:4px 8px;background:var(--mint);color:var(--ink);border-radius:8px}
body[data-role="guru"] .teacher-year-badge i{width:5px;height:5px;border-radius:50%;background:var(--teal2);flex:none}
body[data-role="guru"] .teacher-name-card{border:1px solid var(--line);border-radius:21px;background:var(--card);padding:18px;margin:0 0 16px;max-width:720px}
body[data-role="guru"] .teacher-name-heading{display:flex;align-items:flex-start;gap:12px;margin-bottom:18px}
body[data-role="guru"] .teacher-name-heading>span{display:grid;place-items:center;width:42px;height:42px;background:var(--mint);border-radius:13px;flex:none}
body[data-role="guru"] .teacher-name-heading h2{font-size:18px;line-height:1.3;margin:0 0 5px;font-weight:800}
body[data-role="guru"] .teacher-name-heading p,body[data-role="guru"] .teacher-name-hint{font-size:11px;line-height:1.65;color:var(--muted);margin:0}
body[data-role="guru"] #profile-name-form input{min-width:0;width:100%;font-size:16px;min-height:48px}
body[data-role="guru"] .teacher-name-hint{margin:8px 0 15px}
body[data-role="guru"] .teacher-name-error{font-size:12px;line-height:1.6;color:var(--coral);margin:8px 0 15px}
body[data-role="guru"] #profile-name-form .primary{width:100%;min-height:48px;border-radius:13px}
.teacher-nav-mobile{display:none}
.teacher-nav-desktop{display:inline-flex;align-items:center;justify-content:center}
@media(max-width:899px){
  body[data-role="guru"] .teacher-nav-desktop{display:none}
  body[data-role="guru"] .teacher-nav-mobile{display:inline-flex;align-items:center;justify-content:center}
  body[data-role="guru"] .teacher-nav-icon{width:25px;height:25px;flex:none}
  body[data-role="guru"] .teacher-nav-icon .nav-icon-tint{fill:currentColor;opacity:.13}
  body[data-role="guru"] #nav .nb{gap:4px;color:var(--muted);font-weight:600}
  body[data-role="guru"] #nav .nb .pill{width:46px;height:31px;border-radius:12px;transition:background-color .16s ease,color .16s ease}
  body[data-role="guru"] #nav .nb.on{color:var(--ink);font-weight:800}
  body[data-role="guru"] #nav .nb.on .pill{background:var(--mint);color:var(--ink)}
  body[data-role="guru"] #nav .nb.on .nav-icon-tint{opacity:.2}
  body[data-role="guru"] #nav .fab{width:50px;height:50px;min-width:44px;min-height:44px;border:1px solid rgba(180,125,12,.12);border-radius:18px;background:linear-gradient(145deg,#FAD67D,#F4B93E);color:#3a2a00;box-shadow:0 6px 15px -9px rgba(180,125,12,.7)}
  body[data-role="guru"] #nav .nb:focus-visible{outline:3px solid var(--teal2);outline-offset:-3px;border-radius:12px}
}
@media(max-width:359px){
  body[data-role="guru"] .teacher-home-header{padding:14px;border-radius:21px;gap:14px}
  body[data-role="guru"] .teacher-home-header .who{gap:12px}
  body[data-role="guru"] .teacher-home-header #teacher-profile-link{width:50px;min-width:50px;height:58px;border-radius:17px}
  body[data-role="guru"] .teacher-home-header .teacher-identity b{font-size:19px}
  body[data-role="guru"] .teacher-home-header .teacher-identity .teacher-identity-meta{font-size:9px}
  body[data-role="guru"] #nav .nb .pill{width:42px}
}
@media(min-width:900px){
  body[data-role="guru"] .teacher-home-header{padding:20px 24px;gap:16px}
  body[data-role="guru"] .teacher-home-header .teacher-identity b{font-size:28px}
  body[data-role="guru"] #profile-name-form .primary{width:auto;min-width:160px}
}
@media(prefers-reduced-motion:reduce){body[data-role="guru"] #nav .nb .pill{transition:none}}
body[data-role="guru"] .teacher-year-badge::before{content:'';width:5px;height:5px;border-radius:50%;background:var(--teal2);flex:none}
body[data-role="guru"] .pcard h2{overflow-wrap:anywhere}
