:root {
  --bg-top: #C9CED3;
  --bg-bottom: #ffffff;
  --panel: #FFFFFF;
  --ink: #111827;
  --theme-primary: #14823b;
  --theme-primary-soft: #8ec5a0;
  --theme-primary-dark: #0d5f2b;
  --theme-accent: #2f9e5b;
  --theme-primary-gloss: rgba(255, 255, 255, 0.34);
  --theme-shadow: rgba(6, 78, 59, 0.24);
  --theme-on-primary: #ffffff;
  --line: var(--theme-primary-soft);
  --feature-finder-drawer-width: clamp(240px, 28vw, 300px);
  --feature-finder-drawer-gap: 0.95rem;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  font-family: "Montserrat", sans-serif;
  color: #f5f5f5;
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

.app {
  display: grid;
  grid-template-columns: minmax(330px, 410px) minmax(290px, 360px) minmax(280px, 330px);
  column-gap: 1.5rem;
  row-gap: 1rem;
  padding: 1rem;
  width: min(1240px, calc(100vw - 2rem));
  margin: 0 auto;
  min-height: auto;
  align-items: start;
  position: relative;
  z-index: 1;
}

.app.feature-finder-open {
  width: min(1540px, calc(100vw - 2rem));
  grid-template-columns:
    minmax(330px, 410px)
    minmax(220px, 260px)
    minmax(360px, 1fr)
    minmax(280px, 330px);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 18px 36px rgba(5, 46, 43, 0.07);
  border-radius: 22px;
  padding: 1rem;
  overflow: auto;
  min-width: 0;
}

.panel.left,
.panel.right {
  max-height: calc(100vh - 2rem);
  align-self: start;
}

.app.feature-finder-open .preview {
  grid-column: 2 / 4;
}

.app.feature-finder-open .panel.right {
  grid-column: 4;
  grid-row: auto;
}

h1 {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  font-weight: 900;
}

.brand-banner {
  margin: 0 0 0.75rem;
  padding: 1rem 0.95rem;
  border-radius: 20px;
  background:
    linear-gradient(180deg, var(--theme-primary-gloss) 0%, rgba(255, 255, 255, 0.08) 22%, rgba(255, 255, 255, 0) 23%),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.06) 0 18px, rgba(8, 56, 44, 0.32) 18px 36px),
    linear-gradient(180deg, color-mix(in srgb, var(--theme-primary) 88%, white 12%) 0%, color-mix(in srgb, var(--theme-primary) 94%, black 6%) 52%, var(--theme-primary-dark) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -10px 18px rgba(0, 0, 0, 0.14),
    0 16px 30px var(--theme-shadow);
  cursor: pointer;
}

.brand-banner:focus-visible {
  outline: 3px solid var(--theme-accent);
  outline-offset: 3px;
}

.brand-title {
  margin: 0;
  color: #ffffff;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.15;
}

.brand-tip {
  margin: 0.55rem 0 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: 0.82rem;
  line-height: 1.35;
  font-weight: 700;
  text-shadow:
    -1px 0 0 rgba(0, 0, 0, 0.7),
    1px 0 0 rgba(0, 0, 0, 0.7),
    0 -1px 0 rgba(0, 0, 0, 0.7),
    0 1px 0 rgba(0, 0, 0, 0.7);
}

h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.group {
  display: grid;
  gap: 0.35rem;
  border: 1px solid rgba(20, 130, 59, 0.28);
  border-radius: 8px;
  padding: 0.7rem;
  margin-bottom: 0.7rem;
  background: #FFFFFF;
}

.group[hidden] {
  display: none !important;
}

.advanced-feature-collapsible[hidden] {
  display: none !important;
}

.panel.left .group,
.panel.right .group {
  color: #4B5563;
}

.panel.left .group input[type="text"],
.panel.left .group select,
.panel.right .group input[type="text"],
.panel.right .group select {
  color: #4B5563;
}

.panel.left .group input[type="text"]::placeholder,
.panel.right .group input[type="text"]::placeholder {
  color: #4B5563;
}

.download-tagline-prompt {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.35rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.78);
}

.download-tagline-prompt[hidden] {
  display: none !important;
}

.download-choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.download-tagline-prompt h2 {
  font-weight: 500;
}

.export-status {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #dc2626;
}

.advanced-feature-block {
  display: grid;
  gap: 0.45rem;
  padding: 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.advanced-feature-block + .advanced-feature-block {
  margin-top: 0.35rem;
}
.advanced-feature-collapsible {
  padding: 0;
}

.advanced-feature-summary {
  list-style: none;
  cursor: pointer;
  padding: 0.8rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--theme-primary);
}

.advanced-feature-subtext {
  font-size: 0.72em;
  font-weight: 700;
}

.advanced-feature-summary::-webkit-details-marker {
  display: none;
}

.advanced-feature-summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.45rem;
  transition: transform 0.15s ease;
}

.advanced-feature-collapsible[open] .advanced-feature-summary::before {
  transform: rotate(90deg);
}

.advanced-feature-body {
  display: grid;
  gap: 0.45rem;
  padding: 0 0.8rem 0.8rem;
}


.quick-custom-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
}

#quickCustomPaletteHex {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  text-transform: uppercase;
}

.quick-custom-picker-row {
  display: grid;
  justify-items: start;
  gap: 0.2rem;
  margin-top: 0.35rem;
  margin-bottom: 0.9rem;
}

.quick-custom-picker-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--theme-primary-dark);
}

.quick-custom-picker-hint {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  color: #475569;
}

.quick-custom-palette-picker-wrap {
  width: 120px;
  height: 32px;
  border-radius: 14px;
  border: 2px solid #5fa8d3;
  background: linear-gradient(90deg, #ff4d4d 0%, #ff9f1c 18%, #ffe66d 34%, #4cd964 50%, #45b7ff 68%, #7b61ff 84%, #ff4fd8 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.92) inset;
  overflow: hidden;
}

#quickCustomPaletteColor {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

#quickCustomPaletteColor::-webkit-color-swatch-wrapper {
  padding: 0;
}

