:root {
  /* Aligned with cambora.ai palette */
  --color-sand-50: #faf6f1;
  --color-sand-100: #f5efe8;
  --color-sand-200: #faf6f1;
  --color-sand-300: #ede5db;
  --color-sand-400: #ddd4c8;
  --color-sand-500: #b8b0a6;
  --color-clay-100: #f5efe8;
  --color-clay-300: #d9b28a;
  --color-clay-500: #7a7168;
  --color-terracotta-200: #d39863;
  --color-terracotta-400: #c4841d;
  --color-terracotta-600: #c4841d;
  --color-sage-100: #dde8df;
  --color-sage-300: #8db29f;
  --color-sage-500: #6b7f5e;
  --color-gold-500: #c4841d;
  --color-charcoal-900: #2a2520;
  --color-charcoal-700: #2a2520;
  --color-charcoal-600: #3a3530;
  --color-charcoal-500: #7a7168;
  --color-charcoal-400: #b8b0a6;
  --color-white: #ffffff;
  --surface-page: var(--color-sand-200);
  --surface-page-accent: var(--color-sand-400);
  --surface-panel: rgba(250, 246, 241, 0.92);
  --surface-elevated: #faf6f1;
  --surface-overlay: rgba(42, 37, 32, 0.45);
  --surface-interactive: rgba(255, 255, 255, 0.62);
  --border-subtle: rgba(42, 37, 32, 0.08);
  --border-default: rgba(42, 37, 32, 0.12);
  --border-strong: rgba(196, 132, 29, 0.2);
  --text-primary: var(--color-charcoal-900);
  --text-secondary: var(--color-charcoal-500);
  --text-muted: var(--color-charcoal-400);
  --text-inverse: var(--color-sand-50);
  --interactive-primary: var(--color-terracotta-600);
  --interactive-primary-soft: rgba(196, 132, 29, 0.12);
  --interactive-primary-hover: var(--color-charcoal-700);
  --interactive-accent: var(--color-terracotta-400);
  --interactive-accent-strong: var(--color-terracotta-600);
  --status-success: var(--color-sage-500);
  --status-warning: var(--color-gold-500);
  --shadow-lg: 0 28px 70px rgba(42, 37, 32, 0.12);
  --shadow-md: 0 18px 40px rgba(42, 37, 32, 0.08);
  --shadow-sm: 0 10px 22px rgba(79, 45, 21, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, sans-serif;
}

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

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text-primary);
  background:
    radial-gradient(circle at top left, rgba(255, 244, 230, 0.92), transparent 30%),
    radial-gradient(circle at top right, rgba(216, 178, 138, 0.42), transparent 24%),
    linear-gradient(180deg, var(--color-sand-100) 0%, var(--surface-page) 42%, var(--color-sand-300) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(115, 76, 47, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(115, 76, 47, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 85%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

textarea {
  resize: vertical;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(320px, 1.08fr);
  gap: 1.5rem;
  align-items: start;
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 2rem);
}

.input-panel,
.results-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  background: var(--surface-panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}

.input-panel::before,
.results-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.34), transparent 42%);
}

.input-panel {
  padding: clamp(1.4rem, 2vw, 2rem);
}

.form-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 247, 239, 0.74)),
    var(--surface-elevated);
}

.form-summary-content {
  flex: 1 1 auto;
  min-width: 0;
}

.form-summary-content .eyebrow {
  margin-bottom: 0.15rem;
}

.form-summary-text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-summary-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.edit-criteria-btn {
  padding: 0.5rem 1.2rem;
  border: 1px solid rgba(115, 76, 47, 0.25);
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.edit-criteria-btn:hover {
  background: rgba(115, 76, 47, 0.08);
  border-color: rgba(115, 76, 47, 0.4);
}

.results-panel {
  padding: clamp(1.2rem, 1.8vw, 1.8rem);
}

.panel-header {
  position: relative;
  z-index: 1;
  margin-bottom: 1.5rem;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--interactive-accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.3rem, 4vw, 4.5rem);
}

h2 {
  max-width: 14ch;
  font-size: clamp(1.8rem, 3vw, 3rem);
}

h3 {
  font-size: 1.3rem;
}

.panel-intro,
.section-heading p,
.field-note,
.status-copy p,
.loading-list div {
  color: var(--text-secondary);
}

