/* Mon Groupe canonical Web design system (#012B). */
:root,
body:is([data-appearance="dark"],[data-appearance="solar"][data-solar-tone="dark"]){
  color-scheme:dark;
  --color-page-bg:#090a0f;--color-surface:#12151d;--color-surface-secondary:#171b24;--color-surface-elevated:#202531;
  --color-text-primary:#f8f3f0;--color-text-secondary:#c8c0c2;--color-text-muted:#9f989c;--color-text-on-accent:#160d10;
  --color-border:#4b5363;--color-border-subtle:color-mix(in srgb,var(--color-border) 54%,transparent);
  --color-accent:#f15b67;--color-accent-hover:#ff7480;--color-success:#72d6a5;--color-warning:#f2bd68;--color-danger:#ff7f86;--color-info:#79bfff;--color-focus:#9dcfff;
  --shadow-card:0 10px 28px rgba(0,0,0,.18);--shadow-elevated:0 22px 60px rgba(0,0,0,.32);--border-default:var(--color-border-subtle);
  --mg-surface-solid:#0e1118;--mg-surface-primary:#141822;--mg-surface-secondary:#1d2330;--mg-surface-overlay:rgba(14,17,24,.98);
  --panel:var(--color-surface);--surface:var(--color-surface-secondary);--surface-muted:var(--color-surface-elevated);
  --text-primary:var(--color-text-primary);--text-secondary:var(--color-text-secondary);--text-muted:var(--color-text-muted);--border:var(--color-border-subtle);--accent:var(--color-accent);--danger:var(--color-danger)
}
body:is([data-appearance="light"],[data-appearance="solar"][data-solar-tone="light"]){
  color-scheme:light;
  --color-page-bg:#e8d8c5;--color-surface:#fffaf4;--color-surface-secondary:#f6eee5;--color-surface-elevated:#ffffff;
  --color-text-primary:#1d191b;--color-text-secondary:#554d51;--color-text-muted:#746c70;--color-text-on-accent:#ffffff;
  --color-border:#b8abad;--color-border-subtle:color-mix(in srgb,var(--color-border) 62%,transparent);
  --color-accent:#b52e3d;--color-accent-hover:#972332;--color-success:#176e4a;--color-warning:#8a5a05;--color-danger:#a92736;--color-info:#1266a8;--color-focus:#1266a8;
  --shadow-card:0 10px 28px rgba(64,39,25,.11);--shadow-elevated:0 22px 60px rgba(64,39,25,.18);
  --mg-surface-solid:#fffdfa;--mg-surface-primary:#fffaf4;--mg-surface-secondary:#f4ece3;--mg-surface-overlay:rgba(255,253,250,.98);
  --panel:var(--color-surface);--surface:var(--color-surface-secondary);--surface-muted:var(--color-surface-elevated);
  --text-primary:var(--color-text-primary);--text-secondary:var(--color-text-secondary);--text-muted:var(--color-text-muted);--border:var(--color-border-subtle);--accent:var(--color-accent);--danger:var(--color-danger)
}
:root{
  --font-family-display:"Fraunces",Georgia,serif;--font-family-body:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-display:clamp(2rem,4vw,3.75rem);--font-h1:clamp(1.8rem,3vw,3rem);--font-h2:clamp(1.4rem,2vw,2rem);--font-h3:clamp(1.1rem,1.35vw,1.35rem);
  --font-body:1rem;--font-body-small:.875rem;--font-label:.875rem;--font-caption:.75rem;
  --line-display:1.04;--line-heading:1.18;--line-body:1.55;
  --weight-regular:400;--weight-medium:500;--weight-heading:600;--weight-semibold:var(--weight-heading);--weight-bold:700;
  --space-1:.25rem;--space-2:.5rem;--space-3:.75rem;--space-4:1rem;--space-5:1.5rem;--space-6:2rem;
  --radius-sm:.5rem;--radius-md:.875rem;--radius-lg:1.125rem;--radius-pill:999px;
  --control-min-size:2.75rem;--page-max-width:90rem
}

/* Typography */
.mg-display,.mg-h1,.mg-h2,.mg-h3{margin:0;color:var(--color-text-primary);font-family:var(--font-family-display);text-wrap:balance}
.mg-display{font-size:var(--font-display);font-weight:var(--weight-heading);line-height:var(--line-display)}
.mg-h1{font-size:var(--font-h1);font-weight:var(--weight-heading);line-height:var(--line-heading)}
.mg-h2{font-size:var(--font-h2);font-weight:var(--weight-heading);line-height:var(--line-heading)}
.mg-h3{font-size:var(--font-h3);font-weight:var(--weight-medium);line-height:var(--line-heading)}
.mg-body,.mg-body-small,.mg-label,.mg-caption{font-family:var(--font-family-body);line-height:var(--line-body)}
.mg-body{font-size:var(--font-body);font-weight:var(--weight-regular)}
.mg-body-small{font-size:var(--font-body-small);font-weight:var(--weight-regular);color:var(--color-text-secondary)}
.mg-label{font-size:var(--font-label);font-weight:var(--weight-medium)}
.mg-caption{font-size:var(--font-caption);font-weight:var(--weight-medium);color:var(--color-text-muted)}

/* Cards */
.mg-card{display:grid;gap:var(--space-3);min-width:0;padding:var(--space-4);color:var(--color-text-primary);background:var(--color-surface);border:1px solid var(--border-default);border-radius:var(--radius-lg);box-shadow:var(--shadow-card)}
.mg-card__header,.mg-card__actions{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);flex-wrap:wrap}
.mg-card__title{font-size:var(--font-h3);font-weight:var(--weight-medium);line-height:var(--line-heading)}
.mg-card__metadata{font-size:var(--font-body-small);font-weight:var(--weight-regular);color:var(--color-text-secondary)}
.mg-card__body{min-width:0;color:var(--color-text-primary)}
.mg-card--compact{gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-md);box-shadow:none}
.mg-card--interactive{cursor:pointer;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}
.mg-card--interactive:hover{border-color:var(--color-accent);box-shadow:var(--shadow-elevated);transform:translateY(-1px)}
.mg-card--interactive:focus-visible{outline:3px solid var(--color-focus);outline-offset:3px}
.mg-card--selected{border-color:var(--color-accent);box-shadow:inset 3px 0 var(--color-accent),var(--shadow-card)}
.mg-card--danger{border-color:color-mix(in srgb,var(--color-danger) 55%,var(--color-border));background:color-mix(in srgb,var(--color-danger) 8%,var(--color-surface))}

