@charset "utf-8";
/* ============================================================================
   MUSIC OF ME — skin for the project's Module.html player
   ----------------------------------------------------------------------------
   Loaded ONLY by Levels/Projects/Music of Me/Module.html — a structural clone
   of the standard grade player (Math8's Module.html). This file is a SKIN:
   colors, fonts, and surface treatments only. It must never move, resize, or
   hide an element — students rely on the tools being exactly where they are in
   every other LMEC module. Layout lives in the page's inline #eLayout styles;
   this sheet loads after them, so equal-specificity overrides win here.

   Theme ("a music stand under stage light"):
     stage (page)   #211a14  warm espresso dark
     keybed panels  #2b221a  side rail / GameBar cards
     paper (card)   #f8f2e4  ivory manuscript problem card
     ink            #2a2119  engraving ink on paper
     staff hairline #d9cdb4 / #cbb277
     brass accent   #c9973f  (on dark: #e0b25c; ink-on-paper: #7c5a1d)

   Fonts: "Instrument Serif" (title + the italic tempo-marking directions),
   "Albert Sans" (UI/body), "Noto Music" (note glyphs in the answer field and
   the ♪ Notes drawer).

   The blue → brass mapping is applied consistently: everything #0d6efd in the
   standard player (borders, SUBMIT, rail active state, drawer symbols, level
   card, progress line) turns brass here, same place, same size.
   ============================================================================ */

:root {
    --mm-stage:   #211a14;
    --mm-stage-2: #2b221a;
    --mm-paper:   #f8f2e4;
    --mm-paper-2: #f3e9d3;
    --mm-key:     #fffdf6;
    --mm-ink:     #2a2119;
    --mm-faint:   #8a7a66;
    --mm-line:    #d9cdb4;
    --mm-line-2:  #cbb277;
    --mm-brass:   #c9973f;
    --mm-brass-2: #e0b25c;
    --mm-brass-ink: #7c5a1d;
    --mm-brass-deep: #8a6420;
}

/* ── Stage ───────────────────────────────────────────────────────────────── */
body {
    background: radial-gradient(1100px 620px at 50% 14%, #302519 0%, var(--mm-stage) 62%) fixed !important;
    color: #ede3cd;
    font-family: "Albert Sans", "Segoe UI", system-ui, sans-serif;
}
/* Faint oversized clef in the dark — atmosphere only, never interactive. */
body::before {
    content: "\1D11E"; /* 𝄞 */
    font-family: "Noto Music", serif;
    position: fixed;
    left: -1.5rem;
    bottom: -8rem;
    font-size: 52vh;
    line-height: 1;
    color: rgba(224, 178, 92, 0.05);
    pointer-events: none;
    z-index: -1;
}
#MainContainer { background: transparent; }

nav#NavDiv.bg-dark { background-color: #241c15 !important; }

:focus-visible { outline: 2px solid var(--mm-brass-2); outline-offset: 2px; }

/* Mobile Calc/Board quick buttons (<576px) — espresso chips, same spot/size. */
#mTools button {
    background: rgba(43, 34, 26, 0.96);
    border-color: #4a3b2a;
    color: #e8dcc4;
}
#mTools button:active { background: #3a2f24; }

/* ── Title row ───────────────────────────────────────────────────────────── */
#eTitleRow #Title {
    font-family: "Instrument Serif", serif;
    font-weight: 400;
    color: #f6efdd;
}
/* The CCSS code span defineModule prepends — styled as the brass "opus" chip. */
#eTitleRow #Title .text-muted {
    color: var(--mm-brass-2) !important;
    font-family: "Albert Sans", sans-serif;
    border: 1px solid rgba(224, 178, 92, 0.45);
    border-radius: 8px;
    padding: 0.05em 0.45em;
    letter-spacing: 0.08em;
}

