/* Local QR Code Generator — responsive UI system */
.lqrg {
  --lqrg-bg: #ffffff;
  --lqrg-surface: #f8fafc;
  --lqrg-surface-strong: #f1f5f9;
  --lqrg-text: #0f172a;
  --lqrg-muted: #64748b;
  --lqrg-muted-2: #94a3b8;
  --lqrg-border: #e2e8f0;
  --lqrg-border-strong: #cbd5e1;
  --lqrg-accent: #2563eb;
  --lqrg-accent-strong: #1d4ed8;
  --lqrg-accent-deep: #1e40af;
  --lqrg-accent-soft: #eff6ff;
  --lqrg-success: #047857;
  --lqrg-success-soft: #ecfdf5;
  --lqrg-warning: #b45309;
  --lqrg-warning-soft: #fffbeb;
  --lqrg-danger: #b91c1c;
  --lqrg-danger-soft: #fef2f2;
  --lqrg-radius-xl: 28px;
  --lqrg-radius-lg: 20px;
  --lqrg-radius-md: 14px;
  --lqrg-radius-sm: 11px;
  --lqrg-shadow-lg: 0 28px 80px rgba(15, 23, 42, .12);
  --lqrg-shadow-md: 0 14px 38px rgba(15, 23, 42, .07);
  --lqrg-shadow-sm: 0 6px 18px rgba(15, 23, 42, .055);
  width: min(100%, 1180px);
  max-width: 1180px;
  margin: clamp(18px, 4vw, 48px) auto;
  color: var(--lqrg-text);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  isolation: isolate;
  container-type: inline-size;
  container-name: lqrg;
}

.lqrg,
.lqrg * {
  box-sizing: border-box;
}

.lqrg button,
.lqrg input,
.lqrg textarea,
.lqrg select {
  max-width: 100%;
  margin: 0;
  font: inherit;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
}

.lqrg button {
  -webkit-tap-highlight-color: transparent;
}

.lqrg svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.lqrg__hero {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: clamp(16px, 2vw, 24px);
  align-items: center;
  padding: clamp(26px, 3.6vw, 38px) clamp(24px, 4vw, 42px);
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .11);
  border-bottom: 0;
  border-radius: var(--lqrg-radius-xl) var(--lqrg-radius-xl) 0 0;
  background:
    radial-gradient(circle at 88% 12%, rgba(96, 165, 250, .34), transparent 28%),
    radial-gradient(circle at 5% 115%, rgba(45, 212, 191, .18), transparent 32%),
    linear-gradient(132deg, #0b1220 0%, #172554 52%, #1d4ed8 116%);
  box-shadow: var(--lqrg-shadow-lg);
}

.lqrg__hero::before,
.lqrg__hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.lqrg__hero::before {
  inset: 0;
  background: linear-gradient(118deg, rgba(255,255,255,.06), transparent 28%, transparent 76%, rgba(255,255,255,.04));
}

.lqrg__hero::after {
  right: -88px;
  top: -128px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(255,255,255,.024), 0 0 0 84px rgba(255,255,255,.015);
}

.lqrg__brandmark,
.lqrg__hero-copy,
.lqrg__privacy-card {
  position: relative;
  z-index: 1;
}

.lqrg__brandmark {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 19px;
  background: rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 14px 30px rgba(0,0,0,.1);
  backdrop-filter: blur(10px);
}

.lqrg__brandmark svg {
  width: 32px;
  height: 32px;
}

.lqrg__eyebrow {
  margin: 0 0 5px;
  color: #bfdbfe;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.lqrg__title {
  margin: 0;
  color: #fff;
  font-size: clamp(29px, 4.3cqw, 43px);
  font-weight: 850;
  letter-spacing: -.04em;
  line-height: 1.04;
  text-wrap: balance;
}

.lqrg__subtitle {
  max-width: 720px;
  margin: 10px 0 0;
  color: #d6e3f4;
  font-size: clamp(13px, 1.5cqw, 15px);
  line-height: 1.65;
  text-wrap: pretty;
}

.lqrg__privacy-card {
  display: flex;
  gap: 11px;
  align-items: center;
  min-width: 154px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 15px;
  background: rgba(255,255,255,.085);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
}

.lqrg__privacy-card strong,
.lqrg__privacy-card span {
  display: block;
}

.lqrg__privacy-card strong {
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.lqrg__privacy-card div > span {
  margin-top: 3px;
  color: #cbd5e1;
  font-size: 10px;
}

.lqrg__privacy-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 5px rgba(52,211,153,.14);
}