/* Buttons */
.mg-btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);min-width:var(--control-min-size);min-height:var(--control-min-size);padding:var(--space-2) var(--space-4);border:1px solid transparent;border-radius:var(--radius-md);font:var(--weight-medium) var(--font-label)/1.2 var(--font-family-body);text-align:center;text-decoration:none;cursor:pointer;transition:background-color .16s ease,border-color .16s ease,color .16s ease,transform .12s ease}
.mg-btn:hover{transform:translateY(-1px)}.mg-btn:active{transform:translateY(0)}.mg-btn:focus-visible{outline:3px solid var(--color-focus);outline-offset:3px}.mg-btn:disabled,.mg-btn[aria-disabled="true"]{opacity:.52;cursor:not-allowed;transform:none}
.mg-btn--primary{color:var(--color-text-on-accent);background:var(--color-accent);border-color:var(--color-accent)}.mg-btn--primary:hover{background:var(--color-accent-hover);border-color:var(--color-accent-hover)}
.mg-btn--secondary{color:var(--color-text-primary);background:var(--color-surface-secondary);border-color:var(--color-border)}.mg-btn--ghost{color:var(--color-text-primary);background:transparent;border-color:var(--color-border-subtle)}
.mg-btn--danger{color:var(--color-text-on-accent);background:var(--color-danger);border-color:var(--color-danger)}.mg-btn--icon{width:var(--control-min-size);padding:0;border-radius:var(--radius-pill)}

/* Badges: status semantics remain independent from resource types. */
.mg-badge{display:inline-flex;align-items:center;gap:var(--space-1);width:max-content;max-width:100%;min-height:1.75rem;padding:var(--space-1) var(--space-2);border:1px solid var(--color-border-subtle);border-radius:var(--radius-pill);font:var(--weight-medium) var(--font-caption)/1.2 var(--font-family-body)}
.mg-badge--neutral{color:var(--color-text-secondary);background:var(--color-surface-secondary)}
.mg-badge--success{color:var(--color-success);background:color-mix(in srgb,var(--color-success) 11%,transparent);border-color:color-mix(in srgb,var(--color-success) 42%,var(--color-border))}
.mg-badge--warning{color:var(--color-warning);background:color-mix(in srgb,var(--color-warning) 11%,transparent);border-color:color-mix(in srgb,var(--color-warning) 42%,var(--color-border))}
.mg-badge--danger{color:var(--color-danger);background:color-mix(in srgb,var(--color-danger) 11%,transparent);border-color:color-mix(in srgb,var(--color-danger) 42%,var(--color-border))}
.mg-badge--info{color:var(--color-info);background:color-mix(in srgb,var(--color-info) 11%,transparent);border-color:color-mix(in srgb,var(--color-info) 42%,var(--color-border))}.mg-badge--accent{color:var(--color-accent);background:color-mix(in srgb,var(--color-accent) 11%,transparent);border-color:color-mix(in srgb,var(--color-accent) 42%,var(--color-border))}

/* Fields */
.mg-field{display:grid;gap:var(--space-2);min-width:0;color:var(--color-text-secondary);font:var(--weight-medium) var(--font-label)/1.35 var(--font-family-body)}
.mg-input,.mg-select,.mg-textarea{width:100%;min-height:var(--control-min-size);padding:var(--space-2) var(--space-3);color:var(--color-text-primary);background:var(--color-surface);border:1px solid var(--border-default);border-radius:var(--radius-md);font:var(--weight-regular) var(--font-body)/1.35 var(--font-family-body)}
.mg-textarea{min-height:7rem;resize:vertical}.mg-input:focus-visible,.mg-select:focus-visible,.mg-textarea:focus-visible,.mg-field input[type="checkbox"]:focus-visible,.mg-field input[type="radio"]:focus-visible{outline:3px solid var(--color-focus);outline-offset:2px}
.mg-input:disabled,.mg-select:disabled,.mg-textarea:disabled{opacity:.58;cursor:not-allowed}.mg-field-help,.mg-field-error{font-size:var(--font-caption);font-weight:var(--weight-regular)}.mg-field-help{color:var(--color-text-muted)}.mg-field-error{color:var(--color-danger)}

/* Modals */
.mg-modal{width:min(48rem,calc(100vw - 2rem));max-height:calc(100dvh - 2rem);padding:0;overflow:hidden;color:var(--color-text-primary);background:var(--color-surface);border:1px solid var(--border-default);border-radius:var(--radius-lg);box-shadow:var(--shadow-elevated)}
.mg-modal::backdrop{background:color-mix(in srgb,var(--color-page-bg) 76%,transparent);backdrop-filter:blur(4px)}
.mg-modal__header,.mg-modal__body,.mg-modal__actions{padding:var(--space-4) var(--space-5)}.mg-modal__header{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);border-bottom:1px solid var(--border-default)}.mg-modal__body{overflow:auto;overscroll-behavior:contain}.mg-modal__actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--space-3);flex-wrap:wrap;border-top:1px solid var(--border-default)}

/* Layout */
.mg-page{width:min(100%,var(--page-max-width));margin-inline:auto;padding:var(--space-5)}.mg-page-header{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-4);margin-bottom:var(--space-5);flex-wrap:wrap}.mg-section{display:grid;gap:var(--space-4);margin-block:var(--space-5)}
.mg-stack{display:flex;flex-direction:column;gap:var(--space-4)}.mg-cluster{display:flex;align-items:center;gap:var(--space-3);flex-wrap:wrap}.mg-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,17rem),1fr));gap:var(--space-4)}.mg-two-pane{display:grid;grid-template-columns:minmax(18rem,.8fr) minmax(0,1.2fr);gap:var(--space-5);min-width:0}

