.copyshape-app {
  --cs-bg: hsl(240 10% 4%);
  --cs-fg: hsl(0 0% 96%);
  --cs-card: hsl(240 8% 8%);
  --cs-muted: hsl(240 5% 65%);
  --cs-border: hsl(240 7% 18%);
  --cs-input: hsl(240 7% 20%);
  --cs-primary: hsl(274 88% 68%);
  --cs-primary-strong: hsl(310 72% 58%);
  --cs-surface: hsl(240 7% 13%);
  --cs-success: hsl(145 65% 48%);
  --cs-danger: hsl(0 72% 58%);
  --cs-gradient-primary: linear-gradient(135deg, hsl(258 90% 66%), hsl(330 81% 60%), hsl(38 92% 50%));
  --cs-gradient-hero: radial-gradient(circle at 50% 0%, hsl(274 88% 68% / 0.14), transparent 62%);
  --cs-shadow-glow: 0 0 44px hsl(310 72% 55% / 0.25);
  --cs-shadow-card: 0 24px 80px hsl(240 20% 2% / 0.38);
  position: relative;
  isolation: isolate;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  background: var(--cs-bg);
  color: var(--cs-fg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  border-radius: 28px;
  line-height: 1.5;
}

.copyshape-app *,
.copyshape-app *::before,
.copyshape-app *::after {
  box-sizing: border-box;
}

.copyshape-app button,
.copyshape-app textarea,
.copyshape-app select {
  font: inherit;
}

.copyshape-hero-glow {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto 0;
  height: 430px;
  background: var(--cs-gradient-hero);
  pointer-events: none;
}

.copyshape-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 64px;
}

.copyshape-header {
  max-width: 860px;
  margin: 0 auto 40px;
  text-align: center;
}

.copyshape-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 25px;
}

.copyshape-logo {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--cs-gradient-primary);
  box-shadow: var(--cs-shadow-glow);
}

.copyshape-logo svg,
.copyshape-empty-icon svg,
.copyshape-button-icon svg,
.copyshape-copy-button svg,
.copyshape-select-icon svg {
  width: 18px;
  height: 18px;
}

.copyshape-wordmark {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.copyshape-wordmark span {
  color: var(--cs-primary);
}

.copyshape-header h1 {
  max-width: 780px;
  margin: 0 auto;
  color: var(--cs-fg);
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.055em;
  font-weight: 760;
}

.copyshape-header p {
  max-width: 680px;
  margin: 18px auto 0;
  color: var(--cs-muted);
  font-size: 16px;
  line-height: 1.72;
}

.copyshape-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}

