/* Versioned with the iteration-3 cabinet markup so container rollback remains asset-compatible. */
.cabinet-body {
  --ink: #171712;
  --muted: #6f7068;
  --paper: #f3f1e9;
  --card: #fbfaf6;
  --line: rgba(23, 23, 18, .13);
  --accent: #3157e2;
  --accent-dark: #2445bd;
  --shadow: 0 26px 70px rgba(39, 36, 25, .14);
  --radius: 24px;
  color: var(--ink);
  background: radial-gradient(circle at 78% 5%, rgba(49, 87, 226, .09), transparent 29rem), var(--paper);
}

.museum-shell {
  width: min(1520px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0;
}

.museum-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 241, 233, .86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.museum-topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.museum-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-family: Georgia, "Times New Roman", serif;
}

.museum-brand small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.header-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.account-email {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
}

.cabinet-body .ghost,
.cabinet-body .solid,
.cabinet-body .mini-button,
.cabinet-body .view-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, .5);
  transition: .2s;
}

.cabinet-body .ghost:hover,
.cabinet-body .mini-button:hover,
.cabinet-body .view-button:hover {
  color: var(--ink);
  background: #fff;
  border-color: rgba(23, 23, 18, .28);
}

.cabinet-body .solid {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.cabinet-body .solid:hover {
  background: #30302a;
}

.compact {
  min-height: 38px !important;
  padding: 0 13px !important;
}

.cabinet-page {
  min-width: 0;
}

.museum-hero {
  padding: 70px 0 36px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr);
  align-items: end;
  gap: 48px;
}

.cabinet-body .eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin: 0 0 18px;
}

.museum-hero h1 {
  margin: 0;
  max-width: 880px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(50px, 7vw, 112px);
  line-height: .89;
  letter-spacing: -.065em;
  font-weight: 500;
}

.museum-hero h1 em {
  color: var(--accent);
  font-weight: 500;
}

.hero-copy {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.hero-copy p {
  margin: 0;
}

.hero-stat {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 30px;
}

.hero-stat strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 48px;
  font-weight: 500;
  color: var(--ink);
}

.hero-stat span {
  max-width: 135px;
  font-size: 13px;
  line-height: 1.25;
}

.catalog-bar {
  padding: 22px 0 18px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(210px, auto);
  gap: 12px;
  align-items: center;
}

.search,
.case-input,
.answer,
.cabinet-body select {
  min-width: 0;
  font: inherit;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .55);
  outline: none;
}

.search {
  width: 100%;
  height: 48px;
  padding: 0 18px;
  border-radius: 15px;
}

.case-input,
.answer {
  padding: 14px 15px;
  border-radius: 16px;
}

.search:focus,
.case-input:focus,
.answer:focus,
.cabinet-body select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(49, 87, 226, .08);
}

.sort-label {
  color: var(--muted);
  font-size: 12px;
}

.cabinet-body select {
  height: 42px;
  border-radius: 999px;
  padding: 0 34px 0 14px;
}

.result-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
  margin: 7px 0 18px;
}

.object-tabs {
  display: flex;
  gap: 8px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.object-tab {
  min-height: 42px;
  padding: 0 18px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
}

.object-tab.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.empty-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.case-catalog {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 15px;
  padding-bottom: 90px;
}

.achievement {
  --tone: #3157e2;
  position: relative;
  min-width: 0;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  isolation: isolate;
  transition: .26s;
}

.achievement::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 270px;
  height: 270px;
  right: -110px;
  top: -110px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tone) 15%, transparent);
}

.achievement:hover,
.achievement:focus-visible {
  transform: translateY(-7px);
  box-shadow: var(--shadow);
  border-color: transparent;
  outline: none;
}

.card-top {
  padding: 22px 22px 0;
  display: flex;
  justify-content: space-between;
}

.category {
  color: var(--tone);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.index {
  color: #9a9a90;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
}

.metric-stage {
  min-height: 160px;
  padding: 22px;
  display: flex;
  align-items: end;
}

.metric {
  color: var(--tone);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 3.5vw, 66px);
  line-height: .9;
  letter-spacing: -.06em;
  overflow-wrap: anywhere;
}

.metric-empty {
  color: var(--muted);
  font-size: 27px;
  letter-spacing: -.035em;
}

