body { margin: 0; background: #f5f7fa; color: #213547; font-family: system-ui, sans-serif; line-height: 1.7; }
html { -webkit-font-smoothing: antialiased; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
#amount { font-variant-numeric: tabular-nums; }
.quote-amount-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quote-amount-row h3 { margin: 8px 0; }
.answer-badge { margin: 0; padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.answer-badge.is-approved { color: #146c43; background: #e5f6ec; }
.answer-badge.is-returned { color: #9a3412; background: #fff1e6; }
.page-header { background: #fff; padding: 20px max(20px, calc((100% - 960px) / 2)); border-bottom: 1px solid #d9e2ec; }
.page-header h1 { margin: 0; font-size: 24px; }
.workspace { max-width: 960px; margin: 24px auto; padding: 0 16px 40px; }
.quote, .notice { padding: 24px; background: #fff; border: 1px solid #d9e2ec; border-radius: 12px; margin: 20px 0; }
.notice { background: #edf5f9; }
select { display: block; padding: 12px; margin: 10px 0; font: inherit; max-width: 100%; }
iframe { display: block; width: 100%; height: 70vh; min-height: 360px; border: 1px solid #d9e2ec; margin-top: 20px; }
a { color: #096983; text-underline-offset: 4px; }

input:not([type="checkbox"]), textarea { display: block; box-sizing: border-box; width: 100%; padding: 12px; margin: 8px 0 18px; font: inherit; }
label { display: block; }
button { padding: 12px 20px; margin: 12px 8px 12px 0; font: inherit; cursor: pointer; }
button.primary { border: 0; border-radius: 8px; background: #0f6f86; color: #fff; }
.answer-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.answer-actions button { margin: 12px 0; }
#request-change { border: 1px solid #9a3412; border-radius: 8px; background: #fff; color: #9a3412; }
#change-modal { width: min(480px, calc(100vw - 32px)); border: 0; border-radius: 12px; padding: 20px; }
#change-modal::backdrop { background: rgba(16, 24, 32, .55); }
#change-modal p { margin: 0 0 8px; font-weight: 700; }
#change-modal textarea { min-height: 120px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
#change-cancel { border: 1px solid #c9d5e3; border-radius: 8px; background: #fff; }
button:disabled { cursor: wait; opacity: .65; }
select, button, input, textarea { max-width: 100%; }
[hidden] { display: none !important; }
.history-fold, .history-item { border-top: 1px solid #d9e2ec; margin-top: 16px; }
.history-item { margin-top: 0; }
.history-fold > summary, .history-item > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; font-weight: 700; cursor: pointer; list-style: none; }
.history-fold > summary::-webkit-details-marker, .history-item > summary::-webkit-details-marker { display: none; }
.history-fold > summary::after, .history-item > summary::after { content: "▼"; flex: 0 0 auto; font-size: 12px; }
.history-fold[open] > summary::after, .history-item[open] > summary::after { content: "▲"; }
.history-item p { margin: 8px 0; }
#pdf-modal { width: min(960px, calc(100vw - 32px)); height: min(860px, calc(100vh - 32px)); padding: 16px; border: 0; border-radius: 12px; }
#pdf-modal::backdrop { background: rgba(16, 24, 32, .55); }
.pdf-modal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pdf-modal-bar p { margin: 0; font-weight: 700; }
#pdf-modal-frame { height: calc(100% - 64px); }
#message { min-height: 2em; }
@media (max-width: 600px) {
  .quote, .notice { padding: 16px; }
  h2 { font-size: 20px; }
  button, select, input:not([type="checkbox"]), textarea { width: 100%; margin-right: 0; }
  #pdf-modal-close { width: auto; }
}
