:root {
  --ink: #17191e; --muted: #6b6f78; --line: #e6e3dc; --bg: #f4f2ed; --card: #fff;
  --brand: #f0641e; --brand-ink: #fff; --ok: #1f8a4c; --okbg: #e8f6ee;
  --r: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; padding: 16px; background: var(--bg); line-height: 1.45; }
.sheet { max-width: 860px; margin: 0 auto; background: var(--card); border-radius: 20px; padding: 28px; box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(20, 20, 20, .05); }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 8px; letter-spacing: -.01em; }
h3 { margin: 0 0 6px; font-size: 15px; }
.muted { color: var(--muted); font-size: 14px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.who { display: flex; gap: 12px; align-items: center; }
.logo { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
.mono { width: 48px; height: 48px; border-radius: 12px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 22px; }
.mname { font-weight: 700; font-size: 17px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 14px; }
.banner { padding: 12px 16px; border-radius: 12px; margin: 16px 0; font-weight: 600; }
.banner.ok { background: var(--okbg); color: var(--ok); }
.tablewrap { overflow-x: auto; margin: 20px -8px 0; }
table.items { width: 100%; border-collapse: collapse; font-size: 14px; }
.items th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 8px; border-bottom: 1px solid var(--line); }
.items td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.items tr.room td { background: #faf8f4; font-weight: 700; padding-top: 12px; }
.rh { display: flex; justify-content: space-between; gap: 8px; }
.basis { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.items .r { text-align: right; white-space: nowrap; }
.items .b { font-weight: 600; }
.items .n { color: var(--muted); width: 28px; }
.tag { font-size: 11px; background: #eef1f6; color: #4a5568; border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.sum { margin: 20px 0 0 auto; max-width: 360px; }
.sum .line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 15px; }
.sum .total { font-size: 22px; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 10px; }
.note { background: #faf8f4; border-radius: 12px; padding: 14px 16px; margin-top: 20px; }
.note p { margin: 0; }
.actions { margin-top: 24px; display: grid; gap: 12px; }
.accept { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.accept button { grid-column: 1 / -1; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
input, textarea, select { font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); width: 100%; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 18px; border-radius: 12px; border: 0; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.ghost { background: #f1efea; color: var(--ink); }
.btn.big { padding: 16px 22px; font-size: 17px; }
.fine { color: var(--muted); font-size: 12px; margin-top: 20px; }
.made { display: block; max-width: 860px; margin: 14px auto; text-align: center; color: var(--muted); font-size: 13px; text-decoration: none; }
.made b { color: var(--brand); }
.printonly { display: none; }
@media (max-width: 560px) {
  body { padding: 0; }
  .sheet { border-radius: 0; padding: 18px 16px; }
  .accept { grid-template-columns: 1fr; }
  .items th:nth-child(4), .items tr:not(.room) td:nth-child(4), .items th:nth-child(1), .items tr:not(.room) td:nth-child(1) { display: none; }
  h1 { font-size: 22px; }
}
@media print {
  body { background: #fff; padding: 0; }
  .sheet { box-shadow: none; padding: 0; }
  .noprint { display: none !important; }
  .printonly { display: block; text-align: center; font-size: 11px; color: #999; }
}
