/* Owner-supplied browsing design. All rules stay inside the library route. */
.library-page:has(.library-design-hero) {background: #0f1014; --emotion-blue: #0089ff; --emotion-blue-top: #6fd0ff; --emotion-blue-middle: #35b4ff; --emotion-blue-bottom: #0f9cff; --emotion-blue-deep: #024069; --emotion-blue-rgb: 0 137 255;}
.library-page:has(.library-design-hero)::before {display: none;}
.library-page:has(.library-design-hero) .library-nav {height: 70px; min-height: 70px; padding: 0 28px; border-bottom: 1px solid #303034; background: linear-gradient(180deg,#171717ee,#0c0c0cee); box-shadow: none; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);}
.library-page:has(.library-design-hero) .library-nav .emotion-brand {font-size: 23px; font-weight: 800; gap: 12px;}
.library-page:has(.library-design-hero) .emotion-brand-mark {width: 21px; height: 21px; padding: 0; border: 0; border-radius: 0; background: #00b3ff; mask: url('/landing/v90/emotion-mark.png') center / contain no-repeat; box-shadow: none; filter: none;}
.library-page:has(.library-design-hero) .emotion-brand-mark svg {display: none;}
.library-page:has(.library-design-hero) .emotion-brand-mark::before {background-color: #00b3ff !important; filter: none;}
.library-page:has(.library-design-hero) .library-back-link {display: flex; align-items: center; gap: 7px; margin-left: auto; color: #bcbcbc; font-size: 13px; font-weight: 600;}
.library-page:has(.library-design-hero) .library-back-link::before {content: ''; width: 17px; height: 17px; background: url('/library-design/icon-upgrade-crown.png') center / contain no-repeat;}
.library-design-nav {display: flex; align-items: center; gap: 24px; margin-left: 28px; margin-right: 14px; position: relative;}
.library-design-affiliates {padding: 0; border: 0; background: none; color: #bcbcbc; font: 600 13px var(--brand-font); cursor: pointer;}
.library-design-bell {display: grid; place-items: center; width: 36px; height: 36px; padding: 8px; border: 1px solid #2a2a2a; border-radius: 50%; background: #1b1b1b; color: #bcbcc7; box-shadow: inset 0 1px #ffffff09, 0 4px 8px #0003; cursor: pointer;}
.library-design-bell svg {width: 20px; height: 20px;}
.library-design-notifications {position: absolute; top: 46px; right: 0; width: 230px; padding: 18px; border: 1px solid #303034; border-radius: 14px; background: #19191f; box-shadow: 0 12px 30px #0008; color: #eee; font-size: 13px; z-index: 100;}
.library-design-notifications p {margin: 8px 0 0; color: #929292;}
.library-page:has(.library-design-hero) .library-browser {grid-template-columns: 234px minmax(0,1fr);}
.library-page:has(.library-design-hero) .library-tier-sidebar {top: 70px; height: calc(100svh - 70px); gap: 4px; padding: 13px 6px 0; border-right: 1px solid #29292d; background: #19191f;}
.library-page:has(.library-design-hero) .library-sidebar-search {min-height: 40px; height: 40px; margin: 0 3px 20px 0; gap: 10px; padding: 0 14px; border: 1px solid #292929; border-radius: 999px; background: #1b1b1b; color: #929292; font-size: 13px; box-shadow: 0 4px 8px #0005,inset 0 1px #ffffff08;}
.library-page:has(.library-design-hero) .library-sidebar-search kbd {display: none;}
.library-page:has(.library-design-hero) .library-collection-list {gap: 6px; padding-bottom: 20px; margin: 0 12px 18px 0; border-color: #2a2a2d;}
.library-page:has(.library-design-hero) .library-collection-button {min-height: 42px; gap: 12px; padding: 0 12px; border-radius: 12px; color: #aaa; font-size: 13px; font-weight: 600;}
.library-page:has(.library-design-hero) .library-collection-button.active {border-color: #292929; background: #1b1b1b; color: #00b3ff; box-shadow: inset 0 1px #ffffff08,0 4px 8px #0004;}
.library-page:has(.library-design-hero) .library-collection-button.active svg {color: #00b3ff;}
.library-page:has(.library-design-hero) .library-collection-count {font-size: 11px; color: #eee;}
.library-page:has(.library-design-hero) .library-tier-sidebar-title {margin: 0 12px 8px; color: #929292; font-size: 11px;}
.library-page:has(.library-design-hero) .library-tier-list {gap: 4px;}
.library-page:has(.library-design-hero) .library-tier-button {min-height: 42px; grid-template-columns: 22px minmax(0,1fr) auto; gap: 22px; padding: 0 12px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: #bcbcbc; font-size: 12px;}
.library-page:has(.library-design-hero) .library-tier-button.active {border-color: #292929; background: #1b1b1b; color: #eee; box-shadow: inset 0 1px #ffffff08,0 4px 8px #0004;}
.library-page:has(.library-design-hero) .library-tier-icon {object-fit: contain; width: 22px; height: 22px; filter: none;}
.library-page:has(.library-design-hero) .library-tier-copy {font-size: 12px;}
.library-page:has(.library-design-hero) .library-tier-button[data-tier='basic'] img,.library-page:has(.library-design-hero) .library-template-card[data-tier='basic'] .library-card-tier-icon {content: url('/library-design/icon-plan-basic.png');}
.library-page:has(.library-design-hero) .library-tier-button[data-tier='plus'] img,.library-page:has(.library-design-hero) .library-template-card[data-tier='plus'] .library-card-tier-icon {content: url('/library-design/icon-plan-plus.png');}
.library-page:has(.library-design-hero) .library-tier-button[data-tier='pro'] img,.library-page:has(.library-design-hero) .library-template-card[data-tier='pro'] .library-card-tier-icon {content: url('/library-design/icon-plan-pro.png');}
.library-page:has(.library-design-hero) .library-tier-count {min-width: 25px; height: 22px; border: 0; background: #121214; color: #eee; font-size: 10px;}
.library-page:has(.library-design-hero) .library-tier-button.active .library-tier-count {background: #0089ff; color: white;}
.library-page:has(.library-design-hero) .library-browser-main {position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0,1fr) auto; align-content: start; max-width: none; padding: 18px 27px 100px 29px; overflow: clip;}
.library-browser-main:has(.library-design-hero) > :not(.library-drag-layer) {position: relative; z-index: 1;}
.library-design-hero {grid-column: 1 / -1; grid-row: 1; display: flex; flex-direction: column; align-items: center; height: 236px; pointer-events: none;}
.library-design-hero::before {content: ''; position: absolute; inset: 0 0 -180px; z-index: -1; pointer-events: none; background: url('/library-design/hero-stepped-grid.svg') center top / min(1400px,149%) auto no-repeat; opacity: .55; mask-image: linear-gradient(#000 55%, transparent 100%);}
.library-design-hero h2 {display: flex; justify-content: center; gap: 15px; margin: 0 0 12px; padding: 0; color: #fff; font: 800 38px/46px var(--brand-font); letter-spacing: -.4px; text-transform: uppercase; pointer-events: auto;}
.library-design-hero .hero-title-creating {position: relative; display: inline-block;}
.library-design-gloss {position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none;}
.library-design-flow {position: relative; width: min(920px,100%); height: 178px; isolation: isolate; perspective: 1800px; mask-image: linear-gradient(to right,transparent,#000 27%,#000 73%,transparent); pointer-events: none;}
.library-design-flow-card {position: absolute; top: 50%; left: 50%; display: block; aspect-ratio: 16 / 9; margin: 0; padding: 5px; box-sizing: border-box; overflow: hidden; border: 1px solid #a99ab343; border-radius: 12px; background: #111115; box-shadow: inset 0 1px 2px #ffffff18,0 10px 24px #0005; transform-origin: center; pointer-events: auto;}
.library-design-flow-card video {display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 7px; background: #000; pointer-events: none;}
.library-page:has(.library-design-hero) .library-toolbar {display: contents;}
.library-page:has(.library-design-hero) .library-search {grid-column: 1 / -1; grid-row: 2; justify-self: center; display: flex; align-items: center; width: min(876px,100%); min-height: 56px; box-sizing: border-box; margin: 9px 0 24px; padding: 0 21px; border: 1px solid #2b2b2e; border-radius: 999px; background: #1b1b1b; color: #929292; box-shadow: inset 0 1px #ffffff08,0 6px 14px #0005;}
.library-page:has(.library-design-hero) .library-search input {flex: 1; min-width: 0; height: 54px; padding: 0; border: 0; outline: 0; background: transparent; color: #eee; font: 400 14px var(--brand-font); box-shadow: none;}
.library-page:has(.library-design-hero) .library-search svg {order: 2; width: 21px; height: 21px; margin-left: 12px;}
.library-page:has(.library-design-hero) .library-toolbar > .library-search,.library-page:has(.library-design-hero) .library-toolbar > .library-sort-menu {position: relative; z-index: 3;}
.library-page:has(.library-design-hero) .library-heading {grid-column: 1 / -1; grid-row: 3; margin: 0 0 16px;}
.library-page:has(.library-design-hero) .library-heading h1 {color: #00b3ff; font-size: 30px; font-weight: 800; line-height: 36px; letter-spacing: -.6px;}
.library-page:has(.library-design-hero) .library-heading p {margin: 4px 0 0; color: #929292; font-size: 13px; line-height: 20px;}
.library-page:has(.library-design-hero) .library-heading,.library-page:has(.library-design-hero) .library-browse-topics,.library-page:has(.library-design-hero) .library-filter-row {pointer-events: none;}
.library-page:has(.library-design-hero) .library-heading h1,.library-page:has(.library-design-hero) .library-heading p {width: fit-content; pointer-events: auto;}
.library-page:has(.library-design-hero) .library-filter-row button {pointer-events: auto;}
.library-page:has(.library-design-hero) .library-browse-topics {grid-column: 1; grid-row: 4; align-self: center; min-width: 0; margin: 0 12px 17px 0;}
.library-page:has(.library-design-hero) .library-filter-row {display: flex; gap: 8px; margin: 0; overflow-x: auto; padding: 0; scrollbar-width: none;}
.library-page:has(.library-design-hero) .library-filter-row button {min-height: 42px; flex: none; margin: 0; padding: 0 17px; border: 1px solid #202020; border-radius: 11px; background: #1b1b1b; color: #bcbcbc; font-size: 13px; font-weight: 600; box-shadow: inset 0 1px #ffffff05,0 3px 8px #0002;}
.library-page:has(.library-design-hero) .library-filter-row button.active {border-color: #292929; background: #292929; color: #eee;}
.library-page:has(.library-design-hero) .library-sort-menu {grid-column: 2; grid-row: 4; align-self: center; margin: 0 0 17px;}
.library-page:has(.library-design-hero) .library-sort-trigger {height: 44px; min-height: 44px; padding: 0 16px; gap: 9px; border: 1px solid #292929; border-radius: 18px; background: #1b1b1b; color: #eee; box-shadow: inset 0 1px #ffffff08,0 4px 8px #0004;}
.library-page:has(.library-design-hero) .library-card-grid, .library-page:has(.library-design-hero) .library-empty-state {grid-column: 1 / -1; grid-row: 5; position: relative; z-index: 2; margin: 0;}
.library-page:has(.library-design-hero) .library-card-grid {grid-template-columns: repeat(3,minmax(0,1fr)); gap: 30px 26px;}
.library-page:has(.library-design-hero) .library-card-preview {aspect-ratio: 16 / 9; border-radius: 13px; background: #000; box-shadow: 0 9px 20px #0004;}
.library-page:has(.library-design-hero) .library-template-card:not(:hover) .library-card-preview::after {box-shadow: none;}
.library-page:has(.library-design-hero) .library-template-card {background: transparent;}
.library-page:has(.library-design-hero) .library-card-title {color: #bcbcbc;}
.library-page:has(.library-design-hero) .library-trial-card {grid-column: 1 / -1; grid-row: 6; margin: 24px 0 0;}
.library-drag-layer {position: absolute; left: 0; top: 0; width: 100%; z-index: 0; overflow: hidden; pointer-events: none;}
.library-drag-layer .library-drag-icon {position: absolute; display: block; box-sizing: border-box; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0 !important; border-radius: 0; outline: none !important; background: transparent !important; box-shadow: none !important; transform: none !important; filter: none !important; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; cursor: grab; pointer-events: auto;}
.library-drag-layer .library-drag-icon::before,.library-drag-layer .library-drag-icon::after {content: none !important;}
.library-drag-icon:active {cursor: grabbing;}
.library-drag-icon img {display: block; width: 100%; height: 100%; padding: 8%; box-sizing: border-box; object-fit: contain; transform: rotate(var(--icon-angle)); filter: url(#hero-plan-colour-glow) drop-shadow(0 6px 10px #0006); pointer-events: none; -webkit-user-drag: none;}
.library-drag-icon:focus-visible img {filter: url(#hero-plan-colour-glow) drop-shadow(0 0 5px #6fd0ff);}
.library-design-allowance {margin: auto 3px 0; padding: 13px 9px 0; border-top: 1px solid #29292d; color: #bcbcbc; font-size: 11px;}
.library-design-allowance > div {display: flex; align-items: center; justify-content: space-between; gap: 8px;}
.library-design-allowance strong {color: #eee; font-size: 11px;}
.library-design-allowance progress {display: block; appearance: none; width: 100%; height: 4px; margin: 8px 0; border: 0; border-radius: 4px; background: #25252a; accent-color: #0089ff; overflow: hidden;}
.library-design-allowance progress::-webkit-progress-bar {background: #25252a;}
.library-design-allowance progress::-webkit-progress-value {background: #0089ff; border-radius: 4px;}
.library-design-allowance small {display: block; color: #929292; font-size: 10px;}
.library-design-upgrade {display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; box-sizing: border-box; margin-top: 16px; border: 1px solid #6fd0ffb3; border-radius: 7px; background: linear-gradient(#6fd0ff,#35b4ff 12%,#0089ff 52%,#024069); box-shadow: inset 0 1px 2px #ffffffd9,inset 0 -2px 3px #0007,0 3px 0 #02406980,0 8px 18px #0089ff1f; color: #fff; font-weight: 600; font-size: 11px; text-decoration: none;}
.library-design-upgrade img {width: 13px; height: 13px; filter: brightness(0) invert(1);}
.library-page:has(.library-design-hero) .library-sidebar-socials {justify-content: center; gap: 14px; margin: 0; padding: 16px 0 9px;}
.library-page:has(.library-design-hero) .library-sidebar-socials a {width: 39px; height: 32px; color: #bcbcbc;}
.library-page:has(.library-design-hero) .library-sidebar-socials svg {width: 17px; height: 17px;}
@media (max-width: 1000px) {
  .library-page:has(.library-design-hero) .library-browser {grid-template-columns: 210px minmax(0,1fr);}
  .library-page:has(.library-design-hero) .library-browser-main {padding-left: 20px; padding-right: 20px;}
  .library-page:has(.library-design-hero) .library-card-grid {grid-template-columns: repeat(2,minmax(0,1fr));}
  .library-page:has(.library-design-hero) .library-sort-label {display: none;}
}
@media (max-width: 760px) {
  .library-page:has(.library-design-hero) .library-nav {height: 64px; min-height: 64px; padding: 0 16px; gap: 12px;}
  .library-page:has(.library-design-hero) .library-nav .emotion-brand {font-size: 20px; gap: 7px;}
  .library-design-nav {margin: 0; gap: 10px;}
  .library-design-affiliates {display: none;}
  .library-page:has(.library-design-hero) .library-back-link {font-size: 12px;}
  .library-page:has(.library-design-hero) .library-browser {grid-template-columns: minmax(0,1fr);}
  .library-page:has(.library-design-hero) .library-tier-sidebar {position: relative; top: 0; height: auto; padding: 14px 16px; border-right: 0; border-bottom: 1px solid #29292d;}
  .library-page:has(.library-design-hero) .library-sidebar-search,.library-page:has(.library-design-hero) .library-tier-sidebar-title,.library-design-allowance,.library-page:has(.library-design-hero) .library-sidebar-socials {display: none;}
  .library-page:has(.library-design-hero) .library-collection-list {display: flex; gap: 8px; margin: 0 0 8px; padding: 0; border: 0;}
  .library-page:has(.library-design-hero) .library-collection-button {flex: 1; gap: 8px; padding: 0 10px; min-height: 38px; font-size: 12px;}
  .library-page:has(.library-design-hero) .library-tier-list {display: flex; gap: 6px; overflow-x: auto;}
  .library-page:has(.library-design-hero) .library-tier-button {display: flex; flex: 1 1 0; width: auto; min-width: 0; justify-content: center; gap: 6px; min-height: 36px; padding: 0 8px; font-size: 11px;}
  .library-page:has(.library-design-hero) .library-tier-count {display: none;}
  .library-page:has(.library-design-hero) .library-browser-main {padding: 20px 16px 70px;}
  .library-design-hero {height: 180px;}
  .library-design-hero h2 {font-size: 27px; line-height: 36px; gap: 10px; margin-bottom: 20px;}
  .library-design-flow {width: 100%; mask-image: linear-gradient(to right,transparent,#000 12%,#000 88%,transparent);}
  .library-page:has(.library-design-hero) .library-search {min-height: 50px; margin: 5px 0 22px; padding: 0 17px;}
  .library-page:has(.library-design-hero) .library-search input {height: 48px; font-size: 13px;}
  .library-page:has(.library-design-hero) .library-heading h1 {font-size: 26px; line-height: 32px;}
  .library-page:has(.library-design-hero) .library-heading p {font-size: 12px;}
  .library-page:has(.library-design-hero) .library-browse-topics {grid-column: 1 / -1; margin: 0 0 12px;}
  .library-page:has(.library-design-hero) .library-filter-row button {min-height: 36px; padding: 0 12px; font-size: 12px;}
  .library-page:has(.library-design-hero) .library-sort-menu {grid-row: 5; grid-column: 1 / -1; justify-self: end; margin: 0 0 14px;}
  .library-page:has(.library-design-hero) .library-sort-trigger {height: 36px; min-height: 36px; font-size: 12px;}
  .library-page:has(.library-design-hero) .library-card-grid,.library-page:has(.library-design-hero) .library-empty-state {grid-row: 6;}
  .library-page:has(.library-design-hero) .library-card-grid {grid-template-columns: minmax(0,1fr); gap: 26px;}
  .library-page:has(.library-design-hero) .library-trial-card {grid-row: 7;}
}

/* Optional blue selection treatment. Typography remains owned by Text studio. */
.creating-effect-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.creating-word-normal { display: inline; }
.creating-word-gloss,
.creating-selection { display: none; }

.library-page .library-design-hero .hero-title-creating {
  background: none !important;
  -webkit-text-fill-color: currentColor;
  -webkit-text-stroke: 0;
  text-shadow: none !important;
}

.library-page .library-design-hero .hero-title-creating::after {
  content: none !important;
  display: none !important;
}

.library-page .library-design-hero .creating-word-normal { display: none; }
/* At the largest saved text sizes, the cursor extends below the word. Keep
   the editor preview's decorative arrow intact without adding layout space. */
.library-page .library-design-hero .heading-live-preview { overflow: visible; }
.library-page .library-design-hero .creating-word-gloss {
  display: inline;
  filter: drop-shadow(0 0 9px rgb(var(--emotion-blue-rgb, 0 137 255) / .5));
}

.library-page .library-design-hero .creating-letter {
  color: transparent;
  background: linear-gradient(var(--emotion-blue-top, #6fd0ff), var(--emotion-blue-middle, #35b4ff) 42%, var(--emotion-blue-bottom, #0f9cff));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0;
  filter: url(#creating-blue-gloss);
}

.library-page .library-design-hero .creating-selection {
  display: block;
  position: absolute;
  left: -.12em;
  right: -.12em;
  top: -.04em;
  bottom: -.12em;
  pointer-events: none;
}

.creating-selection-box {
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
  border: 1.5px dashed var(--emotion-blue, #0089ff);
  background: rgb(var(--emotion-blue-rgb, 0 137 255) / .14);
  background: color-mix(in srgb, var(--emotion-blue, #0089ff) 14%, transparent);
  animation: creating-selection-drag 4.2s ease-in-out infinite,
    creating-selection-marquee 4.2s ease-in-out infinite;
}

.creating-selection-box i {
  position: absolute;
  width: .09em;
  height: .09em;
  border-radius: 9999px;
  background: var(--emotion-blue, #0089ff);
  animation: creating-selection-handle 4.2s ease-in-out infinite;
}

.creating-corner-tl { left: -.045em; top: -.045em; }
.creating-corner-tr { right: -.045em; top: -.045em; }
.creating-corner-br { right: -.045em; bottom: -.045em; }
.creating-corner-bl { left: -.045em; bottom: -.045em; }

.creating-selection-pointer {
  position: absolute;
  top: 0;
  left: 0;
  animation: creating-selection-pointer 4.2s ease-in-out infinite;
}

.creating-selection-pointer svg {
  position: absolute;
  top: -.065em;
  left: -.065em;
  width: .36em;
  height: auto;
  overflow: visible;
  transform-origin: .065em .065em;
  animation: creating-selection-click 4.2s ease-in-out infinite,
    creating-selection-glow 4.2s ease-in-out infinite;
}

.creating-selection-pointer svg path {
  fill: url(#creating-cursor-fill);
  stroke: #333;
  stroke-width: .5;
}

@keyframes creating-selection-drag {
  0%, 15%, 100% { width: 0; height: 0; }
  45%, 95% { width: 100%; height: 100%; }
}

@keyframes creating-selection-marquee {
  0%, 15%, 100% { opacity: 0; }
  22%, 85% { opacity: 1; }
  95% { opacity: 0; }
}

@keyframes creating-selection-pointer {
  0%, 15%, 100% { top: 0; left: 0; }
  45%, 85% { top: 100%; left: 100%; }
}

@keyframes creating-selection-click {
  0%, 15%, 100% { transform: scale(1); }
  9% { transform: scale(.84); }
}

@keyframes creating-selection-glow {
  0%, 15%, 95%, 100% { filter: drop-shadow(0 0 .02em #fff6); }
  22%, 85% { filter: drop-shadow(0 0 .05em rgb(var(--emotion-blue-rgb, 0 137 255) / .9)); }
}

@keyframes creating-selection-handle {
  0%, 40%, 95%, 100% { opacity: 0; transform: scale(0); }
  48% { opacity: 1; transform: scale(1.3); }
  52%, 85% { opacity: 1; transform: scale(1); }
}

@media (max-width: 639.98px) {
  .creating-selection-pointer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .creating-selection-box,
  .creating-selection-box i,
  .creating-selection-pointer,
  .creating-selection-pointer svg { animation: none; }
  .creating-selection-box { width: 100%; height: 100%; opacity: 1; }
  .creating-selection-box i { opacity: 1; transform: none; }
  .creating-selection-pointer { top: 100%; left: 100%; }
  .creating-selection-pointer svg { transform: none; }
}

@media (forced-colors: active) {
  .library-page .library-design-hero .hero-title-creating {
    color: CanvasText !important;
    background: none !important;
    -webkit-text-fill-color: CanvasText !important;
    -webkit-text-stroke: 0 !important;
    text-shadow: none !important;
    filter: none !important;
  }
  .library-page .library-design-hero .creating-word-normal {
    display: inline !important;
    color: CanvasText !important;
    -webkit-text-fill-color: CanvasText !important;
  }
  .library-page .library-design-hero .creating-word-gloss,
  .library-page .library-design-hero .creating-selection {
    display: none !important;
    animation: none !important;
    filter: none !important;
  }
}
