:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --surface: #ffffff;
  --surface-soft: #fbfaf7;
  --text: #1d1c19;
  --muted: #77736c;
  --muted-strong: #4f4b45;
  --border: #e7e1d7;
  --border-strong: #d8d0c3;
  --accent: #24221e;
  --accent-soft: #efebe2;
  --danger: #aa2d22;
  --danger-soft: #fff0ec;
  --success: #216e4e;
  --success-soft: #ecfdf3;
  --shadow: 0 22px 58px rgba(36, 34, 30, 0.1), 0 2px 8px rgba(36, 34, 30, 0.03);
  --shadow-soft: 0 14px 34px rgba(36, 34, 30, 0.064), 0 1px 4px rgba(36, 34, 30, 0.028);
  --shadow-card: 0 8px 22px rgba(36, 34, 30, 0.038), 0 1px 2px rgba(36, 34, 30, 0.028);
  --shadow-card-hover: 0 10px 24px rgba(36, 34, 30, 0.052), 0 1px 2px rgba(36, 34, 30, 0.03);
  --shadow-control: 0 7px 18px rgba(36, 34, 30, 0.046);
  --radius-xl: 28px;
  --radius-lg: 21px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(232, 225, 211, 0.48), transparent 32rem),
    radial-gradient(circle at 90% 8%, rgba(250, 247, 239, 0.72), transparent 28rem),
    linear-gradient(180deg, #fbfaf7 0%, var(--bg) 52%, #efede6 100%);
}

body.has-modal-open {
  overflow: hidden;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  row-gap: 10px;
  width: calc(100% - 32px);
  max-width: var(--max-width);
  height: calc(100dvh - 54px);
  margin: 0 auto;
  padding: 14px 0 10px;
}

.site-header {
  min-height: 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.unlock-button[hidden] {
  display: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  filter: drop-shadow(0 8px 13px rgba(36, 34, 30, 0.1));
}

.brand-mark img {
  display: block;
  width: 38px;
  height: 38px;
}

.brand-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.brand-name {
  font-size: clamp(1.48rem, 3.2vw, 2.15rem);
  font-weight: 760;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.brand-subtitle {
  color: var(--muted-strong);
  font-size: clamp(0.7rem, 1.25vw, 0.8rem);
  font-weight: 680;
  line-height: 1.15;
  letter-spacing: 0.005em;
}

.main-layout {
  display: grid;
  min-height: 0;
  overflow: hidden;
}

.panel {
  isolation: isolate;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.94);
  background-clip: padding-box;
  box-shadow:
    0 20px 46px -32px rgba(36, 34, 30, 0.34),
    0 7px 18px -14px rgba(36, 34, 30, 0.2);
}

.library-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
  height: 100%;
  padding: clamp(18px, 3vw, 28px);
  overflow: hidden;
}

.library-header {
  display: grid;
  min-width: 0;
  flex: 0 0 auto;
}

.library-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.panel-heading h1,
.panel-heading h2,
p {
  margin-top: 0;
}

.panel-heading h1,
.panel-heading h2 {
  margin-bottom: 0;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.panel-heading h1 {
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.panel-heading h2 {
  font-size: clamp(1.55rem, 4vw, 2.2rem);
}

.library-controls {
  display: grid;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.library-controls > * {
  min-width: 0;
}

.field-group,
.select-label,
.search-field,
.direction-field,
.favorite-filter-field {
  display: grid;
  gap: 7px;
}

.field-group > span,
.select-label > span,
.search-field > span,
.direction-field > span,
.favorite-filter-field > span {
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--text);
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 7px 16px rgba(36, 34, 30, 0.035);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

input,
select {
  height: 44px;
  padding: 0 13px;
}

.custom-select {
  position: relative;
  z-index: 2;
}

.custom-select.is-open {
  z-index: 60;
}

.select-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 7px 16px rgba(36, 34, 30, 0.035);
  text-align: left;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.select-button > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-button svg {
  display: block;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--muted-strong);
  transition: transform 180ms ease;
}

.custom-select.is-open .select-button,
.select-button:focus-visible {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow:
    0 0 0 4px rgba(36, 34, 30, 0.08),
    var(--shadow-control);
  outline: none;
}

.custom-select.is-open .select-button svg {
  transform: rotate(180deg);
}

.select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  display: grid;
  width: 100%;
  max-height: 260px;
  min-width: 190px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px) scale(0.985);
  transform-origin: top center;
  transition:
    opacity 150ms ease,
    transform 150ms ease;
  scrollbar-width: none;
}

.select-menu::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.custom-select.is-open .select-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.view-field .select-menu,
[data-select-menu="view-mode"] .select-menu {
  right: 0;
  left: auto;
  width: max(100%, 190px);
}

.library-header,
.library-controls {
  overflow: visible;
}

.select-option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted-strong);
  font-weight: 660;
  text-align: left;
  transition:
    background 140ms ease,
    color 140ms ease;
}

.select-option:hover,
.select-option:focus-visible {
  background: var(--accent-soft);
  color: var(--text);
  outline: none;
}

.select-option.is-selected {
  background: var(--accent);
  color: #ffffff;
}

textarea {
  min-height: 320px;
  resize: vertical;
  padding: 14px;
  line-height: 1.56;
}

.field-hint {
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.45;
}

.prompt-options {
  display: grid;
  grid-template-columns: minmax(112px, 0.28fr) minmax(0, 1fr);
  gap: 12px;
}

.favorite-form-toggle,
.category-assignment-card {
  min-height: 82px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(251, 250, 247, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    var(--shadow-card);
}

.favorite-form-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 10px;
  color: var(--muted-strong);
  text-align: center;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.favorite-form-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #ded6c6;
  border-radius: 16px;
  background: #f4f0e8;
  color: #6f665b;
}

.favorite-form-icon svg {
  width: 18px;
  height: 18px;
}

.favorite-form-copy {
  display: grid;
  gap: 2px;
}

.favorite-form-copy strong,
.category-assignment-content > span,
.category-create-panel > div > span,
.category-picker-heading span {
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.favorite-form-copy small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 620;
}

.favorite-form-toggle:hover,
.favorite-form-toggle:focus-visible {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(36, 34, 30, 0.08),
    var(--shadow-control);
  outline: none;
}