.memory-card .metric {
  display: -webkit-box;
  overflow: hidden;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.45;
  letter-spacing: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.card-body {
  margin-top: auto;
  padding: 22px;
  border-top: 1px solid var(--line);
}

.card-body h2 {
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.27;
}

.updated-at {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.card-arrow {
  position: absolute;
  right: 19px;
  bottom: 18px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  opacity: 0;
  transition: .22s;
}

.achievement:hover .card-arrow,
.achievement:focus-visible .card-arrow {
  opacity: 1;
}

.museum-empty {
  max-width: 720px;
  margin: 30px auto 80px;
  padding: 48px;
  color: var(--ink);
  background: rgba(251, 250, 246, .72);
  border: 1px dashed rgba(49, 87, 226, .34);
  border-radius: var(--radius);
  text-align: center;
}

.museum-empty h2 {
  margin-bottom: 12px;
  font: 500 38px/1.05 Georgia, "Times New Roman", serif;
}

.museum-empty p:not(.eyebrow) {
  max-width: 550px;
  margin: 0 auto 24px;
  color: var(--muted);
  line-height: 1.6;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(20, 20, 16, .52);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: .25s;
}

.overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(85vw, 1480px);
  border-radius: 30px;
  background: #fbfaf6;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .3);
  transform: translateX(calc(100% + 24px));
  transition: .34s;
  overflow: auto;
}

.overlay.open .drawer {
  transform: none;
}

.cabinet-body .drawer-close {
  position: sticky;
  float: right;
  top: 22px;
  margin: 22px 22px 0 0;
  z-index: 5;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 20px;
}

.case-hero {
  --tone: #3157e2;
  padding: 52px 52px 42px;
  min-height: 330px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 48px;
  position: relative;
  overflow: hidden;
}

.case-hero::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tone) 12%, transparent);
  right: -180px;
  top: -220px;
}

.case-title {
  margin: 24px 0 0;
  font-size: clamp(28px, 3vw, 48px);
  line-height: 1.04;
  letter-spacing: -.045em;
}

