.rap-group-history { --rgh-ink: #263e35; --rgh-muted: #62736b; --rgh-line: #dfe7df; margin-top: 30px; padding: 25px; border: 1px solid var(--rgh-line); border-radius: 18px; background: #fff; color: var(--rgh-ink); min-width: 0; }
.rgh-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.rgh-heading .eyebrow { color: #698064; font-size: 10px; letter-spacing: 1.7px; }
.rgh-heading h2 { margin: 5px 0 7px; font-size: 24px; letter-spacing: -.6px; }
.rgh-heading p { margin: 0; color: var(--rgh-muted); font-size: 12px; line-height: 1.7; }
.rgh-refresh { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex-shrink: 0; padding: 9px 12px; font-size: 11px; }
.rgh-refresh svg, .rgh-search svg { width: 16px; height: 16px; flex-shrink: 0; }
.rgh-status { margin: 0 0 15px; padding: 10px 12px; border-radius: 8px; color: #80583f; background: #fff3e8; font-size: 12px; overflow-wrap: anywhere; }
.rgh-toolbar { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.rgh-search { display: flex; align-items: center; gap: 9px; flex: 1; max-width: 440px; padding: 0 12px; border: 1px solid var(--rgh-line); border-radius: 9px; color: var(--rgh-muted); background: #fbfcfa; }
.rap-group-history .rgh-search input { min-width: 0; width: 100%; border: 0; padding: 11px 0; background: transparent; font-size: 12px; box-shadow: none; }
.rgh-search:focus-within { outline: 2px solid #89ab7b; outline-offset: 2px; }
.rap-group-history .rgh-search input:focus { outline: 0; }
.rgh-toolbar p { margin: 0 0 0 auto; color: var(--rgh-muted); font-size: 11px; }
.rgh-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rgh-card { display: flex; flex-direction: column; gap: 11px; width: 100%; padding: 18px; border: 1px solid var(--rgh-line); border-radius: 12px; background: #fff; color: var(--rgh-ink); text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.rgh-card:hover { border-color: #99b48e; background: #fafcf7; }
.rgh-card:focus-visible, .rap-group-history button:focus-visible, .rap-group-history summary:focus-visible, .rap-group-history select:focus-visible { outline: 2px solid #658755; outline-offset: 3px; }
.rgh-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rgh-class { color: #627763; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.rgh-badge { display: inline-block; align-self: flex-start; flex-shrink: 0; padding: 4px 7px; border-radius: 5px; background: #edf4e8; color: #526c48; font-size: 9px; font-weight: 600; line-height: 1.5; }
.rgh-card-title { font-size: 16px; line-height: 1.45; font-weight: 650; overflow-wrap: anywhere; }
.rgh-card-lesson { margin-top: -7px; color: var(--rgh-muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.rgh-card-members { color: #4a6154; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.rgh-card-members > span { color: var(--rgh-muted); }
.rgh-card-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px 12px; margin-top: auto; padding-top: 12px; border-top: 1px solid #edf0e9; color: var(--rgh-muted); font-size: 9px; line-height: 1.6; }
.rgh-card-link { color: #49613e; font-weight: 650; white-space: nowrap; }
.rgh-card-link > span { margin-left: 5px; }
.rgh-empty { grid-column: 1 / -1; margin: 0; padding: 35px 20px; text-align: center; color: var(--rgh-muted); font-size: 12px; line-height: 1.8; }
.rgh-empty h3 { margin: 0 0 8px; color: var(--rgh-ink); font-size: 17px; }
.rgh-empty p { max-width: 490px; margin: 0 auto; }
.rgh-empty button { margin-top: 16px; }
.rgh-back { padding: 0; margin-bottom: 20px; color: #55734b; font-size: 12px; }
.rgh-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 21px; border-bottom: 1px solid var(--rgh-line); }
.rgh-detail-heading > div { min-width: 0; }
.rgh-detail-heading h3 { margin: 6px 0 8px; font-size: 23px; letter-spacing: -.5px; line-height: 1.4; overflow-wrap: anywhere; }
.rgh-detail-heading p { margin: 0; color: var(--rgh-muted); font-size: 11px; line-height: 1.7; }
.rgh-members { margin: 23px 0; }
.rgh-members h4, .rgh-history h4 { margin: 0; font-size: 15px; line-height: 1.5; }
.rgh-members-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 10px; margin: 13px 0; }
.rgh-member { display: flex; flex-direction: column; gap: 6px; padding: 13px; border: 1px solid var(--rgh-line); border-radius: 9px; background: #fafbf8; min-width: 0; }
.rgh-member strong { font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.rgh-member-status { color: #78674e; font-size: 10px; line-height: 1.5; }
.rgh-member-joined { color: #567a49; }
.rgh-member-saves { color: #657369; font-size: 10px; }
.rgh-contribution-note, .rgh-teacher-saves { color: var(--rgh-muted); font-size: 10px; line-height: 1.8; }
.rgh-contribution-note { max-width: 670px; margin: 10px 0 0; }
.rgh-teacher-saves { margin: 9px 0; }
.rgh-current { margin: 0 0 26px; border: 1px solid var(--rgh-line); border-radius: 10px; overflow: hidden; }
.rgh-current > summary { padding: 13px 15px; color: #47643e; background: #f4f7ef; cursor: pointer; font-size: 12px; font-weight: 600; }
.rgh-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.rgh-history-heading > span { color: var(--rgh-muted); font-size: 10px; }
.rgh-history-filters { display: flex; gap: 12px; margin: 0 0 20px; }
.rgh-history-filters label { flex: 1; max-width: 250px; min-width: 0; }
.rgh-history-filters label > span { display: block; margin-bottom: 5px; color: var(--rgh-muted); font-size: 10px; }
.rgh-history-filters select { width: 100%; padding: 9px 10px; border: 1px solid var(--rgh-line); border-radius: 8px; background: #fff; color: var(--rgh-ink); font-size: 11px; }
.rgh-timeline { margin: 0; padding: 0; list-style: none; }
.rgh-event { position: relative; margin: 0 0 0 5px; padding: 0 0 23px 23px; border-left: 1px solid #dce5d8; }
.rgh-event:last-child { padding-bottom: 3px; border-left-color: transparent; }
.rgh-event-dot { position: absolute; top: 4px; left: -5px; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: #91a887; box-shadow: 0 0 0 1px #c5d4bd; }
.rgh-event-writing .rgh-event-dot { background: #516e93; box-shadow: 0 0 0 1px #bfcede; }
.rgh-event-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px 18px; }
.rgh-event-heading p { margin: 0; color: #49604f; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.rgh-event-heading strong { color: var(--rgh-ink); font-weight: 600; }
.rgh-event-heading time { flex-shrink: 0; color: var(--rgh-muted); font-size: 9px; line-height: 1.7; }
.rgh-event-meta { margin: 5px 0 0; color: var(--rgh-muted); font-size: 10px; line-height: 1.7; }
.rgh-snapshot { margin-top: 10px; border: 1px solid var(--rgh-line); border-radius: 8px; overflow: hidden; }
.rgh-snapshot > summary { padding: 9px 12px; background: #f7f9f5; color: #4e6d48; font-size: 11px; font-weight: 550; cursor: pointer; }
.rgh-saved-work { padding: 14px 17px; }
.rgh-saved-work h5, .rgh-changes h5 { margin: 0 0 12px; color: var(--rgh-ink); font-size: 12px; overflow-wrap: anywhere; }
.rgh-lyrics { margin: 0; padding-left: 26px; color: #3f5146; font-size: 12px; line-height: 1.9; }
.rgh-lyrics li { padding-left: 7px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rgh-lyrics li::marker { color: #8b998d; font-size: 10px; font-variant-numeric: tabular-nums; }
.rgh-changes { padding: 14px 17px; border-bottom: 1px solid var(--rgh-line); }
.rgh-line-change, .rgh-title-change { display: grid; grid-template-columns: 47px minmax(0, 1fr); margin-top: 10px; gap: 3px 8px; font-size: 11px; line-height: 1.8; }
.rgh-line-change > strong, .rgh-title-change > strong { grid-row: 1 / 3; color: var(--rgh-muted); font-size: 10px; font-weight: 550; }
.rgh-line-change del, .rgh-title-change del, .rgh-line-change ins, .rgh-title-change ins { grid-column: 2; padding: 2px 7px; border-radius: 4px; text-decoration: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.rgh-line-change del, .rgh-title-change del { color: #84584b; background: #fcf0ec; }
.rgh-line-change del::before, .rgh-title-change del::before { content: "\2212 "; }
.rgh-line-change ins, .rgh-title-change ins { color: #3d683f; background: #edf6e9; }
.rgh-line-change ins::before, .rgh-title-change ins::before { content: "+ "; }
.rgh-track-change { color: var(--rgh-muted); font-size: 11px; margin: 12px 0 0; }
.rgh-muted { color: var(--rgh-muted); font-size: 11px; line-height: 1.7; }
.rgh-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 1000px) { .rgh-grid { grid-template-columns: minmax(0, 1fr); } .rgh-event-heading { flex-wrap: wrap; gap: 3px; } .rgh-event-heading time { flex-basis: 100%; } }
@media (max-width: 600px) {
  .rap-group-history { margin-top: 24px; padding: 19px 16px; }
  .rgh-heading { flex-wrap: wrap; gap: 12px; }
  .rgh-heading h2 { font-size: 22px; }
  .rgh-heading p { font-size: 11px; }
  .rgh-toolbar { flex-wrap: wrap; gap: 9px; }
  .rgh-toolbar p { flex-basis: 100%; margin: 0; }
  .rgh-search { flex-basis: 100%; max-width: none; }
  .rgh-card { padding: 15px; }
  .rgh-detail-heading { flex-wrap: wrap; gap: 12px; }
  .rgh-detail-heading h3 { font-size: 20px; }
  .rgh-members-grid { grid-template-columns: minmax(0, 1fr); }
  .rgh-history-heading { flex-wrap: wrap; gap: 4px; }
  .rgh-history-heading > span { flex-basis: 100%; }
  .rgh-history-filters { flex-wrap: wrap; gap: 9px; }
  .rgh-history-filters label { flex-basis: 100%; max-width: none; }
  .rgh-event { padding-left: 17px; }
  .rgh-saved-work, .rgh-changes { padding: 12px; }
  .rgh-line-change, .rgh-title-change { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .rgh-line-change > strong, .rgh-title-change > strong { grid-row: auto; }
  .rgh-line-change del, .rgh-title-change del, .rgh-line-change ins, .rgh-title-change ins { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { .rgh-card { transition: none; } }
