:root {
  --designer-page: #f0f4f8;
  --designer-surface: rgba(255, 255, 255, .9);
  --designer-ink: #0f172a;
  --designer-muted: #64748b;
  --designer-blue: #2b59ff;
  --designer-blue-strong: #1d4ed8;
  --designer-line: rgba(226, 232, 240, .88);
  --designer-shadow: 0 4px 16px rgba(30, 58, 138, .06);
  --designer-shadow-raised: 0 12px 34px rgba(30, 58, 138, .11);
}

html,
body {
  min-height: 100%;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  background: #e5e7eb;
  letter-spacing: 0;
}

body::before {
  display: none;
}

.shell {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  height: auto;
  max-height: none;
  margin: 0 auto;
  padding: 0;
  overflow-x: hidden;
  overflow-y: visible;
  background:
    linear-gradient(135deg, rgba(219, 234, 254, .72), transparent 44%),
    linear-gradient(315deg, rgba(224, 242, 254, .62), transparent 45%),
    var(--designer-page);
  box-shadow: 0 0 42px rgba(15, 23, 42, .14);
}

#appPanel {
  padding: 0 20px calc(100px + env(safe-area-inset-bottom));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 68px;
  margin: 0;
  padding: 18px 20px 12px;
  border: 0;
  border-radius: 0;
  background: rgba(240, 244, 248, .9);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.topbar.office-page {
  display: none;
}

.topbar.subpage {
  min-height: 76px;
  padding: 26px 20px 10px;
}

.topbar.subpage .logo,
.topbar.subpage .subtitle {
  display: none;
}

.topbar.subpage .brand {
  min-width: 0;
  flex: 1;
}

.topbar.subpage .brand-title h1 {
  font-size: 20px;
  font-weight: 800;
}

.topbar.subpage .top-back {
  width: 32px;
  height: 32px;
  min-height: 32px;
  border-radius: 50%;
  color: #475569;
  background: rgba(226, 232, 240, .72);
  box-shadow: none;
  font-size: 25px;
}

.view.active {
  animation: none;
}

/* Home */
#officeView .office-dashboard {
  display: grid;
  gap: 24px;
  padding: 24px 0 12px;
}

#officeView .office-secretary-hero-wrap {
  position: relative;
  width: 100%;
  min-height: 190px;
}

#officeView .office-secretary-hero {
  position: relative;
  min-height: 190px;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  text-align: left;
  background: #1e3a8a;
  box-shadow: 0 16px 34px rgba(37, 99, 235, .22);
}

#officeView .office-secretary-hero::before,
#officeView .office-secretary-hero::after {
  display: none;
}

#officeView .office-secretary-hero > .designer-home-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  max-height: none;
  height: 100%;
  margin: 0;
  border-radius: 0;
  object-fit: fill;
  filter: none;
}

.designer-home-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(37, 99, 235, .28), rgba(23, 37, 84, .94));
}

#officeView .office-hero-copy {
  position: relative;
  z-index: 2;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 24px 20px 18px;
}

#officeView .office-hero-copy > .designer-home-eyebrow {
  order: 1;
  margin-bottom: 7px;
  color: #dbeafe;
  font-size: 11px;
  font-weight: 600;
}

#officeView .office-hero-copy > strong {
  order: 2;
  max-width: 250px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.16;
}

#officeView .office-hero-chips {
  order: 3;
  display: flex;
  gap: 8px;
  width: calc(100% - 40px);
  margin-top: 26px;
  overflow-x: auto;
  scrollbar-width: none;
}

#officeView .office-hero-chips::-webkit-scrollbar {
  display: none;
}

#officeView .office-hero-chips em {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .15);
  backdrop-filter: blur(9px);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

#officeView .office-hero-chips b {
  color: inherit;
}

.designer-home-gallery {
  position: absolute;
  right: 20px;
  bottom: 18px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  z-index: 4;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.designer-home-gallery:disabled {
  cursor: wait;
  opacity: .65;
}

.designer-home-gallery:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.designer-home-gallery svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#officeView .office-shortcuts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 18px 8px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--designer-shadow);
}

#officeView .office-shortcuts button {
  min-width: 0;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 0;
  color: #334155;
  background: transparent;
  box-shadow: none;
}

#officeView .office-shortcut-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #2563eb;
  background: linear-gradient(145deg, #eff6ff, #dbeafe);
}

#officeView .office-shortcuts button:nth-child(2) .office-shortcut-icon {
  color: #d97706;
  background: linear-gradient(145deg, #fffbeb, #ffedd5);
}

#officeView .office-shortcuts button:nth-child(3) .office-shortcut-icon {
  color: #f43f5e;
  background: linear-gradient(145deg, #fff1f2, #fce7f3);
}

#officeView .office-shortcuts button:nth-child(4) .office-shortcut-icon {
  color: #059669;
  background: linear-gradient(145deg, #ecfdf5, #ccfbf1);
}

#officeView .office-shortcuts button:nth-child(5) .office-shortcut-icon {
  color: #7c3aed;
  background: linear-gradient(145deg, #f5f3ff, #ede9fe);
}

#officeView .office-shortcut-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#officeView .office-shortcuts strong {
  max-width: 62px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  white-space: normal;
  text-align: center;
}

#officeView .office-section {
  display: grid;
  gap: 14px;
  margin: 0;
}

#officeView .office-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

#officeView .office-section-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
}

#officeView .office-section-head h2::before {
  content: "";
  width: 4px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
}

#officeView .office-section-head h2 span {
  padding: 2px 8px;
  border-radius: 8px;
  color: #2563eb;
  background: #eff6ff;
  font-size: 12px;
}

#officeView .office-section-head button {
  min-height: 34px;
  padding: 0 15px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 8px 20px rgba(37, 99, 235, .2);
  font-size: 13px;
}

#officeView .office-employee-grid {
  display: flex;
  gap: 16px;
  margin: 0 -20px;
  padding: 0 20px 4px !important;
  overflow-x: auto !important;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#officeView .office-employee-section .office-employee-grid {
  margin-left: 0;
  margin-right: -20px;
  padding-left: 0 !important;
  padding-right: 20px !important;
}

#officeView .office-today-section .office-section-head h2 {
  font-weight: 500;
}

#officeView .office-employee-grid::-webkit-scrollbar {
  display: none;
}

#officeView .office-employee-card {
  flex: 0 0 120px;
  width: 120px;
  min-height: 166px;
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 0;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--designer-shadow);
  scroll-snap-align: start;
  touch-action: pan-x pan-y;
}

#officeView .office-employee-card > img,
#officeView .office-custom-employee-avatar {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 16px;
  object-fit: cover;
  object-position: top;
}

#officeView .office-employee-info {
  display: grid;
  justify-items: center;
  gap: 4px;
}

#officeView .office-employee-info strong {
  color: #0f172a;
  font-size: 14px;
}

#officeView .office-employee-info em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #64748b;
  font-size: 11px;
  font-style: normal;
}

#officeView .office-employee-info em::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

#officeView .office-employee-card.active .office-employee-info em {
  color: #2563eb;
}

#officeView .marketing-creation-card {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  color: #0f172a;
  text-align: left;
  background: #fff;
  box-shadow: var(--designer-shadow);
}

