/* Morphic Field Rain: a black plate and pale sand. The sand settles into the figure of the chosen field's tone. */
body[data-store="morfia"] {
  --bg: #0b0b0c; --ink: #efe8d8; --muted: #a09a8c; --line: #34322d;
  --accent: #b79cff; --on-accent: #0b0b0c; --card: #121213; --field: #121213; --radius: 0px;
  --display: 'Unbounded', var(--text);
}
[data-store="morfia"] .brand { font-weight: 600; font-size: 14px; letter-spacing: .02em; }
[data-store="morfia"] h1 { font-weight: 700; font-size: clamp(34px, 5.6vw, 78px); letter-spacing: -.02em; line-height: 1.02; }
[data-store="morfia"] h2 { font-weight: 600; letter-spacing: -.015em; }
[data-store="morfia"] .step h3 { font-weight: 600; font-size: 19px; }
[data-store="morfia"] .step h3 i { color: var(--accent); }
[data-store="morfia"] .item b, [data-store="morfia"] .fold > summary, [data-store="morfia"] .faq-list summary { font-weight: 500; font-size: 16.5px; }
[data-store="morfia"] .btn { color: #0b0b0c; }
[data-store="morfia"] .btn.ghost { color: var(--ink); }
[data-store="morfia"] .err { background: #2a1512; color: #ffb4a6; }
[data-store="morfia"] .okmsg { background: #10231a; color: #a7e3c2; }

/* ---- hero: the plate beside the headline */
[data-store="morfia"] .hero { padding: 40px 0 72px; }
.m-hero { display: grid; gap: 28px; grid-template-areas: "head" "plate" "side"; }
.m-head { grid-area: head; } .plate-col { grid-area: plate; } .plate-side { grid-area: side; }
[data-store="morfia"] .hero h1 { font-size: clamp(34px, 4.3vw, 60px); }
[data-store="morfia"] .hero .lead { margin-top: 20px; color: var(--muted); }
@media (min-width: 900px) {
  [data-store="morfia"] .hero { padding: 64px 0 104px; }
  .m-hero { grid-template-columns: minmax(0, 500px) minmax(0, 1fr); grid-template-areas: "plate head" "plate side"; gap: 36px 72px; align-items: start; }
}
.plate { position: relative; aspect-ratio: 1; width: 100%; max-width: 500px; background: #000; border: 1px solid #45423b;
  box-shadow: 0 0 0 7px #0b0b0c, 0 0 0 8px #2a2823; cursor: pointer; touch-action: manipulation; }
.plate canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.plate::after { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%;
  background: #0b0b0c; border: 1px solid #6a665c; }       /* the bolt that holds the plate */
.plate-col .fig { margin-top: 22px; max-width: 500px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.readout { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.readout .of { flex-basis: 100%; font-size: 14.5px; color: var(--muted); }
.readout b { font: 700 clamp(30px, 3.4vw, 46px)/1 var(--display); letter-spacing: -.02em; }
.readout .hz { font: 500 19px/1.2 var(--display); color: var(--accent); font-variant-numeric: tabular-nums; }
.plate-side .chips { margin-top: 22px; }
.plate-side .row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 30px; }
.tone.on { border-color: var(--accent); color: var(--accent); }
[data-store="morfia"] .chip { border-radius: 0; }
[data-store="morfia"] .chip.on, [data-store="morfia"] .chip:has(input:checked) { background: var(--ink); color: #0b0b0c; }

/* ---- the maker: a smaller plate with its engraved label */
[data-store="morfia"] .maker { border-top: 1px solid var(--line); }
.label-plate { display: grid; gap: 0; border: 1px solid #45423b; background: #000; }
.label-plate .plate { border: 0; box-shadow: none; max-width: none; }
.label-plate .plate::after { display: block; }
.engraved { padding: 18px 20px 20px; border-top: 1px solid #45423b; background: #0b0b0c; }
.engraved .e-kick { font: 500 12.5px/1.3 var(--display); color: var(--accent); letter-spacing: .04em; }
.engraved .e-name { margin-top: 8px; font: 700 clamp(22px, 2.6vw, 32px)/1.1 var(--display); letter-spacing: -.015em; overflow-wrap: anywhere; }
.engraved .e-name.empty { color: #5d5a52; }
.engraved .e-line { margin-top: 8px; font-size: 15.5px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.engraved .e-no { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #45423b; font: 500 12.5px/1.3 var(--display); color: var(--muted);
  font-variant-numeric: tabular-nums; display: flex; justify-content: space-between; gap: 12px; }
@media (max-width: 959px) {
  /* phone: a short strip with the plate on the left, the label beside it */
  [data-store="morfia"] .maker-visual.pin { padding: 10px var(--pad); }
  .label-plate { grid-template-columns: 112px minmax(0, 1fr); }
  .label-plate .plate::after { width: 5px; height: 5px; margin: -2.5px; }
  .engraved { border-top: 0; border-left: 1px solid #45423b; padding: 10px 12px; display: flex; flex-direction: column; justify-content: center; }
  .engraved .e-kick { font-size: 10.5px; }
  .engraved .e-name { margin-top: 4px; font-size: 17px; }
  .engraved .e-line { margin-top: 3px; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  .engraved .e-no { margin-top: 6px; padding-top: 5px; font-size: 10.5px; }
}
[data-store="morfia"] .fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 520px) { [data-store="morfia"] .fields { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
[data-store="morfia"] .fields .chip { justify-content: space-between; }
[data-store="morfia"] .item .bar::after { background: var(--ink); }
[data-store="morfia"] .legend { background: #111112; }
[data-store="morfia"] .story.last { color: var(--accent); font-weight: 500; }

/* ---- the library: thirty energy blends. Desktop: the stage stays beside the cards. Phone: a player bar that opens into a sheet. */
.blends { border-top: 1px solid var(--line); }
.bl-grid { display: grid; gap: 28px; margin-top: 40px; }
.bl-list { min-width: 0; }
.bl-famline { margin: 14px 0 18px; min-height: 1.5em; font-size: 15px; color: var(--muted); }
.bl-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .bl-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .bl-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.blend { display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; border: 1px solid var(--line); background: #000; color: var(--ink);
  text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.blend canvas { width: 100%; height: auto; aspect-ratio: 1; }
.blend b { padding: 11px 12px 0; font: 600 13.5px/1.25 var(--display); letter-spacing: -.01em; }
.blend span { padding: 5px 12px 12px; font: 500 12.5px/1.3 var(--text); color: var(--muted); font-variant-numeric: tabular-nums; }
@media (hover: hover) { .blend:hover { border-color: #6a665c; } }
.blend.on { border-color: var(--ink); outline: 1px solid var(--ink); outline-offset: -2px; }
.blend.on b { color: var(--accent); }
.blend:focus-visible, .bl-open:focus-visible, .bl-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.bl-stage .plate { max-width: 400px; }
.bl-info { margin-top: 26px; }
.bl-fam { font: 500 12.5px/1.3 var(--display); color: var(--accent); }
.bl-info h3 { margin-top: 8px; font: 700 clamp(26px, 2.6vw, 36px)/1.05 var(--display); letter-spacing: -.02em; }
.bl-line { margin-top: 10px; font-size: 17px; line-height: 1.45; }
.bl-tones { margin-top: 18px; border-top: 1px solid var(--line); }
.bl-tones li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.bl-tones b { flex: none; font: 500 14px/1.4 var(--display); font-variant-numeric: tabular-nums; }
.bl-tones span { color: var(--muted); text-align: right; }
.bl-act { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.bl-act .btn { flex: 1 1 200px; justify-content: center; }
.bl-info .err { margin-top: 14px; }
.bl-bar, .bl-close { display: none; }
@media (min-width: 900px) {
  /* the whole stage stays on the screen: the plate takes its size from the window's height */
  .bl-grid { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 56px; align-items: start; }
  .bl-stage { position: sticky; top: calc(var(--top) + 16px); max-height: calc(100vh - var(--top) - 32px); overflow-y: auto; padding: 8px; margin: -8px; }
  .bl-stage .plate { width: clamp(200px, 36vh, 400px); }
}
@media (max-width: 899px) {
  .bl-stage { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-height: 88vh; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
    background: #0b0b0c; border-top: 1px solid #45423b; padding-bottom: env(safe-area-inset-bottom); transition: transform .25s ease; }
  .bl-stage.away { transform: translateY(110%); }
  .bl-bar { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px var(--pad); }
  .bl-mini { width: 48px; height: 48px; border: 1px solid #45423b; }
  .bl-open { display: grid; gap: 3px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; align-content: center; }
  .bl-open b { font: 600 15px/1.2 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bl-open span { font-size: 13px; color: var(--muted); }
  .bl-more { display: none; padding: 14px var(--pad) 26px; }
  .bl-stage.open .bl-bar { display: none; }
  .bl-stage.open .bl-more { display: block; }
  .bl-close { display: block; margin: 0 0 12px auto; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); background: none; color: var(--ink);
    font: 600 14px/1 var(--text); cursor: pointer; }
  .bl-stage .plate { max-width: 240px; margin: 0 auto; }
  .bl-info { margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) { .bl-stage { transition: none; } }
.pl .plate { max-width: 300px; margin: 0 auto; }
