.flush { margin-top: 0; }
.card { margin-bottom: 20px; min-width: 0; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; margin-bottom: 12px; }
.top-gap { margin-top: 12px; }
.field { min-width: 0; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.mono, code { font-family: var(--mono); font-size: 13px; }
textarea { resize: vertical; }
.code-box { font-family: var(--mono); font-size: 13px; line-height: 1.45; }

button, .btn, select, textarea, input:not([type="file"]):not([type="hidden"]) {
  min-height: 44px;
  min-width: 44px;
  max-width: 100%;
}
label.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
button, .btn {
  white-space: normal;
  overflow-wrap: anywhere;
}

input[type="checkbox"].consent-box {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  flex: 0 0 44px;
  margin: 0;
  padding: 0;
  cursor: pointer;
  accent-color: var(--accent);
}
.consent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--chip);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.consent-label {
  font-weight: 600;
  cursor: pointer;
  flex: 1 1 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.err-msg { color: var(--warn); font-weight: 600; margin: 10px 0 0; overflow-wrap: anywhere; }
.warn-box { background: var(--chip); border: 1px solid var(--warn); color: var(--warn); padding: 10px 12px; border-radius: 8px; overflow-wrap: anywhere; }

.wall-preview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 12px;
}
@media (min-width: 600px) {
  .wall-preview.layout-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.wall-card {
  margin: 0;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #d9cfc1;
  background: #faf6ee;
  color: #1d1b16;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.wall-card.is-selected {
  box-shadow: 0 0 0 2px var(--accent);
}
.theme-dark-slate .wall-card {
  background: #182026;
  border-color: #2f3d47;
  color: #f3f5f7;
}
.theme-clean-border .wall-card {
  background: #ffffff;
  border: 2px solid #1d1b16;
  color: #141414;
}
.card .wall-card p, .wall-card blockquote {
  color: inherit;
  margin: 0;
}
.wall-stars {
  font-size: 14px;
  font-weight: 700;
  color: #0b6e4f;
  letter-spacing: 0.03em;
}
.theme-dark-slate .wall-stars {
  color: #58d1a3;
}
.card .wall-card .wall-stars {
  color: #0b6e4f;
}
.card .theme-dark-slate .wall-card .wall-stars {
  color: #58d1a3;
}
.wall-quote {
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.wall-meta {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(128, 128, 128, 0.28);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.wall-author {
  font-weight: 700;
}
.wall-context, .wall-date {
  opacity: 0.84;
  font-size: 13px;
}
.wall-tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid currentColor;
  font-weight: 600;
}
.wall-audit {
  font-size: 12px;
  opacity: 0.8;
  overflow-wrap: anywhere;
}
.wall-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.svg-frame {
  width: 100%;
  max-width: 640px;
  margin: 12px 0;
  overflow: hidden;
}
.svg-frame svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

footer, code, p, h1, h2 {
  overflow-wrap: anywhere;
}

@media print {
  .no-print, header.top, footer, .wall-actions, .wall-audit { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border: none; padding: 0; }
  section[hidden], div[hidden], p[hidden] { display: none !important; }
}
