.lgcc-wrap {
  --lgcc-ink: #15171a;
  --lgcc-muted: #667085;
  --lgcc-line: #e7e9ee;
  --lgcc-soft: #f7f8fa;
  --lgcc-blue: #0047e9;
  --lgcc-blue-dark: #0734a5;
  --lgcc-green: #0f766e;
  --lgcc-danger: #b42318;
  box-sizing: border-box;
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 40px 0px;
  color: var(--lgcc-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.lgcc-wrap *,
.lgcc-wrap *::before,
.lgcc-wrap *::after {
  box-sizing: border-box;
}

.lgcc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 18px;
  margin-bottom: 18px;
}

.lgcc-card {
  border: 1px solid var(--lgcc-line);
  border-radius: 8px;
  background: #fff;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.04);
}

.lgcc-section-head {
  margin-bottom: 18px;
}

.lgcc-section-head h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: 0;
}

.lgcc-section-head p {
  margin: 7px 0 0;
  color: var(--lgcc-muted);
  font-size: 14px;
  line-height: 1.55;
}

.lgcc-file-drop {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 24px;
  border: 1.5px dashed #c9ced8;
  border-radius: 8px;
  background: var(--lgcc-soft);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.lgcc-file-drop:hover,
.lgcc-file-drop:focus-within,
.lgcc-file-drop.is-dragging {
  border-color: var(--lgcc-blue);
  background: #f5f8ff;
  transform: translateY(-1px);
}

.lgcc-file-drop.is-dragging {
  box-shadow: 0 0 0 4px rgba(0, 71, 233, 0.12);
}

.lgcc-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.lgcc-file-icon {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: var(--lgcc-ink);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.lgcc-file-main {
  display: block;
  color: var(--lgcc-ink);
  font-size: 18px;
  font-weight: 700;
}

.lgcc-file-sub {
  display: block;
  max-width: 420px;
  margin-top: 8px;
  color: var(--lgcc-muted);
  font-size: 14px;
  line-height: 1.5;
}

.lgcc-file-rules {
  display: grid;
  gap: 6px;
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--lgcc-muted);
  font-size: 13px;
}

.lgcc-message,
.lgcc-notice {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f3f6fb;
  color: #28405f;
  font-size: 14px;
  line-height: 1.5;
}

.lgcc-message.is-error {
  background: #fff4f2;
  color: var(--lgcc-danger);
}

.lgcc-preview-box {
  display: grid;
  place-items: center;
  min-height: 240px;
  border: 1px solid var(--lgcc-line);
  border-radius: 8px;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #f0f1f4 25%, transparent 25%),
    linear-gradient(-45deg, #f0f1f4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f0f1f4 75%),
    linear-gradient(-45deg, transparent 75%, #f0f1f4 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  color: #7a8494;
  overflow: hidden;
}

.lgcc-preview-box img {
  max-width: min(220px, 85%);
  max-height: 220px;
  image-rendering: auto;
}

.lgcc-palette,
.lgcc-options,
.lgcc-result {
  margin-bottom: 18px;
}

.lgcc-palette-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lgcc-palette-swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--lgcc-line);
  border-radius: 8px;
  background: #fff;
  color: var(--lgcc-ink);
  cursor: pointer;
  font: inherit;
}

.lgcc-palette-swatch span {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background: var(--lgcc-swatch);
}

.lgcc-palette-swatch strong {
  font-size: 12px;
  letter-spacing: 0;
}

.lgcc-palette-swatch.is-active,
.lgcc-palette-swatch[aria-pressed="true"] {
  border-color: var(--lgcc-blue);
  box-shadow: 0 0 0 3px rgba(0, 71, 233, 0.14);
}

.lgcc-palette-transparent,
.lgcc-muted {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--lgcc-soft);
  color: var(--lgcc-muted);
  font-size: 13px;
}

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

.lgcc-color-picker label,
.lgcc-range label,
.lgcc-mode-group legend {
  display: block;
  margin-bottom: 8px;
  color: var(--lgcc-ink);
  font-size: 14px;
  font-weight: 700;
}