.panel-intro {
  max-width: 55ch;
  margin: 0.85rem 0 0;
  font-size: 1rem;
  line-height: 1.6;
}

#generation-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

label,
legend {
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 700;
}

textarea,
select,
input[type="text"],
input[type="search"] {
  width: 100%;
  border: 1px solid rgba(97, 66, 45, 0.14);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 249, 0.95);
  color: var(--text-primary);
  padding: 0.95rem 1rem;
  outline: none;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

textarea::placeholder {
  color: #a28d7e;
}

textarea:focus,
select:focus,
input:focus {
  border-color: rgba(184, 109, 55, 0.55);
  box-shadow:
    0 0 0 4px rgba(184, 109, 55, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

.field-row,
.toolbar,
.actions-bar,
.status-panel,
.loading-panel,
.section-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.field-row > *,
.toolbar > * {
  flex: 1 1 220px;
}

.field-group,
.filter-group,
.sort-panel {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.vibes-fieldset {
  margin: 0;
  padding: 1.1rem;
  border: 1px solid rgba(115, 76, 47, 0.12);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 247, 239, 0.8)),
    var(--surface-elevated);
}

.vibes-fieldset .field-note {
  margin: 0.35rem 0 0.85rem;
}

.vibes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.vibes-grid label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 52px;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--surface-interactive);
  font-size: 0.92rem;
  font-weight: 600;
}

.vibes-grid input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--interactive-accent-strong);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.9rem;
  margin-top: 0.25rem;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1.3rem;
  color: var(--text-inverse);
  background: linear-gradient(
    135deg,
    var(--interactive-accent) 0%,
    var(--interactive-accent-strong) 100%
  );
  box-shadow: 0 12px 24px rgba(136, 77, 36, 0.24);
  font-weight: 700;
  letter-spacing: 0.01em;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    filter 140ms ease;
}

button:disabled {
  cursor: wait;
  opacity: 0.76;
}

button:hover,
button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(136, 77, 36, 0.28);
  filter: saturate(1.08);
}

button:active {
  transform: translateY(1px);
}

.status-panel,
.loading-panel,
.toolbar,
.actions-bar,
.results-section,
.favorites-section {
  position: relative;
  z-index: 1;
}

.status-panel,
.loading-panel,
.toolbar,
.actions-bar {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(115, 76, 47, 0.12);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 247, 239, 0.74)),
    var(--surface-elevated);
  box-shadow: var(--shadow-md);
}

.status-panel {
  justify-content: space-between;
  align-items: center;
  transition: box-shadow 0.3s ease;
}

.status-panel.results-ready {
  box-shadow: 0 0 0 2px rgba(115, 76, 47, 0.35);
  animation: status-pulse 1.5s ease-out;
}

@keyframes status-pulse {
  0% { box-shadow: 0 0 0 2px rgba(115, 76, 47, 0.5); }
  100% { box-shadow: 0 0 0 2px rgba(115, 76, 47, 0.12); }
}

.status-copy {
  flex: 1 1 260px;
}