/* #013N4 — Media Explorer and musician tools consume the canonical components. */
.mg-media-explorer{grid-template-columns:repeat(auto-fit,minmax(8.25rem,1fr));gap:var(--space-3);margin:0 0 var(--space-4)}
.mg-media-explorer .mg-btn{justify-content:flex-start;min-height:3.25rem;padding:var(--space-3);text-align:left}
.mg-musician-tools{width:min(35rem,calc(100vw - 2rem))}
.mg-musician-tools__body{padding:var(--space-5)}
.mg-musician-tools__reading{display:grid;place-items:center;min-height:11.25rem;font-size:clamp(2.375rem,8vw,4.5rem);font-weight:var(--weight-heading);text-align:center;background:color-mix(in srgb,var(--color-accent) 8%,var(--color-surface));border-color:var(--color-border)}
.mg-musician-tools__actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--space-3);flex-wrap:wrap}
.mg-musician-tools__actions .mg-btn{min-height:var(--control-min-size)}

/* Compatibility bridge for validated legacy components on priority pages. */
html body #app-view[data-v2-shell-ready="1"] :is(button.primary,a.primary){min-height:var(--control-min-size);font-weight:var(--weight-medium)}
html body #app-view[data-v2-shell-ready="1"] :is(button.secondary,a.secondary,button.ghost,a.ghost){min-height:var(--control-min-size);font-weight:var(--weight-medium)}
html body #app-view[data-v2-shell-ready="1"] :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){min-height:var(--control-min-size);font-weight:var(--weight-regular)}
html body #app-view[data-v2-shell-ready="1"] :is(.status-badge,.scope,.repertoire-state-pill,.bpm-pill){font-weight:var(--weight-medium)!important}
html body #app-view[data-v2-shell-ready="1"] :is(.song-card,.overview-card,.resource-card,.group-rehearsal-card,.event-card,.member-card){border-color:var(--color-border-subtle)}
html body #app-view[data-v2-shell-ready="1"] :is(.song-row-copy small,.resource-copy small,.group-rehearsal-flow small,.media-song-history){font-weight:var(--weight-regular)!important;color:var(--color-text-secondary)}
html body #app-view[data-v2-shell-ready="1"] :is(.song-row-copy>strong,.resource-title>strong,.group-rehearsal-flow li strong){font-weight:var(--weight-medium)!important}
html body #app-view[data-v2-shell-ready="1"] :is(button,[role="button"],nav a,nav button){font-weight:var(--weight-medium)!important}
html body #app-view[data-v2-shell-ready="1"] :is(article strong,li strong,.song-row strong,.resource-card strong,.media-resource-chip strong){font-weight:var(--weight-medium)!important}
html body #app-view[data-v2-shell-ready="1"] :is(p,small,time,.muted,.meta,.metadata,.song-row-copy small,.resource-copy small){font-weight:var(--weight-regular)!important}
html body #app-view[data-v2-shell-ready="1"] :is(h1,.page-title,.screen-title,.welcome h1,.song-detail-hero h1){font-weight:var(--weight-heading)!important}
html body #app-view[data-v2-shell-ready="1"] :is(h2,.section-heading h2,.panel-heading h2){font-weight:var(--weight-heading)!important}
html body #app-view[data-v2-shell-ready="1"] :is(h3,h4,.card-title){font-weight:var(--weight-medium)!important}
html body #app-view[data-v2-shell-ready="1"] :is(.current,.is-current,[aria-current="true"]) :is(strong,.song-title,h2,h3){font-weight:var(--weight-heading)!important}
html body #app-view[data-v2-shell-ready="1"] dialog:not(.solo-workshop-dialog){color:var(--color-text-primary);background:var(--color-surface);border-color:var(--color-border-subtle);box-shadow:var(--shadow-elevated)}
@media(max-width:760px){.mg-page{padding:var(--space-4)}.mg-two-pane{grid-template-columns:1fr}.mg-modal{width:calc(100vw - 1rem);max-height:calc(100dvh - 1rem)}.mg-modal__header,.mg-modal__body,.mg-modal__actions{padding:var(--space-4)}}
@media(max-width:650px){.mg-media-explorer{display:flex;overflow-x:auto}.mg-media-explorer .mg-btn{min-width:8.875rem}.mg-musician-tools__body{padding:var(--space-4)}}
@media(prefers-reduced-motion:reduce){.mg-card--interactive,.mg-btn{transition:none}.mg-card--interactive:hover,.mg-btn:hover{transform:none}}

/* Canonical resource identity: type semantics are independent from statuses. */
:root,
body:is([data-appearance="dark"],[data-appearance="solar"][data-solar-tone="dark"]){
  --resource-partition-accent:#79bfff;--resource-partition-subtle:color-mix(in srgb,#79bfff 12%,transparent);--resource-partition-border:color-mix(in srgb,#79bfff 52%,var(--color-border,var(--border,#4b5363)));
  --resource-tablature-accent:#b89bff;--resource-tablature-subtle:color-mix(in srgb,#b89bff 12%,transparent);--resource-tablature-border:color-mix(in srgb,#b89bff 52%,var(--color-border,var(--border,#4b5363)));
  --resource-backing-accent:#ffaa64;--resource-backing-subtle:color-mix(in srgb,#ffaa64 12%,transparent);--resource-backing-border:color-mix(in srgb,#ffaa64 52%,var(--color-border,var(--border,#4b5363)));
  --resource-audio-accent:#72d6a5;--resource-audio-subtle:color-mix(in srgb,#72d6a5 12%,transparent);--resource-audio-border:color-mix(in srgb,#72d6a5 52%,var(--color-border,var(--border,#4b5363)));
  --resource-video-accent:#ff7f86;--resource-video-subtle:color-mix(in srgb,#ff7f86 12%,transparent);--resource-video-border:color-mix(in srgb,#ff7f86 52%,var(--color-border,var(--border,#4b5363)));
  --resource-document-accent:#aab4c4;--resource-document-subtle:color-mix(in srgb,#aab4c4 11%,transparent);--resource-document-border:color-mix(in srgb,#aab4c4 48%,var(--color-border,var(--border,#4b5363)));
  --resource-other-accent:#c0b8bd;--resource-other-subtle:color-mix(in srgb,#c0b8bd 9%,transparent);--resource-other-border:color-mix(in srgb,#c0b8bd 42%,var(--color-border,var(--border,#4b5363)));
}

