/* =====================================================================
   المكتبة الجامعية — a reading room on the club's design system.
   Signature: the shelf, one book spine per college.
   ===================================================================== */
.lib { --room: #1C1030; --room-2: #2C1A4A; --lamp: #FFC15E; --page: #fff; --c: var(--plum); min-height: 70vh; }
.lib .wrap { width: min(1240px, 100% - 40px); }
.li { width: 20px; height: 20px; flex-shrink: 0; }
.li-f { fill: currentColor; opacity: .18; }
.li-s { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lx-muted { color: var(--mut); font-size: 14.5px; }

.lib-fallback { width: min(900px, 100% - 40px); margin: 2rem auto; }
.lib-fallback nav { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin: 1rem 0; }
.lib-fallback a { color: var(--plum); }
.lib.ready { animation: lx-in .35s var(--ease); }
@keyframes lx-in { from { opacity: .4; } }

/* ---------- Buttons & inputs ---------- */
.lx-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 46px; padding: 0 1.25rem; border: 1px solid transparent; border-radius: 14px; background: var(--plum); color: #fff; font-weight: 700; font-size: 14.5px; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, transform .2s var(--ease); }
.lx-btn:hover { background: var(--plum-2); }
.lx-btn:disabled, .lx-btn.is-busy { opacity: .55; pointer-events: none; }
.lx-btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.lx-btn.ghost:hover { border-color: var(--faint); }
.lx-btn.light { background: #fff; color: #2A1B3D; }
.lx-btn.glass { background: rgba(255, 255, 255, .13); color: #fff; border-color: rgba(255, 255, 255, .24); }
.lx-btn.glass:hover { background: rgba(255, 255, 255, .22); }
.lx-btn.sm { min-height: 38px; padding: 0 .9rem; font-size: 13.5px; border-radius: 11px; }
.lx-btn.lg { min-height: 54px; padding: 0 1.6rem; font-size: 16px; border-radius: 16px; }
.lx-btn .li { width: 19px; height: 19px; }
.lx-iconbtn { position: relative; width: 44px; height: 44px; flex-shrink: 0; display: inline-grid; place-items: center; border-radius: 13px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); cursor: pointer; }
.lx-iconbtn b { position: absolute; top: -6px; left: -6px; min-width: 19px; height: 19px; border-radius: 10px; background: var(--plum); color: #fff; font-size: 11px; line-height: 19px; }
.lx-input { display: flex; align-items: center; gap: .6rem; min-height: 46px; padding: 0 .95rem; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--faint); transition: border-color .15s, box-shadow .15s; }
.lx-input:focus-within { border-color: var(--plum); box-shadow: 0 0 0 4px var(--plum-t); }
.lx-input input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; font-size: 16px; color: var(--ink); }
.lib select, .lx-layer select { min-height: 46px; padding: 0 .85rem; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 15px; max-width: 100%; }

/* ---------- Hero ---------- */
.lx-hero { position: relative; overflow: hidden; color: #fff; padding: clamp(2rem, 5vw, 4rem) 0 2.4rem; background: linear-gradient(180deg, var(--room) 0%, var(--room-2) 100%); isolation: isolate; }
.lx-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px); background-size: 46px 46px; -webkit-mask-image: radial-gradient(70% 70% at 70% 20%, #000, transparent); mask-image: radial-gradient(70% 70% at 70% 20%, #000, transparent); }
.lx-lamp { position: absolute; z-index: -1; width: 900px; height: 620px; top: -300px; right: -120px; background: radial-gradient(closest-side, rgba(255, 193, 94, .26), rgba(194, 29, 100, .16) 55%, transparent); pointer-events: none; }
.lx-hero-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.8rem; }
.lx-hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.9rem); line-height: 1.18; margin-bottom: .8rem; }
.lx-hero h1 span { color: var(--lamp); }
.lx-hero p { color: rgba(255, 255, 255, .76); max-width: 52ch; font-size: clamp(1rem, 1.4vw, 1.12rem); }
.lx-stats { display: flex; gap: clamp(1.2rem, 3vw, 2.6rem); margin: 0 0 .3rem; }
.lx-stats div { display: flex; flex-direction: column; align-items: center; }
.lx-stats dd { margin: 0; font-family: var(--f-disp); font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 700; line-height: 1.15; }
.lx-stats dt { color: rgba(255, 255, 255, .62); font-size: 13px; }
.lx-find { display: flex; align-items: center; gap: .9rem; width: 100%; max-width: 780px; min-height: 68px; padding: 0 1.3rem; border: 0; border-radius: 22px; background: #fff; color: #7A6E8C; text-align: start; font-size: 16.5px; cursor: text; box-shadow: 0 0 0 6px rgba(255, 255, 255, .09), 0 24px 60px -22px rgba(0, 0, 0, .65); }
.lx-find .li { width: 26px; height: 26px; color: var(--plum, #A3134F); }
.lx-find span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-find kbd { direction: ltr; font: 600 12px/1 var(--f-body); padding: .45rem .6rem; border-radius: 8px; background: #F3EFF7; color: #6E6380; }
.lx-quick { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.lx-quick > * { display: inline-flex; align-items: center; gap: .45rem; min-height: 42px; padding: 0 1rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: #fff; font-size: 14px; flex-shrink: 0; cursor: pointer; transition: background .15s; }
.lx-quick > *:hover { background: rgba(255, 255, 255, .17); }
.lx-quick .li { width: 18px; height: 18px; }
.lx-quick .lx-mycollege { background: var(--lamp); border-color: var(--lamp); color: #2A1B3D; font-weight: 700; padding-inline-start: .35rem; }
.lx-quick .lx-mycollege i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--c, #2A1B3D); color: #fff; font-style: normal; }

/* ---------- The shelf ---------- */
.lx-shelf-wrap { margin-top: clamp(2.2rem, 4vw, 3.4rem); }
.lx-shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.lx-shelf-head h2 { font-size: 1.35rem; }
.lx-shelf-head a { display: inline-flex; align-items: center; gap: .3rem; color: var(--lamp); font-size: 14px; font-weight: 700; }
.lx-shelf { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: clamp(3px, .5vw, 7px); height: 330px; padding: 62px clamp(8px, 2vw, 26px) 0; margin-top: -28px; }
.lx-shelf::after { content: ''; position: absolute; left: 0; right: 0; bottom: -16px; height: 16px; border-radius: 4px 4px 10px 10px; background: linear-gradient(180deg, #7B5A8F 0, #4C3266 22%, #331F4E 100%); box-shadow: 0 22px 30px -12px rgba(0, 0, 0, .6); }
.lx-spine { position: relative; flex: 1 1 0; min-width: 0; max-width: 66px; height: var(--h); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 0 10px; border-radius: 9px 9px 3px 3px; color: #fff; background: linear-gradient(90deg, rgba(0, 0, 0, .3), rgba(0, 0, 0, 0) 20%, rgba(255, 255, 255, .17) 46%, rgba(255, 255, 255, 0) 72%, rgba(0, 0, 0, .28)), var(--c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), -3px 0 8px -4px rgba(0, 0, 0, .5); transition: translate .35s var(--ease), box-shadow .35s; animation: lx-shelve .6s var(--ease) both; animation-delay: calc(var(--d) * 28ms); }
@keyframes lx-shelve { from { opacity: 0; transform: translateY(-26px); } }
.lx-spine::before, .lx-spine::after { content: ''; position: absolute; left: 0; right: 0; height: 3px; background: rgba(255, 222, 160, .55); }
.lx-spine::before { top: 46px; } .lx-spine::after { bottom: 36px; }
.lx-spine-ic { display: grid; place-items: center; height: 24px; }
.lx-spine-ic .li { width: 23px; height: 23px; }
.lx-spine-t { flex: 1; min-height: 0; margin-top: 6px; writing-mode: vertical-rl; white-space: nowrap; overflow: hidden; text-align: center; font-weight: 700; font-size: clamp(12px, 1.05vw, 14.5px); }
.lx-spine > b { height: 22px; font-size: 12px; font-weight: 700; opacity: .9; }
.lx-tip { position: absolute; bottom: calc(100% + 12px); left: 50%; translate: -50% 6px; z-index: 3; display: flex; flex-direction: column; gap: .1rem; width: max-content; max-width: 220px; padding: .55rem .8rem; border-radius: 12px; background: #fff; color: #6E6380; font-size: 12.5px; text-align: center; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .2s, translate .2s var(--ease); }
.lx-tip strong { color: #2A1B3D; font-size: 13.5px; }
.lx-spine:hover, .lx-spine:focus-visible { translate: 0 -16px; z-index: 2; box-shadow: 0 18px 28px -10px rgba(0, 0, 0, .65); }
.lx-spine:hover .lx-tip, .lx-spine:focus-visible .lx-tip { opacity: 1; translate: -50% 0; }
.lx-spine:first-child .lx-tip { translate: 0 6px; left: auto; right: 0; } .lx-spine:first-child:hover .lx-tip { translate: 0 0; }
.lx-spine:last-child .lx-tip { translate: 0 6px; left: 0; } .lx-spine:last-child:hover .lx-tip { translate: 0 0; }

.lx-college-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; }
.lx-college-grid.is-home { display: none; }
.lx-college { position: relative; display: flex; flex-direction: column; gap: .15rem; min-height: 126px; padding: .9rem 1.15rem .8rem .9rem; border-radius: 6px 16px 16px 6px; direction: rtl; color: #fff; background: linear-gradient(90deg, rgba(255, 255, 255, 0) 84%, rgba(0, 0, 0, .26) 84% 91%, rgba(255, 255, 255, .16) 91% 93%, rgba(0, 0, 0, .12) 93%), var(--c); }
.lx-college-ic { margin-bottom: auto; } .lx-college-ic .li { width: 28px; height: 28px; }
.lx-college b { font-size: 14.5px; line-height: 1.4; }
.lx-college small { font-size: 12px; opacity: .82; }
.lx-college em { position: absolute; top: .7rem; left: .6rem; font-style: normal; font-size: 11px; font-weight: 700; padding: .05rem .55rem; border-radius: 99px; background: var(--lamp); color: #2A1B3D; }

/* ---------- Sections ---------- */
.lx-body { padding-block: 1.4rem 0; }
.lib > .lx-body:last-of-type, .lib > div:last-of-type > .lx-body:last-child { padding-bottom: 3.5rem; }
.lx-sec { margin-top: clamp(2rem, 4.5vw, 3.4rem); }
.lx-sec:first-child { margin-top: .8rem; }
.lx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.lx-head h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
.lx-head p { color: var(--mut); font-size: 14px; }
.lx-head a { display: inline-flex; align-items: center; gap: .3rem; color: var(--plum); font-weight: 700; font-size: 14px; white-space: nowrap; }
.lx-head a .li { width: 17px; height: 17px; transition: translate .2s var(--ease); }
.lx-head a:hover .li { translate: -4px 0; }
.lx-chips { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; margin-bottom: 1rem; padding-bottom: 2px; }
.lx-chips a { display: inline-flex; align-items: center; gap: .45rem; flex-shrink: 0; min-height: 40px; padding: 0 .55rem 0 .9rem; padding-inline: .9rem .45rem; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 14px; }
.lx-chips b { min-width: 26px; padding: 0 .3rem; border-radius: 8px; background: color-mix(in srgb, var(--c) 14%, var(--card)); color: color-mix(in srgb, var(--c) 80%, var(--ink)); font-size: 12px; text-align: center; }

/* ---------- File cards ---------- */
.lx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(226px, 1fr)); gap: 1rem; }
.lx-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 236px; gap: 1rem; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; padding: 4px 2px 14px; margin: -4px -2px -14px; }
.lx-rail > * { scroll-snap-align: start; }
.lx-card { position: relative; display: flex; min-width: 0; border-radius: 20px; background: var(--card); border: 1px solid var(--line-2); transition: translate .25s var(--ease), box-shadow .25s, border-color .2s; }
.lx-card:hover { translate: 0 -4px; border-color: color-mix(in srgb, var(--c) 40%, var(--line)); box-shadow: 0 22px 34px -22px color-mix(in srgb, var(--c) 75%, transparent); }
.lx-card-a { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 7px; border-radius: inherit; }
.lx-card-b { display: flex; flex-direction: column; flex: 1; gap: .2rem; padding: .7rem .55rem .45rem; min-width: 0; }
.lx-kind { display: flex; align-items: center; gap: .45rem; color: color-mix(in srgb, var(--c) 82%, var(--ink)); font-size: 12.5px; font-weight: 700; }
.lx-kind i { display: inline-flex; align-items: center; gap: .2rem; font-style: normal; font-size: 11px; padding: 0 .45rem; border-radius: 99px; }
.lx-kind i .li { width: 12px; height: 12px; }
.lx-new { background: var(--ok-t); color: var(--ok); }
.lx-pick { background: var(--saff-t); color: var(--saff-d); }
.lx-title { font-weight: 700; font-size: 15px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lx-sub { color: var(--mut); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lx-meta { display: flex; align-items: center; gap: .75rem; margin-top: auto; padding-top: .4rem; color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; }
.lx-meta span, .lx-star { display: inline-flex; align-items: center; gap: .22rem; }
.lx-meta .li, .lx-star .li { width: 14px; height: 14px; }
.lx-star { color: var(--saff-d); font-weight: 700; } .lx-star .li-f { opacity: 1; }
.lx-save { position: absolute; top: 15px; left: 15px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; border: 0; background: color-mix(in srgb, var(--card) 88%, transparent); color: var(--ink-2); box-shadow: 0 4px 12px -6px rgba(42, 27, 61, .4); cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lx-save[aria-pressed="true"] { background: var(--plum); color: #fff; }
.lx-save[aria-pressed="true"] .li-f { opacity: 1; }

.lx-cover { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; width: 100%; aspect-ratio: 4 / 3; flex-shrink: 0; overflow: hidden; border-radius: 14px; background: radial-gradient(120% 90% at 100% 0, color-mix(in srgb, var(--c) 26%, var(--card)), color-mix(in srgb, var(--c) 9%, var(--card))); }
.lx-cover::before { content: ''; position: absolute; z-index: -1; top: 13%; bottom: -8px; left: 20%; right: 20%; border-radius: 8px 8px 0 0; background: linear-gradient(var(--c), var(--c)) top / 100% 5px no-repeat, var(--page); -webkit-clip-path: polygon(24px 0, 100% 0, 100% 100%, 0 100%, 0 24px); clip-path: polygon(24px 0, 100% 0, 100% 100%, 0 100%, 0 24px); transition: translate .35s var(--ease); }
.lx-card:hover .lx-cover::before { translate: 0 -5px; }
.lx-cover-ic { color: var(--c); margin-top: 8%; } .lx-cover-ic .li { width: 34px; height: 34px; }
.lx-cover b { max-width: 52%; font-family: var(--f-disp); color: color-mix(in srgb, var(--c) 85%, var(--ink)); font-size: 15px; line-height: 1.3; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lx-lines { width: 38%; height: 22px; opacity: .22; background: repeating-linear-gradient(var(--c) 0 3px, transparent 3px 9px); -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 35%); mask-image: linear-gradient(90deg, transparent 0, #000 35%); }
.lx-cover em { position: absolute; bottom: 8px; right: 8px; font: 800 10.5px/1 var(--f-body); letter-spacing: .06em; padding: .35rem .45rem; border-radius: 7px; background: var(--c); color: #fff; direction: ltr; }
.lx-cover.has-img::before { content: none; }
.lx-cover.has-img img { position: absolute; top: 10%; left: 18%; width: 64%; height: 100%; object-fit: cover; object-position: top; border-radius: 6px 6px 0 0; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .45); }

.lx-grid.is-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr)); gap: .7rem; }
.lx-grid.is-list .lx-card-a { flex-direction: row; align-items: stretch; }
.lx-grid.is-list .lx-cover { width: 96px; aspect-ratio: auto; min-height: 112px; gap: 0; }
.lx-grid.is-list .lx-cover b, .lx-grid.is-list .lx-lines { display: none; }
.lx-grid.is-list .lx-cover-ic { margin: 0; } .lx-grid.is-list .lx-cover-ic .li { width: 28px; height: 28px; }
.lx-grid.is-list .lx-cover em { right: 50%; translate: 50% 0; }
.lx-grid.is-list .lx-cover.has-img img { left: 8%; width: 84%; }
.lx-grid.is-list .lx-card-b { padding: .35rem .8rem .2rem .2rem; padding-left: 3rem; }
.lx-grid.is-list .lx-save { top: 14px; left: 14px; }

/* ---------- Empty ---------- */
.lx-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem; padding: 2.6rem 1.2rem; border: 1.5px dashed var(--line); border-radius: 24px; background: color-mix(in srgb, var(--card) 60%, transparent); }
.lx-empty-art { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: .5rem; border-radius: 22px; rotate: -6deg; background: var(--plum-t); color: var(--plum); }
.lx-empty-art .li { width: 34px; height: 34px; }
.lx-empty h3 { font-family: var(--f-disp); font-size: 1.35rem; }
.lx-empty p { color: var(--mut); max-width: 46ch; font-size: 14.5px; }
.lx-empty-a { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: .8rem; }

/* ---------- Home blocks ---------- */
.lx-types { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .7rem; }
.lx-types a { --t: #A3134F; display: grid; gap: .1rem; padding: 1.05rem; border-radius: 20px; background: color-mix(in srgb, var(--t) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--t) 16%, transparent); transition: translate .2s var(--ease), border-color .2s; }
.lx-types a:hover { translate: 0 -3px; border-color: color-mix(in srgb, var(--t) 55%, transparent); }
.lx-types .li { width: 30px; height: 30px; margin-bottom: .7rem; color: color-mix(in srgb, var(--t) 85%, var(--ink)); }
.lx-types b { font-size: 14.5px; } .lx-types small { color: var(--mut); font-size: 12.5px; }
.lx-types .t-exam { --t: #1D56B8; } .lx-types .t-slides { --t: #C26A00; } .lx-types .t-notes { --t: #0F7452; } .lx-types .t-book { --t: #7443AD; }
.lx-types .t-lab { --t: #0A6C99; } .lx-types .t-assignment { --t: #55690F; } .lx-types .t-video { --t: #C5283D; } .lx-types .t-form { --t: #8A5A00; } .lx-types .t-guide { --t: #5E5372; }
.lx-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.lx-tool { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .2rem; padding: 1.25rem; min-height: 168px; border-radius: 22px; background: var(--card); border: 1px solid var(--line-2); transition: translate .2s var(--ease), box-shadow .2s; }
.lx-tool:hover { translate: 0 -3px; box-shadow: var(--sh-2); }
.lx-tool span { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: auto; border-radius: 16px; background: var(--c); color: #fff; }
.lx-tool span .li { width: 27px; height: 27px; }
.lx-tool::after { content: ''; position: absolute; left: -46px; top: -46px; width: 130px; height: 130px; border-radius: 50%; border: 18px solid var(--c); opacity: .08; }
.lx-tool b { font-size: 16px; margin-top: .8rem; } .lx-tool small { color: var(--mut); font-size: 13px; line-height: 1.55; }
.lx-split { display: grid; grid-template-columns: 1.45fr 1fr; gap: 1rem; align-items: stretch; }
.lx-panel { display: flex; flex-direction: column; align-items: flex-start; gap: .9rem; padding: clamp(1.2rem, 2.6vw, 1.8rem); border-radius: 26px; background: var(--card); border: 1px solid var(--line-2); min-width: 0; }
.lx-panel .lx-head, .lx-panel .lx-reqs { width: 100%; margin: 0; }
.lx-give { color: #fff; border: 0; background: radial-gradient(130% 100% at 0 0, #C21D64, #6B2266 48%, #2C1A4A); }
.lx-give h2 { font-size: 1.7rem; } .lx-give > p { color: rgba(255, 255, 255, .82); }
.lx-top { width: 100%; margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .18); }
.lx-top h3 { font-size: 13.5px; opacity: .8; margin-bottom: .6rem; }
.lx-top ol { display: grid; gap: .45rem; }
.lx-top li { display: flex; align-items: center; gap: .6rem; font-size: 14px; }
.lx-top li span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .16); font-weight: 700; }
.lx-top li b { flex: 1; font-weight: 500; } .lx-top li small { opacity: .75; }
.lx-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .6rem; }
.lx-links a { display: grid; grid-template-columns: auto 1fr; column-gap: .8rem; align-items: center; padding: .85rem 1rem; border-radius: 16px; background: var(--card); border: 1px solid var(--line-2); }
.lx-links a:hover { border-color: var(--sky); }
.lx-links span { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--sky-t); color: var(--sky-d); }
.lx-links b { font-size: 14px; } .lx-links small { color: var(--mut); font-size: 12.5px; }

/* ---------- Page heads ---------- */
.lx-phead { color: #fff; padding: 1.6rem 0 2rem; background: radial-gradient(80% 160% at 85% 0, rgba(194, 29, 100, .35), transparent 60%), linear-gradient(180deg, var(--room), var(--room-2)); }
.lx-phead h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.lx-phead p { color: rgba(255, 255, 255, .76); margin-top: .3rem; }
.lx-phead p a { color: var(--lamp); text-decoration: underline; text-underline-offset: 3px; }
.lx-phead .lx-btn { margin-top: 1rem; }
.lx-crumbs { display: flex; align-items: center; gap: .3rem; margin-bottom: .9rem; font-size: 13px; opacity: .8; white-space: nowrap; overflow: hidden; }
.lx-crumbs a:hover { text-decoration: underline; }
.lx-crumbs .li { width: 15px; height: 15px; }
.lx-input-hero { max-width: 520px; min-height: 56px; margin-top: 1.2rem; border-radius: 18px; background: #fff; }
.lx-input-hero input { color: #2A1B3D; }

/* ---------- Colleges index ---------- */
.lx-branches { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr)); gap: 1rem; align-items: start; padding-top: .4rem; }
.lx-branch { overflow: hidden; border-radius: 22px; background: var(--card); border: 1px solid var(--line-2); }
.lx-branch-h { display: flex; align-items: center; gap: .9rem; padding: 1.1rem; color: #fff; background: linear-gradient(115deg, var(--c), color-mix(in srgb, var(--c) 70%, #12081F)); }
.lx-branch-h > span { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: rgba(255, 255, 255, .17); }
.lx-branch-h > span .li { width: 29px; height: 29px; }
.lx-branch-h div { flex: 1; min-width: 0; } .lx-branch-h h2 { font-size: 1.14rem; } .lx-branch-h small { opacity: .84; font-size: 12.5px; }
.lx-branch ul { display: flex; flex-wrap: wrap; gap: .4rem; padding: .9rem 1rem 1.1rem; }
.lx-branch li a { display: block; padding: .3rem .75rem; border-radius: 10px; background: color-mix(in srgb, var(--c) 9%, var(--card)); font-size: 13px; }
.lx-branch li a:hover { background: color-mix(in srgb, var(--c) 22%, var(--card)); }
.lx-branch p { padding: .9rem 1rem 1.1rem; color: var(--mut); font-size: 13.5px; }
.lx-none { text-align: center; color: var(--mut); padding: 2rem; }

/* ---------- College page ---------- */
.lx-chead { position: relative; overflow: hidden; isolation: isolate; color: #fff; padding: 1.6rem 0 1.5rem; background: linear-gradient(125deg, color-mix(in srgb, var(--c) 92%, #fff) 0%, var(--c) 40%, color-mix(in srgb, var(--c) 50%, #12081F) 100%); }
.lx-chead-art { position: absolute; z-index: -1; left: 2%; bottom: -70px; opacity: .11; rotate: -8deg; }
.lx-chead-art .li { width: clamp(220px, 30vw, 380px); height: clamp(220px, 30vw, 380px); } .lx-chead-art .li-s { stroke-width: .9; }
.lx-chead-t { display: flex; align-items: center; gap: 1.1rem; }
.lx-chead-ic { display: grid; place-items: center; flex-shrink: 0; width: 76px; height: 76px; border-radius: 24px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); }
.lx-chead-ic .li { width: 42px; height: 42px; }
.lx-chead h1 { font-size: clamp(1.7rem, 4vw, 2.7rem); } .lx-chead-t p { opacity: .86; font-size: 14.5px; }
.lx-chead-a { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.3rem; }
.lx-majors { display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: none; margin-top: 1.3rem; padding-top: 1.1rem; border-top: 1px solid rgba(255, 255, 255, .2); }
.lx-majors button { flex-shrink: 0; min-height: 38px; padding: 0 .95rem; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .26); background: transparent; color: #fff; font-size: 13.5px; cursor: pointer; }
.lx-majors button[aria-pressed="true"] { background: #fff; border-color: #fff; color: #2A1B3D; font-weight: 700; }
.lx-courses-sec { scroll-margin-top: var(--hdr); padding-top: 1.8rem; }
.lx-courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .7rem; margin-bottom: .8rem; }
.lx-courses button { display: flex; align-items: center; gap: .85rem; padding: .85rem .9rem; border-radius: 18px; border: 1px solid var(--line-2); background: var(--card); text-align: start; cursor: pointer; min-width: 0; transition: border-color .15s, translate .2s var(--ease); }
.lx-courses button:hover { border-color: var(--c); translate: 0 -2px; }
.lx-courses button > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.lx-courses b { font-size: 14.5px; } .lx-courses small { color: var(--mut); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lx-courses em { font-style: normal; font-weight: 700; margin-left: .45rem; unicode-bidi: isolate; }
.lx-courses i { font-style: normal; font-family: var(--f-disp); font-size: 1.4rem; font-weight: 700; color: color-mix(in srgb, var(--c) 80%, var(--ink)); }
.lx-folder { display: grid; place-items: center; flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--c) 14%, var(--card)); color: color-mix(in srgb, var(--c) 85%, var(--ink)); }
.lx-folder .li { width: 26px; height: 26px; } .lx-folder .li-f { opacity: .4; }
.lx-coursehead { display: flex; align-items: center; gap: .9rem; padding: .9rem; border-radius: 20px; background: var(--card); border: 1px solid var(--c); }
.lx-coursehead div { flex: 1; min-width: 0; } .lx-coursehead h2 { font-size: 1.25rem; } .lx-coursehead small { color: var(--mut); }

/* ---------- Filter bar ---------- */
.lx-bar { position: sticky; top: var(--hdr); z-index: 40; margin-top: .6rem; padding: .75rem 0 .65rem; background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px); border-bottom: 1px solid var(--line-2); }
.admin-bar .lx-bar { top: calc(var(--hdr) + 32px); }
.lx-bar-row { display: flex; align-items: center; gap: .5rem; }
.lx-bar-row > .lx-input { flex: 1; min-width: 0; }
.lx-more-f { display: none; }
.lx-selects { display: flex; gap: .5rem; }
.lx-view { display: flex; gap: 2px; padding: 3px; border-radius: 14px; background: var(--mist); }
.lx-view button { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 11px; background: none; color: var(--mut); cursor: pointer; }
.lx-view button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--sh-1); }
.lx-pills { display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: none; margin-top: .65rem; }
.lx-pills button { display: inline-flex; align-items: center; gap: .4rem; flex-shrink: 0; min-height: 38px; padding: 0 .9rem; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-size: 13.5px; cursor: pointer; }
.lx-pills .li { width: 17px; height: 17px; }
.lx-pills b { font-size: 11.5px; opacity: .6; }
.lx-pills button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 700; }
.lx-count { color: var(--mut); font-size: 13.5px; margin-bottom: .8rem; }
.lx-more { display: flex; justify-content: center; margin-top: 1.6rem; }

/* ---------- Tabs, requests, shelf ---------- */
.lx-narrow { max-width: 880px; }
.lx-tabs { display: flex; gap: .3rem; width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: .3rem; margin-bottom: 1.3rem; border-radius: 16px; background: var(--mist); }
.lx-tabs a { display: inline-flex; align-items: center; gap: .4rem; flex-shrink: 0; min-height: 40px; padding: 0 1rem; border-radius: 12px; color: var(--mut); font-size: 14px; font-weight: 700; }
.lx-tabs a[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: var(--sh-1); }
.lx-tabs b { font-size: 11.5px; opacity: .6; }
.lx-reqbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: 1rem; }
.lx-reqbar .lx-tabs { margin: 0; }
.lx-reqs { display: grid; gap: .6rem; }
.lx-req { display: flex; align-items: center; gap: .85rem; padding: .75rem; border-radius: 18px; background: var(--card); border: 1px solid var(--line-2); min-width: 0; }
.lx-vote { display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; width: 52px; min-height: 58px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); cursor: pointer; }
.lx-vote .li { width: 18px; height: 18px; }
.lx-vote[aria-pressed="true"] { background: var(--plum); border-color: var(--plum); color: #fff; }
.lx-vote:disabled { cursor: default; opacity: .55; }
.lx-req-b { flex: 1; min-width: 0; } .lx-req-b > b { font-size: 14.5px; line-height: 1.5; display: block; overflow-wrap: anywhere; }
.lx-req-b p { color: var(--ink-2); font-size: 13.5px; overflow-wrap: anywhere; }
.lx-req-b small { display: flex; align-items: center; gap: .35rem; color: var(--mut); font-size: 12px; }
.lx-req-b i { width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.lx-done { display: inline-flex; align-items: center; gap: .3rem; color: var(--ok); font-weight: 700; font-size: 13.5px; }
.lx-mylist { display: grid; gap: .6rem; }
.lx-mylist li { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; border-radius: 16px; background: var(--card); border: 1px solid var(--line-2); }
.lx-mylist div { flex: 1; min-width: 0; display: flex; flex-direction: column; } .lx-mylist small { color: var(--mut); font-size: 12.5px; }
.lx-state { flex-shrink: 0; font-size: 12px; font-weight: 700; padding: .15rem .65rem; border-radius: 99px; background: var(--saff-t); color: var(--saff-d); }
.lx-state.ok { background: var(--ok-t); color: var(--ok); } .lx-state.no { background: var(--bad-t); color: var(--bad); }

/* ---------- Forms ---------- */
.lx-form { display: grid; gap: .9rem; }
.lx-form fieldset { display: grid; gap: .9rem; min-width: 0; margin: 0; padding: clamp(1rem, 2.6vw, 1.5rem); border: 1px solid var(--line-2); border-radius: 22px; background: var(--card); }
.lx-form legend { float: right; display: flex; align-items: center; gap: .6rem; width: 100%; padding: 0; font-family: var(--f-disp); font-size: 1.2rem; font-weight: 700; }
.lx-form legend + * { clear: both; }
.lx-form legend i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--plum); color: #fff; font: 700 14px var(--f-body); font-style: normal; }
.lx-reqform { padding: 1.2rem; margin-bottom: 1.3rem; border-radius: 22px; background: var(--card); border: 1px solid var(--plum); }
.lx-f { display: grid; gap: .35rem; min-width: 0; }
.lx-f > span { font-size: 13.5px; font-weight: 700; color: var(--ink-2); } .lx-f em, .lx-prev em { font-style: normal; font-weight: 400; color: var(--faint); font-size: 12px; margin-inline-start: .3rem; }
.lx-f input, .lx-f textarea, .lx-row input, .lx-report textarea { width: 100%; min-width: 0; min-height: 48px; padding: .6rem .9rem; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 16px; }
.lx-f select { width: 100%; background: var(--paper) !important; }
.lx-f input:focus, .lx-f textarea:focus, .lx-f select:focus, .lx-row input:focus { outline: 0; border-color: var(--plum); box-shadow: 0 0 0 4px var(--plum-t); }
.lx-f2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.lx-f3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.lx-check { display: flex; align-items: flex-start; gap: .6rem; font-size: 14px; cursor: pointer; }
.lx-check input { width: 20px; height: 20px; margin-top: .15rem; accent-color: var(--plum); flex-shrink: 0; }
.lx-err { padding: .7rem .95rem; border-radius: 12px; background: var(--bad-t); color: var(--bad); font-size: 14px; font-weight: 700; }
.lx-note { display: flex; align-items: center; gap: .5rem; padding: .8rem 1rem; border-radius: 14px; background: var(--saff-t); color: var(--saff-d); }
.lx-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; min-height: 170px; padding: 1.2rem; text-align: center; border: 2px dashed var(--line); border-radius: 18px; background: var(--paper); cursor: pointer; transition: border-color .15s, background .15s; }
.lx-drop .li { width: 38px; height: 38px; color: var(--plum); }
.lx-drop small { color: var(--mut); font-size: 12.5px; }
.lx-drop b { overflow-wrap: anywhere; }
.lx-drop:hover, .lx-drop.on, .lx-drop:focus-within { border-color: var(--plum); background: var(--plum-t); }
.lx-drop.has { border-style: solid; border-color: var(--ok); background: var(--ok-t); } .lx-drop.has .li { color: var(--ok); }
.lx-pickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.lx-pickgrid label, .lx-pickgrid button { position: relative; display: block; padding: 0; border: 0; background: none; cursor: pointer; min-width: 0; text-align: start; }
.lx-pickgrid input { position: absolute; opacity: 0; pointer-events: none; }
.lx-pickgrid span { display: flex; align-items: center; gap: .5rem; height: 100%; min-height: 52px; padding: .4rem .65rem; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); font-size: 13px; font-weight: 700; line-height: 1.4; }
.lx-pickgrid .li { color: color-mix(in srgb, var(--c) 85%, var(--ink)); width: 22px; height: 22px; }
.lx-pickgrid input:checked + span, .lx-pickgrid button[aria-pressed="true"] span { background: var(--c); border-color: var(--c); color: #fff; }
.lx-pickgrid input:checked + span .li, .lx-pickgrid button[aria-pressed="true"] .li { color: #fff; }
.lx-pickgrid input:focus-visible + span { outline: 2.5px solid var(--sky); outline-offset: 2px; }
.lx-chipsel { display: flex; flex-wrap: wrap; gap: .45rem; }
.lx-chipsel input { position: absolute; opacity: 0; pointer-events: none; }
.lx-chipsel span { display: inline-flex; align-items: center; gap: .4rem; min-height: 42px; padding: 0 .9rem; border-radius: 99px; border: 1px solid var(--line); font-size: 13.5px; cursor: pointer; }
.lx-chipsel .li { width: 17px; height: 17px; }
.lx-chipsel input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 700; }
.lx-chipsel input:focus-visible + span { outline: 2.5px solid var(--sky); outline-offset: 2px; }
.lx-submit { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.lx-submit progress { flex: 1; min-width: 160px; height: 8px; accent-color: var(--plum); }
.lx-gate { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.3rem; margin-bottom: 1.3rem; border-radius: 22px; background: var(--card); border: 1px solid var(--line-2); }
.lx-gate > .li { width: 36px; height: 36px; color: var(--plum); } .lx-gate div { flex: 1; min-width: 220px; } .lx-gate p { color: var(--mut); font-size: 14px; }
.lx-done-box { display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; padding: 3rem 1rem; border-radius: 26px; background: var(--card); border: 1px solid var(--line-2); }
.lx-done-box > span { display: grid; place-items: center; width: 80px; height: 80px; border-radius: 50%; background: var(--ok); color: #fff; animation: pop .5s var(--ease) both; }
.lx-done-box > span .li { width: 42px; height: 42px; }
.lx-done-box h2 { margin-top: .8rem; } .lx-done-box p { color: var(--mut); } .lx-done-box div { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; margin-top: 1rem; }

/* ---------- Tools ---------- */
.lx-toolnav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1.3rem; }
.lx-toolnav a { display: flex; align-items: center; justify-content: center; gap: .55rem; min-height: 60px; padding: 0 .6rem; border-radius: 18px; background: var(--card); border: 1.5px solid var(--line-2); font-weight: 700; font-size: 14.5px; }
.lx-toolnav .li { width: 24px; height: 24px; color: color-mix(in srgb, var(--c) 85%, var(--ink)); }
.lx-toolnav a[aria-selected="true"] { background: var(--c); border-color: var(--c); color: #fff; } .lx-toolnav a[aria-selected="true"] .li { color: #fff; }
.lx-toolbox > h2 { font-size: 1.5rem; } .lx-toolbox > p { color: var(--mut); margin-bottom: 1.1rem; }
.lx-calc { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.lx-calc.is-single { grid-template-columns: minmax(0, 1fr); }
.lx-calc-main { display: grid; gap: .9rem; padding: clamp(.9rem, 2.4vw, 1.4rem); border-radius: 24px; background: var(--card); border: 1px solid var(--line-2); min-width: 0; }
.lx-seg { display: flex; gap: .3rem; width: fit-content; max-width: 100%; padding: .3rem; border-radius: 14px; background: var(--mist); }
.lx-seg button { min-height: 40px; padding: 0 1.1rem; border: 0; border-radius: 11px; background: none; color: var(--mut); font-weight: 700; font-size: 14px; cursor: pointer; }
.lx-seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--sh-1); }
.lx-rows { display: grid; gap: .5rem; }
.lx-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px 124px 40px; gap: .45rem; align-items: center; }
.lx-row select { min-width: 0; padding: 0 .5rem !important; }
.lx-row > button { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 12px; background: none; color: var(--faint); cursor: pointer; }
.lx-row > button:hover { background: var(--bad-t); color: var(--bad); }
.lx-calc-main > .lx-btn { justify-self: start; }
.lx-prev { display: grid; gap: .6rem; padding-top: .9rem; border-top: 1px dashed var(--line); } .lx-prev h3 { font-size: 1rem; }
.lx-result { position: sticky; top: calc(var(--hdr) + 1rem); display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1.6rem 1.3rem; border-radius: 26px; color: #fff; background: radial-gradient(120% 90% at 50% 0, color-mix(in srgb, var(--c) 90%, #fff), color-mix(in srgb, var(--c) 45%, #12081F)); }
.lx-result small { opacity: .8; font-size: 13px; }
.lx-result b { font-family: var(--f-disp); font-size: 4.4rem; line-height: 1.15; font-variant-numeric: tabular-nums; } .lx-result b.sm { font-size: 2.7rem; }
.lx-result span { min-height: 1.7em; font-weight: 700; color: var(--lamp, #FFC15E); }
.lx-result hr { width: 100%; border: 0; border-top: 1px solid rgba(255, 255, 255, .2); margin: .9rem 0; }
.lx-result p { margin-top: 1rem; font-size: 12.5px; line-height: 1.75; opacity: .82; } .lx-result a { text-decoration: underline; }
.lx-abs { display: grid; gap: .6rem; }
.lx-abs li { --s: var(--ok); display: grid; gap: .5rem; padding: .9rem 1rem; border-radius: 18px; border: 1px solid var(--line); border-inline-start: 5px solid var(--s); }
.lx-abs li.warn { --s: var(--saff); } .lx-abs li.bad { --s: var(--bad); }
.lx-abs li.lx-muted { border: 1px dashed var(--line); text-align: center; }
.lx-abs-h { display: flex; justify-content: space-between; align-items: center; } .lx-abs-h button { border: 0; background: none; color: var(--faint); width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; }
.lx-abs p { font-size: 14px; color: var(--ink-2); }
.lx-meter { height: 9px; border-radius: 9px; background: var(--mist); overflow: hidden; } .lx-meter i { display: block; height: 100%; border-radius: inherit; background: var(--s); transition: width .35s var(--ease); }
.lx-step { display: flex; align-items: center; gap: .6rem; font-size: 14px; } .lx-step span { flex: 1; color: var(--mut); }
.lx-step button { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; }
.lx-step b { min-width: 64px; text-align: center; direction: ltr; font-family: var(--f-disp); font-size: 1.3rem; }
.lx-focus { --f: var(--c); display: flex; flex-direction: column; align-items: center; gap: 1.3rem; padding: 1.8rem 1rem; border-radius: 28px; background: var(--card); border: 1px solid var(--line-2); }
.lx-focus.is-break { --f: var(--sky); }
.lx-focus .lx-seg button { direction: ltr; }
.lx-dial { position: relative; width: min(300px, 76vw); aspect-ratio: 1; }
.lx-dial svg { width: 100%; height: 100%; rotate: -90deg; }
.lx-dial circle { fill: none; stroke: var(--mist); stroke-width: 7; }
.lx-dial circle[data-arc] { stroke: var(--f); stroke-linecap: round; stroke-dasharray: 100; transition: stroke-dashoffset .5s linear; }
.lx-dial div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lx-dial b { font-family: var(--f-disp); font-size: clamp(3.4rem, 14vw, 4.6rem); line-height: 1.1; font-variant-numeric: tabular-nums; } .lx-dial span { color: var(--mut); font-weight: 700; }
.lx-focus-a { display: flex; gap: .6rem; align-items: center; } .lx-focus-a .lx-btn { min-width: 190px; background: var(--f); } .lx-focus-a .lx-iconbtn { width: 54px; height: 54px; border-radius: 16px; }
.lx-timerpill { position: fixed; left: 20px; bottom: 20px; z-index: 65; display: flex; align-items: center; gap: .5rem; min-height: 48px; padding: 0 1.1rem; border: 0; border-radius: 99px; background: var(--room); color: #fff; box-shadow: var(--sh-3); cursor: pointer; }
.lx-timerpill b { direction: ltr; font-variant-numeric: tabular-nums; }
.lx-exams { display: grid; gap: .6rem; }
.lx-exams li { display: flex; align-items: center; gap: .9rem; padding: .75rem; border-radius: 18px; border: 1px solid var(--line); }
.lx-exams li.lx-muted { justify-content: center; border-style: dashed; padding: 1.5rem; }
.lx-exams li > div:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; } .lx-exams small { color: var(--mut); font-size: 12.5px; }
.lx-days { display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; width: 68px; min-height: 68px; border-radius: 16px; background: var(--saff-t); color: var(--saff-d); }
.lx-days b { font-family: var(--f-disp); font-size: 1.6rem; line-height: 1.1; } .lx-days small { color: inherit !important; }
.lx-exams li.soon .lx-days { background: var(--bad-t); color: var(--bad); }
.lx-exams li.past { opacity: .55; } .lx-exams li.past .lx-days { background: var(--mist); color: var(--mut); }

/* ---------- Overlays ---------- */
html.lx-lock, html.lx-lock body { overflow: hidden; }
.lx-layer { position: fixed; inset: 0; z-index: 95; }
.lx-scrim { position: absolute; inset: 0; background: rgba(18, 8, 31, .55); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); opacity: 0; transition: opacity .25s; }
.lx-layer.on .lx-scrim { opacity: 1; }
.lx-ov { position: absolute; display: flex; flex-direction: column; background: var(--card); color: var(--ink); box-shadow: var(--sh-3); transition: transform .32s var(--ease), opacity .25s; }
.lx-grab { display: none; }

.lx-sheet { top: 10px; bottom: 10px; left: 10px; width: min(500px, calc(100% - 20px)); border-radius: 26px; overflow: hidden; transform: translateX(-40px); opacity: 0; }
.lx-layer.on .lx-sheet { transform: none; opacity: 1; }
.admin-bar .lx-sheet { top: 42px; }
.lx-sheet-bar { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .7rem .8rem; border-bottom: 1px solid var(--line-2); font-weight: 700; font-size: 14px; color: var(--mut); }
.lx-sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 1.2rem; }
.lx-sheet-top { display: flex; gap: 1rem; align-items: center; }
.lx-sheet-top .lx-cover { width: 112px; aspect-ratio: 3 / 4; gap: .25rem; }
.lx-sheet-top .lx-cover b { font-size: 11.5px; max-width: 60%; } .lx-sheet-top .lx-lines { display: none; } .lx-sheet-top .lx-cover-ic .li { width: 26px; height: 26px; }
.lx-sheet-top div { min-width: 0; } .lx-sheet-top h2 { font-size: 1.3rem; line-height: 1.45; overflow-wrap: anywhere; } .lx-sheet-top p { color: var(--mut); font-size: 14px; }
.lx-sheet-stats { display: flex; align-items: center; gap: .8rem; margin-top: .45rem; color: var(--mut); font-size: 13px; }
.lx-sheet-stats span { display: inline-flex; align-items: center; gap: .25rem; } .lx-sheet-stats .li { width: 15px; height: 15px; } .lx-sheet-stats .lx-star + span { margin-inline-start: -.6rem; }
.lx-desc { margin-top: 1.1rem; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.lx-acts { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .5rem; margin-top: 1.2rem; }
.lx-acts button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; min-height: 74px; padding: .4rem; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); font-size: 12.5px; font-weight: 700; text-align: center; cursor: pointer; }
.lx-acts button .li { width: 23px; height: 23px; }
.lx-acts button[aria-pressed="true"] { border-color: var(--plum); background: var(--plum-t); color: var(--plum); }
.lx-acts button.is-busy { opacity: .5; pointer-events: none; }
.lx-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 1.2rem 0 0; overflow: hidden; border-radius: 16px; border: 1px solid var(--line-2); background: var(--line-2); }
.lx-facts div { padding: .6rem .85rem; background: var(--card); min-width: 0; }
.lx-facts div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.lx-facts dt { color: var(--faint); font-size: 12px; } .lx-facts dd { margin: 0; font-weight: 700; font-size: 13.5px; overflow-wrap: anywhere; } .lx-facts a { color: var(--plum); }
.lx-rate { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; padding: .8rem 1rem; border-radius: 16px; background: var(--mist); }
.lx-rate b { font-size: 14px; } .lx-rate div { display: flex; direction: rtl; }
.lx-rate button { display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: none; color: var(--faint); cursor: pointer; }
.lx-rate button .li { width: 26px; height: 26px; } .lx-rate button .li-f { opacity: 0; }
.lx-rate button.on { color: var(--saff); } .lx-rate button.on .li-f { opacity: 1; }
.lx-rel-h { margin-top: 1.4rem; margin-bottom: .6rem; font-size: 1rem; }
.lx-rel { display: grid; gap: .4rem; }
.lx-rel a { display: grid; grid-template-columns: auto 1fr; column-gap: .7rem; align-items: center; padding: .55rem .7rem; border-radius: 14px; border: 1px solid var(--line-2); }
.lx-rel a:hover { border-color: var(--c); }
.lx-rel span { grid-row: span 2; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: color-mix(in srgb, var(--c) 12%, var(--card)); color: color-mix(in srgb, var(--c) 85%, var(--ink)); }
.lx-rel b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lx-rel small { color: var(--mut); font-size: 12px; }
.lx-report { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin-top: 1.3rem; }
.lx-report > button, .lx-report > a { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; border: 0; padding: 0; background: none; color: var(--mut); font-size: 13px; cursor: pointer; }
.lx-report .li { width: 16px; height: 16px; }
.lx-report form { display: grid; gap: .5rem; width: 100%; } .lx-report form .lx-btn { justify-self: start; }
.lx-sheet-foot { display: flex; gap: .6rem; padding: .8rem 1rem calc(.8rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); }
.lx-sheet-foot .lx-btn { flex: 1; }
.lx-preview { margin-top: 1.1rem; }
.lx-sheet.is-wide { width: min(1240px, calc(100% - 20px)); }
.lx-sheet.is-wide .lx-sheet-bar, .lx-sheet.is-wide .lx-sheet-body, .lx-sheet.is-wide .lx-sheet-foot { width: 440px; }
.lx-sheet.is-wide .lx-preview { position: absolute; top: 0; bottom: 0; left: 0; right: 440px; margin: 0; background: #3A3446; border-left: 1px solid var(--line-2); }
.lx-preview iframe { width: 100%; height: 100%; border: 0; }
.lx-preview img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; }

.lx-modal { top: 50%; left: 50%; width: min(760px, calc(100% - 32px)); max-height: 88vh; overflow-y: auto; gap: 1rem; padding: 1.5rem; border-radius: 28px; transform: translate(-50%, -46%) scale(.97); opacity: 0; }
.lx-layer.on .lx-modal { transform: translate(-50%, -50%); opacity: 1; }
.lx-modal-h { display: flex; justify-content: space-between; gap: 1rem; } .lx-modal-h h2 { font-size: 1.6rem; } .lx-modal-h p { color: var(--mut); font-size: 14px; }
.lx-modal > .lx-btn { align-self: center; flex-shrink: 0; }

.lx-palette { top: 9vh; left: 50%; width: min(660px, calc(100% - 24px)); max-height: 76vh; border-radius: 24px; overflow: hidden; transform: translate(-50%, -14px) scale(.98); opacity: 0; }
.lx-layer.on .lx-palette { transform: translate(-50%, 0); opacity: 1; }
.lx-pal-in { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem .7rem 1.1rem; padding-inline: 1.1rem .7rem; border-bottom: 1px solid var(--line-2); }
.lx-pal-in > .li { width: 25px; height: 25px; color: var(--plum); }
.lx-pal-in input { flex: 1; min-width: 0; min-height: 48px; border: 0; outline: 0; background: none; font-size: 17px; color: var(--ink); }
.lx-pal-in input::-webkit-search-cancel-button { display: none; }
.lx-pal-in .lx-iconbtn { border: 0; background: var(--mist); }
.lx-hits { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: .4rem .6rem .8rem; }
.lx-hits h3 { font-size: 12px; color: var(--faint); padding: .8rem .6rem .3rem; }
.lx-hits > p { padding: 1rem .6rem .5rem; }
.lx-hits a { display: flex; align-items: center; gap: .75rem; padding: .5rem .6rem; border-radius: 14px; }
.lx-hits a > span:first-child { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--c) 13%, var(--card)); color: color-mix(in srgb, var(--c) 85%, var(--ink)); }
.lx-hits a > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.lx-hits b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lx-hits small { color: var(--mut); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lx-hits a.on, .lx-hits a:hover { background: var(--mist); }
.lx-pal-keys { display: flex; gap: 1.2rem; padding: .6rem 1.1rem; border-top: 1px solid var(--line-2); color: var(--faint); font-size: 12px; }
.lx-pal-keys kbd { font: 600 11px var(--f-body); padding: .1rem .4rem; margin-inline-end: .2rem; border-radius: 6px; background: var(--mist); }
.lib-page .toasts { z-index: 120; }
.lib-page .tap-layer { z-index: 130; }

.lx-dock { display: none; }
.lx-night.is-float { position: fixed; right: 20px; bottom: 20px; z-index: 65; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 17px; border: 1px solid var(--line); background: var(--card); color: var(--ink); box-shadow: var(--sh-2); cursor: pointer; }
.lx-night.is-float .li { width: 23px; height: 23px; }

/* ---------- Night reading ---------- */
html.lib-night { color-scheme: dark; --ink: #EFE9F7; --ink-2: #CFC5DF; --mut: #A89CBB; --faint: #81759A; --paper: #120B1D; --card: #1C1429; --mist: #281D3A; --mist-2: #332649; --line: #382A50; --line-2: #2C213F; --plum: #D6336F; --plum-2: #E24A83; --plum-t: #3C1630; --saff-t: #392708; --saff-d: #F7B64B; --sky-t: #0C2C40; --sky-d: #58BCEE; --ok: #3CCB91; --ok-t: #0F3226; --bad: #FF7285; --bad-t: #3F1520; --sh-1: 0 1px 2px rgba(0, 0, 0, .4); --sh-2: 0 16px 32px -18px rgba(0, 0, 0, .8); }
html.lib-night .lib { --page: #2A2040; --room: #0C0716; --room-2: #1D1131; }
html.lib-night .lx-ov { --page: #2A2040; }
html.lib-night .hdr, html.lib-night .hdr.is-stuck { background: rgba(18, 11, 29, .9); border-bottom-color: var(--line-2); }
html.lib-night .hdr-nav ul { border-color: var(--line); }
html.lib-night .hdr-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
html.lib-night .btn-ink { background: var(--plum); }
html.lib-night .brand-uni img { filter: brightness(1.35); }
html.lib-night .lx-cover b, html.lib-night .lx-cover-ic, html.lib-night .lx-kind { color: color-mix(in srgb, var(--c) 45%, #fff); }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
	.lx-types { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.lx-bar-row { flex-wrap: wrap; }
	.lx-more-f { display: inline-grid; }
	.lx-selects { display: none; order: 5; width: 100%; flex-wrap: wrap; }
	.lx-bar.open .lx-selects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.lx-bar.open .lx-selects select { width: 100%; }
}
@media (max-width: 900px) {
	.lx-shelf { display: none; }
	.lx-shelf-wrap { margin-top: 2rem; }
	.lx-college-grid.is-home { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-template-rows: repeat(2, auto); grid-auto-columns: 148px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -20px; padding: 2px 20px; scroll-padding-inline: 20px; }
	.lx-college-grid.is-home > * { scroll-snap-align: start; }
	.lx-split, .lx-calc { grid-template-columns: minmax(0, 1fr); }
	.lx-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.lx-result { position: static; order: -1; }
}

/* ---------- Phones ---------- */
@media (max-width: 760px) {
	body.is-lib .tabbar { display: none; }
	.lib .wrap { width: calc(100% - 28px); }
	.lx-college-grid.is-home { margin-inline: -14px; padding-inline: 14px; scroll-padding-inline: 14px; }
	.lx-hero { padding-top: 1.4rem; }
	.lx-hero-top { display: block; margin-bottom: 1.2rem; }
	.lx-stats { justify-content: space-between; margin-top: 1.1rem; padding: .7rem 1.4rem; border-radius: 18px; background: rgba(255, 255, 255, .07); }
	.lx-find { min-height: 58px; border-radius: 18px; font-size: 15px; padding: 0 1rem; box-shadow: 0 0 0 4px rgba(255, 255, 255, .09), 0 18px 40px -20px rgba(0, 0, 0, .65); }
	.lx-find kbd { display: none; }
	.lx-quick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -14px; padding-inline: 14px; }
	.lx-head p { font-size: 13px; }
	.lx-grid { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
	.lx-grid .lx-card-a { flex-direction: row; align-items: stretch; }
	.lx-grid .lx-cover { width: 94px; aspect-ratio: auto; min-height: 116px; gap: 0; }
	.lx-grid .lx-cover b, .lx-grid .lx-lines { display: none; }
	.lx-grid .lx-cover-ic { margin: 0; } .lx-grid .lx-cover-ic .li { width: 28px; height: 28px; }
	.lx-grid .lx-cover em { right: 50%; translate: 50% 0; }
	.lx-grid .lx-cover.has-img img { left: 8%; width: 84%; }
	.lx-grid .lx-card-b { padding: .35rem .8rem .2rem .2rem; padding-left: 3rem; }
	.lx-view { display: none; }
	.lx-rail { grid-auto-columns: 188px; gap: .7rem; margin-inline: -14px; padding-inline: 14px; scroll-padding-inline: 14px; }
	.lx-rail .lx-save { width: 34px; height: 34px; }
	.lx-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.lx-types a { grid-template-columns: auto 1fr; column-gap: .65rem; align-items: center; padding: .75rem; border-radius: 16px; }
	.lx-types .li { grid-row: span 2; margin: 0; width: 26px; height: 26px; }
	.lx-types b { font-size: 13px; line-height: 1.4; } .lx-types small { font-size: 11.5px; }
	.lx-tool { padding: 1rem; min-height: 150px; }
	.lx-tool span { width: 44px; height: 44px; border-radius: 14px; }
	.lx-bar { top: calc(var(--hdr) + env(safe-area-inset-top)); }
	.admin-bar .lx-bar { top: var(--hdr); }
	.lx-courses { grid-template-columns: minmax(0, 1fr); }
	.lx-chead-ic { width: 60px; height: 60px; border-radius: 19px; } .lx-chead-ic .li { width: 32px; height: 32px; }
	.lx-chead-a { display: grid; grid-template-columns: 1fr 1fr; } .lx-chead-a .lx-btn { padding: 0 .6rem; font-size: 13.5px; }
	.lx-majors { margin-inline: -14px; padding-inline: 14px; }
	.lx-req { flex-wrap: wrap; } .lx-req-b { flex-basis: calc(100% - 70px); } .lx-req > .lx-btn, .lx-req > .lx-done { margin-inline-start: auto; }
	.lx-f2, .lx-f3 { grid-template-columns: minmax(0, 1fr); }
	.lx-calc .lx-f2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.lx-pickgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.lx-toolnav { gap: .4rem; }
	.lx-toolnav a { flex-direction: column; gap: .25rem; min-height: 76px; padding: .4rem .2rem; font-size: 11.5px; text-align: center; line-height: 1.35; border-radius: 16px; }
	.lx-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 40px; padding-bottom: .6rem; border-bottom: 1px solid var(--line-2); }
	.lx-row input[data-k="n"] { grid-column: 1 / -1; }
	.lx-exams li { flex-wrap: wrap; } .lx-exams li > div:nth-child(2) { flex-basis: calc(100% - 90px); } .lx-exams li > .lx-btn { margin-inline-start: auto; }
	.lx-result b { font-size: 3.6rem; }

	.lx-grab { display: block; flex-shrink: 0; height: 22px; position: relative; touch-action: none; }
	.lx-grab::before { content: ''; position: absolute; top: 9px; left: 50%; width: 44px; height: 5px; border-radius: 5px; translate: -50% 0; background: var(--line); }
	.lx-sheet, .lx-sheet.is-wide, .lx-modal { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 93dvh; border-radius: 26px 26px 0 0; transform: translateY(100%); opacity: 1; }
	.lx-layer.on .lx-sheet, .lx-layer.on .lx-modal { transform: none; }
	.lx-sheet { height: 93dvh; }
	.lx-sheet-bar { padding-top: 0; }
	.lx-modal { padding: 0 1rem calc(1.2rem + env(safe-area-inset-bottom)); }
	.lx-modal .lx-grab { margin-bottom: -.8rem; }
	.lx-palette { top: 0; left: 0; width: 100%; height: 100%; height: 100dvh; max-height: none; border-radius: 0; transform: translateY(24px); padding-top: env(safe-area-inset-top); }
	.lx-layer.on .lx-palette { transform: none; }
	.lx-pal-keys { display: none; }

	.lx-dock { position: fixed; left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 70; display: grid; grid-template-columns: 1fr 1fr 76px 1fr 1fr; align-items: center; height: 62px; border-radius: 22px; background: color-mix(in srgb, var(--card) 90%, transparent); -webkit-backdrop-filter: saturate(1.7) blur(20px); backdrop-filter: saturate(1.7) blur(20px); border: 1px solid var(--line-2); box-shadow: 0 16px 36px -14px rgba(28, 16, 48, .45); }
	.lx-dock a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 100%; color: var(--faint); font-size: 11px; font-weight: 700; }
	.lx-dock .li { width: 23px; height: 23px; }
	.lx-dock a[aria-current="page"] { color: var(--plum); } .lx-dock a[aria-current="page"] .li-f { opacity: .36; }
	.lx-dock a i { position: absolute; top: 6px; left: calc(50% - 22px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--plum); color: #fff; font: 700 10px/17px var(--f-body); font-style: normal; text-align: center; }
	.lx-dock-find { justify-self: center; display: grid; place-items: center; width: 58px; height: 58px; margin-top: -26px; border-radius: 20px; border: 4px solid var(--paper); background: linear-gradient(145deg, #C21D64, #6B2266); color: #fff; box-shadow: 0 12px 22px -8px rgba(163, 19, 79, .75); cursor: pointer; }
	.lx-dock .lx-dock-find .li { width: 27px; height: 27px; }
	.lx-timerpill { left: 14px; bottom: calc(var(--tab) + 18px); }
	.lib-page .toasts { bottom: calc(var(--tab) + 76px); }
}
@media (max-width: 360px) {
	.lx-tools { grid-template-columns: minmax(0, 1fr); }
	.lx-chead-a { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
	.lib *, .lx-layer *, .lx-ov, .lx-scrim { animation: none !important; transition: none !important; }
}
@media print { .lx-night, .lx-dock, .lx-bar, .lx-timerpill { display: none !important; } }