#quickCustomPaletteColor::-webkit-color-swatch {
  border: 0;
  border-radius: 12px;
  background: transparent;
}

#quickCustomPaletteColor::-moz-color-swatch {
  border: 0;
  border-radius: 12px;
  background: transparent;
}

.quick-custom-palette-picker-wrap .palette-picker-hint {
  left: 12px;
  right: 12px;
  height: 4px;
  border-radius: 999px;
  background: rgba(44, 62, 91, 0.7);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}

#quickCustomPaletteHex {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  text-transform: uppercase;
}

.add-hex-saved-colors-container {
  display: grid;
  gap: 0.4rem;
}

.add-hex-saved-colors-label {
  margin: 0;
}

.image-background-saved-colors-container {
  margin-top: 0.65rem;
  margin-bottom: 0.7rem;
}

.image-background-saved-hex-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.1rem;
  scrollbar-width: thin;
}

.image-background-saved-hex-swatch {
  width: 34px;
  height: 18px;
  min-width: 34px;
  border-radius: 4px;
  border: 1px solid #6b7280;
  cursor: pointer;
}

.image-background-slider-control {
  grid-column: 1 / -1;
}

.image-background-slider-row .image-background-slider-control {
  grid-column: auto;
}

.image-background-slider-control input[type="range"] {
  width: 100%;
}

.image-background-slider-row {
  align-items: end;
  margin-top: 0.3rem;
}

#imageBackgroundColorRow .compact-range-row {
  align-items: start;
}

.image-background-note {
  font-size: 0.7rem;
  line-height: 1.25;
  white-space: nowrap;
  margin-bottom: 0.7rem;
}

.image-background-note + .outline-toggle {
  margin-top: 2.6rem;
}

.design-setup-action-row {
  margin-top: 0.15rem;
}

.design-setup-action-row .secondary-btn {
  width: 100%;
}

.secondary-btn.design-setup-btn {
  border: 2px solid var(--theme-primary-dark);
  background:
    linear-gradient(180deg, var(--theme-primary-gloss) 0%, rgba(255, 255, 255, 0.08) 24%, rgba(255, 255, 255, 0) 25%),
    linear-gradient(180deg, color-mix(in srgb, var(--theme-primary-soft) 84%, white 16%) 0%, var(--theme-primary-soft) 40%, var(--theme-primary) 66%, var(--theme-primary-dark) 100%);
  color: var(--theme-primary);
  text-shadow: none;
  -webkit-text-stroke: 0;
}

.secondary-btn.design-setup-btn:hover,
.secondary-btn.design-setup-btn:focus-visible {
  background:
    linear-gradient(180deg, var(--theme-primary-gloss) 0%, rgba(255, 255, 255, 0.1) 24%, rgba(255, 255, 255, 0) 25%),
    linear-gradient(180deg, color-mix(in srgb, var(--theme-primary-soft) 78%, white 22%) 0%, var(--theme-primary-soft) 38%, var(--theme-primary) 64%, var(--theme-primary-dark) 100%);
  color: var(--theme-primary);
}

.secondary-btn.design-setup-delete-btn {
  border-color: #b91c1c;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.08) 24%, rgba(255, 255, 255, 0) 25%),
    linear-gradient(180deg, #ef4444 0%, #dc2626 52%, #b91c1c 100%);
}

.secondary-btn.design-setup-delete-btn:hover,
.secondary-btn.design-setup-delete-btn:focus-visible {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.1) 24%, rgba(255, 255, 255, 0) 25%),
    linear-gradient(180deg, #f87171 0%, #dc2626 48%, #991b1b 100%);
}

.design-setup-status {
  min-height: 1.2rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
}

.design-setup-status[data-tone="success"] {
  color: var(--theme-primary-dark);
}

.design-setup-status[data-tone="error"] {
  color: #dc2626;
}

.saved-hex-grid {
  display: grid;
  gap: 0.45rem;
}

.saved-hex-grid.image-background-saved-hex-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.1rem;
  scrollbar-width: thin;
}

.pro-style-saved-hex-container {
  display: grid;
  gap: 0.28rem;
  margin-top: 0.2rem;
}

.saved-hex-controls-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

.pro-style-saved-hex-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.3rem;
  min-width: 0;
  flex: 0 0 auto;
}

.pro-style-saved-hex-grid .saved-hex-swatch {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 5px;
}

.image-background-saved-hex-grid .saved-hex-swatch {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 3px;
  border-width: 2px;
}

.pro-style-saved-hex-grid .saved-hex-swatch.is-selected {
  outline: 2px solid var(--theme-primary);
  outline-offset: 1px;
}

.saved-hex-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.4rem 0.45rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
}

.saved-hex-swatch {
  width: 34px;
  height: 18px;
  min-width: 34px;
  padding: 0;
  border-radius: 4px;
  border: 1px solid #6b7280;
}

.saved-hex-label {
  padding: 0.35rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: left;
}

.saved-hex-remove {
  width: auto;
  padding: 0.35rem 0.55rem;
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: #fff1f2;
  color: #be123c;
  font-size: 0.66rem;
  font-weight: 700;
}

.custom-font-upload-block {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.35rem;
  padding: 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: rgba(232, 248, 238, 0.88);
}

.custom-font-toolbar {
  display: flex;
  justify-content: flex-end;
}

.secondary-btn {
  border: 1px solid #94a3b8;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  background: #ffffff;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
}

.secondary-btn:hover {
  background: #f8fafc;
}
.advanced-feature-block button,
.secondary-btn,
.custom-font-remove,
.saved-hex-remove,
.saved-hex-label {
  text-shadow: none;
  -webkit-text-stroke: 0;
}


.custom-font-status {
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  background: #e0f2fe;
  color: #075985;
}