body:is([data-appearance="light"],[data-appearance="solar"][data-solar-tone="light"]){
  --resource-partition-accent:#1266a8;--resource-partition-subtle:color-mix(in srgb,#1266a8 9%,transparent);--resource-partition-border:color-mix(in srgb,#1266a8 42%,var(--color-border,var(--border,#c8bfc1)));
  --resource-tablature-accent:#6946a5;--resource-tablature-subtle:color-mix(in srgb,#6946a5 9%,transparent);--resource-tablature-border:color-mix(in srgb,#6946a5 42%,var(--color-border,var(--border,#c8bfc1)));
  --resource-backing-accent:#a84c00;--resource-backing-subtle:color-mix(in srgb,#a84c00 9%,transparent);--resource-backing-border:color-mix(in srgb,#a84c00 42%,var(--color-border,var(--border,#c8bfc1)));
  --resource-audio-accent:#176e4a;--resource-audio-subtle:color-mix(in srgb,#176e4a 9%,transparent);--resource-audio-border:color-mix(in srgb,#176e4a 42%,var(--color-border,var(--border,#c8bfc1)));
  --resource-video-accent:#b52e3d;--resource-video-subtle:color-mix(in srgb,#b52e3d 9%,transparent);--resource-video-border:color-mix(in srgb,#b52e3d 42%,var(--color-border,var(--border,#c8bfc1)));
  --resource-document-accent:#526174;--resource-document-subtle:color-mix(in srgb,#526174 8%,transparent);--resource-document-border:color-mix(in srgb,#526174 38%,var(--color-border,var(--border,#c8bfc1)));
  --resource-other-accent:#6e666b;--resource-other-subtle:color-mix(in srgb,#6e666b 7%,transparent);--resource-other-border:color-mix(in srgb,#6e666b 34%,var(--color-border,var(--border,#c8bfc1)));
}

:root{--resource-partition:var(--resource-partition-accent);--resource-tablature:var(--resource-tablature-accent);--resource-backing:var(--resource-backing-accent);--resource-audio:var(--resource-audio-accent);--resource-video:var(--resource-video-accent);--resource-document:var(--resource-document-accent);--resource-other:var(--resource-other-accent)}

.mg-resource{--mg-resource-accent:var(--resource-other-accent);--mg-resource-subtle:var(--resource-other-subtle);--mg-resource-border:var(--resource-other-border)}
.mg-resource[data-resource-type="PARTITION"]{--mg-resource-accent:var(--resource-partition-accent);--mg-resource-subtle:var(--resource-partition-subtle);--mg-resource-border:var(--resource-partition-border)}
.mg-resource[data-resource-type="TABLATURE"]{--mg-resource-accent:var(--resource-tablature-accent);--mg-resource-subtle:var(--resource-tablature-subtle);--mg-resource-border:var(--resource-tablature-border)}
.mg-resource[data-resource-type="BACKING_TRACK"]{--mg-resource-accent:var(--resource-backing-accent);--mg-resource-subtle:var(--resource-backing-subtle);--mg-resource-border:var(--resource-backing-border)}
.mg-resource[data-resource-type="AUDIO"]{--mg-resource-accent:var(--resource-audio-accent);--mg-resource-subtle:var(--resource-audio-subtle);--mg-resource-border:var(--resource-audio-border)}
.mg-resource[data-resource-type="VIDEO"]{--mg-resource-accent:var(--resource-video-accent);--mg-resource-subtle:var(--resource-video-subtle);--mg-resource-border:var(--resource-video-border)}
.mg-resource[data-resource-type="DOCUMENT"]{--mg-resource-accent:var(--resource-document-accent);--mg-resource-subtle:var(--resource-document-subtle);--mg-resource-border:var(--resource-document-border)}
.mg-resource[data-resource-type="OTHER"]{--mg-resource-accent:var(--resource-other-accent);--mg-resource-subtle:var(--resource-other-subtle);--mg-resource-border:var(--resource-other-border)}
.mg-resource-card--partition{--mg-resource-accent:var(--resource-partition-accent);--mg-resource-subtle:var(--resource-partition-subtle);--mg-resource-border:var(--resource-partition-border)}
.mg-resource-card--tablature{--mg-resource-accent:var(--resource-tablature-accent);--mg-resource-subtle:var(--resource-tablature-subtle);--mg-resource-border:var(--resource-tablature-border)}
.mg-resource-card--backing{--mg-resource-accent:var(--resource-backing-accent);--mg-resource-subtle:var(--resource-backing-subtle);--mg-resource-border:var(--resource-backing-border)}
.mg-resource-card--audio{--mg-resource-accent:var(--resource-audio-accent);--mg-resource-subtle:var(--resource-audio-subtle);--mg-resource-border:var(--resource-audio-border)}
.mg-resource-card--video{--mg-resource-accent:var(--resource-video-accent);--mg-resource-subtle:var(--resource-video-subtle);--mg-resource-border:var(--resource-video-border)}
.mg-resource-card--document{--mg-resource-accent:var(--resource-document-accent);--mg-resource-subtle:var(--resource-document-subtle);--mg-resource-border:var(--resource-document-border)}
.mg-resource-card--other{--mg-resource-accent:var(--resource-other-accent);--mg-resource-subtle:var(--resource-other-subtle);--mg-resource-border:var(--resource-other-border)}
.mg-card.mg-resource{border-color:var(--mg-resource-border);background:linear-gradient(90deg,var(--mg-resource-subtle),transparent 38%),var(--color-surface);box-shadow:inset 3px 0 var(--mg-resource-accent),var(--shadow-card)}

