:root {
  color-scheme: light;
  --ink: #183f30;
  --ink-2: #2b5642;
  --leaf: #64886e;
  --leaf-soft: #e8efe3;
  --paper: #f5f4ee;
  --white: #fffefa;
  --line: #e7e8de;
  --muted: #7d887f;
  --clay: #bd7051;
  --clay-soft: #faeee6;
  --gold: #c79d4c;
  --gold-soft: #f5efd9;
  --blue: #6a8592;
  --blue-soft: #e8eff1;
  --soil: #79583c;
  --soil-soft: #efe5d8;
  --wheat: #d1ad61;
  --wheat-soft: #f5efd8;
  --water: #6f9990;
  --water-soft: #e4efeb;
  --tomato: #a85f46;
  --tomato-soft: #f6e8e1;
  --shadow: 0 18px 46px rgba(28, 53, 39, .08);
  font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-size: 14px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(100, 136, 110, .35); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .55; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 5; inset: 0 0 0 auto; width: 250px; display: flex; flex-direction: column; padding: 25px 18px 20px; background: var(--ink); color: #f5f4ee; }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 9px 30px; }
.brand-mark { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 14px; background: #2d5b43; color: #d6e5ba; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: -.3px; }
.brand-caption { margin-top: 1px; color: #a6b8a8; font-size: 11px; }
.nav-label { padding: 0 11px; margin: 7px 0 10px; color: #91a598; font-size: 10px; font-weight: 600; letter-spacing: .6px; }
.nav-list { display: grid; gap: 6px; }
.nav-link { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 0; border-radius: 12px; background: transparent; color: #d5dfd6; text-align: right; transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-link:hover { background: rgba(255,255,255,.08); color: white; transform: translateX(-2px); }
.nav-link.active { color: #173d2e; background: #e8efe3; font-weight: 700; }
.nav-link .nav-icon { display: grid; place-items: center; width: 22px; height: 22px; }
.sidebar-bottom { margin-top: auto; }
.mission-card { position: relative; overflow: hidden; padding: 16px 14px 14px; border: 1px solid rgba(230,240,221,.14); border-radius: 16px; background: #214a37; }
.mission-card::after { content: ""; position: absolute; width: 82px; height: 82px; left: -22px; top: -36px; border: 1px solid rgba(222,237,207,.2); border-radius: 50%; box-shadow: 0 0 0 12px rgba(222,237,207,.04), 0 0 0 25px rgba(222,237,207,.03); }
.mission-kicker { color: #bed1b5; font-size: 11px; }
.mission-title { position: relative; z-index: 1; margin: 9px 0 13px; color: #fff; font-size: 14px; line-height: 1.65; font-weight: 600; }
.mission-link { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: #dbe9ca; font-size: 11px; font-weight: 600; }
.local-note { display: flex; align-items: flex-start; gap: 8px; margin: 13px 3px 0; color: #b4c4b7; font-size: 10px; line-height: 1.6; }
.local-note svg { flex: 0 0 auto; margin-top: 2px; color: #d2e3bd; }
.main-area { min-height: 100vh; margin-right: 250px; padding: 25px clamp(22px, 4vw, 58px) 50px; }
.content-wrap { max-width: 1240px; margin: 0 auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 30px; }
.page-eyebrow { margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.page-title { margin: 0; font-size: clamp(20px, 2vw, 27px); line-height: 1.35; font-weight: 700; letter-spacing: -.5px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.demo-chip { display: flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,254,250,.8); color: var(--muted); font-size: 11px; white-space: nowrap; }
.demo-chip svg { color: var(--leaf); }
.role-button, .ghost-button, .primary-button, .soft-button, .text-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 11px; font-weight: 600; transition: transform .16s ease, background .16s ease, box-shadow .16s ease; }
.role-button:hover, .ghost-button:hover, .primary-button:hover, .soft-button:hover { transform: translateY(-1px); }
.role-button { padding: 9px 13px; border: 1px solid #d8e1d5; background: var(--white); color: var(--ink); white-space: nowrap; }
.role-button svg { color: var(--leaf); }
.student-select { max-width: 130px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); }
.page-section { animation: appear .25s ease-out both; }
@keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.hero { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 218px; overflow: hidden; padding: 31px clamp(23px, 4vw, 47px); border-radius: 22px; color: #fff; background: var(--ink); box-shadow: var(--shadow); }
.hero::before { content: ""; position: absolute; left: 19%; bottom: -145px; width: 380px; height: 380px; border: 1px solid rgba(236,243,222,.11); border-radius: 50%; box-shadow: 0 0 0 25px rgba(236,243,222,.035), 0 0 0 55px rgba(236,243,222,.028), 0 0 0 88px rgba(236,243,222,.02); }
.hero-copy { position: relative; z-index: 1; max-width: 590px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 7px; color: #c9d8c3; font-size: 11px; font-weight: 600; }
.hero-kicker span { width: 6px; height: 6px; border-radius: 50%; background: #d7b76b; }
.hero h2 { margin: 12px 0 8px; font-size: clamp(24px, 3vw, 35px); line-height: 1.4; letter-spacing: -.6px; }
.hero p { max-width: 445px; margin: 0; color: #cad6cc; font-size: 13px; line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.hero .primary-button { background: #e7edda; color: var(--ink); }
.hero .primary-button:hover { background: #f2f4e8; }
.hero .hero-secondary { display: inline-flex; align-items: center; gap: 6px; padding: 8px 4px; border: 0; background: transparent; color: #d5e0d4; font-size: 12px; font-weight: 600; }
.hero-stamp { position: relative; z-index: 1; display: grid; place-items: center; width: 130px; height: 130px; margin-left: 4.5%; border: 1px solid rgba(234,242,224,.24); border-radius: 50%; background: rgba(255,255,255,.035); transform: rotate(-7deg); }
.stamp-inner { display: grid; place-items: center; width: 102px; height: 102px; border: 1px dashed rgba(234,242,224,.43); border-radius: 50%; color: #e4eacb; text-align: center; }
.stamp-inner strong { display: block; margin-top: 4px; font-size: 24px; line-height: 1; }
.stamp-inner span { display: block; margin-top: 6px; color: #c7d4bf; font-size: 10px; }

.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin: 30px 0 15px; }
.section-title { margin: 0; font-size: 17px; font-weight: 700; }
.section-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.text-button { padding: 5px 0; border: 0; background: transparent; color: var(--leaf); font-size: 12px; white-space: nowrap; }
.stats-row { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-top: 19px; }
.stat-card { display: flex; align-items: center; gap: 13px; min-height: 84px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.stat-icon { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 13px; background: var(--leaf-soft); color: var(--leaf); }
.stat-icon.clay { background: var(--clay-soft); color: var(--clay); }
.stat-icon.gold { background: var(--gold-soft); color: #a17e34; }
.stat-icon.blue { background: var(--blue-soft); color: var(--blue); }
.stat-value { display: block; font-size: 20px; line-height: 1.1; font-weight: 700; }
.stat-label { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }

.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(250px, .9fr); gap: 16px; margin-top: 28px; }
.panel { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 17px; }
.panel-title { margin: 0; font-size: 15px; font-weight: 700; }
.panel-hint { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.panel-link { display: inline-flex; align-items: center; gap: 5px; padding: 2px 0; border: 0; background: transparent; color: var(--leaf); font-size: 11px; font-weight: 600; white-space: nowrap; }
.feature-challenge { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 17px; align-items: stretch; padding: 11px; border: 1px solid #e9ebe3; border-radius: 15px; background: #fcfcf8; }
.feature-image { width: 100%; min-height: 166px; object-fit: cover; border-radius: 11px; background: #e9eee2; }
.feature-info { display: flex; flex-direction: column; align-items: flex-start; padding: 6px 1px 4px; }
.category-label { display: inline-flex; align-items: center; gap: 5px; color: var(--leaf); font-size: 10px; font-weight: 700; }
.feature-title { margin: 8px 0 5px; font-size: 16px; font-weight: 700; line-height: 1.55; }
.feature-description { display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.75; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.meta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 12px; color: var(--muted); font-size: 10px; }
.meta-item { display: inline-flex; align-items: center; gap: 4px; }
.feature-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; margin-top: 12px; }
.primary-button { min-height: 39px; padding: 9px 14px; border: 1px solid transparent; background: var(--ink); color: white; font-size: 12px; }
.primary-button:hover { background: var(--ink-2); box-shadow: 0 6px 14px rgba(24,63,48,.12); }
.ghost-button { min-height: 37px; padding: 8px 12px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font-size: 11px; }
.soft-button { min-height: 37px; padding: 8px 12px; border: 1px solid transparent; background: var(--leaf-soft); color: var(--ink); font-size: 11px; }

.progress-panel { display: flex; flex-direction: column; }
.progress-intro { display: flex; align-items: center; gap: 13px; padding: 12px 0 15px; }
.progress-ring { --progress: 56%; position: relative; display: grid; place-items: center; flex: 0 0 70px; width: 70px; height: 70px; border-radius: 50%; background: conic-gradient(var(--leaf) var(--progress), #e9ece5 0); }
.progress-ring::before { content: ""; position: absolute; width: 56px; height: 56px; border-radius: 50%; background: var(--white); }
.progress-ring strong { position: relative; font-size: 14px; }
.progress-copy strong { display: block; font-size: 13px; }
.progress-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.progress-divider { height: 1px; background: var(--line); }
.goal-row { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 11px; }
.goal-row span { color: var(--muted); }
.goal-track { height: 7px; margin-top: 9px; overflow: hidden; border-radius: 99px; background: #ebeee8; }
.goal-fill { height: 100%; border-radius: inherit; background: var(--leaf); }
.rank-mini { display: flex; align-items: center; gap: 9px; margin-top: auto; padding-top: 15px; color: var(--muted); font-size: 10px; }
.rank-mini strong { color: var(--ink); font-size: 12px; }
.rank-medal { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; background: var(--gold-soft); color: #a17e34; }

.challenge-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 15px; }
.challenge-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--white); transition: transform .18s ease, box-shadow .18s ease; }
.challenge-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.challenge-cover { position: relative; display: block; width: 100%; height: 158px; padding: 0; overflow: hidden; border: 0; background: #e9eee2; }
.challenge-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.challenge-card:hover .challenge-cover img { transform: scale(1.035); }
.challenge-cover .status-badge { position: absolute; top: 11px; right: 11px; }
.challenge-body { padding: 14px 15px 15px; }
.card-kicker { display: flex; justify-content: space-between; align-items: center; gap: 7px; color: var(--leaf); font-size: 10px; font-weight: 700; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 5px 8px; border: 1px solid transparent; border-radius: 999px; background: #e9f0e6; color: #4e7655; font-size: 9px; font-weight: 600; white-space: nowrap; }
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-badge.progress { background: var(--gold-soft); color: #917235; }
.status-badge.closed { background: #efefec; color: #717a72; }
.status-badge.reviewed { background: var(--blue-soft); color: #557784; }
.challenge-title { margin: 8px 0 6px; font-size: 14px; line-height: 1.55; font-weight: 700; }
.challenge-description { display: -webkit-box; overflow: hidden; min-height: 38px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.8; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.challenge-meta { display: flex; gap: 11px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #eff0eb; color: var(--muted); font-size: 9px; }
.card-action { width: 100%; margin-top: 11px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 17px; }
.filter-button { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: 10px; }
.filter-button.active { border-color: var(--ink); background: var(--ink); color: white; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 4px 0 16px; }
.search-field { display: flex; align-items: center; gap: 8px; width: min(280px, 100%); padding: 9px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); color: var(--muted); }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.search-field input:focus-visible { outline: 0; }

.leaderboard-hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 150px; padding: 26px 32px; border-radius: 19px; background: #e9efe4; }
.leaderboard-copy h2 { margin: 0 0 6px; font-size: 22px; }
.leaderboard-copy p { max-width: 510px; margin: 0; color: #68786b; font-size: 12px; line-height: 1.8; }
.season-mark { display: grid; place-items: center; width: 93px; height: 93px; flex: 0 0 93px; border: 1px solid #bccbb7; border-radius: 50%; color: var(--ink); transform: rotate(-9deg); }
.season-mark-inner { display: grid; place-items: center; width: 76px; height: 76px; border: 1px dashed #aabca5; border-radius: 50%; }
.season-mark strong { font-size: 21px; line-height: 1; }
.season-mark span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.leaderboard-list { overflow: hidden; margin-top: 19px; border: 1px solid var(--line); border-radius: 17px; background: var(--white); }
.leaderboard-head, .leader-row { display: grid; grid-template-columns: 66px minmax(0,1fr) 120px 112px; align-items: center; gap: 10px; padding: 13px 20px; }
.leaderboard-head { color: var(--muted); background: #fafaf6; font-size: 10px; }
.leader-row { min-height: 70px; border-top: 1px solid #eff0eb; transition: background .15s ease; }
.leader-row.current { background: #f2f6ef; }
.rank-number { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: #f0f0eb; color: var(--muted); font-weight: 700; }
.rank-number.gold { background: var(--gold-soft); color: #9a7633; }
.rank-number.silver { background: #e9edef; color: #62757d; }
.rank-number.bronze { background: var(--clay-soft); color: var(--clay); }
.person-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; background: #e5ece1; color: #466a4e; font-size: 13px; font-weight: 700; }
.avatar.alt-1 { background: #f1e8d7; color: #997b46; }
.avatar.alt-2 { background: #e9e8f0; color: #66627f; }
.person-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.you-tag { margin-right: 5px; color: var(--leaf); font-size: 9px; font-weight: 600; }
.person-subtitle { margin-top: 3px; color: var(--muted); font-size: 9px; }
.points-cell { font-size: 12px; font-weight: 700; }
.points-cell span { color: var(--muted); font-size: 9px; font-weight: 400; }
.level-tag { width: fit-content; padding: 5px 8px; border-radius: 7px; background: #edf1e8; color: #587354; font-size: 9px; }
.leaderboard-note { display: flex; align-items: center; gap: 7px; margin-top: 14px; color: var(--muted); font-size: 10px; }

.teacher-banner { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 172px; overflow: hidden; padding: 28px 34px; border-radius: 19px; background: var(--ink); color: white; }
.teacher-banner::after { content: ""; position: absolute; left: 15%; top: -80px; width: 235px; height: 235px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 20px rgba(255,255,255,.035), 0 0 0 43px rgba(255,255,255,.025); }
.teacher-banner-copy { position: relative; z-index: 1; }
.teacher-banner-copy .hero-kicker { color: #c4d4c1; }
.teacher-banner h2 { margin: 10px 0 6px; font-size: clamp(22px, 2.5vw, 30px); }
.teacher-banner p { max-width: 500px; margin: 0; color: #c3d0c5; font-size: 12px; line-height: 1.8; }
.teacher-banner .primary-button { position: relative; z-index: 1; flex: 0 0 auto; background: #e8efe2; color: var(--ink); }
.teacher-stat-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-top: 17px; }
.teacher-action-list { display: grid; gap: 9px; }
.review-compact { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid #eceee8; border-radius: 12px; background: #fdfdf9; }
.review-thumb { width: 48px; height: 48px; flex: 0 0 48px; object-fit: cover; border-radius: 10px; background: #e8eee3; }
.review-info { min-width: 0; flex: 1; }
.review-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.review-info span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.small-action { padding: 7px 9px; border: 1px solid #e1e8dd; border-radius: 9px; background: var(--white); color: var(--leaf); font-size: 10px; font-weight: 600; white-space: nowrap; }
.review-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 15px; }
.review-list { display: grid; gap: 12px; }
.review-card { display: grid; grid-template-columns: minmax(190px, .8fr) minmax(0,1.4fr); gap: 16px; padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.review-photo { width: 100%; height: 215px; object-fit: cover; border-radius: 11px; background: #e8eee3; }
.review-details { display: flex; flex-direction: column; align-items: flex-start; padding: 3px 1px; }
.review-details h3 { margin: 8px 0 4px; font-size: 15px; }
.review-details p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.review-footer { display: flex; justify-content: space-between; align-items: center; gap: 9px; width: 100%; margin-top: auto; padding-top: 13px; }
.answer-note { padding: 10px 12px; border-right: 2px solid #c6d5be; background: #f7f8f2; color: #617265 !important; }
.score-pill { display: inline-flex; align-items: center; gap: 4px; padding: 6px 9px; border-radius: 8px; background: var(--gold-soft); color: #8f712f; font-size: 10px; font-weight: 700; }
.empty-state { display: grid; justify-items: center; padding: 44px 18px; border: 1px dashed #d7ddd3; border-radius: 16px; color: var(--muted); text-align: center; }
.empty-icon { display: grid; place-items: center; width: 47px; height: 47px; margin-bottom: 10px; border-radius: 15px; background: var(--leaf-soft); color: var(--leaf); }
.empty-state strong { color: var(--ink); font-size: 13px; }
.empty-state p { max-width: 330px; margin: 6px 0 0; font-size: 11px; line-height: 1.7; }

.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(17, 37, 28, .52); animation: fade .16s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card { width: min(570px, 100%); max-height: min(88vh, 800px); overflow: auto; border: 1px solid rgba(255,255,255,.5); border-radius: 19px; background: var(--white); box-shadow: 0 24px 80px rgba(12,29,20,.22); animation: modal-in .2s ease-out; }
.modal-card.wide { width: min(760px, 100%); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-head { position: sticky; z-index: 2; top: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; padding: 19px 21px 15px; border-bottom: 1px solid var(--line); background: rgba(255,254,250,.96); backdrop-filter: blur(12px); }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.close-button { display: grid; place-items: center; width: 31px; height: 31px; flex: 0 0 31px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--muted); }
.modal-content { padding: 19px 21px 21px; }
.challenge-modal-hero { display: grid; grid-template-columns: minmax(180px,.8fr) minmax(0,1.2fr); gap: 16px; }
.challenge-modal-image { width: 100%; height: 190px; object-fit: cover; border-radius: 13px; background: #e9eee2; }
.challenge-modal-copy { display: flex; flex-direction: column; align-items: flex-start; }
.challenge-modal-copy h3 { margin: 9px 0 6px; font-size: 18px; }
.challenge-modal-copy p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.modal-meta-grid { display: flex; flex-wrap: wrap; gap: 8px 15px; margin-top: 13px; color: var(--muted); font-size: 10px; }
.form-divider { height: 1px; margin: 19px 0; background: var(--line); }
.form-title { margin: 0 0 12px; font-size: 13px; }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { color: #5d6e62; font-size: 10px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 11px; border: 1px solid #e0e5dc; border-radius: 10px; background: #fff; color: var(--ink); font-size: 11px; }
.field textarea { min-height: 88px; resize: vertical; line-height: 1.7; }
.field input::placeholder, .field textarea::placeholder { color: #a3aaa1; }
.upload-box { display: flex; align-items: center; gap: 12px; min-height: 77px; padding: 11px; border: 1px dashed #c9d5c5; border-radius: 12px; background: #fafbf7; cursor: pointer; }
.upload-box:hover { border-color: var(--leaf); background: #f5f8f1; }
.upload-icon { display: grid; place-items: center; width: 41px; height: 41px; flex: 0 0 41px; border-radius: 11px; background: var(--leaf-soft); color: var(--leaf); }
.upload-copy strong { display: block; font-size: 10px; }
.upload-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.upload-box input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-preview { display: none; max-width: 76px; max-height: 56px; margin-right: auto; border-radius: 8px; object-fit: cover; }
.form-actions { display: flex; justify-content: flex-start; gap: 9px; margin-top: 18px; }
.local-storage-hint { display: flex; align-items: flex-start; gap: 8px; margin: 13px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.local-storage-hint svg { flex: 0 0 auto; margin-top: 1px; color: var(--leaf); }
.toast { position: fixed; z-index: 40; right: 50%; bottom: 26px; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 28px); padding: 11px 15px; border: 1px solid rgba(255,255,255,.15); border-radius: 12px; background: var(--ink); color: white; box-shadow: 0 10px 35px rgba(20,40,28,.22); font-size: 11px; opacity: 0; pointer-events: none; transform: translate(50%, 8px); transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(50%, 0); }
.toast svg { color: #cfe1bc; flex: 0 0 auto; }

@media (max-width: 1080px) {
  .sidebar { width: 222px; }
  .main-area { margin-right: 222px; padding-inline: 26px; }
  .challenge-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-columns { grid-template-columns: minmax(0, 1.25fr) minmax(235px, .9fr); }
}
@media (max-width: 820px) {
  .sidebar { inset: auto 0 0; width: auto; height: 69px; flex-direction: row; align-items: center; padding: 7px 10px max(7px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.1); }
  .brand, .nav-label, .sidebar-bottom { display: none; }
  .nav-list { display: flex; justify-content: space-around; gap: 4px; width: 100%; }
  .nav-link { flex: 1; flex-direction: column; justify-content: center; gap: 3px; min-height: 52px; padding: 5px 3px; border-radius: 11px; text-align: center; font-size: 9px; }
  .nav-link:hover { transform: none; }
  .nav-link .nav-icon { width: 20px; height: 20px; }
  .main-area { min-height: 100vh; margin-right: 0; padding: 20px 20px 94px; }
  .topbar { margin-bottom: 21px; }
  .dashboard-columns { grid-template-columns: minmax(0, 1.3fr) minmax(220px, .85fr); }
}
@media (max-width: 620px) {
  body { font-size: 13px; }
  .main-area { padding: 16px 14px 91px; }
  .topbar { align-items: flex-start; gap: 9px; margin-bottom: 18px; }
  .page-title { font-size: 19px; }
  .page-eyebrow { font-size: 9px; }
  .topbar-actions { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .demo-chip { display: none; }
  .role-button { padding: 8px 9px; font-size: 10px; }
  .role-button svg { width: 14px; }
  .student-select { max-width: 104px; padding: 7px 6px; font-size: 10px; }
  .hero { min-height: 229px; padding: 23px 20px; border-radius: 18px; }
  .hero-stamp { width: 80px; height: 80px; flex: 0 0 80px; margin-left: 0; }
  .stamp-inner { width: 65px; height: 65px; }
  .stamp-inner strong { font-size: 18px; }
  .stamp-inner span { font-size: 8px; }
  .hero h2 { max-width: 260px; font-size: 25px; }
  .hero p { max-width: 290px; font-size: 11px; }
  .hero .primary-button { min-height: 36px; padding: 8px 10px; font-size: 10px; }
  .hero .hero-secondary { font-size: 10px; }
  .stats-row, .teacher-stat-grid { gap: 8px; }
  .stat-card { min-height: 74px; gap: 8px; padding: 11px 9px; border-radius: 13px; }
  .stat-icon { width: 35px; height: 35px; flex-basis: 35px; border-radius: 11px; }
  .stat-icon svg { width: 16px; }
  .stat-value { font-size: 17px; }
  .stat-label { font-size: 9px; }
  .dashboard-columns { grid-template-columns: 1fr; gap: 12px; margin-top: 22px; }
  .panel { padding: 15px; border-radius: 15px; }
  .feature-challenge { grid-template-columns: 110px minmax(0,1fr); gap: 11px; padding: 8px; }
  .feature-image { min-height: 154px; }
  .feature-title { font-size: 13px; }
  .feature-description { font-size: 10px; }
  .meta-row { gap: 8px; font-size: 9px; }
  .feature-bottom { align-items: flex-start; flex-direction: column; }
  .feature-bottom .primary-button { min-height: 34px; padding: 7px 10px; font-size: 10px; }
  .progress-panel { min-height: 0; }
  .section-heading { margin: 23px 0 12px; }
  .section-title { font-size: 15px; }
  .challenge-grid { grid-template-columns: 1fr; gap: 11px; }
  .challenge-card { display: grid; grid-template-columns: 116px minmax(0,1fr); }
  .challenge-cover { height: 100%; min-height: 175px; }
  .challenge-cover .status-badge { top: 7px; right: 6px; padding: 4px 6px; font-size: 8px; }
  .challenge-body { padding: 11px 10px; }
  .challenge-title { margin-top: 6px; font-size: 12px; }
  .challenge-description { min-height: 34px; font-size: 9px; }
  .challenge-meta { flex-wrap: wrap; gap: 6px; font-size: 8px; }
  .challenge-body .primary-button, .challenge-body .ghost-button { min-height: 32px; padding: 6px 9px; font-size: 9px; }
  .leaderboard-hero { min-height: 130px; padding: 20px; }
  .leaderboard-copy h2 { font-size: 19px; }
  .leaderboard-copy p { max-width: 260px; font-size: 10px; }
  .season-mark { width: 69px; height: 69px; flex-basis: 69px; }
  .season-mark-inner { width: 56px; height: 56px; }
  .season-mark strong { font-size: 17px; }
  .leaderboard-head, .leader-row { grid-template-columns: 37px minmax(0,1fr) 70px; gap: 6px; padding: 11px 9px; }
  .leaderboard-head span:last-child, .leader-row > .level-tag { display: none; }
  .leaderboard-head { font-size: 8px; }
  .person-name { font-size: 10px; }
  .person-subtitle { font-size: 8px; }
  .person-cell { gap: 7px; }
  .avatar { width: 32px; height: 32px; flex-basis: 32px; font-size: 11px; }
  .rank-number { width: 27px; height: 27px; font-size: 10px; }
  .points-cell { font-size: 10px; }
  .teacher-banner { align-items: flex-start; flex-direction: column; min-height: 0; padding: 22px; }
  .teacher-banner .primary-button { min-height: 36px; }
  .review-card { grid-template-columns: 105px minmax(0,1fr); gap: 11px; padding: 9px; }
  .review-photo { height: 174px; }
  .review-details h3 { font-size: 12px; }
  .review-details p { font-size: 9px; }
  .review-footer { flex-direction: column; align-items: flex-start; }
  .small-action { font-size: 9px; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal-card, .modal-card.wide { width: 100%; max-height: 92vh; border-radius: 19px 19px 0 0; }
  .modal-head { padding: 16px 16px 13px; }
  .modal-content { padding: 16px; }
  .challenge-modal-hero { grid-template-columns: 110px minmax(0,1fr); gap: 11px; }
  .challenge-modal-image { height: 148px; }
  .challenge-modal-copy h3 { margin-top: 6px; font-size: 14px; }
  .challenge-modal-copy p { font-size: 9px; }
  .modal-meta-grid { gap: 7px; font-size: 9px; }
  .field-grid { gap: 10px; }
  .field label { font-size: 9px; }
  .field input, .field select, .field textarea { font-size: 10px; }
  .toast { bottom: 81px; font-size: 10px; }
}

.onboarding-page { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 12% 16%, rgba(194, 211, 174, .27), transparent 27%), var(--paper); }
.onboarding-card { display: grid; grid-template-columns: .92fr 1.08fr; width: min(1050px, 100%); min-height: 620px; overflow: hidden; border: 1px solid rgba(24, 63, 48, .08); border-radius: 28px; background: var(--white); box-shadow: 0 26px 75px rgba(28, 53, 39, .13); }
.onboarding-art { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 39px 38px 30px; background: var(--ink); color: #fff; }
.onboarding-art::before { position: absolute; z-index: -1; content: ""; inset: 0; background: radial-gradient(circle at 85% 80%, rgba(119, 154, 111, .24), transparent 41%), linear-gradient(155deg, transparent 55%, rgba(255,255,255,.035)); }
.onboarding-brand { display: flex; align-items: center; gap: 11px; }
.onboarding-brand .brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: #2d5b43; color: #d6e5ba; }
.onboarding-brand strong, .onboarding-brand small { display: block; }
.onboarding-brand strong { font-size: 16px; }
.onboarding-brand small { margin-top: 2px; color: #adc0b0; font-size: 10px; }
.onboarding-art-copy { position: relative; z-index: 1; max-width: 380px; margin: 50px 0 40px; }
.onboarding-art-copy h2 { margin: 16px 0 11px; font-size: clamp(33px, 4vw, 46px); line-height: 1.3; letter-spacing: -.6px; }
.onboarding-art-copy p { max-width: 300px; margin: 0; color: #c6d5c9; font-size: 13px; line-height: 1.9; }
.onboarding-art-foot { display: flex; align-items: center; gap: 8px; color: #d3dfca; font-size: 11px; }
.onboarding-art-foot svg { color: #e1c878; }
.onboarding-orbit { position: absolute; z-index: -1; left: -96px; bottom: 102px; width: 310px; height: 310px; border: 1px solid rgba(231, 240, 221, .13); border-radius: 50%; box-shadow: 0 0 0 23px rgba(231, 240, 221, .035), 0 0 0 49px rgba(231, 240, 221, .027); }
.orbit-two { left: auto; right: -206px; bottom: -180px; width: 430px; height: 430px; }
.onboarding-main { display: flex; flex-direction: column; justify-content: center; padding: 45px clamp(28px, 5vw, 65px); }
.onboarding-step { display: flex; align-items: center; gap: 10px; margin-bottom: 21px; color: var(--muted); font-size: 11px; }
.onboarding-step span:first-child { padding: 5px 9px; border-radius: 999px; background: var(--leaf-soft); color: var(--ink); font-weight: 700; }
.onboarding-heading { margin-bottom: 25px; }
.onboarding-kicker { color: var(--leaf); font-size: 11px; font-weight: 700; }
.onboarding-heading h1 { margin: 7px 0 5px; color: var(--ink); font-size: clamp(25px, 3vw, 32px); line-height: 1.35; }
.onboarding-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.role-choices { display: grid; gap: 12px; }
.role-choice { display: grid; grid-template-columns: 44px minmax(0, 1fr) 20px; align-items: center; gap: 13px; width: 100%; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); text-align: right; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.role-choice:hover { transform: translateY(-2px); border-color: #b8cbb6; box-shadow: 0 10px 26px rgba(24, 63, 48, .08); }
.role-choice-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--leaf-soft); color: var(--leaf); }
.role-choice-icon.teacher { background: var(--gold-soft); color: #9e7935; }
.role-choice-copy strong, .role-choice-copy small { display: block; }
.role-choice-copy strong { font-size: 13px; }
.role-choice-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.role-choice-arrow { color: var(--leaf); }
.onboarding-back { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; margin: -10px 0 18px; padding: 5px 0; border: 0; background: transparent; color: var(--leaf); font-size: 11px; }
.onboarding-form { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.onboarding-form .field { min-width: 0; }
.onboarding-form .field input, .onboarding-form .field select { min-height: 45px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); }
.onboarding-submit { grid-column: 1 / -1; width: 100%; min-height: 47px; margin-top: 4px; border: 0; background: var(--ink); color: #fff; }
.onboarding-submit:hover { background: var(--ink-2); }
.onboarding-privacy { display: flex; align-items: flex-start; gap: 7px; margin: 24px 0 0; color: var(--muted); font-size: 10px; line-height: 1.8; }
.onboarding-privacy svg { flex: 0 0 auto; margin-top: 2px; color: var(--leaf); }
.identity-chip { display: flex; align-items: center; gap: 8px; max-width: 220px; padding: 5px 9px 5px 11px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); }
.identity-avatar { display: grid; place-items: center; flex: 0 0 31px; width: 31px; height: 31px; border-radius: 10px; background: var(--leaf-soft); color: var(--ink); font-size: 10px; font-weight: 700; }
.identity-chip strong, .identity-chip small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity-chip strong { color: var(--ink); font-size: 10px; }
.identity-chip small { max-width: 145px; margin-top: 2px; color: var(--muted); font-size: 8px; }
@media (max-width: 820px) {
  .onboarding-page { padding: 17px; }
  .onboarding-card { grid-template-columns: 1fr; min-height: auto; }
  .onboarding-art { min-height: 228px; padding: 22px 25px; }
  .onboarding-art-copy { margin: 20px 0 15px; }
  .onboarding-art-copy h2 { margin: 8px 0 4px; font-size: 27px; }
  .onboarding-art-copy p { max-width: 480px; font-size: 11px; }
  .onboarding-art-foot { display: none; }
  .onboarding-orbit { bottom: -215px; }
  .onboarding-main { padding: 30px clamp(23px, 7vw, 55px); }
}
@media (max-width: 620px) {
  .onboarding-page { display: block; padding: 0; background: var(--white); }
  .onboarding-card { min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .onboarding-art { min-height: 190px; padding: 18px 20px; }
  .onboarding-art-copy { margin: 16px 0 0; }
  .onboarding-art-copy h2 { font-size: 24px; }
  .onboarding-art-copy p { display: none; }
  .onboarding-main { padding: 25px 20px 36px; }
  .onboarding-heading { margin-bottom: 19px; }
  .role-choice { grid-template-columns: 40px minmax(0,1fr) 18px; gap: 10px; padding: 13px; }
  .role-choice-icon { width: 38px; height: 38px; }
  .onboarding-form { grid-template-columns: 1fr; gap: 10px; }
  .onboarding-submit { grid-column: auto; }
  .onboarding-privacy { margin-top: 19px; }
  .identity-chip { max-width: 145px; padding: 4px; }
  .identity-chip small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* Field community: a warm agricultural palette, photo-first local feed. */
.community-hero { display:flex; justify-content:space-between; align-items:center; gap:22px; min-height:185px; padding:28px clamp(22px,4vw,42px); border:1px solid #e5dfcf; border-radius:21px; background:linear-gradient(118deg,#f3eadb 0%,#e7eddf 52%,#dcebe5 100%); }
.community-hero h2 { margin:10px 0 6px; color:var(--ink); font-size:clamp(22px,3vw,31px); }
.community-hero p { max-width:560px; margin:0; color:#687367; font-size:12px; line-height:1.9; }
.community-kicker { display:inline-flex; align-items:center; gap:6px; color:#64805a; font-size:11px; font-weight:700; }
.community-local-note { display:flex; align-items:flex-start; gap:8px; margin:14px 0; padding:10px 13px; border:1px solid #e7e1d4; border-radius:12px; background:#fbf8ef; color:#746a58; font-size:10px; line-height:1.7; }
.community-local-note svg { flex:0 0 auto; color:var(--soil); }
.community-categories { display:flex; flex-wrap:wrap; gap:8px; margin:17px 0; }
.community-tag { display:inline-flex; align-items:center; gap:5px; padding:7px 10px; border-radius:999px; background:var(--leaf-soft); color:#54704f; font-size:10px; }
.community-tag.tag-1 { background:var(--soil-soft); color:var(--soil); }
.community-tag.tag-2 { background:var(--water-soft); color:#527e75; }
.community-tag.tag-3 { background:var(--wheat-soft); color:#927739; }
.community-tag.tag-4 { background:var(--tomato-soft); color:var(--tomato); }
.community-feed { display:grid; justify-items:center; gap:15px; margin:0 auto; }
.community-feed > * { width:min(760px,100%); }
.post-card { overflow:hidden; border:1px solid #e6e6dd; border-radius:18px; background:var(--white); box-shadow:0 8px 25px rgba(52,67,42,.045); }
.post-header { display:flex; align-items:center; gap:10px; padding:15px 16px 9px; }
.post-avatar,.comment-avatar { display:grid; place-items:center; flex:0 0 38px; width:38px; height:38px; border-radius:50%; background:linear-gradient(145deg,#dce9d3,#efe3cb); color:var(--ink); font-size:11px; font-weight:700; }
.post-author { min-width:0; flex:1; }
.post-author strong,.post-author span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.post-author strong { color:var(--ink); font-size:11px; }
.post-author span { margin-top:4px; color:var(--muted); font-size:9px; }
.follow-button { max-width:180px; padding:7px 10px; border:1px solid #b8c9ae; border-radius:999px; background:#f2f6ed; color:#4b6b46; font-size:9px; font-weight:700; white-space:nowrap; }
.follow-button.following { border-color:#e3e5de; background:#f7f7f3; color:#70796f; }
.post-caption { margin:5px 16px 12px; color:#34463a; font-size:12px; line-height:1.9; white-space:pre-wrap; overflow-wrap:anywhere; }
.post-photo { display:block; width:100%; max-height:560px; aspect-ratio:16/10; object-fit:cover; background:linear-gradient(135deg,#dfe9d5,#e9dec9 55%,#d4e5df); }
.post-toolbar { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:10px 16px; border-bottom:1px solid #eff0ea; color:var(--muted); font-size:9px; }
.post-toolbar span:first-child { display:inline-flex; align-items:center; gap:5px; }
.post-comments { display:grid; gap:8px; padding:10px 16px 2px; }
.post-comment { display:flex; align-items:flex-start; gap:8px; }
.comment-avatar { flex-basis:26px; width:26px; height:26px; font-size:8px; }
.post-comment p { min-width:0; margin:0; padding:7px 10px; border-radius:11px; background:#f4f5ef; color:#4c594f; font-size:10px; line-height:1.7; }
.post-comment strong { margin-left:5px; color:var(--ink); }
.post-comment small { color:var(--muted); font-size:8px; white-space:nowrap; }
.comment-form { display:flex; gap:8px; padding:11px 16px 14px; }
.comment-form input { flex:1; min-width:0; padding:9px 11px; border:1px solid #e2e6dd; border-radius:999px; background:#fcfcf8; color:var(--ink); font-size:10px; }
.comment-form button { padding:0 13px; border:0; border-radius:999px; background:var(--ink); color:white; font-size:10px; font-weight:700; }
.challenge-author { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:6px; margin:8px 0; color:#6d7467; font-size:9px; }
.challenge-author strong { color:var(--ink); }
.challenge-author .follow-button { padding:5px 8px; }
.detail-author { margin:12px 0 0; }
.onboarding-credit { margin:12px 0 0; color:#806c4d; font-size:10px; text-align:center; }
.onboarding-credit strong { color:#5e482f; }

@media (max-width:620px) {
  .community-hero { align-items:flex-start; flex-direction:column; gap:14px; min-height:0; padding:21px 18px; }
  .community-hero p { font-size:10px; }
  .community-hero .primary-button { min-height:36px; font-size:10px; }
  .community-categories { gap:6px; }
  .community-tag { padding:6px 8px; font-size:9px; }
  .post-card { border-radius:15px; }
  .post-header { padding:12px 12px 7px; }
  .post-caption { margin:5px 12px 10px; font-size:11px; }
  .post-photo { aspect-ratio:4/3; }
  .post-toolbar { padding:9px 12px; }
  .post-comments { padding-inline:12px; }
  .comment-form { padding:10px 12px 12px; }
  .follow-button { max-width:125px; padding:7px 8px; font-size:8px; }
}


/* Profile photos and local follow-notification inbox. */
.identity-avatar, .post-avatar, .comment-avatar, .avatar, .notification-avatar, .profile-avatar-preview { overflow:hidden; }
.identity-avatar img, .post-avatar img, .comment-avatar img, .avatar img, .notification-avatar img, .profile-avatar-preview img { display:block; width:100%; height:100%; object-fit:cover; border-radius:inherit; }
.notification-button { position:relative; display:grid; place-items:center; flex:0 0 38px; width:38px; height:38px; padding:0; border:1px solid var(--line); border-radius:12px; background:var(--white); color:var(--ink); }
.notification-button:hover { border-color:#b9cbb5; background:#f5f8f1; }
.notification-count { position:absolute; top:-5px; left:-5px; display:grid; place-items:center; min-width:17px; height:17px; padding:0 4px; border:2px solid var(--white); border-radius:999px; background:#b85842; color:white; font-size:8px; font-weight:700; }
.profile-photo-field { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.profile-photo-picker { display:flex; flex:1 1 230px; align-items:center; gap:11px; min-height:74px; padding:9px 11px; border:1px dashed #c9d5c5; border-radius:13px; background:#fafbf7; cursor:pointer; transition:border-color .16s ease,background .16s ease; }
.profile-photo-picker:hover { border-color:var(--leaf); background:#f5f8f1; }
.profile-avatar-preview { display:grid; place-items:center; flex:0 0 52px; width:52px; height:52px; border:1px solid #dfe7d9; border-radius:50%; background:var(--leaf-soft); color:var(--leaf); }
.profile-photo-copy { display:grid; gap:4px; min-width:0; }
.profile-photo-copy strong { color:var(--ink); font-size:10px; }
.profile-photo-copy small { color:var(--muted); font-size:9px; }
.profile-photo-action { margin-right:auto; padding:7px 10px; border-radius:9px; background:var(--leaf-soft); color:var(--ink); font-size:9px; font-weight:700; white-space:nowrap; }
.profile-photo-input { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); clip-path:inset(50%); white-space:nowrap; }
.profile-photo-field:has(.profile-photo-input:focus-visible) .profile-photo-picker { outline:3px solid rgba(100,136,110,.35); outline-offset:2px; }
.profile-photo-remove { min-height:34px; padding:7px 10px; border:1px solid #ead4c9; border-radius:9px; background:#fbf4ef; color:#98583f; font-size:9px; }
.notification-intro { display:flex; align-items:center; gap:12px; margin-bottom:14px; padding:18px 20px; border:1px solid #e4e8db; border-radius:16px; background:linear-gradient(115deg,#f0f4ea,#f6efe0); }
.notification-intro-icon { display:grid; place-items:center; flex:0 0 42px; width:42px; height:42px; border-radius:13px; background:var(--white); color:var(--leaf); }
.notification-intro h2 { margin:0; font-size:16px; }
.notification-intro p { margin:4px 0 0; color:var(--muted); font-size:10px; }
.notification-list { display:grid; gap:9px; max-width:760px; margin:14px auto 0; }
.notification-item { display:flex; align-items:center; gap:11px; min-height:72px; padding:12px 14px; border:1px solid var(--line); border-radius:14px; background:var(--white); }
.notification-item.unread { border-color:#d9e4d1; background:#f7faf3; }
.notification-avatar { display:grid; place-items:center; flex:0 0 39px; width:39px; height:39px; border-radius:50%; background:var(--leaf-soft); color:var(--ink); font-size:11px; font-weight:700; }
.notification-item > div { flex:1; min-width:0; }
.notification-item strong { color:var(--ink); font-size:11px; }
.notification-item p { margin:3px 0; color:#5d6b60; font-size:10px; }
.notification-item small { color:var(--muted); font-size:9px; }
.notification-unread-dot { flex:0 0 8px; width:8px; height:8px; border-radius:50%; background:#6b8a61; }
@media (max-width:620px) {
  .notification-button { flex-basis:34px; width:34px; height:34px; border-radius:10px; }
  .profile-photo-picker { flex-basis:190px; gap:8px; padding:8px; }
  .profile-avatar-preview { flex-basis:44px; width:44px; height:44px; }
  .profile-photo-action { padding:6px 7px; font-size:8px; }
  .profile-photo-remove { min-height:32px; }
  .notification-intro { padding:14px; }
}


/* Lively field palette, multi-image posts, and safe content controls. */
:root {
  --ink: #163e2d;
  --ink-2: #245b3d;
  --leaf: #568b43;
  --leaf-soft: #e8f2de;
  --paper: #f7f4e9;
  --white: #fffefa;
  --line: #e5e6d9;
  --muted: #748176;
  --clay: #c75d3c;
  --clay-soft: #fae8df;
  --gold: #d6a323;
  --gold-soft: #fff2c9;
  --blue: #3d8290;
  --blue-soft: #e0f1f2;
  --soil: #70472f;
  --soil-soft: #f1dfcf;
  --wheat: #dca52c;
  --wheat-soft: #fbf0cd;
  --water: #378b86;
  --water-soft: #e0f2ed;
  --tomato: #b94d36;
  --tomato-soft: #fae4dc;
  --citrus: #83a52e;
  --citrus-soft: #f0f5d7;
}

.community-hero {
  border-color: #d8dfc8;
  background: linear-gradient(118deg, #fff0c8 0%, #edf3dd 42%, #dbefeb 100%);
}
.community-kicker { color: #4d7c3d; }
.community-symbols { display:flex; flex-wrap:wrap; gap:8px; margin:13px 0 4px; }
.field-symbol { display:inline-flex; align-items:center; gap:6px; padding:7px 10px; border:1px solid transparent; border-radius:999px; font-size:10px; font-weight:700; }
.field-symbol svg { flex:0 0 auto; }
.symbol-seed { border-color:#d4e4c3; background:#edf5df; color:#47713a; }
.symbol-wheat { border-color:#efdfad; background:#fff3d2; color:#8b6b17; }
.symbol-water { border-color:#c4e2df; background:#e3f4f1; color:#337b78; }
.symbol-tractor { border-color:#edd2c4; background:#fceddf; color:#995033; }
.symbol-sun { border-color:#eadbb9; background:#fff1c9; color:#8d6413; }
.community-tag { border:1px solid rgba(58,89,50,.06); }

.post-gallery { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; overflow:hidden; background:#e9eee1; }
.post-gallery:empty { display:none; }
.post-gallery .post-photo { width:100%; min-width:0; max-height:420px; aspect-ratio:4/3; object-fit:cover; }
.post-gallery[data-count="1"] { grid-template-columns:minmax(0,1fr); }
.post-gallery[data-count="1"] .post-photo { aspect-ratio:16/10; }
.post-gallery[data-count="3"] .post-photo:first-child { grid-row:span 2; height:100%; min-height:100%; }
.post-gallery[data-count="5"] .post-photo:first-child { grid-column:span 2; aspect-ratio:16/8; }
.post-upload-previews { display:flex; flex-wrap:wrap; gap:7px; margin-top:9px; }
.post-upload-previews:empty { display:none; }
.post-upload-previews img { width:70px; height:70px; border:1px solid #dce5d5; border-radius:10px; object-fit:cover; background:var(--leaf-soft); }

.danger-button, .danger-icon-button { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:35px; padding:7px 10px; border:1px solid #efcec1; border-radius:10px; background:#fff5f0; color:#9f432e; font-size:10px; font-weight:700; transition:background .15s ease, transform .15s ease; }
.danger-button:hover, .danger-icon-button:hover { background:#ffe9df; transform:translateY(-1px); }
.danger-icon-button { flex:0 0 36px; width:36px; min-height:36px; padding:0; border-radius:11px; }
.post-delete-button { flex:0 0 auto; min-height:31px; padding:6px 8px; font-size:9px; }
.challenge-card-actions { display:flex; align-items:center; gap:7px; margin-top:4px; }
.challenge-card-actions .card-action { flex:1; min-width:0; }
.teacher-challenge-tools { display:flex; flex-wrap:wrap; gap:8px; }
.teacher-challenge-tools .primary-button { flex:1; }
.submission-actions { display:flex; justify-content:flex-start; margin-top:11px; }
.review-footer { flex-wrap:wrap; }
.review-footer .danger-icon-button { margin-right:auto; }

.onboarding-art-foot { position:relative; z-index:1; display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.onboarding-agri-icons { display:inline-flex; align-items:center; gap:9px; margin-right:auto; color:#e8d38f; }
.onboarding-agri-icons svg:nth-child(2) { color:#bfdcaa; }
.onboarding-agri-icons svg:nth-child(3) { color:#a9d6d2; }

@media (max-width:620px) {
  .community-symbols { gap:6px; }
  .field-symbol { padding:6px 8px; font-size:9px; }
  .post-gallery { gap:3px; }
  .post-gallery .post-photo { aspect-ratio:1/1; }
  .post-gallery[data-count="1"] .post-photo { aspect-ratio:4/3; }
  .post-delete-button { flex:0 0 32px; width:32px; min-height:32px; padding:0; font-size:0; }
  .post-delete-button svg { width:14px; }
  .challenge-card-actions { gap:5px; }
  .danger-icon-button { flex-basis:32px; width:32px; min-height:32px; }
  .review-footer { align-items:stretch; }
  .review-footer .danger-icon-button { margin-right:0; }
  .onboarding-agri-icons { gap:6px; }
}

.challenge-author-person { display:inline-flex; align-items:center; gap:7px; min-width:0; }
.challenge-author-avatar { display:grid; place-items:center; flex:0 0 24px; width:24px; height:24px; overflow:hidden; border:1px solid #dbe5d2; border-radius:50%; background:var(--leaf-soft); color:var(--leaf); font-size:8px; font-weight:700; }
.challenge-author-avatar img { width:100%; height:100%; border-radius:inherit; object-fit:cover; }


/* Brighter home hero with clear agricultural symbols. */
.hero {
  background:
    radial-gradient(circle at 84% 15%, rgba(238, 183, 63, .24), transparent 25%),
    radial-gradient(circle at 12% 85%, rgba(53, 155, 127, .27), transparent 31%),
    linear-gradient(115deg, #153c2b 0%, #24623f 58%, #337451 100%);
}
.teacher-banner {
  background:
    radial-gradient(circle at 85% 16%, rgba(229, 174, 55, .22), transparent 24%),
    radial-gradient(circle at 18% 90%, rgba(65, 151, 127, .24), transparent 32%),
    linear-gradient(115deg, #163d2c 0%, #255f40 63%, #397451 100%);
}
.home-field-icons {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 2px;
}
.home-field-icon {
  display: grid;
  place-items: center;
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  border: 1px solid transparent;
  border-radius: 12px;
  box-shadow: 0 5px 14px rgba(13, 42, 28, .14);
  transition: transform .18s ease, box-shadow .18s ease;
}
.home-field-icon:hover {
  transform: translateY(-2px) rotate(-4deg);
  box-shadow: 0 8px 17px rgba(13, 42, 28, .2);
}
.home-field-icon.field-seed { border-color: #c9e1a8; background: #e6f4d0; color: #356d34; }
.home-field-icon.field-wheat { border-color: #f2dfa0; background: #fff1c5; color: #916711; }
.home-field-icon.field-water { border-color: #bce4dc; background: #dff5ef; color: #247a73; }
.home-field-icon.field-tractor { border-color: #efc4aa; background: #ffe4d4; color: #a4482d; }
.home-field-icon.field-sun { border-color: #f4d68a; background: #ffedb7; color: #a86d08; }
.teacher-banner .home-field-icons { margin: 11px 0 0; }

@media (max-width: 620px) {
  .hero { min-height: 250px; }
  .home-field-icons { gap: 5px; margin-top: 10px; }
  .home-field-icon { flex-basis: 31px; width: 31px; height: 31px; border-radius: 10px; }
  .home-field-icon svg { width: 15px; height: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-field-icon { transition: none; }
}


/* Readability pass: larger Arabic type, clearer hierarchy, and field artwork. */
body { font-size: 16px; }
.brand-name { font-size: 19px; }
.brand-caption, .nav-label { font-size: 12px; }
.nav-link { font-size: 14px; }
.mission-kicker, .mission-link, .local-note { font-size: 12px; }
.mission-title { font-size: 16px; }
.page-eyebrow { font-size: 13px; }
.page-title { font-size: clamp(23px, 2.2vw, 30px); }
.demo-chip, .role-button, .student-select { font-size: 13px; }
.hero-kicker { font-size: 13px; }
.hero h2 { font-size: clamp(29px, 3.15vw, 39px); }
.hero p, .teacher-banner p { font-size: 15px; }
.hero .hero-secondary { font-size: 14px; }
.hero .primary-button, .teacher-banner .primary-button { font-size: 14px; }
.stamp-inner strong { font-size: 27px; }
.stamp-inner span { font-size: 12px; }
.section-title { font-size: 20px; }
.section-subtitle, .panel-hint, .feature-description { font-size: 14px; }
.panel-title { font-size: 18px; }
.category-label, .card-kicker { font-size: 12px; }
.feature-title { font-size: 18px; }
.meta-row { font-size: 12px; }
.primary-button, .ghost-button, .soft-button, .role-button { font-size: 14px; }
.text-button, .panel-link { font-size: 13px; }
.stat-value { font-size: 22px; }
.stat-label { font-size: 13px; }
.progress-copy strong { font-size: 15px; }
.progress-copy span, .rank-mini, .goal-row { font-size: 12px; }
.rank-mini strong { font-size: 14px; }
.challenge-title { font-size: 16px; }
.challenge-description { font-size: 13px; }
.challenge-meta, .status-badge, .filter-button { font-size: 11px; }
.search-field input { font-size: 13px; }
.leaderboard-copy h2 { font-size: 25px; }
.leaderboard-copy p { font-size: 14px; }
.leaderboard-head { font-size: 12px; }
.person-name { font-size: 14px; }
.person-subtitle, .you-tag, .level-tag { font-size: 11px; }
.points-cell { font-size: 14px; }
.points-cell span, .leaderboard-note { font-size: 12px; }
.teacher-banner h2 { font-size: clamp(28px, 2.7vw, 36px); }
.review-info strong, .notification-item strong { font-size: 13px; }
.review-info span, .review-details p, .answer-note { font-size: 13px; }
.small-action, .score-pill { font-size: 12px; }
.empty-state strong { font-size: 16px; }
.empty-state p { font-size: 13px; }
.modal-head h2 { font-size: 20px; }
.modal-head p, .modal-meta-grid, .challenge-modal-copy p { font-size: 13px; }
.challenge-modal-copy h3 { font-size: 21px; }
.form-title { font-size: 16px; }
.field label { font-size: 13px; }
.field input, .field select, .field textarea { font-size: 15px; }
.upload-copy strong { font-size: 13px; }
.upload-copy span, .local-storage-hint { font-size: 12px; }
.community-hero h2 { font-size: clamp(28px, 3vw, 36px); }
.community-hero p { font-size: 15px; }
.community-kicker, .community-tag, .field-symbol { font-size: 12px; }
.community-local-note { font-size: 13px; }
.post-author strong { font-size: 14px; }
.post-author span, .post-toolbar, .post-comment small { font-size: 11px; }
.follow-button, .comment-form input, .comment-form button { font-size: 12px; }
.post-caption { font-size: 15px; }
.post-comment p { font-size: 13px; }
.challenge-author { font-size: 12px; }
.onboarding-brand strong { font-size: 18px; }
.onboarding-brand small, .onboarding-step, .onboarding-kicker { font-size: 13px; }
.onboarding-art-copy h2 { font-size: clamp(36px, 4vw, 48px); }
.onboarding-art-copy p { font-size: 15px; }
.onboarding-art-foot, .onboarding-heading p { font-size: 13px; }
.onboarding-heading h1 { font-size: clamp(29px, 3.2vw, 36px); }
.role-choice-copy strong { font-size: 15px; }
.role-choice-copy small, .onboarding-back, .onboarding-privacy { font-size: 12px; }
.onboarding-form .field input, .onboarding-form .field select { font-size: 15px; }
.onboarding-submit { font-size: 16px; }
.identity-chip strong { font-size: 12px; }
.identity-chip small { font-size: 10px; }
.notification-intro h2 { font-size: 19px; }
.notification-intro p, .notification-item p { font-size: 13px; }
.notification-item small { font-size: 11px; }
.profile-photo-copy strong { font-size: 12px; }
.profile-photo-copy small, .profile-photo-action, .profile-photo-remove { font-size: 11px; }

.hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0 auto 0 0;
  width: 44%;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(22,62,45,.08) 0%, rgba(22,62,45,.18) 55%, rgba(22,62,45,.94) 100%), url('/manus-storage/async-images/qFzLrw2zNS7Bhiqp2inWyI/image-1.webp');
  background-size: cover;
  background-position: left center;
  opacity: .94;
}
.hero::before { z-index: 1; }
.hero-copy, .hero-stamp { z-index: 2; }
.teacher-banner::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0 auto 0 0;
  width: 43%;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(22,62,45,.08) 0%, rgba(22,62,45,.2) 55%, rgba(22,62,45,.96) 100%), url('/manus-storage/async-images/qFzLrw2zNS7Bhiqp2inWyI/image-2.webp');
  background-size: cover;
  background-position: left center;
  opacity: .96;
}
.teacher-banner::after { z-index: 1; pointer-events: none; }
.teacher-banner-copy, .teacher-banner .primary-button { z-index: 2; }

@media (max-width: 820px) {
  .nav-link { font-size: 12px; }
  .main-area { padding-bottom: 101px; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .nav-link { min-height: 56px; font-size: 11px; line-height: 1.3; }
  .sidebar { height: 76px; }
  .main-area { padding: 17px 14px 103px; }
  .page-eyebrow { font-size: 12px; }
  .page-title { font-size: 23px; }
  .role-button, .student-select { font-size: 12px; }
  .hero { min-height: 260px; padding: 23px 17px; }
  .hero::after { width: 38%; opacity: .72; }
  .hero h2 { max-width: 235px; font-size: 27px; }
  .hero p { max-width: 260px; font-size: 14px; }
  .hero-kicker { font-size: 12px; }
  .hero-stamp { width: 72px; height: 72px; flex-basis: 72px; }
  .stamp-inner { width: 59px; height: 59px; }
  .stamp-inner strong { font-size: 21px; }
  .stamp-inner span { font-size: 10px; }
  .hero .primary-button, .hero .hero-secondary, .teacher-banner .primary-button { font-size: 12px; }
  .stat-value { font-size: 20px; }
  .stat-label { font-size: 11px; line-height: 1.4; }
  .section-title { font-size: 18px; }
  .section-subtitle, .panel-hint { font-size: 12px; }
  .panel-title { font-size: 16px; }
  .feature-title { font-size: 15px; }
  .feature-description { font-size: 12px; }
  .meta-row, .challenge-meta { font-size: 11px; }
  .challenge-title { font-size: 15px; }
  .challenge-description { font-size: 12px; }
  .challenge-body .primary-button, .challenge-body .ghost-button { font-size: 11px; }
  .leaderboard-copy h2 { font-size: 21px; }
  .leaderboard-copy p { font-size: 12px; }
  .leaderboard-head { font-size: 10px; }
  .person-name { font-size: 12px; }
  .person-subtitle, .level-tag { font-size: 10px; }
  .points-cell { font-size: 12px; }
  .teacher-banner { min-height: 205px; padding: 20px; }
  .teacher-banner::before { width: 40%; opacity: .68; }
  .teacher-banner h2 { font-size: 25px; }
  .teacher-banner p { font-size: 13px; }
  .community-hero h2 { font-size: 27px; }
  .community-hero p { font-size: 13px; }
  .community-tag, .field-symbol { font-size: 11px; }
  .post-author strong { font-size: 13px; }
  .post-author span { font-size: 10px; }
  .post-caption { font-size: 14px; }
  .post-comment p, .comment-form input { font-size: 12px; }
  .comment-form button { font-size: 12px; }
  .follow-button { font-size: 10px; }
  .filter-button, .search-field input, .small-action { font-size: 11px; }
  .field label { font-size: 12px; }
  .field input, .field select, .field textarea,
  .onboarding-form .field input, .onboarding-form .field select { font-size: 16px; }
  .upload-copy strong { font-size: 12px; }
  .upload-copy span, .local-storage-hint { font-size: 11px; }
  .modal-head h2 { font-size: 18px; }
  .modal-head p, .modal-meta-grid, .challenge-modal-copy p { font-size: 12px; }
  .community-local-note, .notification-intro p, .notification-item p { font-size: 12px; }
  .onboarding-art-copy h2 { font-size: 27px; }
  .onboarding-art-copy p { font-size: 13px; }
  .onboarding-heading h1 { font-size: 29px; }
  .role-choice-copy strong { font-size: 14px; }
  .role-choice-copy small, .onboarding-privacy { font-size: 12px; }
  .onboarding-submit { font-size: 15px; }
  .empty-state strong { font-size: 15px; }
  .empty-state p { font-size: 12px; }
  .notification-intro h2 { font-size: 17px; }
}


/* Small interactive labels stay legible instead of relying on tiny microtype. */
.comment-avatar { flex-basis: 30px; width: 30px; height: 30px; font-size: 10px; }
.notification-count { min-width: 20px; height: 20px; font-size: 10px; }
.danger-button, .danger-icon-button { font-size: 12px; }
.post-delete-button { font-size: 11px; }
@media (max-width: 620px) {
  .comment-avatar { flex-basis: 28px; width: 28px; height: 28px; font-size: 9px; }
  .danger-button { font-size: 11px; }
}

.challenge-author-avatar { flex-basis: 30px; width: 30px; height: 30px; font-size: 10px; }
.identity-chip small { font-size: 11px; }
@media (max-width: 620px) {
  .stamp-inner span { font-size: 11px; }
  .leaderboard-head, .person-subtitle, .post-author span, .follow-button { font-size: 11px; }
  .comment-avatar { font-size: 10px; }
  .challenge-author-avatar { flex-basis: 27px; width: 27px; height: 27px; font-size: 9px; }
}


/* A small appearance center keeps the field identity while letting each user choose a palette. */
.app-shell { background: var(--paper); color: var(--ink); }
.app-shell .hero, .app-shell .teacher-banner {
  background: radial-gradient(circle at 13% 16%, rgba(215,183,107,.16), transparent 31%), linear-gradient(115deg, var(--hero-start, #153c2b), var(--hero-mid, #24623f) 58%, var(--hero-end, #337451));
}
.app-shell[data-theme="harvest"], #modal-root[data-theme="harvest"] {
  --ink: #4b3919; --ink-2: #71551f; --leaf: #a47726; --leaf-soft: #f8efd6; --paper: #fbf6e9; --white: #fffdf8; --line: #eadfc5; --muted: #786e59; --clay: #b96643; --clay-soft: #faece4; --gold: #c88b22; --gold-soft: #fff1c9; --blue: #6d9195; --blue-soft: #e8f1ef; --soil: #805837; --soil-soft: #f1e5d4; --wheat: #d1a347; --wheat-soft: #fff1cc; --water: #70998f; --water-soft: #e4efeb; --tomato: #ad6046; --tomato-soft: #f7e8e0; --hero-start: #493512; --hero-mid: #70501a; --hero-end: #967125;
}
.app-shell[data-theme="water"], #modal-root[data-theme="water"] {
  --ink: #163d43; --ink-2: #205d63; --leaf: #438a81; --leaf-soft: #dff0eb; --paper: #f1f8f5; --white: #fbfffd; --line: #d9e9e4; --muted: #647f7c; --clay: #bd7659; --clay-soft: #f9ece4; --gold: #bc9b4e; --gold-soft: #f5efd9; --blue: #548b9c; --blue-soft: #e3f0f3; --soil: #795c49; --soil-soft: #efe7dc; --wheat: #c6ab64; --wheat-soft: #f5f1df; --water: #4e9995; --water-soft: #ddf1ee; --tomato: #b5664b; --tomato-soft: #f8e8e2; --hero-start: #133b40; --hero-mid: #1d6265; --hero-end: #287b78;
}
.app-shell[data-theme="citrus"], #modal-root[data-theme="citrus"] {
  --ink: #4b3021; --ink-2: #754628; --leaf: #a55e31; --leaf-soft: #fae9d7; --paper: #fcf4e9; --white: #fffdf9; --line: #edddc8; --muted: #806d5d; --clay: #bd6140; --clay-soft: #fae7de; --gold: #d28a24; --gold-soft: #fff0cc; --blue: #6d8990; --blue-soft: #e8f0ef; --soil: #805436; --soil-soft: #f1e4d4; --wheat: #d7a349; --wheat-soft: #fff1d0; --water: #6c9990; --water-soft: #e1efea; --tomato: #bd583b; --tomato-soft: #fae7df; --hero-start: #482b1d; --hero-mid: #754020; --hero-end: #a45725;
}
.app-shell[data-theme="soil"], #modal-root[data-theme="soil"] {
  --ink: #422b24; --ink-2: #694333; --leaf: #7f7048; --leaf-soft: #eeeedc; --paper: #f7f0e8; --white: #fffaf5; --line: #e8d9cb; --muted: #7d6d62; --clay: #a95f43; --clay-soft: #f5e6df; --gold: #bb9348; --gold-soft: #f5eedc; --blue: #6b8888; --blue-soft: #e7eeee; --soil: #79513a; --soil-soft: #eee0d2; --wheat: #c3a05a; --wheat-soft: #f4ecd7; --water: #70918a; --water-soft: #e3eee9; --tomato: #aa553e; --tomato-soft: #f5e4dd; --hero-start: #41281f; --hero-mid: #68402e; --hero-end: #88543b;
}
.app-shell[data-theme] .nav-link.active { color: var(--ink); background: var(--leaf-soft); }
.app-shell, .app-shell .sidebar, .app-shell .hero, .app-shell .teacher-banner,
.app-shell .stat-card, .app-shell .panel, #modal-root .modal-card {
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.appearance-button {
  min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 0 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--white);
  color: var(--ink); font-size: 12px; font-weight: 650; white-space: nowrap; transition: .16s ease;
}
.appearance-button svg { color: var(--leaf); }
.appearance-button:hover { border-color: var(--leaf); background: var(--leaf-soft); transform: translateY(-1px); }
.appearance-panel { padding: 15px 20px 19px; }
.appearance-intro { margin: 0 0 13px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.appearance-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.appearance-choice {
  min-width: 0; min-height: 78px; display: grid; grid-template-columns: 42px minmax(0,1fr) 18px; align-items: center; gap: 10px;
  padding: 11px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); color: var(--ink); text-align: right; transition: .16s ease;
}
.appearance-choice:hover { border-color: var(--leaf); transform: translateY(-1px); }
.appearance-choice.selected { border-color: var(--leaf); background: var(--leaf-soft); box-shadow: 0 0 0 2px color-mix(in srgb, var(--leaf) 18%, transparent); }
.appearance-swatch { width: 38px; height: 38px; display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.appearance-swatch i { border-radius: 50%; }
.appearance-swatch--field i:nth-child(1) { background: #183f30; }
.appearance-swatch--field i:nth-child(2) { background: #64886e; }
.appearance-swatch--field i:nth-child(3) { background: #c79d4c; }
.appearance-swatch--field i:nth-child(4) { background: #bd7051; }
.appearance-swatch--harvest i:nth-child(1) { background: #4b3919; }
.appearance-swatch--harvest i:nth-child(2) { background: #a47726; }
.appearance-swatch--harvest i:nth-child(3) { background: #d1a347; }
.appearance-swatch--harvest i:nth-child(4) { background: #f8efd6; }
.appearance-swatch--water i:nth-child(1) { background: #163d43; }
.appearance-swatch--water i:nth-child(2) { background: #438a81; }
.appearance-swatch--water i:nth-child(3) { background: #6d9195; }
.appearance-swatch--water i:nth-child(4) { background: #ddf1ee; }
.appearance-swatch--citrus i:nth-child(1) { background: #4b3021; }
.appearance-swatch--citrus i:nth-child(2) { background: #a55e31; }
.appearance-swatch--citrus i:nth-child(3) { background: #d28a24; }
.appearance-swatch--citrus i:nth-child(4) { background: #fae9d7; }
.appearance-swatch--soil i:nth-child(1) { background: #422b24; }
.appearance-swatch--soil i:nth-child(2) { background: #7f7048; }
.appearance-swatch--soil i:nth-child(3) { background: #a95f43; }
.appearance-swatch--soil i:nth-child(4) { background: #eee0d2; }
.appearance-choice-copy { min-width: 0; display: grid; gap: 4px; }
.appearance-choice-copy strong { font-size: 13px; line-height: 1.4; }
.appearance-choice-copy small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.appearance-choice-check { display: grid; place-items: center; color: var(--leaf); }
.appearance-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.appearance-footer span { display: inline-flex; align-items: center; gap: 6px; }
.appearance-footer button { border: 0; background: transparent; color: var(--leaf); font-size: 12px; font-weight: 700; }
.appearance-footer button:hover { text-decoration: underline; }
@media (max-width: 820px) {
  .appearance-button span { display: none; }
  .appearance-button { width: 38px; min-width: 38px; padding: 0; }
}
@media (max-width: 620px) {
  .appearance-options { grid-template-columns: 1fr; }
  .appearance-panel { padding: 13px 14px 16px; }
  .appearance-choice { min-height: 70px; }
  .appearance-footer { align-items: flex-start; flex-direction: column; }
}