#officeView .marketing-creation-card::before {
  display: none;
}

#officeView .marketing-creation-card > .designer-marketing-media {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1400 / 422;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  transform: none !important;
  color: inherit;
  background: transparent;
  box-shadow: none;
  font-size: inherit;
}

.designer-marketing-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

#officeView .designer-marketing-media > i {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #2563eb;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 3px 10px rgba(15, 23, 42, .08);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.designer-marketing-media > i b {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
}

#officeView .marketing-creation-card > .designer-marketing-copy {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  text-align: left;
  transform: none !important;
  border-radius: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  font-size: inherit;
}

#officeView .marketing-creation-card > .designer-marketing-copy::before {
  display: none;
}

#officeView .marketing-creation-card .designer-marketing-copy > span {
  position: static !important;
  inset: auto !important;
  width: auto !important;
  height: auto !important;
  display: grid;
  grid-column: 1;
  justify-self: stretch;
  justify-items: start;
  align-items: start;
  gap: 3px;
  transform: none !important;
  border-radius: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  box-shadow: none;
  font-size: inherit;
}

#officeView .designer-marketing-copy strong,
#officeView .designer-marketing-copy em {
  display: block;
  width: 100%;
  margin: 0;
  text-align: left;
}

#officeView .designer-marketing-copy strong {
  color: #0f172a;
  font-size: 15px;
}

#officeView .designer-marketing-copy em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.designer-marketing-copy > b {
  grid-column: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #94a3b8;
  background: #f8fafc;
  font-size: 24px;
  font-weight: 400;
}

#officeView .office-recent-list {
  display: grid;
  gap: 12px;
}

#officeView .office-recent-item,
#officeView .office-recent-empty {
  padding: 15px 16px;
  border: 1px solid #f8fafc;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(30, 58, 138, .04);
}

.designer-bottom-nav {
  position: fixed;
  z-index: 88;
  left: 50%;
  bottom: 0;
  width: min(430px, 100%);
  min-height: 80px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  padding: 9px 14px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(226, 232, 240, .72);
  border-radius: 24px 24px 0 0;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 -12px 30px rgba(30, 58, 138, .08);
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
}

.designer-bottom-nav button {
  min-width: 0;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 4px 2px 0;
  border-radius: 14px;
  color: #94a3b8;
  background: transparent;
  box-shadow: none;
  font-size: 10px;
  font-weight: 700;
}

.designer-bottom-nav button.active {
  color: #2563eb;
}

.designer-bottom-nav button > svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.designer-bottom-nav .designer-bottom-create {
  justify-content: flex-end;
  color: #94a3b8;
}

.designer-bottom-create i {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  margin-top: -24px;
  border: 4px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #3b82f6, #2563eb);
  box-shadow: 0 10px 22px rgba(37, 99, 235, .32);
  font-style: normal;
}

.designer-bottom-create i svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

/* Shared subpages */
.asset-library-shell,
.content-record-shell,
.lead-center-shell,
.tutorial-shell,
.personal-settings-page,
.workflow-shell,
.department-shell,
.ability-shell {
  min-height: calc(100dvh - 92px);
  margin: 0;
  padding: 4px 0 36px;
  background: transparent;
}

.content-record-shell {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 80px);
}

.content-record-shell .asset-library-pager {
  margin-top: auto;
  padding-top: 24px;
}

.asset-library-head {
  display: block;
}

.asset-library-head > button,
.personal-list-page-head button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 8px 20px rgba(37, 99, 235, .2);
}

#assetLibraryView .asset-library-head > #assetLibraryAddBtn {
  position: fixed;
  z-index: 60;
  top: 28px;
  right: max(20px, calc((100vw - 430px) / 2 + 20px));
  min-height: 34px;
}

.asset-library-tabs,
.content-record-tabs,
.lead-domain-tabs,
.lead-platform-tabs,
.personal-tabs {
  display: flex;
  gap: 8px;
  margin: 0 -20px;
  padding: 4px 20px 10px;
  overflow-x: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
  scrollbar-width: none;
}

.content-record-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(74px, 1.7fr) minmax(0, 1fr);
  gap: 6px;
  overflow: visible;
}

.asset-library-tabs::-webkit-scrollbar,
.content-record-tabs::-webkit-scrollbar,
.lead-domain-tabs::-webkit-scrollbar,
.lead-platform-tabs::-webkit-scrollbar,
.personal-tabs::-webkit-scrollbar {
  display: none;
}

.asset-library-tabs button,
.content-record-tabs button,
.lead-domain-tabs button,
.lead-platform-tabs button,
.personal-tabs button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .96);
  border-radius: 999px;
  color: #475569;
  background: rgba(255, 255, 255, .68);
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  backdrop-filter: blur(14px);
}

.content-record-tabs button {
  width: 100%;
  min-width: 0;
  padding-inline: 4px;
  font-size: 11px;
}

.asset-library-tabs button.active,
.content-record-tabs button.active,
.lead-domain-tabs button.active,
.lead-platform-tabs button.active,
.personal-tabs button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .2);
}

.asset-library-grid.designer-media-grid,
.asset-library-shell:not(.content-record-shell) .asset-library-grid.designer-media-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.content-record-shell .asset-library-grid.designer-media-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.asset-library-grid.designer-avatar-grid,
.asset-library-grid.designer-voice-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.asset-library-card.designer-media-card {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 20px;
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--designer-shadow);
}

.designer-media-meta > span {
  display: none;
}

.content-record-shell .asset-library-card.designer-media-card {
  gap: 6px;
  padding: 8px;
  border-radius: 16px;
}

.content-record-shell .designer-media-thumb,
.content-record-shell .designer-media-thumb > .asset-library-thumb {
  border-radius: 12px;
}

.content-record-shell .designer-media-meta strong {
  font-size: 11px;
}

.content-record-shell .designer-media-meta em {
  font-size: 9px;
}

.content-record-shell .asset-library-grid.designer-document-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.content-document-card {
  width: 100%;
  min-height: 136px;
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .72);
  border-radius: 20px;
  color: #0f172a;
  text-align: left;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--designer-shadow);
}

.content-document-cover {
  flex: 0 0 84px;
  height: 112px;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: #dbeafe;
}

.content-document-card.ppt .content-document-cover {
  flex-basis: 120px;
  height: 90px;
  align-self: center;
}

.content-document-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.content-record-cover {
  max-height: 260px;
  object-fit: cover;
}

.content-record-file-mark {
  min-height: 150px;
  color: #fff;
  font-size: 42px;
  font-weight: 900;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.content-record-summary {
  padding: 12px 14px;
  border-left: 3px solid #ff4057;
  border-radius: 0 12px 12px 0;
  color: #475569;
  background: #fff1f2;
  font-size: 13px;
  line-height: 1.7;
}

.content-record-article-body {
  padding: 16px;
  overflow-wrap: anywhere;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  color: #1e293b;
  background: #fff;
  font-size: 14px;
  line-height: 1.85;
  white-space: pre-wrap;
}

.content-document-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 1px 0;
}

