.flush { margin-top: 0; }
.card { margin-bottom: 20px; }
.fgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.field { min-width: 0; }
.field label { display: block; margin-bottom: 4px; overflow-wrap: anywhere; }
button, .btn, select, input:not([type="file"]):not([type="hidden"]), textarea {
  min-height: 44px;
  min-width: 44px;
  max-width: 100%;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
button {
  white-space: normal;
  text-align: center;
}
.code-hint {
  margin: 6px 0 0;
  min-height: 1.4em;
  font-family: var(--mono);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.err-msg {
  color: var(--warn);
  font-weight: 600;
  margin: 8px 0 12px;
  overflow-wrap: anywhere;
}
.warn-box {
  background: var(--chip);
  border: 1px solid var(--warn);
  color: var(--warn);
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  overflow-wrap: anywhere;
}
.summary-row {
  margin-bottom: 12px;
}
.action-row {
  margin-bottom: 14px;
}
.sheet-wrap {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin: 8px 0 18px;
}
.sheet-svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f4f1ea;
}
.inv-block {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}
.inv-heading {
  margin: 0 0 10px;
  font-size: 17px;
}
.list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}
.list li {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  min-width: 0;
}
.list .title {
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
  flex: 1 1 160px;
  min-width: 0;
}
.list .meta {
  flex: 1 1 100%;
  font-size: 13px;
  color: var(--muted);
  font-family: var(--mono);
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}
.list .item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
}
code {
  font-family: var(--mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}
@media print {
  .no-print, header.top, footer { display: none !important; }
  body { background: #ffffff; color: #000000; }
  .wrap { max-width: 100%; padding: 0; margin: 0; }
  .card, .sheet-card { border: none; padding: 0; margin: 0; background: #ffffff; }
  .sheet-wrap { margin: 0; }
  .sheet-svg { border: none; border-radius: 0; background: #ffffff; }
  section[hidden], div[hidden] { display: none !important; }
}
