/* ============================================================
   SamGenie EduShelf — Royal Purple & Gold (Logo-Matched)
   ------------------------------------------------------------
   Palette extracted from the brand logo:
   • Deep violet #66188A / #3C0E58 / #160524
   • Gold        #DFAD4C / #F8E6A0
   • Warm rose   #B46168
   Drop-in stylesheet: same class names and CSS-variable NAMES
   as the original, so all inline styles adapt automatically.
   ============================================================ */

:root {
  /* Palette (names preserved, values = logo colors) */
  --orange: #DFAD4C;      /* gold — primary action */
  --blue: #66188A;        /* logo violet */
  --yellow: #DFAD4C;      /* gold */
  --pink: #B46168;        /* logo rose */
  --green: #0FA77A;
  --bg: #FAF6FF;          /* lavender-white */
  --surface: #FFFFFF;
  --text: #1E0A2E;        /* deep plum */
  --muted: #7A6A8A;
  --border: rgba(102, 24, 138, 0.16);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --shadow-soft: 0 10px 26px -12px rgba(60, 14, 88, 0.16);
  --shadow-app: 0 22px 50px -18px rgba(60, 14, 88, 0.30);

  /* Extras (internal) */
  --violet: #8B2FC4;
  --violet-mid: #66188A;
  --violet-deep: #3C0E58;
  --plum-ink: #160524;
  --gold: #DFAD4C;
  --gold-light: #F8E6A0;
  --rose: #B46168;
  --grad-primary: linear-gradient(135deg, #3C0E58, #66188A 55%, #8B2FC4);
  --grad-gold: linear-gradient(135deg, #EBC06A, #DFAD4C);
  --grad-rose: linear-gradient(135deg, #C47A80, #B46168);
  --grad-hero: linear-gradient(120deg, #160524 0%, #3C0E58 48%, #66188A 100%);
  --grad-aurora: linear-gradient(135deg, #FFFFFF, #F7EFFC 55%, #FDF6E3);
  --glass: rgba(251, 248, 255, 0.86);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(900px 520px at 88% -10%, rgba(102, 24, 138, 0.12), transparent 62%),
    radial-gradient(820px 500px at -8% 110%, rgba(223, 173, 76, 0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  overflow: hidden;
  height: 100vh;
  display: flex;
}

button, input, select, textarea { font-family: inherit; }
:focus-visible { outline: 2px solid var(--violet-mid); outline-offset: 2px; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: 300px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 20px;
  flex-shrink: 0;
  z-index: 90;
  overflow-y: auto;
}
body.drawer-open .sidebar { box-shadow: 20px 0 60px rgba(60, 14, 88, 0.30); }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 18px;
  border-bottom: 1px solid var(--border);
}
.brand-mark {
  width: 52px; height: 44px;
  background: linear-gradient(135deg, #3C0E58, #66188A);
  border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 20px;
  font-family: 'Fraunces', serif;
  color: var(--gold-light);
  box-shadow: 0 6px 16px -6px rgba(60, 14, 88, 0.45);
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand h2 {
  font-size: 17px; line-height: 1.1;
  font-family: 'Fraunces', serif; font-weight: 600;
}
.brand span { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0.06em; }

.nav-section { padding: 6px 0; }
.nav-label {
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em;
  color: var(--muted); padding: 10px 12px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px;
  font-weight: 600; font-size: 14.5px; cursor: pointer;
  transition: 0.15s; color: var(--text);
  border: 1.5px solid transparent;
}
.nav-item:hover { background: rgba(102, 24, 138, 0.08); }
.nav-item.active {
  background: var(--grad-primary);
  color: #FFFFFF;
  box-shadow: 0 10px 24px -8px rgba(102, 24, 138, 0.55);
}
.nav-item .ico { width: 26px; display: grid; place-items: center; }
.nav-item .ico svg { width: 18px; height: 18px; }

.sidebar-foot {
  margin-top: auto;
  background: var(--grad-primary);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 18px 40px -16px rgba(60, 14, 88, 0.55);
}
.sidebar-foot h4 { font-size: 14px; margin-bottom: 6px; font-family: 'Fraunces', serif; font-weight: 600; color: var(--gold-light); }
.sidebar-foot p { font-size: 12px; opacity: 0.8; margin-bottom: 12px; line-height: 1.4; }

/* ===== BUTTONS ===== */
.btn {
  border: none; border-radius: var(--radius-full);
  padding: 12px 18px; font-weight: 700; font-size: 14px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  justify-content: center; transition: 0.18s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-orange {
  background: var(--grad-gold);
  color: #24102E;
  box-shadow: 0 10px 22px -8px rgba(184, 134, 30, 0.55);
}
.btn-white {
  background: rgba(255, 255, 255, 0.92); color: var(--text);
  border: 1.5px solid var(--border);
  box-shadow: 0 6px 16px -10px rgba(60, 14, 88, 0.25);
}
.btn-dark {
  background: var(--grad-primary); color: #FFFFFF;
  box-shadow: 0 10px 22px -8px rgba(102, 24, 138, 0.55);
}
.btn-full { width: 100%; }

/* ===== APP LAYOUT ===== */
.app { flex: 1; display: flex; flex-direction: column; overflow: hidden; position: relative; padding-top: 28px; }

.topbar {
  height: 68px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
  padding: 0 22px; position: sticky; top: 0; z-index: 10;
}
.menu-btn {
  display: none; width: 40px; height: 40px; border-radius: 12px;
  border: 1.5px solid var(--border); background: rgba(255, 255, 255, 0.92);
  place-items: center; cursor: pointer; font-size: 17px;
}
.search-app {
  flex: 1; max-width: 520px;
  background: rgba(102, 24, 138, 0.07);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  display: flex; align-items: center;
  padding: 6px 6px 6px 16px; gap: 10px; transition: 0.18s;
}
.search-app:focus-within {
  border-color: var(--violet-mid);
  box-shadow: 0 0 0 4px rgba(102, 24, 138, 0.12);
  background: rgba(255, 255, 255, 0.94);
}
.search-app input { flex: 1; background: transparent; border: none; outline: none; font-family: inherit; font-size: 14.5px; font-weight: 500; }
.search-app button {
  width: 38px; height: 38px; border-radius: var(--radius-full);
  background: var(--grad-primary); color: #FFFFFF; border: none;
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 8px 18px -8px rgba(102, 24, 138, 0.6);
}
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.92); border: 1.5px solid var(--border);
  display: grid; place-items: center; cursor: pointer; position: relative; transition: 0.15s;
}
.icon-btn:hover { border-color: var(--violet-mid); transform: translateY(-1px); }
.badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--rose); color: #fff;
  font-size: 10px; font-weight: 800; padding: 2px 6px;
  border-radius: var(--radius-full); border: 2px solid #fff;
}

/* ===== CONTENT ===== */
.content { flex: 1; overflow-y: auto; padding: 22px; padding-bottom: 100px; -webkit-overflow-scrolling: touch; }
.content::-webkit-scrollbar { width: 6px; }
.content::-webkit-scrollbar-thumb { background: #D9C6EC; border-radius: 99px; }
.screen { display: none; animation: slideUp 0.28s ease; }
.screen.active { display: block; }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ===== HERO BANNER (royal purple + gold) ===== */
.app-banner {
  background:
    radial-gradient(420px 260px at 90% -25%, rgba(223, 173, 76, 0.30), transparent 62%),
    radial-gradient(400px 240px at -8% 120%, rgba(139, 47, 196, 0.25), transparent 60%),
    var(--grad-hero);
  color: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 26px;
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 20px;
  position: relative; overflow: hidden;
  box-shadow: 0 26px 60px -22px rgba(60, 14, 88, 0.55);
}
.app-banner::after {
  content: ''; position: absolute; width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(223, 173, 76, 0.45), transparent 65%);
  right: -50px; top: -70px; border-radius: 50%;
}
.app-banner h1 {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: clamp(26px, 3.2vw, 40px);
  letter-spacing: -0.01em; line-height: 0.98; margin-bottom: 12px;
  position: relative; z-index: 1; color: #FFFFFF;
}
.app-banner h1 span {
  background: linear-gradient(120deg, #F8E6A0, #DFAD4C);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--gold);
}
.app-banner p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14.5px; max-width: 440px; margin-bottom: 18px; line-height: 1.55;
  position: relative; z-index: 1;
}
.banner-stats {
  display: flex; gap: 18px; margin-top: 10px; position: relative; z-index: 1;
}
.banner-stats div b { display: block; font-size: 20px; font-weight: 700; color: var(--gold-light); font-family: 'Fraunces', serif; }
.banner-stats div span { font-size: 11px; color: rgba(255, 255, 255, 0.75); letter-spacing: 0.08em; font-weight: 700; }

.banner-visual { display: grid; place-items: center; position: relative; z-index: 1; }
.phone-mock {
  width: 180px; height: 320px; background: white; border-radius: 28px;
  border: 4px solid #E6D7F2;
  box-shadow: 0 24px 50px -16px rgba(22, 5, 36, 0.4);
  padding: 12px; transform: rotate(-4deg); position: relative;
}
.phone-notch { width: 70px; height: 6px; background: #160524; border-radius: 99px; margin: 0 auto 12px; }
.mini-card { background: #FBF6FF; border: 1.5px solid var(--border); border-radius: 14px; padding: 10px; margin-bottom: 10px; }
.mini-card b { font-size: 12px; display: block; }
.mini-card small { font-size: 10px; color: var(--muted); }

/* ===== SECTIONS ===== */
.section-title { display: flex; justify-content: space-between; align-items: end; margin: 30px 0 16px; }
.section-title h2 { font-family: 'Fraunces', serif; font-weight: 600; font-size: 22px; letter-spacing: -0.01em; }
.section-title a { font-size: 13px; font-weight: 700; color: var(--violet-mid); text-decoration: none; cursor: pointer; transition: 0.15s; }
.section-title a:hover { color: #2A0B3C; }

/* ===== H-SCROLL / CAT PILLS ===== */
.h-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.h-scroll::-webkit-scrollbar { display: none; }
.cat-pill {
  flex-shrink: 0; min-width: 160px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--border); border-radius: 20px; padding: 16px;
  display: flex; flex-direction: column; gap: 8px; cursor: pointer;
  transition: 0.18s; box-shadow: var(--shadow-soft);
}
.cat-pill:hover { transform: translateY(-3px); box-shadow: var(--shadow-app); border-color: rgba(102, 24, 138, 0.45); }
.cat-pill.active { border-color: transparent; background: var(--grad-primary); color: #FFFFFF; box-shadow: 0 14px 30px -12px rgba(102, 24, 138, 0.6); }
.cat-ico { font-size: 26px; }
.cat-pill b { font-size: 14px; }
.cat-pill span { font-size: 11px; opacity: 0.7; }

/* ===== APP GRID & CARDS ===== */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.app-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--border); border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow-soft); display: flex; flex-direction: column; transition: 0.18s;
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-app); border-color: rgba(102, 24, 138, 0.45); }
.app-card-top { height: 108px; padding: 14px; position: relative; display: flex; flex-direction: column; justify-content: space-between; }
.app-card-top.primary { background: linear-gradient(135deg, #F8E6A0, #DFAD4C); }
.app-card-top.secondary { background: linear-gradient(135deg, #C47A80, #B46168); color: white; }
.app-card-top.university { background: linear-gradient(135deg, #66188A, #8B2FC4); }
.app-card-top.jamb { background: linear-gradient(135deg, #DFAD4C, #B46168); color: white; }
.card-badge {
  align-self: flex-start; background: rgba(255, 255, 255, 0.95);
  border-radius: 99px; padding: 4px 10px; font-size: 10px; font-weight: 800;
  letter-spacing: 0.06em; color: var(--text); border: 1.5px solid var(--border);
}
.card-icon { font-size: 34px; opacity: 0.9; }
.app-card-body { padding: 14px 14px 12px; flex: 1; display: flex; flex-direction: column; }
.app-card-body h4 { font-size: 14.5px; line-height: 1.25; margin-bottom: 4px; }
.app-card-body p { font-size: 12px; color: var(--muted); line-height: 1.4; margin-bottom: 10px; flex: 1; }
.card-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.mini-chip {
  font-size: 10px; font-weight: 700; padding: 4px 8px; border-radius: 99px;
  background: rgba(102, 24, 138, 0.08); border: 1px solid var(--border); color: var(--text);
}
.card-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1.5px dashed var(--border); }
.price { font-weight: 800; font-size: 16px; color: #A8563E; }
.add-btn {
  width: 36px; height: 36px; border-radius: 12px;
  background: var(--grad-primary); color: #FFFFFF; border: none;
  display: grid; place-items: center; cursor: pointer; font-size: 16px;
  box-shadow: 0 8px 18px -8px rgba(102, 24, 138, 0.6); transition: 0.15s;
}
.add-btn:hover { transform: translateY(-1px) scale(1.05); }

/* ===== EMPTY ===== */
.empty {
  text-align: center; padding: 60px 20px;
  background: rgba(255, 255, 255, 0.8);
  border: 1.5px dashed var(--border); border-radius: var(--radius-xl);
}

/* ===== BOTTOM NAV (MOBILE) ===== */
.bottom-nav {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 32px); max-width: 420px;
  background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: 24px;
  display: none; padding: 8px; gap: 6px; z-index: 35;
  box-shadow: 0 18px 44px -14px rgba(60, 14, 88, 0.4); transition: 0.28s ease;
}
body.drawer-open .bottom-nav { transform: translateX(-50%) translateY(150%); opacity: 0; pointer-events: none; }
.bnav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px; border-radius: 16px; color: #7A6A8A; cursor: pointer; transition: 0.18s;
}
.bnav-item:hover { background: rgba(102, 24, 138, 0.08); }
.bnav-item.active {
  background: var(--grad-primary); color: #FFFFFF;
  box-shadow: 0 10px 22px -8px rgba(102, 24, 138, 0.6);
}
.bnav-item span { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; }
.bnav-item .ico { display: grid; place-items: center; }
.bnav-item .ico svg { width: 20px; height: 20px; }

/* ===== SUBJECT CHIPS ===== */
.subj { cursor: pointer; transition: 0.15s; }
.subj:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -6px rgba(102, 24, 138, 0.4);
  background: var(--grad-primary) !important;
  color: #FFFFFF !important; border-color: transparent !important;
}

/* ===== OVERLAY ===== */
.overlay {
  position: fixed; inset: 0; background: rgba(22, 5, 36, 0.45);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  z-index: 80; display: none; opacity: 0; transition: 0.22s;
}
.overlay.show { display: block; opacity: 1; }

/* ===== SCROLL CONTROLS ===== */
.scroll-btn {
  transition: 0.15s; width: 38px; height: 38px; border-radius: 12px;
  border: 1.5px solid var(--border); background: rgba(255, 255, 255, 0.92);
  display: grid; place-items: center; cursor: pointer; font-weight: 800; font-size: 16px;
}
.scroll-btn:hover {
  border-color: transparent !important;
  background: var(--grad-primary) !important; color: #FFFFFF !important;
}
.scroll-controls { display: flex; gap: 8px; align-items: center; }

/* ===== TOP CENTER BRAND ===== */
.top-center-brand {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 100;
  background: var(--grad-primary); color: var(--gold-light);
  padding: 6px 18px; border-radius: 0 0 14px 14px;
  font-family: 'Fraunces', serif; font-weight: 600; font-size: 13px; letter-spacing: 0.06em;
  box-shadow: 0 8px 22px -8px rgba(60, 14, 88, 0.6);
  transition: 0.25s ease; pointer-events: none;
  white-space: nowrap; line-height: 1.15; max-width: calc(100vw - 18px);
  overflow: hidden; text-overflow: ellipsis;
}
body.drawer-open .top-center-brand { transform: translateX(-50%) translateY(-100%); opacity: 0; }

/* ===== UNIVERSITY ===== */
.uni-header {
  display: flex; gap: 16px; align-items: center;
  background: var(--grad-primary); color: #FFFFFF;
  border-radius: 22px; padding: 18px; margin-bottom: 18px;
  box-shadow: 0 16px 36px -16px rgba(102, 24, 138, 0.55);
}
.uni-logo {
  width: 56px; height: 56px; background: linear-gradient(135deg, #F8E6A0, #DFAD4C);
  color: #24102E; border-radius: 16px; display: grid; place-items: center;
  font-weight: 800; font-size: 22px;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.3);
}
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 14px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); cursor: pointer; text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { color: var(--violet-mid); }
.breadcrumb b { color: var(--text); }

/* ===== FACULTY ACCORDION ===== */
.faculty-group {
  background: rgba(255, 255, 255, 0.92); border: 1.5px solid var(--border);
  border-radius: 18px; overflow: hidden; margin-bottom: 12px; box-shadow: var(--shadow-soft);
}
.faculty-head { padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; background: transparent; transition: 0.15s; }
.faculty-head:hover { background: rgba(102, 24, 138, 0.05); }
.faculty-head h4 { font-size: 14.5px; display: flex; align-items: center; gap: 10px; }
.faculty-head span.meta {
  font-size: 11px; background: rgba(102, 24, 138, 0.08); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 99px; font-weight: 700; color: var(--muted);
}
.faculty-body { display: none; padding: 0 12px 12px; background: rgba(102, 24, 138, 0.035); }
.faculty-group.open .faculty-body { display: grid; gap: 8px; }
.faculty-group.open .faculty-head { background: rgba(102, 24, 138, 0.06); }
.dept-row {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255, 255, 255, 0.95); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 12px 14px; cursor: pointer; transition: 0.15s;
}
.dept-row:hover { border-color: var(--violet-mid); transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.dept-left { display: flex; align-items: center; gap: 10px; }
.dept-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(102, 24, 138, 0.1); display: grid; place-items: center; font-size: 18px;
}
.dept-name { font-weight: 600; font-size: 13.5px; }
.dept-sub { font-size: 11px; color: var(--muted); }

/* ===== LEVEL CHIPS / CARDS ===== */
.level-chip {
  font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 99px;
  background: var(--grad-primary); color: #FFFFFF;
}
.level-chip.l400 { background: #E8F5E9; color: #1B5E20; border: 1px solid #C8E6C9; }
.level-chip.l500 { background: #FFF3E0; color: #E65100; border: 1px solid #FFCC80; }
.level-chip.l600 { background: #F3E5F5; color: #6A1B9A; border: 1px solid #E1BEE7; }
.level-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.level-card {
  background: rgba(255, 255, 255, 0.92); border: 2px solid var(--border);
  border-radius: 20px; padding: 22px 16px; text-align: center; cursor: pointer;
  transition: 0.18s; position: relative; overflow: hidden;
  user-select: none; -webkit-user-select: none; box-shadow: var(--shadow-soft);
}
.level-card:hover { border-color: var(--violet-mid); transform: translateY(-4px); box-shadow: var(--shadow-app); }
.level-card:active { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.level-card b { font-size: 28px; display: block; font-family: 'Fraunces', serif; font-weight: 600; }
.level-card span { font-size: 12px; color: var(--muted); font-weight: 600; }
.level-card .count {
  position: absolute; top: 10px; right: 12px; font-size: 10px; font-weight: 800;
  background: var(--gold-light); color: #24102E; padding: 2px 8px; border-radius: 99px;
}

.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.92); border: 1.5px solid var(--border);
  border-radius: 99px; padding: 8px 14px; font-size: 13px; font-weight: 700;
  cursor: pointer; margin-bottom: 14px; transition: 0.15s;
}
.back-btn:hover { border-color: var(--violet-mid); }

/* ===== PAST QUESTIONS ===== */
.no-copy { user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -webkit-touch-callout: none; }
.choice-card {
  background: rgba(255, 255, 255, 0.92); border: 2px solid var(--border);
  border-radius: 22px; padding: 22px; display: flex; gap: 16px; align-items: center;
  cursor: pointer; transition: 0.18s; box-shadow: var(--shadow-soft);
}
.choice-card:hover { border-color: var(--violet-mid); transform: translateY(-3px); box-shadow: var(--shadow-app); }
.choice-icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  font-size: 26px; flex-shrink: 0; background: rgba(102, 24, 138, 0.1);
}
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.year-card {
  background: rgba(255, 255, 255, 0.92); border: 1.5px solid var(--border);
  border-radius: 16px; padding: 16px; text-align: center; cursor: pointer;
  transition: 0.15s; font-weight: 700;
}
.year-card:hover {
  background: var(--grad-primary); color: #FFFFFF; border-color: transparent;
  box-shadow: 0 10px 22px -8px rgba(102, 24, 138, 0.55);
}
.past-q-card {
  background: rgba(255, 255, 255, 0.92); border: 1.5px solid var(--border);
  border-radius: 18px; padding: 18px; margin-bottom: 14px; transition: 0.15s; cursor: pointer;
}
.past-q-card:hover { border-color: rgba(102, 24, 138, 0.45); }
.past-q-card h4 { font-size: 15px; margin-bottom: 10px; font-weight: 700; }
.past-q-card p { font-size: 16px; line-height: 1.7; color: var(--text); }
.past-q-answer {
  display: none; margin-top: 12px; padding: 12px;
  background: #F0FAF2; border: 1px solid #C8E6C9; border-radius: 12px;
  font-size: 14px; font-weight: 600; color: #1B5E20;
}
.past-q-card.revealed .past-q-answer { display: block; }
.past-q-card .tap-hint { font-size: 11px; color: var(--muted); margin-top: 8px; }

/* ===== COURSE ROW ===== */
.course-row {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255, 255, 255, 0.92); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; transition: 0.15s; cursor: pointer;
}
.course-row:hover { border-color: var(--violet-mid); }

/* ===== STORE ===== */
.store-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.store-tab {
  padding: 8px 16px; border-radius: 99px; border: 1.5px solid var(--border);
  background: rgba(255, 255, 255, 0.92); font-weight: 700; font-size: 13px;
  cursor: pointer; transition: 0.15s;
}
.store-tab:hover { border-color: var(--violet-mid); }
.store-tab.active {
  background: var(--grad-primary); color: #FFFFFF; border-color: transparent;
  box-shadow: 0 10px 22px -8px rgba(102, 24, 138, 0.55);
}
.store-dept-panel {
  background: rgba(255, 255, 255, 0.92); border: 1.5px solid var(--border);
  border-radius: 18px; padding: 14px; margin-top: 12px; box-shadow: var(--shadow-soft);
}

/* ===== SEARCH BOX ===== */
.search-box {
  width: 100%; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--border);
  font-family: inherit; font-size: 14px; font-weight: 500; margin-bottom: 16px;
  outline: none; transition: 0.15s; background: rgba(255, 255, 255, 0.92);
}
.search-box:focus { border-color: var(--violet-mid); box-shadow: 0 0 0 4px rgba(102, 24, 138, 0.12); }

/* ===== NOTE RENDERING ===== */
.pdf-pages { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.markdown-content { overflow-wrap: break-word; }
.markdown-content img { max-width: 100%; }

/* ===== LOGGED-OUT ===== */
body.not-logged-in .sidebar { display: none !important; }
body.not-logged-in .bottom-nav { display: none !important; }
body.not-logged-in .topbar { display: none !important; }
body.not-logged-in .top-center-brand { display: block !important; }
body.not-logged-in .content { padding-top: 50px; }

/* ===== LOGO-MATCHED HELPERS ===== */
.featured-uni {
  background: linear-gradient(135deg, #3C0E58, #66188A 55%, #8B2FC4) !important;
  color: #FFFFFF !important;
  border: 0 !important;
  box-shadow: 0 16px 34px -14px rgba(60, 14, 88, 0.6) !important;
}
.daily-card {
  background: linear-gradient(135deg, #160524, #3C0E58 55%, #66188A) !important;
  color: #FFFFFF !important;
  border-radius: 18px !important;
  padding: 16px !important;
  box-shadow: 0 20px 44px -16px rgba(22, 5, 36, 0.6);
  position: relative; overflow: hidden;
}
.daily-card::after {
  content: ''; position: absolute; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(223, 173, 76, 0.35), transparent 65%);
  right: -50px; top: -60px; border-radius: 50%; pointer-events: none;
}
.daily-card > * { position: relative; z-index: 1; }
.why-card {
  background: rgba(255, 255, 255, 0.92) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 20px !important;
  padding: 18px 16px !important;
  text-align: center !important;
  box-shadow: var(--shadow-soft);
  transition: 0.18s !important;
}
.why-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-app); border-color: rgba(102, 24, 138, 0.45) !important; }
.dark-card {
  background: linear-gradient(135deg, #160524, #3C0E58 60%, #66188A) !important;
  color: #FFFFFF !important;
  box-shadow: 0 20px 44px -16px rgba(22, 5, 36, 0.6);
}

/* ===== OWNERSHIP / POLICIES ===== */
.ownership-card {
  background: rgba(255, 255, 255, 0.92); border: 1.5px solid var(--border);
  border-radius: 18px; padding: 20px; line-height: 1.75; font-size: 14px; box-shadow: var(--shadow-soft);
}
.ownership-card h2 { font-family: 'Fraunces', serif; font-weight: 600; margin-bottom: 8px; }
.ownership-card h3 { font-family: 'Fraunces', serif; font-weight: 600; font-size: 15px; margin: 20px 0 5px; }
.ownership-card p { margin: 8px 0; }
.ownership-card ul { padding-left: 20px; }

/* ===== UPLOADED HTML NOTES (preserve legibility) ===== */
.html-note-content { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; width:100%; overflow-wrap: break-word; }
.html-note-frame { display:block; width:100%; min-height:620px; height:900px; border:0; border-radius:12px; background:#fff; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.html-note-content h1, .html-note-content h2, .html-note-content h3, .html-note-content h4, .html-note-content h5, .html-note-content h6 { font-family: "Times New Roman", Times, serif; line-height: 1.3; margin: 22px 0 11px; font-weight: 700; }
.html-note-content h1 { font-size: 1.55em; }
.html-note-content h2 { font-size: 1.32em; }
.html-note-content h3 { font-size: 1.16em; }
.html-note-content p { margin: 0 0 16px; }
.html-note-content ul, .html-note-content ol { margin: 0 0 16px 24px; padding: 0; }
.html-note-content li { margin: 0 0 7px; }
.html-note-content table { width: 100%; max-width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .95em; }
.html-note-content th, .html-note-content td { border: 1px solid #DECEF0; padding: 8px; vertical-align: top; }
.html-note-content th { font-weight: 700; background: #F5EEFC; }
.html-note-content blockquote { margin: 16px 0; padding: 10px 14px; border-left: 4px solid #DFAD4C; background: #FDF6E3; }
.html-note-content hr { margin: 22px 0; border: 0; border-top: 1px solid #D9C6EC; }

/* ===== ACADEMIC TOOLKIT ===== */
.toolkit-markdown { margin-top: 18px; font-family: Inter, system-ui, sans-serif; font-size: 15px; line-height: 1.8; }
.toolkit-markdown h2, .toolkit-markdown h3, .toolkit-markdown h4, .toolkit-markdown h5 { font-family: 'Fraunces', serif; color: var(--text); margin: 24px 0 10px; }
.toolkit-markdown p { margin: 0 0 14px; }
.toolkit-markdown ul, .toolkit-markdown ol { margin: 0 0 16px 24px; }
.toolkit-markdown li { margin-bottom: 7px; }
.toolkit-markdown code { background: #F3EAF9; border-radius: 6px; padding: 2px 5px; font-family: ui-monospace, monospace; }
.toolkit-markdown blockquote { margin: 16px 0; padding: 12px 14px; border-left: 4px solid var(--gold); background: #FDF6E3; border-radius: 0 10px 10px 0; }
.toolkit-markdown table { width: 100%; border-collapse: collapse; margin: 16px 0; min-width: 460px; }
.toolkit-markdown th, .toolkit-markdown td { border: 1px solid #DECEF0; padding: 9px; text-align: left; vertical-align: top; }
.toolkit-markdown th { background: #F5EEFC; }
.toolkit-markdown hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }

/* ===== RESPONSIVE ===== */
@media (min-width: 981px) {
  .app { padding-top: 0; }
  .top-center-brand { top: 12px; border-radius: 999px; padding: 7px 16px; font-size: 12px; }
  .sidebar { transform: none !important; position: relative; }
  .overlay { display: none !important; }
  .bottom-nav { display: none !important; }
}
@media (max-width: 980px) {
  body { flex-direction: column; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-105%); transition: 0.26s ease;
    box-shadow: 20px 0 60px rgba(60, 14, 88, 0.3);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-btn { display: grid; }
  .top-actions .hide-m { display: none; }
  .content { padding: 16px; padding-bottom: 110px; }
  .app-banner { grid-template-columns: 1fr; }
  .banner-visual { display: none; }
  .bottom-nav { display: flex; }
  .app-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .app-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 14px; }
}
@media (max-width: 700px) {
  .app-banner { padding: 22px 18px !important; }
  .app-banner h1 { font-size: 28px !important; line-height: 1.1 !important; }
  .app-banner p { font-size: 13px !important; margin-top: 8px !important; }
  .banner-stats { margin-top: 14px !important; }
  .app-banner .btn { padding: 10px 12px !important; font-size: 13px !important; }
  .phone-mock { display: none !important; }
  .hero { padding: 22px 18px !important; min-height: auto !important; }
  .hero h1 { font-size: 28px !important; line-height: 1.1 !important; }
  .hero p { font-size: 13px !important; margin-top: 8px !important; }
  .hero-stats { margin-top: 14px !important; }
  .hero .btn { padding: 10px 12px !important; font-size: 13px !important; }
}
/* Performance mode for Android WebView and mobile devices. Keeps the Royal Purple & Gold look while removing costly GPU effects. */
@media (max-width: 900px) {
  .sidebar, .bottom-nav, .bnav, .top-center-brand, .search-app, .search-box,
  .nav, .daily-card, .hero, .banner, .uni-header {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .screen { animation: none !important; }
  .content { -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; touch-action: pan-y pinch-zoom; }
  .app-card, .choice-card, .course-row, .level-card, .dept-row, .faculty-head,
  .cat-pill, .nav-item, .bnav-item, .btn { transition: none !important; }
  .app-card, .choice-card, .course-row, .level-card, .uni-header, .hero, .banner { box-shadow: none !important; }
}
@media (max-width:700px){.menu-btn{width:54px!important;min-width:54px!important;height:48px!important;font-size:24px!important}.topbar{gap:8px!important}.search-app{min-width:0!important;flex:1!important}.top-actions{gap:5px!important}.top-actions .icon-btn{width:46px!important;min-width:46px!important;height:46px!important;display:grid!important}.top-actions .hide-m{display:none!important}}

@keyframes sgSpin{to{transform:rotate(360deg)}}