.favorite-form-toggle.is-active {
  border-color: #d9c99d;
  background: linear-gradient(145deg, #fbf5e6, #f4ecd5);
  color: #725b25;
}

.favorite-form-toggle.is-active .favorite-form-icon {
  border-color: #d9c99d;
  background: #f0e3bf;
  color: #725b25;
}

.favorite-form-toggle.is-active svg path {
  fill: currentColor;
}

.category-assignment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.category-assignment-content {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.category-assignment-content p,
.category-create-panel p,
.category-picker-heading p,
.category-dialog-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.category-manager-open {
  min-width: 108px;
}

.selected-category-preview,
.category-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selected-category-preview {
  min-height: 26px;
}

.category-preview-empty,
.category-picker-empty {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: var(--muted);
  font-size: 0.84rem;
}

.category-screen {
  position: fixed;
  inset: 0;
  z-index: 36;
  display: none;
  min-height: 100vh;
  padding: 20px;
  overflow: auto;
  background: rgba(247, 245, 239, 0.58);
  backdrop-filter: blur(12px);
}

.category-screen.is-open {
  display: grid;
  align-items: center;
}

.category-dialog {
  display: grid;
  gap: 18px;
  width: min(100%, 760px);
  max-height: min(90dvh, 760px);
  overflow: auto;
  margin: auto;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.category-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.category-dialog-header .panel-heading {
  display: grid;
  gap: 8px;
}

.category-close {
  min-width: 92px;
}

.category-dialog-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 14px;
}

.category-create-panel,
.category-picker-panel {
  display: grid;
  align-content: start;
  gap: 13px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(251, 250, 247, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.category-create-panel > div,
.category-picker-heading {
  display: grid;
  gap: 4px;
}

.category-create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

.category-create-row .primary-button {
  min-width: 92px;
}

.category-picker {
  min-height: 92px;
  align-content: start;
}

.category-item {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  min-height: 34px;
  overflow: hidden;
  border: 1px solid var(--category-border, #ded6c6);
  border-radius: 999px;
  background: var(--category-bg, #f2eee6);
  color: var(--category-text, #5f5546);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.category-choice {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 32px;
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition:
    background 150ms ease,
    box-shadow 150ms ease,
    opacity 150ms ease;
}

.category-choice:hover,
.category-choice:focus-visible {
  background: rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 0 0 1px rgba(36, 34, 30, 0.08);
  outline: none;
}

.category-choice.is-selected {
  gap: 6px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow:
    inset 0 0 0 2px rgba(36, 34, 30, 0.13),
    0 5px 12px rgba(36, 34, 30, 0.045);
}

.category-choice.is-selected::before {
  content: "✓";
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 999px;
  background: rgba(36, 34, 30, 0.08);
  color: currentColor;
  font-size: 0.68rem;
  font-weight: 900;
}

.category-delete-button {
  display: grid;
  width: 32px;
  min-height: 32px;
  place-items: center;
  padding: 0;
  border: 0;
  border-left: 1px solid rgba(36, 34, 30, 0.1);
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  opacity: 0.7;
  transition:
    background 150ms ease,
    color 150ms ease,
    opacity 150ms ease;
}

.category-delete-button svg {
  display: block;
  width: 14px;
  height: 14px;
  overflow: visible;
  stroke: currentColor;
  transform-box: view-box;
  transform-origin: center;
}

.category-delete-button:hover,
.category-delete-button:focus-visible {
  background: var(--danger-soft);
  color: var(--danger);
  opacity: 1;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: #9b968d;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow:
    0 0 0 4px rgba(36, 34, 30, 0.08),
    var(--shadow-control);
}

.primary-button,
.ghost-button,
.danger-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-weight: 700;
  line-height: 1;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    opacity 180ms ease,
    box-shadow 180ms ease;
}

.primary-button {
  padding: 0 17px;
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(36, 34, 30, 0.16);
}

.topbar-action {
  min-width: 138px;
  height: 46px;
}

.primary-button:hover,
.ghost-button:hover,
.danger-button:hover,
.icon-button:hover {
  box-shadow: var(--shadow-control);
}

.primary-button:hover {
  box-shadow: 0 14px 28px rgba(36, 34, 30, 0.18);
}

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

.ghost-button {
  padding: 0 15px;
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  box-shadow: var(--shadow-control);
}

.danger-button {
  padding: 0 15px;
  border-color: #e9b6ad;
  background: var(--danger);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(170, 45, 34, 0.14);
}

.direction-button,
.favorite-filter-button {
  width: 142px;
  height: 44px;
  border-color: var(--border);
  background: var(--surface-soft);
  color: var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 7px 16px rgba(36, 34, 30, 0.035);
  font-weight: 400;
  text-align: center;
}

.direction-button:hover,
.direction-button:focus-visible,
.favorite-filter-button:hover,
.favorite-filter-button:focus-visible {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow:
    0 0 0 4px rgba(36, 34, 30, 0.08),
    var(--shadow-control);
  outline: none;
}

.favorite-filter-button {
  width: 104px;
  justify-content: center;
  padding: 0 9px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}

.favorite-filter-button svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.favorite-filter-button.is-active {
  border-color: #dfd3b7;
  background: #fbf7ea;
  color: #6d5b2b;
}

.favorite-filter-button.is-active svg path {
  fill: currentColor;
}

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

.library-body {
  min-height: 0;
  overflow-y: auto;
  padding: 2px 2px 12px 0;
  border-radius: var(--radius-lg);
  scrollbar-width: none;
}

.library-body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.empty-state {
  display: grid;
  min-height: 220px;
  height: 100%;
  gap: 7px;
  align-content: center;
  padding: clamp(30px, 7vw, 64px);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow-card);
  color: var(--muted);
  text-align: center;
}

.empty-state span {
  color: var(--text);
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  font-weight: 740;
  letter-spacing: -0.035em;
}

.empty-state p {
  margin-bottom: 0;
  line-height: 1.5;
}

.empty-state.is-hidden {
  display: none;
}

.prompt-list {
  display: grid;
  gap: 13px;
  padding: 0 4px 4px 0;
}

.prompt-list--grid {
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
}

.prompt-list--mosaic {
  display: block;
  column-count: 2;
  column-gap: 14px;
}

.prompt-list--titles {
  gap: 9px;
}

.prompt-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 18px 18px 16px;
  border: 1px solid rgba(226, 219, 208, 0.98);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-card);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.prompt-card:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-card-hover);
}

.prompt-card-header {
  display: grid;
  gap: 5px;
  padding-right: 42px;
}

.prompt-card-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.26;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.category-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid var(--category-border, #ded6c6);
  border-radius: 999px;
  background: var(--category-bg, #f2eee6);
  color: var(--category-text, #5f5546);
  font-size: 0.72rem;
  font-weight: 720;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-badge--empty {
  border-color: #e0d8cb;
  background: #f4f0e8;
  color: #81796f;
}

.prompt-content {
  margin: 0 0 34px;
  color: var(--muted-strong);
  font-size: 0.91rem;
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.prompt-list--grid .prompt-content,
.prompt-list--mosaic .prompt-content {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.prompt-list--grid .prompt-card {
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 274px;
  height: 100%;
}

.prompt-list--grid .prompt-content {
  -webkit-line-clamp: 5;
}

.prompt-list--mosaic .prompt-card {
  display: inline-grid;
  width: 100%;
  min-height: 0;
  margin: 0 0 14px;
  break-inside: avoid;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(251, 250, 247, 0.88)), var(--surface);
}

.prompt-list--mosaic .prompt-content {
  font-size: 0.94rem;
}

.prompt-list--mosaic .prompt-card--short .prompt-content {
  -webkit-line-clamp: 4;
}

.prompt-list--mosaic .prompt-card--medium .prompt-content {
  -webkit-line-clamp: 7;
}

.prompt-list--mosaic .prompt-card--long .prompt-content {
  -webkit-line-clamp: 10;
}

.prompt-list--titles .prompt-card {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 0;
  padding: 13px 14px;
}

.prompt-list--titles .prompt-card-header {
  grid-column: 1;
  grid-row: 1;
  padding-right: 0;
}

.prompt-list--titles .category-badges {
  margin-top: 4px;
}

.prompt-list--titles .category-badge {
  max-width: 170px;
}

.prompt-list--titles .favorite-button {
  position: static;
}

.prompt-list--titles .copy-button {
  position: static;
  grid-column: 2;
  grid-row: 1;
}

.prompt-list--titles .prompt-actions {
  position: static;
  grid-column: 3;
  grid-row: 1;
}

.icon-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  flex: 0 0 34px;
  padding: 0;
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted-strong);
  box-shadow: 0 7px 16px rgba(36, 34, 30, 0.055);
  line-height: 0;
}

.icon-button svg {
  display: block;
  width: 16px;
  height: 16px;
  overflow: visible;
  stroke: currentColor;
  transform-box: view-box;
  transform-origin: center;
}

.icon-button[data-action="copy"] svg {
  transform: translate(0.35px, 0.1px);
}

.icon-button[data-action="edit"] svg {
  transform: translate(-0.15px, 0.1px);
}

.icon-button[data-action="delete"] svg,
.category-delete-button svg {
  transform: translateY(-0.45px);
}

.favorite-button svg,
.favorite-form-icon svg {
  transform: translateY(0.45px);
}

.icon-button:hover {
  border-color: var(--border-strong);
  background: #ffffff;
  color: var(--text);
}

.icon-button.is-copied,
.icon-button.is-copied:hover,
.ghost-button.is-copied,
.ghost-button.is-copied:hover {
  border-color: #91c9a9;
  background: var(--success-soft);
  color: var(--success);
  box-shadow:
    0 0 0 4px rgba(33, 110, 78, 0.1),
    var(--shadow-control);
}

.primary-button.is-copied,
.primary-button.is-copied:hover {
  border-color: var(--success);
  background: var(--success);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(33, 110, 78, 0.18);
}

.favorite-button {
  border-radius: 999px;
}

.favorite-button:hover,
.favorite-button:focus-visible {
  border-color: #d9c99d;
  background: #fbf5e6;
  color: #725b25;
}

.favorite-button.is-active {
  border-color: #d9c99d;
  background: #f6eed8;
  color: #725b25;
}

.favorite-button.is-active svg path {
  fill: currentColor;
}

.copy-button {
  position: absolute;
  top: 14px;
  right: 14px;
}

.prompt-actions {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  gap: 7px;
}

.icon-button.danger:hover {
  border-color: #f2bbb2;
  background: var(--danger-soft);
  color: var(--danger);
}

.composer-screen,
.viewer-screen,
.delete-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  min-height: 100vh;
  padding: 20px;
  overflow: auto;
  background: rgba(247, 245, 239, 0.8);
  backdrop-filter: blur(18px);
}

.composer-screen.is-open,
.viewer-screen.is-open,
.delete-screen.is-open {
  display: grid;
  align-items: center;
}

.composer-dialog,
.category-dialog,
.viewer-dialog,
.delete-dialog {
  margin: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.composer-dialog {
  width: min(100%, 860px);
  padding: clamp(22px, 4vw, 34px);
}

.viewer-dialog {
  display: grid;
  gap: 20px;
  width: min(100%, 900px);
  max-height: min(88vh, 860px);
  padding: clamp(22px, 4vw, 34px);
  overflow: hidden;
}

.delete-dialog {
  display: grid;
  gap: 24px;
  width: min(100%, 540px);
  padding: clamp(20px, 4vw, 28px);
}

.composer-header,
.viewer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.composer-close,
.viewer-close {
  min-width: 92px;
}

.viewer-content {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

.viewer-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.viewer-categories:empty {
  display: none;
}

.viewer-prompt-content {
  max-height: min(58vh, 560px);
  margin: 0;
  overflow: auto;
  padding: clamp(16px, 3vw, 22px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    var(--shadow-card);
  color: var(--muted-strong);
  font-size: 0.96rem;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.viewer-actions {
  display: flex;
  justify-content: flex-end;
}

.prompt-form {
  display: grid;
  gap: 15px;
  margin-top: 22px;
}

.prompt-form .primary-button {
  width: 100%;
}

.delete-content {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 15px;
}

.delete-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #f2bbb2;
  border-radius: 14px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 1.15rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(170, 45, 34, 0.08);
}

.delete-mark::before {
  content: "!";
}

.delete-content h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.delete-content p {
  margin-bottom: 0;
  color: var(--muted-strong);
  line-height: 1.55;
}

.delete-prompt-name {
  display: block;
  margin-top: 12px;
  overflow-wrap: anywhere;
}

.delete-warning {
  margin-top: 8px;
  font-size: 0.9rem;
}

.delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.site-footer {
  display: grid;
  width: calc(100% - 32px);
  max-width: var(--max-width);
  gap: 2px;
  margin: 0 auto;
  padding: 7px 8px 9px;
  color: #69645d;
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer strong {
  color: #47433e;
}

.footer-brand-link {
  color: inherit;
  border-radius: 8px;
  text-decoration: none;
  transition:
    color 160ms ease,
    opacity 160ms ease;
}

.footer-brand-link:hover {
  color: var(--text);
  opacity: 0.86;
}

.footer-brand-link:focus-visible {
  color: var(--text);
  outline: 2px solid rgba(36, 34, 30, 0.2);
  outline-offset: 3px;
  opacity: 1;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  max-width: min(420px, calc(100vw - 32px));
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

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

.toast.is-error {
  border-color: #ffd2cc;
  background: var(--danger-soft);
  color: var(--danger);
}

.toast.is-success {
  border-color: #b7ebcf;
  background: var(--success-soft);
  color: var(--success);
}

@media (min-width: 720px) and (max-width: 1199px) {
  body {
    overflow: auto;
  }

  body.has-modal-open {
    overflow: hidden;
  }

  .app-shell {
    width: calc(100% - 26px);
    max-width: var(--max-width);
    min-height: 100dvh;
    height: auto;
  }

  .main-layout,
  .library-panel {
    overflow: visible;
  }

  .library-panel {
    min-height: calc(100dvh - 118px);
    height: auto;
  }

  .library-controls {
    grid-template-columns: minmax(280px, 1fr) 160px 104px;
    align-items: end;
  }

  .search-field {
    grid-column: 1 / -1;
  }

  .library-body {
    overflow: visible;
  }

  .direction-button,
  .favorite-filter-button {
    width: 100%;
    border-radius: var(--radius-md);
  }

  .prompt-options {
    grid-template-columns: minmax(112px, 0.28fr) minmax(0, 1fr);
  }

  .category-dialog-layout {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  }
}

@media (min-width: 1200px) {
  .library-controls {
    grid-template-columns: minmax(340px, 1.2fr) 160px 104px 146px 142px 150px;
    align-items: end;
  }
}

@media (max-width: 719px) {
  body {
    overflow: auto;
  }

  body.has-modal-open {
    overflow: hidden;
  }

  .app-shell {
    width: calc(100% - 22px);
    max-width: var(--max-width);
    min-height: 100dvh;
    height: auto;
    padding-top: 12px;
    padding-bottom: 7px;
    row-gap: 8px;
  }

  .main-layout,
  .library-panel {
    overflow: visible;
  }

  .library-panel {
    height: auto;
  }

  .library-body {
    overflow: visible;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-action {
    width: 100%;
  }

  .topbar-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .unlock-button {
    width: 100%;
  }

  .library-panel,
  .composer-dialog,
  .category-dialog,
  .viewer-dialog,
  .delete-dialog,
  .empty-state {
    border-radius: 22px;
  }

  .direction-button {
    width: 100%;
  }

  .favorite-filter-button {
    width: 100%;
    border-radius: var(--radius-md);
  }

  .prompt-options,
  .category-assignment-card,
  .category-dialog-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .favorite-form-toggle {
    min-height: 64px;
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    text-align: left;
  }

  .category-manager-open,
  .category-close {
    width: 100%;
  }

  .category-create-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .category-create-row .primary-button {
    width: 100%;
  }

  .prompt-list--mosaic {
    column-count: 1;
  }

  .prompt-list--titles .prompt-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .prompt-list--titles .copy-button {
    grid-column: 2;
  }

  .prompt-list--titles .prompt-actions {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .composer-screen,
  .category-screen,
  .viewer-screen,
  .delete-screen {
    padding: 10px;
  }

  .composer-header,
  .category-dialog-header,
  .viewer-header {
    align-items: stretch;
    flex-direction: column;
  }

  .composer-close,
  .category-close,
  .viewer-close,
  .viewer-actions .primary-button {
    width: 100%;
  }

  .delete-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .delete-actions {
    flex-direction: column-reverse;
  }

  .delete-actions button {
    width: 100%;
  }

  .site-footer {
    font-size: 0.74rem;
  }
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.field-label-row label {
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.field-label-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.field-counter {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
  transition: color 160ms ease;
}

.field-counter.is-near-limit {
  color: var(--muted-strong);
}

.field-counter.is-at-limit {
  color: var(--danger);
}

.markdown-support-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--muted-strong);
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.015em;
}

.markdown-composer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.markdown-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  gap: 7px;
}

.markdown-pane-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.markdown-preview {
  min-height: 320px;
  max-height: 440px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 7px 16px rgba(36, 34, 30, 0.035);
}

.markdown-preview-empty {
  color: var(--muted);
}

.markdown-body {
  color: var(--muted-strong);
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.markdown-body > :first-child {
  margin-top: 0;
}

.markdown-body > :last-child {
  margin-bottom: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin: 1.25em 0 0.55em;
  color: var(--text);
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.markdown-body h1 {
  font-size: 1.55em;
}

.markdown-body h2 {
  font-size: 1.35em;
}

.markdown-body h3 {
  font-size: 1.18em;
}

.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  font-size: 1em;
}

.markdown-body p {
  margin: 0 0 0.9em;
}

.markdown-body ul,
.markdown-body ol {
  margin: 0 0 0.95em;
  padding-left: 1.55em;
}

.markdown-body li {
  margin: 0.22em 0;
}

.markdown-body li > ul,
.markdown-body li > ol {
  margin: 0.3em 0 0;
}

.markdown-body blockquote {
  margin: 0 0 1em;
  padding: 0.35em 0 0.35em 1em;
  border-left: 3px solid var(--border-strong);
  color: var(--muted);
}

.markdown-body blockquote > :last-child {
  margin-bottom: 0;
}

.markdown-body code {
  padding: 0.16em 0.38em;
  border: 1px solid #e4ded3;
  border-radius: 7px;
  background: #f1eee7;
  color: #3f3b35;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.88em;
}

.markdown-body pre {
  max-width: 100%;
  margin: 0 0 1em;
  overflow: auto;
  padding: 13px 14px;
  border: 1px solid #ded7cc;
  border-radius: 12px;
  background: #292722;
  color: #f7f5ef;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.markdown-body pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0.86em;
  white-space: pre;
}

.markdown-body a {
  color: var(--text);
  font-weight: 680;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.markdown-body hr {
  height: 1px;
  margin: 1.25em 0;
  border: 0;
  background: var(--border);
}

.markdown-body del {
  color: var(--muted);
}

.markdown-table-wrap {
  max-width: 100%;
  margin: 0 0 1em;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.66);
  font-size: 0.92em;
}

.markdown-body th,
.markdown-body td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.markdown-body th {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 760;
}

.markdown-body tbody tr:last-child td {
  border-bottom: 0;
}

.markdown-task {
  display: inline-flex;
  align-items: flex-start;
  gap: 7px;
}

.markdown-task input {
  width: 15px;
  height: 15px;
  min-height: 0;
  margin: 0.3em 0 0;
  padding: 0;
  accent-color: var(--accent);
  box-shadow: none;
}

.prompt-content.markdown-body {
  margin: 0 0 34px;
  color: var(--muted-strong);
  font-size: 0.91rem;
  line-height: 1.58;
}

.markdown-body--card h1 {
  font-size: 1.28em;
}

.markdown-body--card h2 {
  font-size: 1.18em;
}

.markdown-body--card h3 {
  font-size: 1.08em;
}

.prompt-list--grid .prompt-content,
.prompt-list--mosaic .prompt-content {
  display: block;
  overflow: hidden;
  -webkit-box-orient: initial;
}

.prompt-list--grid .prompt-content {
  max-height: 8rem;
}

.prompt-list--mosaic .prompt-card--short .prompt-content {
  max-height: 6.2rem;
}

.prompt-list--mosaic .prompt-card--medium .prompt-content {
  max-height: 10.8rem;
}

.prompt-list--mosaic .prompt-card--long .prompt-content {
  max-height: 15.5rem;
}

.viewer-prompt-content.markdown-body {
  white-space: normal;
}

@media (max-width: 719px) {
  .markdown-composer {
    grid-template-columns: minmax(0, 1fr);
  }

  .markdown-preview {
    min-height: 220px;
    max-height: 360px;
  }
}

.prompt-card-header {
  padding: 0 42px 11px 0;
  border-bottom: 1px solid rgba(216, 208, 195, 0.72);
}

.prompt-list--titles .prompt-card-header {
  padding: 0;
  border-bottom: 0;
}

.markdown-body h1 {
  font-size: 1.38em;
}

.markdown-body h2 {
  font-size: 1.2em;
}

.markdown-body h3 {
  font-size: 1.08em;
}

.markdown-body--card h1 {
  font-size: 1.05em;
}

.markdown-body--card h2 {
  font-size: 1.02em;
}

.markdown-body--card h3,
.markdown-body--card h4,
.markdown-body--card h5,
.markdown-body--card h6 {
  font-size: 1em;
}

.markdown-body--card h1,
.markdown-body--card h2,
.markdown-body--card h3,
.markdown-body--card h4,
.markdown-body--card h5,
.markdown-body--card h6 {
  margin-top: 0.95em;
  letter-spacing: -0.015em;
}

.composer-screen,
.viewer-screen,
.delete-screen {
  padding: 14px;
  overflow: hidden;
}

.composer-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(100%, 1180px);
  height: min(760px, calc(100dvh - 28px));
  max-height: calc(100dvh - 28px);
  padding: clamp(18px, 2.6vw, 28px);
  overflow: hidden;
}

.composer-header {
  align-items: center;
  flex-direction: row;
}

.composer-close {
  width: auto;
}

.prompt-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  min-height: 0;
  margin-top: 14px;
  overflow: hidden;
}

.prompt-content-field {
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.markdown-composer {
  min-height: 0;
}

.markdown-pane {
  min-height: 0;
}

.markdown-pane textarea {
  height: 100%;
  min-height: 0;
  resize: none;
  overflow: auto;
  scrollbar-width: none;
}

.markdown-pane textarea::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.markdown-preview {
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow: auto;
  scrollbar-width: none;
}

.markdown-preview::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.viewer-dialog {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  width: min(100%, 1080px);
  max-height: calc(100dvh - 28px);
  padding: clamp(18px, 2.6vw, 28px);
}

.viewer-content {
  grid-template-rows: auto minmax(0, 1fr);
}

.viewer-meta {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(216, 208, 195, 0.72);
}

.viewer-prompt-content {
  min-height: 0;
  max-height: none;
  scrollbar-width: none;
}

.viewer-prompt-content::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.category-screen,
.category-dialog,
.markdown-table-wrap,
.markdown-body pre {
  scrollbar-width: none;
}

.category-screen::-webkit-scrollbar,
.category-dialog::-webkit-scrollbar,
.markdown-table-wrap::-webkit-scrollbar,
.markdown-body pre::-webkit-scrollbar {
  width: 0;
  height: 0;
}

@media (min-width: 720px) and (max-width: 1199px) {
  .app-shell {
    min-height: 0;
    height: 100%;
  }

  .main-layout,
  .library-panel {
    overflow: hidden;
  }

  .library-panel {
    min-height: 0;
    height: 100%;
  }

  .library-body {
    overflow-y: auto;
  }
}

@media (max-width: 719px) {
  .app-shell {
    min-height: 0;
    height: 100%;
  }

  .main-layout,
  .library-panel {
    overflow: hidden;
  }

  .library-panel {
    min-height: 0;
    height: 100%;
  }

  .library-body {
    overflow-y: auto;
  }

  .composer-screen,
  .viewer-screen,
  .delete-screen {
    padding: 10px;
  }

  .composer-dialog,
  .viewer-dialog {
    max-height: calc(100dvh - 20px);
    padding: 16px;
  }

  .composer-dialog {
    height: calc(100dvh - 20px);
  }

  .composer-header {
    align-items: center;
    flex-direction: row;
  }

  .composer-close {
    width: auto;
  }

  .markdown-composer {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

.prompt-content.is-truncated {
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 calc(100% - 20px),
    rgba(0, 0, 0, 0.84) calc(100% - 10px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 calc(100% - 20px),
    rgba(0, 0, 0, 0.84) calc(100% - 10px),
    transparent 100%
  );
}

.library-body.has-more-below {
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 calc(100% - 24px),
    rgba(0, 0, 0, 0.86) calc(100% - 12px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 calc(100% - 24px),
    rgba(0, 0, 0, 0.86) calc(100% - 12px),
    transparent 100%
  );
}

/* Acceso de edición con PIN */

.pin-screen {
  position: fixed;
  inset: 0;
  z-index: 38;
  display: none;
  min-height: 100vh;
  padding: 20px;
  overflow: auto;
  background: rgba(247, 245, 239, 0.8);
  backdrop-filter: blur(18px);
}

.pin-screen.is-open {
  display: grid;
  align-items: center;
}

.pin-dialog {
  display: grid;
  gap: 20px;
  width: min(100%, 420px);
  margin: auto;
  padding: clamp(22px, 4vw, 30px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.pin-heading {
  display: grid;
  gap: 8px;
}

.pin-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.pin-form {
  display: grid;
  gap: 12px;
}

.pin-input {
  height: 58px;
  padding: 0 16px;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  letter-spacing: 0.35em;
  text-align: center;
}

.pin-input::placeholder {
  letter-spacing: 0.3em;
}

.pin-error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 0.82rem;
  line-height: 1.4;
}

.pin-screen.is-locked .pin-dialog {
  border-color: #e9b6ad;
}

.pin-screen.is-locked .pin-input {
  cursor: not-allowed;
  opacity: 0.58;
}

.pin-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.pin-actions button {
  width: 100%;
}

.recovery-screen {
  position: fixed;
  inset: 0;
  z-index: 39;
  display: none;
  min-height: 100vh;
  padding: 20px;
  overflow: auto;
  background: rgba(247, 245, 239, 0.86);
  backdrop-filter: blur(18px);
}

.recovery-screen.is-open {
  display: grid;
  align-items: center;
}

.recovery-dialog {
  display: grid;
  gap: 20px;
  width: min(100%, 420px);
  margin: auto;
  padding: clamp(22px, 4vw, 30px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.recovery-heading {
  display: grid;
  gap: 8px;
}

.recovery-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.recovery-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.recovery-actions button {
  width: 100%;
}

.recovery-page {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: auto;
}

.recovery-page-shell {
  display: grid;
  align-content: center;
  width: calc(100% - 32px);
  max-width: 620px;
  min-height: 0;
  gap: 18px;
  margin: 0 auto;
  padding: 24px 0;
}

.recovery-page-brand {
  width: fit-content;
}

.recovery-page-panel {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 30px);
}

.recovery-page-status {
  min-height: 22px;
  margin: 0;
  color: var(--muted-strong);
}

.recovery-pin-form {
  display: grid;
  gap: 14px;
}

.recovery-pin-form[hidden] {
  display: none;
}

.recovery-pin-form .field-group {
  display: grid;
  gap: 7px;
}

.recovery-pin-form .field-group > span {
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.recovery-pin-form input {
  height: 52px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 760;
  letter-spacing: 0.3em;
}

.recovery-back-link {
  width: 100%;
  text-decoration: none;
}

.recovery-back-link[hidden] {
  display: none;
}

@media (max-width: 719px) {
  .pin-screen,
  .recovery-screen {
    padding: 10px;
  }

  .pin-dialog,
  .recovery-dialog {
    border-radius: 22px;
    padding: 20px;
  }

  .pin-actions,
  .recovery-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Visibilidad, filtros y acciones discretas de las tarjetas. */

.library-filter-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 5px 2px 12px;
  color: var(--muted-strong);
  font-size: 0.79rem;
  font-weight: 650;
}

.clear-filters-button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.direction-button {
  width: 100%;
  padding: 0 8px;
  font-size: 0.82rem;
}

.prompt-options {
  grid-template-columns: minmax(112px, 0.26fr) minmax(145px, 0.3fr) minmax(0, 1fr);
}

.privacy-form-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(251, 250, 247, 0.78));
  color: var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    var(--shadow-card);
  text-align: left;
}

.privacy-form-toggle.is-active {
  border-color: #c2d2e0;
  background: #eef3f8;
}

.privacy-form-toggle:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.privacy-form-toggle:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.privacy-form-icon {
  font-size: 1.18rem;
}

.prompt-private-tag {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  padding: 4px 9px;
  border: 1px solid #cbd8e6;
  border-radius: 999px;
  background: #eff4f9;
  color: #4c6279;
  font-size: 0.72rem;
  font-weight: 740;
}

@media (min-width: 1200px) {
  .library-controls {
    grid-template-columns: minmax(245px, 1.4fr) repeat(3, minmax(140px, 1fr));
  }

  .library-controls .search-field {
    grid-column: span 2;
  }
}

@media (min-width: 720px) and (max-width: 1199px) {
  .library-controls {
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(145px, 1fr));
  }

  .prompt-options {
    grid-template-columns: minmax(112px, 0.26fr) minmax(145px, 0.3fr) minmax(0, 1fr);
  }
}

@media (max-width: 719px) {
  .prompt-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .library-filter-summary {
    flex-wrap: wrap;
  }

  .prompt-list--titles .prompt-favorite-tag {
    grid-column: 1;
  }
}

/* Barra compacta: búsqueda y vista siempre visibles; filtros complementarios desplegables. */

.app-shell {
  min-height: calc(100dvh - 54px);
  height: auto;
  grid-template-rows: auto 1fr;
}

.main-layout {
  overflow: visible;
}

.library-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  height: auto;
  overflow: visible;
}

.library-body {
  overflow: visible;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}

.library-header {
  position: relative;
  z-index: 9;
}

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 196px auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.library-toolbar .search-field,
.library-toolbar .view-field {
  min-width: 0;
}

.library-toolbar .search-field input,
.library-toolbar .view-field .select-button {
  height: 43px;
}

.library-toolbar .search-field input {
  padding-left: 17px;
}

.library-filters-details {
  position: relative;
  z-index: 15;
}

.filters-summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 43px;
  min-width: 118px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 720;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.filters-summary::-webkit-details-marker {
  display: none;
}

.filters-summary > svg {
  width: 18px;
  height: 18px;
}

.filters-summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.library-filters-details[open] > .filters-summary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.filters-active-count {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 0.68rem;
  font-weight: 800;
}

.filters-active-count[hidden] {
  display: none;
}

.library-filters-details[open] .filters-active-count {
  background: white;
  color: var(--accent);
}

.library-filters-details .library-controls {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  width: min(720px, calc(100vw - 54px));
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 22px 56px rgba(36, 34, 30, 0.16);
}

.library-filters-details .library-controls > * {
  grid-column: auto;
}

.library-filters-details .library-controls .select-menu {
  min-width: 100%;
}

.library-filter-summary {
  padding: 4px 2px 7px;
  min-height: 35px;
}

.library-filter-summary .clear-filters-button {
  background: transparent;
  box-shadow: none;
  border-color: transparent;
  color: var(--muted-strong);
}

.library-filter-summary .clear-filters-button:hover,
.library-filter-summary .clear-filters-button:focus-visible {
  border-color: var(--border);
  background: var(--surface-soft);
  color: var(--text);
}

/* Cinta de favorito en la esquina inferior izquierda, con el acento oscuro de Promptario. */

.prompt-card {
  overflow: hidden;
}

.prompt-favorite-ribbon {
  position: absolute;
  z-index: 1;
  bottom: 23px;
  left: -38px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 143px;
  height: 27px;
  border-top: 1px solid rgba(255, 255, 255, 0.42);
  border-bottom: 1px solid rgba(255, 255, 255, 0.42);
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  transform: rotate(45deg);
  transform-origin: center;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(36, 34, 30, 0.16);
}

.prompt-card--favorite .prompt-content {
  margin-bottom: 43px;
}

.prompt-list--titles .prompt-favorite-ribbon {
  bottom: 19px;
  left: -34px;
  width: 122px;
  height: 21px;
  font-size: 0.58rem;
}

.prompt-list--titles .prompt-card--favorite .prompt-card-header {
  padding-left: 66px;
}

.prompt-list--titles .prompt-card--favorite {
  min-height: 70px;
}

.prompt-list--grid .prompt-card {
  min-height: 246px;
}

.prompt-list--mosaic .prompt-card {
  break-inside: avoid;
}

@media (max-width: 900px) {
  .library-filters-details .library-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(450px, calc(100vw - 40px));
  }
}

@media (max-width: 719px) {
  .app-shell {
    min-height: 100dvh;
  }

  .library-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
  }

  .library-toolbar .search-field {
    grid-column: 1 / -1;
  }

  .library-toolbar .view-field {
    grid-column: 1;
  }

  .library-filters-details {
    grid-column: 2;
  }

  .filters-summary {
    min-width: 105px;
    padding: 0 10px;
  }

  .library-filters-details .library-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: min(65vh, 440px);
    overflow-y: auto;
    width: min(360px, calc(100vw - 42px));
    gap: 10px;
    padding: 13px;
  }

  .library-filters-details .custom-select .select-menu {
    display: none;
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    min-width: 0;
    width: 100%;
    max-height: 178px;
    margin-top: 6px;
    transform: none;
  }

  .library-filters-details .custom-select.is-open .select-menu {
    display: grid;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .library-filter-summary {
    gap: 5px;
  }

  .prompt-list--titles .prompt-card {
    column-gap: 8px;
  }

  .prompt-list--titles .prompt-card--favorite .prompt-card-header {
    padding-left: 44px;
  }

  .prompt-list--titles .prompt-favorite-ribbon {
    left: -39px;
    width: 118px;
  }
}

@media (max-width: 390px) {
  .library-filters-details .library-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .library-filter-summary .clear-filters-button {
    padding: 0 4px;
  }
}

/* El panel flotante no debe heredar el ancho máximo del contenedor de filtros. */

.library-filters-details .library-controls {
  max-width: none;
}

/* En el índice, acciones y título ocupan columnas distintas en pantallas pequeñas. */

@media (max-width: 719px) {
  .prompt-list--titles .prompt-card {
    grid-template-columns: minmax(0, 1fr) 112px;
    grid-template-rows: auto auto;
    align-items: center;
    min-height: 84px;
  }

  .prompt-list--titles .prompt-card-header {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
  }

  .prompt-list--titles .copy-button {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .prompt-list--titles .prompt-actions {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    gap: 4px;
  }

  .prompt-list--titles .prompt-actions .icon-button {
    flex-basis: 32px;
    min-height: 32px;
    width: 32px;
    height: 32px;
  }
}

.library-filter-summary .clear-filters-button:disabled {
  display: none;
}

/* Identidad visual de la biblioteca: retícula y controles definidos en la guía. */

:root {
  --bg: #f5f2ec;
  --surface: #fffdfa;
  --surface-soft: #fffdfa;
  --text: #292824;
  --muted: #706c65;
  --muted-strong: #706c65;
  --border: #dad4ca;
  --border-strong: #9c958a;
  --accent: #773d4a;
  --accent-soft: #e8dfd5;
  --danger: #a13d32;
  --danger-soft: #fff1ef;
  --shadow: none;
  --shadow-soft: 0 10px 26px rgba(41, 40, 36, 0.1);
  --shadow-card: none;
  --shadow-card-hover: none;
  --shadow-control: none;
  --radius-xl: 10px;
  --radius-lg: 10px;
  --radius-md: 6px;
  --radius-sm: 6px;
  --max-width: 100%;
}

html {
  background: var(--bg);
}

body {
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
}

.app-shell {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  grid-template-rows: 88px minmax(0, 1fr);
  width: 100%;
  min-height: calc(100vh - 46px);
  height: auto;
  margin: 0;
  padding: 0;
  gap: 0;
  max-width: none;
}

.site-header {
  grid-column: 1/-1;
  grid-row: 1;
  background: #fffdfa;
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  min-height: 88px;
  z-index: 20;
}

.topbar {
  height: 100%;
}

.brand {
  display: flex;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: #773d4a;
  color: white;
  border-radius: 5px 10px 10px 5px;
  filter: none;
  font:
    italic 31px/1 Georgia,
    serif;
  padding: 0 0 4px 0;
}

.brand-name {
  font:
    bold 27px/1.1 Georgia,
    "Times New Roman",
    serif;
  letter-spacing: -0.035em;
  color: #292824;
}

.brand-divider {
  height: 24px;
  width: 1px;
  background: var(--border);
}

.brand-subtitle {
  color: #706c65;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}

.topbar-actions {
  gap: 12px;
}

.primary-button,
.ghost-button,
.danger-button {
  border-radius: 6px;
  font-size: 13px;
  font-weight: 650;
  box-shadow: none;
}

.primary-button {
  background: var(--accent);
  border-color: var(--accent);
}

.primary-button:hover {
  background: #60303b;
  border-color: #60303b;
  box-shadow: none;
}

.topbar-action {
  min-height: 40px;
  padding: 0 16px;
}

.button-plus {
  display: inline;
  font-size: 22px;
  line-height: 0;
  margin-right: 7px;
  font-weight: 400;
  vertical-align: -1px;
}

.library-sidebar {
  grid-column: 1;
  grid-row: 2;
  background: #eeeae2;
  border-right: 1px solid var(--border);
  padding: 30px 14px 30px;
  min-width: 0;
}

.sidebar-heading {
  margin: 0 0 9px;
  font:
    10px/1.3 ui-monospace,
    monospace;
  letter-spacing: 0.04em;
  color: #8b857b;
}

.sidebar-group {
  display: grid;
  gap: 4px;
}

.sidebar-category-group {
  margin-top: 33px;
}

.sidebar-link,
.sidebar-category {
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  color: #33302e;
  border: 0;
  background: transparent;
  font-size: 12px;
  line-height: 1.35;
  border-radius: 6px;
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.sidebar-link > span:nth-of-type(1) {
  flex: 1;
}

.sidebar-count {
  margin-left: auto;
  color: #8b857b;
  font-size: 11px;
  font-weight: 400;
}

.sidebar-link.is-active {
  background: #e8dfd5;
  color: var(--accent);
  font-weight: 680;
}

.sidebar-link:hover,
.sidebar-category:hover,
.sidebar-link:focus-visible,
.sidebar-category:focus-visible {
  background: #e6ded6;
  outline: none;
}

.sidebar-link.is-active:hover {
  background: #e2d6c8;
}

.sidebar-category-list {
  display: grid;
  gap: 2px;
}

.sidebar-category {
  padding: 7px 10px;
  min-height: 37px;
}

.sidebar-category.is-active {
  color: var(--accent);
  font-weight: 700;
}

.sidebar-note {
  margin-top: 46px;
  border-top: 1px solid var(--border);
  padding: 23px 10px 0;
}

.sidebar-note svg {
  color: var(--accent);
  width: 19px;
  height: 19px;
}

.sidebar-note p {
  margin: 13px 0 12px;
  color: #292824;
  font:
    18px/1.32 Georgia,
    serif;
}

.sidebar-note small {
  color: #706c65;
  font-size: 12px;
  line-height: 1.55;
  display: block;
}

.main-layout {
  grid-column: 2;
  grid-row: 2;
  display: block;
  overflow: visible;
  min-width: 0;
  padding: 32px 32px 26px;
}

.library-panel {
  isolation: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  height: auto;
  min-height: 100%;
  overflow: visible;
}

.library-intro {
  padding: 0 0 25px;
}

.library-intro-top {
  font:
    11px/1.4 ui-monospace,
    monospace;
  color: var(--accent);
  margin: 0 0 13px;
  letter-spacing: 0.015em;
}

.library-title-line {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.library-title-line h1 {
  margin: 0;
  font:
    normal clamp(34px, 3.45vw, 48px) / 1.12 Georgia,
    "Times New Roman",
    serif;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

#section-counter {
  color: #706c65;
  font:
    13px/1.3 ui-monospace,
    monospace;
}

.library-intro > p {
  color: #706c65;
  margin: 11px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

.library-header {
  position: relative;
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.search-field {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
}

.search-field > svg {
  position: absolute;
  z-index: 1;
  top: 17px;
  left: 16px;
  width: 20px;
  height: 20px;
  color: #706c65;
}

.search-field input {
  height: 52px;
  width: 100%;
  background: #fffdfa;
  border: 1px solid #9c958a;
  border-radius: 6px;
  box-shadow: none;
  padding: 0 63px 0 45px;
  font-size: 14px;
}

.search-field input::placeholder {
  color: #706c65;
  opacity: 1;
}

.search-field kbd {
  position: absolute;
  right: 15px;
  color: #8b857b;
  font:
    11px ui-monospace,
    monospace;
  pointer-events: none;
}

.library-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.library-toolbar .custom-select,
.library-toolbar .favorite-filter-field,
.library-toolbar .direction-field {
  display: block;
  flex: none;
  min-width: 0;
}

.library-toolbar .select-button {
  min-height: 42px;
  height: 42px;
  width: auto;
  background: #fffdfa;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #292824;
  box-shadow: none;
}

.library-toolbar .select-button:hover {
  background: #fff;
  border-color: #9c958a;
}

.library-toolbar .select-button > svg {
  width: 15px;
  height: 15px;
  margin-left: 6px;
}

.library-toolbar .select-button > span {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
}

.control-prefix {
  white-space: nowrap;
}

.library-toolbar .favorite-filter-button.is-active {
  color: var(--accent);
  border-color: #b9a897;
  background: #e8dfd5;
}

.library-toolbar .direction-button {
  width: auto;
}

.library-toolbar .direction-button .direction-value {
  white-space: nowrap;
}

.select-menu {
  width: max(100%, 190px);
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fffdfa;
  padding: 4px;
  box-shadow: var(--shadow-soft);
}

.select-option {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 450;
}

.select-option.is-selected {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
}

.custom-select.is-open .select-button {
  background: #e8dfd5;
  border-color: #b9a897;
  color: var(--accent);
  box-shadow: none;
}

.view-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  margin-left: auto;
  height: 42px;
  background: #fffdfa;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.view-switch-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 34px;
  background: transparent;
  color: #706c65;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 6px;
}

.view-switch-button svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.6px;
}

.view-switch-button.is-active {
  background: #e8dfd5;
  color: var(--accent);
  border-color: #d8c8b7;
}

.view-switch-button:hover {
  color: var(--accent);
}

.library-filters-details {
  display: block;
  position: relative;
  z-index: 8;
  align-self: flex-end;
  margin-top: 5px;
}

.library-filters-details > .filters-summary {
  min-width: 0;
  height: auto;
  padding: 2px;
  border: 0;
  color: #8b857b;
  background: transparent;
  font-size: 10px;
  font-weight: 450;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.library-filters-details[open] > .filters-summary {
  background: transparent;
  border: 0;
  color: var(--accent);
}

.library-filters-details .library-controls {
  position: absolute;
  right: 0;
  left: auto;
  top: calc(100% + 4px);
  grid-template-columns: minmax(0, 1fr);
  width: 220px;
  min-width: 0;
  padding: 14px;
  background: #fffdfa;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.library-filters-details .library-controls > * {
  min-width: 0;
  grid-column: 1;
}

.library-filters-details .library-controls > [hidden] {
  display: none !important;
}

.library-filters-details .library-controls .select-menu {
  width: 100%;
}

.library-filter-summary {
  min-height: 39px;
  padding: 10px 0 12px;
  font-size: 12px;
  line-height: 1.5;
  color: #706c65;
  font-weight: 400;
}

.results-meta {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
}

.results-meta > span {
  color: #706c65;
  white-space: nowrap;
}

.clear-filters-button,
.results-meta .ghost-button {
  min-height: 0;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: #773d4a;
  font-size: 11px;
  box-shadow: none;
}

.clear-filters-button:disabled {
  display: none;
}

#lock-vault-button[hidden],
#unlock-vault-button[hidden] {
  display: none !important;
}

.library-body {
  flex: 1;
  overflow: visible;
  min-height: 0;
  padding: 0;
  border-radius: 0;
}

.prompt-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 0;
  align-items: stretch;
}

.prompt-list--grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  grid-auto-rows: auto;
}

.prompt-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 303px;
  padding: 14px 14px 12px;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fffdfa;
  box-shadow: none;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.prompt-card:hover {
  background: #fffdfa;
  border-color: #a9a198;
  box-shadow: none;
}

.prompt-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  min-width: 0;
  gap: 10px;
  padding: 0;
  min-height: 39px;
}

.prompt-card-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.28;
  font-weight: 720;
  color: #292824;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  max-height: 3.85em;
  overflow: hidden;
}

.prompt-card-header .copy-button {
  position: static;
  flex: 0 0 auto;
  margin: -4px -6px 0 0;
}

.prompt-card-categories {
  padding: 9px 0 9px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
  min-height: 47px;
}

.category-badges {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.category-badge,
.category-badge--empty {
  min-height: 21px;
  padding: 3px 9px;
  border: 0;
  background: #ebe8e2;
  color: #706c65;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 400;
}

.category-badge--empty {
  opacity: 0.7;
}

.prompt-content {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
  overflow: hidden;
  color: #706c65;
  margin: 0;
  font-size: 13px;
  line-height: 1.56;
  max-height: 11em;
  overflow-wrap: anywhere;
}

.prompt-content.markdown-body {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.prompt-content.markdown-body > *:first-child {
  margin-top: 0;
}

.prompt-content.markdown-body > *:last-child {
  margin-bottom: 0;
}

.prompt-content.markdown-body p,
.prompt-content.markdown-body li {
  font-size: inherit;
  line-height: inherit;
  margin: 0 0 5px;
  color: inherit;
}

.prompt-content.markdown-body h1,
.prompt-content.markdown-body h2,
.prompt-content.markdown-body h3 {
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0;
  margin: 0 0 7px;
  line-height: 1.4;
  color: #292824;
}

.prompt-content.markdown-body pre {
  white-space: pre-wrap;
  word-break: break-word;
}

.prompt-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 16px;
}

.prompt-actions {
  display: flex;
  gap: 5px;
  position: static;
  align-items: center;
  margin-left: auto;
}

.prompt-card .icon-button {
  position: static;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  flex: 0 0 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: #706c65;
}

.prompt-card .icon-button svg {
  width: 18px;
  height: 18px;
}

.prompt-card .icon-button:hover,
.prompt-card .icon-button:focus-visible {
  color: var(--accent);
  background: #e8dfd5;
  outline: none;
}

.prompt-card .favorite-button.is-favorite {
  color: var(--accent);
  background: #e8dfd5;
  border-color: #e8dfd5;
}

.prompt-card .favorite-button.is-favorite svg {
  fill: none;
}

.prompt-list--expanded {
  display: grid;
  grid-template-columns: 1fr;
}

.prompt-list--expanded .prompt-card {
  min-height: 178px;
}

.prompt-list--expanded .prompt-content {
  -webkit-line-clamp: 4;
  max-height: 7em;
}

.prompt-list--titles .prompt-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  min-height: 78px;
  align-items: center;
}

.prompt-list--titles .prompt-card-header {
  grid-column: 1 / -1;
  grid-row: 1;
}

.prompt-list--titles .prompt-card-categories {
  grid-column: 1;
  grid-row: 2;
  border: 0;
  padding: 0;
  min-height: 0;
  margin: 0;
}

.prompt-list--titles .prompt-card-footer {
  grid-column: 2;
  grid-row: 2;
  padding: 0;
}

.prompt-list--mosaic {
  column-count: 3;
  display: block;
}

.prompt-list--mosaic .prompt-card {
  min-height: 260px;
  width: 100%;
  margin: 0 0 16px;
}

.prompt-list--mosaic .prompt-content {
  -webkit-line-clamp: 9;
}

.empty-state {
  min-height: 280px;
  padding: 40px 20px;
  background: #fffdfa;
  border: 1px dashed #dad4ca;
  border-radius: 10px;
  box-shadow: none;
}

.empty-state span {
  font:
    24px/1.3 Georgia,
    serif;
  color: #292824;
}

.empty-state p {
  font-size: 13px;
}

.empty-state .primary-button {
  justify-self: center;
  margin-top: 10px;
}

.collection-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border);
  color: #706c65;
  margin-top: 25px;
  padding-top: 18px;
  font-size: 11px;
}

.collection-bottom #collection-end {
  font:
    11px ui-monospace,
    monospace;
}

.site-footer {
  max-width: none;
  width: calc(100% - 208px);
  margin: 0 0 0 auto;
  padding: 10px 32px 17px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  background: #f5f2ec;
  color: #706c65;
  font-size: 11px;
}

.site-footer strong {
  color: inherit;
  font-weight: 400;
}

.site-footer p {
  margin: 0;
}

/* El mismo lenguaje visual se mantiene en formularios y diálogos. */

.panel,
.composer-dialog,
.viewer-dialog,
.pin-dialog,
.recovery-dialog,
.category-dialog,
.delete-dialog {
  background: #fffdfa;
  border-color: #dad4ca;
  box-shadow: none;
}

.composer-dialog,
.viewer-dialog,
.pin-dialog,
.recovery-dialog,
.category-dialog,
.delete-dialog {
  border-radius: 10px;
}

input,
textarea,
select {
  background: #fffdfa;
  border: 1px solid #dad4ca;
  border-radius: 6px;
  box-shadow: none;
}

input:focus,
textarea:focus {
  border-color: #773d4a;
  box-shadow: 0 0 0 2px rgba(119, 61, 74, 0.17);
}

.privacy-form-toggle.is-active,
.favorite-form-toggle.is-active {
  border-color: #b9a897;
  background: #e8dfd5;
}

:focus-visible {
  outline: 2px solid #773d4a;
  outline-offset: 2px;
}

@media (max-width: 1260px) {
  .prompt-list--grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .library-toolbar .select-button {
    padding: 0 9px;
    font-size: 11px;
  }

  .main-layout {
    padding: 30px 26px 24px;
  }
}

@media (max-width: 1000px) {
  .app-shell {
    grid-template-columns: 185px minmax(0, 1fr);
  }

  .site-header {
    padding: 0 24px;
  }

  .library-sidebar {
    padding-left: 10px;
    padding-right: 10px;
  }

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

  .site-footer {
    width: calc(100% - 185px);
  }

  .view-switch {
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 72px auto 1fr;
    min-height: calc(100vh - 56px);
  }

  .site-header {
    min-height: 72px;
    padding: 0 16px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 25px;
  }

  .brand {
    gap: 8px;
  }

  .brand-name {
    font-size: 23px;
  }

  .brand-divider,
  .brand-subtitle {
    display: none;
  }

  .topbar-action {
    padding: 0 12px;
    min-height: 38px;
  }

  .library-sidebar {
    grid-row: 2;
    grid-column: 1;
    padding: 12px 16px 6px;
    display: grid;
    gap: 9px;
    background: #eeeae2;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-heading,
  .sidebar-note,
  .sidebar-category-group {
    display: none;
  }

  .sidebar-group:first-child {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .sidebar-link {
    width: auto;
    min-height: 36px;
    padding: 7px 10px;
    gap: 7px;
    font-size: 11px;
  }

  .sidebar-link svg {
    width: 15px;
    height: 15px;
    flex-basis: 15px;
  }

  .sidebar-link > span:nth-of-type(1) {
    flex: none;
  }

  .main-layout {
    grid-row: 3;
    grid-column: 1;
    padding: 25px 16px;
  }

  .library-title-line h1 {
    font-size: 37px;
  }

  .library-intro {
    padding-bottom: 22px;
  }

  .library-toolbar {
    gap: 7px;
  }

  .library-toolbar .select-button {
    height: 39px;
    min-height: 39px;
  }

  .library-filter-summary {
    align-items: start;
  }

  .site-footer {
    width: 100%;
    padding: 12px 16px 18px;
    flex-wrap: wrap;
  }

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

  .prompt-card {
    min-height: 290px;
  }
}

@media (max-width: 490px) {
  .prompt-list--grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .prompt-card {
    min-height: 240px;
  }

  .search-field input {
    font-size: 12px;
  }

  .library-toolbar .custom-select,
  .library-toolbar .direction-field,
  .library-toolbar .favorite-filter-field {
    flex: 1 1 auto;
  }

  .library-toolbar .select-button {
    width: 100%;
    justify-content: space-between;
  }

  .view-switch {
    margin-left: auto;
  }

  .brand-name {
    font-size: 21px;
  }
}

/* Los encabezados de tarjeta no llevan separación adicional. */

.prompt-card-header {
  border-bottom: 0 !important;
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
  }

  .topbar-actions {
    flex-direction: row;
    align-items: center;
    width: auto;
    gap: 6px;
  }

  .topbar-action,
  .unlock-button {
    width: auto;
    white-space: nowrap;
  }
}

/* Acciones accesibles con un área de interacción de 44 × 44 píxeles. */

.prompt-card .icon-button {
  width: 44px;
  height: 44px;
  min-height: 44px;
  flex-basis: 44px;
}

.prompt-actions {
  gap: 0;
}

.prompt-card-header .copy-button {
  margin: -9px -11px 0 0;
}

@media (max-width: 490px) {
  .prompt-card .icon-button {
    width: 44px;
    height: 44px;
    min-height: 44px;
    flex-basis: 44px;
  }
}

/* La página de recuperación conserva su composición independiente. */

.recovery-page .brand-mark {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.recovery-page .brand-mark img {
  width: 38px;
  height: 38px;
}

.recovery-page .site-footer {
  display: grid;
  width: calc(100% - 32px);
  max-width: 1180px;
  gap: 2px;
  margin: 0 auto;
  padding: 7px 8px 9px;
  text-align: center;
}

/* Iconografía uniforme en componentes y botones. */

.app-icon {
  display: block;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  color: inherit;
  vertical-align: middle;
}

.brand-mark {
  padding: 0;
  overflow: hidden;
  border-radius: 7px;
  background: transparent;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.topbar-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.topbar-action .app-icon {
  width: 17px;
  height: 17px;
  flex-basis: 17px;
}

.search-field input {
  padding-right: 17px;
}

.search-field > .app-icon {
  top: 16px;
  left: 15px;
  width: 20px;
  height: 20px;
}

.view-switch {
  gap: 3px;
}

.view-switch-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 37px;
  height: 34px;
  padding: 7px;
}

.view-switch-button .app-icon {
  width: 19px;
  height: 19px;
  flex: none;
}

.prompt-card .icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.prompt-card .icon-button .app-icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.privacy-form-icon .app-icon,
.favorite-form-icon .app-icon {
  width: 22px;
  height: 22px;
}

/* Los controles de copia indican una acción positiva sin alterar el vino tinto de la interfaz. */

.prompt-card .copy-button:hover,
.prompt-card .copy-button:focus-visible,
.copy-button:hover,
.copy-button:focus-visible {
  color: #2f6549;
  background: #e4eee5;
  border-color: #bbd0be;
}

/* Copiar desde el visor utiliza el mismo estado positivo. */

.viewer-actions #copy-viewer-button:hover,
.viewer-actions #copy-viewer-button:focus-visible {
  color: #fff;
  background: #2f6549;
  border-color: #2f6549;
}

/* Los acentos suaves utilizan tonos de café, no rosa. */

.view-switch-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.privacy-form-toggle:not(.is-active) .privacy-form-icon {
  color: #4f6653;
}

.category-badge {
  border-radius: 7px;
}

.category-item {
  border-radius: 8px;
}

/* Navegación lateral plegable. */

.sidebar-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 25px;
  margin-bottom: 4px;
}

.sidebar-heading-row .sidebar-heading {
  margin: 0;
}

.sidebar-toggle,
.mobile-sidebar-toggle {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  padding: 5px;
  background: transparent;
  color: var(--text-muted, #706c65);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-toggle:hover,
.mobile-sidebar-toggle:hover {
  color: var(--accent);
  background: #e6ded6;
}

.sidebar-toggle .app-icon,
.mobile-sidebar-toggle .app-icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.mobile-sidebar-toggle {
  display: none;
}

.library-sidebar {
  transition: padding 150ms ease;
}

.library-sidebar .sidebar-link > .app-icon {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}

.sidebar-link > span:nth-of-type(1) {
  min-width: 0;
}

.sidebar-category-group {
  margin-top: 25px;
}

.sidebar-category {
  min-height: 32px;
  padding: 5px 10px;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 72px minmax(0, 1fr);
}

body.sidebar-collapsed .library-sidebar {
  padding: 20px 10px;
}

body.sidebar-collapsed .sidebar-heading-row {
  justify-content: center;
}

body.sidebar-collapsed .sidebar-heading-row .sidebar-heading {
  display: none;
}

body.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding: 7px;
  gap: 0;
}

body.sidebar-collapsed .sidebar-link > span,
body.sidebar-collapsed .sidebar-category-group {
  display: none;
}

body.sidebar-collapsed .sidebar-link > .app-icon {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

body.sidebar-collapsed .sidebar-link {
  position: relative;
}

body.sidebar-collapsed .sidebar-link:focus-visible {
  outline: 2px solid var(--accent);
}

/* Tarjetas más compactas, con categorías reconocibles y mejor aprovechamiento del espacio. */

.prompt-list--grid {
  align-items: start;
}

.prompt-list--grid .prompt-card {
  min-height: 258px;
}

.prompt-card {
  padding: 14px;
}

.prompt-card-header {
  min-height: 30px;
}

.prompt-card-categories {
  padding: 3px 0 10px;
  margin-bottom: 10px;
  min-height: 39px;
}

.category-badges {
  gap: 5px;
}

.category-badge,
.category-badge--empty {
  padding: 4px 9px;
  min-height: 23px;
  background: var(--category-bg, #ebe8e2);
  color: var(--category-text, #706c65);
  border: 1px solid var(--category-border, #dad4ca);
  line-height: 1.1;
  font-size: 10.5px;
  font-weight: 550;
}

.prompt-card .prompt-content {
  line-height: 1.52;
}

.prompt-card-footer {
  padding-top: 8px;
}

.prompt-list--expanded .prompt-card {
  min-height: 165px;
}

.prompt-list--expanded .prompt-card-categories {
  min-height: 32px;
  padding: 0 0 6px;
  margin-bottom: 8px;
}

.prompt-list--titles .prompt-card {
  min-height: 69px;
  padding: 10px 14px;
}

.prompt-list--titles .prompt-card-header {
  min-height: 30px;
}

.prompt-list--titles .prompt-card-categories {
  min-height: 0;
  margin: 0;
}

.prompt-list--titles .prompt-card-footer {
  margin: 0;
}

.prompt-list--titles .category-badge {
  min-height: 20px;
  padding: 3px 7px;
}

/* El pie de página forma una sección independiente y centrada. */

.site-footer {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 30px 24px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 6px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.6;
}

.site-footer p {
  text-align: center;
}

.site-footer .footer-brand-link {
  color: var(--accent);
  font-weight: 700;
}

.site-footer .footer-brand-link strong {
  color: inherit;
  font-weight: 700;
}

.site-footer .footer-brand-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer .footer-brand-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.recovery-page .site-footer {
  width: 100%;
  max-width: none;
}

@media (max-width: 1260px) {
  .prompt-list--grid .prompt-card {
    min-height: 255px;
  }
}

@media (max-width: 900px) {
}

@media (max-width: 720px) {
  body.sidebar-collapsed .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .mobile-sidebar-toggle {
    display: flex;
  }

  .sidebar-heading-row {
    display: none;
  }

  .library-sidebar.is-mobile-hidden {
    display: none;
  }

  .app-shell:has(.library-sidebar.is-mobile-hidden) {
    grid-template-rows: 72px 1fr;
  }

  .app-shell:has(.library-sidebar.is-mobile-hidden) .main-layout {
    grid-row: 2;
  }

  body.sidebar-collapsed .library-sidebar {
    padding: 12px 16px 6px;
  }

  body.sidebar-collapsed .sidebar-link {
    justify-content: flex-start;
    padding: 7px 10px;
    gap: 7px;
  }

  body.sidebar-collapsed .sidebar-link > span {
    display: inline;
  }

  .site-footer {
    padding: 26px 15px 32px;
  }
}

@media (max-width: 510px) {
  .brand-name {
    font-size: 20px;
  }

  .topbar-action {
    gap: 5px;
    padding: 0 10px;
    font-size: 11px;
  }

  .topbar-action .app-icon {
    width: 15px;
    height: 15px;
    flex-basis: 15px;
  }

  .view-switch {
    margin-left: auto;
  }

  .view-switch-button {
    width: 35px;
  }
}

/* La estrella activa utiliza el dorado suave de los favoritos. */

.prompt-card .favorite-button.is-favorite,
.favorite-form-toggle.is-active .favorite-form-icon {
  color: #806020;
  background: #f4e9c8;
  border-color: #e4cf94;
}

.prompt-card .favorite-button.is-favorite svg,
.favorite-form-toggle.is-active .favorite-form-icon svg {
  color: #a77d24;
  fill: currentColor;
  stroke: #806020;
}

.favorite-form-toggle.is-active {
  border-color: #d7c391;
  background: #f8f1dd;
}

/* Footer compacto y en flujo normal, sin competir con las tarjetas. */

.site-footer,
.recovery-page .site-footer {
  display: flex;
  width: 100%;
  max-width: none;
  min-height: 44px;
  margin: 0;
  padding: 8px 14px max(8px, env(safe-area-inset-bottom));
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  text-align: center;
  background: var(--bg);
  border-top: 1px solid var(--border);
  font-size: 0.76rem;
  line-height: 1.25;
}

.site-footer .footer-brand-link {
  color: #773d4a;
}

.site-footer p {
  margin: 0;
  text-align: center;
}

/* El título automático se distingue del contenido editable y permanece visible. */
.markdown-editor {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid #dad4ca;
  border-radius: 6px;
  background: #fffdfa;
}

.markdown-editor:focus-within {
  border-color: #773d4a;
  box-shadow: 0 0 0 2px rgba(119, 61, 74, 0.17);
}

.markdown-editor-title {
  display: flex;
  gap: 8px;
  flex: none;
  align-items: baseline;
  padding: 14px 14px 10px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 760;
  line-height: 1.4;
}

.markdown-editor-title-marker {
  flex: none;
  color: var(--muted-strong);
}

.markdown-editor-title .is-placeholder {
  color: #9b968d;
  font-weight: 500;
}

.markdown-editor textarea,
.markdown-editor textarea:focus {
  flex: 1;
  width: 100%;
  height: auto;
  min-height: 0;
  padding-top: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.viewer-actions {
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 719px) {
  .viewer-actions {
    flex-wrap: wrap;
  }

  .viewer-actions button {
    flex: 1 1 180px;
  }
}

/* El visor conserva el título solo en su cabecera y agrupa las acciones secundarias. */
.viewer-actions-secondary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.viewer-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.viewer-action-button .app-icon {
  width: 16px;
  height: 16px;
  flex: none;
}

.viewer-actions .viewer-edit-button {
  padding: 9px 12px;
  font-size: 12px;
}

@media (max-width: 719px) {
  .viewer-actions {
    align-items: stretch;
    gap: 10px;
  }

  .viewer-actions-secondary {
    display: flex;
    flex: 1 1 100%;
    gap: 8px;
  }

  .viewer-actions-secondary .viewer-action-button {
    flex: 1 1 auto;
  }

  .viewer-actions > #copy-viewer-button {
    flex: 1 1 100%;
  }

  /* Cuatro acciones caben sin desbordarse en el índice de títulos. */
  .prompt-list--titles .prompt-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .prompt-list--titles .prompt-card-header,
  .prompt-list--titles .prompt-card-categories,
  .prompt-list--titles .prompt-card-footer {
    width: 100%;
    min-width: 0;
  }

  .prompt-list--titles .prompt-card-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 0;
  }

  .prompt-list--titles .prompt-actions {
    display: flex;
    gap: 0;
    margin-left: auto;
  }
}
