:root {
  --id3d-bg: linear-gradient(145deg, #ffffff 0%, #fff8ef 100%);
  --id3d-panel: #ffffff;
  --id3d-text: #062858;
  --id3d-muted: #5d6675;
  --id3d-accent: #f6931e;
  --id3d-accent-strong: #de7d0c;
  --id3d-border: rgba(246, 147, 30, 0.22);
  --id3d-shadow: 0 18px 45px rgba(6, 40, 88, 0.16);
}

.id3d-widget-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1030;
  width: min(320px, calc(100vw - 32px));
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #f6931e 0%, #e27d0b 100%);
  color: #ffffff;
  box-shadow: var(--id3d-shadow);
  padding: 16px 18px;
  text-align: left;
  display: none;
}

.id3d-widget-launcher.is-visible {
  display: block;
  animation: id3d-slide-up .35s ease-out;
}

.id3d-launcher-title {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.id3d-launcher-copy {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.id3d-widget-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1031;
  width: min(380px, calc(100vw - 32px));
  border-radius: 16px;
  overflow: hidden;
  background: var(--id3d-bg);
  color: var(--id3d-text);
  box-shadow: var(--id3d-shadow);
  border: 1px solid var(--id3d-border);
  display: none;
}

.id3d-widget-panel.is-visible {
  display: block;
  animation: id3d-slide-up .35s ease-out;
}

.id3d-widget-shell {
  padding: 20px;
}

.id3d-widget-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.id3d-widget-tag {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff1df;
  color: var(--id3d-accent-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.id3d-widget-topbar h3 {
  margin: 10px 0 8px;
  font-size: 24px;
  line-height: 1.08;
}

.id3d-widget-topbar p {
  margin: 0;
  color: var(--id3d-muted);
  font-size: 14px;
  line-height: 1.5;
}

.id3d-widget-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(36, 22, 13, 0.08);
  color: var(--id3d-text);
  font-size: 24px;
  line-height: 1;
}

.id3d-widget-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0;
}

.id3d-widget-flow span {
  display: block;
  padding: 10px 6px;
  border-radius: 8px;
  background: #fff8ef;
  border: 1px solid var(--id3d-border);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.id3d-widget-note,
.id3d-page-note {
  margin: 0;
  color: var(--id3d-muted);
  font-size: 14px;
  line-height: 1.55;
}

.id3d-widget-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.id3d-widget-cta,
.id3d-widget-secondary,
.id3d-primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
}

.id3d-widget-cta,
.id3d-primary-link {
  background: #f6931e;
  color: #ffffff;
}

.id3d-widget-secondary {
  background: rgba(255, 255, 255, 0.62);
  color: var(--id3d-text);
  border: 1px solid rgba(96, 61, 30, 0.1);
}

.id3d-page {
  background: #f8f8f8;
  color: var(--id3d-text);
}

.id3d-page-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 42px 20px 70px;
}

.id3d-page-hero {
  padding: 30px;
  border-radius: 12px;
  background: var(--id3d-bg);
  border: 1px solid var(--id3d-border);
  box-shadow: var(--id3d-shadow);
}