.status-copy strong {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

.status-copy p {
  margin: 0;
  max-width: 44ch;
  line-height: 1.5;
}

.status-actions {
  display: flex;
  flex: 1 1 260px;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}

.regenerate-btn {
  padding: 0.5rem 1.2rem;
  border: 1px solid rgba(115, 76, 47, 0.25);
  border-radius: var(--radius-lg);
  background: var(--surface-elevated);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.regenerate-btn:hover,
.more-styles-btn:hover {
  background: rgba(115, 76, 47, 0.08);
  border-color: rgba(115, 76, 47, 0.4);
}

.more-styles-btn {
  padding: 0.5rem 1.2rem;
  border: 1px solid rgba(115, 76, 47, 0.25);
  border-radius: var(--radius-lg);
  background: var(--surface-elevated);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.status-buttons {
  display: flex;
  gap: 0.5rem;
}

.status-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

.status-steps span,
.domain-badge,
.technique-badge,
.score-pill,
.favorite-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-steps span {
  color: var(--interactive-accent-strong);
  background: rgba(184, 109, 55, 0.1);
}

.toolbar {
  justify-content: space-between;
  align-items: end;
}

.filters-panel {
  display: flex;
  flex: 999 1 720px;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.filters-panel > * {
  flex: 1 1 150px;
}

.sort-panel {
  flex: 1 1 180px;
}

.actions-bar {
  gap: 0.8rem;
}

.actions-bar button {
  background: linear-gradient(135deg, #6d4b37 0%, #3f291d 100%);
}

.actions-bar .button-secondary {
  background: rgba(255, 255, 255, 0.72);
  color: var(--interactive-accent-strong);
  border-color: var(--border-strong);
  box-shadow: none;
}

.actions-bar .button-secondary:hover,
.actions-bar .button-secondary:focus-visible {
  background: rgba(184, 109, 55, 0.12);
}

.loading-panel {
  align-items: start;
  justify-content: space-between;
}

.loading-list {
  display: grid;
  flex: 1 1 320px;
  gap: 0.7rem;
}

.loading-list div {
  position: relative;
  padding-left: 1.4rem;
  line-height: 1.45;
}

.loading-list div::before {
  content: "";
  position: absolute;
  top: 0.35rem;
  left: 0;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-terracotta-200), var(--interactive-accent-strong));
  box-shadow: 0 0 0 0 rgba(184, 109, 55, 0.34);
  animation: pulse 1.8s ease-in-out infinite;
}

.loading-list div:nth-child(2)::before {
  animation-delay: 0.2s;
}

.loading-list div:nth-child(3)::before {
  animation-delay: 0.4s;
}

.results-section,
.favorites-section {
  margin-top: 1.25rem;
}

.section-heading {
  align-items: end;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.section-heading p {
  margin: 0;
  max-width: 44ch;
  line-height: 1.5;
}

.results-grid,
.favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.results-grid:empty::before,
.favorites-grid:empty::before {
  content: "No names yet. Run a generation to populate this workspace.";
  display: block;
  grid-column: 1 / -1;
  padding: 1.4rem;
  border: 1px dashed rgba(115, 76, 47, 0.2);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  background: rgba(255, 250, 243, 0.66);
  text-align: center;
}

.result-card,
.favorite-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-height: 220px;
  padding: 1.15rem;
  border: 1px solid rgba(115, 76, 47, 0.12);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 247, 239, 0.92)),
    var(--surface-elevated);
  box-shadow: var(--shadow-md);
}

.result-card-header,
.favorite-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.8rem;
}

.result-card-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.result-name,
.favorite-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.02;
}

.result-meaning,
.favorite-notes {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.55;
}

