:root {
  --ink: #3b3350;
  --muted: #766e84;
  --line: #e9e0ee;
  --paper: #ffffff;
  --canvas: #fff6ea;
  --teal: #6754a3;
  --teal-2: #d74683;
  --cyan: #e7f3ff;
  --blue: #f3efff;
  --amber: #e6b85d;
  --amber-soft: #fff2cf;
  --coral: #ff7aae;
  --pink: #ff7aae;
  --pink-soft: #ffd8e7;
  --lavender: #b99bea;
  --shadow: 0 18px 55px rgba(105, 78, 130, .14);
  --radius: 24px;
}

/* Keep conditional account, plan and modal controls truly hidden even when
   their component styles set display:flex/grid later in this stylesheet. */
[hidden] { display: none !important; }

* { box-sizing: border-box; }
html { font-family: Nunito, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--canvas); }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, [contenteditable="true"]:focus-visible { outline: 3px solid rgba(255,122,174,.3); outline-offset: 2px; }

.announcement { min-height: 38px; display: grid; place-items: center; padding: 8px 16px; text-align: center; color: white; background: linear-gradient(90deg, #ac94e8 0%, #ff8fba 100%); font-size: .75rem; font-weight: 800; letter-spacing: .01em; }

.app-shell { min-height: calc(100vh - 38px); display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: calc(100vh - 38px); padding: 28px 18px 20px; display: flex; flex-direction: column; background: linear-gradient(165deg, #8f79ce 0%, #b28de0 48%, #e688b3 100%); color: white; }
.brand { display: flex; align-items: center; gap: 12px; color: white; text-decoration: none; padding: 0 8px 28px; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #7152a5; background: #fff; font-weight: 700; font-family: Fredoka, sans-serif; font-size: 1.4rem; box-shadow: inset -5px -5px 0 #ffe0ec; }
.brand strong, .brand small { display: block; }
.brand strong { font-family: Fredoka, sans-serif; font-size: 1.22rem; letter-spacing: -.02em; }
.brand small { margin-top: 2px; color: #d9dcf2; font-size: .72rem; }
.nav-list { display: grid; gap: 7px; }
.nav-item { border: 0; width: 100%; padding: 13px 14px; display: flex; gap: 12px; align-items: center; border-radius: 12px; background: transparent; color: #e2e4f5; font-size: .93rem; cursor: pointer; text-align: left; }
.nav-item span { width: 22px; font-size: 1.1rem; text-align: center; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.12); color: white; }
.sidebar-foot { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid rgba(255,255,255,.15); display: flex; align-items: center; gap: 10px; }
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot strong { font-size: .82rem; }
.sidebar-foot small { color: #d0d4eb; margin-top: 2px; font-size: .72rem; }
.teacher-avatar { width: 37px; height: 37px; border-radius: 50%; display: grid; place-items: center; background: #dce8ff; color: #4c568c; font-weight: 800; font-size: .78rem; }

.main { min-width: 0; padding: 30px clamp(20px, 4vw, 54px) 54px; background: radial-gradient(circle at 92% 5%, rgba(203,224,255,.72), transparent 25%), radial-gradient(circle at 6% 22%, rgba(255,216,231,.68), transparent 23%), var(--canvas); }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.topbar h1 { margin: 5px 0 0; font-family: Fredoka, Nunito, sans-serif; font-weight: 500; font-size: clamp(1.7rem, 2.9vw, 2.55rem); line-height: 1.12; letter-spacing: -.025em; }
.eyebrow { margin: 0; color: var(--teal-2); font-size: .72rem; font-weight: 850; letter-spacing: .13em; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.account-button { min-height: 39px; padding: 8px 13px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid #d8caea; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--teal); font-weight: 850; font-size: .78rem; cursor: pointer; white-space: nowrap; }
.account-button:hover { background: #f8f4ff; border-color: #bda8db; }
.account-dot { width: 9px; height: 9px; border-radius: 50%; background: #c0b8c8; box-shadow: 0 0 0 3px rgba(192,184,200,.16); }
.account-button.online .account-dot { background: #5eb58a; box-shadow: 0 0 0 3px rgba(94,181,138,.17); }
.week-chip { padding: 9px 14px; border-radius: 999px; background: #f4f0ff; color: var(--teal); font-weight: 800; font-size: .82rem; white-space: nowrap; }
.icon-button, .menu-button { border: 1px solid var(--line); background: white; border-radius: 11px; min-width: 39px; height: 39px; display: inline-grid; place-items: center; cursor: pointer; }
.icon-button:hover, .menu-button:hover { border-color: #adc6c7; background: #f9fdfc; }
.menu-button { display: none; }
.icon-button.small { min-width: 34px; height: 34px; }

.status-strip { min-height: 68px; display: flex; align-items: center; gap: 24px; padding: 13px 18px; border: 1px solid rgba(255,255,255,.9); border-radius: 19px; background: rgba(255,255,255,.9); box-shadow: 0 9px 25px rgba(105,78,130,.08); margin-bottom: 22px; }
.status-strip > div, .status-review-button { display: flex; align-items: center; gap: 10px; min-width: 0; }
.status-review-button { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.status-review-button:hover strong { color: #7252a7; }
.status-review-button:focus-visible { outline: 3px solid rgba(117,84,170,.25); outline-offset: 5px; border-radius: 8px; }
.status-strip p, .progress-item p { margin: 0; }
.status-strip strong, .status-strip small, .progress-item strong, .progress-item small { display: block; }
.status-strip strong { font-size: .82rem; }
.status-strip small { color: var(--muted); margin-top: 2px; font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.status-icon { width: 29px; height: 29px; border-radius: 9px; display: grid; place-items: center; font-weight: 900; }
.status-icon.good { background: #e3f1ff; color: #5875b2; }
.status-icon.warn { background: var(--amber-soft); color: #7252a7; }
.status-icon.carry { background: #f0e6ff; color: #7450a6; }
.status-icon.cloud { background: #f0e6ff; color: #7450a6; }
.status-icon.cloud.online { background: #def4e8; color: #398660; }
.status-icon.access { background: #fff0c9; color: #8a5c13; }
.cloud-status-button { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.cloud-status-button:hover strong { color: #7252a7; }
.access-status-button.active .status-icon.access { background: #ddf5e8; color: #26704b; }
.access-status-button.blocked .status-icon.access { background: #fde3e7; color: #9c3b53; }
.text-button { margin-left: auto; border: 0; color: var(--teal-2); background: transparent; font-weight: 800; cursor: pointer; white-space: nowrap; }

.screen { display: none; }
.screen.active { display: block; animation: fade-in .25s ease both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } }
.primary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.generate-card { position: relative; overflow: hidden; isolation: isolate; min-height: 148px; border: 1px solid rgba(255,255,255,.72); padding: 25px; border-radius: var(--radius); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; text-align: left; cursor: pointer; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.generate-card::after { content: ""; position: absolute; z-index: -1; width: 150px; height: 150px; right: -46px; top: -70px; border-radius: 50%; background: rgba(255,255,255,.32); }
.generate-card:hover { transform: translateY(-3px); box-shadow: 0 21px 60px rgba(72,78,145,.2); }
.generate-card.today { background: linear-gradient(135deg, #e5f2ff, #bfdcf9); color: #36466f; }
.generate-card.week { background: linear-gradient(135deg, #f0e5ff, #d7c3f5 60%, #ffd2e4); color: #4c3a68; }
.card-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: rgba(255,255,255,.56); box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); font-size: 1.55rem; }
.week .card-icon { background: rgba(255,255,255,.5); }
.card-copy small, .card-copy strong, .card-copy span { display: block; }
.card-copy small { font-size: .68rem; letter-spacing: .13em; font-weight: 850; opacity: .8; }
.card-copy strong { margin: 5px 0 3px; font-family: Fredoka, sans-serif; font-weight: 600; font-size: clamp(1.4rem, 2vw, 1.8rem); }
.card-copy span { font-size: .82rem; opacity: .82; }
.arrow { font-size: 1.7rem; }

.carry-panel { margin: -4px 0 22px; padding: 17px 19px; border: 1px solid #decdf3; border-radius: 20px; background: linear-gradient(120deg, rgba(247,242,255,.96), rgba(238,247,255,.96)); box-shadow: 0 10px 30px rgba(105,78,130,.07); }
.carry-heading { display: flex; align-items: center; gap: 12px; }
.carry-heading h2 { margin: 2px 0 0; font-family: Fredoka, sans-serif; font-size: 1.06rem; }
.carry-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: #e8d9fb; color: #7450a6; font-size: 1.3rem; font-weight: 900; }
.carry-count { margin-left: auto; min-width: 34px; height: 34px; padding: 0 10px; display: grid; place-items: center; border-radius: 999px; background: #fff; color: #694b96; font-weight: 900; box-shadow: 0 6px 18px rgba(105,78,130,.12); }
.carry-list { margin-top: 12px; display: grid; gap: 9px; }
.carry-empty { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.carry-item { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 11px 12px; border: 1px solid rgba(214,196,237,.88); border-radius: 14px; background: rgba(255,255,255,.82); }
.carry-item strong, .carry-item small { display: block; }
.carry-item strong { font-size: .83rem; }
.carry-item small { margin-top: 3px; color: var(--muted); font-size: .71rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carry-label { padding: 6px 9px; border-radius: 999px; background: #fff0d5; color: #825c16; font-size: .68rem; font-weight: 850; white-space: nowrap; }
.carry-use { border: 0; border-radius: 999px; padding: 8px 11px; background: #7358aa; color: #fff; font-size: .7rem; font-weight: 850; cursor: pointer; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(290px, .8fr); gap: 18px; }
.panel { background: rgba(255,255,255,.92); border: 1px solid rgba(255,255,255,.95); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(105,78,130,.08); }
.schedule-panel, .progress-panel, .page-panel { padding: 22px; }
.page-panel { min-height: 560px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.panel-heading.compact { margin-bottom: 14px; }
.panel-heading h2 { margin: 4px 0 0; font-family: Fredoka, sans-serif; font-weight: 600; font-size: 1.16rem; }
.heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.outline-button, .primary-button, .mini-button { border-radius: 999px; cursor: pointer; font-weight: 800; }
.outline-button { padding: 9px 15px; border: 1px solid #d8caea; background: white; color: var(--teal); }
.outline-button:hover { background: #f8f4ff; }
.primary-button { padding: 11px 18px; border: 0; background: linear-gradient(135deg, #ff8fb8, #ff7aae); color: var(--ink); box-shadow: 0 8px 20px rgba(255,122,174,.32); }
.primary-button:hover { filter: saturate(1.08); transform: translateY(-1px); }
.danger-button { padding: 9px 15px; border: 1px solid #efbfd0; border-radius: 999px; background: #fff5f8; color: #a33e65; font-weight: 850; cursor: pointer; }
.danger-button:hover { background: #ffeaf1; }
.carry-button { padding: 10px 15px; border: 1px solid #cdb7e8; border-radius: 999px; background: linear-gradient(135deg, #eee4ff, #e2efff); color: #5e4789; font-weight: 850; cursor: pointer; white-space: nowrap; }
.carry-button:hover { background: linear-gradient(135deg, #e6d8fa, #d9eaff); }
.mini-button { padding: 7px 10px; border: 0; background: var(--amber-soft); color: #85530b; font-size: .72rem; }
.session-list { display: grid; gap: 10px; }
.session-item { width: 100%; border: 1px solid var(--line); background: #fffdfc; border-radius: 16px; padding: 13px 14px; display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 13px; text-align: left; cursor: pointer; }
.session-item:hover { border-color: #aeb9e2; background: #f8f9ff; }
.session-time { font-weight: 800; font-size: .78rem; line-height: 1.25; }
.session-main strong, .session-main small { display: block; }
.session-main strong { font-size: .9rem; }
.session-main small { margin-top: 3px; color: var(--muted); font-size: .75rem; }
.session-badge { border-radius: 999px; padding: 6px 9px; background: var(--cyan); color: var(--teal); font-size: .69rem; font-weight: 850; white-space: nowrap; }
.session-badge.missing { background: #f1ebff; color: #7655a8; }
.session-badge.locked { background: #fde7ee; color: #a13d63; }
.progress-list { display: grid; gap: 10px; }
.progress-item > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.progress-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.progress-item strong { font-size: .83rem; }
.progress-item small { color: var(--muted); margin-top: 2px; font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 185px; }
.progress-item.muted { margin-top: 5px; padding-top: 14px; border-top: 1px dashed var(--line); }
.class-dot { flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; font-weight: 900; font-size: .72rem; }
.class-dot.um { background: #dceaff; color: #425eaa; }
.class-dot.us { background: #e8dfff; color: #634ca0; }
.class-dot.ut { background: #edf0ff; color: #59618f; }
.progress-value { font-size: .74rem; font-weight: 850; color: var(--teal); }
.progress-bar { height: 5px; overflow: hidden; border-radius: 99px; background: #edf2f1; margin-left: 50px; }
.progress-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8fbbe9, #b592e4, #ff8fb8); }
.progress-note { margin: 18px 0 0; padding: 12px; display: flex; gap: 8px; border-radius: 12px; background: #f0f7f6; color: #50696b; font-size: .72rem; line-height: 1.45; }
.progress-note span { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; background: var(--cyan); display: grid; place-items: center; color: var(--teal); font-weight: 900; }

.support-copy { margin: -5px 0 20px; color: var(--muted); font-size: .85rem; }
.auth-modal { width: min(510px, calc(100vw - 28px)); }
.auth-benefits { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid #ddd2ee; border-radius: 16px; background: linear-gradient(130deg, #f4efff, #eef7ff 58%, #fff0f6); }
.auth-benefits > span { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; background: #fff; color: #6d53a0; font-size: 1.25rem; box-shadow: 0 7px 18px rgba(105,78,130,.1); }
.auth-benefits p { margin: 0; }
.auth-benefits strong, .auth-benefits small { display: block; }
.auth-benefits strong { font-size: .88rem; }
.auth-benefits small { margin-top: 3px; color: var(--muted); font-size: .74rem; line-height: 1.4; }
.auth-form { display: grid; gap: 13px; margin-top: 16px; }
.auth-form .field { display: grid; gap: 6px; }
.auth-form label { font-size: .76rem; font-weight: 850; }
.auth-form input { width: 100%; padding: 12px 13px; border: 1px solid #ded5e7; border-radius: 12px; background: #fff; color: var(--ink); }
.auth-form input:focus { border-color: #ac8bd8; }
.auth-message { min-height: 20px; margin: 0; color: var(--muted); font-size: .74rem; line-height: 1.4; }
.auth-message.error { color: #a33e65; }
.auth-message.success { color: #34795a; }
.auth-actions, .auth-signed-actions { display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.auth-session { margin-top: 16px; padding: 14px; display: flex; align-items: center; gap: 11px; border: 1px solid #dce9e3; border-radius: 15px; background: #f4fbf7; }
.auth-session strong, .auth-session small { display: block; }
.auth-session small { margin-top: 2px; color: var(--muted); font-size: .73rem; }
.auth-signed-actions { margin-top: 14px; }
.membership-card { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.membership-card > div { padding: 11px; border: 1px solid #e2d9ee; border-radius: 13px; background: #fbf8ff; }
.membership-card span, .purchase-summary span { display: block; color: var(--muted); font-size: .68rem; font-weight: 750; }
.membership-card strong, .purchase-summary strong { display: block; margin-top: 4px; color: var(--teal); font-size: .82rem; }
.device-list { display: grid; gap: 7px; margin: 0 0 14px; }
.admin-test-panel { margin-top: 14px; padding: 16px; border: 1px solid #d7c5f4; border-radius: 18px; background: linear-gradient(135deg, #f5efff, #fff4fa); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.admin-test-panel[hidden] { display: none; }
.admin-test-panel strong { display: block; color: #3f335a; margin: 6px 0 3px; }
.admin-test-panel p { margin: 0; color: #746c82; font-size: .88rem; line-height: 1.45; }
.test-badge { display: inline-flex; padding: 4px 9px; border-radius: 999px; background: #7354ad; color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .08em; }
.admin-test-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.device-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border: 1px solid #e4ddec; border-radius: 11px; background: #fff; }
.device-row p { margin: 0; }
.device-row strong, .device-row small { display: block; }
.device-row small { margin-top: 2px; color: var(--muted); font-size: .68rem; }
.device-row button { border: 0; background: transparent; color: #9a3d59; font-weight: 800; cursor: pointer; }
.purchase-modal { width: min(680px, calc(100vw - 28px)); }
.purchase-summary { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 16px; border-radius: 15px; background: linear-gradient(135deg, #f0e8ff, #eef7ff); }
.purchase-summary > div:last-child { text-align: right; }
.purchase-selections { display: grid; gap: 10px; margin: 14px 0; }
.purchase-choice { display: grid; grid-template-columns: 1fr 130px; gap: 10px; align-items: end; padding: 11px; border: 1px solid #e2d9ee; border-radius: 13px; background: #fff; }
.purchase-choice .field { margin: 0; }
.purchase-choice select { width: 100%; }
.purchase-year-only { grid-template-columns: 1fr; }
.import-info { display: flex; align-items: center; gap: 11px; margin: -4px 0 18px; padding: 12px 14px; border: 1px solid #dce4f8; border-radius: 13px; background: linear-gradient(135deg, #f4f8ff, #f7f3ff); }
.import-info strong, .import-info small { display: block; }
.import-info strong { font-size: .82rem; }
.import-info small { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.library-hero { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 18px 20px; margin-bottom: 16px; border-radius: 19px; background: linear-gradient(125deg, #e6f3ff, #eee4ff 62%, #ffd9e8); }
.library-hero strong, .library-hero small { display: block; }
.library-hero strong { font-family: Fredoka, sans-serif; font-size: 1.08rem; }
.library-hero small { margin-top: 4px; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.library-percent { flex: 0 0 auto; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.78); color: var(--teal); font-weight: 900; box-shadow: 0 8px 22px rgba(105,78,130,.12); }
.subject-library { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 18px; }
.subject-card { min-height: 72px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 15px; background: #fffdfc; text-align: left; cursor: pointer; }
.subject-card:hover, .subject-card.active { border-color: #c5abe7; background: #f8f3ff; }
.subject-card strong, .subject-card small { display: block; }
.subject-card strong { font-size: .78rem; line-height: 1.25; }
.subject-card small { margin-top: 7px; color: var(--muted); font-size: .68rem; }
.subject-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 7px; }
.subject-card.kiv { background: #fffaf0; border-color: #ead4a5; }
.subject-card.pending { background: #faf9fc; border-style: dashed; }
.library-status { flex: 0 0 auto; padding: 3px 6px; border-radius: 999px; font-size: .54rem; font-weight: 900; letter-spacing: .04em; }
.library-status.ready { color: #4f6599; background: #e5efff; }
.library-status.pending { color: #716a7b; background: #ece9ef; }
.library-status.kiv { color: #8a5d16; background: #ffefc8; }
.primary-button:disabled { cursor: not-allowed; opacity: .58; filter: grayscale(.2); }
.subject-card .subject-progress { height: 4px; margin-top: 7px; overflow: hidden; border-radius: 99px; background: #efeaf2; }
.subject-card .subject-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8ab8ea, #b493e3, #ff8fb8); }
.library-toolbar { display: grid; grid-template-columns: minmax(210px, 1.35fr) repeat(4, minmax(135px, 1fr)); gap: 12px; margin: 4px 0 18px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: #fffaf7; }
.library-detail-heading { padding-top: 17px; border-top: 1px solid var(--line); }
.timetable { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.timetable table { width: 100%; min-width: 780px; border-collapse: collapse; }
.timetable th, .timetable td { padding: 10px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font-size: .76rem; }
.timetable th { background: #eef2ff; color: var(--teal); }
.timetable th:first-child { text-align: left; }
.timetable td:first-child { font-weight: 850; text-align: left; background: #f8fbfb; }
.lesson-pill { display: inline-block; padding: 5px 7px; border-radius: 7px; background: linear-gradient(135deg, #e2eeff, #eee7ff); color: #54609e; font-weight: 850; }
.schedule-list-heading { margin: 24px 0 10px; display: flex; justify-content: space-between; align-items: flex-end; gap: 15px; }
.schedule-list-heading h3 { margin: 3px 0 0; font-family: Fredoka, sans-serif; font-size: 1rem; }
.schedule-list-heading > span { padding: 6px 10px; border-radius: 999px; background: #f1ecfb; color: var(--teal); font-size: .7rem; font-weight: 850; }
.schedule-editor-list { display: grid; gap: 8px; }
.schedule-editor-row { display: grid; grid-template-columns: 85px minmax(160px, 1.3fr) minmax(150px, 1fr) auto; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; background: #fffdfc; }
.schedule-editor-row strong, .schedule-editor-row small { display: block; }
.schedule-editor-row strong { font-size: .8rem; }
.schedule-editor-row small { margin-top: 2px; color: var(--muted); font-size: .69rem; }
.schedule-row-time { color: #56629a; font-size: .74rem; font-weight: 900; }
.schedule-row-actions { display: flex; gap: 6px; }
.schedule-row-actions button { border: 1px solid #d8caea; border-radius: 999px; padding: 6px 9px; background: white; color: var(--teal); font-size: .67rem; font-weight: 850; cursor: pointer; }
.schedule-row-actions .delete-session { color: #a43f65; border-color: #efc6d5; }
.schedule-editor-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.schedule-editor-fields .full { grid-column: 1 / -1; }
.schedule-import-modal { width: min(980px, 100%); }
.schedule-import-status { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border-radius: 15px; background: linear-gradient(135deg, #eef6ff, #f5edff); }
.schedule-import-status strong, .schedule-import-status small { display: block; }
.schedule-import-status small { margin-top: 4px; color: var(--muted); font-size: .76rem; line-height: 1.4; }
.import-spinner { width: 30px; height: 30px; flex: 0 0 auto; border: 4px solid #d8c9ef; border-top-color: #7252a4; border-radius: 50%; animation: import-spin .8s linear infinite; }
.schedule-import-status.done .import-spinner { border: 0; display: grid; place-items: center; background: #dff4e8; color: #26724c; animation: none; }
.schedule-import-status.done .import-spinner::after { content: "✓"; font-weight: 900; }
.schedule-import-status.error { background: #fff2ef; }
.schedule-import-status.error .import-spinner { border: 0; display: grid; place-items: center; background: #ffdcd4; color: #9b3f31; animation: none; }
.schedule-import-status.error .import-spinner::after { content: "!"; font-weight: 900; }
.schedule-import-progress { height: 8px; margin: 11px 0 16px; overflow: hidden; border-radius: 999px; background: #eee9f2; }
.schedule-import-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #83b8eb, #9d7bd1, #f18db4); transition: width .25s ease; }
.schedule-import-summary { display: grid; grid-template-columns: 126px minmax(0, 1fr); gap: 14px; align-items: center; margin-bottom: 13px; padding: 11px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.schedule-import-summary img { width: 126px; height: 78px; object-fit: cover; border-radius: 9px; border: 1px solid #ddd; }
.schedule-import-summary strong, .schedule-import-summary small { display: block; }
.schedule-import-summary small { margin-top: 4px; color: var(--muted); font-size: .74rem; line-height: 1.4; }
.schedule-import-rows { display: grid; gap: 9px; max-height: 46vh; overflow: auto; padding-right: 4px; }
.schedule-import-row { display: grid; grid-template-columns: 105px 112px 112px minmax(150px, 1fr) 86px minmax(135px, 1fr) auto 34px; gap: 8px; align-items: end; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.schedule-import-row.needs-review { border-color: #e6ba67; background: #fffaf0; }
.schedule-import-row label { display: grid; gap: 5px; color: var(--muted); font-size: .67rem; font-weight: 800; }
.schedule-import-row input, .schedule-import-row select { width: 100%; min-height: 39px; border: 1px solid #c9d2d3; border-radius: 9px; padding: 7px 8px; background: white; color: var(--ink); }
.schedule-import-review { align-self: center; padding: 5px 8px; border-radius: 999px; background: #fff0cf; color: #875b11; font-size: .66rem; font-weight: 900; white-space: nowrap; }
.schedule-import-review.good { background: #dff4e8; color: #26724c; }
.remove-import-row { align-self: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: #f9e8e5; color: #9b4538; font-size: 1rem; cursor: pointer; }
.add-import-row { margin-top: 12px; }
@keyframes import-spin { to { transform: rotate(360deg); } }
.rpt-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.rpt-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.rpt-table th, .rpt-table td { padding: 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .78rem; line-height: 1.4; }
.rpt-table th { background: #eef2ff; color: var(--teal); }
.rpt-table tr:last-child td { border-bottom: 0; }
.rpt-status { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #719dde; }
.rpt-status.next { background: var(--amber); }
.empty-panel { display: grid; place-content: center; justify-items: center; text-align: center; }
.empty-panel[hidden] { display: none; }
.empty-panel p { max-width: 430px; color: var(--muted); line-height: 1.55; }
.collection-panel { min-height: 520px; }
.collection-heading { align-items: end; gap: 18px; }
.collection-heading p:last-child { margin: 6px 0 0; color: var(--muted); }
.collection-filter { min-width: 210px; display: grid; gap: 6px; color: var(--teal); font-size: .73rem; font-weight: 850; }
.collection-filter select { width: 100%; min-height: 42px; padding: 9px 36px 9px 12px; border: 1px solid #d8caea; border-radius: 12px; background: #fff; color: #453a5b; font: inherit; font-size: .82rem; cursor: pointer; }
.collection-list { display: grid; gap: 10px; }
.collection-list:empty { display: none; }
.collection-week { overflow: hidden; border: 1px solid #dfd6e9; border-radius: 16px; background: #fff; }
.collection-week-head { display: flex; align-items: center; gap: 12px; padding: 13px 16px; list-style: none; cursor: pointer; background: linear-gradient(100deg, #f8f4ff, #f3f9ff); }
.collection-week-head::-webkit-details-marker { display: none; }
.collection-week-head::before { content: "›"; flex: 0 0 auto; color: #7655aa; font-size: 1.35rem; font-weight: 900; transform: rotate(0); transition: transform .2s ease; }
.collection-week[open] .collection-week-head::before { transform: rotate(90deg); }
.collection-week-title { min-width: 0; display: grid; gap: 2px; }
.collection-week-title strong { color: var(--teal); font-size: .95rem; }
.collection-week-title small { color: var(--muted); font-size: .72rem; font-weight: 650; }
.collection-week-count { margin-left: auto; flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; background: #eee6fb; color: #65478f; font-size: .72rem; font-weight: 850; }
.collection-week[open] .collection-week-head { border-bottom: 1px solid var(--line); }
.collection-week > .collection-grid { padding: 12px; }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 10px; }
.collection-card { display: grid; gap: 8px; padding: 15px; border: 1px solid #ded7e6; border-radius: 16px; background: linear-gradient(145deg, #fff, #fbf8ff); box-shadow: 0 7px 18px rgba(76,55,103,.06); }
.collection-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.collection-card h4 { margin: 0; color: var(--teal); font-size: .95rem; }
.collection-card p { margin: 3px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.collection-card-date { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: #eee9ff; color: #664695; font-size: .7rem; font-weight: 850; }
.collection-card-actions { display: flex; gap: 7px; margin-top: 3px; }
.collection-card-actions button { flex: 1; border-radius: 10px; padding: 8px; border: 1px solid #d8caea; background: white; color: var(--teal); font-weight: 800; cursor: pointer; }
.collection-card-actions .delete-collection { flex: 0 0 38px; color: #a33d55; border-color: #efd2d8; }
.empty-icon { width: 64px; height: 64px; border-radius: 19px; display: grid; place-items: center; background: var(--cyan); color: var(--teal); font-size: 1.8rem; }

.pricing-page { overflow: hidden; }
.pricing-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.pricing-intro h2 { margin: 5px 0 7px; font-family: Fredoka, sans-serif; font-size: clamp(1.45rem, 2.5vw, 2rem); }
.pricing-intro p:not(.eyebrow) { max-width: 650px; margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.55; }
.founder-chip { flex: 0 0 auto; padding: 9px 13px; border-radius: 999px; background: #fff0c9; color: #805716; font-size: .72rem; font-weight: 900; }
.buyer-access-summary { margin: -4px 0 24px; padding: 17px 18px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 15px; border: 1px solid #eddba9; border-radius: 18px; background: linear-gradient(135deg, #fff9e9, #fffdf6); }
.buyer-access-summary.licensed { border-color: #bfe0d1; background: linear-gradient(135deg, #effaf5, #f7fffb); }
.buyer-access-summary.exhausted { border-color: #efc5d1; background: linear-gradient(135deg, #fff0f4, #fff8fa); }
.buyer-access-summary.admin { border-color: #d0bde9; background: linear-gradient(135deg, #f4efff, #f8f5ff); }
.buyer-access-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: #ffeebd; color: #8b5b0c; font-size: 1.3rem; font-weight: 900; }
.buyer-access-summary.licensed .buyer-access-icon { background: #d8f1e5; color: #2f7b5b; }
.buyer-access-summary.exhausted .buyer-access-icon { background: #f9dbe4; color: #a03e5c; }
.buyer-access-summary.admin .buyer-access-icon { background: #e7dbfa; color: #704ca6; }
.buyer-access-copy { min-width: 0; }
.buyer-access-copy > span { color: #8a6a2b; font-size: .66rem; font-weight: 900; letter-spacing: .1em; }
.buyer-access-copy strong { display: block; margin-top: 3px; color: var(--ink); font-size: .96rem; }
.buyer-access-copy p { margin: 4px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.buyer-access-progress { height: 7px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: rgba(120,91,42,.12); }
.buyer-access-progress i { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e7b349, #f28fba); transition: width .25s ease; }
.buyer-access-items { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 6px; }
.buyer-access-items[hidden] { display: none; }
.buyer-access-items span { padding: 5px 8px; border-radius: 999px; background: white; border: 1px solid #cce4d8; color: #3f6958; font-size: .68rem; font-weight: 800; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; align-items: stretch; }
.price-card { position: relative; padding: 22px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 21px; background: #fffdfc; }
.price-card.featured { border: 2px solid #b494df; background: linear-gradient(155deg, #f7f2ff, #fff8fb); box-shadow: 0 16px 40px rgba(105,78,130,.15); }
.price-card.all-subjects { border-color: #b8d4ee; background: linear-gradient(155deg, #f2f8ff, #fffdfc); }
.popular-label { position: absolute; top: -11px; right: 18px; padding: 5px 9px; border-radius: 999px; background: #7655aa; color: white; font-size: .58rem; font-weight: 900; letter-spacing: .06em; }
.value-label { position: absolute; top: -11px; right: 18px; padding: 5px 9px; border-radius: 999px; background: #5d7ab8; color: white; font-size: .58rem; font-weight: 900; letter-spacing: .06em; }
.plan-name { margin: 0; color: var(--teal-2); font-size: .74rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.plan-price { margin: 10px 0 16px; display: flex; align-items: baseline; gap: 8px; }
.plan-price strong { font-family: Fredoka, sans-serif; font-size: 2.05rem; line-height: 1; }
.plan-price span { color: var(--muted); font-size: .73rem; }
.price-card ul { flex: 1; margin: 0 0 20px; padding-left: 19px; color: #5f576b; font-size: .79rem; line-height: 1.55; }
.price-card li + li { margin-top: 7px; }
.plan-button { width: 100%; }
.plan-includes { margin-top: 18px; padding: 16px 18px; border-radius: 16px; background: #faf7ff; border: 1px solid #e5dbf1; }
.plan-includes > strong { display: block; margin-bottom: 9px; color: #56456d; font-size: .82rem; }
.plan-includes div { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #655c70; font-size: .75rem; }
.pricing-extras { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.compact-price-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 17px; background: #fffdfc; }
.compact-price-card div { min-width: 0; }
.compact-price-card strong { display: inline-block; margin: 6px 10px 0 0; font-family: Fredoka, sans-serif; font-size: 1.45rem; }
.compact-price-card span { color: var(--muted); font-size: .73rem; }
.compact-price-card button { flex: 0 0 auto; }
.upgrade-note { margin: 14px 2px 0; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.availability-note { margin-top: 20px; padding: 16px 18px; border: 1px solid #ddcff0; border-radius: 16px; background: linear-gradient(135deg, #f5f1ff, #eef7ff); }
.availability-note strong { font-size: .84rem; }
.availability-note p { margin: 4px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.pricing-footnote { margin: 13px 2px 0; color: var(--muted); font-size: .7rem; line-height: 1.45; }

.modal-backdrop, .drawer-backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(10,35,39,.52); backdrop-filter: blur(5px); }
.modal-backdrop { display: grid; place-items: center; padding: 20px; }
.modal-backdrop[hidden], .drawer-backdrop[hidden] { display: none; }
.modal { width: min(720px, 100%); max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; background: #fffdfc; border-radius: 26px; box-shadow: 0 25px 80px rgba(59,51,80,.25); }
.modal-header, .drawer-header { padding: 20px 22px; display: flex; justify-content: space-between; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); }
.modal-header h2, .drawer-header h2 { margin: 4px 0 0; font-size: 1.22rem; }
.modal-body { overflow: auto; padding: 18px 22px; }
.modal-footer { padding: 15px 22px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); }
.option-list { display: grid; gap: 10px; }
.week-review-intro { margin-bottom: 13px; padding: 12px 14px; border-radius: 13px; background: linear-gradient(135deg, #f1eaff, #edf6ff); color: #504466; }
.week-review-intro strong, .week-review-intro span { display: block; }
.week-review-intro strong { font-size: .84rem; }
.week-review-intro span { margin-top: 4px; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.option-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 13px; }
.option-row.day-paused { opacity: .58; background: #f7f4fa; }
.option-row.access-locked { background: #fff8fa; border-color: #f1cfda; }
.option-row.access-locked > span:not(.session-badge) { opacity: .68; }
.option-row input { width: 18px; height: 18px; accent-color: var(--teal); }
.option-row strong, .option-row small { display: block; }
.option-row strong { font-size: .86rem; }
.option-row small { color: var(--muted); margin-top: 3px; font-size: .72rem; }
.generation-access-note { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding: 12px 14px; border: 1px solid #ded2ef; border-radius: 14px; background: #f8f5ff; }
.generation-access-note strong, .generation-access-note span { display: block; }
.generation-access-note strong { font-size: .8rem; }
.generation-access-note span { color: var(--muted); font-size: .75rem; text-align: right; }
.generation-access-note.trial { border-color: #f0d89d; background: #fff9e9; }
.generation-access-note.licensed { border-color: #cce7da; background: #f2fbf7; }
.generation-access-note.limit { border-color: #f0c7d4; background: #fff1f5; }
.day-divider { margin: 16px 0 8px; font-size: .75rem; color: var(--teal); letter-spacing: .08em; }
.day-divider:first-child { margin-top: 0; }
.day-review { margin-top: 16px; padding: 11px 12px; border: 1px solid #dfd5ed; border-radius: 13px; background: linear-gradient(135deg, #fbf9ff, #f5faff); }
.day-review:first-child { margin-top: 0; }
.day-divider-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.day-divider-row .day-divider { margin: 0; }
.day-status-select { min-height: 36px; max-width: 210px; border: 1px solid #c8b9dc; border-radius: 9px; padding: 6px 9px; background: white; color: var(--ink); font-size: .72rem; }
.day-change-note { margin-top: 10px; }
.day-change-note label { display: block; margin-bottom: 5px; color: var(--muted); font-size: .7rem; font-weight: 800; }
.day-change-note input { width: 100%; min-height: 40px; border: 1px solid #c8b9dc; border-radius: 9px; padding: 8px 10px; background: white; }
.generation-settings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.generation-settings.week-settings { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field label { display: block; margin-bottom: 6px; font-size: .72rem; font-weight: 800; color: var(--muted); }
.field select, .field input { width: 100%; min-height: 42px; border: 1px solid #bfd0d1; border-radius: 10px; padding: 8px 10px; background: white; }
.import-modal { width: min(790px, 100%); }
.import-summary { display: flex; align-items: center; gap: 12px; padding: 13px; border-radius: 14px; background: linear-gradient(135deg, #eef5ff, #f3edff); }
.import-summary strong, .import-summary small { display: block; }
.import-summary strong { font-size: .88rem; }
.import-summary small { margin-top: 3px; color: var(--muted); font-size: .76rem; }
.import-file-icon { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: #5d70b7; color: white; font-weight: 900; }
.import-fields { margin-top: 12px; padding-top: 0; border-top: 0; }
.review-label { margin: 19px 0 8px; color: var(--muted); font-size: .74rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.import-preview { max-height: 265px; overflow: auto; border: 1px solid var(--line); border-radius: 13px; }
.preview-record { padding: 12px 13px; border-bottom: 1px solid var(--line); }
.preview-record:last-child { border-bottom: 0; }
.preview-record strong, .preview-record small { display: block; }
.preview-record strong { color: #4b5794; font-size: .82rem; }
.preview-record small { margin-top: 4px; color: var(--muted); font-size: .73rem; line-height: 1.4; }
.privacy-note { margin: 12px 0 0; color: var(--muted); font-size: .74rem; line-height: 1.5; }
.tracking-modal { width: min(690px, 100%); }
.tracking-session { padding: 13px 15px; border-radius: 14px; background: linear-gradient(135deg, #eef5ff, #f2eaff); color: #514570; font-size: .82rem; line-height: 1.45; }
.tracking-session strong, .tracking-session small { display: block; }
.tracking-session small { margin-top: 3px; color: var(--muted); }
.status-options { margin: 17px 0 0; padding: 0; border: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.status-options legend { width: 100%; margin-bottom: 8px; color: var(--muted); font-size: .72rem; font-weight: 850; }
.status-options label { min-height: 72px; display: grid; grid-template-columns: auto 1fr; align-items: flex-start; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #fff; cursor: pointer; }
.status-options label:has(input:checked) { border-color: #a98bd2; background: #f8f3ff; box-shadow: inset 0 0 0 1px #c8afe7; }
.status-options input { margin-top: 3px; accent-color: #7554aa; }
.status-options strong, .status-options small { display: block; }
.status-options strong { font-size: .82rem; }
.status-options small { margin-top: 4px; color: var(--muted); font-size: .7rem; line-height: 1.35; }
.tracking-fields { margin-top: 15px; display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.tracking-preview { margin: 14px 0 0; padding: 11px 13px; border-radius: 12px; background: #fff8e9; color: #6c5932; font-size: .74rem; line-height: 1.45; }
.rpt-position-modal { width: min(820px, 100%); }
.rpt-position-list { display: grid; gap: 10px; }
.rpt-position-row { display: grid; grid-template-columns: minmax(185px, .8fr) minmax(280px, 1.5fr); gap: 14px; align-items: center; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.rpt-position-class { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; }
.rpt-position-class strong, .rpt-position-class small { display: block; }
.rpt-position-class strong { font-size: .82rem; }
.rpt-position-class small { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.rpt-position-select { width: 100%; min-height: 44px; border: 1px solid #bfd0d1; border-radius: 10px; padding: 8px 10px; background: white; color: var(--ink); }
.rpt-position-controls { display: grid; gap: 8px; }
.rpt-position-controls [data-rpt-unit] { border-color: #b9a5dc; background: #fbf9ff; font-weight: 700; }
.rpt-position-empty { padding: 18px; border: 1px dashed #ccbde2; border-radius: 14px; background: #faf7ff; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.setup-modal { width: min(610px, 100%); }
.setup-intro { margin: 0 0 17px; color: var(--muted); font-size: .86rem; line-height: 1.55; }
.setup-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.setup-fields .full { grid-column: 1 / -1; }
.group-preview { margin-top: 17px; padding: 15px; display: flex; align-items: center; gap: 13px; border: 1px solid #d9e1f7; border-radius: 15px; background: linear-gradient(135deg, #edf5ff, #f1eaff); }
.group-preview strong, .group-preview small { display: block; }
.group-preview strong { font-size: .94rem; }
.group-preview small { margin-top: 3px; color: var(--muted); font-size: .77rem; }
.group-letter { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, #86b6e8, #ad8cde, #ff91b9); color: white; font-family: Fredoka, sans-serif; font-size: 1.25rem; font-weight: 700; box-shadow: 0 8px 20px rgba(105,78,130,.2); }

.drawer-backdrop { display: flex; justify-content: flex-end; }
.rph-drawer { width: min(850px, 100%); height: 100%; background: #f1f4f3; overflow: auto; box-shadow: -18px 0 60px rgba(0,0,0,.2); }
.drawer-header { position: sticky; top: 0; z-index: 2; background: white; }
.drawer-toolbar { position: sticky; top: 82px; z-index: 2; padding: 11px 22px; display: flex; justify-content: flex-end; gap: 9px; background: rgba(241,244,243,.95); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.word-button { border: 1px solid #96b5da; border-radius: 999px; padding: 10px 15px; background: #eaf4ff; color: #365b88; font: inherit; font-size: .76rem; font-weight: 850; cursor: pointer; }
.word-button:hover { background: #dceeff; }
.batch-navigator { position: sticky; top: 137px; z-index: 2; padding: 10px 18px; display: flex; gap: 7px; overflow-x: auto; background: rgba(248,246,250,.97); border-bottom: 1px solid var(--line); }
.batch-navigator[hidden] { display: none; }
.batch-navigator button { flex: 0 0 auto; border: 1px solid #d8caea; border-radius: 999px; padding: 7px 10px; background: white; color: var(--teal); font-size: .68rem; font-weight: 850; cursor: pointer; }
.batch-navigator button.active { border-color: #7655aa; background: #7655aa; color: white; }
.rph-sheet { width: min(760px, calc(100% - 36px)); margin: 20px auto 45px; padding: 30px; background: white; border: 1px solid #d8d8d8; box-shadow: 0 14px 38px rgba(0,0,0,.11); color: #151515; }
.rph-batch-page + .rph-batch-page { margin-top: 44px; padding-top: 34px; border-top: 4px solid #e7e1ea; }
.rph-document { --rph-accent: #f7cece; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.rph-document.subject-bm { --rph-accent: #f7cece; }
.rph-document.subject-bi { --rph-accent: #dcecff; }
.rph-document.subject-math { --rph-accent: #e7dcfa; }
.rph-document.subject-math-dlp { --rph-accent: #dddffa; }
.rph-document.subject-science { --rph-accent: #ddefd9; }
.rph-document.subject-science-dlp { --rph-accent: #d8f0eb; }
.rph-document.subject-history { --rph-accent: #f8e7c1; }
.rph-document.subject-islamic { --rph-accent: #dcebd8; }
.rph-document.subject-moral { --rph-accent: #f8dfcf; }
.rph-document.subject-art { --rph-accent: #f4dff0; }
.rph-document.subject-music { --rph-accent: #e7ddf7; }
.rph-document.subject-pjpk { --rph-accent: #dcefe5; }
.rph-document.subject-rbt { --rph-accent: #f3dfc7; }
.rph-document.subject-arabic { --rph-accent: #dcecf2; }
.rph-document.subject-note { --rph-accent: #eee8d8; }
.trial-watermark { margin-bottom: 7px; padding: 6px 10px; border: 1px dashed #b16a82; background: #fff1f6; color: #8e3f5c; text-align: center; font: 800 .7rem/1.2 Arial, sans-serif; letter-spacing: .08em; }
.rph-sheet h3 { margin: 0; padding: 7px; text-align: center; border: 1px solid #333; background: var(--rph-accent, #f7cece); font-size: 1.04rem; }
.rph-sheet table { width: 100%; border-collapse: collapse; }
.rph-sheet td, .rph-sheet th { border: 1px solid #333; padding: 7px 9px; vertical-align: top; font-family: Arial, sans-serif; font-size: .82rem; line-height: 1.35; }
.rph-sheet th { text-align: left; background: var(--rph-accent, #f7cece); }
.rph-sheet .label { width: 29%; background: var(--rph-accent, #f7cece); font-weight: 800; }
.rph-sheet ol { margin: 0; padding-left: 20px; }
.rph-activity-flow strong { display: block; margin: 3px 0 5px; font-size: .9rem; }
.rph-activity-flow ol { margin: 0 0 12px; }
.rph-activity-flow ol:last-child { margin-bottom: 0; }
.rph-sheet [contenteditable="true"] { background: #fffce8; box-shadow: inset 0 0 0 2px #efd27c; }
.toast { position: fixed; left: 50%; bottom: 25px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 11px 16px; border-radius: 999px; background: #3b3350; color: white; font-size: .82rem; box-shadow: 0 12px 30px rgba(0,0,0,.2); transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 50; width: 250px; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); box-shadow: 20px 0 50px rgba(0,0,0,.25); }
  .menu-button { display: inline-grid; flex: 0 0 auto; }
  .topbar { justify-content: flex-start; }
  .top-actions { margin-left: auto; }
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .admin-test-panel { align-items: stretch; flex-direction: column; }
  .admin-test-actions > * { flex: 1; }
  .main { padding: 20px 14px 35px; }
  .topbar h1 { font-size: 1.45rem; }
  .week-chip, .top-actions .icon-button { display: none; }
  .status-strip { align-items: stretch; gap: 10px; overflow-x: auto; }
  .status-strip > div, .status-review-button { flex: 0 0 190px; }
  .status-strip .text-button { flex: 0 0 auto; }
  .primary-grid, .content-grid { grid-template-columns: 1fr; }
  .generate-card { min-height: 125px; padding: 20px; }
  .generation-access-note { align-items: flex-start; flex-direction: column; }
  .generation-access-note span { text-align: left; }
  .generation-settings, .generation-settings.week-settings { grid-template-columns: 1fr; }
  .day-divider-row { align-items: stretch; flex-direction: column; }
  .day-status-select { max-width: none; width: 100%; }
  .status-options, .tracking-fields { grid-template-columns: 1fr; }
  .carry-item { grid-template-columns: auto minmax(0,1fr); }
  .carry-use { grid-column: 1 / -1; }
  .setup-fields { grid-template-columns: 1fr; }
  .subject-library { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-toolbar { grid-template-columns: 1fr; }
  .schedule-editor-row { grid-template-columns: 70px minmax(0, 1fr); }
  .schedule-editor-row > :nth-child(3), .schedule-row-actions { grid-column: 2; }
  .schedule-editor-fields { grid-template-columns: 1fr; }
  .schedule-editor-fields .full { grid-column: auto; }
  .schedule-import-row { grid-template-columns: 1fr 1fr; }
  .schedule-import-row label:nth-of-type(4), .schedule-import-row label:nth-of-type(6) { grid-column: 1 / -1; }
  .schedule-import-review, .remove-import-row { justify-self: start; }
  .rpt-position-row { grid-template-columns: 1fr; }
  .pricing-intro { flex-direction: column; gap: 12px; }
  .buyer-access-summary { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .buyer-access-summary > button { grid-column: 1 / -1; width: 100%; }
  .membership-card { grid-template-columns: 1fr 1fr; }
  .purchase-choice { grid-template-columns: 1fr; }
  .collection-heading { align-items: stretch; flex-direction: column; }
  .collection-filter { width: 100%; min-width: 0; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-extras { grid-template-columns: 1fr; }
  .compact-price-card { align-items: flex-start; flex-direction: column; }
  .library-detail-heading { align-items: flex-start; flex-direction: column; }
  .heading-actions { width: 100%; justify-content: flex-start; }
  .setup-fields .full { grid-column: auto; }
  .drawer-toolbar { top: 81px; overflow-x: auto; justify-content: flex-start; }
  .drawer-toolbar button { white-space: nowrap; }
  .rph-sheet { padding: 14px; width: calc(100% - 20px); }
  .rph-sheet td, .rph-sheet th { padding: 6px; font-size: .74rem; }
}

@media print {
  @page { size: A4 portrait; margin: 12mm; }
  html, body { height: auto !important; overflow: visible !important; background: white !important; }
  .rph-sheet, .rph-sheet * { print-color-adjust: exact !important; -webkit-print-color-adjust: exact !important; }
  body > * { display: none !important; }
  body > #drawerBackdrop { display: block !important; position: static !important; inset: auto !important; width: auto !important; height: auto !important; overflow: visible !important; background: none !important; backdrop-filter: none !important; }
  #drawerBackdrop .rph-drawer { position: static !important; width: auto !important; max-width: none !important; height: auto !important; overflow: visible !important; background: white !important; box-shadow: none !important; }
  #drawerBackdrop .drawer-header, #drawerBackdrop .drawer-toolbar, #drawerBackdrop .batch-navigator { display: none !important; }
  .rph-sheet { display: block !important; position: static !important; width: auto !important; margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; overflow: visible !important; }
  .rph-batch-page { display: block !important; break-before: page !important; page-break-before: always !important; }
  .rph-batch-page:first-child { break-before: auto !important; page-break-before: auto !important; }
  .rph-batch-page + .rph-batch-page { margin-top: 0; padding-top: 0; border-top: 0; }
  .rph-sheet table { break-inside: auto; page-break-inside: auto; }
  .rph-sheet tr { break-inside: avoid; page-break-inside: avoid; }
}
