:root {
  color-scheme: light;
  font: 1rem/1.55 system-ui, sans-serif;
  background: #eef2f4;
  color: #142432;
  --ink: #142432;
  --muted: #4c6170;
  --line: #d6e0e5;
  --accent: #195b54;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
.wrap { width: min(75rem, calc(100% - 2rem)); margin-inline: auto; }
main { padding-block: 2rem 4rem; }
.top { background: #152936; color: #f8fafb; }
.top-inner, .preview-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.top-inner { padding-block: .9rem; }
.top a { color: inherit; text-decoration: none; }
.brand { font-size: 1.25rem; font-weight: 750; }
nav { display: flex; gap: .65rem 1.25rem; flex-wrap: wrap; }
nav a:hover { text-decoration: underline; }
h1, h2 { line-height: 1.15; letter-spacing: -.035em; }
h1 { font-size: clamp(2rem, 5vw, 3.6rem); margin: 0 0 1.4rem; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 0; }
a { color: var(--accent); }
.studio { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(17rem, 1fr); align-items: start; gap: 1.25rem; }
.panel { min-width: 0; border: 1px solid var(--line); background: white; border-radius: 1rem; overflow-wrap: anywhere; }
.block { padding: 1.1rem 1.25rem; }
.block + .block { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 690; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1rem; margin-block-start: 1rem; }
.fields:empty { margin: 0; }
label, .field-label { display: grid; gap: .3rem; font-weight: 620; min-width: 0; }
label small, .muted, #qr-meta { color: var(--muted); font-weight: 400; }
.wide { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.standalone { align-self: center; }
select, input, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox]), select, textarea { width: 100%; min-width: 0; padding: .45rem .55rem; border: 1px solid #a5b8c4; border-radius: .45rem; background: #fbfcfd; }
input[type=color] { display: block; padding: .2rem; height: 2.4rem; }
textarea { resize: vertical; min-height: 5rem; }
button, .buttonlike { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; border: 1px solid transparent; border-radius: .5rem; padding: .5rem .75rem; font-weight: 650; cursor: pointer; }
.secondary { background: #edf4f3; color: #173d39; border-color: #c8d9d6; }
.buttonlike { position: relative; }
.buttonlike input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
:focus-visible, .buttonlike:focus-within { outline: .16rem solid #197c70; outline-offset: .15rem; }
button:disabled { cursor: default; opacity: .5; }
.actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.style-actions { padding: 1rem 1.25rem; border-top: 1px solid var(--line); }
.preview { position: sticky; top: 1rem; padding: 1.2rem; }
.preview-head { margin-bottom: 1rem; }
.qr-preview { display: grid; place-items: center; min-height: 13rem; padding: .8rem; border-radius: .65rem; background: #e6ebee; }
.qr-preview svg { display: block; width: 100%; max-width: 26rem; max-height: 60vh; height: auto; }
.status { min-height: 1.5rem; color: #325663; font-size: .95rem; }
.status[data-severity="warning"] { color: #765100; }
.status[data-severity="error"] { color: #9d2628; }
.preview details { margin-top: 1.2rem; }
pre { font: .9rem/1.4 ui-monospace, monospace; max-height: 11rem; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.publication { margin-top: 1.6rem; padding: clamp(1.2rem,3vw,2rem); }
.publication form { display: grid; gap: .55rem; justify-items: start; max-width: 34rem; }
.publication form input[type=file] { margin-bottom: .2rem; }
@media (max-width: 770px) {
  .studio { grid-template-columns: 1fr; }
  .preview { position: static; }
}
@media (max-width: 470px) { .fields { grid-template-columns: 1fr; } }
@media print {
  @page { margin: 12mm; }
  body { background: white; }
  .top, .editor, h1, .preview-head, .preview .status, .preview .actions, .preview details, .publication { display: none; }
  main.wrap, .studio, .preview, .qr-preview { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: white; }
  .qr-preview svg { width: 85mm; max-width: none; max-height: none; }
}
