@font-face {
  font-family: "Exo 2";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/exo-2-cyrillic-variable.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Exo 2";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/exo-2-latin-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Russo One";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/fonts/russo-one-cyrillic-400.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Russo One";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/fonts/russo-one-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Rondonhashi JP";
  font-style: normal;
  font-display: block;
  font-weight: 900;
  src: url("/fonts/rondonhashi-jp-900.woff") format("woff");
  unicode-range: U+30C9, U+30F3, U+30ED, U+6A4B;
}

:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-deep: #020202;
  --surface: #0b0b0b;
  --surface-raised: #111;
  --surface-soft: #171717;
  --ink: #f3f3ef;
  --ink-inverse: #070707;
  --muted: #8d8d88;
  --muted-bright: #b9b9b3;
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.42);
  --signal: #f0f0eb;
  --danger: #c7c7c2;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.72);
  --clip-lg: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  --clip-md: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 13px 100%, 0 calc(100% - 13px));
  --clip-sm: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  font-family: "Exo 2", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
  text-rendering: geometricPrecision;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 72% 44%, rgba(255, 255, 255, 0.035), transparent 32%),
    linear-gradient(180deg, #050505, #020202);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  animation: grid-flash 360ms ease-out both;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 100;
  content: "";
  pointer-events: none;
  opacity: 0.18;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, 0.012) 3px,
    rgba(255, 255, 255, 0.012) 4px
  );
}

body.drawer-open {
  overflow: hidden;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
}

a {
  color: inherit;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

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

.module-index {
  color: var(--muted);
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.system-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-bright);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.system-status i {
  width: 6px;
  height: 6px;
  background: var(--signal);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.system-chrome {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  min-height: 44px;
  padding: 0 28px;
  color: rgba(255, 255, 255, 0.48);
  background: rgba(3, 3, 3, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.system-chrome span {
  animation: chrome-drop 180ms ease-out both;
}

.system-chrome span:nth-child(2) {
  animation-delay: 30ms;
}

.system-chrome span:nth-child(3) {
  animation-delay: 60ms;
}

.system-chrome span:last-child {
  text-align: right;
}

.system-chrome-center {
  color: rgba(255, 255, 255, 0.24);
  text-align: center;
}

.home-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 92px 40px 60px;
  overflow: hidden;
}

.home-shell::before {
  position: absolute;
  left: max(18px, calc(50% - 760px));
  bottom: -1.5vh;
  z-index: -1;
  content: "RONDONHASHI";
  color: rgba(255, 255, 255, 0.025);
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: clamp(80px, 9vw, 154px);
  line-height: 0.78;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  pointer-events: none;
}

.access-stage,
.search-stage {
  position: relative;
  z-index: 3;
  animation: stage-in 300ms cubic-bezier(0.22, 0.82, 0.2, 1) both;
}

.access-stage {
  width: min(550px, 100%);
}

.access-form {
  position: relative;
  display: grid;
  gap: 0;
  padding: 22px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0 3px, transparent 3px),
    rgba(7, 7, 7, 0.9);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  clip-path: var(--clip-lg);
  animation: panel-snap-in 280ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.access-form::after {
  position: absolute;
  top: 0;
  right: 36px;
  width: 72px;
  height: 4px;
  content: "";
  background: var(--signal);
  transform-origin: right;
  animation: line-grow 220ms 80ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.access-header,
.search-intro-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.access-header {
  animation: module-rise 180ms 30ms ease-out both;
}

.access-brand-lockup {
  padding: 58px 18px 50px;
  text-align: center;
  animation: module-rise 220ms 70ms ease-out both;
}

.access-brand {
  color: var(--ink);
  font-family: "Rondonhashi JP", sans-serif;
  font-size: clamp(46px, 9vw, 68px);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 1;
  text-shadow: 0 0 34px rgba(255, 255, 255, 0.12);
  animation: logo-snap 280ms 90ms cubic-bezier(0.18, 0.88, 0.2, 1) both;
}

.access-brand-lockup p {
  max-width: 320px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.access-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 0;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 150ms ease;
  clip-path: var(--clip-sm);
}

.access-button {
  color: var(--ink-inverse);
  background: var(--signal);
  border: 1px solid var(--signal);
  animation: module-rise 200ms 140ms ease-out backwards;
}

.access-button svg {
  width: 18px;
  height: 18px;
}

.access-button:hover {
  color: var(--ink);
  background: transparent;
  transform: translateY(-1px);
}

.access-button:hover svg {
  transform: translateX(4px);
}

.access-button:active {
  transform: translate(1px, 1px);
  transition-duration: 60ms;
}

.access-button svg {
  transition: transform 120ms ease;
}

.owner-access-trigger {
  position: relative;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 10px;
  padding: 0 12px 0 17px;
  overflow: hidden;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
  clip-path: var(--clip-sm);
  animation: module-rise 200ms 180ms ease-out both;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.owner-access-trigger::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  content: "";
  background: var(--signal);
  transform: scaleY(0.32);
  transition: transform 150ms ease;
}

.owner-access-trigger:hover {
  background: rgba(255, 255, 255, 0.065);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.owner-access-trigger:hover::before {
  transform: scaleY(1);
}

.owner-access-trigger:active {
  transform: translate(1px, 1px);
  transition-duration: 60ms;
}

.owner-access-trigger:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.owner-access-copy {
  display: grid;
  gap: 6px;
}

.owner-access-copy small {
  color: var(--muted);
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.14em;
}

.owner-access-copy strong {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.owner-access-key {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line-strong);
  clip-path: var(--clip-sm);
  transition: color 140ms ease, background 140ms ease, transform 140ms ease;
}

.owner-access-key svg {
  width: 17px;
  height: 17px;
  transition: transform 150ms ease;
}

.owner-access-trigger:hover .owner-access-key {
  color: var(--ink-inverse);
  background: var(--signal);
  transform: rotate(-4deg);
}

.owner-access-trigger:hover .owner-access-key svg {
  transform: rotate(12deg) scale(1.05);
}

.access-error {
  min-height: 16px;
  margin: 0;
  color: var(--muted-bright);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.search-stage {
  max-width: 100%;
  min-width: 0;
  width: min(960px, calc(100vw - 80px));
}

.search-intro {
  margin-bottom: 36px;
}

.search-intro-meta {
  animation: module-rise 180ms 20ms ease-out both;
}

.search-intro h1 {
  max-width: 100%;
  margin: 28px 0 12px;
  color: var(--ink);
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: 86px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.88;
  overflow-wrap: anywhere;
  text-transform: uppercase;
  animation: module-rise 220ms 50ms ease-out both;
}

.search-intro h1 span {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.42);
  animation: outline-snap 260ms 70ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.search-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  animation: module-rise 180ms 100ms ease-out both;
}

.search-form {
  max-width: 100%;
  width: 100%;
}

.search-box {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 58px 58px;
  max-width: 100%;
  gap: 8px;
  min-height: 78px;
  padding: 10px;
  overflow: hidden;
  background: rgba(7, 7, 7, 0.94);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  clip-path: var(--clip-lg);
  transform-origin: left center;
  animation: search-bar-in 250ms 115ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.search-box::before {
  position: absolute;
  top: 0;
  left: 76px;
  width: 110px;
  height: 3px;
  content: "";
  background: var(--signal);
  transform-origin: left;
  animation: line-grow 180ms 220ms ease-out both;
}

.search-box::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.11), transparent);
  transform: translateX(-100%);
}

#externalSearchForm:focus-within .search-box {
  border-color: rgba(255, 255, 255, 0.72);
}

#externalSearchForm:focus-within .search-box::after {
  opacity: 1;
  animation: search-sweep 320ms ease-out both;
}

.search-prefix {
  display: grid;
  place-items: center;
  color: var(--muted);
  border-right: 1px solid var(--line);
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: 11px;
}

#externalQuery {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  height: 56px;
  padding: 0 18px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: none;
  clip-path: none;
  font-family: "Exo 2", sans-serif;
  font-size: 18px;
  font-weight: 700;
}