.content-document-state {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.content-document-state em,
.content-document-tags i {
  padding: 3px 8px;
  border-radius: 6px;
  color: #059669;
  background: #ecfdf5;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.content-document-state em.failed {
  color: #e11d48;
  background: #fff1f2;
}

.content-document-state time {
  color: #94a3b8;
  font-size: 10px;
}

.content-document-main > strong {
  display: -webkit-box;
  overflow: hidden;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.content-document-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.content-document-tags i {
  color: #2563eb;
  background: #eff6ff;
}

.content-document-main > small {
  margin-top: auto;
  color: #94a3b8;
  font-size: 11px;
}

.designer-media-thumb {
  border-radius: 16px;
}

.asset-library-card.designer-avatar-card,
.asset-library-card.designer-voice-card {
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--designer-shadow);
}

.asset-library-pager {
  padding: 4px 2px 0;
}

.asset-library-pager button {
  min-height: 36px;
  border-radius: 999px;
  color: #2563eb;
  background: #eff6ff;
  box-shadow: none;
}

/* Lead center */
.lead-center-shell {
  display: grid;
  gap: 15px;
}

#leadCenterView {
  width: auto;
  max-width: none;
  min-height: calc(100dvh - 76px);
  margin: 0 -20px;
  padding: 4px 20px 36px;
  background:
    radial-gradient(circle at 92% 3%, rgba(59, 130, 246, .14), transparent 30%),
    radial-gradient(circle at 15% 42%, rgba(45, 212, 191, .11), transparent 34%),
    linear-gradient(180deg, #eaf3ff 0%, #eefbfa 58%, #f5f8fb 100%);
}

.lead-center-title {
  margin: 0 4px;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
}

.lead-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.lead-stats div {
  min-width: 0;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 4px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 20px;
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--designer-shadow);
}

.lead-stats strong {
  color: #2563eb;
  font-size: 20px;
}

.lead-stats span {
  color: #64748b;
  font-size: 10px;
  white-space: nowrap;
}

.lead-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  min-height: 0;
  align-items: start;
}

.lead-domain-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  overflow: visible;
}

.lead-domain-tabs button,
.lead-domain-tabs button.active {
  min-height: 54px;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .84);
  color: #475569;
  background: rgba(255, 255, 255, .62);
  box-shadow: none;
}

.lead-domain-tabs button.active {
  color: #2563eb;
  background: #fff;
  box-shadow: var(--designer-shadow);
}

.lead-card,
.lead-empty-box {
  min-height: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 20px;
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--designer-shadow);
}

/* Tutorials */
.tutorial-shell {
  display: block;
}

.designer-tutorial-list {
  display: grid;
  gap: 16px;
}

.designer-tutorial-card {
  width: 100%;
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 24px;
  color: #0f172a;
  text-align: left;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--designer-shadow);
}

.designer-tutorial-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: #e2e8f0;
}

.designer-tutorial-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.designer-tutorial-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .28);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .18);
  backdrop-filter: blur(8px);
  transform: translate(-50%, -50%);
  font-size: 17px;
  font-style: normal;
}

.designer-tutorial-cover > em {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #fff;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(8px);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.designer-tutorial-copy {
  display: grid;
  gap: 8px;
  padding: 0 6px 4px;
}

.designer-tutorial-copy > strong {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.45;
}

.designer-tutorial-copy > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.designer-tutorial-copy small {
  color: #94a3b8;
  font-size: 11px;
}

.designer-tutorial-copy b {
  padding: 3px 8px;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  color: #2563eb;
  background: #eff6ff;
  font-size: 11px;
}

.designer-tutorial-copy b.indigo { color: #4f46e5; background: #eef2ff; border-color: #e0e7ff; }
.designer-tutorial-copy b.green { color: #059669; background: #ecfdf5; border-color: #d1fae5; }
.designer-tutorial-copy b.amber { color: #d97706; background: #fffbeb; border-color: #fef3c7; }

.tutorial-preview-video {
  width: 100%;
  display: block;
  border-radius: 16px;
  background: #0f172a;
}

.tutorial-preview-poster {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: #e2e8f0;
}

.tutorial-preview-poster img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.tutorial-preview-poster > span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .28);
  backdrop-filter: blur(8px);
  transform: translate(-50%, -50%);
}

.tutorial-preview-poster svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.tutorial-preview-note {
  padding: 14px 4px 2px;
  color: #64748b;
  text-align: center;
  font-size: 13px;
}

/* IP positioning */
.personal-settings-page {
  position: relative;
  display: block;
  overflow: visible;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.personal-settings-page .personal-panel.active {
  display: block;
  margin-top: 12px;
}

.personal-settings-page > .section-title {
  position: fixed;
  z-index: 60;
  top: 26px;
  right: max(20px, calc((100vw - 430px) / 2 + 20px));
  width: auto;
  margin: 0;
}

.personal-settings-page > .section-title > h2 {
  display: none;
}

.personal-settings-page > .section-title .section-actions {
  display: flex;
  gap: 8px;
}

.personal-settings-page > .section-title button {
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid rgba(226, 232, 240, .78);
  border-radius: 999px;
  color: #475569;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 4px 12px rgba(30, 58, 138, .05);
}

.personal-settings-page > .section-title .icon-help {
  width: 32px;
  padding: 0;
}

.personal-settings-page .personal-block,
.personal-survey-wizard,
.personal-template-card,
.personal-status,
.personal-list-page-head {
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 24px;
  background: rgba(255, 255, 255, .84);
  box-shadow: var(--designer-shadow);
  backdrop-filter: blur(14px);
}

.personal-grid,
.personal-form-grid {
  grid-template-columns: 1fr;
}

.personal-row,
.personal-source-card,
.personal-source-profile,
.personal-generated-doc,
.personal-upload-zone {
  border-radius: 20px;
  border-color: var(--designer-line);
  background: rgba(248, 250, 252, .72);
}

.personal-survey-card {
  min-height: 180px;
  border-radius: 24px;
}

.personal-survey-actions {
  position: sticky;
  bottom: calc(80px + max(12px, env(safe-area-inset-bottom)));
  z-index: 6;
  padding: 8px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--designer-shadow-raised);
  backdrop-filter: blur(16px);
}

.personal-settings-page .inline-form.three {
  grid-template-columns: 1fr;
  gap: 12px;
}

.personal-settings-page .inline-form.three input,
.personal-settings-page .inline-form.three select {
  min-height: 50px;
  border-radius: 22px;
  background: #fff;
}

.personal-settings-page .inline-form.three > button {
  width: 100%;
  min-height: 50px;
  border-radius: 22px;
}

/* Employee workflow */
.workflow-shell {
  padding-bottom: 112px;
}

.workflow-head,
.workflow-day-board,
.workflow-editor-card,
.workflow-template-drawer {
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 20px;
  background: rgba(255, 255, 255, .72);
  box-shadow: var(--designer-shadow);
  backdrop-filter: blur(14px);
}

.workflow-head {
  padding: 12px;
}

.workflow-calendar-days {
  display: flex;
  gap: 8px;
  padding: 10px 10px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.workflow-calendar-days::-webkit-scrollbar {
  display: none;
}

.workflow-calendar-day {
  flex: 0 0 52px;
  min-height: 64px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(30, 58, 138, .05);
}

.workflow-calendar-day.active {
  color: #fff;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  box-shadow: 0 9px 20px rgba(37, 99, 235, .22);
}

.designer-workflow-group > summary {
  border-radius: 24px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--designer-shadow);
}

.designer-workflow-group-content {
  margin-top: 9px;
}

.workflow-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr) minmax(0, .9fr);
  left: max(16px, calc((100vw - 430px) / 2 + 16px));
  right: max(16px, calc((100vw - 430px) / 2 + 16px));
  bottom: calc(80px + max(16px, env(safe-area-inset-bottom)));
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 32px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 34px rgba(30, 58, 138, .14);
  backdrop-filter: blur(18px);
}