.lqrg__tabs-wrap {
  position: relative;
  z-index: 2;
  padding: 14px 18px 0;
  border-right: 1px solid var(--lqrg-border);
  border-left: 1px solid var(--lqrg-border);
  background: rgba(255,255,255,.98);
}

.lqrg__tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 1px 1px 14px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  overscroll-behavior-inline: contain;
}

.lqrg__tabs::-webkit-scrollbar {
  height: 4px;
}

.lqrg__tabs::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}

.lqrg__tab {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  min-height: 42px;
  padding: 9px 13px;
  scroll-snap-align: start;
  border: 1px solid var(--lqrg-border);
  border-radius: 12px;
  background: #fff;
  color: #475569;
  box-shadow: 0 2px 5px rgba(15,23,42,.025);
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.lqrg__tab:hover {
  color: var(--lqrg-accent-strong);
  border-color: #bfdbfe;
  background: #f8fbff;
  box-shadow: 0 6px 14px rgba(37,99,235,.07);
  transform: translateY(-1px);
}

.lqrg__tab.is-active {
  color: var(--lqrg-accent-strong);
  border-color: #93c5fd;
  background: linear-gradient(180deg, #f5f9ff 0%, #eff6ff 100%);
  box-shadow: 0 6px 16px rgba(37,99,235,.09), inset 0 0 0 1px rgba(255,255,255,.7);
}

.lqrg__tab-icon {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
}

.lqrg__tab-icon svg {
  width: 18px;
  height: 18px;
}

.lqrg__workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(350px, .88fr);
  overflow: hidden;
  border: 1px solid var(--lqrg-border);
  border-top: 0;
  border-radius: 0 0 var(--lqrg-radius-xl) var(--lqrg-radius-xl);
  background: var(--lqrg-bg);
  box-shadow: var(--lqrg-shadow-lg);
}

.lqrg__editor {
  min-width: 0;
  padding: clamp(26px, 3.4cqw, 36px);
  border-right: 1px solid var(--lqrg-border);
  background: #fff;
}

.lqrg__preview-panel {
  min-width: 0;
  padding: clamp(20px, 2.6cqw, 28px);
  background:
    radial-gradient(circle at 90% 5%, rgba(219,234,254,.55), transparent 28%),
    linear-gradient(180deg, #f8fafc 0%, #f6f8fb 100%);
}

.lqrg__section-heading,
.lqrg__preview-top,
.lqrg__export-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.lqrg__section-heading > div,
.lqrg__preview-top > div {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.lqrg__section-heading h3,
.lqrg__preview-top h3,
.lqrg__export-heading h3 {
  margin: 0;
  color: var(--lqrg-text);
  font-size: 16px;
  font-weight: 830;
  line-height: 1.22;
}

.lqrg__section-heading p,
.lqrg__preview-top p {
  margin: 4px 0 0;
  color: var(--lqrg-muted);
  font-size: 11px;
  line-height: 1.45;
}

.lqrg__section-heading--compact {
  margin-bottom: 14px;
}

.lqrg__step {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: var(--lqrg-accent-soft);
  color: var(--lqrg-accent-strong);
  box-shadow: inset 0 1px 0 #fff;
  font-size: 12px;
  font-weight: 900;
}

.lqrg__state {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid var(--lqrg-border);
  border-radius: 999px;
  background: #fff;
  color: var(--lqrg-muted);
  box-shadow: 0 2px 6px rgba(15,23,42,.025);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: .02em;
  white-space: nowrap;
}

.lqrg__state.is-ready {
  border-color: #bbf7d0;
  background: var(--lqrg-success-soft);
  color: var(--lqrg-success);
}

.lqrg__pane {
  display: grid;
  gap: 16px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--lqrg-border);
  border-radius: 18px;
  background: linear-gradient(180deg, #fcfdff 0%, #f8fafc 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
  animation: lqrg-fade .18s ease both;
}

.lqrg__field {
  min-width: 0;
}

.lqrg__field > * {
  min-width: 0;
}

.lqrg__label {
  display: flex;
  gap: 5px;
  align-items: baseline;
  min-width: 0;
  margin: 0 0 7px;
  color: #334155;
  font-size: 12px;
  font-weight: 810;
  line-height: 1.3;
}

.lqrg__optional {
  color: var(--lqrg-muted-2);
  font-size: 10px;
  font-weight: 650;
}

.lqrg__input,
.lqrg__textarea,
.lqrg__select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--lqrg-border-strong);
  border-radius: 12px;
  outline: 0;
  background: #fff;
  color: var(--lqrg-text);
  box-shadow: 0 1px 2px rgba(15,23,42,.025), inset 0 1px 0 rgba(255,255,255,.8);
  font-size: 14px;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.lqrg__input:hover,
.lqrg__textarea:hover,
.lqrg__select:hover {
  border-color: #b8c4d4;
}

.lqrg__input::placeholder,
.lqrg__textarea::placeholder {
  color: #9aa9bd;
  opacity: 1;
}

.lqrg__textarea {
  min-height: 116px;
  resize: vertical;
}

.lqrg__select {
  padding-right: 38px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 17px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.lqrg__input:focus,
.lqrg__textarea:focus,
.lqrg__select:focus,
.lqrg__password:focus-within,
.lqrg__input-shell:focus-within {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(37,99,235,.105), 0 1px 2px rgba(15,23,42,.03);
}

.lqrg__select:disabled,
.lqrg__input:disabled {
  cursor: not-allowed;
  border-color: #e2e8f0;
  background-color: #f8fafc;
  color: #94a3b8;
  opacity: 1;
}

.lqrg__input-shell {
  display: flex;
  align-items: center;
  min-height: 46px;
  overflow: hidden;
  border: 1px solid var(--lqrg-border-strong);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,.025);
  transition: border-color .16s ease, box-shadow .16s ease;
}

.lqrg__input-shell > span {
  flex: 0 0 auto;
  padding-left: 13px;
  color: #94a3b8;
  font-size: 14px;
  user-select: none;
}

.lqrg__input--bare {
  min-width: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
}

.lqrg__help {
  display: flex;
  justify-content: flex-end;
  margin: 6px 1px 0;
  color: var(--lqrg-muted-2);
  font-size: 10px;
  line-height: 1.45;
  text-align: right;
}

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

.lqrg__password {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--lqrg-border-strong);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,.025);
  transition: border-color .16s ease, box-shadow .16s ease;
}

