.ict-wrap,
.ict-wrap * {
  box-sizing: border-box;
}

.ict-wrap {
  --ict-brand: #ff5a3c;
  --ict-brand-soft: color-mix(in srgb, var(--ict-brand) 12%, #fff);
  --ict-text: #161616;
  --ict-muted: #666;
  --ict-border: #eee;
  --ict-bg: #fff;
  --ict-soft: #fafafa;
  max-width: 980px;
  margin: 28px auto;
  color: var(--ict-text);
  font-family: inherit;
}

.ict-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  border: 1px solid var(--ict-border);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--ict-brand) 18%, transparent), transparent 34%),
    linear-gradient(135deg, #fff, #fff8f6);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.06);
}

.ict-eyebrow {
  display: inline-flex;
  margin: 0 0 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ict-brand);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ict-hero h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
}

.ict-hero p:last-child {
  margin: 0;
  color: var(--ict-muted);
  font-size: 17px;
  line-height: 1.6;
}

.ict-hero-badge {
  min-width: 130px;
  padding: 18px;
  border-radius: 20px;
  background: #fff;
  text-align: center;
  border: 1px solid var(--ict-border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.ict-hero-badge span,
.ict-hero-badge strong {
  display: block;
}

.ict-hero-badge span {
  color: var(--ict-muted);
  font-size: 13px;
}

.ict-hero-badge strong {
  margin-top: 3px;
  color: var(--ict-brand);
  font-size: 20px;
}

.ict-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 16px 2px 8px;
  scrollbar-width: thin;
}

.ict-tab {
  flex: 0 0 auto;
  border: 1px solid var(--ict-border);
  border-radius: 999px;
  background: #fff;
  color: var(--ict-text);
  padding: 10px 15px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.ict-tab:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--ict-brand) 35%, var(--ict-border));
}

.ict-tab.is-active {
  background: var(--ict-brand);
  border-color: var(--ict-brand);
  color: #fff;
}

.ict-panel {
  margin-top: 14px;
  padding: 26px;
  border: 1px solid var(--ict-border);
  border-radius: 24px;
  background: var(--ict-bg);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.05);
}

.ict-panel[hidden] {
  display: none !important;
}

.ict-panel-head {
  margin-bottom: 20px;
}

.ict-panel-head h3 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.2;
}

.ict-panel-head p {
  margin: 0;
  color: var(--ict-muted);
  line-height: 1.6;
}

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

.ict-field {
  display: grid;
  gap: 8px;
}

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

.ict-field span {
  font-weight: 800;
  font-size: 14px;
}

.ict-field input,
.ict-field textarea,
.ict-field select {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 16px;
  background: #fff;
  color: var(--ict-text);
  padding: 13px 14px;
  font: inherit;
  line-height: 1.4;
  outline: none;
  box-shadow: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.ict-field textarea {
  min-height: 122px;
  resize: vertical;
}

.ict-field input:focus,
.ict-field textarea:focus,
.ict-field select:focus {
  border-color: var(--ict-brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ict-brand) 14%, transparent);
}

.ict-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.ict-generate-btn,
.ict-clear-btn,
.ict-copy-one,
.ict-copy-all {
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease;
}

.ict-generate-btn,
.ict-copy-all {
  background: var(--ict-brand);
  color: #fff;
}

.ict-generate-btn {
  min-width: 150px;
  padding: 13px 22px;
}

.ict-clear-btn,
.ict-copy-one {
  background: var(--ict-soft);
  color: var(--ict-text);
  border: 1px solid var(--ict-border);
}

.ict-clear-btn {
  padding: 13px 20px;
}

.ict-copy-one,
.ict-copy-all {
  padding: 9px 14px;
  font-size: 13px;
}

.ict-generate-btn:hover,
.ict-clear-btn:hover,
.ict-copy-one:hover,
.ict-copy-all:hover {
  transform: translateY(-1px);
}

.ict-generate-btn:disabled {
  cursor: wait;
  opacity: 0.75;
  transform: none;
}

.ict-results {
  margin-top: 22px;
}

.ict-results:empty {
  display: none;
}

.ict-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--ict-brand-soft);
}

.ict-result-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  padding: 16px;
  border: 1px solid var(--ict-border);
  border-radius: 18px;
  background: #fff;
}

.ict-result-card p {
  margin: 0;
  line-height: 1.65;
  white-space: normal;
}

.ict-copy-one.is-copied,
.ict-copy-all.is-copied {
  background: #14a44d;
  color: #fff;
  border-color: #14a44d;
}

.ict-loading {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 24px;
  border-radius: 18px;
  background: var(--ict-soft);
}

.ict-loading span {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin: 0 2px;
  border-radius: 50%;
  background: var(--ict-brand);
  animation: ictPulse 0.9s infinite ease-in-out alternate;
}

.ict-loading span:nth-child(2) {
  animation-delay: 0.15s;
}

.ict-loading span:nth-child(3) {
  animation-delay: 0.3s;
}

.ict-loading p {
  margin: 5px 0 0;
  color: var(--ict-muted);
}

@keyframes ictPulse {
  from { transform: translateY(0); opacity: 0.4; }
  to { transform: translateY(-5px); opacity: 1; }
}

.ict-alert {
  padding: 14px 16px;
  border-radius: 16px;
  line-height: 1.5;
}

.ict-alert-error {
  background: #fff1f1;
  color: #9b1c1c;
  border: 1px solid #ffd7d7;
}

.ict-counter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.ict-counter-grid div,
.ict-limit-box {
  border: 1px solid var(--ict-border);
  border-radius: 18px;
  background: #fff;
  padding: 16px;
}

.ict-counter-grid strong {
  display: block;
  color: var(--ict-brand);
  font-size: 26px;
  line-height: 1;
}

.ict-counter-grid span {
  display: block;
  margin-top: 7px;
  color: var(--ict-muted);
  font-size: 13px;
  font-weight: 700;
}

.ict-limit-box {
  margin-top: 14px;
  background: var(--ict-soft);
}

.ict-limit-box p {
  margin: 0;
  line-height: 1.6;
}

.ict-limit-box p + p {
  margin-top: 6px;
}

@media (max-width: 760px) {
  .ict-wrap {
    margin: 18px auto;
  }

  .ict-hero,
  .ict-panel {
    padding: 20px;
    border-radius: 20px;
  }

  .ict-hero {
    display: block;
  }

  .ict-hero-badge {
    margin-top: 16px;
    width: 100%;
  }

  .ict-form-grid,
  .ict-counter-grid {
    grid-template-columns: 1fr;
  }

  .ict-result-card {
    display: grid;
  }

  .ict-copy-one {
    justify-self: start;
  }
}