.toast {
  bottom: calc(92px + env(safe-area-inset-bottom));
}

.workflow-actions button {
  min-width: 0;
  min-height: 46px;
  padding-inline: 8px;
  border-radius: 24px;
  font-size: 13px;
  white-space: nowrap;
}

/* AI marketing */
#departmentView .department-shell.marketing-entry-mode {
  padding-top: 0;
}

#departmentView .department-shell.marketing-entry-mode .department-day-board {
  display: none !important;
}

.department-skill-grid:has(.designer-ability-card) {
  grid-template-columns: 1fr !important;
  gap: 16px;
}

.department-skill-card.designer-ability-card {
  padding: 10px;
  border: 0;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--designer-shadow);
}

.designer-ability-art {
  position: relative;
  height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 18px;
  color: #60a5fa;
  background:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px),
    radial-gradient(circle at -4% -8%, rgba(147, 51, 234, .38), transparent 42%),
    radial-gradient(circle at 104% 108%, rgba(37, 99, 235, .38), transparent 46%),
    linear-gradient(145deg, #111827, #0f172a);
  background-size: 20px 20px, 20px 20px, auto, auto, auto;
}

.designer-ability-art::before,
.designer-ability-art::after {
  display: none;
}

.designer-ability-card.blue .designer-ability-art {
  color: #22d3ee;
  background:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px),
    radial-gradient(circle at 104% -6%, rgba(8, 145, 178, .36), transparent 48%),
    radial-gradient(circle at -4% 108%, rgba(29, 78, 216, .34), transparent 44%),
    linear-gradient(145deg, #111827, #0f172a);
  background-size: 15px 15px, 15px 15px, auto, auto, auto;
}

.designer-ability-card:nth-child(3) .designer-ability-art {
  color: #818cf8;
  background:
    radial-gradient(circle at 50% 52%, rgba(99, 102, 241, .32), transparent 42%),
    linear-gradient(145deg, #1e1b4b, #0f172a);
}

.designer-ability-card.emerald .designer-ability-art {
  color: #34d399;
  background:
    radial-gradient(circle at 82% -8%, rgba(5, 150, 105, .28), transparent 42%),
    radial-gradient(circle at 0 100%, rgba(15, 118, 110, .36), transparent 48%),
    linear-gradient(145deg, #111827, #0f172a);
}

.designer-ability-card.rose .designer-ability-art {
  color: #fb7185;
  background:
    radial-gradient(circle at -5% 55%, rgba(225, 29, 72, .28), transparent 46%),
    radial-gradient(circle at 80% 108%, rgba(234, 88, 12, .22), transparent 40%),
    linear-gradient(145deg, #111827, #0f172a);
}

.designer-ability-card.cyan .designer-ability-art,
.designer-ability-card.disabled .designer-ability-art {
  color: #94a3b8;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, .025) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .025) 50%, rgba(255, 255, 255, .025) 75%, transparent 75%),
    linear-gradient(145deg, #1f2937, #0f172a);
  background-size: 40px 40px, auto;
}

.designer-ability-art > em {
  position: relative;
  z-index: 2;
  margin-top: 10px;
  color: #dbeafe;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0;
}

.designer-ability-art > span {
  color: inherit;
}

.designer-ability-art svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.designer-ability-meta {
  padding: 14px 12px 7px;
}

/* Shared dialogs */
.employee-modal-backdrop,
.task-success-backdrop {
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(5px);
}

.employee-popover,
.work-dispatch-popover,
.workflow-node-popover,
.workflow-param-popover,
.workflow-missing-popover,
.asset-action-popover,
.personal-template-popover,
.personal-memory-popover,
.task-success-panel {
  width: min(360px, calc(100vw - 34px));
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 28px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 28px 74px rgba(15, 23, 42, .24);
  backdrop-filter: blur(18px);
}

@media (max-width: 380px) {
  #appPanel {
    padding-left: 14px;
    padding-right: 14px;
  }

  #leadCenterView {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar,
  .topbar.subpage {
    padding-left: 14px;
    padding-right: 14px;
  }

  #officeView .office-dashboard {
    gap: 20px;
  }

  #officeView .office-employee-grid,
  .asset-library-tabs,
  .content-record-tabs,
  .lead-domain-tabs,
  .lead-platform-tabs,
  .personal-tabs {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }

  #officeView .office-employee-section .office-employee-grid {
    margin-left: 0;
    margin-right: -14px;
    padding-left: 0 !important;
    padding-right: 14px !important;
  }

  #officeView .office-shortcut-icon {
    width: 44px;
    height: 44px;
  }

  .lead-stats {
    gap: 6px;
  }

  .lead-stats span {
    font-size: 9px;
  }

  .designer-bottom-nav {
    padding-left: 8px;
    padding-right: 8px;
  }

  .content-record-shell .asset-library-grid.designer-media-grid {
    gap: 7px;
  }
}

/* Keep workflow action menus above following cards and groups. */
.designer-workflow-group,
.designer-workflow-group-content,
.workflow-node-card.designer-workflow-node {
  overflow: visible;
}

.designer-workflow-group.task-menu-open {
  position: relative;
  z-index: 160;
}

.workflow-node-card.designer-workflow-node.task-menu-open {
  z-index: 180;
}

.workflow-node-card.task-menu-open .task-action-list {
  z-index: 240;
}

/* The today feed is intentionally regular-weight for fast mobile scanning. */
#officeView .office-today-section,
#officeView .office-today-section * {
  font-weight: 400 !important;
}

/* Digital-human editing template picker in IP persona templates. */
.personal-digital-human-field {
  display: grid;
  gap: 10px;
}

.personal-digital-human-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.personal-digital-human-field-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.personal-digital-human-field-head small,
.personal-digital-human-selected small,
.personal-digital-human-empty small {
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.45;
}

.personal-digital-human-field-head button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  color: #2563eb;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
}

.personal-digital-human-empty,
.personal-digital-human-selected {
  min-height: 66px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
}

.personal-digital-human-empty {
  display: grid;
  align-content: center;
  gap: 3px;
  color: #64748b;
}

.personal-digital-human-selected {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.personal-digital-human-selected > div:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.personal-digital-human-selected strong {
  overflow: hidden;
  color: #0f172a;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.personal-digital-human-selected-cover {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  color: #2563eb;
  background: #eaf2ff;
}

/* Custom employee workflows use a compact, chronological timeline. */
.workflow-timeline.workflow-time-list {
  position: relative;
  display: grid;
  gap: 6px;
}

.workflow-timeline-entry {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
  overflow: visible;
}

.workflow-timeline-entry:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 29px;
  top: 39px;
  bottom: -7px;
  border-left: 1px solid #dbe4f0;
}

