/* Deck Library */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/InterVariable.woff2') format('woff2');
}

/* ------------------------------------------------------------------ tokens */

:root {
  --bg: #fff;
  --surface: #fff;
  --blue: #0066ff;
  --tile: #f1f1f1;
  --ink: #2b2b2b;
  --muted: rgba(43, 43, 43, 0.7);
  --faint: rgba(43, 43, 43, 0.5);
  --whisper: rgba(43, 43, 43, 0.3);
  --soft-1: rgba(43, 43, 43, 0.03);
  --soft-2: rgba(43, 43, 43, 0.06);
  --soft-3: rgba(43, 43, 43, 0.1);
  --line: rgba(43, 43, 43, 0.08);
  --line-input: rgba(43, 43, 43, 0.13);
  --line-strong: rgba(43, 43, 43, 0.2);
  --glass: color-mix(in srgb, #fff 80%, transparent);
  --glass-hover: color-mix(in srgb, #2b2b2b 4%, color-mix(in srgb, #fff 96%, transparent));
  --glass-menu: color-mix(in srgb, #fff 68%, transparent);
  --glass-shine: rgba(255, 255, 255, 0.45);
  --glass-ring: 0 0 0 1px rgba(0, 0, 0, 0.02);
  --shadow-pill: inset 0 1px 0 0 var(--glass-shine), 0 0 2px 0 rgba(0, 0, 0, 0.02), 0 0 6px 0 rgba(0, 0, 0, 0.03),
    0 6px 30px 0 rgba(0, 0, 0, 0.07), var(--glass-ring);
  --tile-glass: rgba(43, 43, 43, 0.5);
  --shadow-tile: 0 1px 5px rgba(43, 43, 43, 0.08), 0 0 1px rgba(43, 43, 43, 0.4);
  --viewer-backdrop: rgba(255, 255, 255, 0.82);
  --viewer-line: rgba(0, 0, 0, 0.07);
  --danger: #d4351c;
  /* A soft grey blur behind white artwork, so it shows up on light surfaces. */
  --light-art-edge: rgb(0 0 0 / 0.45);
  --light-art-glow: rgb(0 0 0 / 0.28);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-std: cubic-bezier(0.4, 0, 0.2, 1);
  --tile-aspect: 484 / 272;
  color-scheme: light dark;
  accent-color: var(--ink);
  font-family: Inter, 'Inter Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  font-synthesis: none;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0f0f0f;
    --surface: #262626;
    --tile: #1b1b1b;
    --ink: #ececec;
    --muted: rgba(236, 236, 236, 0.65);
    --faint: rgba(236, 236, 236, 0.45);
    --whisper: rgba(236, 236, 236, 0.3);
    --soft-1: rgba(255, 255, 255, 0.04);
    --soft-2: rgba(255, 255, 255, 0.06);
    --soft-3: rgba(255, 255, 255, 0.1);
    --line: rgba(255, 255, 255, 0.05);
    --line-input: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.2);
    --glass: rgba(38, 38, 38, 0.8);
    --glass-hover: rgba(54, 54, 54, 0.85);
    --glass-menu: rgba(38, 38, 38, 0.8);
    --glass-shine: rgba(255, 255, 255, 0.07);
    --glass-ring: 0 0 0 0 transparent;
    --tile-glass: rgba(20, 20, 20, 0.55);
    --shadow-tile: 0 1px 5px rgba(0, 0, 0, 0.4), 0 0 1px rgba(255, 255, 255, 0.08);
    --viewer-backdrop: rgba(0, 0, 0, 0.55);
    --viewer-line: rgba(255, 255, 255, 0.08);
    --danger: #ff6b57;
    --light-art-edge: transparent;
    --light-art-glow: transparent;
  }
}

:root[data-theme='dark'] {
  --bg: #0f0f0f;
  --surface: #262626;
  --tile: #1b1b1b;
  --ink: #ececec;
  --muted: rgba(236, 236, 236, 0.65);
  --faint: rgba(236, 236, 236, 0.45);
  --whisper: rgba(236, 236, 236, 0.3);
  --soft-1: rgba(255, 255, 255, 0.04);
  --soft-2: rgba(255, 255, 255, 0.06);
  --soft-3: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.05);
  --line-input: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --glass: rgba(38, 38, 38, 0.8);
  --glass-hover: rgba(54, 54, 54, 0.85);
  --glass-menu: rgba(38, 38, 38, 0.8);
  --glass-shine: rgba(255, 255, 255, 0.07);
  --glass-ring: 0 0 0 0 transparent;
  --tile-glass: rgba(20, 20, 20, 0.55);
  --shadow-tile: 0 1px 5px rgba(0, 0, 0, 0.4), 0 0 1px rgba(255, 255, 255, 0.08);
  --viewer-backdrop: rgba(0, 0, 0, 0.55);
  --viewer-line: rgba(255, 255, 255, 0.08);
  --danger: #ff6b57;
  --light-art-edge: transparent;
  --light-art-glow: transparent;
  color-scheme: dark;
}

:root[data-theme='light'] {
  color-scheme: light;
}

/* -------------------------------------------------------------------- base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  isolation: isolate;
}

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

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s var(--ease);
}

a:hover,
a:focus-visible {
  text-decoration-color: var(--whisper);
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
  font-weight: 510;
  line-height: 1.2;
}

h2 {
  font-size: 18px;
  font-weight: 510;
  line-height: 1.3;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--line-strong);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

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

.fade {
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.fade.is-loaded {
  opacity: 1;
}

.fade.no-fade {
  transition: none;
}

/* ------------------------------------------------------------------ layout */

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px;
  background: var(--bg);
}

@media (min-width: 1600px) {
  .page {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
}

.main {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  gap: 32px;
  width: 100%;
  min-width: 0;
  padding: 0 0 64px;
}

/* ----------------------------------------------------------- glass controls */

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border: 0;
  box-shadow: var(--shadow-pill);
  color: var(--ink);
  transition: background 0.15s var(--ease-std), box-shadow 0.4s var(--ease-std), transform 0.16s var(--ease);
}