#externalQuery::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.search-footnote {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 12px 0;
  color: rgba(255, 255, 255, 0.34);
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: 8px;
  letter-spacing: 0.12em;
  animation: module-rise 160ms 210ms ease-out both;
}

.round-button,
.icon-button,
.primary-button,
.ghost-button,
.segment,
.tab-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.round-button {
  width: 58px;
  height: 56px;
  padding: 0;
  clip-path: var(--clip-sm);
}

.search-box .round-button[type="submit"] {
  color: var(--ink-inverse);
  background: var(--signal);
  border-color: var(--signal);
}

.search-box #listButton {
  color: var(--ink);
  background: #070707;
}

.round-button:hover,
.icon-button:hover,
.primary-button:hover,
.ghost-button:hover,
.segment:hover,
.tab-button:hover {
  color: var(--ink-inverse);
  background: var(--signal);
  border-color: var(--signal);
  transform: translateY(-1px);
}

.round-button:active,
.icon-button:active,
.primary-button:active,
.ghost-button:active,
.segment:active,
.tab-button:active {
  transform: translate(1px, 1px);
  transition-duration: 60ms;
}

.round-button svg,
.icon-button svg,
.primary-button svg,
.ghost-button svg {
  transition: transform 120ms ease;
}

.round-button:hover svg,
.icon-button:hover svg {
  transform: rotate(-8deg) scale(1.06);
}

.search-box .round-button[type="submit"]:hover svg {
  transform: scale(1.14);
}

#listButton:hover svg {
  transform: rotate(8deg) scale(1.06);
}

#importButton:hover svg {
  transform: translateY(3px);
}

#exportButton:hover svg {
  transform: translateY(-3px);
}

#drawerCloseButton:hover svg {
  transform: rotate(90deg);
}

.round-button[aria-busy="true"] svg,
.primary-button[aria-busy="true"] svg {
  opacity: 0;
}

.round-button[aria-busy="true"]::after,
.primary-button[aria-busy="true"]::after {
  position: absolute;
  width: 17px;
  height: 17px;
  content: "";
  border: 2px solid rgba(0, 0, 0, 0.24);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.round-button svg,
.icon-button svg,
.primary-button svg,
.ghost-button svg,
.input-with-icon svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.round-button:focus-visible,
.icon-button:focus-visible,
.primary-button:focus-visible,
.ghost-button:focus-visible,
.segment:focus-visible,
.tab-button:focus-visible,
.media-card-open:focus-visible,
.status-choice:focus-visible,
.rating-step:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.result-list {
  position: absolute;
  top: calc(100% + 16px);
  right: 0;
  left: 0;
  z-index: 30;
  display: grid;
  gap: 6px;
  max-height: min(560px, calc(100vh - 170px));
  overflow: auto;
  padding: 8px;
  background: rgba(5, 5, 5, 0.96);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  clip-path: var(--clip-lg);
  animation: dropdown-in 180ms ease both;
}

.result-list:empty,
.result-list[hidden] {
  display: none;
}

.result-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  min-height: 76px;
  padding: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
  clip-path: var(--clip-sm);
  transition: background 140ms ease, border-color 140ms ease;
  animation: result-enter 170ms ease-out both;
}

.result-row:nth-child(2) { animation-delay: 20ms; }
.result-row:nth-child(3) { animation-delay: 40ms; }
.result-row:nth-child(4) { animation-delay: 60ms; }
.result-row:nth-child(5) { animation-delay: 80ms; }
.result-row:nth-child(n + 6) { animation-delay: 100ms; }

