:root {
  --ink: #071630;
  --ink-soft: #42516a;
  --teal: #007763;
  --teal-bright: #008f7a;
  --teal-dark: #005f50;
  --teal-soft: #e9f8f5;
  --white: #ffffff;
  --gray-25: #fbfcfd;
  --gray-50: #f6f8fa;
  --gray-100: #edf1f5;
  --gray-200: #d8e0e8;
  --gray-300: #bcc8d4;
  --danger: #c53b4a;
  --shadow-sm: 0 1px 2px rgb(7 22 48 / 4%);
  --shadow-md: 0 10px 30px rgb(7 22 48 / 8%);
  --radius-sm: 8px;
  --radius-md: 12px;
  --content-max: 1480px;
  font-family: Inter, "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--white);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--white);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
label {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible,
.drop-zone:focus-visible,
.drop-zone:focus-within,
.logo-select-label:focus-visible,
.brand:focus-visible {
  outline: 3px solid var(--teal-dark);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 clamp(24px, 4vw, 60px);
  border-bottom: 1px solid var(--gray-200);
  background: rgb(255 255 255 / 96%);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  fill: var(--ink);
}

.brand-mark-accent {
  fill: var(--teal-bright);
}

.privacy-label {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.privacy-label-short,
.step-label-short {
  display: none;
}

.header-utilities {
  display: flex;
  gap: 24px;
  align-items: center;
}

.guide-shortcut {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: color 150ms ease;
}

.guide-shortcut:hover {
  color: var(--teal);
}

.guide-shortcut svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.privacy-label svg,
footer svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

main {
  min-height: calc(100vh - 126px);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.9fr);
  max-width: var(--content-max);
  margin: 0 auto;
  border-right: 1px solid var(--gray-200);
  border-left: 1px solid var(--gray-200);
}

.upload-pane,
.summary-pane {
  min-width: 0;
  padding: 40px clamp(34px, 4vw, 58px);
}

.upload-pane {
  border-right: 1px solid var(--gray-200);
}

.intro-copy h1,
.summary-pane h2,
.results-header h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
  letter-spacing: -0.025em;
}

.intro-copy h1 {
  font-size: clamp(25px, 2.25vw, 36px);
  line-height: 1.35;
}

.intro-copy h1 .title-nowrap {
  white-space: nowrap;
}

.intro-copy p {
  max-width: 660px;
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.8;
}

.steps {
  display: flex;
  align-items: center;
  margin: 24px 0 20px;
  padding: 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  list-style: none;
}

.steps li {
  display: flex;
  flex: 1;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

.steps li:not(:last-child)::after {
  width: 100%;
  height: 1px;
  margin: 0 10px;
  background: var(--gray-300);
  content: "";
}

.steps .step-number {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--gray-300);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink-soft);
  font-size: 12px;
}

.steps .is-active {
  color: var(--teal);
}

.steps .is-active .step-number,
.steps .is-complete .step-number {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--white);
}

.steps .is-complete::after {
  background: var(--teal);
}

.drop-zone {
  position: relative;
  display: flex;
  min-height: 170px;
  padding: 28px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed #83a5b5;
  border-radius: var(--radius-md);
  background: var(--gray-25);
  cursor: pointer;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.drop-zone.is-dragging {
  transform: translateY(-2px);
}

.drop-zone.has-file {
  border-color: var(--teal);
  border-style: solid;
  background: var(--white);
}

.drop-zone.has-error {
  border-color: var(--danger);
  background: #fff8f8;
}

.file-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 10px;
  place-items: center;
  color: var(--teal);
}

.file-icon svg,
.summary-empty-icon svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.drop-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drop-caption {
  margin-top: 7px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 650;
}

.drop-hint {
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 12px;
}

.direct-input-panel {
  margin-top: 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--gray-25);
}