a.glass:hover,
button.glass:hover,
.glass.is-hoverable:hover {
  background: var(--glass-hover);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.icon-btn:active {
  transform: scale(0.95);
}

.icon-btn[disabled] {
  opacity: 0.35;
  pointer-events: none;
}

/* ------------------------------------------------------------------ topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 16px 0;
}

.topbar__group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.topbar__center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(300px, 42vw);
  display: flex;
  justify-content: center;
}

@media (max-width: 1200px) and (min-width: 901px) {
  .topbar__center {
    position: static;
    transform: none;
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 4px;
  }
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
}

.logo:active {
  transform: scale(0.97);
}

.logo .orb {
  width: 36px;
  height: 36px;
}

/* A thinking orb: a canvas drawn by orb.js, dots in the current ink. */
.orb {
  display: block;
  color: var(--ink);
}

.nav {
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 4px;
  border-radius: 999px;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s var(--ease);
}

.nav__link:hover {
  background: var(--soft-1);
}

.nav__link.is-current {
  background: var(--soft-2);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 15px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  background: var(--blue);
  color: #fff;
  box-shadow: var(--shadow-pill);
  border: 0;
  transition: background 0.15s var(--ease-std), color 0.15s var(--ease-std), transform 0.16s var(--ease);
}

.cta:hover {
  background: color-mix(in srgb, var(--blue) 90%, #000);
}

.cta:active {
  transform: scale(0.97);
}

.cta svg {
  width: 18px;
  height: 18px;
  margin-left: -4px;
}

.cta__short {
  display: none;
}

/* On the decks page the CTA stays quiet until the hero scrolls away. */
html.is-home:not(.is-scrolled) .cta {
  background: var(--glass);
  color: var(--ink);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
}

html.is-home:not(.is-scrolled) .cta:hover {
  background: var(--glass-hover);
}

/* ----------------------------------------------------------- search trigger */

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  user-select: none;
  background: color-mix(in srgb, var(--ink) 6%, color-mix(in srgb, var(--bg) 80%, transparent));
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  transition: background 0.2s var(--ease), box-shadow 0.4s var(--ease-std), transform 0.16s var(--ease);
}

.search-trigger:active {
  transform: scale(0.97);
}

html.is-scrolled .search-trigger,
html.is-canvas .search-trigger {
  background: var(--glass);
  box-shadow: var(--shadow-pill);
}

.search-trigger:hover,
html.is-scrolled .search-trigger:hover,
html.is-canvas .search-trigger:hover {
  background: var(--glass-hover);
}

.search-trigger__icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--ink) 60%, transparent);
}

.search-trigger__label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: color-mix(in srgb, var(--ink) 60%, transparent);
}

.search-trigger__label.has-value,
html.is-scrolled .search-trigger__label,
html.is-scrolled .search-trigger__icon,
html.is-canvas .search-trigger__label,
html.is-canvas .search-trigger__icon {
  color: var(--ink);
}

.search-trigger__kbd {
  flex: 0 0 auto;
  color: var(--faint);
  font-size: 13px;
}

.search-chip {
  flex: 0 0 auto;
  margin-left: auto;
  margin-right: -16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 44px;
  padding: 0 8px 0 18px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  color: var(--bg);
  font-size: 14px;
  white-space: nowrap;
}

#search-chip-label:empty {
  display: none;
}

.search-chip:has(#search-chip-label:empty) {
  padding-left: 8px;
}

.search-chip__x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bg);
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.16s;
}

.search-chip__x:hover {
  opacity: 1;
}

.search-chip__x svg {
  width: 16px;
  height: 16px;
}

/* -------------------------------------------------------------------- menu */

.menu {
  position: relative;
  display: inline-flex;
}

.menu > summary {
  list-style: none;
}

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

.menu__button svg {
  width: 22px;
  height: 22px;
}

.menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 240px;
  padding: 4px;
  border-radius: 26px;
  background: var(--glass-menu);
  -webkit-backdrop-filter: blur(36px) saturate(150%);
  backdrop-filter: blur(36px) saturate(150%);
  box-shadow: var(--shadow-pill);
}

.menu[open] .menu__panel {
  transform-origin: top right;
  animation: menu-in 0.2s var(--ease);
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-4px);
  }
}

.menu__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu__list a,
.menu__list button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.16s;
}

.menu__list a:hover,
.menu__list button:hover,
.menu__list a:focus-visible,
.menu__list button:focus-visible {
  background: var(--soft-1);
  outline: none;
}

.menu__list a.is-current {
  background: var(--soft-2);
}

.menu__list .menu__kbd {
  margin-left: auto;
  color: var(--faint);
  font-size: 13px;
}

.menu__list--nav,
.menu__sep--nav {
  display: none;
}

.menu__sep {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 4px 10px;
}

.menu__icons {
  display: flex;
  gap: 2px;
  padding: 5px;
}

.menu__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}

.menu__icon svg {
  width: 20px;
  height: 20px;
}

.menu__icon:hover {
  background: var(--soft-2);
  color: var(--ink);
}

.menu__icon.is-active {
  background: var(--soft-2);
  color: var(--ink);
}

.menu__foot {
  padding: 6px 16px 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.3;
}

/* ------------------------------------------------------------------- tiles */

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.tile {
  position: relative;
  display: block;
  min-width: 0;
  aspect-ratio: var(--tile-aspect);
  background-color: var(--tile-color, var(--tile));
  box-shadow: var(--shadow-tile);
  color: #fff;
  text-decoration: none;
  overflow: hidden;
  transform-origin: center;
  transition: transform 0.24s var(--ease);
}

.grid > .tile {
  content-visibility: auto;
  contain-intrinsic-size: auto 260px;
}

@media (hover: hover) {
  .tile:hover {
    transform: scale(1.01);
    z-index: 2;
  }
}

.tile:focus-visible {
  transform: scale(1.01);
  z-index: 2;
  outline: none;
}

.tile:active {
  transform: scale(0.99);
}

.tile img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile--slide {
  cursor: zoom-in;
}

.tile--slide img {
  background: #fff;
}

.pill {
  position: absolute;
  left: 8px;
  z-index: 2;
  display: inline-block;
  max-width: calc(100% - 16px);
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--tile-glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #fff;
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

.pill--top {
  top: 8px;
}

.pill--bottom {
  bottom: 8px;
}

.pill--right {
  left: auto;
  right: 8px;
}

@media (hover: hover) {
  .tile:hover .pill,
  .board__item:hover .pill,
  .tile-wrap:hover .pill {
    opacity: 1;
  }
}

.tile:focus-visible .pill {
  opacity: 1;
}

@media (hover: none) {
  .tile .pill,
  .tile-wrap .pill {
    opacity: 1;
  }
}

.pill.is-static {
  opacity: 1;
}

.tile__blank {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 14px;
}

.filter-empty {
  color: var(--muted);
  font-size: 15px;
}

/* -------------------------------------------------------------------- hero */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 45vh;
  min-height: 490px;
  padding: 24px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  isolation: isolate;
}

