/* Catalog destinations inherit the wiki's theme and typography. */
.catalog-workspace,
.catalog-editor,
.catalog-draft,
.cw-confirm,
.catalog-entrance {
  --catalog-secondary: color-mix(in srgb, var(--color-text) 80%, var(--color-bg));
}
.catalog-workspace .muted,
.catalog-editor .muted,
.catalog-draft .muted,
.cw-confirm .muted,
.catalog-entrance .muted {
  color: var(--catalog-secondary);
}
.catalog-workspace .catalog-metadata dt,
.catalog-editor .catalog-metadata dt,
.catalog-workspace input::placeholder,
.catalog-editor input::placeholder,
.cw-confirm textarea::placeholder {
  color: var(--catalog-secondary);
}
.catalog-screen-layer {
  position: fixed;
  inset: 0 0 var(--menu-bottom, 0px) var(--menu-left, 0px);
  z-index: 12000;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--color-bg);
  color: var(--color-text);
  padding: 24px max(20px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom));
}
.catalog-screen-layer > .catalog-screen-content {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  min-width: 0;
}
.catalog-screen-layer:has(.cw-authoring) {
  padding-bottom: 0;
}
.catalog-screen-layer:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -4px;
}
.catalog-place-motion {
  animation: catalog-place-in 260ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}
.catalog-place-beside {
  left: calc(var(--menu-left, 0px) + var(--catalog-place-width));
  right: auto;
  width: min(560px, calc(100% - var(--menu-left, 0px) - var(--catalog-place-width)));
  border-right: 1px solid var(--color-border);
  padding-inline: 16px;
}
@keyframes catalog-place-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .catalog-place-motion {
    animation: catalog-place-fade 120ms ease-out both;
  }
  @keyframes catalog-place-fade {
    from {
      opacity: 0;
    }
  }
}
.catalog-entrance {
  margin-block: 24px;
  padding: 20px 16px;
  border-block: 1px solid var(--color-border);
  background: var(--color-surface);
}
.catalog-entrance-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.catalog-entrance-head h2 {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 22px;
  line-height: 1.3;
}
.catalog-entrance-head h2 > :is(a, span) {
  display: flex;
  align-items: center;
  gap: 10px;
}
.catalog-entrance-browse {
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}
.catalog-entrance-browse:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.catalog-entrance-head h2 .ios-icon {
  flex: none;
  width: 24px;
  height: 24px;
}
.catalog-entrance-browse > .ios-icon:last-child {
  width: 18px;
  height: 18px;
  color: var(--catalog-secondary);
}
.catalog-entrance-head > .button {
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.catalog-entrance-description {
  margin: 8px 0 16px;
  color: var(--catalog-secondary);
  font-size: 14px;
  line-height: 1.6;
}
.catalog-entrance-empty > .button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 0;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.catalog-entrance-empty > p {
  margin: 0 0 16px;
  line-height: 1.6;
}
.catalog-entrance-body {
  margin-top: 16px;
  min-width: 0;
}
.catalog-entrance-body > p {
  margin: 0 0 12px;
  line-height: 1.6;
}
.catalog-entrance-head svg,
.catalog-entrance-item > svg {
  flex: none;
  width: 18px;
  height: 18px;
}
.catalog-entrance-items {
  display: grid;
}
.catalog-entrance-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 10px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  text-decoration: none;
  min-width: 0;
  min-height: 72px;
}
.catalog-entrance-item > span {
  display: grid;
  gap: 4px;
}
.catalog-entrance-photo,
.catalog-entrance-photo > img,
.catalog-entrance-symbol {
  display: block;
  width: 52px;
  height: 52px;
  flex: none;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--color-surface);
}
.catalog-entrance-small .catalog-entrance-item {
  min-height: 88px;
  padding-block: 12px;
}
.catalog-entrance-small .catalog-entrance-photo,
.catalog-entrance-small .catalog-entrance-photo > img,
.catalog-entrance-small .catalog-entrance-symbol {
  width: 64px;
  height: 64px;
}
.catalog-entrance-more {
  display: flex;
  justify-content: center;
  min-height: 44px;
  width: 100%;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
}
.catalog-entrance-more-mobile {
  display: none;
}
.catalog-entrance-symbol {
  display: grid;
  place-items: center;
  color: var(--catalog-secondary);
}
.catalog-entrance-symbol svg {
  width: 24px;
  height: 24px;
}
.catalog-entrance-item > span:not(.catalog-entrance-symbol) {
  flex: 1;
  min-width: 0;
}
.catalog-entrance-item strong,
.catalog-entrance-item small {
  display: block;
  overflow-wrap: anywhere;
}
.catalog-entrance-item strong > a,
.catalog-entrance-open {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}
.catalog-entrance-item strong > a:hover {
  text-decoration: underline;
}
.catalog-entrance-open {
  justify-content: center;
  width: 44px;
  flex: none;
}
.catalog-entrance-open > svg {
  width: 18px;
  height: 18px;
}
.catalog-entrance-item small {
  color: var(--catalog-secondary);
  margin-top: 4px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.catalog-entrance a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.catalog-entrance-item:hover {
  background: var(--color-surface);
}
@media (max-width: 760px) {
  .catalog-screen-layer {
    padding: max(12px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  }
  .catalog-entrance-head {
    gap: 10px;
  }
  .catalog-entrance-head h2 {
    font-size: 20px;
  }
  .catalog-entrance-head h2 > :is(a, span) {
    gap: 8px;
  }
  .catalog-entrance-head > .button {
    padding-inline: 12px;
  }
  .catalog-entrance-items > .catalog-entrance-item:nth-child(n + 4) {
    display: none;
  }
  .catalog-entrance-item {
    min-height: 68px;
  }
  .catalog-entrance-photo,
  .catalog-entrance-photo > img,
  .catalog-entrance-symbol {
    width: 44px;
    height: 44px;
  }
  .catalog-entrance-small .catalog-entrance-item {
    min-height: 80px;
  }
  .catalog-entrance-small .catalog-entrance-photo,
  .catalog-entrance-small .catalog-entrance-photo > img,
  .catalog-entrance-small .catalog-entrance-symbol {
    width: 56px;
    height: 56px;
  }
  .catalog-entrance-more-mobile {
    display: flex;
  }
}