.lqrg__password .lqrg__input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.lqrg__password button {
  flex: 0 0 auto;
  padding: 0 13px;
  border: 0;
  border-left: 1px solid var(--lqrg-border);
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.lqrg__password button:hover {
  background: #f1f5f9;
  color: var(--lqrg-accent-strong);
}

.lqrg__check {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  width: fit-content;
  min-height: 32px;
  color: #475569;
  font-size: 12px;
  font-weight: 720;
  cursor: pointer;
}

.lqrg__check input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  accent-color: var(--lqrg-accent);
}

.lqrg__divider {
  height: 1px;
  margin: 28px 0 24px;
  background: linear-gradient(90deg, transparent 0%, var(--lqrg-border) 8%, var(--lqrg-border) 92%, transparent 100%);
}

.lqrg__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.lqrg__options > .lqrg__field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 12px;
  border: 1px solid var(--lqrg-border);
  border-radius: 14px;
  background: #fbfdff;
  box-shadow: inset 0 1px 0 #fff;
  transition: opacity .16s ease, background-color .16s ease, border-color .16s ease;
}

.lqrg__options > .lqrg__field.is-disabled {
  opacity: .64;
  background: #f8fafc;
}

.lqrg__options .lqrg__select,
.lqrg__options .lqrg__color-wrap {
  margin-top: auto;
}

.lqrg__color-wrap {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 46px;
  padding: 6px 9px;
  overflow: hidden;
  border: 1px solid var(--lqrg-border-strong);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,.025);
}

.lqrg__color {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
}

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

.lqrg__color::-webkit-color-swatch {
  border: 0;
  border-radius: 8px;
}

.lqrg__color::-moz-color-swatch {
  border: 0;
  border-radius: 8px;
}

