.agent-replay { padding: 12px 0 72px; max-width: 940px; margin-inline: auto; }
.replay-heading { margin-bottom: 28px; }
.replay-heading h2 { font: 500 2rem/1.25 var(--sans); letter-spacing: -.045em; margin-top: 10px; }
.replay-window { border: 1px solid #dedede; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 4px 24px #00000004; }
.replay-titlebar { display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-bottom: 1px solid #eee; font-size: .875rem; font-weight: 500; }
.replay-app-icon { font: 600 .85rem/1.3 ui-monospace, monospace; border: 1.5px solid currentColor; border-radius: 5px; padding: 1px 3px; }
.replay-badge { margin-left: auto; color: #666; font-size: .75rem; border: 1px solid #e5e5e5; padding: 2px 8px; border-radius: 6px; font-weight: 400; }
.replay-viewport { height: 320px; overflow: auto; overscroll-behavior: contain; padding: 28px 32px; scrollbar-width: thin; }
.replay-log { position: relative; }
.agent-record { font-family: var(--sans); padding: 0 0 24px; overflow-wrap: anywhere; }
.record-session { display: flex; gap: .75rem; align-items: flex-start; }
.record-icon { font: 1.5rem/1.35 var(--sans); width: 1.4rem; flex-shrink: 0; color: #333; }
.record-session h3 { font: 550 .875rem/1.55 var(--sans); letter-spacing: -.01em; }
.record-meta { color: #737373; font-size: .75rem; line-height: 1.6; }
.record-kind { color: #737373; font: .75rem/1.6 var(--sans); margin: 18px 0 8px 2.15rem; }
.agent-record blockquote { margin: 0 0 14px 2.15rem; font: 400 1.05rem/1.75 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; letter-spacing: -.035em; }
.record-source { margin-left: 2.15rem; color: #737373; font-size: .75rem; }
.record-previous { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid #e9e9e9; }
.replay-status { display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 24px; color: #777; font: .8125rem/1.5 var(--sans); border-top: 1px solid #f1f1f1; }
.thinking-indicator { width: 11px; height: 11px; border: 1.5px solid #ddd; border-top-color: #555; border-radius: 50%; }
.is-thinking .thinking-indicator { animation: agent-thinking 1.4s linear infinite; }
.is-thinking .replay-status-text { color: #333; }
.is-writing .replay-log .agent-record:last-child blockquote::after { content: ''; display: inline-block; width: 2px; height: 1.05em; background: #555; margin-left: 3px; vertical-align: -.15em; animation: agent-cursor 1s steps(2,start) infinite; }
.replay-count { margin-left: auto; font-variant-numeric: tabular-nums; font-size: .75rem; }
.replay-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; border-top: 1px solid #eee; padding: 10px 16px; }
.replay-controls[hidden] { display: none; }
.replay-controls button, .replay-controls a { font: 500 .8125rem/1.5 var(--sans); min-height: 44px; padding: 10px 14px; color: #555; border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-decoration: none; }
.replay-controls button:first-child { color: #111; background: #f2f2f2; min-width: 74px; }
.replay-controls a { margin-left: auto; }
.replay-controls button:hover:not(:disabled), .replay-controls a:hover { background: #f4f4f4; color: #111; }
.replay-controls button:disabled { color: #aaa; cursor: default; }
.agent-replay :focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.replay-disclosure { color: #737373; font: .8125rem/1.6 var(--sans); max-width: 760px; margin: 16px 0 24px; }
.quote-archive summary { font-size: .875rem; cursor: pointer; width: fit-content; padding: 8px 0; min-height: 44px; }
.quote-archive summary span { color: #777; }
.quote-archive-intro { font-size: .875rem; color: #666; margin: 20px 0 32px; max-width: 720px; }
.quote-archive-intro p+p { margin-top: 8px; }
.quote-archive>.agent-record { border-top: 1px solid #e5e5e5; padding: 28px 0; }
.record-context { margin: 16px 0 0 2.15rem; font: .875rem/1.7 var(--sans); color: #666; max-width: 720px; }
.record-context p+p { margin-top: 12px; }
@keyframes agent-thinking { to { transform: rotate(360deg); } }
@keyframes agent-cursor { 50% { opacity: 0; } }
@media (max-width:700px) {
  .agent-replay { padding-bottom: 48px; }
  .replay-heading h2 { font-size: 1.7rem; }
  .replay-titlebar { padding-inline: 18px; }
  .replay-viewport { height: 360px; padding: 24px 18px; }
  .replay-controls { gap: 2px; padding: 8px; }
  .replay-controls button, .replay-controls a { padding-inline: 9px; }
  .agent-record blockquote { font-size: 1rem; margin-left: 0; }
  .record-kind, .record-source, .record-context { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .thinking-indicator { animation: none !important; } }
@media (prefers-reduced-motion: reduce) { .is-writing .replay-log .agent-record:last-child blockquote::after { display: none; animation: none; } }
@media print { .replay-controls, .replay-status { display: none; } .replay-viewport { height: auto; overflow: visible; } }