.custom-font-status[data-tone="error"] {
  background: #fee2e2;
  color: #991b1b;
}

.custom-font-status[data-tone="success"] {
  background: #dcfce7;
  color: #166534;
}

.custom-font-list {
  display: grid;
  gap: 0.45rem;
}

.custom-font-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
}

.custom-font-meta {
  min-width: 0;
}

.custom-font-name {
  display: block;
  font-weight: 800;
  color: #052E2B;
  word-break: break-word;
}

.custom-font-note {
  display: block;
  font-size: 0.74rem;
  color: #94a3b8;
}

.custom-font-remove {
  border: 1px solid #fecaca;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: #fff1f2;
  color: #be123c;
  font-weight: 700;
  cursor: pointer;
}

.custom-font-remove:hover {
  background: #ffe4e6;
}

.group.collapsible {
  padding: 0.6rem 0.7rem;
}

.group.collapsible summary {
  display: flex;
  align-items: center;
  list-style: none;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 800;
  gap: 0.5rem;
}

.group.collapsible summary .summary-action-row {
  margin-left: auto;
  margin-bottom: 0;
  flex: 0 0 auto;
  align-items: center;
}

.group.collapsible summary.import-image-summary {
  color: var(--theme-primary);
}

.group.collapsible summary.green-summary {
  color: var(--theme-primary);
}

/* Keep section headers green, but render subtext in collapsible bodies as slate gray. */
.panel.left .group .collapse-body,
.panel.right .group .collapse-body {
  color: #4B5563;
}

.panel.left .group .collapse-body label,
.panel.right .group .collapse-body label {
  color: #4B5563;
}

.output-group h2,
.output-group label[for="pdfSetup"] {
  color: var(--theme-primary);
}

.output-group label[for="pdfSetup"] {
  display: block;
  width: 100%;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  background: linear-gradient(180deg, #189246 0%, #0d5f2b 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -8px 14px rgba(0, 0, 0, 0.12),
    0 12px 22px var(--theme-shadow);
  color: #ffffff;
  text-align: left;
}

#pdfSetup {
  font-size: 0.74rem;
}

#downloadBtn {
  color: #ffffff;
  border: 2px solid var(--theme-primary-dark);
  background: linear-gradient(180deg, #189246 0%, #0d5f2b 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -8px 14px rgba(0, 0, 0, 0.12),
    0 12px 22px var(--theme-shadow);
  font-weight: 700;
  text-shadow: none;
  -webkit-text-stroke: 0;
}

#downloadBtn.export-mode {
  border-color: #b91c1c;
  background: #dc2626;
}

#addExtraTextBtn {
  background: linear-gradient(180deg, #189246 0%, #0d5f2b 100%);
  color: #ffffff;
}

#downloadTaglineYesBtn,
#downloadTaglineNoBtn {
  color: #ffffff;
  background: linear-gradient(180deg, #189246 0%, #0d5f2b 100%);
  font-size: 0.74rem;
  font-weight: 800;
}

.group.collapsible summary::-webkit-details-marker {
  display: none;
}

.group.collapsible summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.45rem;
  transition: transform 0.15s ease;
}

.group.collapsible[open] summary::before {
  transform: rotate(90deg);
}

.group.collapsible .collapse-body {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.65rem;
  min-width: 0;
}

.group.collapsible .collapse-body > * {
  min-width: 0;
}

.compact-range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.6rem;
  align-items: end;
}

.image-flip-control {
  display: flex;
  align-items: flex-end;
}

.image-flip-control .outline-toggle {
  margin-bottom: 0.12rem;
}

.compact-range-control {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.compact-range-control label {
  font-size: 0.74rem;
  display: block;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
}

.compact-label {
  font-size: 0.74rem;
}

.compact-field {
  height: 24px;
  min-height: 24px;
  padding: 0.22rem 0.55rem;
  font-size: 0.66rem;
  line-height: 1;
}

.top-panel-select-field {
  height: 30px;
  min-height: 30px;
  padding: 0.16rem 0.58rem;
  font-size: 0.86rem;
  line-height: 1.05;
  border-radius: 8px;
}

.compact-range-control input[type="range"] {
  transform: scaleY(0.9);
  transform-origin: center;
}

label { font-weight: 700; font-size: 0.9rem; }
.label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.help-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 1px solid #94a3b8;
  background: #ffffff;
  color: #052E2B;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  cursor: help;
}

.help-tip-link {
  text-decoration: none;
  color: #052E2B;
}

.help-tip-link:hover,
.help-tip-link:focus-visible,
.help-tip-link:visited {
  color: #052E2B;
}

.help-tip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: -2.4rem;
  right: auto;
  top: calc(100% + 10px);
  min-width: 320px;
  max-width: 420px;
  padding: 0.42rem 0.5rem;
  border-radius: 8px;
  background: #052E2B;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  z-index: 20;
}

.help-tip:hover::after,
.help-tip:focus-visible::after {
  opacity: 1;
}

body.help-tooltip-portal-enabled .help-tip::after {
  display: none !important;
}

.floating-help-tooltip {
  position: fixed;
  z-index: 9999;
  min-width: 220px;
  max-width: min(360px, calc(100vw - 24px));
  padding: 0.42rem 0.5rem;
  border-radius: 8px;
  background: #052E2B;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  white-space: pre-line;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
  pointer-events: none;
  visibility: hidden;
}
input[type="text"],
select,
input[type="file"] {
  width: 100%;
  border-radius: 0;
  border: 2px solid rgba(20, 130, 59, 0.42);
  padding: 0.5rem 0.65rem;
  font: inherit;
}

button {
  width: 100%;
  border-radius: 10px;
  border: 2px solid rgba(20, 130, 59, 0.42);
  padding: 0.5rem 0.65rem;
  font: inherit;
}

input[type="text"]:focus::placeholder {
  color: transparent;
  opacity: 0;
}

/* Round the main top/bottom text entry fields only. */
#topCurveText,
#bottomCurveText {
  border-radius: 8px;
}