.workflow-timeline-entry.task-menu-open {
  z-index: 180;
}

.workflow-node-card.workflow-time-node {
  position: relative;
  z-index: 1;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  gap: 6px;
  min-width: 0;
  min-height: 46px;
  padding: 6px 7px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 4px 12px rgba(30, 58, 138, .045);
}

.workflow-time-node .workflow-node-time {
  height: 30px;
  border-radius: 9px;
  background: #2563eb;
  font-size: 12px;
  font-weight: 700;
}

.workflow-time-node .workflow-node-time.action {
  color: #2563eb;
  border: 1px solid #dbeafe;
  background: #eff6ff;
}

.workflow-time-node .workflow-node-main {
  cursor: pointer;
}

.workflow-time-node .workflow-node-main strong {
  font-size: 13px;
  font-weight: 600;
}

.workflow-time-node .workflow-node-main span {
  display: none;
}

.workflow-time-node.is-placeholder .workflow-node-main span {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  font-weight: 400;
}

.workflow-time-node .workflow-status-pill,
.workflow-time-node .workflow-node-action-menu summary,
.workflow-child-toggle {
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 9px;
  font-size: 11px;
}

.workflow-time-node .workflow-node-action-menu summary,
.workflow-child-toggle {
  color: #2563eb;
  border: 0;
  background: #eff6ff;
}

.workflow-child-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.workflow-child-toggle::after,
.custom-employee-child-toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
}

.workflow-child-toggle[aria-expanded="true"]::after,
.custom-employee-child-toggle[aria-expanded="true"]::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

.workflow-child-list {
  position: relative;
  display: grid;
  gap: 4px;
  margin-left: 20px;
  padding-left: 12px;
  border-left: 1px solid #dbeafe;
}

.workflow-child-list.hidden {
  display: none !important;
}

.workflow-child-list .workflow-action-card {
  margin-left: 0;
  background: rgba(248, 250, 252, .96);
  box-shadow: none;
}

.custom-employee-node-list {
  position: relative;
  display: grid;
  gap: 5px;
}

.custom-employee-timeline-entry {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.custom-employee-timeline-entry:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 28px;
  top: 38px;
  bottom: -6px;
  border-left: 1px solid #dbe4f0;
}

.custom-employee-node {
  position: relative;
  z-index: 1;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-height: 44px;
  padding: 6px 7px;
  border-radius: 13px;
  background: rgba(248, 250, 252, .96);
  box-shadow: none;
}

.custom-employee-node > time {
  display: grid;
  place-items: center;
  min-height: 28px;
  color: #2563eb;
  border-radius: 8px;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.custom-employee-node-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.custom-employee-node-copy strong,
.custom-employee-node-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-employee-node-copy strong {
  color: #102036;
  font-size: 13px;
  font-weight: 600;
}

.custom-employee-node-copy small {
  color: #7b879b;
  font-size: 10px;
  font-weight: 400;
}

.custom-employee-node-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.custom-employee-node-actions button,
.custom-employee-node-actions em {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 0 8px;
  border-radius: 9px;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.custom-employee-node-actions em {
  color: #94620b;
  background: #fff8e6;
}

.custom-employee-child-toggle {
  color: #2563eb;
  border-color: #dbeafe;
  background: #eff6ff;
}

.custom-employee-child-toggle span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.custom-employee-child-list {
  display: grid;
  gap: 4px;
  margin-left: 20px;
  padding-left: 12px;
  border-left: 1px solid #dbeafe;
}

.custom-employee-child-list.hidden {
  display: none !important;
}

.custom-employee-child-node {
  background: rgba(255, 255, 255, .92);
}

@media (max-width: 380px) {
  .workflow-node-card.workflow-time-node {
    grid-template-columns: 44px minmax(0, 1fr) auto auto;
    gap: 4px;
    padding-left: 5px;
    padding-right: 5px;
  }

  .workflow-time-node .workflow-status-pill,
  .workflow-time-node .workflow-node-action-menu summary,
  .workflow-child-toggle {
    padding-left: 6px;
    padding-right: 6px;
  }

  .custom-employee-node {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 5px;
    padding-left: 5px;
    padding-right: 5px;
  }

  .custom-employee-node-actions button,
  .custom-employee-node-actions em {
    padding-left: 6px;
    padding-right: 6px;
  }
}

.personal-digital-human-selected-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.personal-digital-human-selected > button {
  min-height: 30px;
  padding: 0 10px;
  color: #64748b;
  background: #fff;
}

.personal-digital-human-picker-modal {
  z-index: 190;
}

.personal-digital-human-preview-modal {
  z-index: 220;
}

.personal-digital-human-picker.employee-popover {
  width: min(760px, calc(100vw - 24px)) !important;
  height: min(90dvh, 780px);
  max-height: min(90dvh, 780px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  padding: 18px;
  color: #0f172a;
}

.personal-digital-human-picker::after,
.personal-digital-human-preview::after {
  display: none;
}

.personal-digital-human-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-right: 36px;
}

.personal-digital-human-picker-head > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.personal-digital-human-picker-head strong {
  color: #0f172a;
  font-size: 18px;
}

.personal-digital-human-picker-head span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.personal-digital-human-picker-head em {
  flex: 0 0 auto;
  padding: 5px 9px;
  color: #2563eb;
  border-radius: 999px;
  background: #eff6ff;
  font-size: 11px;
  font-style: normal;
}

.personal-digital-human-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.personal-digital-human-search input {
  min-width: 0;
  min-height: 42px;
  padding: 0 13px;
  color: #0f172a;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  outline: 0;
  background: #f8fafc;
}

.personal-digital-human-search input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.personal-digital-human-search button {
  min-height: 42px;
  color: #2563eb;
  background: #eff6ff;
}

.personal-digital-human-picker-status {
  min-height: 0;
  color: #64748b;
  font-size: 12px;
}

.personal-digital-human-picker-status:empty {
  display: none;
}

.personal-digital-human-picker-status.error {
  color: #b42318;
}

.personal-digital-human-template-grid {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 3px 10px 2px;
  scrollbar-width: none;
}

.personal-digital-human-template-grid::-webkit-scrollbar {
  display: none;
}

.personal-digital-human-template-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(30, 58, 138, .05);
}

.personal-digital-human-template-card.selected {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, .14), 0 8px 20px rgba(30, 58, 138, .1);
}

.personal-digital-human-template-card:focus-visible {
  outline: 3px solid rgba(59, 130, 246, .22);
  outline-offset: 2px;
}

.personal-digital-human-template-card.skeleton {
  min-height: 250px;
  border: 0;
  background: linear-gradient(100deg, #f1f5f9 20%, #f8fafc 36%, #f1f5f9 52%) 0 0 / 220% 100%;
  animation: personal-template-loading 1.2s linear infinite;
}

@keyframes personal-template-loading {
  to { background-position: -220% 0; }
}

.personal-digital-human-template-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #2563eb;
  background: #edf4ff;
  font-size: 20px;
}

.personal-digital-human-template-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.personal-digital-human-template-cover i {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  color: #2563eb;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  font-size: 10px;
  font-style: normal;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .1);
}

