.result-card, .moment-part-context {
  --pair-muted: #c1bdb0;
  --pair-accent: #ffae8a;
  --pair-line: #524f45;
  --pair-ground: #242521;
}
.result-card {
  overflow-wrap: anywhere;
}
.workspace .result-card > .result-match { margin: .7rem 0 0; padding: .65rem 0; }
.result-card .result-match > strong { color: var(--ink); }
.result-audition-range {
  display: flex; align-items: stretch; gap: 1.15rem;
  border-bottom: 1px solid var(--pair-line); margin: 0 0 .3rem;
}
.result-audition-range button {
  min-height: 2.75rem; padding: .35rem .08rem; font: inherit; font-size: .9rem;
  background: transparent; border: 0; border-radius: 0; color: var(--pair-muted);
}
.result-audition-range button[aria-pressed=true] {
  color: var(--ink); box-shadow: inset 0 -2px var(--pair-accent);
}
.result-card .result-match .result-measure,
.result-card .result-whole-note, .result-group-inputs, .result-audio-note,
.result-card .result-graph-caption, .result-annotation-note {
  color: var(--pair-muted); font-size: .95rem; line-height: 1.5;
}
.result-group-inputs { display: block; margin-top: .3rem; }
.workspace .result-card > .result-pair {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .32rem;
  align-items: stretch; width: 100%; margin: .8rem 0 .2rem;
}
.result-pair-row {
  display: grid; grid-template-columns: minmax(0,1fr) auto;
  gap: .18rem .45rem; align-items: center; padding-block: .42rem;
  border-top: 1px solid var(--pair-line);
}
.result-pair > .result-pair-row { display: flex; flex-direction: column; align-items: stretch; padding: 0; border: 0; min-width: 0; }
@supports (grid-template-rows: subgrid) {
  .result-pair > .result-pair-row {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: subgrid;
    grid-row: span 3;
    align-items: stretch;
  }
  .result-pair-row > .save-moment { justify-self: start; grid-row: 3; }
}
.result-pair > :not(.result-pair-row) { grid-column: 1 / -1; }
.result-pair-info { display: grid; min-width: 0; gap: .06rem; }
.result-pair-role { color: var(--pair-accent); font-size: .85rem; line-height: 1.35; }
.result-pair-info > strong { font-size: 1.13rem; font-weight: 500; line-height: 1.15; }
.result-pair-time, .result-graph-clock, .result-history-key small {
  color: var(--pair-muted); font-size: .94rem; font-variant-numeric: tabular-nums;
}
.result-pair .result-video-link {
  grid-column: 1 / -1; width: fit-content; padding-block: .25rem;
  color: var(--pair-muted); text-underline-offset: .17em;
}
.result-pair .result-play, .result-buildup-audio .result-play {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .33rem; min-height: 2.75rem; max-width: 100%; padding: .26rem .52rem;
  margin: 0; border: 1px solid var(--pair-line); border-radius: 0; background: transparent;
  color: var(--ink); line-height: 1.25;
}
.result-pair .result-play:hover, .result-buildup-audio .result-play:hover,
.result-card .result-play.is-playing { color: var(--pair-accent); border-color: var(--pair-accent); }
.result-pair .result-side-play, .result-pair-row > .result-pair-info {
  display: grid; text-align: start; align-content: start; justify-content: stretch;
  align-items: start; gap: .16rem; flex: 1; width: 100%;
  min-height: 4.8rem; padding: .52rem .58rem; position: relative;
}
.result-side-play .result-pair-role { padding-inline-end: 1.1em; }
.result-side-play .play-symbol { position: absolute; inset-inline-end: .55rem; inset-block-start: .55rem; font-size: .85rem; }
.result-pair .result-side-play:is(.is-playing,.is-audible) {
  box-shadow: inset 0 -2px var(--pair-accent); background: #312c27; border-color: var(--pair-accent);
}
.result-pair-row > .result-pair-info { border: 1px solid var(--pair-line); }
.result-pair-row .result-pair-time { line-height: 1.3; }
.result-pair-transport { display: flex; gap: .32rem; align-items: stretch; }
.result-pair-transport .result-repeat {
  flex: 0 0 auto; color: var(--pair-muted); padding: .32rem .5rem; min-height: 2.75rem;
  border: 1px solid var(--pair-line); border-radius: 0; font: inherit;
  font-size: .83rem; line-height: 1.3; background: transparent;
}
.result-repeat[aria-pressed=true] { color: var(--pair-accent); border-color: var(--pair-accent); box-shadow: inset 0 -2px var(--pair-accent); }
.result-card .result-pair-play {
  min-height: 2.75rem; width: 100%; margin: .35rem 0; padding: .4rem;
  border: 1px solid #8b7868; background: #302923; color: var(--ink);
}
.result-pair-transport .result-pair-play { flex: 1; width: auto; min-width: 0; margin: 0; }
.result-pair-play .play-symbol { color: var(--pair-accent); }
.result-pair-status:not(:empty), .result-audio-note { margin: .3rem 0 .5rem; line-height: 1.5; }
.result-pair-status { font-size: .94rem; color: var(--pair-accent); }
.result-recovery-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; margin-top: .35rem;
}
.result-recovery-play {
  color: var(--ink); background: transparent; border: 1px solid var(--pair-accent);
  font: inherit; padding: .35rem .65rem; min-height: 2.75rem;
}
.result-recovery-actions .result-video-link { display: inline-flex; align-items: center; min-height: 2.75rem; }
.result-pair .is-preparing .play-symbol { color: var(--pair-accent); }
.result-pair-status:empty, .result-history-audio:empty { display: none; }
.result-video-slot:not([hidden]) { width: 100%; margin-block: .4rem; }
.result-video-slot iframe { display: block; width: 100%; min-height: 200px; aspect-ratio: 16/9; border: 0; }
.result-card .result-chart-details { border-block: 1px solid var(--pair-line); width: 100%; }
.result-card .result-chart-details > summary { color: var(--ink); font-weight: 500; cursor: pointer; }
.result-card .result-chart-details > summary::marker { color: var(--pair-accent); }
.result-card .result-comparison-graph { background: var(--pair-ground); padding: .7rem clamp(.48rem,1.3vw,1rem); }
.result-comparison-graph figure { margin: 0; }
.result-comparison-graph figcaption { font-size: 1.13rem; margin-bottom: .6rem; font-weight: 500; }
.result-comparison-graph .result-graph-history { border-top: 1px solid var(--pair-line); padding-top: .85rem; margin-top: .85rem; }
.result-graph-label { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .1rem .5rem; }
.result-graph-label > strong { color: var(--ink); font-size: 1.04rem; font-weight: 400; }
.result-graph-row + .result-graph-row { margin-top: .6rem; }
.result-graph-plot, .result-history-plot { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .35rem; margin-top: .2rem; }
.result-graph-plot canvas { display: block; width: 100%; height: clamp(3.35rem,5vw,4.8rem); }
.result-graph-plot canvas:only-child { grid-column: 1 / -1; }
.result-graph-axis, .result-history-axis {
  display: flex; flex-direction: column; justify-content: space-between; align-self: stretch;
  color: var(--pair-muted); font-size: .8rem; line-height: 1.12;
}
.result-card .result-graph-caption { margin: .55rem 0 0; }
.result-history-head, .result-history-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .7rem; }
.result-history-options { display: inline-flex; }
.result-history-options button {
  min-height: 2.75rem; min-width: 2.75rem; border: 1px solid var(--pair-line); padding-inline: .38rem;
  background: transparent; color: var(--ink);
}
.result-history-options button + button { border-left: 0; }
.result-history-options button[aria-pressed=true] { background: #eee9da; color: #242521; }
.result-history-options button:disabled { opacity: .4; }
.result-history-key { position: relative; padding-inline-start: 1.18rem; min-width: 0; font-size: 1rem; }
.result-history-key .result-graph-clock { display: inline-block; margin-inline-start: .3rem; }
.result-history-key::before {
  position: absolute; inset-inline-start: 0; top: .6em; content: ''; width: .9rem; border-top: 2px solid var(--pair-accent);
}
.result-history-key[data-side=candidate]::before { border-top: 2px dashed var(--ink); }
.result-history-plot { margin-top: .5rem; }
.result-history-plot svg {
  width: 100%; height: 5.4rem; border-inline: 1px solid var(--pair-line);
  background: repeating-linear-gradient(90deg, #46463e 0 1px, transparent 1px 25%);
}
.result-history-plot > svg:only-child { grid-column: 1 / -1; }
.result-history-plot polyline { fill: none; stroke: var(--pair-accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.result-history-plot polyline[data-side=candidate] { stroke: var(--ink); stroke-dasharray: 5 4; }
.result-history-ticks { display: flex; justify-content: space-between; gap: .3rem; color: var(--pair-muted); font-size: .88rem; }
.result-buildup-audio { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; margin-top: .45rem; }
.result-buildup-audio > .result-pair-row { display: flex; flex-wrap: wrap; border: 0; padding: 0; gap: .2rem; }
.result-buildup-audio .result-pair-status { flex-basis: 100%; }
.result-annotation-note { margin-block: .55rem; }
.workspace .result-card .result-details { width: 100%; color: var(--pair-muted); }
.result-card .result-chart-details + .result-details { border-top: 0; }
.result-card :is(button,summary,a):focus-visible { outline: 2px solid var(--pair-accent); outline-offset: 2px; }
:is(:lang(ko),:lang(ja)) .result-card :is(.result-graph-caption,.result-measure,.result-whole-note,.result-audio-note,.result-annotation-note) { font-size: .83rem; line-height: 1.65; }
:is(:lang(ko),:lang(ja)) .result-card :is(.result-graph-axis,.result-history-axis,.result-pair-role) { font-size: .75rem; }

@media (min-width: 761px) and (max-width: 1000px) {
  .workspace .result-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .workspace .result-card { display: flex; flex-direction: column; align-items: stretch; }
  .result-card .result-top {
    display: grid; grid-template-columns: clamp(4rem,20vw,7.5rem) minmax(0,1fr);
    align-items: center; gap: .85rem;
  }
  .result-card .result-cover, .result-card .result-title-group { grid-area: auto; }
}
.result-graph-history:has(.result-history-ticks > :nth-child(3)) .result-history-ticks { display:grid; grid-template-columns:40% 1fr auto; }
.result-part-options { display:flex; gap:.25rem; flex-wrap:wrap; margin-bottom:.6rem; }
.result-part-options button { padding:.3rem .55rem; min-height:2.75rem; color:var(--pair-muted); border:1px solid var(--pair-line); background:transparent; border-radius:0; }
.result-part-options button[aria-pressed=true] { color:var(--pair-ground); background:#eee9da; border-color:#eee9da; }
.result-part-time { display:block; font-variant-numeric:tabular-nums; }
.result-part-figure .result-history-plot { grid-template-columns:1.65rem minmax(0,1fr); }
.result-part-ticks { position:relative; display:flex; justify-content:space-between; margin-inline-start:2rem; color:var(--pair-muted); font-size:.8rem; }
.result-part-ticks > :nth-child(2) { position:absolute; transform:translateX(-50%); }