.lqrg__color-wrap span {
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lqrg__quality {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  margin-top: 14px;
  padding: 12px 13px;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  background: linear-gradient(180deg, #f0fdf7 0%, var(--lqrg-success-soft) 100%);
  color: var(--lqrg-success);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.lqrg__quality.is-warning {
  border-color: #fde68a;
  background: var(--lqrg-warning-soft);
  color: var(--lqrg-warning);
}

.lqrg__quality.is-danger {
  border-color: #fecaca;
  background: var(--lqrg-danger-soft);
  color: var(--lqrg-danger);
}

.lqrg__quality-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  box-shadow: 0 4px 10px rgba(16,185,129,.2);
  font-size: 11px;
  font-weight: 900;
}

.lqrg__quality.is-warning .lqrg__quality-icon {
  background: #f59e0b;
  box-shadow: 0 4px 10px rgba(245,158,11,.18);
}

.lqrg__quality.is-danger .lqrg__quality-icon {
  background: #ef4444;
  box-shadow: 0 4px 10px rgba(239,68,68,.18);
}

.lqrg__quality strong,
.lqrg__quality span {
  display: block;
}

.lqrg__quality strong {
  font-size: 11px;
  font-weight: 820;
  line-height: 1.25;
}

.lqrg__quality div > span {
  margin-top: 3px;
  opacity: .8;
  font-size: 9.5px;
  line-height: 1.4;
}

.lqrg__ratio {
  padding: 5px 7px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 8px;
  background: rgba(255,255,255,.74);
  box-shadow: 0 1px 3px rgba(15,23,42,.03);
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.lqrg__preview-card,
.lqrg__export-card {
  border: 1px solid var(--lqrg-border);
  border-radius: var(--lqrg-radius-lg);
  background: rgba(255,255,255,.96);
  box-shadow: var(--lqrg-shadow-sm);
}

.lqrg__preview-card {
  padding: 18px;
}

.lqrg__preview {
  position: relative;
  display: grid;
  min-height: 360px;
  margin-top: 16px;
  padding: 20px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dde6f0;
  border-radius: 17px;
  background:
    linear-gradient(45deg, rgba(241,245,249,.62) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(241,245,249,.62) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(241,245,249,.62) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(241,245,249,.62) 75%),
    #fff;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  background-size: 18px 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.lqrg__preview::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(148,163,184,.12);
  border-radius: 12px;
  pointer-events: none;
}

.lqrg__placeholder {
  position: relative;
  z-index: 1;
  display: grid;
  max-width: 235px;
  padding: 34px 20px;
  place-items: center;
  text-align: center;
}

.lqrg__placeholder svg {
  width: 62px;
  height: 62px;
  margin-bottom: 14px;
  color: #cbd5e1;
}

.lqrg__placeholder strong {
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.lqrg__placeholder span {
  margin-top: 6px;
  color: var(--lqrg-muted-2);
  font-size: 10px;
  line-height: 1.5;
}

.lqrg__canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: min(320px, 100%) !important;
  height: auto !important;
  max-width: 100%;
  border: 10px solid #fff;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15,23,42,.13), 0 0 0 1px rgba(15,23,42,.045);
}

.lqrg__icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--lqrg-border);
  border-radius: 10px;
  background: #fff;
  color: #64748b;
  box-shadow: 0 2px 5px rgba(15,23,42,.03);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease, transform .15s ease;
}

.lqrg__icon-button:hover {
  color: var(--lqrg-accent-strong);
  border-color: #bfdbfe;
  background: var(--lqrg-accent-soft);
  transform: translateY(-1px);
}

.lqrg__icon-button svg {
  width: 17px;
  height: 17px;
}

.lqrg__export-card {
  margin-top: 16px;
  padding: 18px;
}

.lqrg__export-heading {
  margin-bottom: 14px;
}

.lqrg__local-pill {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: var(--lqrg-success-soft);
  color: var(--lqrg-success);
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

.lqrg__local-pill span {
  font-size: 7px;
}

.lqrg__save-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(118px, .42fr);
  gap: 10px;
}

.lqrg__button {
  position: relative;
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 49px;
  margin-top: 12px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, opacity .15s ease;
}

.lqrg__button--primary {
  border-color: #1d4ed8;
  background: linear-gradient(180deg, #2d6bf0 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(37,99,235,.22), inset 0 1px 0 rgba(255,255,255,.18);
}

.lqrg__button--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #2563eb 0%, #1e40af 100%);
  box-shadow: 0 13px 26px rgba(37,99,235,.28), inset 0 1px 0 rgba(255,255,255,.18);
}

.lqrg__button--primary:active:not(:disabled) {
  transform: translateY(0);
}

.lqrg__button:disabled {
  opacity: .46;
  cursor: not-allowed;
  box-shadow: none;
}

.lqrg__button-icon svg {
  width: 18px;
  height: 18px;
}

.lqrg__spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,.42);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lqrg-spin .7s linear infinite;
}

.lqrg__save-note {
  margin: 10px 2px 0;
  color: var(--lqrg-muted-2);
  font-size: 9.5px;
  line-height: 1.55;
}

.lqrg__message {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 11px;
  font-size: 10px;
  font-weight: 720;
  line-height: 1.5;
}

.lqrg__message--error {
  border: 1px solid #fecaca;
  background: var(--lqrg-danger-soft);
  color: var(--lqrg-danger);
}

.lqrg__message--success {
  border: 1px solid #bbf7d0;
  background: var(--lqrg-success-soft);
  color: var(--lqrg-success);
}