.hero__orbit {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero__cover {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--cover-w, 180px);
  height: var(--cover-h, 108px);
  border-radius: 10px;
  border: 1px solid var(--line);
  background-color: var(--tile);
  overflow: hidden;
  will-change: transform;
}

.hero__cover > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__cover > img[hidden] {
  display: none;
}

.hero__strip {
  display: none;
  width: calc(100% + 32px);
  margin: 0 -16px 4px;
  padding: 8px 0;
  overflow: hidden;
}

.hero__strip-track {
  display: flex;
  width: max-content;
  animation: marquee 36s linear infinite;
}

.hero__strip-set {
  display: flex;
  gap: 12px;
  padding-right: 12px;
}

.hero__strip-set > * {
  display: block;
  width: 124px;
  height: 74px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--tile);
  box-shadow: var(--shadow-tile);
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 560px;
  text-align: center;
}

.hero__art {
  width: 116px;
  height: 116px;
  margin: -8px 0 -10px;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.hero__eyebrow,
.hero__title {
  margin: 0;
  font-size: 22px;
  font-weight: 510;
  line-height: 1.2;
  letter-spacing: 0.22px;
  text-wrap: balance;
}

.hero__eyebrow {
  color: var(--faint);
}

.hero__title {
  color: var(--ink);
}

.btn.hero__cta {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 0;
  overflow: hidden;
  background: var(--blue);
  color: #fff;
}

.btn.hero__cta:hover {
  background: color-mix(in srgb, var(--blue) 88%, #000);
}

.hero__note {
  margin-top: -4px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.2;
}

.hero__note button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}

.hero__note button:hover {
  color: var(--ink);
  text-decoration-color: var(--whisper);
}

.marquee {
  display: block;
  width: 100%;
  line-height: 1.5;
  overflow: hidden;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 20s linear infinite;
}

.marquee__group {
  display: flex;
  flex: 0 0 auto;
  gap: 24px;
  padding-right: 24px;
  white-space: nowrap;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ------------------------------------------------------------------- decks */

.deck {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.deck__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 48px;
  align-items: start;
  width: 100%;
}

.deck__info {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 32px 0 0;
  min-width: 0;
}

.deck__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  max-width: 540px;
}

.deck__title {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.deck__desc p {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
  opacity: 0.8;
  white-space: pre-line;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.deck__desc.is-expanded p {
  display: block;
  overflow: visible;
}

.deck__desc--empty p {
  opacity: 1;
  color: var(--faint);
}

.small-pill {
  display: inline-flex;
  align-items: center;
  height: 30px;
  margin-top: 10px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.meta {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
  width: 100%;
}

.meta__row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  padding: 14px 0;
  font-size: 14px;
  line-height: 1.3;
}

.meta__row:nth-child(-n + 2) {
  padding-top: 0;
}

.meta__row:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}

.meta__row dt {
  color: var(--muted);
}

.meta__row dd {
  margin: 0;
  max-width: 100%;
  min-width: 0;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta__row dd a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 2px;
}

.meta__row dd a:hover {
  text-decoration-color: var(--muted);
}

.meta__row dd svg {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 3px;
  vertical-align: -1px;
  opacity: 0.6;
}

.deck__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.deck__notes {
  padding: 16px 20px;
  border-radius: 22px;
  background: var(--soft-1);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-line;
}

.board {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.board__item {
  position: relative;
  min-width: 0;
  aspect-ratio: var(--tile-aspect);
  scroll-margin-top: 96px;
}

.board__tile {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: var(--tile-color, var(--tile));
  box-shadow: var(--shadow-tile);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.2s var(--ease);
  touch-action: manipulation;
}

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

.board__tile.is-contain img {
  object-fit: contain;
}

@media (hover: hover) {
  .board__tile:hover {
    transform: scale(1.01);
  }
}

.board__tile:focus-visible {
  transform: scale(1.01);
  outline: none;
}

.board__tile:active {
  transform: scale(0.99);
}

.board__item.is-target .board__tile {
  animation: target-pulse 1.4s var(--ease) 1;
}

@keyframes target-pulse {
  0%,
  100% {
    box-shadow: var(--shadow-tile);
  }
  25% {
    box-shadow: 0 0 0 3px var(--line-strong), var(--shadow-tile);
  }
}

.board__item.is-dragging {
  opacity: 0.35;
}

.board__item.drop-before::before,
.board__item.drop-after::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  width: 3px;
  border-radius: 3px;
  background: var(--blue);
}

.board__item.drop-before::before {
  left: -13.5px;
}

.board__item.drop-after::after {
  right: -13.5px;
}

.board__item.is-uploading .board__tile {
  cursor: progress;
}

.board__item.is-uploading .board__tile img {
  opacity: 0.55;
}

.board__progress {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.board__progress span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--tile-glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.board__item.is-failed .board__progress span {
  background: rgba(212, 53, 28, 0.8);
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.72s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.tile-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: flex;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}

@media (hover: hover) {
  .board__item:hover .tile-actions,
  .tile-wrap:hover .tile-actions,
  .tile-actions:focus-within {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (hover: none) {
  .tile-actions {
    opacity: 1;
    pointer-events: auto;
  }
}

.tile-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 33px;
  height: 33px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--tile-glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #fff;
  cursor: pointer;
  transition: background 0.16s, transform 0.16s var(--ease);
}

.tile-action:hover {
  background: rgba(20, 20, 20, 0.75);
}

.tile-action:active {
  transform: scale(0.94);
}

.tile-action svg {
  width: 16px;
  height: 16px;
}

.tile-action.is-on svg {
  fill: currentColor;
}

.board__add {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.board__add svg {
  width: 22px;
  height: 22px;
  margin-bottom: 4px;
}

.board__add small {
  color: var(--faint);
  font-size: 13px;
}

.board__add:hover,
.board__add.is-over {
  background: var(--soft-1);
  border-color: color-mix(in srgb, var(--ink) 40%, transparent);
  color: var(--ink);
}

.related {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 40px;
  width: 100%;
}

.related__title {
  font-size: 18px;
  font-weight: 510;
  line-height: 1.3;
}

/* ------------------------------------------------------------ slide canvas */

html.is-canvas,
html.is-canvas body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

html.is-canvas .footer {
  display: none;
}

.canvas {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
}

.canvas__viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  outline: none;
}

.canvas__viewport:focus-visible {
  box-shadow: inset 0 0 0 2px var(--line-strong);
}

.canvas__viewport.is-dragging,
.canvas__viewport.is-dragging .tile {
  cursor: grabbing;
}

.canvas__scaler {
  position: absolute;
  inset: 0;
  will-change: transform;
  transition: transform 0.42s var(--ease);
}

.canvas__scaler.is-flying {
  transform: scale(0.98);
}

.canvas__world {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.canvas__tile {
  position: absolute;
  left: 0;
  top: 0;
}

.canvas__tile.is-intro {
  animation: tile-in 0.36s var(--ease) both;
}

@keyframes tile-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
}

.canvas__viewport:is(.is-dragging, .is-moving) .tile:is(:hover, :focus-visible, .is-hover) {
  transform: none;
}

.canvas__viewport:is(.is-dragging, .is-moving) .pill {
  opacity: 0;
}

.canvas__viewport.is-moving .fade {
  transition: none;
}

.canvas__hint {
  position: absolute;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--tile-glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}

.canvas__hint.is-hidden {
  opacity: 0;
}

.canvas__hint-count {
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

/* ------------------------------------------------------------ slide viewer */

.viewer {
  --viewer-open: 0.22s;
  --viewer-close: 0.15s;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.viewer[open] {
  display: block;
}

.viewer.is-open {
  pointer-events: auto;
}

.viewer.is-closing {
  pointer-events: none;
}

.viewer::backdrop {
  background: var(--viewer-backdrop);
  -webkit-backdrop-filter: blur(28px) saturate(120%);
  backdrop-filter: blur(28px) saturate(120%);
  opacity: 0;
  transition: opacity 0.26s var(--ease);
}

.viewer.is-open::backdrop {
  opacity: 1;
}

.viewer.is-closing::backdrop {
  opacity: 0;
  transition-duration: 0.15s;
}

.viewer__body {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px;
  opacity: 0;
  transition: opacity var(--viewer-open) var(--ease);
}

.viewer.is-open .viewer__body {
  opacity: 1;
}

.viewer.is-closing .viewer__body {
  opacity: 0;
  transition-duration: var(--viewer-close);
}

.viewer__stage {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  container-type: size;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  padding: 84px 40px;
  transition: padding-right 0.3s var(--ease);
}

.viewer__image,
.viewer__preview {
  grid-area: 1 / 1;
  max-width: 100%;
  max-height: 100%;
  width: min(100cqw, calc(100cqh * var(--slide-aspect, 1.7778)));
  height: auto;
  aspect-ratio: var(--slide-aspect, 1.7778);
  object-fit: cover;
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow-tile);
}

.viewer__image {
  z-index: 2;
  opacity: 0;
  background: transparent;
  transition: opacity 0.2s ease-out;
  cursor: pointer;
}

.viewer__image.is-loaded {
  opacity: 1;
}

.viewer__preview {
  z-index: 1;
  pointer-events: none;
}

.viewer__image.is-loaded + .viewer__preview {
  opacity: 0;
  transition: opacity 0s 0.25s;
}

.viewer.is-presenting::backdrop {
  background: #000;
}

.viewer.is-presenting .viewer__stage {
  padding: 24px;
}

.viewer.is-presenting .viewer__image,
.viewer.is-presenting .viewer__preview {
  border-radius: 0;
  box-shadow: none;
}

.viewer :is(.viewer__close, .viewer__nav, .viewer__footer) {
  transition: opacity 0.4s var(--ease);
}

.viewer.is-presenting.is-idle :is(.viewer__close, .viewer__nav, .viewer__footer) {
  opacity: 0;
  pointer-events: none;
}

.viewer.is-presenting.is-idle .viewer__stage,
.viewer.is-presenting.is-idle .viewer__image {
  cursor: none;
}

.viewer.is-zooming .viewer__image,
.viewer.is-zooming .viewer__preview {
  opacity: 0;
  transition: none;
}

.zoom-clone {
  position: fixed;
  z-index: 1000;
  margin: 0;
  object-fit: cover;
  background: #fff;
  box-shadow: var(--shadow-tile);
  pointer-events: none;
  transform-origin: top left;
  will-change: transform;
}

.viewer__close {
  position: absolute;
  top: 16px;
  left: 0;
  z-index: 3;
}

.viewer__footer {
  position: absolute;
  top: 16px;
  left: 60px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 300px);
}

.viewer__deck {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 52px;
  padding: 0 14px 0 20px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
}

.viewer__deck span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer__deck .viewer__count {
  flex: 0 0 auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.viewer__deck svg {
  flex: none;
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.viewer__nav {
  position: absolute;
  top: 16px;
  right: 0;
  z-index: 3;
  display: inline-flex;
  gap: 8px;
}

.viewer__panel {
  --ink: #2b2b2b;
  --muted: rgba(43, 43, 43, 0.72);
  --faint: rgba(43, 43, 43, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  border: 1px solid var(--viewer-line);
  color: var(--ink);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .viewer__panel {
    --ink: #fff;
    --muted: rgba(255, 255, 255, 0.72);
    --faint: rgba(255, 255, 255, 0.55);
  }
}

:root[data-theme='dark'] .viewer__panel {
  --ink: #fff;
  --muted: rgba(255, 255, 255, 0.72);
  --faint: rgba(255, 255, 255, 0.55);
}

@media (min-width: 861px) {
  .viewer__panel {
    position: absolute;
    top: 84px;
    right: 16px;
    bottom: 16px;
    z-index: 2;
    width: 340px;
    border-radius: 24px;
    transform: translateX(24px);
    transition: transform 0.26s var(--ease), opacity 0.2s var(--ease), visibility 0s 0.26s;
  }

  .viewer.info-open .viewer__panel {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: transform 0.38s var(--ease), opacity 0.26s var(--ease), visibility 0s;
  }

  .viewer.info-open .viewer__stage {
    padding-right: 380px;
  }
}

.viewer__info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 24px 16px;
  user-select: text;
  -webkit-user-select: text;
}

.viewer__eyebrow {
  color: var(--faint);
  font-size: 13px;
  font-weight: 510;
}

.viewer__title {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.1px;
  text-wrap: balance;
}

.viewer__desc {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-line;
  text-wrap: pretty;
}

.viewer__meta {
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.viewer__meta .meta__row {
  padding: 14px 0;
  border-top: 0;
}

.viewer__meta .meta__row + .meta__row {
  border-top: 1px solid color-mix(in srgb, var(--viewer-line) 100%, transparent);
}

.viewer__meta .meta__row:first-child {
  padding-top: 0;
}

.viewer__meta .meta__row dd {
  white-space: normal;
  word-break: break-word;
}

.viewer__actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border-top: 1px solid var(--viewer-line);
}

.viewer__actions button,
.viewer__actions a {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.16s;
}

.viewer__actions svg {
  width: 17px;
  height: 17px;
  opacity: 0.75;
}

.viewer__actions button:hover,
.viewer__actions a:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.viewer__actions .is-danger {
  color: var(--danger);
}

.viewer__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.viewer__form .input {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 16%, transparent);
}

.viewer__form .input:focus {
  border-color: color-mix(in srgb, var(--ink) 45%, transparent);
}

.viewer__form-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

@media (max-width: 860px) {
  .viewer__body {
    flex-direction: column;
    padding: 0;
  }

  .viewer__close {
    left: 16px;
  }

  .viewer__footer {
    top: auto;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
  }

  .viewer__nav {
    right: 16px;
  }

  .viewer__stage {
    flex: 1 1 auto;
    min-height: 0;
    padding: 84px 12px;
  }

  .viewer__panel {
    flex: 0 0 auto;
    max-height: 0;
    border: 0;
    border-top: 1px solid var(--viewer-line);
    transition: max-height 0.3s var(--ease), opacity 0.2s var(--ease), visibility 0s 0.3s;
  }

  .viewer.info-open .viewer__panel {
    max-height: 55%;
    opacity: 1;
    visibility: visible;
    transition: max-height 0.3s var(--ease), opacity 0.2s 80ms var(--ease), visibility 0s;
  }

  .viewer.info-open .viewer__footer {
    display: none;
  }

  .viewer__info {
    padding: 20px;
  }
}

/* ---------------------------------------------------------------- palette */

.palette {
  --pal-ease: cubic-bezier(0.22, 1, 0.36, 1);
  width: min(640px, calc(100vw - 32px));
  max-width: none;
  height: min(76vh, 620px);
  margin: max(24px, 10vh) auto auto;
  padding: 0;
  border: 0;
  border-radius: 34px;
  background: rgba(38, 38, 38, 0.8);
  -webkit-backdrop-filter: blur(36px);
  backdrop-filter: blur(36px);
  color: #fff;
  overflow: hidden;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06), 0 0 2px rgba(0, 0, 0, 0.02), 0 0 6px rgba(0, 0, 0, 0.03),
    0 6px 30px rgba(0, 0, 0, 0.07);
  transform: scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s var(--pal-ease), opacity 0.22s var(--pal-ease);
}

.palette[open] {
  display: flex;
  flex-direction: column;
}

.palette.is-open {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}

.palette::backdrop {
  background: transparent;
}

.palette.is-bare,
.palette.has-results {
  height: auto;
  max-height: min(76vh, 620px);
}

html:has(.palette[open]),
html:has(.palette[open]) body {
  overflow: clip;
}

.palette__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 6px 30px;
}

.palette.is-bare .palette__bar {
  padding-bottom: 18px;
}

.palette.is-bare.has-results .palette__bar {
  padding-bottom: 6px;
}

.palette__icon {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: rgba(255, 255, 255, 0.5);
}

.palette__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 15px;
}

.palette__input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.palette__input::-webkit-search-cancel-button,
.palette__input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.palette__clear {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: color 0.16s, background 0.16s;
}

.palette__clear svg {
  width: 16px;
  height: 16px;
}

.palette__clear:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.palette__count {
  flex: 0 0 auto;
  padding: 0 18px 0 8px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 14px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.palette__count:empty {
  display: none;
}

.palette__body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  gap: 18px;
  padding: 12px 12px 68px;
}

.palette__rail {
  flex: 0 0 172px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}

.rail-item svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.rail-item:hover {
  color: #fff;
}

.rail-item.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.rail-item__dot {
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: #fff;
}

.palette__content {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 60px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 60px), transparent);
  scrollbar-width: none;
}

