.music-postcard { --mp-ink:#26334e; --mp-border:#c7d0e2; --mp-paper:#fffaf0; color:var(--mp-ink); padding:4px 0 0; min-width:0; }
.mp-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:22px; margin-bottom:24px; }
.mp-heading p { font-size:.84rem; color:#65718a; line-height:1.7; margin:0; max-width:470px; }
.music-postcard button { cursor:pointer; font-family:inherit; }
.music-postcard button:disabled { opacity:.45; cursor:default; }
.mp-sound { flex:none; display:flex; gap:7px; align-items:center; border:1px solid var(--mp-border); border-radius:30px; padding:10px 15px; min-height:44px; font-size:.74rem; white-space:nowrap; background:#fff; color:#30479d; }
.mp-sound > span:first-child { font-size:1.2rem; }
.mp-sound[aria-pressed="false"] { background:#e9edf4; color:#68718a; }
.mp-studio { display:grid; grid-template-columns:minmax(0,.84fr) minmax(0,1.16fr); gap:27px; align-items:start; }
.mp-photo-side,.mp-compose-side { min-width:0; }
.mp-postcard { position:relative; margin:0; aspect-ratio:3/4; border:11px solid var(--mp-paper); border-bottom-width:40px; background:#dce2ea; box-shadow:1px 5px 18px #32446d1c; transform:rotate(-1.7deg); isolation:isolate; }
.mp-main-photo { width:100%; height:100%; display:block; object-fit:cover; }
.mp-photo-wash { position:absolute; inset:0; opacity:0; mix-blend-mode:screen; pointer-events:none; }
.mp-stamp { position:absolute; right:9px; top:9px; padding:7px 8px; border:1px dashed #fffaf0c9; background:#19294b40; color:#fffaf0; font:8px/1.5 var(--mono,monospace); letter-spacing:.06em; transform:rotate(7deg); }
.mp-photo-caption { position:absolute; left:2px; right:2px; bottom:-31px; display:flex; justify-content:space-between; align-items:center; gap:9px; color:#494943; font:1.1rem/1.2 var(--serif,Georgia,serif); }
.mp-photo-note { font-size:.85rem; color:#4b608a; }
.mp-photo-bars { position:absolute; bottom:13px; left:13px; right:13px; display:flex; height:39px; align-items:flex-end; gap:5px; pointer-events:none; }
.mp-photo-bars i { flex:1; display:block; height:var(--mp-bar-height,3px); border-radius:2px 2px 0 0; opacity:.8; }
.mp-photo-bars .is-current { opacity:1; outline:2px solid #fff; outline-offset:2px; }
.mp-scenes-hint { font-size:.7rem; line-height:1.6; color:#65718a; margin:22px 0 9px; }
.mp-scenes { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
.mp-scenes button { min-width:0; border:1px solid transparent; background:transparent; padding:3px; border-radius:5px; color:#65718a; }
.mp-scenes img { width:100%; aspect-ratio:1; display:block; object-fit:cover; border-radius:3px; }
.mp-scenes span { display:block; font-size:.58rem; line-height:1.45; margin-top:6px; }
.mp-scenes [aria-pressed="true"] { border-color:#2848ed; background:#eef1ff; color:#2848ed; }
.mp-credit { font-size:.68rem; color:#757f92; line-height:1.6; margin:12px 0 0; }
.mp-transport { display:flex; align-items:center; gap:17px; margin-bottom:14px; }
.mp-play { background:var(--blue,#2746ec); color:#fff; border:0; padding:11px 14px; border-radius:7px; min-height:47px; display:flex; align-items:center; justify-content:center; gap:8px; font-size:.76rem; white-space:nowrap; min-width:116px; box-shadow:0 3px 0 #bfc9df; }
.mp-play[aria-pressed="true"] { background:#24324a; }
.mp-tempo { display:grid; grid-template-columns:1fr auto; flex:1; min-width:0; font-size:.64rem; color:#61718a; gap:0 8px; }
.mp-tempo output { font-family:var(--mono,monospace); color:#2c3f63; }
.mp-tempo input { grid-column:1/-1; padding:0; margin:2px 0 0; width:100%; min-height:27px; border:0; background:none; accent-color:var(--blue,#2746ec); }
.mp-instruments { display:flex; gap:7px; margin-bottom:21px; }
.mp-instruments button { background:transparent; border:1px solid var(--mp-border); color:#61718a; padding:7px 11px; min-height:36px; border-radius:20px; font-size:.65rem; }
.mp-instruments [aria-pressed="true"] { background:#edf0cf; border-color:#a1ac60; color:#4b552c; }
.mp-grid-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.mp-grid-heading h4,.mp-live-heading h4 { font:1.3rem/1.3 var(--serif,Georgia,serif); margin:0; }
.mp-progress { font:.63rem/1.5 var(--mono,monospace); color:#4d618b; }
.mp-grid-hint { color:#69758b; font-size:.65rem; line-height:1.7; margin:9px 0 13px; max-width:380px; }
.mp-sequence-scroll { max-width:100%; overflow-x:auto; overflow-y:hidden; padding-bottom:8px; scrollbar-width:thin; scrollbar-color:#b7c4df #eef1f7; overscroll-behavior-x:contain; }
.mp-sequence { min-width:365px; background:#edf1f9; padding:8px; border:1px solid #d0d8e6; border-radius:7px; }
.mp-beat-head,.mp-grid-row { display:grid; grid-template-columns:25px repeat(16,minmax(0,1fr)); gap:3px; }
.mp-beat-head { margin-bottom:5px; }
.mp-beat-head span { text-align:center; font:.45rem/1.7 var(--mono,monospace); color:#74829a; border-radius:2px; }
.mp-beat-head .is-current { background:#273fed; color:#fff; }
.mp-grid { display:grid; gap:4px; }
.mp-row-note { display:grid; place-items:center; color:#61718a; font:.52rem/1 var(--mono,monospace); }
.mp-grid-row [role="gridcell"] { min-width:0; }
.mp-grid-row button { border:1px solid #d7dfed; background:#fff; border-radius:3px; display:block; width:100%; height:22px; padding:0; position:relative; }
.mp-grid-row button[data-step="0"],.mp-grid-row button[data-step="4"],.mp-grid-row button[data-step="8"],.mp-grid-row button[data-step="12"] { border-left-color:#91a3c6; }
.mp-grid-row button.is-set { background:var(--mp-note-color); border-color:#5769815c; }
.mp-grid-row button.is-set::after { content:''; position:absolute; width:4px; height:4px; background:#26354b; border-radius:50%; left:calc(50% - 2px); top:calc(50% - 2px); }
.mp-grid-row button.is-current { box-shadow:inset 0 0 0 1px #5773bd; background-color:#e0e7f5; }
.mp-grid-row button.is-current.is-set { background:var(--mp-note-color); box-shadow:inset 0 0 0 2px #22384b; }
.mp-tools { display:flex; flex-wrap:wrap; gap:7px; margin:8px 0 0; }
.mp-tools button { border:1px solid var(--mp-border); color:#4e6287; background:#fff; border-radius:5px; min-height:36px; padding:7px 10px; font-size:.64rem; }
.mp-random { background:#f4f3da!important; border-color:#d3d2a5!important; color:#626235!important; }
.mp-status { color:#415b93; font-size:.65rem; line-height:1.6; min-height:2.9em; margin:13px 0 10px; }
.mp-exports { display:flex; gap:8px; flex-wrap:wrap; }
.mp-exports button { background:#263751; border:1px solid #263751; color:#fff; border-radius:5px; padding:8px 11px; min-height:39px; font-size:.66rem; }
.mp-exports .mp-png { background:var(--mp-paper); color:#4f5872; border-color:#ced3dc; }
.mp-live-heading { margin-top:28px; padding-top:21px; border-top:1px solid #cad3e5; display:flex; gap:22px; justify-content:space-between; align-items:flex-start; }
.mp-live-heading h4 { flex:none; font-size:1.4rem; }
.mp-live-heading p { max-width:360px; color:#6b768c; font-size:.65rem; line-height:1.6; margin:0; }
.mp-keyboard { position:relative; height:137px; margin:17px 0 0; border:1px solid #c3cee3; background:#27354f; border-top:9px solid #27354f; border-radius:6px; padding:0; }
.mp-piano-key { display:flex; flex-direction:column; align-items:center; justify-content:flex-end; position:absolute; top:0; padding:0 2px 9px; border-radius:0 0 4px 4px; touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
.mp-piano-key.is-white { width:12.5%; height:100%; color:#4d5c78; background:linear-gradient(#fffdf5,#f5f3eb); border:1px solid #c4cede; box-shadow:inset 0 -4px #d7dae0; z-index:1; gap:8px; }
.mp-piano-key.is-black { width:9%; height:65%; color:#e6e7ef; background:linear-gradient(#27354f,#18263e); border:1px solid #152035; z-index:2; box-shadow:inset 0 -4px #3b4563; gap:6px; padding-bottom:7px; }
.mp-piano-key span { font:.75rem/1 var(--mono,monospace); }
.mp-piano-key kbd { font:.54rem/1 var(--mono,monospace); opacity:.65; }
.mp-piano-key.is-active { background:var(--mp-note-color); color:#24344b; box-shadow:inset 0 -2px #819094; }
.mp-disclaimer { font-size:.6rem; color:#7a8495; line-height:1.65; margin:13px 0 0; }
.music-postcard button:focus-visible,.mp-tempo input:focus-visible { outline:3px solid var(--blue,#2746ec); outline-offset:3px; z-index:4; }
.mp-grid-row button:focus-visible { outline-offset:1px; }
@media (prefers-reduced-motion:no-preference) {
  .motion-enabled .mp-postcard.is-pulsing .mp-photo-wash { animation:mp-wash .23s ease-out; }
  .motion-enabled .mp-postcard.is-pulsing .mp-photo-note { animation:mp-note .23s ease-out; }
  .motion-enabled .mp-piano-key.is-active { transform:translateY(2px); }
}
.motion-paused .mp-photo-wash,.motion-paused .mp-photo-note { animation:none!important; }
@keyframes mp-wash { from{opacity:.3}to{opacity:0} }
@keyframes mp-note { 0%{transform:scale(1)}45%{transform:scale(1.25) rotate(8deg)}100%{transform:scale(1)} }
@media (max-width:760px) {
  .mp-studio { gap:20px; grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr); }
  .mp-transport { gap:10px; }
  .mp-play { min-width:105px; padding:10px; }
}
@media (max-width:600px) {
  .mp-heading { gap:10px; margin-bottom:19px; }
  .mp-heading p { font-size:.73rem; }
  .mp-sound { padding:8px 10px; font-size:.64rem; }
  .mp-studio { grid-template-columns:1fr; gap:23px; }
  .mp-postcard { aspect-ratio:4/3; transform:rotate(-1deg); border-width:8px; border-bottom-width:35px; }
  .mp-photo-caption { bottom:-28px; font-size:1rem; }
  .mp-scenes-hint { margin-top:17px; }
  .mp-scenes img { aspect-ratio:4/3; }
  .mp-scenes span { font-size:.61rem; }
  .mp-live-heading { flex-direction:column; gap:8px; }
  .mp-keyboard { height:123px; }
  .mp-piano-key span { font-size:.62rem; }
  .mp-piano-key.is-black { width:9%; }
  .mp-piano-key.is-black span { font-size:.54rem; }
  .mp-credit { margin-top:10px; }
  .mp-tools button,.mp-instruments button,.mp-exports button { min-height:44px; }
  .mp-grid-row button { height:32px; }
  .mp-sequence { min-width:620px; }
  .mp-grid-hint,.mp-status { font-size:.7rem; }
}