.direct-input-panel > summary {
  padding: 12px 14px;
  color: var(--teal-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 720;
}

.direct-input-body {
  display: grid;
  padding: 0 14px 14px;
  gap: 8px;
}

.direct-input-body > label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.direct-input-body textarea {
  width: 100%;
  min-height: 118px;
  padding: 11px 12px;
  resize: vertical;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
}

.direct-input-body textarea:focus-visible {
  border-color: var(--teal);
  outline: 3px solid var(--teal-dark);
  outline-offset: 2px;
}

.direct-input-actions,
.my-preset-transfer-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.direct-input-body > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

.resume-job-row {
  display: flex;
  min-height: 48px;
  margin-top: 10px;
  padding: 8px 10px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.resume-job-label {
  flex: 0 0 auto;
  min-width: 0;
}

.resume-job-row > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

.review-controls {
  display: grid;
  gap: 0;
}

.text-action-button {
  display: inline-flex;
  min-height: 36px;
  padding: 0 4px;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--teal-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.text-action-button:hover:not(:disabled) {
  color: var(--teal);
}

.text-action-button[aria-disabled="true"],
.text-action-button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.input-review {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #a7d4ca;
  border-radius: var(--radius-md);
  background: #f7fffd;
}

.input-review-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.input-review-heading h2 {
  margin: 0;
  font-size: 15px;
}

.input-review-heading p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

.input-review-badge {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--teal);
  color: var(--white);
  font-size: 12px;
  font-weight: 720;
}

.input-review-list {
  display: grid;
  margin: 12px 0 0;
  padding: 0;
  gap: 6px;
  list-style: none;
}

.input-review-list li {
  display: grid;
  min-width: 0;
  padding: 8px 10px;
  grid-template-columns: minmax(90px, .65fr) minmax(0, 2fr);
  gap: 10px;
  border: 1px solid var(--gray-200);
  border-radius: 7px;
  background: var(--white);
  font-size: 12px;
}

.input-review-list strong,
.input-review-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.input-review-list span {
  color: var(--ink-soft);
}

.input-review-more {
  margin-top: 8px;
}

.input-review-more > summary {
  color: var(--teal-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.input-issue-chips {
  display: flex;
  margin: 10px 0 0;
  padding: 0;
  gap: 7px;
  flex-wrap: wrap;
  list-style: none;
}

.input-issue-chips li {
  display: inline-flex;
  min-height: 28px;
  padding: 4px 9px;
  align-items: center;
  border: 1px solid #e5b850;
  border-radius: 999px;
  background: #fff8dd;
  color: #7a4b00;
  font-size: 11px;
  font-weight: 720;
}

.input-issue-chips .is-ready {
  border-color: #8fcbbf;
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.input-issue-chips .is-error {
  border-color: #e6b0b6;
  background: #fff0f1;
  color: #a52d3a;
}

.input-issue-chips .is-muted {
  border-color: var(--gray-300);
  background: var(--gray-50);
  color: var(--ink-soft);
}

.input-review-actions {
  display: flex;
  margin-top: 12px;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.output-settings {
  min-width: 0;
  margin: 16px 0 0;
  padding: 0;
  border: 0;
}

.output-settings legend {
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 720;
}

.output-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.output-settings-primary {
  grid-template-columns: minmax(220px, 1fr);
}

.setting-field {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 680;
}

.select-wrap {
  position: relative;
  display: block;
}

.select-wrap select {
  width: 100%;
  height: 42px;
  padding: 0 38px 0 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  appearance: none;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.select-wrap select:hover:not(:disabled) {
  border-color: #83a5b5;
}

.select-wrap select:focus-visible {
  border-color: var(--teal);
  outline: 3px solid var(--teal-dark);
  outline-offset: 2px;
  box-shadow: none;
}

.select-wrap select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.select-wrap svg {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 18px;
  height: 18px;
  pointer-events: none;
  fill: none;
  stroke: var(--ink-soft);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transform: translateY(-50%);
}

.output-setting-note {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.advanced-output-settings {
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--gray-25);
}

.advanced-output-settings > summary {
  display: flex;
  min-height: 44px;
  padding: 9px 12px;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: var(--teal-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
}

.advanced-output-settings > summary small {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 560;
}

.advanced-output-settings[open] > summary {
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
}

.advanced-output-settings-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 12px;
}

.workload-note {
  margin: 8px 0 0;
  padding: 9px 10px;
  border-radius: 7px;
  background: #fff7e6;
  color: #7a4600;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.55;
}

.customize-menu {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.customize-menu > summary {
  display: flex;
  min-height: 52px;
  padding: 9px 13px;
  gap: 11px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.customize-menu > summary::-webkit-details-marker {
  display: none;
}

.customize-menu > summary:hover {
  background: #f8fbfc;
}

.customize-menu > summary:focus-visible {
  outline: 3px solid var(--teal-dark);
  outline-offset: -3px;
}

.customize-menu[open] > summary {
  border-bottom: 1px solid var(--gray-200);
  background: #f8fbfc;
}

.customize-summary-icon {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.customize-summary-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.customize-summary-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.customize-summary-copy strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 720;
}

.customize-summary-copy small {
  color: var(--ink-soft);
  font-size: 12px;
}

.customize-chevron {
  width: 18px;
  height: 18px;
  margin-left: auto;
  fill: none;
  stroke: var(--ink-soft);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 160ms ease;
}

.customize-menu[open] .customize-chevron {
  transform: rotate(180deg);
}

.customize-body {
  padding: 14px;
}

.customize-preview-layout {
  min-width: 0;
}

.customize-settings-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  min-width: 0;
  gap: 13px;
  align-items: start;
}

.customize-settings-stack > .customize-section,
.customize-settings-stack > .color-input-grid,
.customize-settings-stack > .transparent-background-option,
.customize-settings-stack > #color-contrast-note {
  grid-column: 1;
}

.customize-settings-stack > .customize-divider,
.customize-settings-stack > .logo-section,
.customize-settings-stack > .my-presets-section,
.customize-settings-stack > .reset-customization-button {
  grid-column: 1 / -1;
}

.customize-section,
.logo-section {
  display: grid;
  gap: 9px;
}

.customize-label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 720;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.theme-button {
  display: grid;
  min-height: 48px;
  padding: 7px 8px;
  gap: 4px;
  place-items: center;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 680;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.theme-button:hover:not(:disabled),
.theme-button.is-active {
  border-color: var(--teal);
  background: #f7fffd;
}

.theme-button.is-active {
  box-shadow: 0 0 0 2px rgb(0 143 122 / 12%);
  color: var(--teal-dark);
}

.theme-button:focus-visible,
.remove-logo-button:focus-visible {
  outline: 2px solid var(--teal-dark);
  outline-offset: 2px;
}

.theme-swatches {
  display: flex;
}

.theme-swatches i {
  display: block;
  width: 22px;
  height: 22px;
  border: 1px solid rgb(7 22 48 / 15%);
  border-radius: 50%;
  background: var(--swatch);
}

.theme-swatches i + i {
  margin-left: -4px;
}

.theme-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.color-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.color-field {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 680;
}

.color-control {
  display: flex;
  height: 42px;
  padding: 5px 10px 5px 6px;
  gap: 9px;
  align-items: center;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.color-control:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgb(0 143 122 / 14%);
}

.color-control input[type="color"] {
  width: 32px;
  height: 30px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}

.color-control output {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: .03em;
  text-overflow: ellipsis;
}

.transparent-background-option {
  display: flex;
  min-width: 0;
  padding: 9px 10px;
  gap: 9px;
  align-items: flex-start;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}

.transparent-background-option input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: var(--teal);
}

.transparent-background-option > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.transparent-background-option strong {
  font-size: 12px;
  font-weight: 720;
}

.transparent-background-option small {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.transparent-background-option:has(input:checked) {
  border-color: var(--teal);
  background: #f7fffd;
  box-shadow: 0 0 0 2px rgb(0 143 122 / 12%);
}

.transparent-background-option:has(input:focus-visible) {
  outline: 2px solid var(--teal-dark);
  outline-offset: 2px;
}

.customize-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

.customize-note.is-safe {
  color: var(--teal-dark);
}

.customize-note.is-warning {
  color: #9a5a00;
}

.customize-note.is-error {
  color: #b42318;
  font-weight: 680;
}

.customize-divider {
  height: 1px;
  background: var(--gray-200);
}

.logo-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, .7fr);
  gap: 14px;
  align-items: end;
}

.logo-heading > div > p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.logo-actions {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: center;
}

.button-compact {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  font-size: 12px;
}

.logo-preview {
  display: flex;
  min-width: 0;
  gap: 7px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 12px;
}

.logo-preview img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border: 1px solid var(--gray-300);
  border-radius: 7px;
  background: var(--white);
}

.logo-preview span {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remove-logo-button {
  flex: 0 0 auto;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: #9a3b32;
  cursor: pointer;
  font-size: 12px;
  font-weight: 680;
}

.reset-customization-button {
  justify-self: start;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--teal-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.reset-customization-button:focus-visible {
  outline: 2px solid var(--teal-dark);
  outline-offset: 2px;
}

.appearance-preview-panel {
  display: grid;
  grid-column: 2;
  grid-row: 1 / span 4;
  min-width: 0;
  padding: 12px;
  gap: 9px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--gray-25);
}

.appearance-preview-heading {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.appearance-preview-heading > span:last-child {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.appearance-preview-frame {
  position: relative;
  display: grid;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.appearance-preview-frame.is-transparent {
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #e5e9ee 25%, transparent 25%),
    linear-gradient(-45deg, #e5e9ee 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e9ee 75%),
    linear-gradient(-45deg, transparent 75%, #e5e9ee 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.appearance-preview-frame.surface-light {
  background-color: #ffffff;
}

.appearance-preview-frame.surface-dark {
  background-color: #263445;
  background-image: none;
}

.appearance-preview-frame.surface-checker {
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #dfe5eb 25%, transparent 25%),
    linear-gradient(-45deg, #dfe5eb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dfe5eb 75%),
    linear-gradient(-45deg, transparent 75%, #dfe5eb 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.appearance-preview-frame.is-invalid {
  border-color: #e6b0b6;
  background: #fff8f8;
}

.appearance-preview-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.appearance-preview-placeholder {
  max-width: 130px;
  padding: 12px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.55;
  text-align: center;
}

.appearance-preview-panel .customize-note {
  text-align: center;
}

.preview-surface-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.preview-surface-button {
  min-height: 32px;
  padding: 0 4px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 11px;
  font-weight: 680;
}

.preview-surface-button.is-active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.my-presets-section {
  display: grid;
  min-width: 0;
  gap: 9px;
}

.my-presets-heading h2 {
  margin: 0;
}

.my-presets-heading p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.my-preset-save-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.my-preset-save-row input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-size: 12px;
  outline: 0;
}

.my-preset-save-row input:focus-visible {
  border-color: var(--teal);
  outline: 2px solid var(--teal-dark);
  outline-offset: 2px;
  box-shadow: none;
}

.my-preset-save-row input::placeholder {
  color: var(--ink-soft);
}

.my-preset-list {
  display: grid;
  gap: 6px;
}

.my-preset-empty {
  margin: 0;
  padding: 9px 10px;
  border-radius: 7px;
  background: var(--gray-50);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.my-preset-item {
  display: grid;
  min-width: 0;
  padding: 7px 8px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
}

.my-preset-item.is-default {
  border-color: #8fcbbf;
  background: #f7fffd;
}

.my-preset-default-badge {
  margin-left: 6px;
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 720;
}

.my-preset-colors {
  display: flex;
}

.my-preset-colors i {
  display: block;
  width: 18px;
  height: 18px;
  border: 1px solid rgb(7 22 48 / 15%);
  border-radius: 50%;
  background: var(--swatch);
}

.my-preset-colors i.is-transparent {
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #d8dde3 25%, transparent 25%),
    linear-gradient(-45deg, #d8dde3 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d8dde3 75%),
    linear-gradient(-45deg, transparent 75%, #d8dde3 75%);
  background-position: 0 0, 0 4px, 4px -4px, -4px 0;
  background-size: 8px 8px;
}

.my-preset-colors i + i {
  margin-left: -4px;
}

.my-preset-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.my-preset-copy strong,
.my-preset-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-preset-copy strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.my-preset-copy small {
  color: var(--ink-soft);
  font-size: 11px;
}

.my-preset-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  flex-wrap: wrap;
  max-width: 240px;
}

.my-preset-actions button {
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--gray-300);
  border-radius: 7px;
  background: var(--white);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.my-preset-actions .apply-my-preset-button {
  border-color: #8fcbbf;
  color: var(--teal-dark);
}

.my-preset-actions .delete-my-preset-button {
  border-color: transparent;
  color: #9a3b32;
}

.my-preset-actions .default-my-preset-button[aria-pressed="true"] {
  border-color: #e5b850;
  background: #fff8dd;
  color: #7a4b00;
}

.my-preset-actions button:hover:not(:disabled) {
  background: var(--gray-50);
}

.my-preset-actions button:focus-visible {
  outline: 2px solid var(--teal-dark);
  outline-offset: 2px;
}

.theme-button:disabled,
.color-control:has(input:disabled),
.button-compact[aria-disabled="true"],
.remove-logo-button:disabled,
.reset-customization-button:disabled,
.my-preset-save-row input:disabled,
.transparent-background-option:has(input:disabled),
.my-preset-actions button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.logo-select-label[aria-disabled="true"] {
  pointer-events: none;
}

.upload-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 18px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  padding: 0 22px;
  gap: 10px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 720;
  letter-spacing: 0.01em;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.button.button-compact {
  min-height: 38px;
  padding: 0 13px;
  font-size: 11px;
}

.button-primary {
  min-width: 260px;
  border-color: var(--teal);
  background: var(--teal);
  color: var(--white);
}

.button-primary:hover:not(:disabled) {
  border-color: #007965;
  background: #007965;
}

.button-secondary {
  border-color: var(--gray-300);
  background: var(--white);
  color: var(--ink);
}

.button-secondary:hover:not(:disabled) {
  border-color: var(--teal);
  color: var(--teal);
}

.button-wide {
  width: 100%;
}

.summary-pane h2 {
  font-size: 18px;
}

.summary-empty {
  display: flex;
  min-height: 320px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  text-align: center;
}

.summary-empty-icon {
  margin-bottom: 16px;
  color: var(--gray-300);
}

.summary-empty strong {
  color: var(--ink);
  font-size: 16px;
}

.summary-empty p,
.success-message p,
.zip-note {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.summary-content {
  margin-top: 28px;
}

.success-message {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--gray-200);
}

.success-icon {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
}

.success-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.success-message strong {
  display: block;
  font-size: clamp(17px, 1.8vw, 23px);
  letter-spacing: -0.02em;
}

.metrics {
  margin: 0 0 22px;
}

.metrics > div {
  display: flex;
  min-height: 51px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-200);
}

.metrics dt {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.metrics dt svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.metrics dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.progress-wrap {
  margin: -2px 0 20px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

progress {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--gray-100);
}

progress::-webkit-progress-bar {
  border-radius: 999px;
  background: var(--gray-100);
}

progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--teal);
}

progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--teal);
}

.zip-note {
  text-align: center;
}

.results-section {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 34px clamp(28px, 4vw, 58px) 44px;
  border: 1px solid var(--gray-200);
  border-bottom: 0;
}

.results-header {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
}

#results-title {
  width: fit-content;
}

#results-title:focus {
  outline: none;
}

#results-title:focus-visible {
  border-radius: 4px;
  outline: 3px solid var(--teal-dark);
  outline-offset: 4px;
}

.results-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.result-selection-bar {
  display: grid;
  margin: -6px 0 18px;
  padding: 12px 14px;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 18px;
  align-items: center;
  border: 1px solid #a7d4ca;
  border-radius: var(--radius-md);
  background: #f7fffd;
}

.result-selection-summary,
.result-select-all,
.result-selection-actions {
  display: flex;
  align-items: center;
}

.result-selection-summary {
  gap: 12px;
  white-space: nowrap;
}

.result-select-all {
  min-height: 38px;
  gap: 8px;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.result-select-all input,
.result-select input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--teal);
}

.result-select-all:has(input:focus-visible),
.result-select:has(input:focus-visible) {
  outline: 2px solid var(--teal-dark);
  outline-offset: 3px;
}

#selected-result-count {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 720;
}

.result-selection-actions {
  min-width: 0;
  gap: 7px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.result-selection-bar:not(.has-selection) .selection-dependent {
  display: none;
}

.result-more-actions {
  position: relative;
}

.result-more-actions > summary {
  display: inline-flex;
  min-height: 38px;
  padding: 0 12px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
  list-style: none;
}

.result-more-actions > summary::-webkit-details-marker {
  display: none;
}

.result-more-actions > summary::after {
  margin-left: 7px;
  color: var(--gray-500);
  content: "⌄";
  font-size: 14px;
}

.result-more-actions > summary:hover,
.result-more-actions[open] > summary {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.result-more-actions > summary:focus-visible {
  outline: 2px solid var(--teal-dark);
  outline-offset: 3px;
}

.result-more-actions > div {
  position: absolute;
  z-index: 20;
  top: calc(100% + 7px);
  right: 0;
  display: grid;
  width: max-content;
  min-width: 210px;
  padding: 8px;
  gap: 4px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 14px 34px rgb(7 22 48 / 14%);
}

.result-more-actions > div .text-action-button {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  justify-content: flex-start;
  text-align: left;
}

.result-selection-actions .button-primary {
  min-width: 0;
}

.results-header h2 {
  font-size: 22px;
}

.results-header p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.search-field {
  display: flex;
  width: min(340px, 45vw);
  height: 44px;
  padding: 0 13px;
  gap: 9px;
  align-items: center;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.generation-failures {
  margin: -8px 0 18px;
  padding: 11px 13px;
  border: 1px solid #e6b0b6;
  border-radius: var(--radius-sm);
  background: #fff8f8;
  color: #8f2934;
}

.generation-failures > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 720;
}

.generation-failures ul {
  display: grid;
  margin: 10px 0 0;
  padding: 0 0 0 20px;
  gap: 6px;
  font-size: 12px;
  line-height: 1.55;
}

.search-field:focus-within {
  border-color: var(--teal);
  outline: 3px solid var(--teal-dark);
  outline-offset: 2px;
  box-shadow: none;
}

.search-field svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: #66758b;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.search-field input {
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

.search-field input::placeholder {
  color: var(--ink-soft);
}

.table-head,
.result-row {
  display: grid;
  grid-template-columns: 44px 54px minmax(120px, 0.7fr) minmax(220px, 1.9fr) 100px minmax(150px, 0.85fr) 170px;
  align-items: center;
}

.table-head {
  min-height: 42px;
  padding: 0 16px;
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-25);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 720;
}

.result-row {
  position: relative;
  min-height: 80px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--gray-200);
  transition: background 140ms ease;
}

.result-row:hover {
  background: var(--teal-soft);
}

.result-select-heading label {
  cursor: pointer;
}

.result-select {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.result-index {
  color: var(--ink-soft);
  font-size: 12px;
}

.result-code {
  overflow: hidden;
  padding-right: 16px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-url {
  overflow: hidden;
  padding-right: 20px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qr-preview {
  width: 58px;
  height: 58px;
  padding: 4px;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  background: var(--white);
}

.qr-preview.is-transparent {
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #e5e9ee 25%, transparent 25%),
    linear-gradient(-45deg, #e5e9ee 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e9ee 75%),
    linear-gradient(-45deg, transparent 75%, #e5e9ee 75%);
  background-position: 0 0, 0 4px, 4px -4px, -4px 0;
  background-size: 8px 8px;
}

.qr-preview img {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.download-one {
  display: inline-flex;
  width: max-content;
  padding: 9px 10px;
  gap: 8px;
  align-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--teal);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.result-download {
  display: flex;
  align-items: center;
}

.result-verification {
  display: flex;
  width: auto;
  max-width: calc(100% - 8px);
  padding: 5px 8px;
  gap: 2px;
  align-items: flex-start;
  flex-direction: column;
  border-radius: 9px;
  background: var(--gray-100);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.result-verification small {
  font-size: 11px;
  font-weight: 560;
  line-height: 1.35;
}

.result-verification.is-pass {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.result-verification.is-fail {
  background: #fff0f1;
  color: #a52d3a;
}

.download-one:hover {
  background: rgb(0 143 122 / 8%);
}

.download-one svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.no-results {
  padding: 54px 24px;
  color: var(--ink-soft);
  text-align: center;
}

.no-results strong {
  color: var(--ink);
}

.no-results p {
  margin: 6px 0 0;
  font-size: 12px;
}

.pagination {
  display: flex;
  gap: 13px;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.page-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--gray-300);
  border-radius: 7px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}

.page-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.page-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.mobile-download {
  display: none;
}

footer {
  display: flex;
  min-height: 62px;
  padding: 14px 24px;
  gap: 9px;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  max-width: min(390px, calc(100vw - 48px));
  padding: 13px 17px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.workspace-dialog {
  width: min(1120px, calc(100vw - 40px));
  max-width: 1120px;
  max-height: min(88dvh, 860px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 24px 70px rgb(7 22 48 / 22%);
}

.workspace-dialog::backdrop {
  background: rgb(7 22 48 / 55%);
  backdrop-filter: blur(3px);
}

.workspace-dialog-shell {
  display: grid;
  max-height: min(88dvh, 860px);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.workspace-dialog-header,
.workspace-dialog-footer {
  position: sticky;
  z-index: 2;
  display: flex;
  padding: 18px 22px;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  background: rgb(255 255 255 / 98%);
}

.workspace-dialog-header {
  top: 0;
  border-bottom: 1px solid var(--gray-200);
}

.workspace-dialog-footer {
  bottom: 0;
  border-top: 1px solid var(--gray-200);
}

.workspace-dialog-header h2,
.workspace-dialog-header p,
.dialog-section-heading h3,
.dialog-section-heading p {
  margin: 0;
}

.workspace-dialog-header h2 {
  font-size: 21px;
  letter-spacing: -0.02em;
}

.workspace-dialog-header p,
.dialog-section-heading p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

.dialog-close-button {
  min-width: 64px;
  min-height: 44px;
  padding: 0 14px;
  flex: 0 0 auto;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.dialog-close-button:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.workspace-dialog-body {
  min-width: 0;
  padding: 20px 22px 24px;
  overflow: auto;
  overscroll-behavior: contain;
}

.workspace-dialog-section {
  min-width: 0;
}

.workspace-dialog-section + .workspace-dialog-section,
.utm-tools {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
}

.dialog-section-heading {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
}

.dialog-section-heading h3 {
  font-size: 16px;
}

.workspace-mapping-grid {
  display: grid;
  margin-top: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.first-row-header-option {
  width: fit-content;
  margin-top: 14px;
}

.workspace-field {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 680;
}

.workspace-field input,
.workspace-field select,
.workspace-search-field input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
  outline: 0;
}

.workspace-field input:focus-visible,
.workspace-field select:focus-visible,
.workspace-search-field input:focus-visible {
  border-color: var(--teal);
  outline: 3px solid var(--teal-dark);
  outline-offset: 2px;
}

.workspace-list-heading {
  align-items: center;
}

.workspace-filter-controls {
  display: flex;
  min-width: min(100%, 420px);
  gap: 10px;
  align-items: center;
}

.workspace-search-field {
  display: block;
  min-width: 0;
  flex: 1;
}

.workspace-checkbox {
  display: flex;
  min-height: 44px;
  padding: 0 10px;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 680;
  white-space: nowrap;
}

.workspace-checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--teal);
}

.workspace-checkbox:has(input:focus-visible) {
  outline: 3px solid var(--teal-dark);
  outline-offset: 2px;
}

.input-workspace-list {
  display: grid;
  min-width: 0;
  max-height: 360px;
  margin-top: 14px;
  overflow: auto;
  gap: 7px;
  overscroll-behavior: contain;
}

.input-workspace-row,
.workspace-data-row {
  display: grid;
  min-width: 0;
  padding: 9px;
  grid-template-columns: 88px minmax(120px, .7fr) minmax(240px, 1.7fr) minmax(140px, .8fr) minmax(100px, .55fr);
  gap: 9px;
  align-items: center;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.workspace-data-row > label:not(.workspace-enable),
.input-workspace-row > label:not(.workspace-enable) {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 680;
}

.workspace-enable {
  display: flex;
  min-height: 40px;
  gap: 7px;
  align-items: center;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.workspace-enable input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--teal);
}

.input-workspace-row.is-problem,
.workspace-data-row.is-problem {
  border-color: #e5b850;
  background: #fffdf5;
}

.input-workspace-row input[type="text"],
.input-workspace-row input[type="url"],
.workspace-data-row input[type="text"],
.workspace-data-row input[type="url"] {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0 9px;
  border: 1px solid var(--gray-300);
  border-radius: 7px;
  background: var(--white);
  color: var(--ink);
  font-size: 12px;
}

.workspace-row-status {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 680;
  line-height: 1.4;
}

.workspace-status {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.utm-tools > summary {
  min-height: 44px;
  color: var(--teal-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 720;
}

.utm-tools-body {
  padding-top: 12px;
}

.utm-tools-body > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.utm-input-grid {
  display: grid;
  margin-top: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.utm-preview,
.print-layout-summary {
  display: block;
  min-width: 0;
  margin-top: 12px;
  padding: 11px 12px;
  overflow-wrap: anywhere;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

.utm-actions {
  display: flex;
  margin-top: 10px;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.workspace-dialog-footer {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.workspace-dialog-footer .button-primary {
  min-width: 190px;
}

.print-dialog {
  width: min(560px, calc(100vw - 40px));
  max-width: 560px;
}

.print-dialog-body {
  display: grid;
  gap: 14px;
}

.number-unit-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.number-unit-control input {
  padding-right: 52px;
  grid-column: 1 / -1;
  grid-row: 1;
}

.number-unit-control > span {
  padding-right: 12px;
  grid-column: 2;
  grid-row: 1;
  color: var(--ink-soft);
  font-size: 12px;
  pointer-events: none;
}

.print-code-option {
  justify-self: start;
}

.print-layout-summary {
  margin-top: 0;
}

.print-layout-summary.is-warning {
  border: 1px solid #f1b74f;
  background: #fff7df;
  color: #7a4900;
}

@media (max-width: 1180px) {
  .customize-settings-stack {
    grid-template-columns: 1fr;
  }

  .customize-settings-stack > .customize-section,
  .customize-settings-stack > .color-input-grid,
  .customize-settings-stack > #color-contrast-note,
  .customize-settings-stack > .customize-divider,
  .customize-settings-stack > .logo-section,
  .customize-settings-stack > .my-presets-section,
  .customize-settings-stack > .reset-customization-button,
  .appearance-preview-panel {
    grid-column: 1;
  }

  .appearance-preview-panel {
    grid-row: auto;
    width: min(100%, 260px);
    justify-self: center;
  }
}

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .upload-pane {
    border-right: 0;
    border-bottom: 1px solid var(--gray-200);
  }

  .summary-empty {
    min-height: 220px;
  }

  .table-head,
  .result-row {
    grid-template-columns: 36px 36px minmax(82px, 0.6fr) minmax(140px, 1.4fr) 76px 90px 120px;
  }
}

@media (max-width: 700px) {
  body.has-results {
    padding-bottom: 92px;
  }

  .app-header {
    min-height: 60px;
    padding: 0 18px;
  }

  .brand {
    gap: 9px;
    font-size: 18px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .privacy-label-long {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .privacy-label-short {
    display: inline;
    font-size: 11px;
  }

  .header-utilities {
    gap: 14px;
  }

  .guide-shortcut span {
    font-size: 11px;
  }

  .workspace {
    border: 0;
  }

  .upload-pane,
  .summary-pane {
    padding: 30px 20px;
  }

  .intro-copy h1 {
    font-size: 27px;
    line-height: 1.42;
  }

  .intro-copy p {
    font-size: 14px;
    line-height: 1.75;
  }

  .steps {
    margin: 24px 0 20px;
  }

  .steps li {
    min-width: 0;
    gap: 4px;
    font-size: 0;
  }

  .steps li:not(:last-child)::after {
    flex: 1 1 8px;
    width: auto;
    min-width: 8px;
    margin: 0 6px;
  }

  .steps .step-number {
    font-size: 11px;
  }

  .steps .step-label {
    flex: 0 0 auto;
    min-width: 0;
    font-size: 10px;
  }

  .steps .step-label-long {
    display: none;
  }

  .steps .step-label-short {
    display: inline;
  }

  .drop-zone {
    min-height: 208px;
    padding: 24px 18px;
  }

  .drop-title {
    width: 100%;
    font-size: 14px;
  }

  .resume-job-row {
    padding: 10px;
    align-items: stretch;
    flex-direction: column;
  }

  .resume-job-label {
    width: 100%;
  }

  .resume-job-row > p {
    text-align: center;
  }

  .upload-actions {
    flex-direction: column;
  }

  .output-settings {
    margin-top: 18px;
  }

  .output-settings-grid {
    grid-template-columns: 1fr;
  }

  .advanced-output-settings > summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .color-input-grid,
  .logo-heading {
    grid-template-columns: 1fr;
  }

  .my-preset-save-row {
    grid-template-columns: 1fr;
  }

  .my-preset-save-row .button {
    width: 100%;
  }

  .logo-actions {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .select-wrap select {
    height: 46px;
    font-size: 14px;
  }

  .output-setting-note {
    font-size: 11px;
  }

  .upload-actions .button,
  .button-primary {
    width: 100%;
    min-width: 0;
  }

  .summary-pane h2 {
    font-size: 20px;
  }

  .summary-content {
    margin-top: 22px;
  }

  .success-message {
    align-items: flex-start;
  }

  .success-message strong {
    font-size: 18px;
  }

  .metrics dt {
    flex: 0 0 auto;
  }

  .metrics dd {
    min-width: 0;
    max-width: 56%;
    font-size: 12px;
    text-align: right;
  }

  .results-section {
    padding: 30px 20px 38px;
    border-right: 0;
    border-left: 0;
  }

  .results-header {
    display: block;
  }

  .results-header-actions {
    display: grid;
    margin-top: 18px;
  }

  .result-selection-bar {
    margin-top: -4px;
    padding: 12px;
    grid-template-columns: 1fr;
  }

  .result-selection-summary {
    justify-content: space-between;
    white-space: normal;
  }

  .result-select-all {
    min-height: 44px;
  }

  .result-selection-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .result-selection-actions .button,
  .result-selection-actions .text-action-button {
    width: 100%;
    min-height: 44px;
    min-width: 0;
  }

  .result-selection-actions .text-action-button {
    justify-content: center;
  }

  .result-more-actions {
    grid-column: 1 / -1;
    width: 100%;
  }

  .result-more-actions > summary {
    width: 100%;
    min-height: 44px;
  }

  .result-more-actions > div {
    position: static;
    width: 100%;
    min-width: 0;
    margin-top: 7px;
    box-shadow: none;
  }

  .results-header h2 {
    font-size: 25px;
  }

  .search-field {
    width: 100%;
    height: 48px;
    margin-top: 0;
  }

  .results-table {
    display: block;
  }

  .table-head {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .results-list {
    display: grid;
    gap: 12px;
  }

  .result-row {
    display: grid;
    width: 100%;
    min-width: 0;
    min-height: 148px;
    padding: 16px 58px 16px 16px;
    overflow: hidden;
    grid-template-columns: 30px 82px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 10px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
  }

  .result-index {
    position: absolute;
    top: 6px;
    right: 8px;
    color: var(--ink-soft);
    font-size: 11px;
  }

  .result-select {
    grid-column: 1;
    grid-row: 1 / 4;
    align-self: start;
    padding-top: 4px;
  }

  .qr-preview {
    width: 82px;
    height: 82px;
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
  }

  .result-code {
    min-width: 0;
    padding: 6px 0 0;
    grid-column: 3;
    grid-row: 1;
    align-self: end;
    font-size: 16px;
  }

  .result-url {
    min-width: 0;
    display: -webkit-box;
    overflow: hidden;
    padding: 4px 0 5px;
    grid-column: 3;
    grid-row: 2;
    align-self: start;
    font-size: 11px;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .result-verification {
    grid-column: 3;
    grid-row: 3;
    align-self: start;
    font-size: 11px;
  }

  .direct-input-actions,
  .my-preset-transfer-row {
    align-items: stretch;
    flex-direction: column;
  }

  .direct-input-actions .button,
  .direct-input-actions .text-action-button,
  .my-preset-transfer-row .text-action-button {
    width: 100%;
    justify-content: center;
  }

  .input-review-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .input-review-actions .button,
  .input-review-actions .text-action-button {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .input-review-list li {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .my-preset-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .my-preset-actions {
    grid-column: 1 / -1;
    max-width: none;
    justify-content: flex-start;
  }

  .result-download {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
  }

  .download-one {
    position: static;
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
    transform: none;
  }

  .download-one:hover {
    transform: none;
  }

  .download-one span {
    display: none;
  }

  .download-one svg {
    width: 23px;
    height: 23px;
  }

  .mobile-download {
    position: fixed;
    z-index: 50;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    padding: 12px 20px max(12px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--gray-200);
    background: rgb(255 255 255 / 96%);
    box-shadow: 0 -8px 24px rgb(7 22 48 / 7%);
    backdrop-filter: blur(10px);
  }

  .mobile-download .button {
    min-height: 54px;
  }

  footer {
    font-size: 11px;
  }

  .toast {
    right: 20px;
    bottom: 104px;
    left: 20px;
    max-width: none;
    text-align: center;
  }

  .workspace-dialog,
  .print-dialog {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .workspace-dialog-shell {
    width: 100%;
    height: 100dvh;
    max-height: none;
  }

  .workspace-dialog-header,
  .workspace-dialog-footer {
    padding: 14px 16px;
  }

  .workspace-dialog-header {
    align-items: flex-start;
  }

  .workspace-dialog-header h2 {
    font-size: 19px;
  }

  .workspace-dialog-body {
    padding: 16px;
    overflow-x: hidden;
  }

  .dialog-close-button,
  .workspace-dialog button,
  .workspace-dialog input:not([type="checkbox"]):not([type="radio"]),
  .workspace-dialog select {
    min-height: 44px;
  }

  .workspace-mapping-grid,
  .utm-input-grid {
    grid-template-columns: 1fr;
  }

  .dialog-section-heading,
  .workspace-list-heading,
  .workspace-filter-controls {
    min-width: 0;
    align-items: stretch;
    flex-direction: column;
  }

  .workspace-filter-controls {
    width: 100%;
  }

  .workspace-search-field,
  .workspace-checkbox {
    width: 100%;
  }

  .input-workspace-list {
    max-height: none;
    overflow: visible;
  }

  .input-workspace-row,
  .workspace-data-row {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
  }

  .input-workspace-row > :not(.workspace-enable),
  .workspace-data-row > :not(.workspace-enable) {
    grid-column: 2;
  }

  .workspace-row-select,
  .workspace-enable {
    grid-column: 1;
    grid-row: 1 / span 5;
    align-self: start;
  }

  .workspace-dialog-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .workspace-dialog-footer .button,
  .workspace-dialog-footer .button-primary {
    width: 100%;
    min-width: 0;
  }
}

.print-sheet {
  display: none;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  body.is-printing {
    margin: 0;
    background: #fff;
  }

  body.is-printing > :not(#print-sheet) {
    display: none !important;
  }

  body.is-printing #print-sheet {
    display: block !important;
  }

  .print-page {
    box-sizing: border-box;
    display: grid;
    width: 210mm;
    height: 297mm;
    padding: 12mm;
    grid-template-columns: repeat(var(--print-columns), var(--print-qr-size));
    grid-auto-rows: min-content;
    gap: var(--print-gap-y) var(--print-gap-x);
    align-content: start;
    justify-content: center;
    break-after: page;
    page-break-after: always;
    overflow: hidden;
    background: #fff;
  }

  .print-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .print-item {
    display: flex;
    width: var(--print-qr-size);
    margin: 0;
    align-items: center;
    flex-direction: column;
    break-inside: avoid;
  }

  .print-item img {
    display: block;
    width: var(--print-qr-size);
    height: var(--print-qr-size);
    object-fit: contain;
    background: #fff;
  }

  .print-item figcaption {
    box-sizing: border-box;
    width: 100%;
    min-height: 8mm;
    padding-top: 1.5mm;
    overflow: hidden;
    color: #000;
    font: 8pt/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