.result-row[data-result-row] {
  cursor: pointer;
}

.result-row[data-result-row]:hover,
.result-row.is-active {
  background: rgba(255, 255, 255, 0.075);
  border-color: var(--line-strong);
}

.result-row-muted {
  color: var(--muted);
}

.result-row img,
.result-thumb-fallback {
  width: 52px;
  height: 62px;
  object-fit: cover;
  background: var(--surface-soft);
  clip-path: var(--clip-sm);
}

.result-thumb-fallback {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.result-row-muted [data-lucide="loader-circle"] {
  animation: spin 900ms linear infinite;
}

.result-title,
.card-title,
.detail-title {
  overflow-wrap: anywhere;
}

.result-title {
  display: block;
  font-weight: 800;
}

.result-meta,
.muted-count,
.detail-meta,
.card-meta,
.empty-state,
.toast {
  color: var(--muted);
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.library-drawer {
  position: fixed;
  inset: 14px;
  z-index: 50;
  display: flex;
  width: min(1660px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  flex-direction: column;
  margin: auto;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.7) 0 2px, transparent 2px),
    rgba(5, 5, 5, 0.95);
  border: 1px solid var(--line-strong);
  box-shadow: 0 32px 110px rgba(0, 0, 0, 0.86);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.992);
  transition: opacity 150ms ease, transform 190ms cubic-bezier(0.2, 0.86, 0.2, 1);
  backdrop-filter: blur(24px);
  clip-path: var(--clip-lg);
}

.drawer-open .library-drawer {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: none;
  padding: 0;
  background: rgba(0, 0, 0, 0.72);
  border: 0;
  backdrop-filter: blur(9px);
}

.drawer-open .drawer-backdrop {
  display: block;
  animation: fade-in 120ms ease both;
}

.drawer-open .drawer-head {
  animation: shutter-down 180ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.drawer-open .drawer-actions .icon-button {
  animation: control-pop 150ms ease-out backwards;
}

.drawer-open .drawer-actions .icon-button:nth-child(2) {
  animation-delay: 25ms;
}

.drawer-open .drawer-actions .icon-button:nth-child(3) {
  animation-delay: 50ms;
}

.drawer-open .metric {
  animation: module-rise 180ms 35ms ease-out both;
}

.drawer-open .metric:nth-child(2) {
  animation-delay: 55ms;
}

.drawer-open .metric:nth-child(3) {
  animation-delay: 75ms;
}

.drawer-open .metric:nth-child(4) {
  animation-delay: 95ms;
}

.drawer-open .filter-panel {
  animation: module-slide-right 210ms 70ms ease-out both;
}

.drawer-open .library-head {
  animation: module-rise 180ms 80ms ease-out both;
}

.drawer-open .status-tabs {
  animation: module-rise 180ms 105ms ease-out both;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 82px;
  padding: 14px 20px 14px 24px;
  background: rgba(7, 7, 7, 0.94);
  border-bottom: 1px solid var(--line);
}

.drawer-identity {
  display: flex;
  align-items: center;
  gap: 20px;
}

.drawer-identity .module-index {
  padding-right: 20px;
  border-right: 1px solid var(--line);
}

.drawer-brand {
  color: var(--ink);
  font-family: "Rondonhashi JP", sans-serif;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.drawer-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.viewer-mode #importButton,
.viewer-mode #exportButton {
  display: none;
}

.icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  clip-path: var(--clip-sm);
}

.drawer-actions .icon-button:last-of-type {
  margin-left: 8px;
}

.drawer-scroll {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  grid-template-areas:
    "metrics metrics"
    "filters library";
  align-items: start;
  gap: 22px;
  overflow: auto;
  padding: 22px;
  scrollbar-color: rgba(255, 255, 255, 0.34) transparent;
  scrollbar-width: thin;
}