.palette__content::-webkit-scrollbar,
.palette__results::-webkit-scrollbar {
  display: none;
}

.palette__content.is-end,
.palette__results.is-end {
  -webkit-mask-image: none;
  mask-image: none;
}

.group__head {
  margin: 4px 18px 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  font-weight: 500;
}

.group__rows {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-bottom: 40px;
}

.group__empty {
  margin: 8px 18px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  line-height: 1.5;
}

.palette .row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  transition: background 0.14s, color 0.14s;
}

.palette .row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.palette .row input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.row__count {
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.palette .row:has(input:checked) {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.palette .row:has(input:checked) .row__count {
  color: rgba(255, 255, 255, 0.6);
}

.palette .row:has(input:focus-visible) {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: -2px;
}

.palette__foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  pointer-events: none;
}

.palette__foot > * {
  pointer-events: auto;
}

.palette__reset,
.palette__done {
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s, transform 0.16s var(--ease);
}

.palette__reset {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.7);
}

.palette__reset:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.palette__reset.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.palette__done {
  margin-left: auto;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.palette__done:hover {
  background: rgba(255, 255, 255, 0.18);
}

.palette__done:active {
  transform: scale(0.97);
}

.palette.is-active .palette__done {
  background: #fff;
  color: #111;
}

.palette.is-active .palette__done:hover {
  background: rgba(255, 255, 255, 0.85);
}

.palette__results {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 12px 68px;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 56px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 56px), transparent);
  scrollbar-width: none;
}

