:root{font-family:Inter,system-ui,sans-serif;color:#211f1b;background:#f7f6f1;--line:#e8e4d9;--gold:#ffcb04;--muted:#625e54}*{box-sizing:border-box}body{margin:0}header{background:#211f1b;color:white}.bar{max-width:1200px;padding:13px clamp(16px,4vw,44px);margin:auto;min-height:63px;display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{display:flex;align-items:center;gap:9px;font-size:20px;font-weight:800;letter-spacing:-.04em}.brand i{display:grid;place-items:center;width:33px;height:33px;background:var(--gold);color:#211f1b;border-radius:8px;font-style:normal}.header-label{font-size:13px;color:#e4dfd2}main{max-width:1200px;margin:auto;padding:clamp(22px,5vw,54px) clamp(14px,4vw,44px)}.heading{margin-bottom:23px}h1,h2,p{margin:0}h1{font-size:clamp(27px,4.5vw,44px);line-height:1.1;letter-spacing:-.055em}h2{font-size:17px;letter-spacing:-.02em}.heading p{color:var(--muted);margin-top:9px;line-height:1.5}.layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(245px,1fr);gap:16px;align-items:start}.preview,.editor{background:white;border:1px solid var(--line);border-radius:14px;overflow:hidden}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:14px 16px}.size{background:#fff1ba;border-radius:20px;padding:5px 10px;font-weight:750;font-size:12px;white-space:nowrap}#canvas{margin:0 16px;border-radius:4px;overflow:hidden;background:var(--gold);aspect-ratio:2}#canvas svg{display:block;width:100%;height:100%}.caption{padding:13px 16px;color:var(--muted);font-size:12px}.caption span{padding:0 3px}.editor{padding:16px;display:grid;gap:7px}.editor h2{margin-bottom:4px}.editor label{font-weight:700;font-size:13px;margin-top:8px}.editor :is(input,textarea){width:100%;min-height:45px;border:1px solid #ccc6b7;border-radius:8px;padding:9px 11px;font:inherit;color:inherit;background:#fff}.editor :is(input,textarea):focus-visible,.editor button:focus-visible{outline:2px solid #876900;outline-offset:2px}.hint{font-size:12px;color:var(--muted);line-height:1.45}.editor button{display:flex;align-items:center;justify-content:center;gap:8px;background:var(--gold);color:#211f1b;border:0;border-radius:8px;min-height:45px;font:inherit;font-weight:780;margin-top:12px;cursor:pointer}.editor button:hover{background:#efbd00}#error{font-size:13px;color:#9e2525}#status:empty{display:none}@media(max-width:670px){.layout{grid-template-columns:1fr;gap:12px}.heading{margin-bottom:15px}.panel-head{padding:10px 12px}#canvas{margin:0 12px}.caption{padding:9px 12px}.editor{padding:13px}.header-label{font-size:11px}}
.editor button.secondary{background:#fff;border:1px solid var(--line);margin-top:0}.editor button.secondary:hover{background:#f7f6f1}

.editor textarea{resize:vertical;min-height:68px}

.appearance{border:1px solid var(--line);border-radius:8px;padding:8px 10px;margin-top:4px}.appearance summary{cursor:pointer;font-size:13px;font-weight:750;line-height:25px}.adjustment{display:grid;grid-template-columns:1fr auto;align-items:baseline;gap:0 8px;margin-top:5px}.adjustment[hidden]{display:none}.adjustment output{color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}.editor .adjustment input{grid-column:1/-1;min-height:32px;margin:0;padding:0;accent-color:#947000}.editor #reset-appearance{min-height:36px;font-size:12px;padding:6px 9px;margin:7px 0 1px;width:100%}

/* Fit the full banner to the available width and height. */
#canvas {
  width: min(calc(100% - 24px), 88vh);
  width: min(calc(100% - 24px), 88dvh);
  margin-inline: auto;
}
.exports {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 4px;
}
.editor .exports button {
  margin: 0;
  min-width: 0;
  padding: 5px;
  font-size: 12px;
}
@media (max-width: 670px) {
  .bar { min-height: 42px; padding-block: 5px; }
  .brand { font-size: 17px; }
  .brand i { width: 28px; height: 28px; }
  main { padding: 9px 10px; }
  .heading { margin-bottom: 7px; }
  h1 { font-size: 22px; }
  .layout { gap: 7px; }
  .panel-head { padding-block: 5px; }
  .caption { padding-block: 4px; }
  #canvas { width: min(calc(100% - 16px), 50dvh); }
  .editor { gap: 4px; padding: 8px; }
  .editor label { margin-top: 2px; }
  .editor textarea { min-height: 50px; }
  .editor :is(input,textarea) { padding-block: 5px; }
  .appearance { padding-block: 3px; }
}
@media (orientation: landscape) and (max-height: 500px) and (min-width: 540px) {
  .layout { grid-template-columns: minmax(0, 1fr) minmax(235px, 1fr); }
  main { padding-block: 6px; }
  .heading { margin-bottom: 5px; }
  .bar { min-height: 42px; padding-block: 4px; }
  h1 { font-size: 22px; }
  .editor { padding: 8px; gap: 4px; }
  .editor label { margin-top: 2px; }
  .editor textarea { min-height: 50px; }
  #canvas { width: min(calc(100% - 16px), 100dvh); }
}

#file-actions:not([hidden]){display:grid;gap:6px}
#save-file{font-size:13px;font-weight:700;color:#574300;padding:6px 0}
#share-file[hidden]{display:none}