input[type="file"] {
  color: #4B5563;
  max-width: 100%;
  min-width: 0;
}

input[type="file"]::file-selector-button {
  color: #4B5563;
}

input[type="file"]::-webkit-file-upload-button {
  color: #4B5563;
}

#tagText {
  font-size: 0.66rem;
}

#tagText::placeholder {
  font-size: 0.66rem;
}

input[type="color"] {
  width: 100%;
  height: 36px;
  border: 2px solid rgba(20, 130, 59, 0.42);
  border-radius: 0;
  background: transparent;
  padding: 0;
}

input[type="range"] {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  accent-color: var(--theme-primary);
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f5d46 0%, #0f5d46 50%, #e5e7eb 50%, #e5e7eb 100%);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 52px;
  height: 30px;
  margin-top: -8px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.55) inset;
}

input[type="range"]::-moz-range-track {
  height: 14px;
  border: 0;
  border-radius: 999px;
  background: #e5e7eb;
}

input[type="range"]::-moz-range-progress {
  height: 14px;
  border: 0;
  border-radius: 999px;
  background: #0f5d46;
}

input[type="range"]::-moz-range-thumb {
  width: 52px;
  height: 30px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.55) inset;
}

input[type="range"]::-moz-range-progress,
input[type="range"]::-moz-range-track,
input[type="range"]::-moz-range-thumb {
  appearance: none;
}

@media (max-width: 380px) {
  .compact-range-row,
  .outline-control-row,
  .name-case-control {
    grid-template-columns: 1fr;
  }
}

.range-with-thumb-value {
  display: contents;
}

.range-thumb-value {
  display: none;
}

.range-label-value {
  display: inline-block;
  margin-left: 0.22rem;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  vertical-align: baseline;
}

.slider-value-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.slider-values-hidden .range-label-value {
  display: none !important;
}

.feature-finder-panel {
  width: 100%;
  min-width: 0;
  margin: 0;
  align-content: start;
  gap: 0.75rem;
  padding: 1rem 0.95rem 1.05rem;
  overflow: auto;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(201, 206, 211, 0.98) 100%);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.18);
}

