
[data-pair-id='dark'] { --b-bg: #0a0a0a; --b-fg: #ffffff; --b-bg2: #262626; }
[data-pair-id='light'] { --b-bg: #ffffff; --b-fg: #0a0a0a; --b-bg2: #e5e5e5; }
[data-pair-id='red'] { --b-bg: #8f3d33; --b-fg: #ffffff; --b-bg2: #6e2c24; }
[data-pair-id='amber'] { --b-bg: #0a0a0a; --b-fg: #ffc53d; --b-bg2: #262626; }
[data-pair-id='yellow'] { --b-bg: #ffc53d; --b-fg: #0a0a0a; --b-bg2: #f2a516; }
[data-pair-id='redwhite'] { --b-bg: #ffffff; --b-fg: #7d352c; --b-bg2: #ebebeb; }
[data-pair-id='green'] { --b-bg: #1d5a44; --b-fg: #ffffff; --b-bg2: #143f30; }
[data-pair-id='mint'] { --b-bg: #0a0a0a; --b-fg: #5ee0a0; --b-bg2: #262626; }
@font-face { font-family: 'Box Banner Serif'; src: url('/fonts/banner-serif-1.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Box Banner Round'; src: url('/fonts/banner-round-1.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
.banner-preview, .banner-stage { --b-face: var(--apa-font); --b-weight: 800; }
[data-font='serif'] { --b-face: 'Box Banner Serif', 'Songti SC', 'Noto Serif CJK SC', 'Source Han Serif SC', serif; --b-weight: 900; }
[data-font='round'] { --b-face: 'Box Banner Round', var(--apa-font); --b-weight: 400; }
.banner-preview {
  width: 100%; aspect-ratio: 2 / 1; display: grid; place-items: center; border-radius: var(--apa-r-md);
  background: var(--b-bg); color: var(--b-fg); box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--b-face); font-size: 24px; font-weight: var(--b-weight); text-align: center; overflow: hidden;
}
.banner-preview-text {
  display: inline-block; line-height: 1.12; white-space: nowrap;
  letter-spacing: var(--b-spacing, 0.02em); padding-inline-start: max(0px, var(--b-spacing, 0px));
  -webkit-text-stroke: var(--b-stroke, 0) currentColor; text-shadow: var(--b-outline, none);
}
.banner-preview-text .phrase { white-space: nowrap; }
.banner-preview-text[data-unfit] { visibility: hidden; }
.banner-preview.is-mirrored .banner-preview-text { transform: scaleX(-1); }
[data-fill='gradient'] { background-image: linear-gradient(135deg, var(--b-bg), var(--b-bg2)); }
.banner-settings .banner-group { margin: 1.5rem 0 0.5rem; font-size: var(--apa-text-sm); font-weight: 650; color: var(--muted); letter-spacing: 0.04em; }
.banner-settings > .field:first-child { margin-top: 0; }
.banner-rows > .row { flex-wrap: wrap; justify-content: space-between; row-gap: 6px; }
.banner-rows > .row > .row-title { flex: 1 0 auto; }
.banner-rows > .row > .segmented { flex: none; margin-left: auto; }
.banner-rows .check { flex: 1; flex-wrap: wrap; padding-block: 6px; }
.banner-rows .check .row-sub { flex-basis: 100%; padding-left: calc(18px + 0.6rem); margin-top: -4px; }
.banner-prefix { flex-wrap: nowrap; }
.banner-prefix > button { padding-inline: 0.6rem; min-width: 44px; }
.banner-glyph { font-size: 18px; line-height: 1; }
.banner-rows input[type='color'] {
  flex: none; width: 56px; height: 44px; min-height: 44px; padding: 4px; border: 1px solid var(--line); border-radius: var(--apa-r-field);
  background: var(--paper); cursor: pointer;
}
.banner-rows + .hint { margin-top: 0.5rem; }
[data-contrast].is-warning { color: var(--apa-warning); }
.banner-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.banner-quick button { font-weight: 500; }
.banner-pairs { display: flex; flex-wrap: wrap; gap: 8px; }
.banner-pairs button { width: 52px; height: 52px; min-height: 52px; padding: 0; border-radius: 50%; border: 1px solid var(--line); }
.banner-pairs button[aria-pressed='true'] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pair-dot { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--b-bg); color: var(--b-fg); font-weight: 800; font-size: 15px; box-shadow: inset 0 0 0 1px rgb(127 127 127 / 0.35); }
.pair-custom { background: var(--surface); color: var(--ink); font-weight: 600; }
.banner-save { display: flex; gap: 8px; }
.banner-save input { flex: 1; min-width: 0; }
.banner-save button { flex: none; }
.banner-saved { margin-bottom: 0.5rem; }
.banner-saved > .row { padding: 0 4px 0 0; gap: 0; }
.banner-saved-use {
  flex: 1; min-width: 0; justify-content: flex-start; text-align: left; border: 0; border-radius: 0;
  min-height: 56px; padding: 6px 8px 6px 16px; font-weight: 400;
}
.banner-saved-use .row-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner-saved .icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.full-view { position: fixed; inset: 0; z-index: 100; overflow: hidden; outline: none; }
.full-close {
  position: absolute; top: calc(8px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right)); z-index: 2;
  width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: 0.55;
}
.full-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
@media (hover: hover) { .full-close:hover:not(:disabled) { background: rgb(127 127 127 / 0.2); color: inherit; opacity: 1; } }
.banner-stage { background-color: var(--b-bg); color: var(--b-fg); cursor: default; }
.banner-box { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; overflow: hidden; transform-origin: 50% 50%; }
.banner-fx { display: grid; place-items: center; width: 100%; height: 100%; }
.banner-track { display: flex; align-items: center; justify-content: center; text-align: center; will-change: transform; }
.banner-track.is-marquee { justify-content: flex-start; justify-self: start; }
.banner-text {
  display: inline-block; font-family: var(--b-face); font-weight: var(--b-weight); line-height: 1.12;
  letter-spacing: var(--b-spacing, 0.02em); padding-inline-start: max(0px, var(--b-spacing, 0px));
  -webkit-text-stroke: var(--b-stroke, 0) currentColor; text-shadow: var(--b-outline, none);
  overflow-wrap: normal; word-break: normal; text-wrap: balance; font-kerning: normal;
}
.banner-text .phrase { white-space: nowrap; }
@media (min-width: 901px) { .banner-layout > .stage { position: sticky; top: 1rem; } }
