/* A dedicated public display: reading above, touch controls below. */
body.totem{--totem-gap:clamp(16px,2vw,48px);--totem-size:clamp(20px,2vw,44px);height:100dvh;display:flex;flex-direction:column;overflow:hidden;font-size:var(--totem-size);line-height:1.35}
.totem .masthead{width:100%;max-width:none;flex-wrap:wrap;padding:var(--totem-gap);gap:16px;border-bottom:3px solid #000}
.totem .institution img{width:clamp(100px,15vw,280px)}
.totem .header-title{padding-left:var(--totem-gap)}
.totem h1{font:800 clamp(22px,3vw,64px)/1.05 Inter,sans-serif;letter-spacing:-.04em}
.totem .academic{font-size:.65em;width:auto;margin:0}
.totem .eyebrow{font-size:.6em;font-weight:600;letter-spacing:.08em}
.mode-switch{display:inline-flex;align-items:center;justify-content:center;border:1px solid #000;padding:10px 14px;font-size:13px;font-weight:600;text-decoration:none;color:#000}
.totem .mode-switch{font-size:.7em;min-height:64px;border:2px solid #000;padding:16px 20px;margin-left:auto}
.totem>.navigation,.totem .intro,.totem #schedule-controls,.totem #audit-controls,.totem .planning,.totem>footer,.totem #print{display:none}
.totem main{width:100%;max-width:none;padding:var(--totem-gap);flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.totem-context h2{font:800 clamp(28px,4vw,86px)/1.08 Inter,sans-serif;letter-spacing:-.04em;margin:6px 0 14px;overflow-wrap:anywhere}
.totem-context p{margin:0 0 12px}.totem #totem-date{text-transform:capitalize;font-size:1.15em}
.totem .notice{font-size:.65em;padding:12px 16px;border-radius:0;margin:8px 0;border:1px solid #000;background:#f2f2f2}
.totem .result-header{margin:12px 0;gap:16px;justify-content:space-between}
.totem .result-header h3{display:none}.totem .result-header span{font-size:.65em;color:#333}
.totem #results{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-right:8px;scrollbar-width:auto;touch-action:pan-y}
.totem .days{display:block}.totem .day-heading{display:none}
.totem .lesson{display:grid;grid-template-columns:24% minmax(0,1fr);column-gap:var(--totem-gap);border:2px solid #000;border-top:5px solid #000;border-radius:0;padding:var(--totem-gap);margin-bottom:20px}
.totem .time{grid-column:1;grid-row:1 / span 4;font-size:1.05em;line-height:1.2;color:#000;font-weight:800}
.totem .lesson h4{grid-column:2;font-size:1.2em;font-weight:800;line-height:1.15;letter-spacing:-.02em;margin:0 0 12px}
.totem .lesson .teacher{grid-column:2;font-size:.85em;margin:0 0 10px}
.totem .metadata{grid-column:2;gap:10px;margin:6px 0}
.totem .pill{font-size:.65em;border-radius:0;padding:6px 10px;background:#f0f0f0}
.totem .metadata .pill:first-child{background:#000;color:#fff;font-size:.85em;font-weight:800}
.totem .period,.totem .course-list{grid-column:2;font-size:.6em;color:#333;margin:8px 0 0}
.totem .empty{border:2px solid #000;border-radius:0;font-size:1em;padding:var(--totem-gap);text-align:left}
.totem-dock{flex-shrink:0;padding:var(--totem-gap);background:#f0f0f0;border-top:4px solid #000;display:grid;gap:14px}
.totem-dock button,.totem-tabs a,.totem-picker button{min-height:clamp(64px,6vh,130px);border:2px solid #000;border-radius:0;background:white;color:#000;padding:14px 20px;font-size:.9em;font-weight:600;touch-action:manipulation}
.totem-tabs,.totem-years,.totem-dates{display:flex;gap:12px}
.totem-tabs a{flex:1;display:flex;align-items:center;justify-content:center;text-decoration:none}
.totem-tabs a[aria-current=page],.totem-years button[aria-pressed=true],.totem-picker button[aria-pressed=true]{background:#000;color:#fff}
.totem-choose{width:100%;text-align:left;overflow-wrap:anywhere}
.totem-years button,.totem-dates button{flex:1;min-width:0}
.totem-dock button:disabled{opacity:.35;cursor:default}
.totem-hint{font-size:.55em;margin:0;text-align:center;color:#333}
.totem-picker{position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:none;max-height:58dvh;border:0;border-top:4px solid #000;padding:var(--totem-gap);font-size:var(--totem-size);background:#fff;overflow-y:auto;overscroll-behavior:contain}
.totem-picker::backdrop{background:rgb(0 0 0 / .45)}
.totem-picker-header{position:sticky;top:calc(-1 * var(--totem-gap));background:#fff;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:2px solid #000;z-index:1}
.totem-picker h2{font-size:1em;margin:0}.totem-picker-header button{min-height:64px}
#totem-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}
#totem-options button{text-align:left;overflow-wrap:anywhere}
@media(max-width:650px){body.totem{--totem-size:18px;--totem-gap:12px}.totem .header-title{display:none}.totem .academic{display:none}.totem .mode-switch{font-size:13px;min-height:48px;padding:10px}.totem-context h2{font-size:26px;margin-bottom:8px}.totem-dock{gap:8px}.totem-dock button,.totem-tabs a{min-height:48px;padding:8px;font-size:16px}.totem .lesson{grid-template-columns:1fr;gap:0}.totem .time{grid-column:1;grid-row:auto;margin-bottom:12px}.totem .lesson h4,.totem .lesson .teacher,.totem .metadata,.totem .period,.totem .course-list{grid-column:1}.totem-picker{max-height:65dvh}#totem-options{grid-template-columns:1fr}.totem-hint{display:none}}
@media(max-height:800px) and (min-width:651px){body.totem{--totem-size:20px;--totem-gap:12px}.totem-dock{gap:8px}.totem-dock button,.totem-tabs a{min-height:48px;padding:8px}.totem .masthead{padding:10px 16px}.totem .institution img{width:100px}.totem .mode-switch{min-height:48px}.totem-context h2{font-size:30px}.totem .header-title h1{font-size:24px}.totem-hint{display:none}}

/* Keep the QR separate from both the scrollable lessons and touch controls. */
.totem-mobile{flex-shrink:0;padding:0 var(--totem-gap) var(--totem-gap);display:flex;justify-content:flex-end}
.totem-mobile a{display:flex;align-items:center;gap:var(--totem-gap);color:#000;text-decoration:none}
.totem-mobile img{display:block;width:clamp(160px,18vw,320px);height:auto;flex-shrink:0;image-rendering:pixelated}
.totem-mobile strong{display:block;font-size:1.1em;line-height:1.2;max-width:15em}
.totem-mobile span span{display:block;font-size:.7em;margin-top:10px}
@media(max-width:650px),(max-height:900px){.totem-mobile{display:none}}