.personal-digital-human-template-card.selected .personal-digital-human-template-cover i {
  color: #fff;
  background: #2563eb;
}

.personal-digital-human-template-copy {
  display: grid;
  gap: 7px;
  padding: 9px;
}

.personal-digital-human-template-copy strong {
  overflow: hidden;
  color: #0f172a;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.personal-digital-human-template-copy button,
.personal-digital-human-template-copy small {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  color: #2563eb;
  border-radius: 9px;
  background: #eff6ff;
  font-size: 11px;
}

.personal-digital-human-template-copy small {
  color: #94a3b8;
  background: #f8fafc;
}

.personal-digital-human-picker-actions {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}

.personal-digital-human-picker-actions .danger-text {
  margin-right: auto;
  color: #b42318;
  background: #fff1f2;
}

.personal-digital-human-preview.employee-popover {
  width: min(520px, calc(100vw - 28px)) !important;
  display: grid;
  gap: 12px;
  overflow: hidden;
  padding: 18px;
  color: #0f172a;
}

.personal-digital-human-preview > strong {
  padding-right: 38px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-digital-human-preview video {
  width: 100%;
  max-height: 72dvh;
  display: block;
  border-radius: 16px;
  background: #0f172a;
}

@media (max-width: 619px) {
  .personal-digital-human-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .personal-digital-human-picker.employee-popover {
    height: min(92dvh, 760px);
    max-height: min(92dvh, 760px);
    padding: 15px;
  }

  .personal-digital-human-picker-head em {
    display: none;
  }

  .personal-digital-human-picker-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .personal-digital-human-picker-actions .danger-text {
    grid-column: 1 / -1;
    margin: 0;
  }
}

/* Homepage typography stays regular across titles, cards, labels, and statuses. */
#officeView,
#officeView * {
  font-weight: 400 !important;
}

/* Keep the homepage image picker square even when global button rules change. */
#officeView .designer-home-gallery {
  inline-size: 32px !important;
  block-size: 32px !important;
  min-inline-size: 32px !important;
  min-block-size: 32px !important;
  max-inline-size: 32px !important;
  max-block-size: 32px !important;
  aspect-ratio: 1 / 1;
  flex: 0 0 32px;
  box-sizing: border-box;
  padding: 0 !important;
  line-height: 1;
  border-radius: 50% !important;
  transform: none;
}

#officeView .designer-home-gallery svg {
  inline-size: 17px !important;
  block-size: 17px !important;
  min-inline-size: 17px;
  min-block-size: 17px;
}

.personal-keyword-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.personal-keyword-form > button {
  min-width: 76px;
}

/* Asset previews preserve the source aspect ratio and never widen the dialog. */
#assetPreviewDialog {
  padding: 14px;
}

#assetPreviewDialog .asset-preview-panel {
  width: min(620px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  max-height: min(90dvh, 820px);
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
}

#assetPreviewDialog .detail-modal-head,
#assetPreviewDialog .detail-modal-head > div,
#assetPreviewDialog .asset-preview-body {
  min-width: 0;
  max-width: 100%;
}

#assetPreviewDialog .detail-modal-head > div {
  flex: 1 1 auto;
}

#assetPreviewDialog .detail-modal-head > button {
  flex: 0 0 auto;
}

#assetPreviewTitle {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  font-size: clamp(18px, 5vw, 24px);
  letter-spacing: 0;
}

#assetPreviewDialog img.asset-preview-large,
#assetPreviewDialog video.asset-preview-large,
#assetPreviewDialog .content-record-cover {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 68dvh;
  margin-inline: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 16px;
}

#assetPreviewDialog video.asset-preview-large {
  width: 100%;
  min-height: 0;
  background: #0f172a;
}

#assetPreviewDialog .asset-preview-meta strong {
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

/* Boss cockpit: light executive dashboard based on the supplied design. */
#secretaryView {
  background: #f0f4f8;
}

#secretaryView .secretary-shell {
  width: 100%;
  display: grid;
  gap: 14px;
  padding: 14px 12px 34px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: #0f172a;
  background:
    radial-gradient(ellipse 75% 38% at 12% 16%, rgba(59, 130, 246, .09), transparent 62%),
    radial-gradient(ellipse 65% 34% at 88% 42%, rgba(34, 197, 94, .05), transparent 66%),
    linear-gradient(180deg, #eff6ff 0, #f0f4f8 340px, #f6f8fb 100%);
  box-shadow: none;
}

#secretaryView .secretary-command {
  position: relative;
  min-height: 174px;
  display: block;
  padding: 22px 18px;
  overflow: hidden;
  border: 1px solid rgba(30, 64, 175, .22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 20%, rgba(125, 211, 252, .38), transparent 35%),
    radial-gradient(circle at 16% 110%, rgba(37, 99, 235, .58), transparent 44%),
    linear-gradient(140deg, #1e40af, #1d4ed8 56%, #172554);
  box-shadow: 0 12px 30px rgba(30, 64, 175, .2);
}

#secretaryView .secretary-command::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(90deg, transparent, #000 62%);
}

#secretaryView .secretary-command-copy {
  position: relative;
  z-index: 2;
  width: 64%;
  padding-top: 10px;
}

#secretaryView .secretary-kicker {
  color: #bfdbfe;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

#secretaryView .secretary-command h2 {
  margin: 8px 0 7px;
  color: #fff;
  font-size: 26px;
  line-height: 1.08;
  letter-spacing: 0;
}

#secretaryView .secretary-subtitle {
  color: rgba(219, 234, 254, .88);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

#secretaryView .secretary-avatar-stage {
  position: absolute;
  right: -3px;
  bottom: -10px;
  width: 148px;
  height: 184px;
  z-index: 1;
}

#secretaryView .secretary-orbit {
  display: none;
}

#secretaryView .secretary-cockpit-img {
  position: absolute;
  left: auto;
  right: 0;
  top: auto;
  bottom: 0;
  width: auto;
  max-width: none;
  height: 194px;
  transform: none;
  object-fit: contain;
  object-position: bottom right;
  animation: none;
  filter: drop-shadow(0 14px 18px rgba(3, 13, 42, .32));
}

#secretaryView .secretary-metrics,
#secretaryView .secretary-focus,
#secretaryView .secretary-department-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

#secretaryView .secretary-metric,
#secretaryView .secretary-focus-card,
#secretaryView .secretary-dept-card,
#secretaryView .secretary-trend-panel {
  position: relative;
  border: 1px solid rgba(255, 255, 255, .88);
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 5px 18px rgba(30, 58, 138, .065);
  backdrop-filter: blur(14px);
}

#secretaryView .secretary-metric {
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 15px;
  border-radius: 18px;
}

#secretaryView .secretary-metric span,
#secretaryView .secretary-focus-card span {
  color: #64748b;
  font-size: 13px;
  font-weight: 650;
}

#secretaryView .secretary-metric strong {
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

#secretaryView .secretary-metric.green strong { color: #10b981; }
#secretaryView .secretary-metric.blue strong { color: #2563eb; }
#secretaryView .secretary-metric.orange strong { color: #f59e0b; }
#secretaryView .secretary-metric.cyan strong { color: #0891b2; }
#secretaryView .secretary-metric.red strong { color: #f43f5e; }