.palette.is-bare .palette__results {
  padding-bottom: 12px;
}

.rtabs {
  display: flex;
  gap: 6px;
  padding: 2px 6px 10px;
}

.rtab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}

.rtab:hover {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.85);
}

.rtab.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.rtab__count {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
}

.result {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  border-radius: 18px;
  color: #fff;
  text-decoration: none;
  transition: background 0.14s;
}

.result:hover,
.result.is-hot {
  background: rgba(255, 255, 255, 0.07);
}

.result__thumb {
  flex: 0 0 auto;
  width: 96px;
  height: 54px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

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

.result__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.result__title {
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result__sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results__list.is-swap {
  animation: swap-in 0.16s var(--ease);
}

@keyframes swap-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.results__empty {
  margin: 8px 10px 12px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s var(--ease-std), color 0.15s var(--ease-std), filter 0.2s var(--ease),
    transform 0.16s var(--ease), opacity 0.2s;
}

.btn:active {
  transform: scale(0.97);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.btn--sm {
  height: 44px;
  padding: 0 18px;
}

.btn--xs {
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.btn--block {
  width: 100%;
}

.btn--blue {
  background: var(--blue);
  color: #fff;
}

.btn--blue:hover {
  background: color-mix(in srgb, var(--blue) 88%, #000);
}

.btn--soft {
  background: var(--soft-2);
}

.btn--soft:hover {
  background: var(--soft-3);
}

.btn--ghost {
  border: 1px solid var(--line-strong);
}

.btn--ghost:hover {
  background: var(--soft-1);
}

.btn--plain:hover {
  background: var(--soft-2);
}

.btn--danger {
  color: var(--danger);
}

.btn--danger:hover {
  background: color-mix(in srgb, var(--danger) 9%, transparent);
}

.btn--danger-fill {
  background: var(--danger);
  color: #fff;
}

.btn--danger-fill:hover {
  filter: brightness(1.08);
}

.btn[disabled],
.btn.is-busy {
  opacity: 0.5;
  pointer-events: none;
}

/* ------------------------------------------------------------------ sheets */

.sheet {
  width: min(560px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 34px;
  background: var(--surface);
  color: var(--ink);
  overflow: hidden auto;
  overscroll-behavior: contain;
  box-shadow: inset 0 1px 0 0 var(--glass-shine), 0 30px 90px rgba(0, 0, 0, 0.16);
  transform: scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.sheet--wide {
  width: min(720px, calc(100vw - 32px));
}

.sheet--narrow {
  width: min(440px, calc(100vw - 32px));
}

.sheet.is-open {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}

.sheet.is-closing {
  transform: scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition-duration: 0.15s;
}

.sheet::backdrop {
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

.sheet.is-open::backdrop {
  opacity: 1;
}

.sheet.is-closing::backdrop {
  opacity: 0;
  transition-duration: 0.15s;
}

html:has(.sheet[open]) {
  overflow: hidden;
}

.sheet__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-tile);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.16s var(--ease);
}

.sheet__close:hover {
  background: color-mix(in srgb, var(--surface) 88%, var(--ink) 6%);
}

.sheet__close:active {
  transform: scale(0.95);
}

.sheet__close svg {
  width: 18px;
  height: 18px;
}

.sheet__panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px;
}

.sheet__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  text-align: center;
}

.sheet__title {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  text-wrap: balance;
}

.sheet__lede {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  text-wrap: balance;
}

.sheet__foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sheet__foot-row {
  display: flex;
  gap: 10px;
}

.sheet__foot-row > * {
  flex: 1 1 0;
}

.sheet__note {
  margin: 0;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

/* ------------------------------------------------------------------ fields */

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field__label {
  padding: 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.field__label em {
  color: var(--faint);
  font-style: normal;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.input {
  width: 100%;
  height: 48px;
  padding: 0 20px;
  border: 1px solid var(--line-input);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  outline: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.input::placeholder {
  color: var(--faint);
}

.input:hover {
  border-color: var(--line-strong);
}

.input:focus {
  border-color: color-mix(in srgb, var(--ink) 45%, transparent);
}

textarea.input {
  height: auto;
  min-height: 104px;
  padding: 14px 20px;
  border-radius: 22px;
  line-height: 1.5;
  resize: vertical;
}

select.input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  cursor: pointer;
}

select.input option {
  color: #2b2b2b;
  background: #fff;
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 172px;
  padding: 28px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.dropzone:hover,
.dropzone.is-over {
  background: var(--soft-1);
  border-color: color-mix(in srgb, var(--ink) 40%, transparent);
  color: var(--ink);
}

.dropzone:focus-visible {
  outline: 2px solid var(--line-strong);
  outline-offset: 2px;
}

.dropzone__icon {
  width: 30px;
  height: 30px;
  margin-bottom: 6px;
  color: var(--ink);
  opacity: 0.8;
}

.dropzone__title {
  color: var(--ink);
  font-size: 15px;
}

.dropzone__title u {
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.dropzone__hint {
  color: var(--faint);
  font-size: 13px;
  line-height: 1.45;
  text-wrap: balance;
}

.dropzone.has-files {
  min-height: 0;
  align-items: stretch;
  gap: 12px;
  padding: 14px;
  cursor: default;
  text-align: left;
}

.dropzone.has-files:hover {
  background: transparent;
  border-color: var(--line-strong);
}

.dropzone.has-files.is-over {
  background: var(--soft-1);
}

.files__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 0 8px;
}

.files__summary {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.files__summary span {
  color: var(--muted);
}

.files__strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
}

.files__thumb {
  position: relative;
  flex: 0 0 auto;
  width: 116px;
  aspect-ratio: var(--tile-aspect);
  border-radius: 8px;
  overflow: hidden;
  background: var(--tile);
  box-shadow: var(--shadow-tile);
}

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

.files__thumb span {
  position: absolute;
  left: 5px;
  bottom: 5px;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--tile-glass);
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

.files__more {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 116px;
  aspect-ratio: var(--tile-aspect);
  border-radius: 8px;
  background: var(--soft-2);
  color: var(--muted);
  font-size: 13px;
}

.progress {
  position: relative;
  height: 4px;
  border-radius: 4px;
  background: var(--soft-2);
  overflow: hidden;
}

.progress__bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: var(--ink);
  transition: width 0.3s var(--ease);
}

.form-error {
  margin: 0;
  color: var(--danger);
  font-size: 14px;
  text-align: center;
}

/* ------------------------------------------------------------- tag editor */

.tags {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.tags__tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--soft-2);
}

.tags__tab {
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}

.tags__tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-tile);
}

.tags__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(46vh, 420px);
  overflow-y: auto;
  padding: 2px;
}

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

.tags__row .input {
  height: 42px;
  padding: 0 16px;
}

.tags__count {
  flex: 0 0 56px;
  color: var(--faint);
  font-size: 13px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tags__remove {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.tags__remove:hover {
  background: var(--soft-2);
  color: var(--danger);
}

.tags__remove svg {
  width: 16px;
  height: 16px;
}

.tags__add {
  display: flex;
  gap: 8px;
}

/* ----------------------------------------------------------- drop overlay */

.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s var(--ease);
}

.drop-overlay.is-visible {
  opacity: 1;
}

.drop-overlay__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(760px, 100%);
  height: min(420px, 70vh);
  border: 1.5px dashed color-mix(in srgb, var(--ink) 35%, transparent);
  border-radius: 34px;
  text-align: center;
}

.drop-overlay__box svg {
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
}

.drop-overlay__title {
  font-size: 22px;
  font-weight: 510;
  line-height: 1.2;
}

.drop-overlay__hint {
  color: var(--muted);
  font-size: 15px;
}

/* ------------------------------------------------------------------ toasts */

.toasts {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(560px, calc(100vw - 32px));
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  background: rgba(32, 32, 32, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #fff;
  font-size: 15px;
  line-height: 1.2;
  pointer-events: auto;
  animation: toast-in 0.26s var(--ease);
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.toast span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast .toast__muted {
  color: rgba(255, 255, 255, 0.65);
  font-variant-numeric: tabular-nums;
}

.toast button,
.toast a {
  flex: 0 0 auto;
  margin-right: -10px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.toast button:hover,
.toast a:hover {
  background: rgba(255, 255, 255, 0.22);
}

.toast--error {
  background: rgba(180, 40, 22, 0.92);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

html.is-canvas .toasts {
  bottom: 148px;
}

/* ------------------------------------------------------------ empty states */

.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 112px 24px;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.empty__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 520px;
  text-align: center;
}

.empty__copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty__title {
  margin: 0;
  font-size: 22px;
  font-weight: 510;
  line-height: 1.2;
  letter-spacing: 0.22px;
  text-wrap: balance;
}

.empty__text {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.3;
  text-wrap: balance;
}

.empty__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

html.is-canvas .main > .empty {
  margin-top: 8px;
}

/* ------------------------------------------------------------------ footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  width: 100%;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  color: var(--ink);
}

.footer__primary {
  color: var(--ink);
}

.footer__small {
  font-size: 13px;
  color: var(--faint);
}

/* ------------------------------------------------- wrapped tiles & actions */

/* Tiles with hover actions: the link and its buttons are siblings in a wrapper. */
.tile-wrap {
  position: relative;
  min-width: 0;
}

.grid > .tile-wrap > .tile {
  content-visibility: auto;
  contain-intrinsic-size: auto 260px;
}

@media (hover: hover) {
  .tile-wrap:hover {
    z-index: 2;
  }

  .tile-wrap:hover > .tile {
    transform: scale(1.01);
  }
}

.decks {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.toolbar__spacer {
  flex: 1 1 auto;
}

.btn__count {
  color: var(--faint);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------- segmented pill */

.segmented {
  display: inline-flex;
  max-width: 100%;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--soft-2);
  overflow-x: auto;
  scrollbar-width: none;
}

.segmented__btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.16s, color 0.16s, box-shadow 0.16s;
}

.segmented__btn:hover {
  color: var(--ink);
}

.segmented__btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-tile);
  cursor: default;
}

.segmented__count {
  color: var(--faint);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* In forms: a required two-way choice that fills the row. */
.segmented--field {
  display: flex;
  width: 100%;
  transition: box-shadow 0.2s var(--ease);
}

.segmented--field .segmented__btn {
  flex: 1 1 0;
  justify-content: center;
  height: 40px;
  font-size: 15px;
}

.segmented--field .segmented__btn.is-active {
  cursor: pointer;
}

.segmented.is-invalid {
  box-shadow: 0 0 0 1.5px var(--danger);
}

.files__summary .files__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.files__summary .files__error {
  color: var(--danger);
  white-space: normal;
}

/* Over the slides canvas the control floats, bottom centre. */
.segmented--float {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 50;
  transform: translateX(-50%);
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: var(--shadow-pill);
}

.segmented--float .segmented__btn {
  height: 44px;
  padding: 0 18px;
  font-size: 15px;
}

.segmented--float .segmented__btn.is-active {
  background: var(--soft-3);
  box-shadow: none;
}

/* ------------------------------------------------------ canvas tile actions */

.canvas__actions {
  top: 0;
  right: auto;
  left: 0;
  z-index: 5;
  transform: translateX(-100%);
}

.canvas__actions:not(.is-visible) {
  display: none;
}

.canvas__actions.is-visible {
  opacity: 1;
}

.canvas__tile.is-hover {
  transform: scale(1.01);
  z-index: 2;
}

.canvas__tile.is-hover .pill {
  opacity: 1;
}

/* ----------------------------------------------------------------- dropdown */

.dropdown > summary {
  cursor: pointer;
  user-select: none;
}

.dropdown[open] > summary {
  background: var(--soft-1);
}

.btn .dropdown__caret {
  width: 14px;
  height: 14px;
  margin-left: -2px;
  opacity: 0.55;
}

.dropdown .menu__panel {
  min-width: 250px;
  z-index: 20;
}

.menu__panel--start {
  left: 0;
  right: auto;
}

.menu[open] .menu__panel--start {
  transform-origin: top left;
}

.menu__list a svg,
.menu__list button svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  opacity: 0.75;
}

/* ------------------------------------------------------ graphics and logos */

.assets {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.assets__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 0 4px;
}

.assets__title {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
}

.assets__lede {
  max-width: 720px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.4;
}

.assets__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 24px;
}

.assets--graphics .assets__grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.asset__tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 16%;
  border: 0;
  background: var(--tile-color, var(--tile));
  box-shadow: var(--shadow-tile);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.2s var(--ease);
  touch-action: manipulation;
}

.asset__tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Every graphic shows whole, never cropped: it fits inside its tile with a
   small margin, whatever its shape (wide banners, tall phone screenshots). */
.assets--graphics .asset__tile {
  aspect-ratio: 4 / 3;
  padding: 5%;
  background: var(--tile);
}

.assets--graphics .asset__tile img {
  object-fit: contain;
}

.assets--graphics .asset__tile.is-clear {
  padding: 9%;
}

.asset__tile.is-clear,
.assets--logos .asset__tile {
  background: var(--tile);
}

/* Opaque app icons get the rounded-square mask they have on a phone. */
.asset__tile.is-app img {
  border-radius: 22.5%;
  box-shadow: var(--shadow-tile);
}

/* Mostly-white transparent art: the grey blur follows its shapes. */
.asset__tile.is-light-art img {
  filter: drop-shadow(0 0 0.6px var(--light-art-edge)) drop-shadow(0 0 9px var(--light-art-glow));
}

.asset__tile.on-light {
  background: #f3f3f3;
}

@media (hover: hover) {
  .asset:hover .asset__tile {
    transform: scale(1.01);
  }
}

.asset__tile:focus-visible {
  transform: scale(1.01);
  outline: none;
}

.asset__tile:active {
  transform: scale(0.99);
}

.asset.is-target .asset__tile {
  animation: target-pulse 1.4s var(--ease) 1;
}

/* Touch screens show tile actions all the time: keep copy and download, and
   leave edit and delete to the viewer. */
@media (hover: none) {
  .asset .tile-action:nth-child(n + 3) {
    display: none;
  }
}

.result__thumb img.is-contain {
  object-fit: contain;
  padding: 6px;
}

.result__thumb img.is-light-art {
  filter: drop-shadow(0 0 0.5px var(--light-art-edge)) drop-shadow(0 0 3px var(--light-art-glow));
}

.dropzone.is-images .files__thumb img {
  object-fit: contain;
  padding: 8px;
}

/* --------------------------------------------------------- viewer: assets */

.viewer.is-asset .viewer__image,
.viewer.is-asset .viewer__preview {
  object-fit: contain;
}

.viewer__stage[data-backdrop] :is(.viewer__image, .viewer__preview) {
  padding: min(6%, 48px);
}

/* Actual size: the picture is as big as its pixels, shrunk only to fit the stage,
   with no card, border or padding around it. Dark art keeps a white backing so it
   stays visible in dark mode. */
.viewer.is-asset:not(.is-presenting) .viewer__stage[data-actual] :is(.viewer__image, .viewer__preview) {
  max-width: none;
  max-height: none;
  padding: 0;
  width: min(var(--asset-w), 100cqw, 100cqh * var(--slide-aspect, 1));
  height: auto;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.viewer.is-asset:not(.is-presenting) .viewer__stage[data-actual][data-backdrop='light'] :is(.viewer__image, .viewer__preview) {
  background: #fff;
}

/* No card behind white art, so the blur follows the artwork's own shapes. */
.viewer__stage[data-backdrop='light-art'] :is(.viewer__image, .viewer__preview) {
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 0 1px var(--light-art-edge)) drop-shadow(0 0 22px var(--light-art-glow));
}

.zoom-clone--contain {
  object-fit: contain;
  background: transparent;
  box-shadow: none;
}

.viewer__actions .viewer__key {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  color: var(--faint);
  font: inherit;
  font-size: 12px;
  line-height: 1.3;
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .deck__layout {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
  }
}

@media (max-width: 900px) {
  html,
  body {
    overflow-x: clip;
  }

  .page {
    padding: 0 16px;
  }

  .topbar {
    gap: 8px;
    padding: 10px 0;
    margin: 0 -8px;
    width: auto;
  }

  .topbar__group {
    gap: 8px;
  }

  .nav {
    display: none;
  }

  .topbar__center {
    position: static;
    transform: none;
    order: 2;
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
  }

  .topbar__group--end {
    order: 3;
  }

  .cta {
    padding: 0 18px;
  }

  .cta__full {
    display: none;
  }

  .cta__short {
    display: inline;
  }

  .cta svg {
    display: none;
  }

  .search-trigger,
  html.is-scrolled .search-trigger {
    padding: 0 6px 0 18px;
    background: var(--glass);
    box-shadow: var(--shadow-pill);
  }

  .search-trigger__kbd {
    display: none;
  }

  .search-chip {
    margin-right: 0;
    height: 40px;
  }

  .menu__list--nav {
    display: flex;
  }

  .menu__sep--nav {
    display: block;
  }

  .main {
    padding: 16px 0 calc(32px + env(safe-area-inset-bottom, 0px));
    gap: 16px;
  }

  .grid,
  .board {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .assets__grid,
  .assets--graphics .assets__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .assets__head {
    padding-top: 8px;
  }

  .hero {
    height: auto;
    min-height: 0;
    padding: 24px 16px 40px;
  }

  .hero__orbit,
  .hero__art {
    display: none;
  }

  .hero__strip {
    display: block;
  }

  .hero__eyebrow,
  .hero__title {
    font-size: 18px;
    letter-spacing: 0.18px;
  }

  .deck__layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .deck__info {
    position: static;
    padding: 16px 0 8px;
    gap: 20px;
  }

  .deck__copy {
    max-width: none;
  }

  .board__item.drop-before::before {
    left: 0;
    top: -9.5px;
    bottom: auto;
    width: 100%;
    height: 3px;
  }

  .board__item.drop-after::after {
    right: 0;
    top: auto;
    bottom: -9.5px;
    width: 100%;
    height: 3px;
  }

  .palette {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 80px);
    border-radius: 28px;
    margin-top: 12px;
  }

  .palette__bar {
    padding: 20px 14px 4px 22px;
  }

  .palette__input {
    font-size: 16px;
  }

  .palette__body {
    flex-direction: column;
    gap: 8px;
    padding: 8px 8px 64px;
  }

  .palette__rail {
    flex: 0 0 auto;
    flex-direction: row;
    overflow-x: auto;
  }

  .rail-item {
    flex: 0 0 auto;
    height: 40px;
    padding: 0 14px;
    gap: 8px;
  }

  .palette .row {
    height: 42px;
    padding: 0 14px;
  }

  .palette__results {
    padding: 8px 8px 64px;
  }

  .sheet__panel {
    padding: 28px 16px 20px;
  }

  .sheet__head {
    padding: 0 28px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .input {
    font-size: 16px;
  }

  .empty {
    padding: 64px 16px;
  }

  .footer {
    padding: 20px 0 28px;
  }
}

@media (max-width: 560px) {
  .pill {
    padding: 7px 11px;
    font-size: 14px;
  }

  .deck__actions .btn {
    flex: 1 1 auto;
  }
}

/* ---------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .marquee__track {
    animation: none;
    width: 100%;
    justify-content: center;
  }

  .marquee__group + .marquee__group,
  .marquee__group > span + span {
    display: none;
  }

  .marquee__group {
    padding: 0;
  }

  .tile:hover,
  .board__tile:hover {
    transform: none;
  }
}
