* { box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  color: #1e2826;
  background: #efeee8;
  font: 16px/1.55 "Segoe UI", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
}

body { margin: 0; padding: clamp(1rem, 5vw, 3.8rem) 1rem; }
.shell { max-width: 72rem; margin-inline: auto; }
.heading, .toolbar, .section-heading { display: flex; align-items: center; gap: 0.75rem; }
.heading, .section-heading { justify-content: space-between; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.7rem, 5vw, 2.55rem); letter-spacing: -0.04em; line-height: 1.25; }
h2 { font-size: 1.15rem; margin-bottom: 0.8rem; }
h3 { font-size: 0.92rem; }
#feedback { min-height: 2rem; padding-block: 0.55rem; color: #455e55; font-size: 0.9rem; }
#viewer { margin-top: 0.3rem; color: #455e55; font-size: 0.9rem; }
#viewer-wallet { overflow-wrap: anywhere; font-family: ui-monospace, monospace; }
#admin-create > button { justify-self: start; }
.workspace { display: grid; grid-template-columns: minmax(15rem, 0.72fr) minmax(0, 1.35fr); gap: 1rem; align-items: start; }
.create-payment { grid-column: 1 / -1; }
.create-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(8rem, 0.55fr) auto; gap: 0.75rem; align-items: end; }
.create-fields label { display: block; margin-bottom: 0.28rem; }
#create-feedback:not(:empty), .copy-feedback:not(:empty) { color: #455e55; font-size: 0.86rem; margin-top: 0.35rem; }
.payment-link { background: #f0f5ee; border: 1px solid #d0ded3; border-radius: 0.65rem; padding: 0.8rem; }
#create-result { margin-top: 0.75rem; }
.payment-link input { font-size: 0.86rem; margin-block: 0.3rem 0.55rem; }
.link-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.link-actions a { color: #275445; display: inline-flex; align-items: center; min-height: 2.65rem; padding: 0.25rem 0.35rem; }
.link-actions a:focus-visible { outline: 2px solid #307664; outline-offset: 2px; }
.panel { min-width: 0; padding: clamp(1rem, 3.6vw, 1.65rem); border: 1px solid #dddfd6; border-radius: 1rem; background: #fffefb; }
#access { max-width: 31rem; }
form { display: grid; gap: 0.52rem; }
label, dt { font-size: 0.8rem; font-weight: 650; color: #51615a; }
input, select, textarea, button { font: inherit; }
input, select, textarea { width: 100%; min-width: 0; padding: 0.58rem 0.75rem; border: 1px solid #b8c8bf; border-radius: 0.55rem; background: #fff; color: inherit; }
textarea { min-height: 5rem; resize: vertical; }
button { border: 1px solid #265747; border-radius: 0.55rem; background: #245448; color: #fff; cursor: pointer; min-height: 2.65rem; padding: 0.45rem 0.85rem; white-space: nowrap; }
button:hover { background: #1c463a; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid #307664; outline-offset: 2px; }
button.secondary { background: #f5f7f0; color: #275445; border-color: #bbc9bf; }
button:disabled { opacity: 0.6; cursor: wait; }
.order-list, .timeline { list-style: none; padding: 0; margin: 0.8rem 0 0; display: grid; gap: 0.5rem; }
.order-list button { width: 100%; display: grid; gap: 0.2rem; text-align: left; color: inherit; background: #f4f5ef; border-color: #d9e0d2; white-space: normal; }
.order-list button[aria-current="true"] { border-color: #39765c; background: #e6f1e8; }
.order-list button:hover { border-color: #39765c; }
.order-list strong, .timeline li, dd, .section-heading { overflow-wrap: anywhere; }
.order-list small, .empty { color: #54655e; }
.section { border-top: 1px solid #e3e6dc; margin-top: 1rem; padding-top: 1rem; }
dl { display: grid; grid-template-columns: minmax(5.4rem, 0.45fr) minmax(0, 1fr); gap: 0.3rem 0.8rem; margin: 0.55rem 0 0; font-size: 0.88rem; }
dd { margin: 0; }
.timeline li { background: #f5f6f1; border-radius: 0.55rem; padding: 0.65rem 0.8rem; font-size: 0.86rem; white-space: pre-wrap; }
.review-form { margin-top: 0.8rem; }

@media (max-width: 700px) {
  .workspace { grid-template-columns: 1fr; }
  .create-fields { grid-template-columns: 1fr; }
  .section-heading { flex-wrap: wrap; }
}