.id3d-eyebrow {
  margin: 0 0 10px;
  color: var(--id3d-accent-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.id3d-page-hero h1 {
  margin: 0;
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1;
}

.id3d-page-copy {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--id3d-muted);
  font-size: 18px;
  line-height: 1.6;
}

.id3d-page-badges,
.id3d-flow-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.id3d-page-badges {
  margin-top: 22px;
}

.id3d-page-badges span,
.id3d-flow-inline span {
  padding: 10px 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(96, 61, 30, 0.08);
  font-weight: 700;
}

.id3d-page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.id3d-page-card {
  padding: 28px;
  border-radius: 28px;
  background: #fffdf9;
  border: 1px solid rgba(96, 61, 30, 0.08);
  box-shadow: 0 12px 34px rgba(55, 29, 10, 0.08);
}

.id3d-page-card h2 {
  margin-top: 0;
}

.id3d-phase-list {
  margin: 16px 0 0;
  padding-left: 18px;
}

.id3d-app-grid {
  display: grid;
  grid-template-columns: minmax(0, 820px);
  justify-content: center;
  margin-top: 22px;
}

.id3d-app-card,
.id3d-app-side {
  min-width: 0;
}

.id3d-app-card {
  padding: 30px;
  border-radius: 12px;
  background: #fffdf9;
  border: 1px solid rgba(96, 61, 30, 0.08);
  box-shadow: 0 12px 34px rgba(55, 29, 10, 0.08);
}

.id3d-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.id3d-section-label {
  margin: 0 0 8px;
  color: var(--id3d-accent-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.id3d-card-head h2 {
  margin: 0;
}

.id3d-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.id3d-chip {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 6px;
  background: #fff1df;
  color: var(--id3d-accent-strong);
  font-size: 12px;
  font-weight: 700;
}

.id3d-stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.id3d-step {
  border: 1px solid rgba(96, 61, 30, 0.1);
  background: #fff;
  color: var(--id3d-muted);
  border-radius: 7px;
  padding: 12px 10px;
  font-weight: 700;
  font-size: 13px;
}

.id3d-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 6px;
  border-radius: 999px;
  background: rgba(36, 22, 13, 0.08);
  color: var(--id3d-text);
}

.id3d-step.is-active {
  background: #f6931e;
  color: #ffffff;
  border-color: transparent;
}

.id3d-step.is-active span,
.id3d-step.is-complete span {
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
}

.id3d-step.is-complete {
  border-color: rgba(141, 82, 21, 0.28);
  color: var(--id3d-text);
}

.id3d-status {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 6px;
  font-weight: 600;
}

.id3d-status.is-success {
  background: rgba(39, 122, 72, 0.12);
  border: 1px solid rgba(39, 122, 72, 0.24);
  color: #1b6b3c;
}

.id3d-status.is-error {
  background: rgba(176, 54, 41, 0.1);
  border: 1px solid rgba(176, 54, 41, 0.2);
  color: #962f24;
}

.id3d-step-panel {
  display: none;
}

.id3d-step-panel.is-active {
  display: block;
}

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

.id3d-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.id3d-field span {
  font-weight: 700;
  color: var(--id3d-text);
}

.id3d-field input,
.id3d-field select,
.id3d-field textarea {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(96, 61, 30, 0.14);
  background: rgba(255, 255, 255, 0.88);
  padding: 12px 14px;
  color: var(--id3d-text);
}

.id3d-field textarea {
  min-height: 108px;
  resize: vertical;
}

.id3d-field-full {
  grid-column: 1 / -1;
}

.id3d-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 18px;
  color: var(--id3d-muted);
}

.id3d-consent input {
  margin-top: 4px;
}

.id3d-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.id3d-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
}

.id3d-btn:disabled {
  opacity: 0.75;
}

.id3d-btn-primary {
  background: #f6931e;
  color: #ffffff;
}

.id3d-btn-secondary {
  background: #eef3f9;
  color: var(--id3d-text);
}

.id3d-btn-outline {
  border: 1px solid #062858;
  background: #ffffff;
  color: #062858;
}

.id3d-upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 26px;
  border: 2px dashed rgba(141, 82, 21, 0.3);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(248,239,228,0.9) 100%);
  text-align: center;
  cursor: pointer;
}

.id3d-upload-box input {
  width: 100%;
}

.id3d-upload-title {
  display: block;
  margin-top: 14px;
  font-size: 20px;
  font-weight: 700;
}

.id3d-upload-copy {
  margin-top: 6px;
  color: var(--id3d-muted);
}

.id3d-upload-meta {
  margin-top: 12px;
  color: var(--id3d-muted);
  font-weight: 600;
}

.id3d-result-card {
  padding: 22px;
  border-radius: 10px;
  background: #fffaf4;
  border: 1px solid var(--id3d-border);
}

.id3d-result-card h3 {
  margin-top: 0;
}

.id3d-result-image {
  display: block;
  width: 100%;
  margin: 18px 0 0;
  border-radius: 10px;
  border: 1px solid var(--id3d-border);
  background: #fff;
}

.id3d-result-image[hidden] {
  display: none;
}

.id3d-prompt-preview {
  margin-top: 14px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(36, 22, 13, 0.06);
  color: var(--id3d-text);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.id3d-side-list {
  margin: 0;
  padding-left: 18px;
}

.id3d-side-list li + li {
  margin-top: 8px;
}

@keyframes id3d-slide-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 767px) {
  .id3d-widget-launcher {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
    border-radius: 18px;
  }

  .id3d-widget-panel {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    border-radius: 12px;
  }

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

  .id3d-page-shell {
    padding: 24px 14px 48px;
  }

  .id3d-page-hero,
  .id3d-page-card {
    padding: 22px;
    border-radius: 24px;
  }

  .id3d-page-grid {
    grid-template-columns: 1fr;
  }

  .id3d-app-grid {
    grid-template-columns: 1fr;
  }

  .id3d-app-card {
    padding: 22px;
    border-radius: 24px;
  }

  .id3d-card-head {
    flex-direction: column;
  }

  .id3d-chip-group {
    justify-content: flex-start;
  }

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

  .id3d-form-grid {
    grid-template-columns: 1fr;
  }
}