.metric-grid {
  display: grid;
  grid-area: metrics;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 12px;
  min-height: 74px;
  padding: 16px 18px;
  background: transparent;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric::before {
  align-self: center;
  width: 5px;
  height: 5px;
  content: "";
  background: var(--signal);
}

.metric strong {
  grid-column: 2;
  grid-row: 1;
  color: var(--ink);
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
}

.metric span {
  grid-column: 2;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-panel {
  position: sticky;
  top: 0;
  isolation: isolate;
  display: grid;
  grid-area: filters;
  gap: 18px;
  padding: 18px;
  overflow: hidden;
  background: rgba(14, 14, 14, 0.88);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  clip-path: var(--clip-md);
}

.filter-panel::after {
  position: absolute;
  top: 0;
  left: 0;
  width: 54px;
  height: 3px;
  content: "";
  background: var(--signal);
}

.panel-heading {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.panel-heading strong {
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: 18px;
  font-weight: 400;
  text-transform: uppercase;
}

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

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

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

.field.wide {
  grid-column: 1 / -1;
}

.field label,
.info-cell span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input,
select,
textarea {
  color-scheme: dark;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: #111;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  clip-path: var(--clip-sm);
  font-size: 14px;
}

select {
  background-color: #111;
  font-size: 13px;
}

select option {
  color: var(--ink);
  background: #111;
}

textarea {
  min-height: 100px;
  padding-top: 11px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  background: #151515;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.input-with-icon {
  position: relative;
}

.input-with-icon input {
  padding-left: 38px;
}

.input-with-icon svg {
  position: absolute;
  top: 50%;
  left: 12px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-bright);
  font-size: 12px;
  font-weight: 800;
}

.check-line input {
  width: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--signal);
  clip-path: none;
}

.library-panel {
  grid-area: library;
  min-width: 0;
  padding-bottom: 4px;
}

.library-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.library-title {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.library-title h2 {
  margin: 0;
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: clamp(24px, 2vw, 34px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.9;
  text-transform: uppercase;
}

.muted-count {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-tabs {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.status-tabs::-webkit-scrollbar {
  display: none;
}

.tab-button {
  flex: 0 0 auto;
  gap: 9px;
  min-height: 37px;
  padding: 0 12px;
  color: var(--muted-bright);
  background: transparent;
  border-color: var(--line);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  clip-path: var(--clip-sm);
}

.tab-button.is-active {
  color: var(--ink-inverse);
  background: var(--signal);
  border-color: var(--signal);
  animation: selected-snap 140ms ease-out backwards;
}

.tab-count {
  display: inline-grid;
  min-width: 22px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  color: inherit;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  font-size: 9px;
  clip-path: var(--clip-sm);
}

.tab-button.is-active .tab-count {
  color: var(--ink);
  background: var(--ink-inverse);
  border-color: var(--ink-inverse);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  counter-reset: media-card;
}

.media-card {
  position: relative;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  counter-increment: media-card;
  clip-path: var(--clip-md);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.drawer-open .media-card {
  animation: card-enter 220ms 120ms cubic-bezier(0.2, 0.88, 0.2, 1) backwards;
}

.drawer-open .media-card:nth-child(2) { animation-delay: 138ms; }
.drawer-open .media-card:nth-child(3) { animation-delay: 156ms; }
.drawer-open .media-card:nth-child(4) { animation-delay: 174ms; }
.drawer-open .media-card:nth-child(5) { animation-delay: 192ms; }
.drawer-open .media-card:nth-child(6) { animation-delay: 210ms; }
.drawer-open .media-card:nth-child(7) { animation-delay: 228ms; }
.drawer-open .media-card:nth-child(8) { animation-delay: 246ms; }
.drawer-open .media-card:nth-child(n + 9) { animation-delay: 264ms; }

.media-card::before {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: grid;
  min-width: 32px;
  height: 24px;
  place-items: center;
  padding: 0 7px;
  content: counter(media-card, decimal-leading-zero);
  color: var(--ink-inverse);
  background: var(--signal);
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: 9px;
  clip-path: var(--clip-sm);
}

.media-card::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 2px;
  height: 0;
  content: "";
  background: var(--signal);
  transition: height 220ms ease;
}

.media-card:hover {
  z-index: 2;
  border-color: rgba(255, 255, 255, 0.52);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.42);
  transform: translateY(-4px);
}

.media-card:hover::after {
  height: 100%;
}

.media-card-open {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  flex-direction: column;
  color: inherit;
  background: transparent;
  border: 0;
  text-align: left;
}

.poster-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 2.86;
  overflow: hidden;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.poster-frame::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -54%;
  z-index: 2;
  width: 28%;
  content: "";
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: skewX(-12deg);
}

.media-card:hover .poster-frame::before {
  animation: card-scan 280ms ease-out both;
}

.poster-frame::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent 58%, rgba(0, 0, 0, 0.3)),
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(255, 255, 255, 0.014) 4px 5px);
}

.poster-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.03);
  transition: filter 240ms ease, transform 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.media-card:hover .poster-frame img {
  filter: saturate(1) contrast(1.02);
  transform: scale(1.025);
}

.poster-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--muted);
  background:
    linear-gradient(135deg, transparent 49.5%, rgba(255, 255, 255, 0.08) 50%, transparent 50.5%),
    var(--surface-soft);
}

.favorite-flag {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--ink-inverse);
  background: var(--signal);
  clip-path: var(--clip-sm);
}

.favorite-flag svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.card-body {
  display: flex;
  min-height: 176px;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.55) 0 2px, transparent 2px),
    var(--surface);
}

.card-title {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--ink);
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 18px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-meta span + span::before {
  margin-right: 6px;
  content: "/";
  color: rgba(255, 255, 255, 0.26);
}

.pill,
.score-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
  clip-path: var(--clip-sm);
}

