.c-red { background: var(--red-soft); color: var(--red); }
.flow-card { background: var(--surface); border-radius: 28px; padding: 28px 32px 32px; margin-top: 28px; }

.ex-head { display: flex; align-items: center; gap: 16px; min-height: 56px; }
.ex-n { width: 44px; height: 44px; border-radius: 14px; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 20px; font-weight: 700; flex: none; font-variant-numeric: tabular-nums; }
.ex-cap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ex-cap b { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; }
.ex-cap span { font-size: 15px; color: var(--text-3); }
.ex-cap.in { animation: capIn .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes capIn { from { opacity: 0; transform: translateY(8px); } }
.play { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.play::before { content: ""; width: 10px; height: 12px; border-left: 3px solid var(--text-2); border-right: 3px solid var(--text-2); }
.paused .play::before { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent var(--text-2); margin-left: 3px; }

.ex-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; margin-top: 24px; }
.rail { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.rail button { width: 100%; display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 11px 12px; border-radius: 14px; text-align: left; background: var(--surface-2); color: var(--text-3); transition: background .3s, color .3s, transform .3s; }
.rail button i { grid-row: 1 / 3; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; background: var(--surface); font-variant-numeric: tabular-nums; transition: background .3s, color .3s; }
.rail button b { font-size: 14.5px; font-weight: 700; }
.rail button span { font: 10.5px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail button.done { color: var(--text-2); }
.rail button.done i { background: var(--green-soft); color: var(--green); }
.rail button.on { background: var(--blue-soft); color: var(--text); transform: translateX(4px); }
.rail button.on i { background: var(--blue); color: #fff; }
.rail button.on span { color: var(--blue); }
.rail button:hover:not(.on) { color: var(--text); }

.canvas { min-height: 440px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.canvas.in > * { animation: slideIn .5s cubic-bezier(.2, .8, .2, 1) both; }
.canvas.in > *:nth-child(2) { animation-delay: .08s; }
.canvas.in > *:nth-child(3) { animation-delay: .16s; }
@keyframes slideIn { from { opacity: 0; transform: translateY(14px); } }

.xt-row { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.xt { background: var(--surface-2); border-radius: 18px; padding: 14px 16px 12px; min-width: 0; flex: none; }
.xt.grow, .xt.solo { flex: 1; }
.xt-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.xt-head b { font-size: 15px; font-weight: 700; }
.xt-head span { font: 11.5px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text-4); letter-spacing: 0; }
.xt-head em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--blue); background: var(--blue-soft); padding: 3px 8px; border-radius: 7px; white-space: nowrap; }
.xt-scroll { overflow-x: auto; }
.xt table { border-collapse: collapse; width: 100%; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.xt th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--text-3); padding: 0 14px 7px 0; white-space: nowrap; border-bottom: 1px solid var(--line); }
.xt td { padding: 8px 14px 8px 0; white-space: nowrap; border-bottom: 1px solid var(--line); }
.xt tr:last-child td { border-bottom: 0; }
.xt td.mono { font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0; color: var(--text-2); }
.xt td.num { text-align: right; }
.xt td.nil { color: var(--text-4); }
.xt tr.old td { opacity: .45; }
.xt tr.new td { animation: rowIn .7s cubic-bezier(.2, .8, .2, 1); }
.xt tr.new { animation: rowGlow 3.5s ease-out forwards; }
@keyframes rowIn { from { opacity: 0; transform: translateY(-10px); } }
@keyframes rowGlow { 0%, 60% { background: color-mix(in srgb, var(--blue) 14%, transparent); } 100% { background: transparent; } }
.xt tr.mine td { font-weight: 600; }
.xt td.typing::after { content: ""; display: inline-block; width: 2px; height: 14px; margin-left: 2px; vertical-align: -2px; background: var(--blue); animation: caret .6s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.xt-foot { margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--text-3); min-height: 16px; }
.xt-foot.on { color: var(--green); font-size: 14px; animation: capIn .4s; }

.one-many .xt tr .chip.c-green { animation: pulse 1.2s ease-in-out 2; }
.one-many .xt tr.old td { opacity: .9; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 35%, transparent); } }

.sig-clock { display: flex; align-items: baseline; gap: 10px; font-size: 13px; color: var(--text-3); }
.sig-clock b { font: 700 20px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); letter-spacing: 0; }
.sig-grid { display: grid; grid-template-columns: 1.35fr 1.15fr 0.9fr 0.75fr; gap: 10px; }
.xt.sig { padding: 12px 12px 10px; }
.xt.sig table { font-size: 12px; }
.xt.sig td, .xt.sig th { padding-right: 8px; }
.xt.sig td.mono { font-size: 11.5px; }
.xt.sig tbody tr { height: 30px; }
.xt.sig .xt-scroll { height: 186px; overflow: hidden; }
.xt.sig .xt-foot { font-size: 15px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.xt.merged { opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .5s; background: color-mix(in srgb, var(--red) 6%, var(--surface-2)); }
.xt.merged.on { opacity: 1; transform: none; }
.xt.merged td.nil { color: var(--red); opacity: .55; }
.xt.merged table { font-size: 12px; }
.xt.merged .xt-scroll { height: 168px; overflow: hidden; }
.xt.merged .xt-foot { color: var(--red); }
.xt tr.hl td { background: color-mix(in srgb, var(--blue) 10%, transparent); }

.xt tr.hot td:last-child { color: var(--red); font-weight: 700; }
.xt tr.alarm { animation: alarm 1s ease-in-out 3; }
.xt tr.alarm td { color: var(--red); font-weight: 700; }
@keyframes alarm { 50% { background: var(--red-soft); } }

@media (max-width: 900px) {
  .ex-body { grid-template-columns: minmax(0, 1fr); }
  .rail { flex-direction: row; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px; }
  .rail::-webkit-scrollbar { display: none; }
  .rail button { width: auto; grid-template-columns: 22px auto; grid-template-rows: auto; padding: 8px 12px 8px 8px; white-space: nowrap; }
  .rail button i { grid-row: auto; width: 22px; height: 22px; }
  .rail button span { display: none; }
  .rail button.on { transform: none; }
  .xt-row { flex-direction: column; align-items: stretch; }
  .sig-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .flow-card { padding: 20px 16px; border-radius: 24px; }
  .ex-head { align-items: flex-start; gap: 12px; }
  .ex-n { width: 34px; height: 34px; border-radius: 11px; font-size: 16px; }
  .ex-cap b { font-size: 18px; }
  .ex-cap span { font-size: 13px; }
  .canvas { min-height: 0; }
}

.xt.nope { width: 240px; opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s; }
.xt.nope.on { opacity: 1; transform: none; }
.xt.nope ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.xt.nope li { font-size: 13px; font-weight: 600; color: var(--text-3); padding: 5px 10px; border-radius: 9px; background: var(--surface); text-decoration: line-through; text-decoration-color: var(--red); }
@media (max-width: 900px) { .xt.nope { width: auto; } }