#secretaryView .secretary-focus-card {
  min-height: 92px;
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 15px;
  overflow: hidden;
  border-radius: 18px;
}

#secretaryView .secretary-focus-card.primary {
  grid-column: 1 / -1;
  background: linear-gradient(110deg, #eff6ff, rgba(255, 255, 255, .94));
  border-color: #dbeafe;
}

#secretaryView .secretary-focus-card.danger {
  border-color: #fecdd3;
  background: rgba(255, 241, 242, .92);
}

#secretaryView .secretary-focus-card strong {
  color: #1e293b;
  font-size: 21px;
  line-height: 1.15;
}

#secretaryView .secretary-focus-card strong.up { color: #059669; }
#secretaryView .secretary-focus-card strong.down { color: #e11d48; }
#secretaryView .secretary-focus-card strong.flat { color: #2563eb; }

#secretaryView .secretary-focus-card em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}

#secretaryView .secretary-section-title {
  display: flex;
  align-items: center;
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  padding: 3px 2px 0;
}

#secretaryView .secretary-section-title strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#secretaryView .secretary-section-title strong::before {
  width: 4px;
  height: 19px;
  border-radius: 999px;
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
  box-shadow: none;
}

#secretaryView .secretary-map {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 22px;
  background:
    linear-gradient(rgba(15, 23, 42, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .035) 1px, transparent 1px),
    rgba(255, 255, 255, .86);
  background-size: 20px 20px;
  box-shadow: 0 5px 18px rgba(30, 58, 138, .065);
}

#secretaryView .secretary-map::before,
#secretaryView .secretary-map::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: none;
}

#secretaryView .secretary-map::before {
  width: 216px;
  height: 216px;
  inset: auto;
  border: 1px dashed rgba(59, 130, 246, .2);
}

#secretaryView .secretary-map::after {
  width: 138px;
  height: 138px;
  border: 1px solid rgba(59, 130, 246, .18);
  background: rgba(239, 246, 255, .34);
}

#secretaryView .secretary-map-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 4px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  box-shadow: 0 9px 26px rgba(37, 99, 235, .28);
}

#secretaryView .secretary-map-core strong,
#secretaryView .secretary-map-core .secretary-core-img + strong {
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

#secretaryView .secretary-map-core span {
  color: #dbeafe;
  font-size: 9px;
  font-weight: 650;
}

#secretaryView .secretary-core-img {
  position: relative;
  z-index: 1;
  width: 29px;
  height: 29px;
  margin-bottom: 2px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  filter: none;
}

#secretaryView .secretary-core-ring {
  display: none;
}

#secretaryView .secretary-map-node {
  position: absolute;
  left: var(--sx);
  top: var(--sy);
  z-index: 4;
  min-width: 66px;
  min-height: 58px;
  display: grid;
  gap: 4px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #64748b;
  background: transparent;
  box-shadow: none;
  transform: translate(-50%, -50%);
  animation: none;
}

#secretaryView .secretary-map-node span {
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

#secretaryView .secretary-map-node strong {
  min-width: 50px;
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 0 9px;
  color: #1e293b;
  border: 1px solid #fff;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 4px 12px rgba(30, 58, 138, .09);
  font-size: 16px;
}

#secretaryView .secretary-map-node.active strong { color: #059669; }
#secretaryView .secretary-map-node.alert strong { color: #e11d48; }

#secretaryView .secretary-trend-panel {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 14px;
  align-items: end;
  padding: 17px;
  border-radius: 20px;
}

#secretaryView .secretary-trend-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: start;
}

#secretaryView .secretary-trend-copy strong {
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
}

#secretaryView .secretary-trend-copy em {
  padding: 3px 7px;
  color: #94a3b8;
  border-radius: 6px;
  background: #f1f5f9;
  font-size: 10px;
  font-style: normal;
}

#secretaryView .secretary-trend-copy span {
  grid-column: 1 / -1;
  color: #1e293b;
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
}

#secretaryView .secretary-trend-copy span.up { color: #059669; }
#secretaryView .secretary-trend-copy span.down { color: #e11d48; }
#secretaryView .secretary-trend-copy span.flat { color: #1e293b; }

#secretaryView .secretary-sparkline,
#secretaryView .secretary-dept-sparkline {
  display: flex;
  align-items: end;
  gap: 6px;
  min-height: 48px;
  padding-bottom: 2px;
  border-bottom: 2px solid #e2e8f0;
}

#secretaryView .secretary-sparkline i,
#secretaryView .secretary-dept-sparkline i {
  flex: 1 1 0;
  min-width: 5px;
  border-radius: 4px 4px 1px 1px;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
  box-shadow: none;
  animation: secretary-bar-in .55s ease both;
  animation-delay: var(--bar-delay, 0s);
}

#secretaryView .secretary-dept-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border-radius: 18px;
  color: #1e293b;
  text-align: left;
}

#secretaryView .secretary-dept-card.active { border-color: #bbf7d0; }
#secretaryView .secretary-dept-card.alert { border-color: #fecdd3; background: rgba(255, 247, 248, .94); }

#secretaryView .secretary-dept-head {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
}

#secretaryView .secretary-dept-head > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
  border-radius: 50%;
  background: #eff6ff;
  font-size: 11px;
  font-weight: 800;
}

#secretaryView .secretary-dept-head strong {
  overflow: hidden;
  color: #1e293b;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

#secretaryView .secretary-dept-head em {
  color: #94a3b8;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

#secretaryView .secretary-dept-head em.up { color: #059669; }
#secretaryView .secretary-dept-head em.down { color: #e11d48; }
#secretaryView .secretary-dept-head em.flat { color: #94a3b8; }

#secretaryView .secretary-dept-radar {
  position: relative;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f5f9;
}

#secretaryView .secretary-dept-radar i {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: #3b82f6;
  box-shadow: none;
  animation: secretary-scan .8s ease both;
}

#secretaryView .secretary-dept-data {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

#secretaryView .secretary-dept-data b {
  display: grid;
  gap: 2px;
  padding: 0;
  color: #1e293b;
  background: transparent;
  font-size: 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

#secretaryView .secretary-dept-data em {
  color: #94a3b8;
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
}

#secretaryView .secretary-dept-sparkline {
  min-height: 26px;
  gap: 4px;
  border-bottom-width: 1px;
}

#secretaryView .secretary-dept-sparkline i {
  background: linear-gradient(180deg, #93c5fd, #3b82f6);
}

#secretaryView .secretary-dept-foot {
  display: grid;
  gap: 3px;
  padding: 8px;
  color: #64748b;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 10px;
  font-weight: 500;
}

#secretaryView .secretary-dept-foot span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 380px) {
  #secretaryView .secretary-shell {
    padding-inline: 9px;
  }

  #secretaryView .secretary-command {
    min-height: 166px;
    padding-inline: 15px;
  }

  #secretaryView .secretary-avatar-stage {
    right: -12px;
  }

  #secretaryView .secretary-department-grid {
    gap: 8px;
  }

  #secretaryView .secretary-dept-card {
    padding: 10px;
  }

  #assetPreviewDialog .asset-preview-panel {
    padding: 18px;
  }
}

/* AI marketing V1.1 package restoration */
#officeView .marketing-creation-section {
  display: grid;
  gap: 12px;
}