.copyshape-card,
.copyshape-empty,
.copyshape-loading {
  border: 1px solid hsl(240 7% 18% / 0.72);
  background: hsl(240 8% 8% / 0.66);
  box-shadow: var(--cs-shadow-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.copyshape-card {
  border-radius: 28px;
  padding: 28px;
}

.copyshape-section-head,
.copyshape-results-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.copyshape-kicker {
  display: block;
  color: var(--cs-muted);
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 800;
}

.copyshape-section-head h2,
.copyshape-results-head h2 {
  margin: 5px 0 0;
  color: var(--cs-fg);
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 720;
}

.copyshape-counter,
.copyshape-result-badge {
  flex: 0 0 auto;
  border: 1px solid hsl(240 7% 18% / 0.7);
  border-radius: 999px;
  background: var(--cs-surface);
  padding: 6px 10px;
  color: var(--cs-muted);
  font-size: 11px;
  line-height: 1;
}

.copyshape-result-badge {
  color: var(--cs-primary);
  border-color: hsl(274 88% 68% / 0.24);
  background: hsl(274 88% 68% / 0.09);
  font-weight: 700;
}

.copyshape-field + .copyshape-field,
.copyshape-field + .copyshape-select-grid,
.copyshape-select-grid + .copyshape-primary-button {
  margin-top: 19px;
}

.copyshape-field label {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--cs-fg);
  font-size: 13px;
  font-weight: 650;
}

.copyshape-field textarea,
.copyshape-field select {
  width: 100%;
  border: 1px solid var(--cs-input);
  outline: none;
  background: hsl(240 7% 10% / 0.92);
  color: var(--cs-fg);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.copyshape-field textarea {
  display: block;
  min-height: 270px;
  resize: vertical;
  border-radius: 16px;
  padding: 16px;
  line-height: 1.62;
}

.copyshape-field textarea::placeholder {
  color: hsl(240 5% 49%);
}

.copyshape-field textarea:focus,
.copyshape-field select:focus {
  border-color: hsl(274 88% 68% / 0.72);
  box-shadow: 0 0 0 3px hsl(274 88% 68% / 0.12);
}

.copyshape-select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.copyshape-select-wrap {
  position: relative;
}

.copyshape-field select {
  min-height: 46px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 14px;
  padding: 0 42px 0 14px;
  cursor: pointer;
}

.copyshape-select-icon {
  position: absolute;
  top: 50%;
  right: 13px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  color: var(--cs-muted);
  pointer-events: none;
}

.copyshape-select-icon svg {
  width: 16px;
  height: 16px;
}

.copyshape-primary-button {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 15px;
  background: var(--cs-gradient-primary);
  color: hsl(0 0% 100%);
  box-shadow: var(--cs-shadow-glow);
  font-size: 14px;
  font-weight: 780;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, opacity 160ms ease;
}

.copyshape-primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.copyshape-primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.copyshape-button-icon {
  display: inline-grid;
  place-items: center;
}

.copyshape-spin {
  animation: copyshape-spin 0.8s linear infinite;
}

.copyshape-results {
  min-height: 570px;
}

.copyshape-empty,
.copyshape-loading {
  display: flex;
  min-height: 570px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-style: dashed;
  border-radius: 28px;
  padding: 34px;
  text-align: center;
  box-shadow: none;
}

.copyshape-empty-icon,
.copyshape-loading-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 16px;
  background: var(--cs-surface);
  color: var(--cs-primary);
}

.copyshape-empty h2,
.copyshape-loading h2 {
  margin: 0;
  color: var(--cs-fg);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.copyshape-empty p,
.copyshape-loading p {
  max-width: 390px;
  margin: 9px auto 0;
  color: var(--cs-muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.copyshape-result-card {
  border: 1px solid hsl(240 7% 18% / 0.72);
  border-radius: 19px;
  background: hsl(240 8% 8% / 0.7);
  padding: 18px;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.copyshape-result-card:hover {
  border-color: hsl(274 88% 68% / 0.42);
  background: hsl(240 8% 9% / 0.86);
}

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

.copyshape-result-label {
  color: var(--cs-muted);
  font-size: 10px;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-weight: 800;
}

.copyshape-result-hint {
  display: block;
  margin-top: 3px;
  color: hsl(240 5% 51%);
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: normal;
  text-transform: none;
  font-weight: 500;
}

.copyshape-copy-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  border: 1px solid hsl(240 7% 18% / 0.72);
  border-radius: 10px;
  background: var(--cs-surface);
  color: var(--cs-muted);
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.copyshape-copy-button:hover {
  border-color: hsl(274 88% 68% / 0.4);
  color: var(--cs-fg);
}

.copyshape-copy-button.is-copied {
  color: var(--cs-success);
}

.copyshape-copy-button svg {
  width: 14px;
  height: 14px;
}

.copyshape-result-value {
  margin: 0;
  color: var(--cs-fg);
  font-size: 13px;
  line-height: 1.67;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.copyshape-toast-region {
  position: fixed;
  z-index: 999999;
  top: 20px;
  left: 50%;
  display: grid;
  width: min(420px, calc(100% - 30px));
  gap: 10px;
  transform: translateX(-50%);
  pointer-events: none;
}

.copyshape-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--cs-border);
  border-radius: 13px;
  background: hsl(240 8% 9% / 0.96);
  color: var(--cs-fg);
  box-shadow: 0 18px 55px hsl(240 20% 2% / 0.46);
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.45;
  animation: copyshape-toast-in 180ms ease both;
}

.copyshape-toast::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--cs-primary);
  box-shadow: 0 0 14px currentColor;
}

.copyshape-toast.is-error::before {
  background: var(--cs-danger);
}

.copyshape-toast.is-success::before {
  background: var(--cs-success);
}

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

@keyframes copyshape-toast-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 860px) {
  .copyshape-shell {
    width: min(100% - 24px, 720px);
    padding: 42px 0 46px;
  }

  .copyshape-header {
    margin-bottom: 30px;
  }

  .copyshape-workspace {
    grid-template-columns: 1fr;
  }

  .copyshape-results,
  .copyshape-empty,
  .copyshape-loading {
    min-height: 440px;
  }
}

@media (max-width: 560px) {
  .copyshape-app {
    border-radius: 20px;
  }

  .copyshape-shell {
    width: min(100% - 20px, 520px);
    padding: 32px 0 34px;
  }

  .copyshape-header h1 {
    font-size: clamp(31px, 10vw, 44px);
  }

  .copyshape-header p {
    font-size: 14px;
  }

  .copyshape-card {
    border-radius: 22px;
    padding: 18px;
  }

  .copyshape-section-head,
  .copyshape-results-head {
    align-items: flex-start;
  }

  .copyshape-select-grid {
    grid-template-columns: 1fr;
  }

  .copyshape-field + .copyshape-field,
  .copyshape-field + .copyshape-select-grid,
  .copyshape-select-grid + .copyshape-primary-button {
    margin-top: 15px;
  }

  .copyshape-field textarea {
    min-height: 235px;
  }

  .copyshape-empty,
  .copyshape-loading {
    min-height: 360px;
    border-radius: 22px;
    padding: 26px 18px;
  }

  .copyshape-result-card {
    border-radius: 16px;
    padding: 15px;
  }
}