/* ── The problem card: ivory manuscript paper ────────────────────────────── */
#ProblemArea {
    background: linear-gradient(150deg, #faf5e9, var(--mm-paper));
    border: 1px solid #e6dbc2;
    box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.6);
    color: var(--mm-ink);
    animation: mm-rise 0.45s ease-out;
}
@keyframes mm-rise {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}
#ProblemArea #Directions {
    color: var(--mm-ink);
    font-family: "Instrument Serif", serif;
    font-style: italic;
}
/* A small brass clef opens the direction line, like the clef opens a system. */
#ProblemArea #Directions::before {
    content: "\1D11E";
    font-family: "Noto Music", serif;
    font-style: normal;
    color: var(--mm-brass);
    margin-right: 0.45rem;
}
#ProblemArea #Directions:empty::before { content: none; }
#Problem { color: var(--mm-ink); }
#output { text-align: center; }
#output svg { max-width: 100%; height: auto; }
/* "Mastered N / M" progress line (adaptive engine injects it with inline blue). */
#bankProgress { color: var(--mm-brass-ink) !important; }

/* ── Answer bar (same geometry; ink + brass instead of blue) ─────────────── */
#Answer .input-group-text {
    background: var(--mm-paper-2);
    color: #5c4a33;
    border-color: #b9a67f;
}
#Answer #MathField.form-control {
    background: var(--mm-key);
    border-color: #b9a67f;
    font-family: "Noto Music", "Albert Sans", serif;
    color: var(--mm-ink);
}
#Answer #MathField.form-control.mq-focused,
#Answer #MathField.form-control:focus-within {
    border-color: var(--mm-brass);
    box-shadow: 0 0 0 3px rgba(201, 151, 63, 0.25);
}
#Answer .btn-outline-secondary {
    border-color: #b9a67f;
    color: var(--mm-brass-ink);
}
#Answer .btn-outline-secondary:hover {
    background: var(--mm-paper-2);
    color: var(--mm-ink);
    border-color: var(--mm-brass);
}
#Answer .btn-primary,
#Email .btn-primary,
#AnswersContainer .btn-primary {
    background: var(--mm-brass);
    border-color: var(--mm-brass-deep);
    color: var(--mm-ink);
    font-weight: 700;
}
#Answer .btn-primary:hover,
#Email .btn-primary:hover,
#AnswersContainer .btn-primary:hover,
#Answer .btn-primary:focus,
#Email .btn-primary:focus,
#AnswersContainer .btn-primary:focus {
    background: var(--mm-brass-2);
    border-color: var(--mm-brass-deep);
    color: var(--mm-ink);
}
#Format { color: var(--mm-faint); }
#Feedback {
    color: var(--mm-brass-ink);
    font-family: "Instrument Serif", serif;
    font-style: italic;
}
/* Wrong-answer panel: the "correction slip" tint (position/size untouched). */
#AnswersContainer {
    background: var(--mm-paper-2);
    border-left: 4px solid #a63a2b;
    border-radius: 10px;
    padding: 10px 16px;
}
#TypedAnswer, #ShowAns { font-family: "Noto Music", serif; }

/* ── Side rail: a dark keybed holding ivory piano keys ───────────────────── */
#eRail {
    background: var(--mm-stage-2);
    border-color: rgba(224, 178, 92, 0.18);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}
#eRail .rt { color: #a5947c; }
#eRail > button {
    background: var(--mm-key);
    border-color: var(--mm-line);
    color: var(--mm-ink);
}
#eRail > button .cap { color: #6b5d4c; }
#eRail > button.active {
    background: var(--mm-brass);
    border-color: var(--mm-brass);
    color: var(--mm-ink);
}
#eRail > button.active .cap { color: #4a3208; }

/* ── Symbol drawer: a slip of manuscript paper ───────────────────────────── */
#eDrawer {
    background: var(--mm-paper);
    border-color: var(--mm-line-2);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}
#eDrawer .dh { color: var(--mm-ink); border-bottom-color: #e0d5bc; }
#eDrawer .dh .x { color: var(--mm-faint); }
#eDrawer .dg button {
    background: var(--mm-key);
    border-color: var(--mm-line-2);
    color: var(--mm-brass-ink);
}
#eDrawer .dg button:hover {
    background: #f7edd7;
    border-color: var(--mm-brass);
    color: var(--mm-ink);
}
/* ♪ Notes category: bigger tiles in the music font. */
#eDrawer.notes-open .dg button {
    font-family: "Noto Music", serif;
    font-size: 26px;
    height: 52px;
    color: var(--mm-ink);
}