#officeView .marketing-creation-section .office-section-head {
  margin-bottom: 0;
}

#officeView .marketing-creation-subtitle {
  margin: -5px 0 2px 18px;
  color: #7b8799;
  font-size: 11px;
  line-height: 1.4;
}

#officeView .home-marketing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#officeView .home-marketing-card {
  min-width: 0;
  min-height: 126px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .72);
  border-radius: 22px;
  color: #172033;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 26px rgba(30, 58, 138, .08);
  text-align: left;
}

#officeView .home-marketing-card.digital-human,
#officeView .home-marketing-card.copy {
  grid-column: 1 / -1;
  min-height: 86px;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}

#officeView .home-marketing-card.digital-human {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(110deg, #244bd4, #2d74ef);
  box-shadow: 0 14px 30px rgba(37, 99, 235, .24);
}

#officeView .home-marketing-card > span:not(.home-marketing-icon) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

#officeView .home-marketing-card strong,
#officeView .home-marketing-card small {
  display: block;
  overflow: hidden;
  letter-spacing: 0;
  text-overflow: ellipsis;
}

#officeView .home-marketing-card strong {
  font-size: 15px;
  line-height: 1.35;
  white-space: nowrap;
}

#officeView .home-marketing-card small {
  color: #8994a6;
  font-size: 10px;
  line-height: 1.45;
  white-space: normal;
}

#officeView .home-marketing-card.digital-human small {
  color: rgba(255, 255, 255, .82);
}

#officeView .home-marketing-card > b {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
}

#officeView .home-marketing-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #286df0;
  background: #edf4ff;
}

#officeView .home-marketing-card.video .home-marketing-icon {
  color: #396fe7;
  background: #eaf1ff;
}

#officeView .home-marketing-card.design .home-marketing-icon {
  color: #5068e8;
  background: #eef0ff;
}

#officeView .home-marketing-card.copy .home-marketing-icon {
  color: #12a9cc;
  background: #e9faff;
}

#officeView .home-marketing-card.digital-human .home-marketing-icon {
  color: #fff;
  background: rgba(255, 255, 255, .14);
}

#officeView .home-marketing-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#departmentView .department-skill-grid.marketing-creation-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px;
}

#departmentView .marketing-entry-card {
  min-width: 0;
  min-height: 136px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .76);
  border-radius: 22px;
  color: #172033;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 26px rgba(30, 58, 138, .08);
  text-align: left;
}

#departmentView .marketing-entry-card.digital-human,
#departmentView .marketing-entry-card.copy {
  grid-column: 1 / -1;
  min-height: 88px;
  flex-direction: row;
  align-items: center;
}

#departmentView .marketing-entry-card.digital-human {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(110deg, #244bd4, #2d74ef);
  box-shadow: 0 14px 30px rgba(37, 99, 235, .24);
}

#departmentView .marketing-entry-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #286df0;
  background: #edf4ff;
}

#departmentView .marketing-entry-card.copy .marketing-entry-icon {
  color: #12a9cc;
  background: #e9faff;
}

#departmentView .marketing-entry-card.digital-human .marketing-entry-icon {
  color: #fff;
  background: rgba(255, 255, 255, .14);
}

#departmentView .marketing-entry-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

#departmentView .marketing-entry-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

#departmentView .marketing-entry-copy strong {
  overflow: hidden;
  font-size: 15px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#departmentView .marketing-entry-copy small {
  color: #8994a6;
  font-size: 10px;
  line-height: 1.45;
}

#departmentView .marketing-entry-card.digital-human small {
  color: rgba(255, 255, 255, .82);
}

#departmentView .marketing-entry-card > b {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
}

#abilityView .ability-shell.marketing-category-mode,
#abilityView .ability-shell.marketing-tool-mode {
  padding-top: 2px;
}

#abilityView .ability-shell.marketing-category-mode > .department-hero,
#abilityView .ability-shell.marketing-category-mode > .department-breadcrumb,
#abilityView .ability-shell.marketing-category-mode > .ability-workbench,
#abilityView .ability-shell.marketing-tool-mode > .department-hero,
#abilityView .ability-shell.marketing-tool-mode > .department-breadcrumb,
#abilityView .ability-shell.marketing-tool-mode > .ability-child-grid {
  display: none !important;
}

#abilityView .ability-shell.marketing-category-mode > .ability-child-grid {
  grid-template-columns: 1fr !important;
  gap: 18px;
}

#abilityView .marketing-category-mode .department-skill-card.designer-ability-card {
  padding: 10px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(30, 58, 138, .10);
}

#abilityView .designer-ability-art.has-cover {
  height: auto;
  aspect-ratio: 1400 / 682;
  background: #eaf0f8;
}

#abilityView .designer-ability-art.has-cover::before,
#abilityView .designer-ability-art.has-cover::after {
  display: none;
}

#abilityView .designer-ability-art.has-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
}

#abilityView .marketing-category-mode .designer-ability-meta {
  min-height: 58px;
  padding: 13px 12px 5px;
}

#abilityView .marketing-category-mode .designer-ability-meta h3 {
  font-size: 16px;
}

#abilityView .ability-shell.marketing-tool-mode > .ability-workbench {
  display: grid;
  gap: 20px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 32px rgba(30, 58, 138, .09);
}

#abilityView .marketing-tool-mode .ability-workbench-head {
  flex-direction: row;
  align-items: center;
}

#abilityView .marketing-tool-mode .ability-workbench-head h3 {
  margin: 0;
  color: #172033;
  font-size: 18px;
  line-height: 1.35;
}

#abilityView .marketing-tool-mode .ability-workbench-badge {
  min-height: 28px;
  color: #159370;
  background: #eafbf5;
  font-size: 11px;
}

#abilityView .marketing-tool-mode .ability-workbench-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 12px;
}

#abilityView .marketing-tool-mode .ability-workbench-fields .field > label {
  margin-bottom: 7px;
  color: #5d697b;
  font-size: 12px;
  font-weight: 600;
}

#abilityView .marketing-tool-mode .ability-workbench-fields input,
#abilityView .marketing-tool-mode .ability-workbench-fields select,
#abilityView .marketing-tool-mode .ability-workbench-fields textarea,
#abilityView .marketing-tool-mode .asset-picker-actions > button,
#abilityView .marketing-tool-mode .asset-picker-row button {
  min-height: 48px;
  border-color: #e4e9f1;
  border-radius: 14px;
  color: #263247;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .04);
}

#abilityView .marketing-tool-mode .ability-workbench-fields textarea {
  min-height: 112px;
}

#abilityView .marketing-tool-mode .ability-workbench-actions button {
  width: auto !important;
  min-width: 132px;
  min-height: 48px;
  margin-left: auto;
  border-radius: 22px;
  background: #286df0;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
}

@media (max-width: 380px) {
  #officeView .home-marketing-grid,
  #departmentView .department-skill-grid.marketing-creation-grid {
    gap: 10px;
  }

  #officeView .home-marketing-card,
  #departmentView .marketing-entry-card {
    padding: 14px;
  }

  #abilityView .ability-shell.marketing-tool-mode > .ability-workbench {
    padding: 18px;
  }
}
