#right-user-tools-content:has(.cl-panel) {
  overflow: hidden;
}

.cl-panel .rp-body {
  padding-top: 6px;
  padding-bottom: 1rem;
}

.cl-view {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  animation: clViewIn 0.36s cubic-bezier(0.16, 1, 0.3, 1);
}

.cl-style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 0.85rem;
}
.cl-style {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.05rem;
  border-radius: 14px;
  border: 1.5px solid var(--border-color);
  background: var(--white-color);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.cl-style:hover {
  border-color: var(--border-color-hover);
  transform: translateY(-2px);
}
.cl-style--active {
  border-color: var(--primary-color);
  background: linear-gradient(180deg, rgba(var(--primary-color-rgb), 0.06), var(--white-color));
  box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.18);
}
.cl-style-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-color);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.cl-style-sample {
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-color-secondary);
  text-wrap: pretty;
}
.cl-style-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.cl-style-tags span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  background: var(--background-color-alt);
  color: var(--text-color-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cl-field { display: flex; flex-direction: column; gap: 0.45rem; }
.cl-label { font-size: 0.85rem; font-weight: 600; color: var(--text-color); }
.cl-textarea {
  width: 100%;
  min-height: 280px;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--white-color);
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-color);
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cl-textarea::placeholder { color: var(--color-gray-400); }
.cl-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb), 0.16);
}

.cl-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: 0.85rem;
  background: linear-gradient(
    135deg,
    rgba(var(--success-color-rgb, 34, 197, 94), 0.14),
    rgba(var(--primary-color-rgb), 0.12)
  );
  border: 1px solid rgba(var(--success-color-rgb, 34, 197, 94), 0.32);
  color: var(--text-color);
  font-family: "Outfit", sans-serif;
}
.cl-banner-ico {
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--success-color-rgb, 34, 197, 94), 0.22);
  color: var(--success-color, #16a34a);
  border: 1px solid rgba(var(--success-color-rgb, 34, 197, 94), 0.35);
}
.cl-banner-ico i { width: 16px; height: 16px; }
.cl-banner-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  font-size: 0.84rem;
  line-height: 1.4;
}
.cl-banner-text strong {
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-color);
}
.cl-banner-sub {
  font-size: 0.76rem;
  font-weight: 450;
  color: var(--color-gray-600);
  letter-spacing: -0.005em;
}

.cl-letter {
  position: relative;
  background: var(--white-color);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 2.4rem 2.8rem;
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-slate-900);
  box-shadow:
    0 1px 2px var(--shadow-color-subtle),
    0 24px 60px -36px rgba(15, 23, 42, 0.2);
  overflow-wrap: anywhere;
  word-break: break-word;
}
@media (max-width: 640px) {
  .cl-letter { padding: 1.6rem 1.4rem; }
}
.cl-letter p { margin: 0 0 1.05rem; text-wrap: pretty; }
.cl-letter p:last-child { margin-bottom: 0; }
.cl-letter strong { font-weight: 600; }
.cl-copy-icon-btn {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--white-color);
  border: 1px solid var(--border-color);
  color: var(--text-color-muted);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(var(--black-color-rgb), 0.06);
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}
.cl-copy-icon-btn:hover {
  background: var(--background-color-alt);
  color: var(--text-color);
  border-color: var(--border-color-hover);
}
.cl-copy-icon-btn:active { transform: scale(0.94); }
.cl-copy-icon-btn i { width: 16px; height: 16px; }
.cl-copy-icon-btn--done,
.cl-copy-icon-btn--done:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--primary-color-deep);
}

.cl-letter-greeting { font-weight: 500; padding-right: 2.4rem; }
.cl-letter-signoff { margin-top: 1.6rem; font-family: "Outfit", sans-serif; }
.cl-letter-signoff strong { font-weight: 700; font-size: 1.04rem; color: var(--text-color); }

.cl-generating {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  min-height: 100%;
  padding: 2rem 1rem;
  text-align: center;
}
.cl-spinner {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 3px solid rgba(var(--primary-color-rgb), 0.25);
  border-top-color: var(--primary-color-dark);
  animation: clSpin 0.7s linear infinite;
}
.cl-generating-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-color);
}
.cl-generating-sub { font-size: 0.85rem; color: var(--text-color-muted); }

.cl-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}
.cl-footer-inner .v-action-btn { min-width: 108px; }

@keyframes clViewIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes clSpin {
  to { transform: rotate(360deg); }
}