/* ── GameBar: the front edge of the stage ────────────────────────────────── */
#GameBar {
    background: rgba(30, 23, 17, 0.97);
    border-top: 1px solid rgba(224, 178, 92, 0.35);
    box-shadow: 0 -6px 22px rgba(0, 0, 0, 0.45);
}
#GameBar .gb-card {
    background: var(--mm-stage-2);
    border-color: #3d3226;
    box-shadow: none;
}
#GameBar .gb-label { color: #a5947c; }
#GameBar .gb-value { color: #f3ead8; }
#GameBar .gb-sub { color: var(--mm-faint); }
#GameBar .gb-life { color: var(--mm-faint); }
#GameBar .gb-life b { color: #cbb99a; }
#GameBar .gb-accbar { background: #3a2f24; }
#GameBar .gb-level { background: linear-gradient(135deg, var(--mm-brass-deep), var(--mm-brass)); }
#GameBar .gb-level .gb-label { color: #f7ecd4; }
#GameBar .gb-level .gb-value { color: #fffbe8; }
#GameBar .gb-badge { color: #fffbe8; }
#GameBar .gb-xptext { color: #f7ecd4; }
/* Compact phone HUD */
#gbHud .hud-chip { color: #f3ead8; }
#gbHud .hud-bar { background: #3a2f24; }
#gbHud .hud-bar > div { background: linear-gradient(90deg, var(--mm-brass-deep), var(--mm-brass-2)); }
#gbHud .hud-next { color: #a5947c; }

/* ── Density layers: adapt to SCREEN HEIGHT ──────────────────────────────── */
/* The builder cards are tall, so vertical space is the real constraint: on a
   768px Chromebook the feedback line used to sit under the fixed GameBar.
   Three tiers — base (medium screens), roomy (tall monitors: bigger serif
   directions + a larger staff), and compact (short screens: everything fits
   above the footer with no scrolling). Sizes and spacing ONLY — every element
   keeps its standard position and order. Loads after #eLayout, so ties win. */
#eTitleRow { margin: 4px auto 6px; }
#ProblemArea { padding: 16px 28px 18px; }
#ProblemArea > br { display: none; }             /* the blank line under the directions */
#bankProgress { margin-bottom: 2px !important; font-size: 13px !important; }
#ProblemArea #Directions { font-size: 28px !important; line-height: 1.3; }
#mmbStage { margin-top: -4px; }                   /* pull the staves up toward the question */
#Format { font-size: 1rem; padding-left: 0; max-width: none; text-align: center; }
#GraphButtons { margin-top: 8px !important; }
#Feedback { margin-top: 6px; }
@media (min-width: 1200px) {
    /* Kill the vertical-centering reserve + oversized paddings on this player,
       and keep the GameBar at its COMPACT size (the big-screen layer grows it
       to ~130px, which eats a 768px Chromebook viewport). */
    .e-stage { min-height: 0; align-content: start; align-items: start; }
    #eTitleRow #Title { font-size: 26px; }
    #MainContainer { padding-bottom: 128px; }
    #GameBar { padding: 6px 10px 8px; }
    #GameBar .gb-card { padding: 7px 14px; min-width: 156px; }
    #GameBar .gb-level { min-width: 212px; }
    #GameBar .gb-label { font-size: 10px; }
    #GameBar .gb-value { font-size: 18px; }
    #GameBar .gb-sub { font-size: 10px; }
    #GameBar .gb-badge { width: 36px; height: 36px; font-size: 15px; }
    #GameBar .gb-life { top: 8px; right: 12px; }
    #GameBar .gb-accbar { height: 6px; margin-top: 5px; }
    #GameBar .gb-xpbar { height: 7px; margin-top: 5px; }
    #GameBar .gb-xptext { font-size: 10px; margin-top: 2px; }
}
/* Roomy tier — tall monitors get the large type and staff back. */
@media (min-height: 900px) {
    #ProblemArea { padding: 22px 36px 22px; }
    #ProblemArea #Directions { font-size: 32px !important; }
    #eTitleRow #Title { font-size: 28px; }
    /* !important: VexFlow writes inline width/height styles on the SVG */
    #output svg { height: 172px !important; width: auto !important; }
    #mmBuilder .mmb-key { height: 60px; line-height: 56px; font-size: 34px; }
    #Format { font-size: 1.05rem; }
}
/* Compact tier — short screens (Chromebooks): everything above the footer. */
@media (max-height: 799px) {
    #eTitleRow { margin: 2px auto 4px; }
    #eTitleRow #Title { font-size: 22px; }
    #ProblemArea { padding: 12px 22px 14px; }
    #ProblemArea #Directions { font-size: 24px !important; }
    /* !important: VexFlow writes inline width/height styles on the SVG */
    #output svg { height: 120px !important; width: auto !important; }
    #mmBuilder { margin-top: 4px; }
    .mmb-row { gap: 5px; margin: 5px 0; }
    #mmBuilder .mmb-key { height: 48px; line-height: 44px; }
    #Format { font-size: 0.9rem; }
    #bankProgress { font-size: 12px !important; }
    #GraphButtons { margin-top: 6px !important; }
    #Feedback { margin-top: 4px; }
}