.score-pill {
  color: var(--text-inverse);
  background: linear-gradient(135deg, var(--status-success) 0%, #1d5d44 100%);
  white-space: nowrap;
}

.domain-row,
.meta-row,
.favorite-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.domain-badge {
  color: var(--status-success);
  background: rgba(47, 125, 94, 0.12);
}

.domain-badge[data-status="taken"] {
  color: var(--status-warning);
  background: rgba(164, 104, 44, 0.14);
}

.domain-badge[data-status="unknown"] {
  color: var(--text-secondary);
  background: rgba(109, 88, 72, 0.1);
}

.technique-badge,
.favorite-tag {
  color: var(--interactive-accent-strong);
  background: var(--interactive-primary-soft);
}

.meta-row {
  justify-content: space-between;
  align-items: center;
}

.meta-copy {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.favorite-card {
  min-height: 180px;
}

.domain-stack,
.expanded-domain-display,
.domain-extensions-grid {
  display: grid;
  gap: 0.75rem;
}

.expanded-domain-display {
  padding: 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(244, 229, 214, 0.58));
}

.expanded-domain-display > header,
.comparison-header,
.feedback-modal header,
.custom-vibe-header,
.floating-comparison-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.expanded-domain-display h4,
.comparison-header h4,
.feedback-modal h3,
.custom-vibe-header label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.expanded-domain-copy,
.feedback-modal p,
.custom-vibe-note,
.comparison-empty {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.domain-extensions-grid {
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}

.domain-extension-card {
  display: grid;
  gap: 0.4rem;
  padding: 0.85rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
}

.domain-extension-label {
  font-weight: 700;
  color: var(--text-primary);
}

.domain-extension-status {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.domain-extension-card[data-status="available"] .domain-extension-status {
  color: var(--status-success);
}

.domain-extension-card[data-status="taken"] .domain-extension-status {
  color: var(--status-warning);
}

.domain-register-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.inline-link,
.domain-register-links a {
  color: var(--interactive-accent-strong);
  font-weight: 700;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.inline-link:hover,
.inline-link:focus-visible,
.domain-register-links a:hover,
.domain-register-links a:focus-visible {
  color: var(--interactive-primary-hover);
}

.custom-vibe-input,
.custom-vibe-field {
  display: grid;
  gap: 0.55rem;
}

.custom-vibe-field[hidden],
.feedback-modal[hidden],
.comparison-section[hidden],
.floating-comparison-bar[hidden],
.loading-panel[hidden],
.input-panel[hidden],
.form-summary[hidden] {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.custom-vibe-toggle {
  align-self: start;
  background: transparent;
  color: var(--interactive-accent-strong);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}

.custom-vibe-toggle:hover,
.custom-vibe-toggle:focus-visible {
  background: rgba(184, 109, 55, 0.08);
}

.like-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.9rem;
  border-color: var(--border-default);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text-secondary);
  box-shadow: none;
}

.like-button:hover,
.like-button:focus-visible {
  border-color: var(--interactive-accent);
  color: var(--interactive-accent-strong);
  background: rgba(255, 247, 239, 0.94);
}

.like-button-icon {
  display: inline-flex;
  width: 1.1rem;
  height: 1.1rem;
  color: currentcolor;
}

.like-button-icon svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.like-button-icon path {
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  transform-origin: center;
}

.like-button-label {
  font-size: 0.88rem;
  font-weight: 700;
}

.like-button[aria-pressed="true"],
.like-button.is-liked {
  color: var(--interactive-accent-strong);
  border-color: rgba(184, 109, 55, 0.28);
  background: rgba(184, 109, 55, 0.12);
}

.like-button[aria-pressed="true"] .like-button-icon path,
.like-button.is-liked .like-button-icon path {
  fill: currentcolor;
  animation: heart-pop 400ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.compare-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  align-self: start;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 700;
}

.compare-toggle input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--interactive-accent-strong);
}

.compare-toggle:has(input:checked) {
  border-color: rgba(142, 78, 36, 0.28);
  background: rgba(184, 109, 55, 0.12);
  color: var(--interactive-accent-strong);
}

.comparison-section,
.comparison-table-shell {
  display: grid;
  gap: 0.85rem;
}

.ai-panel,
.similar-name-grid,
.ai-skeleton-group {
  display: grid;
  gap: 0.75rem;
}

.ai-panel {
  padding: 1rem 1.05rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(244, 229, 214, 0.4));
  box-shadow: var(--shadow-sm);
}

