:root {
  --site-header-h: 90px;
}
@media (max-width: 720px) {
  :root { --site-header-h: 74px; }
}
body.customize-page { overflow: hidden; margin: 0; background: #12141a; }
body.customize-page .site-header {
  position: sticky; top: 0; z-index: 100;
}
/* Subscription notice lives in the side panel — not under the header */
.preview-banner {
  display: block;
  margin: 0 0 14px;
  padding: 10px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  background: #fff4ec;
  border: 2px solid #ff4d00;
  border-radius: 6px;
  color: #5c2a00;
}
.preview-banner[hidden] { display: none !important; }
.preview-banner a {
  display: inline-block;
  margin-top: 6px;
  color: #ff4d00;
  font-weight: 700;
  text-decoration: underline;
}
#viewer {
  position: fixed; inset: 0; top: var(--site-header-h);
  overflow: hidden;
  background:
    radial-gradient(ellipse 65% 50% at 58% 46%, #2a3038 0%, #16191f 55%, #0a0b0e 100%);
}
#viewer::after {
  content: "";
  pointer-events: none;
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(ellipse 80% 70% at 55% 48%, transparent 35%, rgba(0,0,0,.45) 100%);
}
#viewer canvas {
  display: block;
  position: absolute; inset: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 0;
}
.panel-wrap {
  position: fixed; top: calc(var(--site-header-h) + 10px); left: 16px; z-index: 10;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - var(--site-header-h) - 26px);
  overflow-y: auto; border-radius: 6px;
  background: #f3f5f7; border: 2px solid #12141a;
  box-shadow: 6px 6px 0 rgba(0,0,0,.35);
}
.panel { padding: 18px 20px 20px; color: #12141a; font-family: var(--font-body, "Public Sans", sans-serif); }
h1 {
  margin: 0 0 2px; font-size: 20px; color: #12141a;
  font-family: var(--font-display, Syne, sans-serif); letter-spacing: -.03em;
}
.sub { margin: 0 0 14px; font-size: 12px; color: #5c6570; line-height: 1.4; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.badge {
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 4px;
  background: rgba(255,77,0,.12); color: #cc3d00; border: 1px solid rgba(255,77,0,.35);
}
input[type=text] {
  width: 100%; padding: 12px 14px; font-size: 22px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: #12141a;
  border: 2px solid #12141a; border-radius: 6px; outline: none; background: #fff;
}
input[type=text]:focus { border-color: #ff4d00; }
.row { display: flex; gap: 8px; margin-top: 10px; }
.row > * { flex: 1; }
button {
  padding: 11px 10px; font-size: 13px; font-weight: 700; border: 2px solid transparent;
  border-radius: 6px; cursor: pointer; font-family: inherit;
}
button:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: #ff4d00; color: #fff; border-color: #ff4d00; }
.btn-dl { background: #12141a; color: #fff; border-color: #12141a; }
.btn-ghost { background: #fff; color: #12141a; border-color: #c5ccd4; }
.btn-share { background: #fff; color: #12141a; border-color: #12141a; font-size: 12px; padding: 8px; }
.print-size {
  margin-top: 10px; padding: 8px 10px; border-radius: 6px;
  background: #fff; border: 1px solid #c5ccd4;
  font-size: 12px; font-weight: 600; color: #12141a;
  font-variant-numeric: tabular-nums;
}
.print-size strong { color: #ff4d00; }
.status { margin-top: 10px; font-size: 12px; min-height: 32px; color: #5c6570; }
.status.err { color: #c0392b; }
.status.ok { color: #1e7a46; }
.spinner {
  display: inline-block; width: 13px; height: 13px; margin-right: 6px;
  border: 2px solid #c5ccd4; border-top-color: #ff4d00;
  border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }
select {
  width: 100%; margin-top: 8px; padding: 9px 11px; font-size: 13px;
  font-weight: 600; color: #12141a; border: 2px solid #c5ccd4; border-radius: 6px; background: #fff;
}
.font-picker { position: relative; margin-top: 8px; }
.font-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; background: #fff; border-radius: 6px; cursor: pointer; color: #12141a;
  border: 2px solid #c5ccd4;
}
.font-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30;
  background: #fff; border: 2px solid #12141a; border-radius: 6px;
  max-height: 280px; display: flex; flex-direction: column; overflow: hidden;
}
.font-menu.hidden { display: none; }
.font-cats { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px; border-bottom: 1px solid #c5ccd4; }
.font-cat {
  padding: 3px 9px; font-size: 10px; font-weight: 600; border-radius: 4px;
  border: 1px solid #c5ccd4; background: transparent; color: #5c6570; cursor: pointer;
}
.font-cat.active { background: #ff4d00; color: #fff; border-color: #ff4d00; }
.font-list { overflow-y: auto; padding: 4px; }
.font-item {
  width: 100%; text-align: left; padding: 8px 10px; border-radius: 4px;
  background: transparent; color: #12141a; cursor: pointer; font-size: 18px; border: 2px solid transparent;
}
.font-item.selected { border-color: #ff4d00; }
.sliders { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.slider-row label { display: flex; justify-content: space-between; font-size: 11px; color: #5c6570; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.layers { margin-top: 10px; display: flex; flex-direction: column; gap: 7px; }
.layers-toggle {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: #12141a;
}
.layer-row {
  display: grid;
  grid-template-columns: 78px 1fr 44px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.layer-lab {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; color: #12141a;
}
.layer-row input[type=color] {
  width: 26px; height: 26px; padding: 0;
  border: 2px solid #12141a; border-radius: 4px;
  background: none; cursor: pointer;
}
.layer-row input[type=range] { width: 100%; accent-color: #ff4d00; }
.layer-row .mm {
  font-size: 11px; color: #5c6570; text-align: right;
  font-variant-numeric: tabular-nums;
}
.warnings { margin-top: 10px; padding: 10px; border-radius: 6px; font-size: 11px; display: none; }
.warnings.show { display: block; }
.warnings.warn { background: #fff4ec; color: #8a3b00; }
.warnings.tip { background: #eef6ff; color: #1a3a5c; }
.share-box {
  margin-top: 12px; padding: 10px; border-radius: 6px;
  background: #fff; border: 1px solid #c5ccd4;
}
.share-box p { margin: 0 0 8px; font-size: 11px; color: #5c6570; }
.share-link {
  width: 100%; padding: 7px; font-size: 10px; border-radius: 4px;
  border: 1px solid #c5ccd4; background: #f3f5f7; color: #5c6570;
}
.credits-bar {
  margin-top: 10px; padding: 8px; border-radius: 6px; font-size: 11px;
  background: rgba(255,77,0,.1); color: #8a3b00;
  display: flex; justify-content: space-between;
}
.sym-row { display: flex; gap: 5px; margin-top: 6px; }
.sym-btn { padding: 4px 10px; font-size: 16px; background: #fff; color: #12141a; border: 1px solid #c5ccd4; border-radius: 4px; }
details.guide { margin-top: 12px; border: 1px solid #c5ccd4; border-radius: 6px; color: #5c6570; font-size: 11px; background: #fff; }
details.guide summary { padding: 10px; cursor: pointer; color: #12141a; }