/* ── "Writing a Measure" builder (data/writing-a-measure.js) ─────────────── */
/* The note/rest tool group under the staff. Keys match the ♪ Notes drawer
   tiles; the standard #GraphButtons SUBMIT/CLEAR sit below in their usual spot.
   #mmbStage holds the staff + the ⌫ key side by side, so the Notes and Rests
   rows underneath stay aligned as two matching groups. */
#mmbStage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
#mmbStage #output { min-width: 0; flex: 0 1 auto; }
#mmBuilder { margin: 6px auto 0; text-align: center; }
.mmb-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 6px 0;
}
.mmb-lab {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--mm-faint);
    min-width: 46px;
    text-align: right;
}
.mmb-key {
    width: 54px;
    height: 54px;
    padding: 0;
    font-family: "Noto Music", serif;
    font-size: 32px;   /* big enough that open (half) vs filled (quarter) heads read clearly */
    line-height: 50px;
    background: var(--mm-key);
    color: var(--mm-ink);
    border: 1px solid var(--mm-line);
    border-radius: 10px;
    box-shadow: 0 2px 0 var(--mm-line-2);
    cursor: pointer;
}
.mmb-key:hover { background: #f7edd7; border-color: var(--mm-brass); }
.mmb-key:active { transform: translateY(1px); box-shadow: none; }
.mmb-util { font-family: "Albert Sans", sans-serif; font-size: 20px; color: var(--mm-brass-ink); }
/* Creating a Chord: the ▲▼ pitch keys stack beside the staff; minis are half-height. */
.mmb-col { display: flex; flex-direction: column; gap: 6px; }
.mmb-mini { width: 44px; height: 27px; line-height: 24px; font-size: 14px; border-radius: 8px; }
#GraphButtons .btn-outline-secondary { border-color: #b9a67f; color: var(--mm-brass-ink); }
#GraphButtons .btn-outline-secondary:hover {
    background: var(--mm-paper-2);
    color: var(--mm-ink);
    border-color: var(--mm-brass);
}
@media (max-width: 640px) {
    .mmb-key { width: 46px; height: 54px; font-size: 27px; line-height: 50px; }
    .mmb-lab { flex-basis: 100%; text-align: center; }
}

/* ── Completion + results ────────────────────────────────────────────────── */
#TimeComplete { color: #f3ead8; font-family: "Instrument Serif", serif; }
#Email {
    background: var(--mm-paper);
    color: var(--mm-ink);
    border-radius: 16px;
    box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.6);
    padding: 22px 24px;
    max-width: 620px;
}
#Email #SendTitle { font-family: "Instrument Serif", serif; }
#Email .form-control { background: var(--mm-key); border-color: var(--mm-line); color: var(--mm-ink); }
#Email #Teachers { max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
    #ProblemArea { animation: none; }
}
