:root {
  --ink: #1d2a26;
  --muted: #68736e;
  --paper: #f5f3ee;
  --surface: #fffefa;
  --surface-soft: #eeeee8;
  --line: #dcded7;
  --green: #285c4d;
  --green-dark: #173e34;
  --green-soft: #e4eee9;
  --gold: #a17d42;
  --gold-soft: #f3ead9;
  --red: #9a4d45;
  --red-soft: #f7e8e5;
  --shadow: 0 24px 60px rgba(31, 47, 40, .10);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(161, 125, 66, .08), transparent 30%),
    linear-gradient(180deg, #f7f5f0 0%, var(--paper) 100%);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }

.app-shell { max-width: 1440px; margin: 0 auto; padding: 0 36px; }

.topbar {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand-wrap, .header-actions, .panel-title-row, .section-heading, .metric-topline, .records-meta, footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrap { gap: 14px; }
.brand-mark {
  width: var(--logo-size, 72px); height: var(--logo-size, 72px); flex: 0 0 var(--logo-size, 72px); border-radius: clamp(14px, calc(var(--logo-size, 72px) * .24), 24px);
  display: grid; place-items: center;
  position: relative; padding: 0; overflow: visible; border: 0; cursor: pointer;
  color: #fff; background: var(--green);
  font-family: "STSong", "Songti SC", serif;
  font-size: 21px;
  box-shadow: 0 9px 24px rgba(40, 92, 77, .22);
}
.brand-mark.has-custom-logo { background: transparent; box-shadow: 0 9px 24px rgba(40, 92, 77, .14); }
.brand-mark > img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: inherit; }
.logo-edit-badge { position: absolute; right: -5px; bottom: -5px; width: 18px; height: 18px; display: grid; place-items: center; border: 2px solid var(--paper); border-radius: 50%; background: var(--surface); color: var(--green); font: 800 11px/1 system-ui, sans-serif; box-shadow: 0 3px 8px rgba(29,42,38,.14); }

.eyebrow, .section-kicker {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 21px; letter-spacing: .02em; }
h2 { margin-bottom: 0; font-family: "STSong", "Songti SC", serif; font-size: 30px; font-weight: 700; letter-spacing: .02em; }
h3 { margin-bottom: 0; font-size: 16px; }

.header-actions { gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.showcase-year-control { margin-left: auto; }
.showcase-year-control[hidden] { display: none; }
.year-control, .showcase-year-control, .compact-control {
  min-height: 43px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 13px;
  background: rgba(255,255,255,.55);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  font-size: 13px;
}

select { cursor: pointer; }
.year-control select, .showcase-year-control select, .compact-control select {
  border: 0; background: transparent; color: var(--ink); font-weight: 650; outline: none;
}

.btn {
  min-height: 43px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 0 17px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 13px; font-weight: 700;
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: var(--green); box-shadow: 0 9px 20px rgba(40, 92, 77, .18); }
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary { border-color: var(--line); background: var(--surface); }
.btn-secondary:hover { border-color: #bfc5be; box-shadow: 0 7px 18px rgba(30, 47, 40, .07); }
.btn-ghost { border-color: transparent; background: var(--surface-soft); }
.btn-ghost:hover { background: #e5e6df; }
.add-year-button { padding: 0 13px; color: var(--green); }
.btn-showcase { border-color: #b7c7bf; background: transparent; color: var(--green); }
.btn-showcase:hover { border-color: var(--green); background: var(--green-soft); }

.team-section { padding: 34px 0 0; }
.team-card {
  padding: 27px 29px;
  background: linear-gradient(125deg, rgba(255,254,250,.98), rgba(238,242,237,.93));
  border: 1px solid #d3d9d2;
  border-radius: var(--radius-xl);
  box-shadow: 0 14px 34px rgba(35, 51, 45, .055);
}
.team-card-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.team-card-heading h2 { font-size: 29px; }
.team-profile-grid { padding-top: 23px; display: grid; grid-template-columns: 1.05fr 2fr; gap: 28px; align-items: stretch; }
.mentor-profile, .member-profile { display: flex; align-items: center; gap: 14px; }
.mentor-profile { padding-right: 27px; border-right: 1px solid var(--line); }
.profile-avatar { width: 70px; height: 70px; flex: 0 0 70px; padding: 0; display: grid; place-items: center; overflow: hidden; border: 1px solid transparent; border-radius: 20px; background: var(--green); color: #fff; font-family: "STSong", "Songti SC", serif; font-size: 22px; cursor: pointer; transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.profile-avatar:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.72); box-shadow: 0 9px 22px rgba(35,51,45,.14); }
.profile-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.avatar-placeholder { display: block; color: currentColor; font-family: Georgia, serif; line-height: 1; opacity: .58; transform: translateY(-1px); }
.member-profile .profile-avatar { width: 58px; height: 58px; flex-basis: 58px; border-radius: 17px; background: var(--green-soft); color: var(--green); font-size: 18px; }
.profile-copy { min-width: 0; }
.profile-role { display: block; margin-bottom: 5px; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.profile-copy h3 { margin-bottom: 6px; font-family: "STSong", "Songti SC", serif; font-size: 22px; }
.profile-copy h3 em { margin-left: 7px; color: var(--muted); font-family: inherit; font-size: 14px; font-style: normal; font-weight: 500; }
.profile-copy p { margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.research-list { color: var(--muted); font-size: 14px; line-height: 1.55; }
.research-list > span { display: block; margin-bottom: 2px; }
.research-list ul { margin: 0; padding-left: 17px; }
.research-list li + li { margin-top: 1px; }
.research-empty { color: #89918d !important; font-size: 14px !important; }
.member-profiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.member-profile { min-width: 0; }
.member-profile .profile-copy h3 { font-size: 19px; }

.hero-section { padding: 52px 0 56px; }
.hero-heading { align-items: flex-end; margin-bottom: 28px; }
.status-note { font-size: 12px; color: var(--muted); }
.status-note span { width: 7px; height: 7px; margin-right: 8px; display: inline-block; border-radius: 50%; background: #57977f; box-shadow: 0 0 0 4px var(--green-soft); }

.metrics-grid { display: grid; grid-template-columns: 1.45fr 1fr 1fr 1fr; gap: 14px; }
.metric-card {
  min-height: 176px;
  padding: 22px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: rgba(255,254,250,.9);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 24px rgba(35, 51, 45, .035);
}
.metric-card.feature-card { background: var(--green-dark); color: #fff; border-color: var(--green-dark); }
.metric-label { color: var(--muted); font-size: 13px; font-weight: 650; }
.feature-card .metric-label { color: rgba(255,255,255,.68); }
.metric-value { margin: 11px 0 9px; display: flex; align-items: baseline; gap: 7px; }
.metric-value strong { font-family: Georgia, "Songti SC", serif; font-size: 39px; line-height: 1; font-weight: 500; letter-spacing: -.03em; }
.metric-value span { color: var(--muted); font-size: 13px; }
.feature-card .metric-value span, .feature-card p { color: rgba(255,255,255,.6); }
.metric-card p { margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.pill, .summary-chip, .category-badge, .warning-badge {
  display: inline-flex; align-items: center;
  border-radius: 999px; padding: 5px 9px;
  font-size: 11px; font-weight: 700;
}
.pill { color: #ddf0e6; background: rgba(255,255,255,.11); }
.progress-track { height: 6px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.13); }
.progress-fill { width: 0; height: 100%; border-radius: inherit; transition: width .45s ease; }
.progress-fill.green { background: #c6a875; }

.progress-panels { display: grid; grid-template-columns: 1.45fr 1fr; gap: 14px; margin-top: 14px; }
.panel { min-height: 272px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.panel-title-row { align-items: flex-start; gap: 12px; margin-bottom: 22px; }
.summary-chip { color: var(--green); background: var(--green-soft); }
.text-button { border: 0; padding: 2px; background: transparent; color: var(--green); font-size: 13px; font-weight: 700; cursor: pointer; }
.text-button:hover { color: var(--green-dark); text-decoration: underline; text-underline-offset: 4px; }
.month-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; }
.month-cell { padding: 13px 10px; text-align: center; background: var(--surface-soft); border: 1px solid transparent; border-radius: 11px; }
.month-cell strong { display: block; margin-bottom: 2px; font-size: 16px; }
.month-cell span { color: var(--muted); font-size: 11px; }
.month-cell.complete { background: var(--green-soft); border-color: #cfe0d7; }
.month-cell.complete strong { color: var(--green); }
.month-cell.current { box-shadow: inset 0 0 0 1px var(--gold); }

.people-progress { max-height: 188px; overflow: auto; padding-right: 4px; }
.person-progress-row { padding: 0 0 17px; }
.person-progress-row + .person-progress-row { padding-top: 16px; border-top: 1px solid var(--line); }
.person-progress-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 13px; }
.person-progress-head strong { font-weight: 700; }
.person-progress-head span { color: var(--muted); }
.person-track { height: 6px; border-radius: 99px; overflow: hidden; background: var(--surface-soft); }
.person-track i { height: 100%; display: block; border-radius: inherit; background: var(--green); }
.empty-inline { min-height: 142px; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.7; }

.records-section {
  margin: 0 -36px;
  padding: 58px 36px 66px;
  background: rgba(255,254,250,.72);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.records-heading { align-items: flex-end; gap: 20px; }
.view-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.filters-bar { margin: 27px 0 18px; padding: 10px; display: flex; align-items: center; gap: 10px; background: var(--surface-soft); border-radius: 14px; }
.search-box { min-height: 43px; flex: 1; display: flex; align-items: center; gap: 9px; padding: 0 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.search-box input { width: 100%; border: 0; outline: none; color: var(--ink); background: transparent; font-size: 13px; }
.compact-control { background: var(--surface); }
.reset-button { padding: 0 10px; white-space: nowrap; }
.records-meta { margin-bottom: 13px; color: var(--muted); font-size: 12px; }
.records-meta p { margin-bottom: 0; }
.records-list { display: grid; gap: 12px; }
.record-card {
  position: relative;
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.record-card:hover { transform: translateY(-1px); border-color: #c9cec6; box-shadow: 0 12px 28px rgba(32,47,41,.06); }
.record-rail { padding-right: 18px; border-right: 1px solid var(--line); }
.record-date strong { display: block; font-family: Georgia, serif; font-size: 18px; font-weight: 500; }
.record-date span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.record-date time { margin-top: 7px; display: block; color: var(--green); font-size: 12px; font-weight: 750; letter-spacing: .01em; }
.record-date time.time-missing { color: #9a9488; font-weight: 500; }
.record-rail .category-badge { margin-top: 13px; }
.record-location { margin-top: 12px; padding-top: 11px; display: grid; gap: 3px; border-top: 1px solid #e7e8e2; }
.record-location span { color: var(--green); font-size: 12px; font-weight: 800; }
.record-location b { color: var(--muted); font-size: 10px; font-weight: 600; }
.record-location p { margin: 0; color: var(--ink); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.record-location.missing span { color: #9a9488; font-weight: 500; }
.category-badge { justify-self: start; color: var(--green); background: var(--green-soft); }
.category-badge.lesson { color: #765b2d; background: var(--gold-soft); }
.category-badge.individual { color: #435c78; background: #e9eef4; }
.category-badge.process { color: #5d566e; background: #eeebf2; }
.category-badge.summary { color: #7a4a45; background: var(--red-soft); }
.record-attendees { margin-top: 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.attendee-label { margin: 0; color: var(--muted); font-size: 12px; font-weight: 650; }
.attendee-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; }
.attendee { min-width: 0; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.attendee-avatar { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #eef1ec; color: var(--green); font-size: 12px; font-weight: 700; }
.attendee-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.attendee > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.record-body { min-width: 0; }
.record-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.record-main { min-width: 0; }
.record-main h3 { margin-bottom: 0; font-family: "STSong", "Songti SC", serif; font-size: 21px; line-height: 1.35; }
.record-context { margin: 9px 0 0; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.record-context span { padding: 4px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-weight: 750; }
.record-context b { font-weight: 550; }
.record-side { flex: 0 0 auto; text-align: right; }
.record-side strong { display: block; font-size: 13px; }
.record-compact-main { margin-top: 13px; display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 15px; align-items: stretch; }
.record-compact-main.no-image { grid-template-columns: 1fr; }
.record-preview { position: relative; min-width: 0; }
.media-thumb { padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); cursor: zoom-in; }
.record-preview-image { width: 100%; height: 126px; display: block; }
.media-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.media-thumb .file-kind { width: 100%; height: 100%; }
.preview-count { position: absolute; right: 8px; bottom: 8px; padding: 4px 7px; border-radius: 999px; color: #fff; background: rgba(27,48,40,.78); font-size: 9px; font-weight: 700; backdrop-filter: blur(5px); }
.record-summary { min-width: 0; min-height: 126px; padding: 13px 15px 11px; display: flex; flex-direction: column; border: 1px solid #e3e7e1; border-radius: 12px; background: linear-gradient(135deg, #fbfcfa 0%, #f6f8f5 100%); }
.summary-label { display: block; margin-bottom: 5px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.record-summary > .markdown-content { max-height: 64px; overflow: hidden; color: #49564f; font-size: 13px; line-height: 1.66; }
.record-view-actions { margin-top: auto; padding-top: 9px; display: flex; flex-wrap: wrap; gap: 6px; }
.record-view-actions button { min-height: 30px; padding: 0 11px; border: 1px solid #d8ded8; border-radius: 8px; background: rgba(255,255,255,.8); color: var(--muted); font-size: 10px; font-weight: 700; cursor: pointer; transition: color .15s ease, border-color .15s ease, background .15s ease; }
.record-view-actions button:hover { color: var(--green); border-color: #a9beb5; }
.record-view-actions button.active { color: #fff; border-color: var(--green); background: var(--green); }
.record-view-actions em { min-width: 17px; height: 17px; margin-left: 5px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 9px; font-style: normal; }
.record-view-actions button.active em { background: rgba(255,255,255,.2); color: #fff; }
.record-detail-panel { margin-top: 10px; padding: 14px 16px; border: 1px solid #e1e6e0; border-radius: 12px; background: #fafbf8; animation: detailIn .16s ease both; }
.record-detail-panel[hidden], .record-detail-panel section[hidden] { display: none; }
.markdown-content { color: #43504a; font-size: 13px; line-height: 1.72; overflow-wrap: anywhere; }
.markdown-content > :first-child { margin-top: 0; }
.markdown-content > :last-child { margin-bottom: 0; }
.markdown-content p { margin: 0 0 7px; }
.markdown-content ul, .markdown-content ol { margin: 0 0 7px; padding-left: 1.45em; }
.markdown-content li + li { margin-top: 2px; }
.markdown-content h3, .markdown-content h4, .markdown-content h5 { margin: 8px 0 5px; color: var(--ink); font-size: 1em; }
.markdown-content blockquote { margin: 5px 0; padding-left: 10px; border-left: 2px solid #b8c9c1; color: var(--muted); }
.markdown-content code { padding: 1px 4px; border-radius: 4px; background: #e9eeea; font-family: ui-monospace, monospace; font-size: .9em; }
.detail-empty { color: var(--muted) !important; }
@keyframes detailIn { from { opacity: 0; transform: translateY(-3px); } }
.copy-label { display: block; margin-bottom: 7px; color: var(--green); font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.record-files { margin-top: 2px; display: flex; flex-wrap: wrap; gap: 7px; }
.file-link {
  max-width: 230px; display: inline-grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 7px;
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px;
  background: #fafbf8; color: var(--muted); font-size: 11px; cursor: pointer;
}
.file-link b { min-width: 35px; color: var(--green); font-size: 9px; text-align: left; }
.file-link span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.file-link i { color: var(--green); font-style: normal; font-weight: 800; }
.file-link:hover { border-color: #a9beb5; background: var(--green-soft); }
.attachment-more { color: var(--muted); font-size: 10px; }
.warning-badge { margin-top: 5px; color: var(--red); background: var(--red-soft); }
.card-actions { margin-top: 6px; display: flex; justify-content: flex-end; gap: 6px; }
.card-actions button { border: 0; padding: 3px 5px; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.card-actions button:hover { color: var(--green); }
.card-actions button.delete:hover { color: var(--red); }
.empty-state { padding: 72px 20px; text-align: center; border: 1px dashed #cfd2cb; border-radius: var(--radius-lg); background: rgba(255,255,255,.48); }
.empty-icon { width: 52px; height: 52px; margin: 0 auto 15px; display: grid; place-items: center; border-radius: 15px; background: var(--green-soft); color: var(--green); font-size: 24px; }
.empty-state h3 { margin-bottom: 8px; font-size: 17px; }
.empty-state p { margin-bottom: 18px; color: var(--muted); font-size: 13px; }

.data-section { padding: 58px 0 68px; display: grid; grid-template-columns: .7fr 2fr; gap: 40px; align-items: start; }
.guidance-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.guidance-grid article { padding: 22px; border-left: 1px solid var(--line); }
.guidance-grid span { color: var(--gold); font-family: Georgia, serif; font-size: 12px; }
.guidance-grid h3 { margin: 21px 0 8px; }
.guidance-grid p { margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }

footer { padding: 23px 0 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
footer p { margin-bottom: 0; }

.modal-backdrop { position: fixed; z-index: 20; inset: 0; padding: 28px; display: grid; place-items: center; background: rgba(20, 30, 27, .53); backdrop-filter: blur(7px); }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(760px, 100%); max-height: calc(100vh - 56px); overflow: auto; padding: 27px; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow); animation: modalIn .2s ease both; }
.modal-small { width: min(520px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.99); } }
.modal-header { margin-bottom: 24px; display: flex; align-items: flex-start; justify-content: space-between; }
.modal-header h2 { font-size: 25px; }
.icon-button { width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--surface-soft); color: var(--muted); font-size: 23px; line-height: 1; cursor: pointer; }
.icon-button:hover { color: var(--ink); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.span-2 { grid-column: span 2; }
.field { display: grid; gap: 7px; }
.field > span { color: #505b56; font-size: 12px; font-weight: 700; }
.field b { color: var(--red); }
.member-select-field { margin: 0; padding: 0; border: 0; }
.field-title-row { display: flex; align-items: center; justify-content: space-between; }
.field-title-row legend { padding: 0; color: #505b56; font-size: 12px; font-weight: 700; }
.select-all-button { padding: 0; border: 0; background: transparent; color: var(--green); font-size: 11px; font-weight: 700; cursor: pointer; }
.member-options { min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.member-option { cursor: pointer; }
.member-option input { position: absolute; opacity: 0; pointer-events: none; }
.member-option span {
  min-height: 36px; padding: 0 12px; display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); font-size: 12px;
  transition: .16s ease;
}
.member-option input:checked + span { border-color: #9cb9ac; background: var(--green-soft); color: var(--green); box-shadow: inset 0 0 0 1px rgba(40,92,77,.08); }
.field input, .field select, .field textarea, .inline-form input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; outline: none; background: #fff; color: var(--ink); transition: border-color .16s ease, box-shadow .16s ease;
}
.field input, .field select, .inline-form input { height: 44px; padding: 0 12px; }
.field textarea { padding: 11px 12px; resize: vertical; line-height: 1.65; }
.field input:focus, .field select:focus, .field textarea:focus, .inline-form input:focus { border-color: #7b9e90; box-shadow: 0 0 0 3px rgba(40,92,77,.09); }
.form-advice { margin-top: 14px; padding: 11px 13px; border-radius: 9px; background: var(--gold-soft); color: #73572a; font-size: 12px; }
.modal-footer { margin-top: 23px; padding-top: 20px; display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.people-list { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.person-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 9px; background: var(--surface-soft); font-size: 12px; }
.person-chip button { width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: #d9dbd4; color: var(--muted); cursor: pointer; }
.person-chip button:hover { background: var(--red-soft); color: var(--red); }
.person-chip small { color: var(--gold); font-size: 9px; font-weight: 700; }
.modal-tip, .import-copy { margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.profile-form-block { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fbfbf7; }
.profile-form-block + .profile-form-block { margin-top: 13px; }
.mentor-form-block { background: var(--green-soft); border-color: #d2e0d8; }
.profile-form-title { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; color: var(--green); font-size: 12px; font-weight: 800; }
.profile-editor-layout { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 16px; align-items: start; }
.avatar-editor { padding: 0; display: grid; justify-items: center; gap: 7px; border: 0; background: transparent; color: var(--green); font-size: 10px; font-weight: 700; cursor: pointer; }
.avatar-editor > span { width: 68px; height: 68px; display: grid; place-items: center; overflow: hidden; border: 1px solid #c8dad1; border-radius: 20px; background: var(--surface); color: var(--green); font-family: "STSong", "Songti SC", serif; font-size: 23px; box-shadow: 0 6px 16px rgba(35,51,45,.07); }
.avatar-editor img { width: 100%; height: 100%; display: block; object-fit: cover; }
.avatar-editor:hover > span { border-color: var(--green); }
.team-form-grid { width: 100%; }
.team-member-editor { display: grid; gap: 10px; }
.member-editor-row { padding: 12px; display: grid; grid-template-columns: 66px 1fr 1.8fr auto; gap: 10px; align-items: end; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.compact-avatar-editor { align-self: center; }
.compact-avatar-editor > span { width: 50px; height: 50px; border-radius: 15px; font-size: 18px; }
.member-editor-row .field span { font-size: 10px; }
.remove-member-button { width: 36px; height: 44px; border: 0; border-radius: 9px; background: var(--surface-soft); color: var(--muted); cursor: pointer; }
.remove-member-button:hover { background: var(--red-soft); color: var(--red); }
.brand-form-block { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand-form-block strong { font-size: 13px; }
.brand-form-block p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.logo-size-control { margin-top: 12px; display: grid; grid-template-columns: auto minmax(150px, 240px) auto; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.logo-size-control input { width: 100%; accent-color: var(--green); cursor: ew-resize; }
.logo-size-control output { min-width: 42px; color: var(--green); font-weight: 750; text-align: right; }
.year-add-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.year-add-form .btn { min-width: 82px; }
.year-manager-list { margin-top: 18px; display: grid; gap: 7px; }
.year-manager-row { min-height: 45px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.year-manager-row strong { font-size: 12px; }
.year-manager-row span { margin-left: 8px; color: var(--gold); font-size: 9px; }
.year-manager-row button { padding: 4px 6px; border: 0; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.year-manager-row button:hover:not(:disabled) { color: var(--red); }
.year-manager-row button:disabled { opacity: .42; cursor: not-allowed; }
.attachment-field { align-content: start; }
.file-drop {
  min-height: 94px; padding: 17px; display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto;
  align-items: center; column-gap: 11px;
  border: 1px dashed #bfc9c2; border-radius: 12px; background: #fafaf6; cursor: pointer; transition: .16s ease;
}
.file-drop:hover, .file-drop.dragging { border-color: var(--green); background: var(--green-soft); }
.upload-symbol { grid-row: 1 / span 2; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--green-soft); color: var(--green); font-size: 18px; font-weight: 700; }
.file-drop strong { font-size: 12px; }
.file-drop small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.pending-files { display: grid; gap: 7px; }
.pending-file { min-height: 48px; padding: 7px 9px; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pending-file img, .file-kind { width: 38px; height: 34px; border-radius: 7px; object-fit: cover; background: var(--surface-soft); }
.file-kind { display: grid; place-items: center; color: var(--green); font-size: 9px; font-weight: 800; }
.pending-file div { min-width: 0; }
.pending-file strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; }
.pending-file small { color: var(--muted); font-size: 9px; }
.pending-file button { width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px; background: var(--surface-soft); color: var(--muted); cursor: pointer; }
.pending-file button:hover { color: var(--red); background: var(--red-soft); }
.year-preview { margin: 12px 0 0; padding: 11px 13px; border-radius: 9px; background: var(--green-soft); color: var(--green); font-size: 12px; }
.image-viewer-backdrop { background: rgba(12,18,16,.82); }
.image-viewer { width: min(1100px, 100%); max-height: calc(100vh - 44px); display: grid; grid-template-rows: auto 1fr; }
.image-viewer-head { display: flex; align-items: center; justify-content: space-between; color: #fff; }
.image-viewer-head p { margin-bottom: 0; font-size: 12px; }
.image-viewer img { max-width: 100%; max-height: calc(100vh - 100px); margin: 12px auto 0; display: block; object-fit: contain; border-radius: 10px; box-shadow: var(--shadow); }
.import-copy { margin: -4px 0 18px; }
.import-options { display: grid; gap: 9px; }
.choice-card { padding: 17px; display: grid; gap: 5px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.choice-card:hover { border-color: var(--green); box-shadow: 0 8px 22px rgba(33,54,45,.07); }
.choice-card strong { font-size: 14px; }
.choice-card span { color: var(--muted); font-size: 12px; }
.danger-choice:hover { border-color: var(--red); }

body.showcase-mode .header-actions,
body.showcase-mode .edit-team-button,
body.showcase-mode .status-note,
body.showcase-mode #managePeopleBtn,
body.showcase-mode .view-actions,
body.showcase-mode .filters-bar,
body.showcase-mode .records-management-meta,
body.showcase-mode .card-actions,
body.showcase-mode .data-section,
body.showcase-mode footer { display: none !important; }
body.showcase-mode .showcase-year-control { display: flex; }
body.showcase-mode .brand-mark { cursor: default; }
body.showcase-mode .logo-edit-badge { display: none; }
body.showcase-mode .profile-avatar { cursor: default; }
body.showcase-mode .profile-avatar:hover { transform: none; box-shadow: none; }
body.showcase-mode .topbar { min-height: 102px; }
body.showcase-mode .records-section { border-bottom: 0; }
body.showcase-mode .records-heading { margin-bottom: 28px; }

.toast-region { position: fixed; z-index: 40; right: 24px; bottom: 24px; display: grid; gap: 8px; }
.toast { min-width: 230px; padding: 13px 15px; color: #fff; background: var(--green-dark); border-radius: 11px; box-shadow: var(--shadow); font-size: 12px; animation: toastIn .24s ease both; }
.toast.error { background: #713c38; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1050px) {
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .progress-panels { grid-template-columns: 1fr; }
  .team-profile-grid { grid-template-columns: 1fr; }
  .mentor-profile { padding: 0 0 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .record-compact-main { grid-template-columns: 170px minmax(0, 1fr); }
  .data-section { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .app-shell { padding: 0 18px; }
  .topbar { padding: 20px 0; align-items: flex-start; flex-direction: column; }
  .header-actions { width: 100%; }
  .year-control, .showcase-year-control { width: 100%; justify-content: space-between; }
  .team-section { padding-top: 22px; }
  .team-card { padding: 22px; }
  .member-profiles { grid-template-columns: 1fr; gap: 16px; }
  .hero-section { padding: 42px 0; }
  .hero-heading, .records-heading { align-items: flex-start; flex-direction: column; }
  .status-note { margin-top: 14px; }
  .metrics-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 148px; }
  .month-grid { grid-template-columns: repeat(4, 1fr); }
  .records-section { margin: 0 -18px; padding: 45px 18px 52px; }
  .view-actions { width: 100%; }
  .view-actions .btn { flex: 1; padding: 0 9px; }
  .filters-bar { align-items: stretch; flex-direction: column; }
  .compact-control { justify-content: space-between; }
  .record-card { grid-template-columns: 128px minmax(0, 1fr); gap: 16px; padding: 18px; }
  .record-rail { padding-right: 14px; }
  .record-card-head { flex-direction: column; gap: 10px; }
  .record-side { text-align: left; }
  .card-actions { justify-content: flex-start; }
  .record-compact-main { grid-template-columns: 150px minmax(0, 1fr); gap: 12px; }
  .record-preview-image, .record-summary { height: 116px; min-height: 116px; }
  .guidance-grid { grid-template-columns: 1fr; }
  .guidance-grid article { border-left: 0; border-top: 1px solid var(--line); }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .profile-editor-layout { grid-template-columns: 1fr; }
  .avatar-editor { justify-self: start; }
  .member-editor-row { grid-template-columns: 66px 1fr; }
  .member-editor-row .field:last-of-type { grid-column: 1 / -1; }
  .remove-member-button { width: 100%; height: 34px; grid-column: 1 / -1; }
  .brand-form-block { align-items: flex-start; flex-direction: column; }
  footer { align-items: flex-start; flex-direction: column; gap: 7px; }
}

@media (max-width: 460px) {
  h2 { font-size: 26px; }
  .brand-mark { width: min(var(--logo-size, 72px), 84px); height: min(var(--logo-size, 72px), 84px); flex-basis: min(var(--logo-size, 72px), 84px); }
  h1 { font-size: 17px; }
  .eyebrow { font-size: 9px; }
  .header-actions { align-items: stretch; flex-direction: column; }
  .month-grid { grid-template-columns: repeat(3, 1fr); }
  .modal-backdrop { padding: 10px; }
  .modal { max-height: calc(100vh - 20px); padding: 21px; border-radius: 18px; }
  .record-card { grid-template-columns: 1fr; }
  .record-rail { display: grid; grid-template-columns: auto auto; align-items: start; justify-content: space-between; gap: 10px; padding: 0 0 13px; border-right: 0; border-bottom: 1px solid var(--line); }
  .record-rail .category-badge { margin-top: 0; align-self: start; }
  .record-attendees { grid-column: 1 / -1; margin-top: 0; display: flex; flex-wrap: wrap; }
  .attendee-label { width: auto; }
  .attendee { padding: 3px 7px 3px 3px; border-radius: 999px; background: var(--surface-soft); }
  .record-location { grid-column: 1 / -1; }
  .record-main .record-attendees { margin-top: 9px; }
  .record-compact-main { grid-template-columns: 116px minmax(0, 1fr); gap: 10px; }
  .record-preview-image, .record-summary { height: 108px; min-height: 108px; }
  .record-summary { padding: 10px 11px 9px; }
  .record-summary > .markdown-content { max-height: 43px; }
  .record-view-actions button { padding: 0 8px; }
  .year-add-form { grid-template-columns: 1fr; }
}

@media print {
  body { background: #fff; }
  .app-shell { max-width: none; padding: 0; }
  .header-actions, .view-actions, .filters-bar, .text-button, .card-actions, .data-section, footer { display: none !important; }
  .hero-section { padding: 28px 0; }
  .metric-card, .panel, .record-card { break-inside: avoid; box-shadow: none; }
  .records-section { margin: 0; padding: 28px 0; background: #fff; }
}