html body #app-view[data-v2-shell-ready="1"] :is(.resource-card,.setlist-resource-item).mg-resource{border-color:var(--mg-resource-border)!important;background:linear-gradient(90deg,var(--mg-resource-subtle),transparent 38%),var(--color-surface,var(--surface,#12151d))!important;box-shadow:inset 3px 0 var(--mg-resource-accent),var(--shadow-card,0 12px 30px rgba(0,0,0,.12))!important}
html body #app-view[data-v2-shell-ready="1"] .mg-resource .mg-resource__icon{color:var(--mg-resource-accent)!important;border-color:var(--mg-resource-border)!important;background:var(--mg-resource-subtle)!important}
html body #app-view[data-v2-shell-ready="1"] .mg-resource .mg-resource__type{display:inline-flex;align-items:center;width:max-content;border:1px solid var(--mg-resource-border)!important;border-radius:999px;background:var(--mg-resource-subtle)!important;color:var(--mg-resource-accent)!important;padding:.2rem .45rem;font-weight:var(--weight-medium)!important}
html body #app-view[data-v2-shell-ready="1"] .media-resource-chip.mg-resource{border-color:var(--mg-resource-border)!important;background:var(--mg-resource-subtle)!important;box-shadow:inset 2px 0 var(--mg-resource-accent)}
html body #app-view[data-v2-shell-ready="1"] .media-resource-chip .mg-resource__icon{display:inline-grid;place-items:center;min-width:1.4rem;min-height:1.4rem;border:0!important;background:transparent!important}
html body #app-view[data-v2-shell-ready="1"] .solo-resource-group.mg-resource>button{border-color:var(--mg-resource-border)!important;background:var(--mg-resource-subtle)!important}
html body #app-view[data-v2-shell-ready="1"] .solo-resource-group.mg-resource>button.active{color:var(--mg-resource-accent)!important;box-shadow:inset 0 -2px var(--mg-resource-accent)!important}
html body #app-view[data-v2-shell-ready="1"] .setlist-resource-item.mg-resource{grid-template-columns:auto minmax(0,1fr) auto}

/* Resource role/usage badges are independent from support-type identity colors. */
html body #app-view[data-v2-shell-ready="1"] .resource-role-badge{display:inline-flex;align-items:center;width:max-content;border:1px solid var(--color-border);background:var(--color-surface-muted);color:var(--color-text-secondary);font-weight:var(--weight-medium)}
html body #app-view[data-v2-shell-ready="1"] .resource-usage-badge{display:inline-flex;align-items:center;width:max-content;border:1px solid color-mix(in srgb,var(--color-accent) 45%,var(--color-border));background:color-mix(in srgb,var(--color-accent) 10%,var(--color-surface));color:var(--color-text-primary);font-weight:var(--weight-medium)}
html body #app-view[data-v2-shell-ready="1"] .resource-usage-action{min-height:44px;border-color:var(--color-border);background:var(--color-surface-muted);color:var(--color-text-primary)}
html body #app-view[data-v2-shell-ready="1"] .resource-usage-action.selected{border-color:var(--color-accent);background:color-mix(in srgb,var(--color-accent) 13%,var(--color-surface));box-shadow:inset 0 0 0 1px var(--color-accent)}
html body:is([data-appearance="light"],[data-appearance="solar"][data-solar-tone="light"]) #app-view[data-v2-shell-ready="1"] #reference-list .resource-card .resource-usage-action{border-color:#8f7f77!important;background:#fffaf4!important;color:#1d191b!important;text-shadow:none!important;opacity:1!important}
html body:is([data-appearance="light"],[data-appearance="solar"][data-solar-tone="light"]) #app-view[data-v2-shell-ready="1"] #reference-list .resource-card .resource-usage-action.selected{border-color:#972332!important;background:#972332!important;color:#fff!important;box-shadow:inset 0 0 0 1px #972332!important}
html body:is([data-appearance="dark"],[data-appearance="solar"][data-solar-tone="dark"]) #app-view[data-v2-shell-ready="1"] #reference-list .resource-card .resource-usage-action{border-color:#687285!important;background:#202531!important;color:#f8f3f0!important;text-shadow:none!important;opacity:1!important}
html body:is([data-appearance="dark"],[data-appearance="solar"][data-solar-tone="dark"]) #app-view[data-v2-shell-ready="1"] #reference-list .resource-card .resource-usage-action.selected{border-color:#ff7480!important;background:#972332!important;color:#fff!important;box-shadow:inset 0 0 0 1px #ff7480!important}