.case-intro {
  align-self: end;
  max-width: 470px;
  z-index: 1;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.workspace {
  padding: 34px 52px 70px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  gap: 34px;
  align-items: start;
}

.single-workspace {
  display: block;
  max-width: 820px;
}

.story-column,
.context-column {
  min-width: 0;
}

.drawer-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.section-title {
  margin: 0 0 8px;
  font: 500 30px Georgia, "Times New Roman", serif;
}

.section-note {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.story-block {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.story-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.story-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.65;
}

.memory-hero::after { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.memory-source-input { min-height: 280px; }
.result-chip { width: fit-content; margin: 18px 0; border-style: dashed !important; color: var(--accent) !important; }
.linked-heading { margin: 12px 0 0; font-size: 15px; }
.linked-list { display: grid; gap: 10px; min-width: 0; }
.linked-card { min-width: 0; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.linked-card-head { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: stretch; }
.linked-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; min-height: 58px; padding: 12px 10px 12px 14px; color: var(--ink); background: transparent; border: 0; border-radius: 0; text-align: left; }
.linked-toggle:hover { color: var(--accent); background: rgba(49, 87, 226, .045); }
.linked-copy { display: grid; gap: 5px; min-width: 0; }
.linked-copy strong,.linked-copy span { min-width: 0; overflow-wrap: anywhere; }
.linked-copy span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.linked-chevron { display: grid; place-items: center; flex: 0 0 22px; transition: transform .2s; }
.linked-toggle[aria-expanded="true"] .linked-chevron { transform: rotate(180deg); }
.linked-chevron svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.linked-detail { max-height: 360px; padding: 0 14px 14px; overflow: auto; border-top: 1px solid var(--line); user-select: text; }
.linked-detail .story-block:first-child { border-top: 0; }
.linked-detail.error { color: #812c2c; }
.link-select { width: 100%; max-width: 100%; }

.relationship-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.relationship-heading .section-title { margin: 0; }
.relationship-actions { display: flex; gap: 8px; }
.icon-button,.dialog-close { position: relative; display: grid; place-items: center; width: 44px; min-width: 44px; height: 44px; padding: 0; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 50%; }
.icon-button svg,.dialog-close svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:hover,.dialog-close:hover { color: #fff; background: var(--accent); border-color: var(--accent); }
.unlink-button { align-self: center; margin-right: 4px; color: #8d3939; }
.icon-button[data-tooltip]::after { content: attr(data-tooltip); position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 5; width: max-content; max-width: 220px; padding: 7px 9px; color: #fff; background: var(--ink); border-radius: 8px; font-size: 11px; line-height: 1.3; opacity: 0; pointer-events: none; transform: translateY(4px); transition: .15s; }
.icon-button[data-tooltip]:hover::after,.icon-button[data-tooltip]:focus-visible::after { opacity: 1; transform: none; }
.icon-button:focus-visible,.linked-toggle:focus-visible,.dialog-close:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 2px; }
.link-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 12px; background: #f4f2eb; border-radius: 14px; }
.object-delete { width: 100%; margin-top: 28px; }
.clarification-composer { display: grid; gap: 12px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.inline-editor,.inline-title-editor { padding-top: 16px; }
.inline-title-editor { margin-bottom: 18px; }

.action-dialog { width: min(92vw, 720px); max-height: min(88vh, 820px); padding: 0; color: var(--ink); background: #fbfaf6; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 36px 100px rgba(0, 0, 0, .34); overflow: auto; }
.action-dialog::backdrop { background: rgba(20, 20, 16, .55); backdrop-filter: blur(7px); }
.dialog-heading { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px 16px; background: rgba(251, 250, 246, .96); border-bottom: 1px solid var(--line); }
.dialog-title { margin: 0; font: 500 28px Georgia, "Times New Roman", serif; }
.dialog-close.rotated { transform: rotate(45deg); }
.modal-form { padding: 24px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.empty-copy {
  color: var(--muted);
  font-style: italic;
}

.context-column {
  position: sticky;
  top: 28px;
}

.context-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 14px 40px rgba(35, 33, 24, .07);
}

.story-hints {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.answer {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  line-height: 1.55;
}

.case-form {
  display: grid;
  gap: 18px;
  margin: 0;
}

.form-field {
  display: grid;
  gap: 6px;
}

.case-input {
  width: 100%;
  resize: vertical;
  line-height: 1.55;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cabinet-body .danger-button {
  color: #fff;
  background: #a13b3b;
}

.cabinet-body .danger-button:hover {
  background: #812c2c;
}

.delete-confirm {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.delete-confirm p {
  margin: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  max-width: calc(100vw - 24px);
  padding: 12px 16px;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, 20px);
  transition: .2s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1250px) {
  .case-catalog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .context-column {
    position: static;
  }

  .drawer {
    width: calc(100% - 24px);
  }
}

@media (max-width: 780px) {
  .museum-shell {
    width: calc(100% - 28px);
  }

  .museum-topbar {
    min-height: auto;
    padding: 10px 0;
    flex-wrap: wrap;
    gap: 10px;
  }

  .header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .header-add {
    grid-column: 1 / -1;
    width: 100%;
  }

  .header-create-case { grid-column: 1 / -1; width: 100%; }

  .museum-hero {
    grid-template-columns: 1fr;
    padding-top: 48px;
    gap: 30px;
  }

  .catalog-bar {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .sort-label {
    margin-top: 4px;
  }

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

  .case-hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 68px 24px 32px;
    gap: 18px;
  }

  .workspace {
    padding: 24px;
  }

  .drawer {
    inset: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    overflow-x: hidden;
  }

  .result-line span:last-child {
    display: none;
  }
}

@media (max-width: 480px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .museum-brand small {
    font-size: 9px;
  }

  .museum-hero h1 {
    font-size: clamp(44px, 14vw, 64px);
    overflow-wrap: anywhere;
  }

  .achievement {
    min-height: 360px;
  }

  .case-title {
    font-size: 32px;
    overflow-wrap: anywhere;
  }

  .workspace {
    padding: 24px 20px 52px;
  }

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

  .form-actions {
    display: grid;
  }

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

  .object-tabs { overflow-x: auto; }
  .empty-actions { display: grid; }
  .empty-actions button { width: 100%; }

  .context-panel {
    padding: 17px;
  }

  .relationship-heading { align-items: flex-start; }
  .relationship-actions { flex: 0 0 auto; }
  .link-picker { grid-template-columns: minmax(0, 1fr); }
  .action-dialog { width: 100%; max-width: 100%; min-height: 100dvh; max-height: 100dvh; border-radius: 0; }
}

/* Full-page case and memory workspaces (`Каталог достижений_5.html`). */
.cabinet-body {
  --ink: #202124;
  --muted: #6f7479;
  --paper: #f5f6f7;
  --card: #fff;
  --line: #dfe1e4;
  --accent: #1769c2;
  --accent-dark: #0e4f98;
  background: var(--paper);
}

.cabinet-body.detail-mode { background: #fff; }

.cabinet-body .museum-shell {
  width: min(1360px, calc(100% - 48px));
}

.cabinet-body .museum-header {
  position: sticky;
  min-height: 68px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}

.cabinet-body .museum-topbar { min-height: 68px; }
.cabinet-body .museum-brand { font-weight: 750; }
.cabinet-body .brand-mark { width: 36px; height: 36px; color: var(--ink); background: #fff; border: 1px solid var(--ink); }
.cabinet-body .global-nav { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.cabinet-body .global-nav-button {
  min-height: 44px;
  padding: 0 18px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 700;
}
.cabinet-body .global-nav-button.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.profile-wrap { position: relative; }
.profile-button {
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-weight: 750;
}
.profile-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: 280px;
  padding: 16px;
  display: grid;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .12);
}
.profile-popover[hidden] { display: none; }
.profile-popover .account-email { max-width: 100%; }

.cabinet-page { min-height: calc(100dvh - 69px); }
.page-loading, .route-error { padding: 80px 0; color: var(--muted); }
.list-page { padding: 48px 0 80px; }
.list-page h1, .relationships-page h1 { margin: 0 0 28px; font-size: clamp(38px, 5vw, 58px); line-height: 1; letter-spacing: -.045em; }
.list-controls { width: min(720px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 12px; margin-bottom: 24px; }
.list-controls label { min-width: 0; }
.list-controls input, .list-controls select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.catalog-card {
  position: relative;
  min-width: 0;
  min-height: 170px;
  padding: 26px 22px 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: left;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.catalog-card:hover, .catalog-card:focus-visible { transform: translateY(-2px); border-color: #aeb4ba; box-shadow: 0 12px 28px rgba(25, 35, 45, .07); }
.catalog-card .card-kind { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.catalog-card strong { max-width: calc(100% - 24px); display: -webkit-box; overflow: hidden; font-size: 20px; line-height: 1.3; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.catalog-card .card-meta { margin-top: auto; color: var(--muted); font-size: 13px; }
.catalog-card .card-arrow { right: 20px; bottom: 20px; width: auto; height: auto; color: var(--accent); background: transparent; opacity: 1; }
.create-card { align-items: center; justify-content: center; text-align: center; }
.create-card > span { font-size: 26px; line-height: 1; }
.create-card strong { font-size: 19px; }
.list-empty { color: var(--muted); }

.detail-page { min-height: calc(100dvh - 69px); padding: 32px 0 70px; background: #fff; }
.back-nav { margin-bottom: 24px; }
.text-action { min-height: 32px; padding: 0; color: var(--accent); background: transparent; border: 0; }
.text-action:hover { color: var(--accent-dark); background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.detail-header { min-width: 0; padding-bottom: 28px; display: flex; align-items: center; justify-content: space-between; gap: 28px; border-bottom: 1px solid var(--line); }
.detail-header > div:first-child { min-width: 0; }
.object-kind { display: block; margin-bottom: 9px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.detail-header h1 { max-width: 900px; margin: 0; font-size: clamp(34px, 4vw, 48px); line-height: 1.04; letter-spacing: -.04em; overflow-wrap: anywhere; }
.detail-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.cabinet-body .secondary, .cabinet-body .primary {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-weight: 700;
}
.cabinet-body .secondary { color: var(--ink); background: #fff; }
.cabinet-body .primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.cabinet-body .primary:disabled { opacity: .42; }
.menu-dots { min-width: 44px; padding: 0 10px !important; letter-spacing: .1em; }
.object-menu { position: relative; }
.object-menu > summary { display: grid; place-items: center; min-height: 44px; list-style: none; cursor: pointer; }
.object-menu > summary::-webkit-details-marker { display: none; }
.object-menu > div { position: absolute; top: calc(100% + 8px); right: 0; z-index: 12; width: 190px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 18px 42px rgba(18, 28, 45, .14); }
.object-menu > div button { width: 100%; padding: 10px 12px; color: #8c3030; background: transparent; border: 0; text-align: left; }
.object-menu > div button:hover { color: #fff; background: #8c3030; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(300px, 1fr); }
.detail-content { min-width: 0; padding: 22px 46px 0 0; }
.case-field, .memory-text { padding: 24px 0; border-bottom: 1px solid var(--line); }
.case-field:first-child { padding-top: 18px; }
.field-heading { min-height: 28px; display: flex; align-items: center; gap: 9px; color: #5d6369; font-size: 12px; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.field-heading .text-action { margin-left: auto; font-size: 13px; font-weight: 650; letter-spacing: 0; text-transform: none; }
.case-field p { margin: 8px 0 0; font-size: 16px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-badge { min-height: 28px; padding: 0 9px; color: #61418c; background: #fff; border: 1px solid #b7a2d4; border-radius: 7px; font-size: 11px; }
.ai-badge:disabled { color: #a1a5a9; background: #f7f7f7; border-color: var(--line); }
.field-input, .memory-editor textarea, .memory-editor input, .title-editor input, .dialog-form textarea, .dialog-form input, .dialog-form select, .local-search input {
  width: 100%;
  min-width: 0;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bfc4c9;
  border-radius: 8px;
  font: inherit;
}
.field-input, .memory-editor textarea, .dialog-form textarea { resize: vertical; line-height: 1.55; }
.editor-actions { margin-top: 12px; display: flex; gap: 9px; }
.scale-options { margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; border: 0; }
.scale-options label { min-height: 42px; padding: 8px 11px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; }
.field-picker { margin-top: 24px; }
.field-picker summary { width: fit-content; min-height: 44px; padding: 0 16px; display: flex; align-items: center; color: var(--accent); background: #fff; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-weight: 700; }
.field-picker > div { margin-top: 8px; width: min(360px, 100%); display: grid; padding: 7px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 30px rgba(0, 0, 0, .08); }
.field-picker > div button { min-height: 40px; padding: 8px 10px; color: var(--ink); background: transparent; border: 0; border-radius: 6px; text-align: left; }
.field-picker > div button:hover { background: #f1f4f7; }
.title-editor { min-width: min(700px, 70vw); }
.title-editor input { font-size: 27px; font-weight: 750; }

.relationship-rail { min-width: 0; min-height: calc(100dvh - 230px); padding: 32px 0 40px 32px; border-left: 1px solid var(--line); }
.desktop-relationships { position: sticky; top: 68px; align-self: start; max-height: calc(100dvh - 68px); overflow: auto; }
.rail-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rail-heading h2, .rail-heading h3 { margin: 0; font-size: 18px; }
.rail-heading span { min-width: 26px; height: 26px; display: grid; place-items: center; color: var(--muted); background: #f1f2f3; border-radius: 50%; font-size: 12px; }
.relationship-list, .candidate-block ul { margin: 14px 0; padding: 0; list-style: none; }
.relationship-list li { display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: center; border-top: 1px solid var(--line); }
.relationship-link { min-height: 54px; padding: 9px 4px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--accent); background: transparent; border: 0; text-align: left; }
.unlink-button { width: 34px; height: 34px; padding: 0; color: #8c4545; background: transparent; border: 0; border-radius: 6px; }
.add-relationship { width: 100%; }
.rail-note { color: var(--muted); font-size: 13px; line-height: 1.55; }
.candidate-block { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.candidate-block li { padding: 10px 0; display: grid; gap: 5px; border-top: 1px solid var(--line); }
.candidate-kind { color: #61418c; font-size: 11px; font-weight: 750; letter-spacing: .055em; text-transform: uppercase; }
.candidate-evidence-count { color: var(--muted); font-size: 12px; }
.candidate-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.candidate-actions .compact-action { min-height: 34px; padding: 6px 11px; font-size: 12px; }
.danger-text { color: #8c3030 !important; }
.ai-state-note { min-height: 54px; margin: 10px 0 0; padding: 12px; background: #f7f5fa; border-radius: 8px; }
.cabinet-body .ai-candidate-label,
.cabinet-body .ai-candidate-label:hover,
.cabinet-body .ai-candidate-label:focus { width: 100%; padding: 8px 0; border: 0; background: transparent; color: #61418c; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.ai-candidate-label span { float: right; }
.resolution-block { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); min-width: 0; }
.cabinet-body .resolution-toggle,
.cabinet-body .resolution-toggle:hover,
.cabinet-body .resolution-toggle:focus { width: 100%; margin-top: 8px; padding: 9px 0; display: flex; justify-content: space-between; gap: 10px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; text-align: left; }
.resolution-groups { display: grid; gap: 18px; margin-top: 8px; }
.resolution-groups section { min-width: 0; }
.resolution-groups h4 { margin: 0 0 7px; color: var(--text); font-size: 13px; }
.resolution-groups ul { margin: 0; padding: 0; list-style: none; }
.resolution-groups li { min-width: 0; padding: 9px 0; display: grid; gap: 4px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.resolution-kind, .resolution-note { color: var(--muted); font-size: 11px; line-height: 1.4; }
.resolved-case-link { min-width: 0; padding: 0; display: flex; justify-content: space-between; gap: 8px; border: 0; background: transparent; color: var(--accent); font: inherit; font-weight: 650; text-align: left; overflow-wrap: anywhere; }
.resolution-groups .text-action { width: fit-content; max-width: 100%; padding: 3px 0; font-size: 12px; text-align: left; white-space: normal; }
.mobile-relationships { display: none; }

.memory-toolbar { padding: 0 0 14px; display: flex; align-items: center; gap: 12px; }
.local-search { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto 44px 44px; align-items: center; gap: 10px; }
.local-search[hidden] { display: none; }
.local-search span { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.local-search .reader-nav { width: 44px; min-width: 44px; min-height: 44px; padding: 0; }
.memory-text > div { margin-top: 14px; font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.memory-text mark { padding: 1px 2px; background: #ffe485; }
.memory-editor { display: grid; gap: 18px; }
.memory-editor label, .dialog-form label { display: grid; gap: 7px; color: #5d6369; font-size: 13px; font-weight: 700; }

.relationships-page { min-height: calc(100dvh - 69px); padding: 32px 0 70px; background: #fff; }
.relationship-page-panel { width: min(620px, 100%); min-height: 0; padding: 24px 0 0; border: 0; }

.action-dialog { width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 70px rgba(0, 0, 0, .2); }
.action-dialog::backdrop { background: rgba(20, 25, 30, .45); }
.dialog-form { padding: 22px; display: grid; gap: 18px; }
.dialog-form header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dialog-form h2 { margin: 0; }
.dialog-form header button { width: 38px; height: 38px; padding: 0; color: var(--ink); background: transparent; border: 0; font-size: 25px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
.dialog-separator { color: var(--muted); font-size: 12px; text-align: center; }
.dialog-form form { display: grid; gap: 13px; }
.dialog-note { margin: 0; color: var(--muted); line-height: 1.55; }
.candidate-review fieldset { margin: 0; padding: 0; border: 0; }
.candidate-review legend { margin-bottom: 8px; color: #5d6369; font-size: 13px; font-weight: 700; }
.candidate-scale-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dialog-form .candidate-scale-option { min-height: 42px; padding: 8px 10px; display: flex; grid-template-columns: 18px minmax(0, 1fr); align-items: center; border: 1px solid var(--line); border-radius: 8px; }
.dialog-form .candidate-scale-option input { width: 18px; }
.candidate-evidence { padding: 12px; background: #f7f5fa; border-radius: 8px; }
.candidate-evidence summary { color: var(--accent); cursor: pointer; font-weight: 700; }
.candidate-evidence ul { margin: 10px 0 0; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.error { background: #8d3939; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media (max-width: 900px) {
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .desktop-relationships { display: none; }
  .detail-content { padding-right: 0; }
  .mobile-relationships { width: 100%; min-height: 46px; margin-top: 24px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 9px; font-weight: 700; }
}

@media (max-width: 620px) {
  .cabinet-body .museum-shell { width: calc(100% - 32px); }
  .cabinet-body .museum-topbar { gap: 8px; }
  .cabinet-body .brand-copy { display: none; }
  .cabinet-body .global-nav { margin-left: 0; gap: 6px; }
  .cabinet-body .global-nav-button { min-height: 40px; padding: 0 11px; font-size: 13px; }
  .profile-button { width: 40px; height: 40px; }
  .list-page { padding-top: 34px; }
  .list-page h1, .relationships-page h1 { font-size: 40px; }
  .list-controls { grid-template-columns: minmax(0, 1fr); }
  .catalog-grid { grid-template-columns: minmax(0, 1fr); }
  .catalog-card { min-height: 148px; }
  .detail-page, .relationships-page { padding-top: 20px; }
  .dialog-actions { align-items: stretch; flex-direction: column; }
  .candidate-scale-options { grid-template-columns: minmax(0, 1fr); }
  .back-nav { margin-bottom: 18px; }
  .detail-header { align-items: flex-start; flex-direction: column; gap: 18px; }
  .detail-header h1 { font-size: 34px; }
  .detail-actions { width: 100%; }
  .detail-actions > button:first-child { flex: 1; }
  .detail-content { padding-top: 10px; }
  .scale-options { grid-template-columns: minmax(0, 1fr); }
  .title-editor { min-width: 0; width: 100%; }
  .relationship-page-panel { padding-top: 16px; }
  .memory-toolbar { align-items: stretch; flex-direction: column; }
  .local-search { grid-template-columns: minmax(0, 1fr) 44px 44px; align-items: stretch; }
  .local-search [data-search-count] { grid-column: 1 / -1; grid-row: 2; }
  .dialog-actions { display: grid; }
  .action-dialog { max-height: calc(100dvh - 24px); overflow: auto; }
}

/* Simplified museum workspace */
.achievement {
  min-height: 248px;
}

.title-stage {
  min-height: 166px;
  padding: 30px 22px 22px;
  display: flex;
  align-items: flex-start;
}

.card-title {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font: 500 30px/1.08 Georgia, "Times New Roman", serif;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.achievement .card-body {
  min-height: 64px;
  margin-top: auto;
  padding: 20px 22px;
}

.overlay {
  display: grid;
  place-items: center;
  padding: 24px;
}

.drawer {
  position: relative;
  inset: auto;
  width: min(1120px, calc(100vw - 48px));
  max-height: calc(100dvh - 48px);
  border-radius: 28px;
  overflow: hidden;
  transform: translateY(18px) scale(.985);
}

.overlay.open .drawer {
  transform: none;
}

#drawer-body {
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cabinet-body .drawer-close {
  position: absolute;
  float: none;
  top: 20px;
  right: 20px;
  z-index: 10;
  width: 44px;
  height: 44px;
  margin: 0;
}

.object-header {
  --tone: var(--accent);
  min-height: 112px;
  padding: 26px 82px 22px 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(251, 250, 246, .98);
  border-top: 4px solid var(--tone);
  border-bottom: 1px solid var(--line);
}

.object-title-wrap {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.object-title {
  max-width: 700px;
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.04;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}

.object-title-input {
  width: min(700px, 100%);
  min-height: 48px;
  padding: 7px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: 700 clamp(24px, 2.6vw, 36px)/1.1 Inter, "Segoe UI", Arial, sans-serif;
}

.object-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.object-menu-wrap {
  position: relative;
}

.object-menu-button {
  font-size: 20px;
  letter-spacing: .08em;
}

.object-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 220px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(35, 33, 24, .16);
}

.object-menu[hidden] {
  display: none;
}

.menu-danger {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: #8d3939;
  background: transparent;
  border: 0;
  text-align: left;
}

.menu-danger:hover,
.menu-danger:focus-visible {
  color: #fff;
  background: #8d3939;
}

.workspace {
  min-height: 0;
  padding: 28px 38px 34px;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 34px;
  overflow: auto;
}

.case-workspace {
  max-height: calc(100dvh - 164px);
}

.memory-workspace {
  max-height: calc(100dvh - 164px);
  overflow: hidden;
}

.memory-workspace .story-column {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.story-block:first-child {
  border-top: 0;
}

.story-block {
  padding: 20px 0;
}

.empty-field-action {
  min-height: 44px;
  padding: 0;
  color: var(--accent);
  background: transparent;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.inline-editor {
  padding-top: 0;
}

.memory-source-input {
  min-height: 330px;
  max-height: calc(100dvh - 300px);
}

.reader-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.reader-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 44px 44px;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: #f4f2eb;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.reader-search[hidden] {
  display: none;
}

.reader-search-input {
  width: 100%;
}

.reader-search-status {
  min-width: 92px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.reader-nav {
  border-radius: 10px;
}

.memory-reader {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.memory-reader-text {
  min-height: 130px;
  max-height: calc(100dvh - 360px);
  padding-right: 12px;
  overflow: auto;
  line-height: 1.72;
}

.reader-mark {
  padding: 1px 2px;
  color: var(--ink);
  background: #ffe285;
  border-radius: 3px;
}

.context-column {
  position: static;
}

.context-panel {
  padding: 0 0 0 28px;
  gap: 16px;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

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

.relationship-actions {
  width: 100%;
  flex-wrap: wrap;
}

.relationship-action {
  min-height: 44px;
  flex: 1 1 140px;
}

.relationship-empty {
  margin: 4px 0 0;
  padding: 18px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.linked-list {
  gap: 8px;
}

.linked-card {
  background: transparent;
  border-radius: 12px;
}

.linked-toggle {
  min-height: 64px;
}

.confirm-dialog-body {
  display: grid;
  gap: 24px;
  padding: 24px;
}

.confirm-dialog-body p {
  margin: 0;
  line-height: 1.6;
}

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

.cabinet-body button:focus-visible,
.cabinet-body input:focus-visible,
.cabinet-body textarea:focus-visible,
.cabinet-body select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 42%, transparent);
  outline-offset: 2px;
}

@media (max-width: 780px) {
  .overlay {
    padding: 0;
  }

  .drawer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  #drawer-body {
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
  }

  .object-header {
    position: sticky;
    top: 0;
    z-index: 6;
    min-height: auto;
    padding: 22px 64px 18px 20px;
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .object-title {
    font-size: 30px;
  }

  .object-title-input {
    font-size: 24px;
  }

  .object-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .object-actions > button {
    flex: 1 1 auto;
  }

  .workspace,
  .case-workspace,
  .memory-workspace {
    flex: 0 0 auto;
    max-height: none;
    padding: 22px 20px 48px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    overflow: visible;
  }

  .memory-workspace .story-column {
    flex: 0 0 auto;
    min-height: auto;
    display: block;
  }

  .memory-reader {
    min-height: auto;
    flex: 0 0 auto;
  }

  .memory-reader-text,
  .memory-source-input {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .memory-source-input {
    min-height: 330px;
  }

  .context-panel {
    padding: 24px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .reader-search {
    grid-template-columns: minmax(0, 1fr) 44px 44px;
  }

  .reader-search-status {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }
}

@media (max-width: 480px) {
  .achievement {
    min-height: 220px;
  }

  .title-stage {
    min-height: 148px;
  }

  .card-title {
    font-size: 30px;
  }

  .object-actions .object-save,
  .object-actions .object-cancel {
    min-width: calc(50% - 4px);
  }

  .relationship-actions {
    display: grid;
  }

  .confirm-dialog-actions {
    display: grid;
  }
}
.character-count { color: var(--muted, #6d675f); font-size: 0.82rem; line-height: 1.35; }
.character-count.error { color: #a33a2b; }

.case-title-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.case-title-line h1 { margin: 0; }
.case-field.empty-field > p { color: var(--muted, #6f6a60); font-style: italic; }
.field-coaching { margin-top: 14px; padding: 14px 16px; border: 1px solid rgba(117, 92, 55, .2); border-radius: 14px; background: rgba(251, 247, 238, .78); color: #34302a; }
.field-coaching > p { margin: 0; color: #625c53; }
.field-coaching > span, .coaching-recommendation > span { display: block; margin-bottom: 7px; color: #746851; font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.field-coaching ul { margin: 8px 0 0; padding-left: 20px; }
.field-coaching li + li { margin-top: 6px; }

/* A legacy museum panel reused `.object-menu`; keep the current workspace
   <details> action in normal flow so it cannot float over case fields. */
.detail-actions > details.object-menu {
  position: relative;
  inset: auto;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.coaching-recommendation { margin-bottom: 12px; }
.coaching-recommendation p { margin: 0 0 10px; white-space: pre-wrap; }

@media (max-width: 760px) {
  .field-coaching { margin-inline: -2px; padding: 12px; }
  .case-title-line { align-items: flex-start; }
}
