/* V478 — compact room status, reliable teacher journal and cosmetic controls. */
/* Room occupancy: each grid cell is one number, its colour is the status.
   Full detail remains accessible via click/keyboard without crowding the grid. */
.v471-rooms .v471-room-grid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(74px,1fr))!important;gap:8px!important;align-items:start!important;overflow:visible!important}
.v471-rooms .v478-room-tile{position:relative!important;display:block!important;min-width:0!important;min-height:58px!important;padding:0!important;border-radius:12px!important;background:rgba(51,65,85,.26)!important;box-sizing:border-box;overflow:visible!important}
.v471-rooms .v478-room-tile[hidden]{display:none!important}
.v471-rooms .v478-room-tile.state-free{background:rgba(22,163,74,.24)!important;border:1px solid rgba(74,222,128,.72)!important}
.v471-rooms .v478-room-tile.state-busy{background:rgba(220,38,38,.26)!important;border:1px solid rgba(248,113,113,.75)!important}
.v471-rooms .v478-room-tile.state-conflict{background:rgba(220,38,38,.37)!important;border:2px solid #f87171!important}
.v471-rooms .v478-room-tile.state-restricted,.v471-rooms .v478-room-tile.state-unknown{background:rgba(107,114,128,.20)!important;border:1px dashed rgba(148,163,184,.7)!important}
.v471-rooms .v478-room-number{list-style:none;min-height:58px;width:100%;display:grid;place-items:center;cursor:pointer;outline-offset:3px;user-select:none}
.v471-rooms .v478-room-number::-webkit-details-marker{display:none}
.v471-rooms .v478-room-number strong{font-size:19px!important;line-height:1!important;letter-spacing:-.02em;color:var(--text)!important}
.v471-rooms .v478-room-tile.state-free .v478-room-number strong{color:#86efac!important}
.v471-rooms .v478-room-tile.state-busy .v478-room-number strong,.v471-rooms .v478-room-tile.state-conflict .v478-room-number strong{color:#fecaca!important}
.v471-rooms .v478-room-number:focus-visible{outline:2px solid #93c5fd;border-radius:12px}
.v471-rooms .v478-room-info{position:absolute;top:calc(100% + 7px);left:0;z-index:150;width:min(300px,calc(100vw - 56px));padding:13px;display:grid;gap:9px;text-align:left;background:#121b30;border:1px solid rgba(148,163,184,.5);border-radius:14px;box-shadow:0 18px 38px rgba(0,0,0,.4);color:#f8fafc;box-sizing:border-box}
.v471-rooms .v478-room-tile:not([open]) .v478-room-info{display:none}
.v471-rooms .v478-room-info-title{font-size:13px}
.v471-rooms .v478-room-info .v471-room-lessons{gap:9px}
.v471-rooms .v478-room-info .v471-room-lesson{border-top:1px solid rgba(148,163,184,.16);padding-top:7px}
.v471-rooms .v478-room-info .v471-room-lesson span{color:#cbd5e1}
.v471-rooms .v478-room-info .v471-room-lesson small{color:#94a3b8}
.v471-rooms .v478-room-tile[open]{z-index:151}
html[data-theme="light"] .v471-rooms .v478-room-tile.state-free{background:#dcfce7!important}html[data-theme="light"] .v471-rooms .v478-room-tile.state-busy{background:#fee2e2!important}
html[data-theme="light"] .v471-rooms .v478-room-tile.state-free strong{color:#166534!important}html[data-theme="light"] .v471-rooms .v478-room-tile.state-busy strong{color:#991b1b!important}
@media(max-width:760px){.v471-rooms .v471-room-grid{grid-template-columns:repeat(auto-fill,minmax(68px,1fr))!important;gap:7px!important}.v471-rooms .v478-room-tile{min-height:52px!important}.v471-rooms .v478-room-number{min-height:52px}}
@media(max-width:420px){.v471-rooms .v471-room-grid{grid-template-columns:repeat(auto-fill,minmax(60px,1fr))!important}}
/* Sakura soundtrack now a small navigation icon, never a large floating button. */
body[data-season-preset="sakura"] .navbar .sakura-v458-music-dock{position:static!important;inset:auto!important;width:34px!important;height:34px!important;min-width:34px!important;padding:0!important;display:grid!important;place-items:center!important;margin:0 3px!important;border-radius:11px!important;font-size:17px!important;font-weight:700!important;line-height:1!important;box-shadow:none!important;z-index:auto!important}
body[data-season-preset="sakura"] .navbar .sakura-v458-music-dock[aria-pressed="true"]{color:#ffe4f1!important;border-color:#ec9cc9!important;background:#713557!important}
.v478-music-slot{display:flex;align-items:center;flex:0 0 auto;min-width:34px}
/* Native top scrollbar has the exact scroll width of the real bottom scrollbar. */
.v478-journal-top-rail{width:100%;max-width:100%;height:19px!important;overflow-x:auto!important;overflow-y:hidden!important;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#94a3b8 rgba(148,163,184,.15);box-sizing:border-box;margin:0 0 5px;background:var(--card2);border:1px solid var(--line);border-radius:8px;touch-action:pan-x}
.v478-journal-top-rail[hidden]{display:none!important}
.v478-journal-top-rail>div{height:1px;min-height:1px;pointer-events:none}
.v478-journal-top-rail::-webkit-scrollbar{height:10px}.v478-journal-top-rail::-webkit-scrollbar-thumb{background:#94a3b8;border-radius:10px}.v478-journal-top-rail::-webkit-scrollbar-track{background:rgba(148,163,184,.15)}
.journal-sticky-dates-overlay .journal-sticky-scroll-dock{padding-left:0!important;box-sizing:border-box!important}
.journal-sticky-dates-overlay .journal-sticky-scroll-control{height:20px!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin!important;touch-action:pan-x!important;cursor:ew-resize}
.journal-sticky-dates-overlay .journal-sticky-scroll-control .journal-top-scroll-inner{height:1px!important;min-height:1px!important}
/* Mobile journal: one stable compact title bar, visible Overview / Journal / Topics menu. */
.v478-mobile-subject-links{display:none}
@media(max-width:900px){
 body.journal-mobile-v379 .mobile-journal-v379{box-sizing:border-box!important;max-width:100%!important;min-width:0!important;padding:11px!important;overflow:visible!important}
 body.journal-mobile-v379 .mobile-journal-head-v379{display:grid!important;grid-template-columns:32px minmax(0,1fr) 32px 32px!important;gap:8px!important;align-items:center!important;min-width:0!important;width:100%!important}
 body.journal-mobile-v379 .mobile-journal-head-v379>div:nth-child(2){display:grid!important;min-width:0!important;gap:3px!important}
 body.journal-mobile-v379 .mobile-journal-head-v379>div:nth-child(2)>b{display:block!important;min-width:0!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;font-size:13px!important;line-height:1.3!important}
 body.journal-mobile-v379 .mobile-journal-head-v379 .mobile-journal-landscape-back-v381{display:grid!important;place-items:center!important;height:32px!important;width:32px!important;border-radius:9px!important;text-decoration:none!important;color:var(--text)!important}
 body.journal-mobile-v379 .mobile-journal-head-v379 .v478-mobile-overview{display:none!important}
 body.journal-mobile-v379 .mobile-journal-head-v379 button{width:32px!important;min-width:32px!important;height:32px!important;min-height:32px!important;padding:0!important;display:grid!important;place-items:center!important}
 body.journal-mobile-v379 .journal-mobile-semesters{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important;gap:4px!important;box-sizing:border-box!important;margin:8px 0!important}
 body.journal-mobile-v379 .journal-mobile-semesters a{min-width:0!important;max-width:none!important;white-space:nowrap!important;padding:9px 6px!important;justify-content:center!important;text-align:center!important}
 body.journal-mobile-v379 .v478-mobile-subject-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;width:100%;margin:8px 0 0}
 body.journal-mobile-v379 .v478-mobile-subject-links a{min-width:0;text-align:center;padding:9px 5px;border-radius:9px;text-decoration:none;background:rgba(148,163,184,.1);border:1px solid var(--line);color:var(--text);font-size:11px;font-weight:700;overflow-wrap:anywhere}
 body.journal-mobile-v379 .v478-mobile-subject-links a.is-active{background:rgba(59,130,246,.22);border-color:#60a5fa}
 body.journal-mobile-v379 .context-tabs.subject-tabs{display:none!important}
 body.journal-mobile-v379 .journal-cutover-summary{display:flex!important;flex-wrap:wrap!important;align-items:flex-start!important;justify-content:space-between!important;gap:8px!important;min-width:0!important;overflow-wrap:anywhere!important;white-space:normal!important}
 body.journal-mobile-v379 .journal-cutover-summary>span{min-width:0!important;max-width:100%!important;flex:1 1 190px!important;white-space:normal!important;line-height:1.3!important}
 body.journal-mobile-v379 .journal-cutover-summary b,body.journal-mobile-v379 .journal-cutover-summary small{overflow-wrap:anywhere!important;white-space:normal!important}
 body.journal-mobile-v379 .journal-cutover-expand{font-size:11px!important}
 body.journal-mobile-v379 .journal-cutover-collapsible{min-width:0!important;max-width:100%!important;overflow:hidden!important}
}
@media(max-width:900px) and (orientation:landscape){
 body.journal-v381-landscape-shell .mobile-journal-v379{height:50px!important;min-height:50px!important;overflow:hidden!important;padding:5px 7px!important}
 body.journal-v381-landscape-shell .mobile-journal-head-v379{display:grid!important;grid-template-columns:32px minmax(0,1fr) 48px 30px 30px!important;gap:5px!important;height:40px!important;margin:0!important}
 body.journal-v381-landscape-shell .mobile-journal-head-v379 .v478-mobile-overview{display:grid!important;place-items:center!important;color:#bfdbfe!important;text-decoration:none!important;font-size:11px!important;border:1px solid #475569;border-radius:8px;height:30px!important;width:48px!important}
 body.journal-v381-landscape-shell .v478-mobile-subject-links,body.journal-v381-landscape-shell .journal-mobile-semesters{display:none!important}
}

.v471-rooms .v478-room-tile.v478-room-popup-left .v478-room-info{left:auto!important;right:0!important}