.canonical-rehearsal-actions,.canonical-revision-bar,.group-rehearsal-panel article,.venue-links{display:flex;gap:.75rem;align-items:center;flex-wrap:wrap}
.canonical-rehearsal-actions{align-items:end}.canonical-rehearsal-actions .group-rehearsal-launch{min-height:3.25rem;padding-inline:1.4rem;font-size:1rem}.canonical-rehearsal-actions>small{flex-basis:100%}
.group-rehearsal-open-state{display:block;max-width:32rem;padding:.65rem .8rem;border-radius:.7rem;background:color-mix(in srgb,var(--accent,#e7b65a) 12%,transparent)}
.group-rehearsal-open-state[data-state="error"]{color:var(--danger,#ff8e8e);background:color-mix(in srgb,var(--danger,#ff8e8e) 12%,transparent)}
.canonical-rehearsal-actions{justify-content:flex-end}
.personal-rehearsal-instrument{display:grid;gap:.35rem;min-width:min(18rem,100%);color:var(--text-secondary);font-size:.82rem;font-weight:var(--weight-medium)}
.personal-rehearsal-instrument select{min-height:2.6rem;color:var(--text-primary);background:var(--panel);border:1px solid var(--border);border-radius:10px;padding:.45rem .7rem}
.personal-rehearsal-instrument small{max-width:25rem;color:var(--text-muted);font-weight:500}
.canonical-revision-bar,.group-rehearsal-panel{margin:1rem 0;padding:1rem;border:1px solid var(--border,rgba(255,255,255,.2));border-radius:var(--radius-lg,18px);background:var(--surface-muted,rgba(255,255,255,.06));color:var(--text-primary,inherit)}
.canonical-revision-bar{justify-content:space-between}
.canonical-revision-bar label{display:flex;gap:.5rem;align-items:center;color:var(--text-secondary,inherit)}
.canonical-revision-bar select{min-width:min(22rem,100%)}
.group-rehearsal-panel h3{margin-top:0}
.group-rehearsal-panel article{justify-content:space-between;padding:.8rem 0;border-top:1px solid var(--border,rgba(255,255,255,.2))}
.group-rehearsal-panel article>div:first-child{display:grid;gap:.2rem}
.canonical-version-label{font-size:.85rem;color:var(--text-secondary,inherit)}
.venue-sheet{display:grid;gap:.8rem;margin:0 0 1rem}
.venue-sheet div{padding:.75rem;border:1px solid var(--border,rgba(255,255,255,.2));border-radius:12px;background:var(--surface-muted,rgba(255,255,255,.06))}
.venue-sheet dt{font-size:.75rem;color:var(--text-muted,inherit);text-transform:uppercase}
.venue-sheet dd{margin:.25rem 0 0;color:var(--text-primary,inherit)}
@media(max-width:600px){.canonical-rehearsal-actions,.canonical-revision-bar,.group-rehearsal-panel article{align-items:stretch;flex-direction:column}.canonical-rehearsal-actions button,.canonical-revision-bar label,.canonical-revision-bar select,.group-rehearsal-panel button{width:100%}.solo-workshop-footer>div{display:grid;grid-template-columns:1fr 1fr;gap:.4rem}}

.group-rehearsal-card{display:grid!important;gap:1.15rem!important;align-items:stretch!important;padding:1.1rem!important;border:1px solid var(--border)!important;border-radius:var(--radius-lg,18px);background:var(--panel);box-shadow:0 12px 30px color-mix(in srgb,var(--ink,#05070d) 16%,transparent)}
.group-rehearsal-card>header,.group-rehearsal-card>footer{display:flex;gap:.75rem;align-items:center;justify-content:space-between;flex-wrap:wrap}
.group-rehearsal-card>header>div{display:grid;gap:.2rem}
.group-rehearsal-card>footer{justify-content:flex-end}
.group-rehearsal-flow{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;width:100%}
.group-rehearsal-flow section{min-width:0;padding:1rem;border:1px solid var(--border);border-radius:var(--radius-md,14px);background:var(--surface)}
.group-rehearsal-flow h4{margin:0 0 .65rem;color:var(--text-primary)}
.group-rehearsal-flow ol,.group-history-order,.group-history-timeline{display:grid;gap:.45rem;margin:0;padding:0;list-style:none}
.group-rehearsal-flow li,.group-history-order li{display:flex;align-items:center;gap:.75rem;min-width:0;padding:.7rem;border-radius:10px;background:var(--surface-muted);color:var(--text-primary)}
.group-rehearsal-flow li>span{display:flex;align-items:center;gap:.55rem;min-width:0;flex:1}
.group-rehearsal-flow li b,.group-history-order li b{display:grid;place-items:center;min-width:1.8rem;height:1.8rem;border-radius:999px;background:var(--panel);border:1px solid var(--border)}
.group-rehearsal-flow li.current{outline:2px solid var(--accent);outline-offset:1px}
.group-rehearsal-flow li.played{opacity:.78}
.group-rehearsal-flow li.postponed{border:1px dashed var(--border);opacity:.86}
.group-song-status{margin-left:auto;min-width:9rem}
.group-song-status select{width:100%;min-height:2.4rem;color:var(--text-primary);background:var(--panel);border:1px solid var(--border);border-radius:10px;padding:.4rem .6rem}
.group-song-status select:focus-visible{outline:3px solid color-mix(in srgb,var(--accent) 36%,transparent);outline-offset:2px}
.group-rehearsal-archive{margin-top:1rem;border-top:1px solid var(--border);padding-top:1rem}
.group-rehearsal-archive>summary{display:flex;justify-content:space-between;gap:.75rem;cursor:pointer;color:var(--text-primary);font-weight:var(--weight-medium)}
.group-rehearsal-archive>summary span{display:grid;place-items:center;min-width:1.8rem;height:1.8rem;border-radius:999px;background:var(--surface);border:1px solid var(--border)}
.group-rehearsal-archive>div{display:grid;gap:.65rem;margin-top:.8rem}
.group-rehearsal-archive-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto;gap:.8rem!important;align-items:center!important;padding:.8rem!important;border:1px solid var(--border)!important;border-radius:12px;background:var(--surface)}
.group-rehearsal-archive-row>div{display:grid;gap:.2rem;min-width:0}.group-rehearsal-archive-row small{color:var(--text-secondary)}
.group-rehearsal-confirm-shell{display:grid;gap:1rem;max-width:36rem;padding:1.4rem;color:var(--text-primary);background:var(--panel)}
.group-rehearsal-confirm-shell :is(h2,p){margin:0}
.group-rehearsal-confirm-shell>label{display:grid;gap:.4rem;color:var(--text-secondary);font-weight:var(--weight-medium)}.group-rehearsal-confirm-shell>label select{min-height:2.7rem;color:var(--text-primary);background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:.5rem .7rem}
.group-rehearsal-confirm-shell .secondary{color:var(--text-primary);background:var(--surface-muted);border-color:var(--border)}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.group-rehearsal-flow .actual-order li small,.group-history-order li small{margin-left:auto;color:var(--text-secondary)}

.group-rehearsal-history-dialog{width:min(880px,calc(100vw - 2rem));max-height:calc(100vh - 2rem);padding:0;border:1px solid var(--border);border-radius:var(--radius-lg,18px);background:var(--surface);color:var(--text-primary)}
.group-rehearsal-history-dialog::backdrop{background:rgba(4,7,14,.72);backdrop-filter:blur(4px)}
.group-rehearsal-history-shell{display:grid;max-height:calc(100vh - 2rem);overflow:hidden}
.group-rehearsal-history-shell>header{position:sticky;top:0;z-index:2;display:grid;grid-template-columns:auto 1fr auto;gap:1rem;align-items:center;padding:1rem;border-bottom:1px solid var(--border);background:var(--panel)}
.group-rehearsal-history-shell h2{margin:0;color:var(--text-primary)}
.group-rehearsal-history-content{display:grid;gap:1rem;padding:1rem;overflow:auto;overscroll-behavior:contain}
.group-rehearsal-history-content>section{padding:1rem;border:1px solid var(--border);border-radius:var(--radius-md,14px);background:var(--surface-muted);color:var(--text-primary)}
.group-rehearsal-history-content h3{margin-top:0}
.group-history-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}
.group-history-summary>div{display:grid;gap:.2rem;min-width:0}
.group-history-summary strong{overflow-wrap:anywhere}
.group-history-summary small,.group-history-timeline small{color:var(--text-secondary)}
.group-history-timeline li{display:grid;gap:.2rem;padding:.6rem;border-left:3px solid var(--accent);background:var(--surface)}

@media(max-width:760px){
  .group-rehearsal-flow{grid-template-columns:1fr}
  .group-history-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .group-rehearsal-card>footer button{width:100%}
  .group-rehearsal-archive-row{grid-template-columns:1fr!important;align-items:stretch!important}
}
@media(max-width:430px){
  .group-rehearsal-history-dialog{width:100vw;max-width:none;height:100dvh;max-height:none;border:0;border-radius:0}
  .group-rehearsal-history-shell{max-height:100dvh}
  .group-rehearsal-history-shell>header{grid-template-columns:1fr auto}
  .group-rehearsal-history-shell>header .context-return{display:grid!important;grid-column:1/-1;width:100%}
  .group-history-summary{grid-template-columns:1fr}
  .group-rehearsal-flow li{align-items:stretch;flex-direction:column}
  .group-rehearsal-flow li>button,.group-song-status{width:100%;margin-left:0}
}
.new-setlist-dialog {
  width: min(94vw, 680px);
  max-height: min(90vh, 820px);
  color: var(--text-primary);
  background: var(--panel, var(--surface, #111827));
  border: 1px solid var(--border, rgba(255,255,255,.2));
}
.new-setlist-dialog::backdrop { background: color-mix(in srgb, #05070d 72%, transparent); }
.new-setlist-dialog select[multiple] { min-height: 18rem; }
.new-setlist-dialog small { display:block; margin-top:.45rem; color:var(--text-muted); }

/* #012B2 — final runtime bridge: legacy shells used 700–900 as generic defaults. */
html body :is(button,[role="button"],nav a,nav button),
html body :is(button,[role="button"],nav a,nav button) *{font-weight:var(--weight-medium)!important}
html body :is(strong,b,em){font-weight:var(--weight-medium)!important}
html body :is(.eyebrow,[class*="badge"],[class*="pill"],.event-type,.sync-state){font-weight:var(--weight-medium)!important}
html body :is(h1,.page-title,.screen-title,.welcome h1,.song-detail-hero h1){font-weight:var(--weight-heading)!important}
html body :is(h2,.section-heading h2,.panel-heading h2){font-weight:var(--weight-heading)!important}
html body :is(h3,h4,.card-title){font-weight:var(--weight-medium)!important}
html body :is(.current,.is-current,[aria-current="true"]) :is(strong,b,.song-title,h2,h3){font-weight:var(--weight-heading)!important}
html body section#songs-page.page h2{font-weight:var(--weight-heading)!important}
html body section#songs-page.page header.song-detail-header h2{font-weight:var(--weight-heading)!important}
html body section.group-rehearsal-panel h3{font-weight:var(--weight-medium)!important}
html body #app-view[data-v2-shell-ready="1"] #songs-page :is(.media-song-heading h2,.panel-heading h2){font-weight:var(--weight-heading)!important}
html body #app-view[data-v2-shell-ready="1"] #songs-page #song-editor .song-detail-header h2{font-weight:var(--weight-heading)!important}
html body #app-view[data-v2-shell-ready="1"] #setlists-page #setlist-editor section.group-rehearsal-panel h3{font-weight:var(--weight-medium)!important}
html body #app-view[data-v2-shell-ready="1"] #songs-page :is(button,.secondary,.compact,.resource-edit,.resource-delete){font-weight:var(--weight-medium)!important}
html body #app-view[data-v2-shell-ready="1"] #songs-page :is(.repertoire-state-pill,.status-badge,.resource-primary,.resource-default,.resource-personal-choice){font-weight:var(--weight-medium)!important}
html body #app-view[data-v2-shell-ready="1"] #songs-page #song-list .song-card strong,
html body #app-view[data-v2-shell-ready="1"] #songs-page #song-list .media-resource-chip em{font-weight:var(--weight-medium)!important}
html body #app-view[data-v2-shell-ready="1"] #setlists-page :is(button,.secondary,.compact,.setlist-resources-toggle,.add-media-inline,.setlist-drag-handle,.setlist-remove-action,.song-state,.status-badge){font-weight:var(--weight-medium)!important}
html body #app-view[data-v2-shell-ready="1"] #setlists-page :is(.setlist-rock-song strong,.group-rehearsal-card strong,.group-rehearsal-panel strong,.group-rehearsal-panel h3,.group-rehearsal-panel h4){font-weight:var(--weight-medium)!important}
html body #app-view[data-v2-shell-ready="1"] #setlists-page :is(.muted,small,em){font-weight:var(--weight-regular)!important}
html body #app-view[data-v2-shell-ready="1"] #setlists-page :is(.group-song-status select,.group-rehearsal-flow li b){font-weight:var(--weight-medium)!important}
html body[data-appearance] dialog #personal-play-title{font-weight:var(--weight-heading)!important}
.personal-play-readiness{display:grid;gap:var(--space-2,8px);margin:var(--space-3,12px) 0;padding:var(--space-3,12px) var(--space-4,16px)}.personal-play-readiness strong{font-weight:var(--weight-medium)}.personal-play-readiness span,.personal-play-readiness summary,.personal-play-readiness li{font-size:var(--text-sm,.9rem);line-height:1.45}.personal-play-readiness summary{display:flex;align-items:center;min-height:44px;cursor:pointer;color:var(--color-accent,var(--brand))}

/* Consolidated personal preparation editor: four quiet, readable groups. */
.personal-play-settings{gap:var(--space-4,16px)!important;padding:var(--space-4,16px);border-radius:var(--radius-lg,18px);background:color-mix(in srgb,var(--color-surface-secondary) 88%,transparent)}
.personal-play-settings>h3{margin:0;font-size:var(--text-xl,1.35rem);line-height:1.25;font-weight:var(--weight-semibold,600)}
.personal-play-settings-group{min-width:0;margin:0;padding:var(--space-4,16px);display:grid;gap:var(--space-3,12px);border:1px solid var(--color-border-subtle);border-radius:var(--radius-md,14px);background:var(--color-surface)}
.personal-play-settings-group legend{padding:0 var(--space-2,8px);display:inline-flex;align-items:center;gap:var(--space-2,8px);font-size:var(--text-sm,.9rem);line-height:1.35;font-weight:var(--weight-medium,500);color:var(--color-text-primary)}
.personal-play-settings-group>label:not(.choice-line){display:grid;gap:var(--space-2,8px);font-size:var(--text-sm,.9rem);font-weight:var(--weight-regular,400);color:var(--color-text-secondary)}
.personal-play-settings-group select{width:100%;min-height:44px;padding:var(--space-2) var(--space-3);color:var(--color-text-primary);background:var(--color-surface-elevated);border:1px solid var(--color-border);border-radius:var(--radius-md);font:var(--weight-regular) var(--font-body)/1.35 var(--font-family-body)}
.personal-play-settings .contextual-choice{position:relative;display:grid!important;grid-template-columns:24px minmax(0,1fr) 44px;align-items:center;gap:var(--space-3,12px);min-height:48px;padding:var(--space-2,8px) var(--space-3,12px);border-radius:var(--radius-sm,10px);background:var(--color-surface-secondary)}
.personal-play-settings .contextual-choice input{width:20px;height:20px;margin:0;accent-color:var(--color-accent,var(--brand))}
.personal-play-settings .contextual-choice span{color:var(--color-text-primary);font-weight:var(--weight-regular)}
.context-help{position:relative;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;padding:0!important;border-radius:50%!important;display:inline-grid!important;place-items:center;font-size:.85rem!important;font-weight:var(--weight-medium,500)!important;text-transform:none!important}
.context-help::after{content:attr(data-tooltip);position:absolute;z-index:30;right:0;bottom:calc(100% + 9px);width:min(290px,75vw);padding:10px 12px;border:1px solid var(--color-border);border-radius:10px;background:var(--color-surface-elevated);color:var(--color-text-primary);box-shadow:0 12px 30px rgba(0,0,0,.28);font-size:var(--text-sm,.9rem);line-height:1.45;font-weight:var(--weight-regular,400);text-align:left;white-space:normal;opacity:0;visibility:hidden;transform:translateY(4px);transition:opacity .15s ease,transform .15s ease,visibility .15s}
.context-help:is(:hover,:focus-visible,[aria-expanded="true"])::after{opacity:1;visibility:visible;transform:translateY(0)}
.personal-play-settings-actions{padding-bottom:var(--space-3,12px)}
.personal-play-settings-actions .dialog-actions{margin:0;justify-content:flex-end;gap:var(--space-3,12px)}
.personal-play-readiness-heading{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3,12px)}
.personal-play-support-description{margin:0;padding:10px 12px;border-left:3px solid var(--color-accent,var(--brand));border-radius:0 8px 8px 0;background:var(--color-surface-secondary);color:var(--color-text-secondary);font-size:var(--text-sm,.9rem);line-height:1.45}
.personal-play-destinations{align-items:center}.personal-play-destinations .quiet{background:transparent!important}.personal-play-destinations #personal-play-start{margin-inline-start:auto}

.orphaned-file-list article{align-items:flex-start!important;flex-wrap:wrap}.orphaned-file-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:var(--space-2,8px)}.orphaned-file-actions select{min-height:44px;min-width:min(230px,70vw)}.safe-resource-menu{position:relative}.safe-resource-menu summary{display:grid;place-items:center;min-width:44px;min-height:44px;border:1px solid var(--color-border);border-radius:var(--radius-sm,10px);cursor:pointer;list-style:none;font-size:1.25rem}.safe-resource-menu summary::-webkit-details-marker{display:none}.safe-resource-menu[open] button{margin-top:var(--space-2,8px);max-width:260px;white-space:normal}

@media(max-width:640px){.personal-play-settings{padding:var(--space-3,12px)}.personal-play-settings-group{padding:var(--space-3,12px)}.personal-play-settings-actions .dialog-actions,.personal-play-destinations,.orphaned-file-actions{display:grid;width:100%;grid-template-columns:1fr}.personal-play-destinations #personal-play-start{margin-inline-start:0}.orphaned-file-actions select{min-width:0;width:100%}.context-help::after{position:fixed;left:16px;right:16px;bottom:16px;width:auto;max-width:none}}