.feature-finder-eyebrow {
  margin: 0;
  color: var(--theme-primary-dark);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.feature-finder-note {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: #475569;
}

.feature-finder-filter-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.feature-finder-filter-btn {
  min-width: 0;
  padding: 0.52rem 0.6rem;
  border: 1px solid rgba(20, 130, 59, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--theme-primary-dark);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.02;
  text-shadow: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 6px 12px rgba(15, 23, 42, 0.08);
}

.feature-finder-filter-label {
  display: block;
}

.feature-finder-filter-btn:hover,
.feature-finder-filter-btn:focus-visible,
.feature-finder-filter-btn.is-active {
  border-color: rgba(47, 158, 91, 0.56);
  background: linear-gradient(180deg, #ffffff, rgba(226, 245, 232, 0.88));
  color: var(--theme-primary);
}

.feature-finder-grid {
  display: grid;
  gap: 0.8rem;
}

.feature-finder-grid[data-mode="basic"] > #advancedFeatureFinderGroup,
.feature-finder-grid[data-mode="advanced"] > #basicFeatureFinderGroup {
  display: none;
}

.feature-finder-group {
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem 0.72rem;
  border: 1px solid rgba(212, 175, 55, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
}

.feature-finder-group h3 {
  margin: 0;
  color: var(--theme-primary-dark);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.feature-finder-links {
  display: grid;
  justify-items: stretch;
  gap: 0.45rem;
}

.feature-finder-links-single {
  gap: 0.5rem;
}

.feature-finder-actions {
  display: flex;
  justify-content: center;
  width: 100%;
}

.feature-finder-open-actions {
  margin-top: 0.05rem;
}

.feature-finder-close-actions {
  margin-top: 1.5rem;
  justify-content: center;
}


.instruction-toggle.demo-toggle {
  border: 2px solid var(--theme-primary-dark);
  background: linear-gradient(180deg, #189246 0%, #0d5f2b 100%);
  color: #ffffff;
}

.instruction-toggle.demo-toggle:hover,
.instruction-toggle.demo-toggle:focus-visible {
  background: linear-gradient(180deg, #189246 0%, #0d5f2b 100%);
  color: #ffffff;
}

.instruction-toggle.is-active {
  background: linear-gradient(90deg, #dc2626, #991b1b);
}

.feature-finder-close-link {
  width: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--theme-primary);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  white-space: nowrap;
  text-shadow: none;
  -webkit-text-stroke: 0;
  box-shadow: none;
  cursor: pointer;
}

.feature-finder-close-link:hover,
.feature-finder-close-link:focus-visible {
  color: var(--theme-accent);
  background: transparent;
  outline: none;
}

.feature-finder-link {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.62rem 0.9rem;
  border: 1px solid rgba(20, 130, 59, 0.22);
  border-radius: 999px;
  background: #ffffff;
  color: var(--theme-primary-dark);
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  text-shadow: none;
  -webkit-text-stroke: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 8px 16px rgba(15, 23, 42, 0.08);
}

.feature-finder-link.feature-finder-link-small {
    font-size: 0.8rem;
}

.text-panel-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  margin: 0 0 0.35rem;
}

.text-panel-mini-btn {
  width: auto;
  min-width: 28px;
  padding: 0.22rem 0.48rem;
  border: 1px solid var(--theme-primary);
  border-radius: 999px;
  background: #ffffff;
  color: var(--theme-primary);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  text-shadow: none;
  -webkit-text-stroke: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 4px 8px rgba(6, 78, 59, 0.12);
}

.text-panel-mini-btn:hover,
.text-panel-mini-btn:focus-visible {
  background: #f3fbf5;
  border-color: var(--theme-primary-dark);
  outline: none;
}

.feature-finder-link-main {
  display: inline;
}

.feature-finder-link-subtext {
  display: inline;
  font-size: 0.68em;
  font-weight: 700;
  letter-spacing: 0;
}

.feature-finder-link-row {
  display: grid;
  gap: 0.45rem;
}

.feature-finder-link-row-tight {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-finder-link::before {
  content: none;
}

.feature-finder-link:hover,
.feature-finder-link:focus-visible {
  color: var(--theme-primary);
  background: linear-gradient(180deg, #ffffff, rgba(226, 245, 232, 0.88));
  border-color: rgba(47, 158, 91, 0.52);
  outline: none;
}

.feature-finder-link:hover::before,
.feature-finder-link:focus-visible::before {
  color: var(--theme-primary);
}

input[type="checkbox"] {
  accent-color: var(--theme-primary);
}

button {
  border: none;
  color: var(--theme-on-primary);
  font-weight: 800;
  cursor: pointer;
  background:
    linear-gradient(180deg, var(--theme-primary-gloss) 0%, rgba(255, 255, 255, 0.08) 24%, rgba(255, 255, 255, 0) 25%),
    linear-gradient(180deg, color-mix(in srgb, var(--theme-primary) 88%, white 12%) 0%, var(--theme-primary) 54%, var(--theme-primary-dark) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -8px 14px rgba(0, 0, 0, 0.12),
    0 12px 22px var(--theme-shadow);
  text-shadow: none;
}

.swatch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  border: 1px solid var(--theme-primary-soft);
  border-radius: 8px;
  padding: 0.35rem 0.45rem;
}

.swatches {
  display: inline-flex;
  gap: 0.35rem;
}

.sports-background-panel {
  gap: 0.65rem;
}

.sports-background-selector-shell {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 2px solid rgba(201, 165, 52, 0.34);
  border-radius: 1.25rem;
  background: rgba(247, 249, 246, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 10px 24px rgba(58, 77, 67, 0.08);
}

.sports-background-selector-help {
  margin: 0;
  color: rgba(63, 78, 90, 0.92);
  font-size: 0.9rem;
  line-height: 1.35;
  font-weight: 700;
}

.sports-background-color-block {
  display: grid;
  gap: 0.55rem;
  justify-items: start;
}

.sports-background-color-label {
  margin: 0;
  color: #1f5d43;
  font-size: 0.98rem;
  line-height: 1.1;
  font-weight: 900;
  text-transform: uppercase;
}

.sports-background-panel .outline-palette.sports-background-palette {
  margin-top: 0.25rem;
}

.sports-background-panel .sports-background-used-colors {
  max-width: 100%;
}

.sports-text-palette {
  width: 100%;
  align-items: start;
}

.outline-palette.two-line-palette.sports-text-palette {
  display: grid;
  grid-template-columns: repeat(10, max-content);
  justify-content: start;
  align-items: center;
  column-gap: 0.25rem;
  row-gap: 0.18rem;
  margin-top: 0.18rem;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.outline-palette.two-line-palette.sports-text-palette .outline-swatch {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 3px;
  border-width: 2px;
}

.outline-palette.two-line-palette.sports-text-palette .palette-picker-wrap {
  width: 68px;
  height: 24px;
  border-radius: 8px;
  grid-column: 1 / 4;
}

.outline-palette.two-line-palette.sports-text-palette .background-swatch,
.outline-palette.two-line-palette.sports-text-palette .rainbow-picker-button {
  width: 68px !important;
  min-width: 68px;
  height: 24px !important;
  border-radius: 6px;
  padding: 2px;
}

.outline-palette.two-line-palette.sports-text-palette .rainbow-picker-button {
  position: absolute;
  inset: 0;
  width: 100% !important;
  min-width: 100%;
  height: 100% !important;
  margin: 0;
  padding: 2px;
  border-radius: 6px;
}

.outline-palette.two-line-palette.sports-text-palette .palette-picker-hint {
  left: 6px;
  right: 6px;
  height: 3px;
}

.outline-control-row .outline-palette.two-line-palette.sports-text-palette {
  grid-template-columns: repeat(11, max-content);
  column-gap: 0.14rem;
  row-gap: 0.14rem;
}

.outline-control-row .outline-palette.two-line-palette.sports-text-palette > .outline-swatch {
  width: 14px;
  height: 14px;
  min-width: 14px;
  border-radius: 2px;
}

.outline-control-row .outline-palette.two-line-palette.sports-text-palette > .outline-swatch:nth-of-type(-n+10) {
  width: 12px;
  height: 12px;
  min-width: 12px;
}

.outline-control-row .outline-palette.two-line-palette.sports-text-palette .palette-picker-wrap {
  width: 36px;
  height: 12px;
  border-radius: 4px;
  grid-column: auto;
}

.outline-control-row .outline-palette.two-line-palette.sports-text-palette .background-swatch,
.outline-control-row .outline-palette.two-line-palette.sports-text-palette .rainbow-picker-button {
  width: 36px !important;
  min-width: 36px;
  height: 12px !important;
  border-radius: 3px;
  padding: 1px;
}

.outline-control-row .outline-palette.two-line-palette.sports-text-palette .rainbow-picker-button {
  padding: 1px;
  border-radius: 4px;
}

.outline-control-row .outline-palette.two-line-palette.sports-text-palette .palette-picker-hint {
  left: 3px;
  right: 3px;
  height: 2px;
}

.outline-control-row .outline-palette.two-line-palette.sports-text-palette .used-colors-inline {
  grid-column: 1 / -1;
  justify-self: start;
  padding-left: 0;
  border-left: 0;
  max-width: 100%;
}

.outline-control-row .outline-palette.two-line-palette.sports-text-palette .pro-style-saved-hex-grid {
  grid-column: 1 / -1;
}

.outline-palette.two-line-palette.sports-text-palette .used-colors-inline {
  grid-column: 4 / -1;
  align-self: center;
  padding-left: 0.22rem;
  max-width: 100%;
}

.outline-palette.two-line-palette.sports-text-palette .pro-style-saved-hex-grid {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  padding-top: 0.12rem;
  scrollbar-width: thin;
}

.outline-palette.two-line-palette.sports-text-palette .pro-style-saved-hex-grid::before {
  content: "Saved Hex";
  flex: 0 0 auto;
  margin-right: 0.22rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.outline-palette.two-line-palette.sports-text-palette .pro-style-saved-hex-grid .saved-hex-swatch {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 3px;
  border-width: 2px;
}

.swatches input[type="color"] { width: 52px; }

.outline-palette {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.12rem;
  overflow-x: auto;
  padding-bottom: 2px;
}

.two-line-palette {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0.22rem;
  width: 100%;
  overflow: visible;
  padding-bottom: 0;
}

.palette-swatch-group {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0.22rem;
  width: 100%;
  grid-column: 1 / -1;
}

.color-pair-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  align-items: start;
}

.color-control-block {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.color-control-block label {
  margin: 0;
}

.full-width-color-block {
  width: 100%;
}

.pro-style-color-control:not(.sports-background-panel),
.outline-control-row .color-control-block {
  padding: 0.5rem 0.6rem;
  border: 2px solid #2ea86b;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.pro-style-color-control:not(.sports-background-panel) > label,
.outline-control-row .color-control-block > label {
  display: block;
  margin-bottom: 0.2rem;
}

.outline-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
  align-items: end;
  margin-bottom: 0.4rem;
}

.range-control-block {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.outline-swatch {
  width: 28px;
  height: 14px;
  min-width: 28px;
  padding: 0;
  border-radius: 1px;
  border: 1px solid #6b7280;
  cursor: pointer;
  position: relative;
}

.two-line-palette .outline-swatch,
.two-line-palette .palette-picker-wrap {
  width: 100%;
  min-width: 0;
}

.outline-swatch.is-selected {
  outline: 2px solid var(--theme-primary);
  outline-offset: 1px;
}

.no-outline-swatch {
  background: #ffffff;
}

.no-outline-swatch::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: 50%;
  height: 2px;
  background: #dc2626;
  transform: translateY(-50%) rotate(-28deg);
  transform-origin: center;
}

.outline-palette .palette-picker {
  width: 16px;
  height: 14px;
  min-width: 16px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid #6b7280;
  border-radius: 1px;
  background: #ffffff;
}

.palette-picker-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  min-width: 0;
}

.two-line-palette .palette-picker-wrap {
  width: 120px;
  height: 32px;
  border-radius: 14px;
  border: 2px solid #5fa8d3;
  background: linear-gradient(90deg, #ff4d4d 0%, #ff9f1c 18%, #ffe66d 34%, #4cd964 50%, #45b7ff 68%, #7b61ff 84%, #ff4fd8 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.92) inset;
  overflow: hidden;
  justify-self: start;
  grid-column: 1 / 3;
  align-self: start;
}

.two-line-palette .palette-picker {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.palette-picker-wrap .palette-picker {
  position: relative;
  z-index: 1;
}

.pro-style-color-control .outline-palette {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.pro-style-color-control .palette-picker-wrap {
  width: 58px;
  min-width: 58px;
  height: 24px;
  border: 2px solid #5fa8d3;
  border-radius: 6px;
  background: linear-gradient(90deg, #ff4d4d 0%, #ff9f1c 18%, #ffe66d 34%, #4cd964 50%, #45b7ff 68%, #7b61ff 84%, #ff4fd8 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.92) inset;
  overflow: hidden;
}

.pro-style-color-control .palette-picker-wrap .palette-picker {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  border: 0;
  border-radius: 4px;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.pro-style-color-control .palette-picker-wrap .palette-picker-hint {
  left: 6px;
  right: 6px;
  height: 3px;
  border-radius: 999px;
  background: #5b6679;
}

.pro-style-color-control .used-colors-inline {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.2rem;
  padding-left: 0.28rem;
  border-left: 1px solid #cbd5e1;
  overflow-x: auto;
  scrollbar-width: thin;
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
}

.pro-style-color-control .used-color-swatch {
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  border-radius: 3px;
}

.two-line-palette .palette-picker-wrap .palette-picker-hint {
  left: 12px;
  right: 12px;
  height: 4px;
  border-radius: 999px;
  background: rgba(44, 62, 91, 0.7);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.background-swatch {
  width: 28px !important;
  min-width: 28px;
  height: 14px !important;
  padding: 0;
  border-radius: 1px;
  border: 1px solid #6b7280;
  background: linear-gradient(90deg, #000000 0%, #ef4444 12%, #f97316 24%, #facc15 36%, #84cc16 48%, #14b8a6 60%, #1d4ed8 72%, #7c3aed 84%, #ec4899 100%);
}

.background-swatch {
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
  background-image: linear-gradient(90deg, #000000 0%, #ef4444 12%, #f97316 24%, #facc15 36%, #84cc16 48%, #14b8a6 60%, #1d4ed8 72%, #7c3aed 84%, #ec4899 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.background-swatch::-webkit-color-swatch-wrapper {
  padding: 0;
}

.background-swatch::-webkit-color-swatch {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.background-swatch::-moz-color-swatch {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.rainbow-picker-button {
  cursor: pointer;
  border-color: #6b7280;
  box-shadow: 0 0 0 1px #ffffff inset;
}

.rainbow-picker-input {
  position: absolute;
  inset: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.used-colors-inline {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.2rem;
  padding-left: 0.32rem;
  border-left: 1px solid #cbd5e1;
  overflow-x: auto;
  scrollbar-width: thin;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(100%, 240px);
}

.used-color-swatch {
  width: 28px;
  height: 14px;
  min-width: 28px;
  padding: 0;
  border-radius: 1px;
  border: 1px solid #6b7280;
  cursor: pointer;
}

.used-color-swatch.is-selected {
  outline: 2px solid var(--theme-primary);
  outline-offset: 1px;
}

.used-color-swatch:focus-visible {
  outline: 2px solid var(--theme-primary);
  outline-offset: 1px;
}

.palette-picker-hint {
  position: absolute;
  left: 4px;
  width: 8px;
  top: 50%;
  height: 2px;
  background: #4b5563;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
}

.manual-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr) 84px minmax(104px, 0.9fr);
  gap: 0.35rem;
  align-items: center;
}

.manual-add input,
.manual-add select,
.manual-add button {
  width: 100%;
  min-width: 0;
}

.manual-add button {
  white-space: nowrap;
}

.name-case-control {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr);
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.55rem;
}

.name-case-control label {
  margin: 0;
}

.name-case-control select {
  min-width: 0;
}

.name-case-hint {
  grid-column: 1 / -1;
  line-height: 1.35;
}

#addManualPlayerBtn {
  font-size: 0.92rem;
  color: #ffffff;
  background: linear-gradient(180deg, #189246 0%, #0d5f2b 100%);
}

#downloadRosterCsvBtn {
  font-size: 0.92rem;
  color: #ffffff;
  background: linear-gradient(180deg, #189246 0%, #0d5f2b 100%);
}

.roster-list {
  max-height: 260px;
  overflow: auto;
  display: grid;
  gap: 0.3rem;
}

.roster-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid #b9c9de;
  border-radius: 8px;
  padding: 0.35rem 0.45rem;
  background: #fff;
  cursor: default;
}

.roster-fields {
  display: grid;
  gap: 0.3rem;
}

.roster-fields input {
  width: 100%;
  border: 1px solid rgba(20, 130, 59, 0.34);
  border-radius: 8px;
  padding: 0.35rem 0.45rem;
  font: inherit;
  font-size: 0.86rem;
  background: #ffffff;
}

.roster-row.active {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 1px #1d4ed8 inset;
}

.roster-name { font-weight: 700; }
.roster-meta { font-size: 0.82rem; opacity: 0.85; }

.preview {
  display: grid;
  gap: 0.6rem;
  justify-items: stretch;
  position: sticky;
  top: 1rem;
  align-self: start;
  height: fit-content;
}

.preview-title-box {
  width: min(420px, 100%);
  margin: 0 auto;
  padding: 0.65rem 0.95rem;
  border-radius: 14px;
  border: 0;
  background: linear-gradient(180deg, #189246 0%, #0d5f2b 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -8px 14px rgba(0, 0, 0, 0.12),
    0 14px 24px var(--theme-shadow);
  cursor: pointer;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
}

.preview-title-box:hover,
.preview-title-box:focus-visible {
  filter: brightness(1.03);
}

.preview-title-box:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
}

.preview-main-group {
  position: relative;
  width: 100%;
  gap: 0.65rem;
  padding: 0.7rem;
}

.preview-main-group.feature-finder-open {
  display: grid;
  grid-template-columns: minmax(240px, var(--feature-finder-drawer-width)) minmax(0, 1fr);
  grid-template-areas:
    "finder title"
    "finder canvas"
    "finder help";
  align-items: start;
  column-gap: var(--feature-finder-drawer-gap);
  row-gap: 0.7rem;
}

.preview-main-group.feature-finder-open > .feature-finder-panel {
  grid-area: finder;
  align-self: stretch;
  height: 100%;
}

.preview-main-group.feature-finder-open > .preview-title-box {
  grid-area: title;
  width: 100%;
  margin: 0;
}

.preview-main-group.feature-finder-open > #previewCanvas {
  grid-area: canvas;
  width: 100%;
}

.preview-main-group.feature-finder-open > .preview-help-row {
  grid-area: help;
  width: 100%;
  margin: 0;
}

#previewCanvas {
  cursor: grab;
  width: 100%;
  height: auto;
  max-height: 82vh;
  border-radius: 18px;
  border: 0;
  background: #ffffff;
}

.preview-print-note {
  margin: -0.15rem auto 0.15rem;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
}

.preview-contact-note {
  margin: 0.1rem auto 0;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.preview-contact-note a {
  color: var(--theme-primary-dark);
  text-decoration: none;
}

.preview-contact-note a:hover,
.preview-contact-note a:focus-visible {
  text-decoration: underline;
}

.sheet-preview-title {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #189246 0%, #0d5f2b 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -8px 14px rgba(0, 0, 0, 0.12),
    0 12px 20px var(--theme-shadow);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  text-align: center;
}

#sheetPreviewCanvas {
  width: 100%;
  height: auto;
  max-height: 58vh;
  border-radius: 12px;
  border: 3px solid var(--theme-primary);
  background: #dbe3ef;
}

.sheet-preview-group {
  gap: 0.55rem;
}

.hint { margin: 0; font-size: 0.78rem; color: #4B5563; }

.section-divider {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, rgba(142, 163, 191, 0), rgba(142, 163, 191, 0.85), rgba(142, 163, 191, 0));
  margin: 0.25rem 0 0.35rem;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.outline-toggle-row {
  align-items: end;
  margin-top: 0.28rem;
  margin-bottom: 0.28rem;
  gap: 0.9rem;
  padding: 0.18rem 0;
}

.inline-outline-amount {
  flex: 1 1 220px;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 0.55rem;
}

.inline-outline-amount label {
  margin: 0;
  white-space: nowrap;
}

.outline-toggle {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.extra-text-section {
  display: grid;
  gap: 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.65);
}

.extra-text-section .hint {
  color: #4B5563;
}

.extra-text-card {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.6rem;
  display: grid;
  gap: 0.45rem;
  background: rgba(248, 250, 252, 0.9);
}

.extra-text-card.outline-collapsed > :not(.outline-keep) {
  display: none !important;
}

.extra-text-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-weight: 700;
}

.delete-text-btn {
  margin-top: 0.2rem;
  background: #ffffff;
  color: #dc2626;
  border: 1px solid #ef4444;
  padding: 0.38rem 0.58rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
}

.delete-text-btn:hover {
  filter: none;
  background: #fee2e2;
}

.close-outline-btn {
  margin-top: 0.2rem;
  background: #ffffff;
  color: #052E2B;
  border: 1px solid #94a3b8;
  padding: 0.38rem 0.58rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
}

.close-outline-btn:hover {
  filter: none;
  background: #f8fafc;
}

.close-panel-btn {
  margin-top: 0.35rem;
  border: 2px solid var(--theme-primary-dark);
  background: linear-gradient(180deg, #189246 0%, #0d5f2b 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.42rem 0.5rem;
  line-height: 1.15;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.42);
}

@media (max-width: 1200px) {
  .app {
    grid-template-columns: 1fr;
  }
  .preview {
    position: static;
    top: auto;
  }
  .panel.left,
  .panel.right {
    max-height: none;
  }
  .preview-main-group.feature-finder-open {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "finder"
      "canvas"
      "help";
  }
  .preview-main-group.feature-finder-open > .feature-finder-panel {
    height: auto;
    max-height: min(320px, 42vh);
  }
  #previewCanvas { max-height: 55vh; }
}

.preview-help-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  width: min(560px, 100%);
  margin: 0.25rem auto 0.15rem;
}

.instructions-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 0.72rem 1rem;
  border-radius: 12px;
  border: 2px solid var(--theme-primary-dark);
  background: linear-gradient(180deg, #189246 0%, #0d5f2b 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -8px 14px rgba(0, 0, 0, 0.12),
    0 12px 20px var(--theme-shadow);
  color: #ffffff;
  text-decoration: none;
  text-align: center;
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.25;
}

.instructions-btn {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.42);
}

.delete-text-btn,
.close-outline-btn,
.outline-swatch,
.used-color-swatch {
  text-shadow: none;
}

.troubleshooting-btn {
  background: linear-gradient(180deg, #189246 0%, #0d5f2b 100%);
  color: #ffffff;
}

.instructions-btn:hover,
.instructions-btn:focus-visible {
  filter: brightness(1.06);
  outline: 2px solid #052E2B;
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .preview-help-row {
    grid-template-columns: 1fr;
  }
}

.flat-theme-active .brand-banner,
.flat-theme-active .output-group label[for="pdfSetup"],
.flat-theme-active #downloadBtn:not(.export-mode),
.flat-theme-active #addExtraTextBtn,
.flat-theme-active #downloadTaglineYesBtn,
.flat-theme-active #downloadTaglineNoBtn,
.flat-theme-active #addManualPlayerBtn,
.flat-theme-active #downloadRosterCsvBtn,
.flat-theme-active #resetThemeBtn,
.flat-theme-active .preview-title-box,
.flat-theme-active .sheet-preview-title,
.flat-theme-active .instructions-btn,
.flat-theme-active .troubleshooting-btn {
  background: #14823b;
  box-shadow: none;
}

.flat-theme-active .brand-banner,
.flat-theme-active .preview-title-box,
.flat-theme-active .sheet-preview-title,
.flat-theme-active .instructions-btn,
.flat-theme-active .troubleshooting-btn,
.flat-theme-active .output-group label[for="pdfSetup"],
.flat-theme-active #downloadBtn:not(.export-mode) {
  border-color: var(--theme-primary-dark);
}

.metallic-theme-active .brand-banner,
.metallic-theme-active .output-group label[for="pdfSetup"],
.metallic-theme-active #downloadBtn:not(.export-mode),
.metallic-theme-active #addExtraTextBtn,
.metallic-theme-active #downloadTaglineYesBtn,
.metallic-theme-active #downloadTaglineNoBtn,
.metallic-theme-active #addManualPlayerBtn,
.metallic-theme-active #downloadRosterCsvBtn,
.metallic-theme-active #resetThemeBtn,
.metallic-theme-active .preview-title-box,
.metallic-theme-active .sheet-preview-title,
.metallic-theme-active .instructions-btn,
.metallic-theme-active .troubleshooting-btn {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.12) 16%, rgba(255, 255, 255, 0) 18%),
    linear-gradient(90deg, color-mix(in srgb, var(--theme-primary-dark) 78%, black 22%) 0%, color-mix(in srgb, var(--theme-primary-soft) 62%, white 38%) 22%, color-mix(in srgb, var(--theme-primary-soft) 88%, white 12%) 34%, var(--theme-primary) 54%, color-mix(in srgb, var(--theme-primary-dark) 74%, black 26%) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -8px 14px rgba(0, 0, 0, 0.16),
    0 12px 22px var(--theme-shadow);
}

.matte-theme-active .brand-banner,
.matte-theme-active .output-group label[for="pdfSetup"],
.matte-theme-active #downloadBtn:not(.export-mode),
.matte-theme-active #addExtraTextBtn,
.matte-theme-active #downloadTaglineYesBtn,
.matte-theme-active #downloadTaglineNoBtn,
.matte-theme-active #addManualPlayerBtn,
.matte-theme-active #downloadRosterCsvBtn,
.matte-theme-active #resetThemeBtn,
.matte-theme-active .preview-title-box,
.matte-theme-active .sheet-preview-title,
.matte-theme-active .instructions-btn,
.matte-theme-active .troubleshooting-btn {
  background: linear-gradient(180deg, color-mix(in srgb, var(--theme-primary) 94%, black 6%) 0%, color-mix(in srgb, var(--theme-primary-dark) 82%, black 18%) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 8px 14px color-mix(in srgb, var(--theme-shadow) 78%, transparent 22%);
}

.suggested-border-colors {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.suggested-border-colors[hidden] {
  display: none !important;
}

.suggested-border-colors-title {
  margin: 0;
  color: var(--theme-primary-dark);
  font-weight: 800;
}

.suggested-border-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.suggested-border-swatch {
  width: 34px;
  height: 18px;
  min-width: 34px;
}