.lgcc-color-picker input[type="text"],
.lgcc-color-row input[type="text"] {
  width: 100%;
  height: 44px;
  border: 1px solid #ccd2dc;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--lgcc-ink);
  font: inherit;
  text-transform: uppercase;
}

.lgcc-color-picker {
  position: relative;
}

.lgcc-color-chip {
  position: absolute;
  right: 12px;
  bottom: 11px;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 999px;
}

.lgcc-color-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
}

.lgcc-color-row input[type="color"] {
  width: 56px;
  height: 44px;
  border: 1px solid #ccd2dc;
  border-radius: 8px;
  padding: 4px;
  background: #fff;
}

.lgcc-mode-group {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}

.lgcc-mode-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--lgcc-line);
  border-radius: 8px;
  background: #fff;
}

.lgcc-mode-option strong,
.lgcc-mode-option em {
  display: block;
}

.lgcc-mode-option strong {
  font-size: 14px;
}

.lgcc-mode-option em {
  margin-top: 4px;
  color: var(--lgcc-muted) !important;
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
}

.lgcc-range {
  margin-top: 20px;
}

.lgcc-range-label {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.lgcc-range input[type="range"] {
  width: 100%;
  accent-color: var(--lgcc-blue);
}

.lgcc-range p {
  margin: 8px 0 0;
  color: var(--lgcc-muted);
  font-size: 13px;
  line-height: 1.5;
}

.lgcc-help {
  position: relative;
  display: inline-flex;
}

.lgcc-help-button {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 999px;
  background: #aaa;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  padding: 0 !important;
  position: relative;
  top: -3px;
}

.lgcc-help-button:hover,
.lgcc-help-button[aria-expanded="true"] {
  border-color: transparent;
  background-color: var(--e-global-color-accent);
  color: #fff;
}

.lgcc-help-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 48px));
  padding: 14px 16px;
  border: 1px solid #d7dce6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.14);
  color: var(--lgcc-ink);
}

.lgcc-help-panel::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 9px;
  width: 12px;
  height: 12px;
  border-top: 1px solid #d7dce6;
  border-left: 1px solid #d7dce6;
  background: #fff;
  transform: rotate(45deg);
}

.lgcc-help-panel p {
  margin: 0 0 10px;
  color: var(--lgcc-ink);
  font-size: 13px;
  line-height: 1.55;
}

.lgcc-help-panel ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: var(--lgcc-muted);
  font-size: 13px;
  line-height: 1.55;
}

.lgcc-turnstile {
  margin-top: 20px;
}

.lgcc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.lgcc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid #cfd5df;
  border-radius: 8px;
  background: #fff;
  color: var(--lgcc-ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.lgcc-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
}

.lgcc-button-primary {
  border-color: var(--lgcc-blue);
  background: var(--lgcc-blue);
  color: #fff;
}

.lgcc-button-dark {
  border-color: var(--lgcc-ink);
  background: var(--lgcc-ink);
  color: #fff;
}

.lgcc-button:disabled {
  border-color: #d8dde6;
  background: #eef1f5;
  color: #98a2b3;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

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

.lgcc-preview-label {
  display: block;
  margin-bottom: 8px;
  color: var(--lgcc-ink);
  font-size: 14px;
  font-weight: 700;
}

.lgcc-download {
  margin-top: 16px;
}

.lgcc-wrap button:focus-visible,
.lgcc-wrap a:focus-visible,
.lgcc-wrap input:focus-visible {
  outline: 3px solid rgba(0, 71, 233, 0.35);
  outline-offset: 2px;
}

@media (max-width: 820px) {
  .lgcc-wrap {
    padding: 34px 16px;
  }

  .lgcc-grid,
  .lgcc-options-grid,
  .lgcc-compare,
  .lgcc-card {
    padding: 18px;
  }
}

@media (max-width: 520px) {
  .lgcc-file-drop {
    min-height: 180px;
  }

  .lgcc-preview-box {
    min-height: 190px;
  }

  .lgcc-help {
    position: static;
  }

  .lgcc-help-panel {
    left: 16px;
    right: 16px;
    width: auto;
  }

  .lgcc-button,
  .lgcc-actions {
    width: 100%;
  }

  .lgcc-button {
    min-width: 0;
  }
}