.lqrg__footer-note {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  max-width: 760px;
  margin: 14px auto 0;
  padding: 0 14px;
  color: #94a3b8;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.lqrg__footer-note svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

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

.lqrg :focus-visible {
  outline: 3px solid rgba(37,99,235,.22);
  outline-offset: 2px;
}

@keyframes lqrg-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes lqrg-spin {
  to { transform: rotate(360deg); }
}

/* Container queries make the shortcode adapt to its actual WordPress column,
   not only to the browser viewport. */
@container lqrg (max-width: 980px) {
  .lqrg__workspace {
    grid-template-columns: 1fr;
  }

  .lqrg__editor {
    border-right: 0;
    border-bottom: 1px solid var(--lqrg-border);
  }

  .lqrg__preview-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
  }

  .lqrg__export-card {
    margin-top: 0;
  }
}

@container lqrg (max-width: 720px) {
  .lqrg__hero {
    grid-template-columns: 54px minmax(0, 1fr);
    padding: 24px 22px;
    border-radius: 22px 22px 0 0;
  }

  .lqrg__brandmark {
    width: 54px;
    height: 54px;
    border-radius: 16px;
  }

  .lqrg__privacy-card {
    grid-column: 1 / -1;
    width: fit-content;
    min-width: 0;
  }

  .lqrg__workspace {
    border-radius: 0 0 22px 22px;
  }

  .lqrg__editor,
  .lqrg__preview-panel {
    padding: 20px;
  }

  .lqrg__preview-panel {
    grid-template-columns: 1fr;
  }

  .lqrg__section-heading,
  .lqrg__preview-top,
  .lqrg__export-heading {
    align-items: flex-start;
  }

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

  .lqrg__preview {
    min-height: 330px;
  }
}

@container lqrg (max-width: 540px) {
  .lqrg {
    margin-top: 12px;
    margin-bottom: 22px;
  }

  .lqrg__hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 22px 18px;
  }

  .lqrg__brandmark {
    width: 48px;
    height: 48px;
  }

  .lqrg__brandmark svg {
    width: 27px;
    height: 27px;
  }

  .lqrg__title {
    font-size: clamp(27px, 8cqw, 34px);
  }

  .lqrg__subtitle {
    font-size: 13px;
  }

  .lqrg__privacy-card {
    width: 100%;
  }

  .lqrg__tabs-wrap {
    padding-right: 10px;
    padding-left: 10px;
  }

  .lqrg__tab {
    min-height: 40px;
    padding: 8px 11px;
    font-size: 12px;
  }

  .lqrg__editor,
  .lqrg__preview-panel {
    padding: 16px;
  }

  .lqrg__section-heading,
  .lqrg__preview-top,
  .lqrg__export-heading {
    gap: 10px;
    flex-wrap: wrap;
  }

  .lqrg__section-heading > div,
  .lqrg__preview-top > div {
    align-items: flex-start;
  }

  .lqrg__state {
    margin-left: 42px;
  }

  .lqrg__pane {
    margin-top: 16px;
    padding: 14px;
    border-radius: 15px;
  }

  .lqrg__grid-2,
  .lqrg__options,
  .lqrg__save-grid {
    grid-template-columns: 1fr;
  }

  .lqrg__options > .lqrg__field {
    padding: 11px;
  }

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

  .lqrg__ratio {
    grid-column: 2;
    justify-self: start;
  }

  .lqrg__preview-card,
  .lqrg__export-card {
    border-radius: 17px;
  }

  .lqrg__preview-card,
  .lqrg__export-card {
    padding: 15px;
  }

  .lqrg__preview {
    min-height: 285px;
    padding: 14px;
  }

  .lqrg__canvas {
    border-width: 8px;
    border-radius: 14px;
  }

  .lqrg__footer-note {
    align-items: flex-start;
    font-size: 9.5px;
    text-align: left;
  }
}

@container lqrg (max-width: 360px) {
  .lqrg__editor,
  .lqrg__preview-panel {
    padding: 13px;
  }

  .lqrg__pane {
    padding: 12px;
  }

  .lqrg__state {
    width: 100%;
    margin-left: 0;
    text-align: center;
  }

  .lqrg__quality {
    padding: 11px;
  }

  .lqrg__preview {
    min-height: 255px;
  }
}

/* Viewport fallbacks for browsers without container queries. */
@media (max-width: 980px) {
  .lqrg__workspace { grid-template-columns: 1fr; }
  .lqrg__editor { border-right: 0; border-bottom: 1px solid var(--lqrg-border); }
}

@media (max-width: 720px) {
  .lqrg { margin-right: auto; margin-left: auto; }
}

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

@media (forced-colors: active) {
  .lqrg__hero,
  .lqrg__button--primary,
  .lqrg__quality,
  .lqrg__privacy-card,
  .lqrg__local-pill {
    forced-color-adjust: auto;
  }
}