.ai-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ai-panel-label {
  margin: 0;
  color: var(--interactive-accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.story-panel {
  transform-origin: top center;
  animation: story-panel-enter 220ms ease;
}

.story-copy,
.similar-name-card p,
.ai-panel-error {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.ai-panel-error {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.similar-name-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.similar-name-card {
  display: grid;
  gap: 0.4rem;
  padding: 0.85rem;
  border: 1px solid rgba(115, 76, 47, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(255, 252, 247, 0.82);
}

.similar-name-card strong {
  color: var(--text-primary);
  font-size: 1rem;
}

.ai-copy-button {
  padding: 0.6rem 0.95rem;
}

.ai-skeleton-group {
  overflow: hidden;
}

.ai-skeleton-bar {
  position: relative;
  display: block;
  width: 100%;
  height: 0.78rem;
  border-radius: 999px;
  background: rgba(109, 88, 72, 0.12);
}

.ai-skeleton-bar.short {
  width: 68%;
}

.ai-skeleton-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  animation: skeleton-shimmer 1.25s ease-in-out infinite;
}

.comparison-table-shell {
  overflow-x: auto;
  padding: 0.3rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(247, 236, 223, 0.92));
}

.comparison-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(115, 76, 47, 0.12);
  text-align: left;
  vertical-align: top;
}

.comparison-table thead th {
  color: var(--text-primary);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.comparison-table tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 132px;
  background: rgba(247, 236, 223, 0.96);
  color: var(--text-primary);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.comparison-table td {
  color: var(--text-secondary);
}

.comparison-table tr:last-child td {
  border-bottom: 0;
}

.floating-comparison-bar {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  z-index: 6;
  width: min(calc(100vw - 2rem), 920px);
  padding: 0.95rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(47, 34, 27, 0.92);
  color: var(--text-inverse);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(calc(100% + 1.5rem));
  transition:
    opacity 180ms ease,
    transform 220ms ease;
}

.floating-comparison-bar.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.floating-comparison-bar .selection-count,
.floating-comparison-bar .comparison-summary {
  color: rgba(255, 250, 244, 0.82);
}

.floating-comparison-bar button {
  background: linear-gradient(135deg, var(--color-sand-50) 0%, var(--color-clay-100) 100%);
  color: var(--interactive-accent-strong);
  box-shadow: none;
}

.feedback-trigger {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 999px;
  font-size: 1.15rem;
  line-height: 1;
  box-shadow: var(--shadow-md);
}

.feedback-trigger-icon {
  font-weight: 800;
}

.feedback-backdrop {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: var(--surface-overlay);
  backdrop-filter: blur(8px);
}

.feedback-backdrop[hidden] {
  display: none !important;
}

.feedback-modal {
  width: min(100%, 360px);
  display: grid;
  gap: 1rem;
  padding: 1.3rem;
  border: 1px solid var(--border-default);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 247, 239, 0.96));
  box-shadow: var(--shadow-lg);
  transform: translateY(18px);
  opacity: 0;
  animation: feedback-modal-enter 220ms ease forwards;
}

.feedback-modal textarea {
  min-height: 140px;
}

.email-results-form {
  display: grid;
  gap: 0.85rem;
}

.email-consent,
.email-results-actions {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.email-consent {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.5;
}

.email-consent input {
  width: 1rem;
  height: 1rem;
  margin: 0.2rem 0 0;
  accent-color: var(--interactive-accent-strong);
}

.email-results-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.email-results-close {
  padding-inline: 0.9rem;
}

.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 5rem;
  z-index: 9;
  display: grid;
  gap: 0.65rem;
  width: min(calc(100vw - 2rem), 320px);
}

.toast {
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: rgba(47, 34, 27, 0.94);
  color: var(--text-inverse);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.feedback-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.feedback-counter {
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 700;
}

.feedback-status,
.feedback-success {
  margin: 0;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-sm);
}

.feedback-status {
  border: 1px solid rgba(164, 104, 44, 0.18);
  background: rgba(164, 104, 44, 0.08);
  color: var(--interactive-accent-strong);
  font-size: 0.9rem;
}

.feedback-status:empty {
  display: none;
}

.feedback-success {
  display: grid;
  gap: 0.25rem;
  border: 1px solid rgba(47, 125, 94, 0.18);
  background: rgba(47, 125, 94, 0.1);
  color: var(--status-success);
}

.feedback-success strong {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.feedback-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.button-secondary {
  background: transparent;
  color: var(--interactive-accent-strong);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(184, 109, 55, 0.08);
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(184, 109, 55, 0.34);
    transform: scale(0.96);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(184, 109, 55, 0);
    transform: scale(1);
  }
}

@keyframes heart-pop {
  0% {
    transform: scale(0.94);
  }

  60% {
    transform: scale(1.35);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes feedback-modal-enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}

@keyframes story-panel-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .results-panel {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feedback-modal {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 0.85rem;
  }

  .input-panel,
  .results-panel {
    border-radius: 24px;
  }

  .status-panel,
  .toolbar,
  .loading-panel,
  .actions-bar,
  .expanded-domain-display,
  .feedback-modal {
    padding: 0.95rem;
  }

  .results-grid,
  .favorites-grid,
  .domain-extensions-grid {
    grid-template-columns: 1fr;
  }

  .floating-comparison-bar {
    width: calc(100vw - 1rem);
    bottom: 0.5rem;
    border-radius: 24px;
  }

  .feedback-trigger {
    right: 0.85rem;
    bottom: 0.85rem;
  }

  .email-results-actions {
    flex-direction: column-reverse;
  }

  .email-results-actions > * {
    width: 100%;
  }

  .toast-stack {
    right: 0.5rem;
    bottom: 4.5rem;
    width: calc(100vw - 1rem);
  }
}