.pill {
  gap: 6px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.card-body > .pill {
  align-self: stretch;
  justify-content: space-between;
  width: 100%;
  min-height: 33px;
  padding: 0 11px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-body > .pill::after {
  width: 5px;
  height: 5px;
  content: "";
  background: currentColor;
}

.pill.planned {
  color: var(--ink);
  background: #262626;
  border-color: #3b3b3b;
}

.pill.watching {
  color: var(--ink-inverse);
  background: #d0d0cb;
  border-color: #d0d0cb;
}

.pill.completed {
  color: var(--ink-inverse);
  background: var(--signal);
  border-color: var(--signal);
}

.pill.dropped {
  color: #888;
  background: #070707;
  border-color: #252525;
}

.score-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 7px;
  margin-top: auto;
}

.score-pill {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 47px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 7px 9px;
  color: var(--ink-inverse);
  background: var(--signal);
  border: 1px solid var(--signal);
}

.score-pill.public {
  color: var(--ink);
  background: transparent;
  border-color: var(--line-strong);
}

.score-label {
  max-width: 100%;
  overflow: hidden;
  color: currentColor;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  opacity: 0.62;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.score-pill strong {
  color: currentColor;
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

.empty-state {
  display: grid;
  grid-column: 1 / -1;
  min-height: 280px;
  place-items: center;
  padding: 30px;
  color: var(--muted);
  text-align: center;
  background:
    linear-gradient(135deg, transparent 49.8%, rgba(255, 255, 255, 0.04) 50%, transparent 50.2%),
    rgba(255, 255, 255, 0.018);
  border: 1px dashed var(--line-strong);
  clip-path: var(--clip-md);
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: 18px;
  font-weight: 400;
  text-transform: uppercase;
}

dialog {
  width: min(900px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  box-shadow: var(--shadow);
  clip-path: var(--clip-lg);
}

dialog[open] {
  animation: dialog-snap 210ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
}

dialog[open]::backdrop {
  animation: fade-in 130ms ease-out both;
}

.pin-dialog {
  width: min(430px, calc(100vw - 32px));
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0 3px, transparent 3px),
    #060606;
}

.pin-dialog[open] {
  animation: pin-dialog-in 190ms cubic-bezier(0.18, 0.9, 0.2, 1) both;
}

.pin-dialog.is-closing {
  animation: pin-dialog-out 120ms ease-in both;
}

.pin-form {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 20px;
  overflow: hidden;
}

.pin-form::after {
  position: absolute;
  top: 0;
  right: 66px;
  width: 82px;
  height: 3px;
  content: "";
  background: var(--signal);
  transform-origin: right;
  animation: line-grow 180ms 40ms ease-out both;
}

.pin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.pin-header h2 {
  margin: 9px 0 0;
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: 21px;
  font-weight: 400;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.pin-close-button {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.pin-close-button:hover svg {
  transform: rotate(90deg);
}

.pin-console {
  position: relative;
  padding: 15px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  clip-path: var(--clip-md);
}

.pin-console::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 48px;
  height: 2px;
  content: "";
  background: var(--signal);
}

.pin-console-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  color: var(--muted);
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: 8px;
  letter-spacing: 0.12em;
}

.pin-hidden-input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  clip-path: none;
}

.pin-slots {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  cursor: text;
}

.pin-slots span {
  position: relative;
  display: grid;
  aspect-ratio: 0.84;
  min-width: 0;
  place-items: center;
  background: #0e0e0e;
  border: 1px solid var(--line-strong);
  clip-path: var(--clip-sm);
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.pin-slots span::after {
  width: 9px;
  height: 9px;
  content: "";
  background: var(--signal);
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.28);
  opacity: 0;
  transform: scale(0.35);
  transition: opacity 100ms ease, transform 120ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.pin-slots span.is-filled {
  background: #151515;
  border-color: rgba(255, 255, 255, 0.7);
  animation: pin-slot-fill 130ms ease-out both;
}

.pin-slots span.is-filled::after {
  opacity: 1;
  transform: scale(1);
}

.pin-slots span.is-current {
  border-color: var(--signal);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.pin-dialog.is-complete .pin-slots span {
  border-color: rgba(255, 255, 255, 0.78);
}

.pin-dialog.is-invalid .pin-console {
  animation: pin-denied 180ms ease-out both;
}

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

.pin-keypad button {
  min-height: 48px;
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: 15px;
  clip-path: var(--clip-sm);
  transition: color 110ms ease, background 110ms ease, border-color 110ms ease, transform 80ms ease;
}

.pin-dialog[open] .pin-keypad button {
  animation: control-pop 140ms ease-out backwards;
}

.pin-dialog[open] .pin-keypad button:nth-child(2),
.pin-dialog[open] .pin-keypad button:nth-child(5),
.pin-dialog[open] .pin-keypad button:nth-child(8),
.pin-dialog[open] .pin-keypad button:nth-child(11) {
  animation-delay: 18ms;
}

.pin-dialog[open] .pin-keypad button:nth-child(3n) {
  animation-delay: 36ms;
}

.pin-keypad button:hover {
  color: var(--ink-inverse);
  background: var(--signal);
  border-color: var(--signal);
  transform: translateY(-1px);
}

.pin-keypad button:active {
  transform: scale(0.97);
}

.pin-keypad button:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.pin-keypad .pin-key-action {
  color: var(--muted-bright);
  background: transparent;
  font-family: "Exo 2", sans-serif;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.pin-key-action svg {
  width: 17px;
  height: 17px;
  margin: auto;
}

.pin-submit-button {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 16px;
  color: var(--ink-inverse);
  background: var(--signal);
  border: 1px solid var(--signal);
  border-radius: 0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  clip-path: var(--clip-sm);
  transition: color 130ms ease, background 130ms ease, opacity 130ms ease, transform 100ms ease;
}

.pin-submit-button:disabled {
  color: var(--muted);
  background: #111;
  border-color: var(--line);
  cursor: not-allowed;
  opacity: 0.62;
}

.pin-submit-button:not(:disabled):hover {
  color: var(--ink);
  background: transparent;
  transform: translateY(-1px);
}

.pin-dialog.is-complete .pin-submit-button {
  animation: pin-ready 150ms ease-out both;
}

.pin-submit-button:not(:disabled):hover svg {
  transform: translateX(3px);
}

.pin-submit-button svg {
  width: 17px;
  height: 17px;
  transition: transform 120ms ease;
}

.details-dialog {
  width: min(820px, calc(100vw - 32px));
  overflow: hidden;
}

#detailsContent {
  max-height: calc(100vh - 32px);
  overflow: auto;
  scrollbar-color: rgba(255, 255, 255, 0.34) transparent;
  scrollbar-width: thin;
}

.detail-layout {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(340px, 1.1fr);
  min-height: 580px;
  overflow: hidden;
  background: rgba(5, 5, 5, 0.94);
}

.detail-close-button {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 6;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  color: var(--ink-inverse);
  background: var(--signal);
  border: 1px solid var(--signal);
  clip-path: var(--clip-sm);
  transition: color 140ms ease, background 140ms ease, transform 140ms ease;
}

.detail-close-button svg {
  width: 17px;
  height: 17px;
}

.detail-close-button:hover {
  color: var(--ink);
  background: #050505;
  transform: translateY(-1px);
}

.detail-close-button:hover svg {
  transform: rotate(90deg);
}

.detail-close-button:active {
  transform: translate(1px, 1px);
}

.detail-close-button svg {
  transition: transform 130ms ease;
}

.detail-close-button:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.detail-card-editor::before {
  position: absolute;
  inset: -44px;
  z-index: -2;
  content: "";
  background-image: var(--detail-poster);
  background-position: center;
  background-size: cover;
  filter: blur(34px) grayscale(1);
  opacity: 0.18;
  transform: scale(1.08);
}

.detail-card-editor::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, transparent 38%, rgba(5, 5, 5, 0.72) 52%, #050505 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.54));
}

.detail-poster-frame {
  position: relative;
  min-height: 580px;
  overflow: hidden;
}

.details-dialog[open] .detail-poster-frame {
  animation: detail-poster-in 240ms 20ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.detail-poster {
  width: 100%;
  height: 100%;
  min-height: 580px;
  overflow: hidden;
  background: var(--surface-soft);
  border-right: 1px solid var(--line);
}

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

.detail-poster-caption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  padding: 16px;
  background: rgba(3, 3, 3, 0.78);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(16px);
  clip-path: var(--clip-md);
}

.detail-title {
  margin: 0;
  color: var(--ink);
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.1;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.85);
}

.detail-original {
  margin: 8px 0 0;
  color: var(--muted-bright);
  font-size: 12px;
  line-height: 1.4;
}

.detail-main {
  min-width: 0;
  padding: 24px;
  background: rgba(5, 5, 5, 0.76);
  backdrop-filter: blur(20px);
}

.details-dialog[open] .detail-main {
  animation: detail-main-in 230ms 45ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.detail-cube,
.detail-favorite-button,
.detail-source-icon {
  display: inline-flex;
  width: auto;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  color: var(--ink-inverse);
  background: var(--signal);
  border: 1px solid var(--signal);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  clip-path: var(--clip-sm);
}

.detail-favorite-button,
.detail-source-icon {
  width: 32px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border-color: var(--line-strong);
}

.detail-favorite-button svg,
.detail-source-icon svg {
  width: 14px;
  height: 14px;
}

.detail-favorite-button.is-active {
  color: var(--ink-inverse);
  background: var(--signal);
  border-color: var(--signal);
  animation: control-pop 150ms ease-out both;
}

.detail-favorite-button.is-active svg {
  fill: currentColor;
}

.detail-favorite-button:hover,
.detail-source-icon:hover {
  color: var(--ink-inverse);
  background: var(--signal);
}

.service-score {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px;
  color: var(--ink-inverse);
  background: var(--signal);
  border: 1px solid var(--signal);
  clip-path: var(--clip-md);
}

.service-score span,
.detail-editor-label,
.rating-head span {
  color: inherit;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.service-score strong {
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: 31px;
  font-weight: 400;
}

.detail-status-editor {
  margin-top: 22px;
}

.detail-editor-label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
}

.status-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.status-choice {
  position: relative;
  min-height: 44px;
  padding: 8px 10px;
  color: var(--muted-bright);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.025em;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  clip-path: var(--clip-sm);
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.status-choice::before {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 4px;
  height: 4px;
  content: "";
  background: currentColor;
  opacity: 0.5;
}

.status-choice:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.status-choice.is-active {
  color: var(--ink-inverse);
  background: var(--signal);
  border-color: var(--signal);
}

.status-choice.dropped:not(.is-active) {
  color: #727272;
}

.detail-rating-editor {
  margin-top: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  clip-path: var(--clip-md);
}

.rating-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.rating-head strong {
  color: var(--ink);
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
}

.rating-console {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.rating-step {
  width: 38px;
  height: 36px;
  color: var(--ink-inverse);
  background: var(--signal);
  border: 1px solid var(--signal);
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  clip-path: var(--clip-sm);
}

.rating-step:hover {
  color: var(--ink);
  background: transparent;
}

.rating-slider {
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 0;
  appearance: none;
  background: linear-gradient(90deg, var(--signal) var(--rating-progress), #1b1b1b 0);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  clip-path: none;
}

.rating-slider::-webkit-slider-thumb {
  width: 12px;
  height: 38px;
  appearance: none;
  background: #050505;
  border: 2px solid var(--signal);
}

.rating-slider::-moz-range-thumb {
  width: 12px;
  height: 34px;
  background: #050505;
  border: 2px solid var(--signal);
  border-radius: 0;
}

.detail-card-footer {
  display: flex;
  margin-top: 18px;
}

.detail-delete-button {
  display: inline-flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  clip-path: var(--clip-sm);
}

.detail-delete-button:hover {
  color: var(--ink-inverse);
  background: var(--signal);
  border-color: var(--signal);
}

.viewer-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.viewer-chip {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  font-size: 9px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  clip-path: var(--clip-sm);
}

.detail-snapshot,
.detail-quick-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.detail-stat,
.info-cell {
  min-height: 64px;
  padding: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  clip-path: var(--clip-sm);
}

.detail-stat span,
.info-cell span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-stat strong,
.info-cell strong {
  display: block;
  margin-top: 7px;
  overflow-wrap: anywhere;
}

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

.detail-control.wide {
  grid-column: 1 / -1;
}

.detail-control span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.detail-section {
  margin-top: 18px;
}

.detail-section h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.detail-section p {
  margin: 0;
  color: var(--muted-bright);
  line-height: 1.6;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.edit-dialog {
  overflow: auto;
}

.edit-form {
  padding: 24px;
}

.dialog-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.dialog-title-row h2 {
  margin: 0;
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: 24px;
  font-weight: 400;
  text-transform: uppercase;
}

.dialog-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.primary-button,
.ghost-button {
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  clip-path: var(--clip-sm);
}

.primary-button {
  color: var(--ink-inverse);
  background: var(--signal);
  border-color: var(--signal);
}

.ghost-button {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}

.ghost-button.danger {
  color: var(--muted-bright);
}

.action-spacer {
  flex: 1 1 auto;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 40px));
  padding: 13px 15px;
  color: var(--ink);
  background: rgba(10, 10, 10, 0.96);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 700;
  clip-path: var(--clip-sm);
  animation: toast-in 220ms ease both;
}

@keyframes grid-flash {
  0% {
    opacity: 0;
    background-position: 20px 0, 0 20px;
  }
  55% {
    opacity: 1;
  }
  100% {
    background-position: 0 0, 0 0;
  }
}

@keyframes chrome-drop {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes panel-snap-in {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes module-rise {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes module-slide-right {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes line-grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes logo-snap {
  from {
    opacity: 0;
    filter: blur(2px);
    transform: scaleX(0.94);
  }
  68% {
    opacity: 1;
  }
  to {
    filter: blur(0);
    transform: scaleX(1);
  }
}

@keyframes outline-snap {
  from {
    opacity: 0;
    letter-spacing: 0.04em;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    letter-spacing: -0.055em;
    transform: translateX(0);
  }
}

@keyframes search-bar-in {
  from {
    opacity: 0;
    transform: scaleX(0.96) translateY(5px);
  }
  to {
    opacity: 1;
    transform: scaleX(1) translateY(0);
  }
}

@keyframes shutter-down {
  from {
    opacity: 0;
    clip-path: inset(0 0 72% 0);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes control-pop {
  0% {
    opacity: 0;
    transform: scale(0.82);
  }
  70% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes selected-snap {
  0% {
    transform: translateX(-3px);
  }
  55% {
    transform: translateX(2px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes card-scan {
  from {
    left: -54%;
    opacity: 0;
  }
  24% {
    opacity: 1;
  }
  to {
    left: 126%;
    opacity: 0;
  }
}

@keyframes result-enter {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pin-dialog-in {
  from {
    opacity: 0;
    clip-path: inset(0 0 88% 0);
    transform: translateY(10px) scale(0.985);
  }
  56% {
    clip-path: inset(0 0 0 0);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pin-dialog-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.99);
  }
}

@keyframes pin-slot-fill {
  0% {
    transform: scale(0.9);
  }
  68% {
    transform: scale(1.035);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes pin-ready {
  0% {
    transform: scaleX(0.97);
  }
  70% {
    transform: scaleX(1.01);
  }
  100% {
    transform: scaleX(1);
  }
}

@keyframes pin-denied {
  0%, 100% {
    transform: translateX(0);
  }
  30% {
    transform: translateX(-5px);
  }
  65% {
    transform: translateX(4px);
  }
}

@keyframes dialog-snap {
  from {
    opacity: 0;
    transform: scale(0.985) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes detail-poster-in {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes detail-main-in {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes stage-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes search-sweep {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.demo-strip {
  display: flex;
  position: relative;
  z-index: 2;
  max-width: min(760px, calc(100vw - 32px));
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
}

.demo-strip span {
  max-width: 100%;
}

.demo-strip span:not(.demo-badge):not(#storageMode) {
  white-space: normal;
}

.demo-badge,
#storageMode {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 10px;
  color: #000;
  background: #fff;
  border: 1px solid #fff;
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
}

#storageMode {
  color: #fff;
  background: #050505;
  border-color: rgba(255, 255, 255, 0.34);
}

.storage-warning {
  margin: 0 0 14px;
  padding: 11px 12px;
  color: #000;
  background: #fff;
  border: 1px solid #fff;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  text-transform: uppercase;
}

.poster-demo {
  position: relative;
  display: grid;
  overflow: hidden;
  place-items: center;
  isolation: isolate;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 38%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 9px, transparent 9px 18px),
    #111;
}

.poster-demo::before {
  position: absolute;
  inset: 12%;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, transparent 0 28%, rgba(255, 255, 255, 0.28) 28% 32%, transparent 32%),
    linear-gradient(0deg, transparent 0 48%, rgba(255, 255, 255, 0.2) 48% 52%, transparent 52%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  transform: skew(-8deg);
}

.poster-demo::after {
  position: absolute;
  right: 9%;
  bottom: 9%;
  width: 34%;
  height: 8px;
  content: "";
  background: currentColor;
  opacity: 0.72;
}

.poster-demo > span {
  display: grid;
  width: 52%;
  aspect-ratio: 1;
  place-items: center;
  color: #000;
  background: #fff;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  font-family: "Russo One", "Exo 2", sans-serif;
  font-size: clamp(26px, 5vw, 52px);
  line-height: 1;
}

.result-thumb-fallback.poster-demo > span {
  width: 70%;
  font-size: 18px;
}

.tone-white {
  color: #000;
  background: #f2f2f2;
}

.tone-cyan,
.tone-ice {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.52), transparent 32%),
    #252525;
}

.tone-dark {
  color: #8f8f8f;
  background: #000;
}

.tone-lime {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), transparent 38%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 8px, transparent 8px 16px),
    #1b1b1b;
}

.tone-steel,
.tone-grid,
.tone-mono {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 44%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.1) 0 2px, transparent 2px 12px),
    #101010;
}

.result-action {
  margin-top: 12px;
}

@media (max-width: 1240px) {
  .drawer-scroll {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .filter-panel {
    padding: 16px;
  }
}

@media (max-width: 920px) {
  .home-shell {
    padding-right: 28px;
    padding-left: 28px;
  }

  .search-intro h1 {
    font-size: 72px;
  }

  .library-drawer {
    inset: 8px;
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .drawer-scroll {
    display: flex;
    align-items: stretch;
    flex-direction: column;
  }

  .metric-grid,
  .filter-panel,
  .library-panel {
    flex: 0 0 auto;
  }

  .filter-panel {
    position: relative;
    grid-template-columns: 160px minmax(0, 1fr) auto;
    align-items: end;
  }

  .panel-heading {
    padding: 0 16px 0 0;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-panel .check-line {
    min-height: 44px;
    padding: 0 10px;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  }
}

@media (max-width: 680px) {
  .system-chrome {
    grid-template-columns: 1fr auto;
    min-height: 40px;
    overflow: hidden;
    padding: 0 16px;
  }

  .system-chrome-center {
    display: none;
  }

  .system-chrome span:last-child {
    display: none;
  }

  .search-intro-meta .system-status {
    display: none;
  }

  .home-shell {
    min-height: 100svh;
    padding: 70px 18px 34px;
  }

  .search-stage {
    width: min(320px, calc(100vw - 56px));
    max-width: min(320px, calc(100vw - 56px));
  }

  .home-shell::before {
    left: -12px;
    font-size: 82px;
  }

  .access-form {
    padding: 17px;
  }

  .access-brand-lockup {
    padding: 42px 10px 38px;
  }

  .access-brand {
    font-size: clamp(43px, 15vw, 60px);
  }

  .search-intro {
    margin-bottom: 26px;
  }

  .search-intro h1 {
    margin-top: 22px;
    font-size: 36px;
  }

  .search-intro p {
    font-size: 12px;
  }

  .search-box {
    display: flex;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 46px 46px;
    align-items: stretch;
    min-height: 68px;
    gap: 6px;
    padding: 8px;
  }

  .search-prefix {
    display: none;
  }

  #externalQuery {
    flex: 1 1 auto;
    min-width: 0;
    width: 1px;
    height: 50px;
    padding: 0 10px;
    font-size: 15px;
  }

  .search-box .round-button {
    flex: 0 0 46px;
    width: 46px;
    height: 50px;
  }

  .search-footnote {
    font-size: 7px;
  }

  .result-list {
    top: calc(100% + 12px);
    max-height: calc(100svh - 130px);
  }

  .library-drawer {
    inset: 0;
    width: 100vw;
    max-height: 100dvh;
    border: 0;
    clip-path: none;
  }

  .drawer-head {
    min-height: 70px;
    padding: 12px 14px;
  }

  .drawer-identity {
    gap: 10px;
  }

  .drawer-identity .module-index {
    display: none;
  }

  .drawer-brand {
    font-size: 20px;
  }

  .drawer-actions {
    gap: 6px;
  }

  .drawer-actions .icon-button:last-of-type {
    margin-left: 2px;
  }

  .icon-button {
    width: 40px;
    height: 40px;
  }

  .drawer-scroll {
    gap: 16px;
    padding: 14px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric {
    min-height: 64px;
    padding: 12px;
  }

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .metric strong {
    font-size: 22px;
  }

  .filter-panel {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 14px;
    padding: 15px;
  }

  .panel-heading {
    display: flex;
    padding: 0 0 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .filter-panel .check-line {
    min-height: 28px;
    padding: 0;
  }

  .library-head {
    align-items: flex-end;
    margin-bottom: 14px;
  }

  .library-title {
    display: block;
  }

  .library-title .module-index {
    display: block;
    margin-bottom: 8px;
  }

  .library-title h2 {
    font-size: 26px;
  }

  .status-tabs {
    margin-right: -14px;
    margin-bottom: 14px;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .media-card:hover {
    transform: none;
  }

  .media-card::before {
    top: 7px;
    left: 7px;
    min-width: 28px;
    height: 21px;
  }

  .favorite-flag {
    top: 7px;
    right: 7px;
    width: 28px;
    height: 28px;
  }

  .card-body {
    min-height: 168px;
    gap: 8px;
    padding: 11px;
  }

  .card-title {
    min-height: 38px;
    font-size: 12px;
    line-height: 1.5;
  }

  .card-meta {
    min-height: 16px;
    font-size: 8px;
  }

  .card-body > .pill {
    min-height: 30px;
    padding: 0 8px;
    font-size: 8px;
  }

  .score-row {
    gap: 5px;
  }

  .score-pill {
    min-height: 43px;
    padding: 6px 7px;
  }

  .score-label {
    font-size: 7px;
  }

  .score-pill strong {
    font-size: 14px;
  }

  dialog,
  .details-dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: 100dvh;
    border: 0;
    clip-path: none;
  }

  .pin-dialog {
    width: calc(100vw - 28px);
    max-width: 430px;
    max-height: calc(100dvh - 28px);
    border: 1px solid var(--line-strong);
    clip-path: var(--clip-lg);
  }

  .pin-form {
    padding: 17px;
  }

  #detailsContent {
    max-height: 100dvh;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .detail-card-editor::after {
    background: linear-gradient(180deg, transparent 28%, rgba(5, 5, 5, 0.86) 47%, #050505 66%);
  }

  .detail-poster-frame,
  .detail-poster {
    min-height: min(62vh, 540px);
    max-height: min(62vh, 540px);
  }

  .detail-poster {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .detail-main {
    padding: 18px;
  }

  .edit-form {
    padding: 18px;
  }

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

  .field.wide {
    grid-column: auto;
  }

  .dialog-actions {
    position: sticky;
    bottom: 0;
    background: var(--bg);
  }

  .toast {
    right: 12px;
    bottom: 12px;
    max-width: calc(100vw - 24px);
  }
}

@media (max-width: 420px) {
  .search-stage {
    width: min(320px, calc(100vw - 56px));
    max-width: min(320px, calc(100vw - 56px));
  }

  .demo-strip {
    max-width: min(320px, calc(100vw - 56px));
  }

  .search-intro h1 {
    font-size: 34px;
  }

  .pin-form {
    gap: 13px;
    padding: 15px;
  }

  .pin-header h2 {
    font-size: 18px;
  }

  .pin-console {
    padding: 12px;
  }

  .pin-slots {
    gap: 5px;
  }

  .pin-keypad {
    gap: 5px;
  }

  .pin-keypad button {
    min-height: 44px;
  }

  .search-intro-meta .system-status {
    display: none;
  }

  .search-footnote span:last-child {
    display: none;
  }

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

  .library-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .muted-count {
    align-self: flex-start;
  }

  .viewer-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 370px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

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