:root {
  --bg: #f5f6fa; --card: #fff; --ink: #1d2433; --muted: #667085;
  --accent: #3b5bdb; --ok: #2b8a3e; --bad: #c92a2a; --line: #e3e6ee;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14171f; --card: #1d212c; --ink: #e8ebf3; --muted: #9aa3b5; --line: #2c3242; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font: 16px/1.6 'Noto Sans Devanagari', 'Nirmala UI', 'Mangal', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  padding-top: var(--safe-top);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  user-select: text;
  -webkit-touch-callout: none;
}

/* Devanagari & Hindi readability */
:lang(hi), .is-hindi, [lang="hi"] {
  font-family: 'Noto Sans Devanagari', 'Nirmala UI', 'Mangal', system-ui, sans-serif;
  line-height: 1.8;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.q-body-text.is-hindi,
.scheme-official-text.is-hindi,
.opt-text-label.is-hindi {
  font-family: 'Noto Sans Devanagari', 'Nirmala UI', 'Mangal', system-ui, sans-serif;
  line-height: 1.85;
  font-size: 1.06rem;
}

/* Math typesetting and formula presentation */
.math-formula, .katex-display {
  margin: 10px 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 0;
}

.katex {
  font-size: 1.08em;
  text-rendering: auto;
}

.math-inline {
  font-family: 'KaTeX_Math', 'Cambria Math', 'STIX Two Math', 'Times New Roman', serif;
  font-style: italic;
  font-size: 1.05em;
  padding: 0 2px;
}
.top { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px;
  background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-left { display: flex; align-items: center; gap: 8px; }
.btn-header-back { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); cursor: pointer; transition: all .15s ease; }
.btn-header-back:active { transform: scale(0.92); background: var(--line); }
.top h1 { font-size: 1.15rem; margin: 0; }
.timer { font-variant-numeric: tabular-nums; font-weight: 600; }
.timer.low { color: var(--bad); }
main { max-width: 860px; margin: 0 auto; padding: 20px 16px 60px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 12px 0; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
select, textarea, input[type=number] { font: inherit; padding: 9px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--bg); color: var(--ink); }
textarea { width: 100%; min-height: 110px; resize: vertical; }
button { font: inherit; padding: 9px 18px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button:disabled { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.muted { color: var(--muted); font-size: .92rem; }
.hidden { display: none !important; }
.section-head { margin: 24px 0 8px; }
.section-head h3 { margin: 0; }
.q { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.q-top { display: flex; justify-content: space-between; gap: 12px; font-size: .85rem; color: var(--muted); }
.q-text { margin: 6px 0 10px; white-space: pre-wrap; }
.opt { display: flex; flex-direction: row; align-items: center; gap: 10px; font-weight: 400; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; cursor: pointer; }
.opt.correct { border-color: var(--ok); background: rgba(43,138,62,.12); }
.opt.wrong { border-color: var(--bad); background: rgba(201,42,42,.12); }
.scheme { margin-top: 10px; padding: 12px; border-left: 4px solid var(--accent); background: var(--bg); border-radius: 6px; white-space: pre-wrap; }
.self-score { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .9rem; }
.self-score input { width: 80px; }
.score-big { font-size: 2.2rem; font-weight: 700; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); font-size: .92rem; }
input[type=search] { font: inherit; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs.sub { margin: 8px 0 14px; }
.tab { border-radius: 999px; padding: 7px 16px; }
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; align-self: end; padding-bottom: 8px; }
.module { margin: 22px 0 6px; font-size: 1.05rem; }
.concept { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
.concept h4 { margin: 0 0 4px; font-size: .98rem; }
.concept ul { margin: 0; padding-left: 20px; font-size: .94rem; }
.g-row { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; padding: 10px 14px; }
.g-row summary { cursor: pointer; font-weight: 600; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.g-row p { margin: 8px 0 0; font-size: .94rem; }
.blueprint { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.blueprint h3 { margin: 0 0 4px; font-size: 1.05rem; }
.blueprint h4 { margin: 14px 0 4px; font-size: .95rem; }
.blueprint ul { margin: 4px 0 0; padding-left: 20px; font-size: .92rem; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.badge { font-size: .8rem; padding: 3px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }

/* Lightweight navigation and class-card styling */
:root {
  --bg: #f5f7ff;
  --card: #ffffff;
  --ink: #20254a;
  --muted: #707795;
  --accent: #6258e8;
  --line: #e8eaf4;
}
body { background: radial-gradient(ellipse at 8% 2%, #eeedff 0, transparent 32%), var(--bg); }
.top { min-height: 68px; padding: 10px max(20px, calc((100vw - 1120px) / 2)); background: rgba(255,255,255,.88); backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; color: var(--ink); background: transparent; font-weight: 600; letter-spacing: -.03em; }
.brand strong { color: var(--accent); }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; color: #fff; font-weight: 800; background: linear-gradient(145deg,#8279ff,#4f46d8); box-shadow: 0 6px 14px #6258e83d; }
main { max-width: 1120px; min-height: calc(100vh - 145px); padding: 20px 22px 110px; }
.breadcrumbs { display: flex; align-items: center; gap: 9px; min-height: 28px; margin: 0 0 14px; color: var(--muted); font-size: .86rem; }
.breadcrumbs button { padding: 0; border: 0; background: transparent; color: var(--accent); font-size: inherit; }
.breadcrumbs button:hover { text-decoration: underline; }
.crumb-separator { color: #aab0c4; font-size: 1.15rem; }
.hero { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 300px; overflow: hidden; padding: 42px 54px; border-radius: 28px; color: #fff; background: linear-gradient(115deg,#5148d9 0%,#7568f4 55%,#9d7cf5 100%); box-shadow: 0 18px 48px #6258e82b; }
.hero-copy { position: relative; z-index: 1; max-width: 590px; }
.eyebrow { color: #8178f1; font-size: .71rem; font-weight: 800; letter-spacing: .13em; }
.hero .eyebrow { color: #dedcff; }
.hero h1 { margin: 12px 0; font-size: clamp(2rem,4.8vw,3.45rem); line-height: 1.08; letter-spacing: -.055em; }
.hero h1 span { color: #e0dcff; }
.hero p { max-width: 500px; margin: 0 0 24px; color: #eeedff; }
.hero-button { border: 0; border-radius: 12px; padding: 12px 18px; color: #5148d9; background: #fff; font-weight: 700; box-shadow: 0 7px 18px #3425a02b; transition: transform .2s ease, box-shadow .2s ease; }
.hero-button span { padding-left: 8px; }
.hero-button:hover { transform: translateY(-2px); box-shadow: 0 10px 22px #3425a045; }
.hero-art { position: relative; flex: 0 0 245px; height: 225px; margin: 0 25px 0 15px; }
.art-orbit { position: absolute; inset: 10px; border: 1px solid #ffffff55; border-radius: 50%; transform: rotate(-22deg) scaleY(.72); }
.art-orbit::before,.art-orbit::after { content: ""; position: absolute; inset: 25px -17px; border: 1px solid #ffffff45; border-radius: 50%; transform: rotate(55deg); }
.art-orbit::after { transform: rotate(-55deg); }
.art-book { position: absolute; display: grid; place-items: center; top: 66px; left: 82px; width: 82px; height: 92px; border-radius: 18px 22px 22px 18px; color: #f5d878; background: linear-gradient(145deg,#fff,#e9e4ff); box-shadow: 12px 15px 35px #372da955; font-size: 2.8rem; transform: rotate(-9deg); animation: book-float 4s ease-in-out infinite; }
.art-dot { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #f9d875; box-shadow: 0 0 0 7px #ffffff18; }
.dot-one { top: 27px; right: 43px; }.dot-two { bottom: 27px; left: 34px; width: 8px; height: 8px; background: #a7f0df; }.dot-three { right: 18px; bottom: 57px; width: 6px; height: 6px; background: #ffb6ce; }
@keyframes book-float { 0%,100% { transform: translateY(0) rotate(-9deg); } 50% { transform: translateY(-7px) rotate(-6deg); } }
.section-intro { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 38px 2px 16px; }
.section-intro h2 { margin: 4px 0 0; font-size: 1.65rem; letter-spacing: -.04em; }
.section-intro p { max-width: 300px; margin: 0; color: var(--muted); font-size: .9rem; }
.class-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.class-card { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: flex-start; min-height: 220px; overflow: hidden; padding: 23px; border: 0; border-radius: 22px; color: #fff; text-align: left; box-shadow: 0 12px 30px #24305d18; transition: transform .22s ease, box-shadow .22s ease; }
.class-card:hover,.class-card:focus-visible { transform: translateY(-6px); box-shadow: 0 20px 38px #24305d2b; }
.class-card:focus-visible,.guide-promo:focus-visible,.bottom-link:focus-visible { outline: 3px solid #242052; outline-offset: 3px; }
.class-ten { background: linear-gradient(140deg,#ff846e,#ffb36e); }
.class-eleven { background: linear-gradient(140deg,#13bba3,#6ad5b0); }
.class-twelve { background: linear-gradient(140deg,#5185f1,#8c74ed); }
.class-card-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 17px; border: 1px solid #ffffff6e; border-radius: 14px; background: #ffffff25; font-size: 1.45rem; }
.class-card-label { color: #ffffffd9; font-size: .66rem; font-weight: 800; letter-spacing: .12em; }
.class-card strong { margin-top: 2px; font-size: 1.75rem; letter-spacing: -.04em; }
.class-card-bottom { display: flex; justify-content: space-between; width: 100%; margin-top: auto; padding-top: 19px; color: #ffffffed; font-size: .85rem; }
.class-card-bottom span { font-size: 1.1rem; transition: transform .2s ease; }
.class-card:hover .class-card-bottom span { transform: translate(3px,-3px); }
.class-card-orb { position: absolute; z-index: -1; top: -52px; right: -38px; width: 170px; height: 170px; border: 1px solid #ffffff36; border-radius: 50%; background: #ffffff12; }
.class-card-orb::after { content: ""; position: absolute; inset: 24px; border: 1px solid #ffffff36; border-radius: 50%; }
.guide-promo { display: flex; align-items: center; gap: 16px; width: 100%; margin-top: 20px; padding: 19px 22px; border: 1px solid #e9e6ff; border-radius: 18px; color: var(--ink); text-align: left; background: linear-gradient(100deg,#f0efff,#fff 72%); transition: transform .2s ease, box-shadow .2s ease; }
.guide-promo:hover { transform: translateY(-3px); box-shadow: 0 12px 28px #6258e81a; }
.promo-icon { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 14px; color: #6258e8; background: #e6e3ff; font-size: 1.55rem; }
.guide-promo strong,.guide-promo small { display: block; }
.guide-promo small { margin-top: 3px; color: var(--muted); font-size: .84rem; }
.promo-arrow { margin-left: auto; color: var(--accent); font-size: 1.3rem; }
.page-view { animation: page-enter .22s ease-out both; }
@keyframes page-enter { from { opacity: .65; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { margin: 18px 2px 20px; }
.page-heading h1 { margin: 4px 0; font-size: clamp(1.9rem,4vw,2.6rem); letter-spacing: -.05em; }
.page-heading p { margin: 0; color: var(--muted); }
.launcher-card,.guide-card,.syllabus-panel { padding: 24px; border-radius: 20px; box-shadow: 0 10px 32px #29345b0b; }
.syllabus-filters { margin: 0 0 18px; }
.syllabus-filters select,.syllabus-filters input { width: 100%; min-height: 44px; margin-top: 3px; }
.syllabus-summary { margin: 4px 0 16px; }
.syllabus-list { display: grid; gap: 20px; }
.syllabus-subject-group { min-width: 0; }
.syllabus-subject-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.syllabus-subject-heading h2 { margin: 0; font-size: 1.12rem; letter-spacing: -.02em; }
.syllabus-document-card { padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(120deg,#faf9ff,var(--card) 72%); box-shadow: 0 6px 20px #29345b08; transition: transform .18s ease, box-shadow .18s ease; }
.syllabus-document-card + .syllabus-document-card { margin-top: 9px; }
.syllabus-document-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px #6258e812; }
.syllabus-document-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.syllabus-session-badge { color: #5148d9; border-color: #dcd8ff; background: #f1efff; font-weight: 700; }
.syllabus-document { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--card); }
.syllabus-document summary { padding: 10px 13px; color: var(--accent); cursor: pointer; font-weight: 700; }
.syllabus-document summary:hover { background: #f4f2ff; }
.syllabus-document[open] summary { border-bottom: 1px solid var(--line); }
.syllabus-empty { padding: 24px; border: 1px dashed var(--line); border-radius: 14px; text-align: center; }
.syllabus-promo { border-color: #dceeea; background: linear-gradient(100deg,#edfbf7,#fff 72%); }
.syllabus-promo-icon { color: #13866f; background: #d9f4ec; }
.launcher-card h2 { margin-top: 0; }
.paper-resources { margin: 20px 0 4px; }
.paper-resources h3 { margin: 0 0 6px; font-size: 1.08rem; }
.paper-resources > p { margin: 0 0 12px; }
.source-paper-card { margin: 10px 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(115deg,#f7f6ff,#fff 70%); }
.source-paper-card h4 { margin: 0 0 12px; }
.in-app-document { margin-top: 9px; border: 1px solid #e5e3f8; border-radius: 10px; overflow: hidden; background: #fff; }
.in-app-document summary { padding: 10px 13px; color: #5148d9; background: #f4f2ff; cursor: pointer; font-weight: 700; font-size: .9rem; }
.in-app-document summary:hover { background: #eceaff; }
.document-content { padding: 12px; }
.document-page-count { margin: 0 0 10px; }
.plain-document-text { max-height: 72vh; overflow: auto; margin: 0; padding: 20px; border: 1px solid #ececf4; border-radius: 10px; color: #25283b; background: #fff; font: 14px/1.7 ui-serif, Georgia, serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.local-pdf-viewer { display: block; width: 100%; height: min(78vh, 820px); border: 0; background: #f6f7fb; }
.scheme-unavailable { margin: 12px 2px 0; }
.profile-card { max-width: 900px; margin-bottom: 22px; }
.profile-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.profile-role-pill-selector { display: inline-flex; background: var(--bg); padding: 4px; border-radius: 999px; border: 1px solid var(--line); }
.role-radio-label { margin: 0; cursor: pointer; }
.role-radio-label input { display: none; }
.role-pill-btn { display: inline-block; padding: 6px 16px; border-radius: 999px; font-weight: 700; font-size: .88rem; color: var(--muted); transition: all .15s ease; user-select: none; }
.role-radio-label input:checked + .role-pill-btn { background: #fff; color: var(--accent); box-shadow: 0 2px 8px rgba(81, 72, 217, 0.18); }

.profile-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.profile-form-grid label { min-width: 0; font-weight: 600; font-size: .9rem; }
.profile-form-grid input[type=text], .profile-form-grid select { width: 100%; min-width: 0; }
.profile-form-grid input[type=file] { max-width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--ink); font: inherit; }
.profile-subject-field { grid-column: 1 / -1; }
.profile-subject-field textarea { min-height: 70px; width: 100%; }
.profile-photo-preview-wrap { display: flex; align-items: center; gap: 10px; }
.profile-photo-preview { width: 68px; height: 68px; border: 3px solid #eceaff; border-radius: 50%; object-fit: cover; }
.profile-photo-preview-wrap button { padding: 4px 8px; font-size: .82rem; }
.profile-status { min-height: 1.4em; margin: 10px 0 0; }

/* Directory & Toolbar */
.profile-directory-card { max-width: 900px; padding: 22px; }
.profile-list-header-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.profile-filter-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.profile-filter-toolbar input[type=search] { flex: 1; min-width: 220px; }

.profile-list-enhanced { display: grid; gap: 14px; }
.profile-empty { padding: 32px 20px; border: 1.5px dashed var(--line); border-radius: 18px; text-align: center; }

.profile-item { display: grid; grid-template-columns: 66px minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 18px 20px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: 0 4px 18px rgba(41, 52, 91, 0.04); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.profile-item:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(41, 52, 91, 0.08); }
.profile-item.is-active { border-color: #796ff6; background: linear-gradient(110deg, #fdfdff 0%, #f6f5ff 100%); box-shadow: 0 8px 26px rgba(98, 88, 232, 0.16); }

.profile-avatar { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; color: #fff; background: linear-gradient(145deg,#8279ff,#4f46d8); font-size: 1.45rem; font-weight: 800; object-fit: cover; box-shadow: 0 4px 12px rgba(81, 72, 217, 0.25); flex-shrink: 0; }
.profile-avatar.teacher-avatar { background: linear-gradient(145deg, #0d9488, #0f766e); box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25); }

.profile-details { min-width: 0; }
.profile-details-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.profile-details h3 { margin: 0; font-size: 1.12rem; font-weight: 750; }
.profile-role-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 6px; }
.profile-role-badge.student { background: #e0e7ff; color: #3730a3; }
.profile-role-badge.teacher { background: #ccfbf1; color: #115e59; }

.profile-details-sub { font-size: .88rem; color: var(--muted); margin: 2px 0 8px; }
.profile-bio-text { font-size: .86rem; color: var(--ink); background: var(--bg); padding: 6px 10px; border-radius: 8px; margin-bottom: 8px; border-left: 3px solid #0d9488; }
.profile-subjects { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.profile-actions button { padding: 7px 12px; font-size: .84rem; }
.profile-actions .profile-active-button { border-color: #c9c5ff; color: #5048cf; background: #f2f0ff; font-weight: 700; cursor: default; }
.profile-actions .profile-delete-button { color: #dc2626; border-color: #fecaca; }
.profile-actions .profile-delete-button:hover { background: #fef2f2; }

/* Teacher Authoring Suite */
.teacher-designer-card { max-width: 900px; padding: 24px; }
.teacher-designer-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.active-teacher-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-radius: 12px; background: #f0fdfa; border: 1px solid #99f6e4; color: #134e4a; margin-bottom: 18px; font-size: .92rem; }
.custom-papers-header-row { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 12px; }
.custom-papers-header-row h3 { margin: 0; font-size: 1.15rem; }
.custom-papers-grid { display: grid; gap: 12px; }
.custom-paper-card { border: 1.5px solid var(--line); border-radius: 14px; padding: 16px 18px; background: #fff; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; transition: transform .15s ease, box-shadow .15s ease; }
.custom-paper-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
.custom-paper-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }

/* Designer Modal Form */
.designer-modal-box { max-width: 780px; width: 92%; max-height: 88vh; overflow-y: auto; padding: 26px; }
.designer-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.designer-form-grid label { font-size: .88rem; font-weight: 650; }
.designer-form-grid input, .designer-form-grid select { width: 100%; margin-top: 4px; }

.designer-questions-wrap { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--bg); margin: 18px 0; }
.designer-questions-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.designer-btn-group { display: flex; gap: 8px; }
.btn-secondary-sm { padding: 5px 10px; font-size: .82rem; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 650; }
.btn-secondary-sm:hover { background: #f6f5ff; border-color: var(--accent); color: var(--accent); }

.designer-question-item { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; margin-bottom: 12px; box-shadow: 0 2px 6px rgba(0,0,0,0.03); }
.designer-q-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.designer-q-head strong { font-size: .92rem; }
.designer-q-field { width: 100%; margin-bottom: 8px; }
.designer-mcq-options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.designer-opt-row { display: flex; align-items: center; gap: 6px; font-size: .85rem; }
.designer-opt-row input[type=text] { flex: 1; padding: 6px 8px; font-size: .85rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.concept { border-color: #e9e8f8; border-left: 3px solid #8b82f2; background: linear-gradient(110deg,#faf9ff,#fff 65%); transition: transform .18s ease, box-shadow .18s ease; }
.concept:hover { transform: translateY(-2px); box-shadow: 0 8px 22px #5148d910; }
.bottom-nav { position: fixed; z-index: 10; right: 0; bottom: 0; left: 0; display: flex; justify-content: center; gap: 8px; padding: 9px 14px max(9px, env(safe-area-inset-bottom)); border-top: 1px solid #e9eaf2; background: #ffffffed; backdrop-filter: blur(16px); }
.bottom-link { display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 2px; min-width: 82px; padding: 5px 14px; border: 0; border-radius: 13px; color: #858ba2; background: transparent; transition: color .18s ease, background .18s ease, transform .18s ease; }
.bottom-link > span { font-size: 1.35rem; line-height: 1.1; }
.bottom-link small { font-size: .7rem; font-weight: 700; }
.bottom-link:hover { transform: translateY(-2px); color: var(--accent); }
.bottom-link.active { color: var(--accent); background: #f0efff; }
.bottom-link.active > span { transform: translateY(-1px); }
@media (max-width: 720px) {
  main { padding: 14px 14px 105px; }
  .hero { min-height: 280px; padding: 30px 25px; }
  .hero-art { flex-basis: 165px; height: 170px; margin: 0 0 0 8px; transform: scale(.78); transform-origin: center right; }
  .class-cards { gap: 12px; }
  .class-card { min-height: 195px; padding: 17px; border-radius: 18px; }
}
@media (max-width: 520px) {
  .hero { min-height: 310px; padding: 30px 23px; }
  .hero-art { position: absolute; right: -20px; bottom: -44px; opacity: .55; transform: scale(.78); }
  .hero-copy { max-width: 100%; }
  .section-intro { display: block; margin-top: 30px; }
  .section-intro p { margin-top: 7px; }
  .class-cards { grid-template-columns: 1fr; }
  .class-card { min-height: 160px; }
  .class-card-icon { margin-bottom: 8px; }
  .guide-promo { padding: 16px; }
  .guide-promo small { line-height: 1.4; }
  .bottom-nav { justify-content: space-around; }
  .bottom-link { flex: 1; min-width: 0; max-width: 120px; padding-right: 5px; padding-left: 5px; }
  .bottom-link small { font-size: .66rem; }
  .profile-form-grid { grid-template-columns: 1fr; }
  .profile-subject-field { grid-column: auto; }
  .profile-item { grid-template-columns: 50px minmax(0,1fr); gap: 10px; }
  .profile-avatar { width: 48px; height: 48px; }
  .profile-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .syllabus-panel { padding: 17px; }
  .syllabus-filters { grid-template-columns: 1fr; gap: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ============================================================
   IN-LINE REAL PAPER EXPERIENCE STYLES
   ============================================================ */
.launch-btn { font-size: 1.05rem; padding: 12px 24px; border-radius: 12px; font-weight: 700; box-shadow: 0 4px 14px rgba(98, 88, 232, 0.35); }
.attend-paper-btn { margin-top: 10px; width: 100%; padding: 10px 16px; border-radius: 10px; font-weight: 700; background: linear-gradient(135deg, #5148d9, #7568f4); color: #fff; border: 0; box-shadow: 0 4px 12px rgba(98, 88, 232, 0.25); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.attend-paper-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(98, 88, 232, 0.35); }

.paper-header-card { padding: 22px 24px; border-radius: 20px; box-shadow: 0 8px 30px rgba(32, 37, 74, 0.06); }
.paper-header-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.paper-title-area h2 { margin: 4px 0 6px; font-size: 1.55rem; letter-spacing: -.03em; }

.paper-mode-toggle { display: flex; align-items: center; gap: 10px; background: var(--bg); padding: 6px 12px; border-radius: 12px; border: 1px solid var(--line); }
.mode-label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.mode-buttons { display: flex; gap: 6px; }
.mode-btn { padding: 6px 14px; font-size: .86rem; font-weight: 600; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); transition: all .18s ease; }
.mode-btn.active { background: #fff; color: var(--accent); border-color: #dcd8ff; box-shadow: 0 2px 8px rgba(98, 88, 232, 0.15); font-weight: 750; }

.paper-nav-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.paper-progress-wrap { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 6px; }
.progress-text { font-size: .88rem; font-weight: 650; color: var(--ink); }
.progress-bar-bg { width: 100%; height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, #6258e8, #2b8a3e); border-radius: 999px; transition: width .3s ease; }

.paper-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chip { padding: 6px 13px; font-size: .82rem; font-weight: 600; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); cursor: pointer; transition: all .15s ease; }
.filter-chip:hover { color: var(--ink); border-color: #c9c5ff; }
.filter-chip.active { background: #eeedff; color: var(--accent); border-color: #c2bdff; }
.jump-toggle { font-weight: 700; color: var(--accent); background: #f6f5ff; border-color: #e2dfff; }

.q-palette { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 8px; padding: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; max-height: 220px; overflow-y: auto; }
.palette-btn { display: grid; place-items: center; width: 38px; height: 38px; font-size: .86rem; font-weight: 700; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; transition: all .15s ease; }
.palette-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.palette-btn.is-answered { background: #e9f7ee; border-color: #9fe2b2; color: #1e7033; }
.palette-btn.is-flagged { background: #fff8e6; border-color: #f7d57a; color: #b07800; }
.palette-btn.is-active { outline: 2px solid var(--accent); outline-offset: 2px; }

.paper-instructions-toggle { margin-top: 12px; }
.paper-instructions-toggle summary { cursor: pointer; font-size: .88rem; font-weight: 650; color: var(--accent); }
.paper-instructions-body { margin-top: 10px; font-size: .9rem; color: var(--muted); }
.paper-instructions-body ul { margin: 6px 0; padding-left: 20px; }

/* Enhanced Question Card */
.q { border-radius: 18px; padding: 22px; margin-bottom: 18px; border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(32, 37, 74, 0.04); transition: border-color .2s ease, box-shadow .2s ease; position: relative; }
.q:hover { box-shadow: 0 6px 20px rgba(32, 37, 74, 0.07); }
.q.is-flagged { border-left: 4px solid #f59e0b; }
.q.target-highlight { animation: q-highlight 1.5s ease-out; }
@keyframes q-highlight { 0% { background: #eeedff; } 100% { background: var(--card); } }

.q-top-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.q-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.q-badge-num { font-weight: 800; font-size: .95rem; color: var(--ink); }
.q-badge-type { background: #f0efff; color: var(--accent); font-weight: 700; border-color: #dedaff; }
.q-badge-marks { background: #f0fdf4; color: #15803d; font-weight: 700; border-color: #bbf7d0; }
.q-badge-topic { background: var(--bg); color: var(--muted); font-size: .78rem; }
.q-flag-btn { border: 1px solid var(--line); background: transparent; padding: 4px 10px; border-radius: 8px; font-size: .82rem; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .15s ease; }
.q-flag-btn:hover { border-color: #f59e0b; color: #b45309; }
.q-flag-btn.flagged { background: #fffbeb; border-color: #fde68a; color: #b45309; font-weight: 700; }

.q-body-text { font-size: 1.02rem; line-height: 1.6; margin: 8px 0 16px; color: var(--ink); white-space: pre-wrap; word-break: break-word; }

/* Interactive MCQ Cards */
.mcq-options-list { display: grid; gap: 9px; margin: 12px 0; }
.opt-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; transition: all .15s ease; user-select: none; }
.opt-card:hover { border-color: #b8b2ff; background: #faf9ff; }
.opt-card.selected { border-color: var(--accent); background: #f4f2ff; box-shadow: 0 2px 8px rgba(98, 88, 232, 0.12); }
.opt-card.correct { border-color: #22c55e !important; background: #f0fdf4 !important; box-shadow: 0 2px 10px rgba(34, 197, 94, 0.18); }
.opt-card.wrong { border-color: #ef4444 !important; background: #fef2f2 !important; box-shadow: 0 2px 10px rgba(239, 68, 68, 0.18); }
.opt-card.actual-correct { border-color: #22c55e !important; background: #f0fdf4 !important; border-style: dashed !important; }

.opt-radio-input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; cursor: pointer; }
.opt-letter { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-weight: 750; font-size: .84rem; background: var(--bg); border: 1px solid var(--line); color: var(--ink); flex-shrink: 0; }
.opt-card.selected .opt-letter { background: var(--accent); color: #fff; border-color: var(--accent); }
.opt-card.correct .opt-letter { background: #22c55e; color: #fff; border-color: #22c55e; }
.opt-card.wrong .opt-letter { background: #ef4444; color: #fff; border-color: #ef4444; }
.opt-text-label { font-size: .96rem; line-height: 1.45; flex: 1; }
.opt-tag-badge { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; margin-left: auto; }
.opt-tag-correct { background: #dcfce7; color: #15803d; }
.opt-tag-wrong { background: #fee2e2; color: #b91c1c; }

/* Instant MCQ Feedback Card */
.feedback-banner { margin-top: 14px; padding: 14px 18px; border-radius: 12px; display: flex; gap: 14px; align-items: flex-start; animation: fade-in .2s ease-out; }
.feedback-banner.correct { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.feedback-banner.wrong { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.feedback-icon-big { font-size: 1.35rem; line-height: 1; flex-shrink: 0; }
.feedback-details { flex: 1; }
.feedback-details strong { display: block; font-size: .95rem; margin-bottom: 4px; }
.feedback-explanation { font-size: .9rem; line-height: 1.5; color: inherit; opacity: .92; white-space: pre-wrap; }
.btn-retry-mcq { align-self: flex-start; padding: 5px 12px; font-size: .82rem; font-weight: 650; border-radius: 8px; border: 1px solid rgba(0, 0, 0, 0.15); background: #fff; color: var(--ink); cursor: pointer; }
.btn-retry-mcq:hover { background: #f9f9fb; }

/* Descriptive Answer Workspace */
.answer-workspace { margin: 14px 0 10px; }
.workspace-head { display: flex; justify-content: space-between; align-items: center; font-size: .86rem; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.q-textarea { width: 100%; min-height: 110px; padding: 12px 14px; font-size: .95rem; line-height: 1.6; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); box-sizing: border-box; transition: border-color .15s ease; font-family: inherit; }
.q-textarea:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(98, 88, 232, 0.12); }
.workspace-footer { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; color: var(--muted); margin-top: 4px; }

/* Step-Wise Marking Scheme & Verification Rubric */
.step-scheme-box { margin-top: 14px; border: 1px solid #e2dfff; border-radius: 14px; overflow: hidden; background: linear-gradient(180deg, #f9f8ff, var(--card)); }
.btn-toggle-scheme { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 11px 16px; border: 0; background: #eeedff; color: #5148d9; font-weight: 700; font-size: .88rem; cursor: pointer; text-align: left; }
.btn-toggle-scheme:hover { background: #e5e3ff; }
.step-scheme-content { padding: 16px; border-top: 1px solid #e2dfff; }
.scheme-official-text { font-size: .92rem; line-height: 1.6; color: var(--ink); padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; white-space: pre-wrap; margin-bottom: 14px; }

.step-rubric { background: #fdfdff; border: 1px solid #e5e3f8; border-radius: 12px; padding: 14px; }
.step-rubric-title { font-size: .84rem; font-weight: 750; color: #4338ca; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.step-list { display: grid; gap: 8px; margin-bottom: 12px; }
.step-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); cursor: pointer; transition: all .15s ease; }
.step-item:hover { border-color: #b8b2ff; background: #fbfaff; }
.step-item.is-checked { border-color: #86efac; background: #f0fdf4; }
.step-checkbox { width: 18px; height: 18px; margin-top: 2px; accent-color: #16a34a; cursor: pointer; }
.step-info { flex: 1; font-size: .9rem; line-height: 1.45; }
.step-idx { font-weight: 750; color: var(--ink); margin-right: 4px; }
.step-pill { font-size: .78rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: #dcfce7; color: #166534; white-space: nowrap; align-self: center; }

.step-score-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 10px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.step-score-total { font-size: .92rem; color: var(--ink); }
.step-score-total strong { color: #15803d; font-size: 1.05rem; }
.step-manual-adjust { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--muted); }
.step-manual-input { width: 70px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); font-weight: 700; text-align: center; }

/* Sticky bottom actions */
.paper-bottom-bar { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-radius: 18px; margin-top: 24px; position: sticky; bottom: 14px; z-index: 8; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(12px); box-shadow: 0 -4px 24px rgba(32, 37, 74, 0.08); }
.paper-bottom-info { font-size: .92rem; font-weight: 600; color: var(--muted); }

/* Result Scorecard Enhanced */
.result-card { padding: 32px 28px; border-radius: 24px; box-shadow: 0 12px 40px rgba(32, 37, 74, 0.08); }
.result-header { margin-bottom: 24px; }
.result-header h2 { margin: 4px 0 6px; font-size: 2rem; letter-spacing: -.03em; }

.score-hero-card { display: flex; align-items: center; gap: 28px; padding: 26px 32px; border-radius: 20px; background: linear-gradient(130deg, #5148d9 0%, #7568f4 60%, #9d7cf5 100%); color: #fff; margin-bottom: 24px; box-shadow: 0 12px 32px rgba(98, 88, 232, 0.28); flex-wrap: wrap; }
.score-circle-wrap { width: 110px; height: 110px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); border: 2px solid rgba(255, 255, 255, 0.4); display: grid; place-items: center; text-align: center; flex-shrink: 0; }
.score-big-num { font-size: 2rem; font-weight: 850; line-height: 1; }
.score-big-max { font-size: .84rem; opacity: .85; }
.score-hero-info { flex: 1; min-width: 200px; }
.score-badge-tier { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #fff; color: #5148d9; font-weight: 800; font-size: .82rem; margin-bottom: 8px; }
.score-hero-info h3 { margin: 0 0 6px; font-size: 1.55rem; }
.score-hero-info p { margin: 0; opacity: .9; font-size: .92rem; }

.breakdown-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 18px 0; }
.stat-box { padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); }
.stat-box-label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.stat-box-val { font-size: 1.45rem; font-weight: 800; margin: 4px 0 2px; color: var(--ink); }
.stat-box-sub { font-size: .82rem; color: var(--muted); }

@keyframes fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* Red-line flash notice banner */
.flash-notice {
  position: sticky;
  top: 72px;
  z-index: 99;
  max-width: 1080px;
  margin: 12px auto 0;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-left: 4.5px solid #dc2626;
  border-top: 1px solid #fecaca;
  border-right: 1px solid #fecaca;
  border-bottom: 1.5px solid #ef4444;
  border-radius: 12px;
  background: #fef2f2;
  color: #991b1b;
  font-size: .95rem;
  font-weight: 650;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.14);
  animation: flash-enter .25s ease-out;
}

@keyframes flash-enter {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.flash-notice-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flash-notice-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  font-size: .88rem;
  font-weight: 800;
  flex-shrink: 0;
}

.flash-notice-close {
  padding: 3px 8px;
  border: 0;
  background: transparent;
  color: #991b1b;
  font-size: 1.3rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  border-radius: 6px;
  opacity: .7;
  transition: opacity .15s ease, background .15s ease;
}

.flash-notice-close:hover {
  opacity: 1;
  background: rgba(220, 38, 38, 0.12);
}

/* ==========================================================================
   Jump to Top Floating Button
   ========================================================================== */
.jump-top-btn {
  position: fixed;
  right: 22px;
  bottom: 84px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  z-index: 98;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.92);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}

.jump-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.jump-top-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(59, 91, 219, 0.35);
  transform: translateY(-3px) scale(1.05);
}

.jump-top-btn:active {
  transform: translateY(0) scale(0.96);
}

body.in-paper .jump-top-btn,
body.in-result .jump-top-btn {
  bottom: 24px;
}

/* ==========================================================================
   Attended Papers & Saved Attempts
   ========================================================================== */
.launcher-tabs {
  margin-bottom: 18px;
}

.btn-save {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
  font-weight: 600;
}
.btn-save:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
}

.btn-danger-outline {
  background: transparent;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-size: .85rem;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease;
}
.btn-danger-outline:hover {
  background: #fef2f2;
  border-color: #dc2626;
}

.btn-text {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-weight: 650;
  cursor: pointer;
  padding: 4px 8px;
}
.btn-text:hover {
  text-decoration: underline;
}

/* Attended panel layout */
.attended-panel-card {
  padding: 22px;
}

.attended-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.attended-filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.attended-filter-row input[type="search"] {
  flex: 1;
  min-width: 220px;
}

.attended-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.attended-empty {
  text-align: center;
  padding: 40px 20px;
  border: 2px dashed var(--line);
  border-radius: 12px;
}
.attended-empty-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
  opacity: .8;
}

.attended-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  background: var(--card);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.attended-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border-color: #cbd5e1;
}

.attended-item-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.attended-item-title {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.attended-meta-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.attended-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
}
.attended-badge.badge-submitted {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.attended-badge.badge-progress {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fef08a;
}

.attended-progress-row {
  margin: 10px 0;
}
.attended-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: .84rem;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 550;
}
.attended-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.attended-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width .3s ease;
}
.attended-progress-fill.is-submitted {
  background: #16a34a;
}

.attended-note-preview {
  margin: 10px 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bg);
  border-left: 3px solid var(--accent);
  font-size: .88rem;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.attended-note-preview em {
  color: var(--muted);
  font-style: italic;
}

.attended-item-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.attended-time {
  font-size: .8rem;
  color: var(--muted);
}
.attended-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.attended-actions button {
  padding: 6px 12px;
  font-size: .85rem;
}

/* Home Attended Card */
.home-attended-card {
  margin-top: 18px;
  padding: 18px 20px;
}
.home-attended-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.home-attended-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.home-attended-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.home-attended-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}
.home-attended-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.home-attended-item-title {
  font-weight: 700;
  font-size: .95rem;
  margin: 0;
}
.home-attended-item-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* Modal Dialog */
.custom-modal {
  border: 0;
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  background: transparent;
  max-width: 500px;
  width: 90%;
}
.custom-modal::backdrop {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
}
.modal-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  color: var(--ink);
}



