/* ==========================================================================
   ANIMA · 私人动画档案馆
   A quiet, editorial screening room built for one viewer.
   ========================================================================== */

:root {
  --bg: #09090c;
  --bg-soft: #0d0d11;
  --bg-raised: #111116;
  --paper: #ede5d5;
  --paper-bright: #f7f0e2;
  --paper-dim: #c7beae;
  --muted: #918b82;
  --muted-dim: #67635d;
  --line: rgba(237, 229, 213, 0.13);
  --line-strong: rgba(237, 229, 213, 0.22);
  --gold: #d9ba84;
  --gold-bright: #ecd3a3;
  --gold-deep: #a88755;
  --red: #d25b45;
  --green: #90b69b;
  --serif: "SimSun", "Songti SC", "Noto Serif SC", "STSong", serif;
  --sans: "Microsoft YaHei", "PingFang SC", "Segoe UI", "Noto Sans SC", sans-serif;
  --latin: "Georgia", "Times New Roman", serif;
  --mono: "Consolas", "SFMono-Regular", "Cascadia Mono", monospace;
  --pad: clamp(20px, 4.5vw, 72px);
  --max: 1440px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

#about,
#collection,
#journal {
  scroll-margin-top: 82px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll {
  overflow: hidden;
}

::selection {
  background: var(--gold);
  color: #12100c;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.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;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--paper);
  color: var(--bg);
  font-size: 12px;
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Film grain + cursor warmth ------------------------------------------------ */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 200;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.75'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  animation: grainShift 0.32s steps(2) infinite;
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  width: 540px;
  height: 540px;
  pointer-events: none;
  opacity: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 186, 132, 0.075), transparent 64%);
  transform: translate3d(-50%, -50%, 0);
  transition: opacity 0.8s ease;
  mix-blend-mode: screen;
}

body.has-pointer .cursor-glow {
  opacity: 1;
}

@keyframes grainShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(2%, 2%); }
  100% { transform: translate(-1%, -1%); }
}

/* Shared layout ------------------------------------------------------------ */
.section-wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-right: var(--pad);
  padding-left: var(--pad);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.section-label > span {
  color: var(--gold);
}

.section-label::after {
  content: "";
  flex: 1;
  max-width: 110px;
  height: 1px;
  margin-left: 4px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.19em;
  line-height: 1.4;
}

.eyebrow em {
  color: var(--muted);
  font-family: var(--sans);
  font-style: normal;
  letter-spacing: 0.12em;
}

.eyebrow-line {
  width: 38px;
  height: 1px;
  background: var(--gold);
}

/* Buttons ------------------------------------------------------------------ */
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 1px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1;
  transition:
    color 0.35s var(--ease),
    background 0.35s var(--ease),
    border-color 0.35s var(--ease),
    transform 0.35s var(--ease);
}

.button svg {
  width: 17px;
  height: 17px;
  transition: transform 0.4s var(--ease);
}

.button:hover svg {
  transform: translateX(3px);
}

.button:active {
  transform: translateY(1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.45;
}

.button:disabled:hover {
  transform: none;
}

.button-primary {
  background: var(--paper);
  border-color: var(--paper);
  color: #121116;
}

.button-primary:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

.button-ghost {
  border-color: var(--line-strong);
  color: var(--paper-dim);
  background: rgba(10, 10, 13, 0.18);
}

.button-ghost:hover {
  color: var(--gold-bright);
  border-color: rgba(217, 186, 132, 0.55);
  background: rgba(217, 186, 132, 0.055);
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.text-button svg {
  width: 18px;
  height: 18px;
  transition: transform 0.35s var(--ease);
}

.text-button:hover svg {
  transform: translateX(5px);
}

.text-button span {
  position: relative;
}

.text-button span::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0.35);
  transform-origin: left;
  opacity: 0.5;
  transition: transform 0.4s var(--ease);
}

.text-button:hover span::after {
  transform: scaleX(1);
}

/* Header ------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 86px;
  padding: 0 var(--pad);
  border-bottom: 1px solid transparent;
  transition:
    height 0.45s var(--ease),
    background 0.45s var(--ease),
    border-color 0.45s var(--ease);
}

.site-header.is-scrolled {
  height: 70px;
  border-bottom-color: var(--line);
  background: rgba(9, 9, 12, 0.8);
  -webkit-backdrop-filter: blur(20px) saturate(0.8);
  backdrop-filter: blur(20px) saturate(0.8);
}

.brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  flex-shrink: 0;
}

.brand-seal {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(217, 186, 132, 0.5);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--latin);
  font-size: 20px;
  line-height: 1;
  transition:
    transform 0.7s var(--ease),
    background 0.4s ease,
    color 0.4s ease;
}

.brand:hover .brand-seal {
  transform: rotate(360deg);
  background: var(--gold);
  color: #121116;
}

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

.brand-text strong {
  font-family: var(--latin);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.3em;
  line-height: 1.2;
}

.brand-text small {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.3em;
  line-height: 1.4;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  transition: color 0.3s ease;
}

.nav-link span {
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 1px;
  left: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--paper);
}

.nav-link:hover span,
.nav-link.is-active span {
  color: var(--gold);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-random {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
  transition: color 0.3s ease;
}

.header-random svg {
  width: 14px;
  height: 14px;
}

.header-random:hover {
  color: var(--gold);
}

.library-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 7px 0 13px;
  border: 1px solid var(--line);
  border-radius: 1px;
  color: var(--paper-dim);
  font-size: 10px;
  letter-spacing: 0.06em;
  transition:
    border-color 0.3s ease,
    color 0.3s ease,
    background 0.3s ease;
}

.library-trigger svg {
  width: 13px;
  height: 13px;
}

.library-trigger b {
  display: grid;
  place-items: center;
  min-width: 23px;
  height: 23px;
  padding: 0 5px;
  border-radius: 50%;
  background: rgba(217, 186, 132, 0.11);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
  transition: background 0.3s ease;
}

.library-trigger:hover {
  border-color: rgba(217, 186, 132, 0.45);
  color: var(--paper);
}

.library-trigger:hover b {
  background: var(--gold);
  color: #121116;
}

.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 1px;
}

.menu-toggle span {
  display: block;
  width: 16px;
  height: 1px;
  margin: 4px auto;
  background: var(--paper-dim);
  transition: transform 0.35s var(--ease);
}

.site-header.nav-open .menu-toggle span:first-child {
  transform: translateY(2.5px) rotate(45deg);
}

.site-header.nav-open .menu-toggle span:last-child {
  transform: translateY(-2.5px) rotate(-45deg);
}

/* Hero --------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  padding: 140px var(--pad) 108px;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: #0d1116;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  transform: scale(1.025);
  filter: saturate(0.82) contrast(1.03);
  animation: heroBreathe 24s ease-in-out infinite alternate;
}

.hero-bg-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 8, 11, 0.99) 0%, rgba(8, 8, 11, 0.94) 20%, rgba(8, 8, 11, 0.66) 44%, rgba(8, 8, 11, 0.13) 70%, rgba(8, 8, 11, 0.4) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(9, 9, 12, 0.4) 22%, transparent 48%),
    radial-gradient(circle at 72% 44%, transparent 0%, rgba(0, 0, 0, 0.08) 46%, rgba(0, 0, 0, 0.52) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(270px, 0.72fr);
  align-items: center;
  gap: clamp(32px, 5vw, 100px);
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
}

.hero-copy {
  max-width: 720px;
}

.hero-eyebrow {
  margin-bottom: clamp(22px, 3.5vh, 34px);
}

.hero-title-wrap {
  position: relative;
  width: fit-content;
}

.hero-side-note {
  position: absolute;
  top: 10px;
  left: -46px;
  color: rgba(217, 186, 132, 0.72);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.32em;
  line-height: 1;
  writing-mode: vertical-rl;
}

.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(82px, 10.6vw, 165px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.88;
  text-shadow: 0 18px 70px rgba(0, 0, 0, 0.45);
}

.hero-title > span {
  display: block;
}

.hero-title .hero-title-indent {
  margin-top: 0.14em;
  margin-left: clamp(36px, 6.6vw, 102px);
}

.hero-title em {
  color: transparent;
  font-style: normal;
  background: linear-gradient(105deg, #f3ead8 4%, #d7b77f 48%, #f0dfbf 89%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-jp {
  margin: 21px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.hero-jp span {
  margin: 0 7px;
  color: var(--gold-deep);
}

.hero-lead {
  max-width: 490px;
  margin: 22px 0 0;
  color: var(--paper-dim);
  font-size: 14px;
  letter-spacing: 0.025em;
  line-height: 2;
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.hero-meta i {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--gold-deep);
}

.hero-score {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 4px;
  color: var(--gold);
}

.hero-score svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
  stroke: none;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.hero-fav.is-active {
  color: var(--gold);
  border-color: rgba(217, 186, 132, 0.45);
}

.hero-fav.is-active svg {
  fill: currentColor;
}

.hero-screening {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 27px 0 0;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.pulse-dot {
  position: relative;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(144, 182, 155, 0.5);
  border-radius: 50%;
  animation: pulseRing 2.6s ease-out infinite;
}

.hero-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 540px;
  perspective: 1200px;
}

.hero-poster-halo {
  position: absolute;
  width: 120%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(188, 209, 204, 0.16), rgba(217, 186, 132, 0.06) 40%, transparent 68%);
  filter: blur(22px);
}

.hero-poster-back {
  position: absolute;
  width: clamp(255px, 22.5vw, 352px);
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(217, 186, 132, 0.26);
  background: rgba(11, 12, 14, 0.6);
  transform: rotate(-6.5deg) translate(-14px, 15px);
}

.hero-poster {
  position: relative;
  z-index: 2;
  width: clamp(255px, 22.5vw, 352px);
  margin: 0;
  padding: 9px;
  border: 1px solid rgba(217, 186, 132, 0.4);
  background: #11110f;
  box-shadow: 0 42px 90px rgba(0, 0, 0, 0.62);
  transform: rotate(2.8deg);
  transition: transform 0.9s var(--ease);
}

.hero-poster:hover {
  transform: rotate(0deg) translateY(-8px);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  filter: saturate(0.95);
}

.hero-poster figcaption {
  display: flex;
  justify-content: space-between;
  padding: 9px 2px 1px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.14em;
}

.hero-stamp {
  position: absolute;
  right: 3%;
  bottom: 9%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 1px solid rgba(210, 91, 69, 0.64);
  border-radius: 50%;
  color: var(--red);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.18em;
  line-height: 1.3;
  text-align: center;
  transform: rotate(9deg);
  background: rgba(9, 9, 12, 0.2);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.hero-stamp::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(210, 91, 69, 0.3);
  border-radius: 50%;
}

.hero-stage-caption {
  position: absolute;
  top: 9%;
  right: 0;
  color: rgba(237, 229, 213, 0.38);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.2em;
  line-height: 2;
  text-align: right;
}

.hero-bottom {
  position: absolute;
  right: var(--pad);
  bottom: 28px;
  left: var(--pad);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: calc(var(--max) - var(--pad) * 2);
  margin: 0 auto;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.17em;
  transition: color 0.3s ease;
}

.scroll-cue:hover {
  color: var(--gold);
}

.scroll-line {
  position: relative;
  display: block;
  width: 42px;
  height: 1px;
  overflow: hidden;
  background: var(--line-strong);
}

.scroll-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 1px;
  background: var(--gold);
  animation: scrollHint 2.4s var(--ease) infinite;
}

.hero-stat {
  margin: 0;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.hero-stat span {
  margin: 0 8px;
  color: var(--gold-deep);
}

@keyframes heroBreathe {
  from { transform: scale(1.025); }
  to { transform: scale(1.065); }
}

@keyframes pulseRing {
  0% { transform: scale(0.6); opacity: 0.8; }
  70%, 100% { transform: scale(1.45); opacity: 0; }
}

@keyframes scrollHint {
  0% { transform: translateX(-100%); }
  55%, 100% { transform: translateX(300%); }
}

/* Ticker ------------------------------------------------------------------- */
.genre-ticker {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 48px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(12, 12, 16, 0.72);
}

.ticker-track {
  display: flex;
  flex: none;
  align-items: center;
  gap: 28px;
  width: max-content;
  padding-left: 28px;
  animation: ticker 44s linear infinite;
}

.genre-ticker:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-track span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.19em;
  white-space: nowrap;
}

.ticker-track b {
  color: var(--gold-deep);
  font-size: 7px;
  font-weight: 400;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Intro -------------------------------------------------------------------- */
.intro {
  padding: 132px 0 118px;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: end;
  margin-top: 54px;
}

.intro-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.16;
}

.intro-title em {
  color: var(--gold);
  font-style: normal;
}

.intro-copy {
  padding-left: clamp(24px, 3vw, 40px);
  border-left: 1px solid var(--line);
}

.intro-lead {
  margin: 0 0 20px;
  color: var(--paper);
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.85;
}

.intro-copy > p:not(.intro-lead) {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.025em;
  line-height: 2.1;
}

.intro-signature {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 30px;
}

.intro-signature > span {
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.stamp-small {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(210, 91, 69, 0.58);
  color: var(--red);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-align: center;
  transform: rotate(-7deg);
}

/* Collection --------------------------------------------------------------- */
.collection {
  position: relative;
  padding: 112px 0 130px;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(circle at 82% 2%, rgba(217, 186, 132, 0.045), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent 20%),
    var(--bg);
}

.section-heading {
  margin-bottom: 52px;
}

.heading-row {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.6fr);
  gap: 48px;
  align-items: end;
  margin-top: 35px;
}

.heading-row h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(50px, 5.8vw, 86px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.heading-row h2 > span {
  display: block;
  margin-top: 17px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.15em;
  line-height: 1.6;
}

.heading-aside {
  padding-bottom: 4px;
}

.heading-aside p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 2;
}

.reset-link {
  margin-top: 3px;
  color: var(--muted-dim);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.reset-link svg {
  width: 14px;
  height: 14px;
}

.reset-link:hover {
  color: var(--red);
}

.reset-link:hover svg {
  transform: none;
}

/* Filter deck -------------------------------------------------------------- */
.filter-panel {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(250px, 1.2fr) auto auto;
  gap: 22px;
  align-items: center;
  padding: 17px 0;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  height: 43px;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.35s ease;
}

.search-field:focus-within {
  border-color: rgba(217, 186, 132, 0.58);
}

.search-icon {
  flex: none;
  width: 17px;
  height: 17px;
  color: var(--muted);
  transition: color 0.3s ease;
}

.search-field:focus-within .search-icon {
  color: var(--gold);
}

.search-field input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--paper);
  font-size: 12px;
  letter-spacing: 0.025em;
}

.search-field input::placeholder {
  color: var(--muted-dim);
}

.search-field input::-webkit-search-cancel-button {
  display: none;
}

.search-field kbd {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 9px;
  transition: opacity 0.2s ease;
}

.search-field:focus-within kbd {
  opacity: 0;
}

.search-clear {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(237, 229, 213, 0.06);
  transition:
    color 0.25s ease,
    background 0.25s ease;
}

.search-clear svg {
  width: 11px;
  height: 11px;
}

.search-clear:hover {
  color: var(--paper);
  background: rgba(237, 229, 213, 0.12);
}

.select-group {
  display: flex;
  gap: 7px;
}

.select-wrap {
  position: relative;
  display: block;
}

.select-wrap select {
  height: 38px;
  padding: 0 30px 0 12px;
  border: 1px solid var(--line);
  border-radius: 1px;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(237, 229, 213, 0.022);
  color: var(--paper-dim);
  font-size: 10px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    border-color 0.3s ease,
    color 0.3s ease,
    background 0.3s ease;
}

.select-wrap select:hover {
  border-color: var(--line-strong);
  color: var(--paper);
  background: rgba(237, 229, 213, 0.04);
}

.select-wrap select:focus {
  border-color: rgba(217, 186, 132, 0.55);
}

.select-wrap select option {
  background: #15151a;
  color: var(--paper);
}

.select-wrap > svg {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 13px;
  height: 13px;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.fav-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 10px 0 13px;
  border: 1px solid var(--line);
  border-radius: 1px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition:
    border-color 0.3s ease,
    color 0.3s ease,
    background 0.3s ease;
}

.fav-filter svg {
  width: 14px;
  height: 14px;
}

.fav-filter b {
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  border-radius: 50%;
  background: rgba(237, 229, 213, 0.06);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

.fav-filter:hover {
  color: var(--paper);
  border-color: var(--line-strong);
}

.fav-filter.is-active {
  color: var(--gold);
  border-color: rgba(217, 186, 132, 0.45);
  background: rgba(217, 186, 132, 0.06);
}

.fav-filter.is-active svg {
  fill: currentColor;
}

.fav-filter.is-active b {
  background: var(--gold);
  color: #121116;
}

.mood-row {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.mood-label {
  flex: none;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.15em;
}

.mood-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.mood-pill {
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.05em;
  line-height: 1.2;
  transition:
    color 0.3s ease,
    border-color 0.3s ease,
    background 0.3s ease;
}

.mood-pill:hover {
  color: var(--paper);
  border-color: var(--line);
}

.mood-pill.is-active {
  border-color: rgba(217, 186, 132, 0.36);
  background: rgba(217, 186, 132, 0.09);
  color: var(--gold-bright);
}

.result-count {
  flex: none;
  margin: 0 0 0 auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.07em;
}

.result-count strong {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  vertical-align: -1px;
}

.result-count i {
  margin: 0 4px;
  color: var(--muted-dim);
  font-style: normal;
}

.active-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.active-filters > span:first-child {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

#activeFilterTags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 1px;
  background: rgba(237, 229, 213, 0.025);
  color: var(--paper-dim);
  font-size: 9px;
}

.filter-tag button {
  display: grid;
  place-items: center;
  width: 13px;
  height: 13px;
  color: var(--muted);
}

.filter-tag button:hover {
  color: var(--gold);
}

.filter-tag svg {
  width: 8px;
  height: 8px;
}

#resetFilters {
  margin-left: 5px;
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 0.04em;
}

#resetFilters:hover {
  color: var(--gold-bright);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Card grid ---------------------------------------------------------------- */
.anime-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(30px, 3.4vw, 48px) clamp(14px, 1.5vw, 22px);
  margin-top: 36px;
}

.anime-card {
  position: relative;
  min-width: 0;
  opacity: 0;
  transform: translateY(20px);
}

.anime-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.65s var(--ease),
    transform 0.65s var(--ease);
  transition-delay: calc(var(--i, 0) * 36ms);
}

.card-poster {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(237, 229, 213, 0.14);
  border-radius: 1px;
  background:
    linear-gradient(140deg, rgba(237, 229, 213, 0.05), transparent 38%),
    #121318;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.16);
  transition:
    border-color 0.45s ease,
    box-shadow 0.55s var(--ease),
    transform 0.55s var(--ease);
}

.card-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 4, 7, 0.36) 0%, transparent 26%, transparent 56%, rgba(4, 4, 7, 0.68) 100%),
    linear-gradient(0deg, rgba(4, 4, 7, 0.3), transparent 25%);
  opacity: 0.72;
  transition: opacity 0.4s ease;
}

.card-poster > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 1.1s var(--ease),
    filter 0.55s ease;
}

.anime-card:hover .card-poster {
  border-color: rgba(217, 186, 132, 0.34);
  box-shadow: 0 30px 55px rgba(0, 0, 0, 0.38);
  transform: translateY(-6px);
}

.anime-card:hover .card-poster > img {
  transform: scale(1.045);
  filter: saturate(1.06) brightness(0.88);
}

.anime-card:hover .card-poster::after {
  opacity: 1;
}

.card-index {
  position: absolute;
  top: 12px;
  left: 13px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(247, 240, 226, 0.8);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.card-index::before {
  content: "";
  width: 12px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.card-type {
  position: absolute;
  top: 34px;
  left: 13px;
  z-index: 2;
  color: rgba(247, 240, 226, 0.62);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.card-fav {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(247, 240, 226, 0.2);
  border-radius: 50%;
  background: rgba(7, 7, 10, 0.33);
  color: rgba(247, 240, 226, 0.78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(-3px);
  transition:
    opacity 0.35s ease,
    transform 0.35s var(--ease),
    color 0.3s ease,
    background 0.3s ease;
}

.card-fav svg {
  width: 14px;
  height: 14px;
}

.anime-card:hover .card-fav,
.card-fav:focus-visible,
.card-fav.is-active {
  opacity: 1;
  transform: translateY(0);
}

.card-fav:hover {
  color: var(--paper-bright);
  background: rgba(7, 7, 10, 0.55);
}

.card-fav.is-active {
  color: var(--gold);
  background: rgba(25, 20, 11, 0.68);
  border-color: rgba(217, 186, 132, 0.5);
}

.card-fav.is-active svg {
  fill: currentColor;
}

.card-status {
  position: absolute;
  bottom: 13px;
  left: 13px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(247, 240, 226, 0.16);
  border-radius: 999px;
  background: rgba(7, 7, 10, 0.38);
  color: rgba(247, 240, 226, 0.74);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.06em;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.card-status::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.card-status[data-status="watching"] {
  color: var(--gold-bright);
}

.card-status[data-status="done"] {
  color: var(--green);
}

.card-open {
  position: absolute;
  right: 13px;
  bottom: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid rgba(247, 240, 226, 0.28);
  border-radius: 50%;
  color: var(--paper-bright);
  background: rgba(7, 7, 10, 0.22);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition:
    opacity 0.35s ease,
    transform 0.4s var(--ease),
    background 0.3s ease,
    color 0.3s ease;
}

.card-open svg {
  width: 13px;
  height: 13px;
}

.anime-card:hover .card-open {
  opacity: 1;
  transform: translate(0, 0);
}

.card-open:hover {
  background: var(--paper);
  color: #121116;
}

.card-info {
  padding: 14px 2px 0;
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-title {
  min-width: 0;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(17px, 1.55vw, 21px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.card-title button {
  color: var(--paper);
  font: inherit;
  text-align: left;
  transition: color 0.3s ease;
}

.anime-card:hover .card-title button {
  color: var(--card-accent, var(--gold-bright));
}

.card-score {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  margin-top: 4px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.02em;
}

.card-score svg {
  width: 9px;
  height: 9px;
  fill: currentColor;
  stroke: none;
}

.card-jp {
  overflow: hidden;
  margin: 5px 0 9px;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.card-meta span + span::before {
  content: "·";
  margin-right: 7px;
  color: var(--gold-deep);
}

/* Empty + grid footer ------------------------------------------------------ */
.empty-state {
  padding: 90px 24px;
  margin-top: 36px;
  border: 1px dashed var(--line-strong);
  text-align: center;
}

.empty-mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted-dim);
  font-family: var(--serif);
  font-size: 22px;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
}

.empty-state p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 11px;
}

.grid-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 64px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.grid-footer > span {
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.grid-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.grid-footer .text-button {
  margin-left: auto;
}

/* Journal ------------------------------------------------------------------ */
.journal {
  position: relative;
  padding: 118px 0 132px;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(circle at 16% 10%, rgba(217, 186, 132, 0.04), transparent 28%),
    linear-gradient(180deg, #0a0a0d 0%, #0c0c10 100%);
}

.journal-heading .heading-row {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
}

.journal-heading h2 em {
  color: var(--gold);
  font-style: normal;
}

.journal-heading {
  margin-bottom: 54px;
}

.journal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.96fr) minmax(0, 0.92fr);
  gap: 16px;
  align-items: stretch;
}

.stats-card,
.activity-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 472px;
  padding: 27px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(17, 17, 22, 0.72);
}

.stats-card::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -110px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(217, 186, 132, 0.06);
  border-radius: 50%;
  pointer-events: none;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.15em;
}

.local-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  letter-spacing: 0.08em;
}

.local-badge::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.stats-main {
  display: flex;
  align-items: center;
  gap: clamp(17px, 2.2vw, 34px);
  margin: 25px 0 23px;
}

.progress-ring {
  position: relative;
  flex: none;
  width: clamp(138px, 11vw, 166px);
  aspect-ratio: 1;
}

.progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track,
.ring-fill {
  fill: none;
  stroke-width: 2.4;
}

.ring-track {
  stroke: rgba(237, 229, 213, 0.09);
}

.ring-fill {
  stroke: var(--gold);
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s var(--ease);
  filter: drop-shadow(0 0 4px rgba(217, 186, 132, 0.35));
}

.ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  align-content: center;
  flex-wrap: wrap;
  padding-top: 1px;
}

.ring-label strong {
  color: var(--paper-bright);
  font-family: var(--serif);
  font-size: clamp(37px, 3.2vw, 48px);
  font-weight: 400;
  line-height: 1;
}

.ring-label > span {
  margin-left: 3px;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 9px;
}

.ring-label small {
  flex-basis: 100%;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-align: center;
}

.stats-numbers {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-left: clamp(15px, 2vw, 24px);
  border-left: 1px solid var(--line);
}

.stats-numbers div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.stats-numbers strong {
  color: var(--paper);
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}

.stats-numbers span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.09em;
}

.taste-block {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.taste-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: var(--paper-dim);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.taste-title > span:last-child {
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.taste-bars {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.taste-row {
  display: grid;
  grid-template-columns: 48px 1fr 17px;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 9px;
}

.taste-track {
  height: 2px;
  overflow: hidden;
  background: rgba(237, 229, 213, 0.07);
}

.taste-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  transition: width 1s var(--ease);
}

.taste-value {
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 7px;
  text-align: right;
}

.taste-empty {
  margin: 0;
  color: var(--muted-dim);
  font-size: 9px;
  line-height: 1.9;
}

.activity-card h3 {
  margin: 22px 0 7px;
  font-family: var(--serif);
  font-size: clamp(28px, 2.6vw, 36px);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.activity-list {
  flex: 1;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.activity-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.activity-button {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  background: transparent;
  transition: background 0.25s ease;
}

.activity-button:hover {
  background: rgba(237, 229, 213, 0.025);
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-thumb {
  width: 42px;
  height: 56px;
  object-fit: cover;
  border: 1px solid var(--line);
  filter: saturate(0.86);
}

.activity-body {
  display: block;
  min-width: 0;
}

.activity-title {
  display: block;
  overflow: hidden;
  color: var(--paper-dim);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-action {
  display: block;
  margin-top: 2px;
  color: var(--muted-dim);
  font-size: 8px;
  letter-spacing: 0.05em;
}

.activity-action b {
  color: var(--gold);
  font-weight: 400;
}

.activity-time {
  align-self: start;
  margin-top: 3px;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 7px;
  white-space: nowrap;
}

.activity-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 190px;
  padding: 20px;
  border: 1px dashed var(--line);
  color: var(--muted-dim);
  text-align: center;
}

.activity-empty span {
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 26px;
}

.activity-empty p {
  margin: 8px 0 0;
  font-size: 9px;
  line-height: 1.8;
}

.activity-foot {
  margin: 14px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted-dim);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.note-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 472px;
  padding: 25px 25px 20px;
  overflow: hidden;
  border: 1px solid #d3c6b1;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.16), transparent 35%),
    #e9dfcc;
  color: #1b1a19;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.23);
}

.note-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 48px;
  width: 1px;
  background: rgba(210, 91, 69, 0.16);
  pointer-events: none;
}

.note-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #847867;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.note-card > label {
  display: block;
  margin: 26px 0 7px;
  color: #201d19;
  font-family: var(--serif);
  font-size: clamp(23px, 2.1vw, 29px);
  letter-spacing: -0.02em;
}

.note-card textarea {
  flex: 1;
  width: 100%;
  min-height: 225px;
  padding: 0;
  border: 0;
  outline: 0;
  resize: none;
  background-color: transparent;
  background-image: repeating-linear-gradient(
    transparent 0,
    transparent 31px,
    rgba(65, 56, 43, 0.11) 31px,
    rgba(65, 56, 43, 0.11) 32px
  );
  color: #2a2722;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.02em;
  line-height: 32px;
}

.note-card textarea::placeholder {
  color: #978b78;
}

.note-card:focus-within {
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.3);
}

.note-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  padding-top: 10px;
  border-top: 1px solid rgba(45, 38, 29, 0.15);
  color: #847867;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.05em;
}

#noteStatus.is-saving {
  color: #a45b47;
}

.note-stamp {
  position: absolute;
  right: 20px;
  bottom: 52px;
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border: 1px solid rgba(174, 58, 45, 0.44);
  color: rgba(174, 58, 45, 0.74);
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-align: center;
  transform: rotate(-7deg);
  pointer-events: none;
}

/* Closing ------------------------------------------------------------------ */
.closing {
  position: relative;
  padding: 148px 0 156px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 115%, rgba(217, 186, 132, 0.08), transparent 44%),
    #09090c;
  text-align: center;
}

.closing-word {
  position: absolute;
  top: 50%;
  left: 50%;
  color: rgba(237, 229, 213, 0.023);
  font-family: var(--latin);
  font-size: clamp(120px, 27vw, 430px);
  letter-spacing: 0.12em;
  line-height: 1;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  user-select: none;
}

.closing-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

.closing .section-label {
  justify-content: center;
}

.closing .section-label::after {
  display: none;
}

.closing h2 {
  margin: 31px 0 0;
  font-family: var(--serif);
  font-size: clamp(44px, 5.2vw, 76px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.26;
}

.closing h2 em {
  color: var(--gold);
  font-style: normal;
}

.closing-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
}

/* Footer ------------------------------------------------------------------- */
.site-footer {
  padding: 0 var(--pad);
  border-top: 1px solid var(--line);
  background: #08080a;
}

.footer-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 0 26px;
}

.footer-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 36px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.footer-brand .brand-seal {
  width: 32px;
  height: 32px;
  font-size: 17px;
}

.footer-brand > div {
  display: flex;
  flex-direction: column;
}

.footer-brand strong {
  font-family: var(--latin);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.3em;
}

.footer-brand span {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.27em;
}

.footer-main > p {
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.05em;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.footer-bottom kbd {
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
}

/* Modals ------------------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}

.modal.is-open {
  visibility: visible;
  opacity: 1;
}

.modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 6, 0.84);
  -webkit-backdrop-filter: blur(17px) saturate(0.75);
  backdrop-filter: blur(17px) saturate(0.75);
}

.modal-close {
  position: absolute;
  top: 19px;
  right: 19px;
  z-index: 12;
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(10, 10, 13, 0.65);
  color: var(--paper-dim);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition:
    color 0.3s ease,
    border-color 0.3s ease,
    background 0.3s ease,
    transform 0.4s var(--ease);
}

.modal-close svg {
  width: 15px;
  height: 15px;
}

.modal-close:hover {
  color: #121116;
  border-color: var(--paper);
  background: var(--paper);
  transform: rotate(90deg);
}

/* Detail ------------------------------------------------------------------- */
.detail-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  width: min(1210px, 100%);
  height: min(850px, calc(100svh - 48px));
  max-height: calc(100svh - 48px);
  overflow: hidden;
  border: 1px solid rgba(217, 186, 132, 0.22);
  background: #0d0d10;
  box-shadow: 0 50px 130px rgba(0, 0, 0, 0.65);
  opacity: 0;
  transform: translateY(24px) scale(0.985);
  transition:
    opacity 0.5s var(--ease),
    transform 0.6s var(--ease);
}

.modal.is-open .detail-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.detail-visual {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #08080a;
}

.detail-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.74) brightness(0.62);
  transform: scale(1.04);
}

.detail-visual-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 10, 13, 0.12) 0%, rgba(10, 10, 13, 0.4) 58%, #0d0d10 100%),
    linear-gradient(0deg, rgba(6, 6, 8, 0.8) 0%, transparent 48%);
}

.detail-poster {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 61%;
  padding: 6px;
  border: 1px solid rgba(217, 186, 132, 0.38);
  background: #12110e;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -50%) rotate(-1.2deg);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-visual-meta {
  position: absolute;
  right: 24px;
  bottom: 22px;
  left: 26px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(237, 229, 213, 0.52);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.detail-content {
  position: relative;
  overflow-y: auto;
  padding: 53px 50px 36px;
  scrollbar-width: thin;
  scrollbar-color: rgba(217, 186, 132, 0.32) transparent;
}

.detail-content::-webkit-scrollbar {
  width: 5px;
}

.detail-content::-webkit-scrollbar-thumb {
  background: rgba(217, 186, 132, 0.28);
}

.detail-content::-webkit-scrollbar-track {
  background: transparent;
}

.detail-eyebrow {
  margin: 0;
  padding-right: 42px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.15em;
  line-height: 1.6;
  text-transform: uppercase;
}

.detail-content h2 {
  margin: 10px 0 6px;
  font-family: var(--serif);
  font-size: clamp(40px, 4.2vw, 62px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.detail-jp {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  line-height: 1.7;
}

.detail-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 17px 0 0;
}

.detail-badges span {
  padding: 4px 9px;
  border: 1px solid var(--line);
  color: var(--paper-dim);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.detail-badges span:first-child {
  color: var(--gold);
  border-color: rgba(217, 186, 132, 0.32);
}

.detail-tagline {
  margin: 22px 0 12px;
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.01em;
  line-height: 1.7;
}

.detail-synopsis {
  margin: 0;
  max-width: 580px;
  color: var(--paper-dim);
  font-size: 12px;
  line-height: 2;
}

.detail-note {
  position: relative;
  margin: 23px 0;
  padding: 14px 18px 15px;
  border-left: 1px solid var(--gold-deep);
  background: rgba(237, 229, 213, 0.035);
}

.detail-note > span {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.16em;
}

.detail-note p {
  margin: 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.85;
}

.detail-personal {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-top: 25px;
}

.control-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.13em;
}

.status-group {
  display: inline-flex;
  border: 1px solid var(--line);
}

.status-group button {
  padding: 7px 11px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.3;
  transition:
    color 0.25s ease,
    background 0.25s ease;
}

.status-group button:last-child {
  border-right: 0;
}

.status-group button:hover {
  color: var(--paper);
}

.status-group button.is-active {
  background: var(--paper);
  color: #121116;
}

.star-rating {
  display: flex;
  gap: 1px;
}

.star-rating button {
  color: rgba(237, 229, 213, 0.17);
  font-family: var(--latin);
  font-size: 22px;
  line-height: 1;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.star-rating button:hover,
.star-rating button.is-active {
  color: var(--gold);
}

.star-rating button:hover {
  transform: translateY(-2px);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 24px 0 27px;
}

.detail-actions .button {
  min-height: 44px;
  padding: 0 18px;
  font-size: 10px;
}

#detailFav.is-active {
  border-color: rgba(217, 186, 132, 0.45);
  background: rgba(217, 186, 132, 0.09);
  color: var(--gold);
}

#detailFav.is-active svg {
  fill: currentColor;
}

.detail-tech {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

.detail-tech div {
  min-width: 0;
}

.detail-tech dt {
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.12em;
}

.detail-tech dd {
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--paper-dim);
  font-size: 9px;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Random pick -------------------------------------------------------------- */
.random-panel {
  position: relative;
  width: min(510px, 100%);
  padding: 28px 30px 27px;
  overflow: hidden;
  border: 1px solid rgba(217, 186, 132, 0.27);
  background:
    radial-gradient(circle at 50% 23%, rgba(217, 186, 132, 0.08), transparent 38%),
    #0e0e12;
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.67);
  text-align: center;
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  transition:
    opacity 0.45s var(--ease),
    transform 0.55s var(--ease);
}

.modal.is-open .random-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.random-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-right: 35px;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.12em;
  text-align: left;
}

.random-head span:first-child {
  color: var(--gold);
}

.random-panel h2 {
  margin: 13px 0 18px;
  font-family: var(--serif);
  font-size: clamp(30px, 3.3vw, 41px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.random-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(206px, 60vw);
  aspect-ratio: 3 / 4;
  margin: 0 auto;
}

.random-glow {
  position: absolute;
  inset: -48%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 186, 132, 0.13), transparent 58%);
  filter: blur(16px);
}

.random-poster-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 6px;
  border: 1px solid rgba(217, 186, 132, 0.4);
  background: #11110e;
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.54);
  transform: rotate(-1.5deg);
  transition: transform 0.5s var(--ease);
}

.random-poster-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition:
    filter 0.3s ease,
    opacity 0.2s ease;
}

.random-stage.is-rolling .random-poster-wrap {
  animation: randomShake 0.16s linear infinite;
}

.random-stage.is-rolling .random-poster-wrap img {
  filter: blur(1.6px) saturate(1.3) brightness(0.82);
}

.random-stage.is-revealed .random-poster-wrap {
  animation: revealCard 0.8s var(--ease) both;
}

.random-scan {
  position: absolute;
  top: 0;
  right: -28%;
  left: -28%;
  z-index: 2;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(236, 211, 163, 0.8), transparent);
  opacity: 0;
  pointer-events: none;
}

.random-stage.is-rolling .random-scan {
  opacity: 1;
  animation: scanDown 0.75s linear infinite;
}

.random-result {
  min-height: 74px;
  margin-top: 17px;
}

.random-result h3 {
  margin: 0;
  color: var(--paper-bright);
  font-family: var(--serif);
  font-size: clamp(25px, 2.6vw, 32px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.random-result p {
  margin: 5px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.07em;
}

.random-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.random-actions .button {
  min-height: 43px;
  padding: 0 18px;
  font-size: 10px;
}

@keyframes randomShake {
  0% { transform: rotate(-1.5deg) translate(0, 0); }
  25% { transform: rotate(-0.4deg) translate(1px, -1px); }
  50% { transform: rotate(-2.2deg) translate(-1px, 1px); }
  75% { transform: rotate(-0.8deg) translate(1px, 1px); }
  100% { transform: rotate(-1.5deg) translate(0, 0); }
}

@keyframes revealCard {
  0% { transform: rotate(-4deg) scale(0.92); filter: brightness(1.4); }
  55% { transform: rotate(1deg) scale(1.025); }
  100% { transform: rotate(-1.5deg) scale(1); filter: brightness(1); }
}

@keyframes scanDown {
  from { top: 0; }
  to { top: 100%; }
}

/* Library drawer ----------------------------------------------------------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 110;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}

.drawer.is-open {
  visibility: visible;
  opacity: 1;
}

.drawer-scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 6, 0.72);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(478px, 100%);
  height: 100%;
  padding: 33px 28px 23px;
  overflow: hidden;
  border-left: 1px solid rgba(217, 186, 132, 0.18);
  background:
    radial-gradient(circle at 80% 0%, rgba(217, 186, 132, 0.055), transparent 28%),
    #0e0e12;
  box-shadow: -30px 0 100px rgba(0, 0, 0, 0.45);
  transform: translateX(102%);
  transition: transform 0.58s var(--ease);
}

.drawer.is-open .drawer-panel {
  transform: translateX(0);
}

.drawer-head {
  position: relative;
  padding-right: 55px;
}

.drawer-kicker {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.15em;
}

.drawer-head h2 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.drawer-close {
  top: 0;
  right: 0;
}

.library-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 24px 0 0;
  padding: 17px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.library-summary div {
  min-width: 0;
}

.library-summary strong {
  display: block;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
}

.library-summary span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.library-tabs {
  display: flex;
  gap: 1px;
  margin-top: 15px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

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

.library-tabs button {
  position: relative;
  flex: none;
  padding: 9px 11px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.library-tabs button::after {
  content: "";
  position: absolute;
  right: 9px;
  bottom: -1px;
  left: 9px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.35s var(--ease);
}

.library-tabs button b {
  margin-left: 3px;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 400;
}

.library-tabs button:hover {
  color: var(--paper-dim);
}

.library-tabs button.is-active {
  color: var(--paper);
}

.library-tabs button.is-active b {
  color: var(--gold);
}

.library-tabs button.is-active::after {
  transform: scaleX(1);
}

.library-list {
  flex: 1;
  overflow-y: auto;
  margin: 6px -7px 0;
  padding: 2px 7px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(217, 186, 132, 0.25) transparent;
}

.library-list::-webkit-scrollbar {
  width: 4px;
}

.library-list::-webkit-scrollbar-thumb {
  background: rgba(217, 186, 132, 0.25);
}

.library-item {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 27px;
  gap: 12px;
  align-items: center;
  padding: 10px 6px;
  border-bottom: 1px solid var(--line);
  transition: background 0.25s ease;
}

.library-item:hover {
  background: rgba(237, 229, 213, 0.025);
}

.library-open {
  display: grid;
  grid-column: 1 / 3;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  text-align: left;
}

.library-thumb {
  width: 50px;
  height: 67px;
  object-fit: cover;
  border: 1px solid var(--line);
  filter: saturate(0.8);
}

.library-info {
  display: block;
  min-width: 0;
}

.library-title {
  display: block;
  overflow: hidden;
  color: var(--paper-dim);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-open:hover .library-title {
  color: var(--gold-bright);
}

.library-meta {
  display: block;
  margin-top: 3px;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.03em;
}

.library-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  color: var(--gold);
  font-size: 8px;
}

.library-badge::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.library-remove {
  display: grid;
  place-items: center;
  grid-column: 3;
  grid-row: 1;
  width: 26px;
  height: 26px;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--muted-dim);
  transition:
    color 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.library-remove svg {
  width: 11px;
  height: 11px;
}

.library-remove:hover {
  color: var(--red);
  border-color: rgba(210, 91, 69, 0.35);
  background: rgba(210, 91, 69, 0.06);
}

.library-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 230px;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.library-empty span {
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 36px;
}

.library-empty h3 {
  margin: 11px 0 5px;
  color: var(--paper-dim);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
}

.library-empty p {
  margin: 0;
  font-size: 9px;
  line-height: 1.8;
}

.drawer-foot {
  flex: none;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.drawer-foot .button {
  width: 100%;
  min-height: 44px;
  font-size: 10px;
}

.drawer-foot p {
  margin: 9px 0 0;
  color: var(--muted-dim);
  font-size: 7px;
  letter-spacing: 0.03em;
  text-align: center;
}

/* Toast -------------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 27px;
  left: 50%;
  z-index: 140;
  max-width: calc(100vw - 32px);
  padding: 11px 18px;
  border: 1px solid var(--line-strong);
  border-left: 2px solid var(--gold);
  background: rgba(17, 17, 22, 0.94);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
  color: var(--paper-dim);
  font-size: 10px;
  letter-spacing: 0.03em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 15px);
  transition:
    opacity 0.35s ease,
    transform 0.4s var(--ease);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.noscript {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 400;
  padding: 16px;
  border: 1px solid var(--gold);
  background: #111116;
  color: var(--paper);
  font-size: 12px;
  text-align: center;
}

/* Responsive --------------------------------------------------------------- */
@media (max-width: 1280px) {
  .anime-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .journal-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  }

  .note-card {
    grid-column: 1 / -1;
    min-height: 320px;
  }

  .note-card textarea {
    min-height: 150px;
  }

  .toolbar {
    grid-template-columns: minmax(220px, 1fr) auto;
  }

  .toolbar .select-group {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .toolbar .fav-filter {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 1060px) {
  .site-nav {
    gap: 20px;
  }

  .header-random {
    display: none;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.65fr);
    gap: 24px;
  }

  .hero-stage {
    min-height: 450px;
  }

  .hero-poster,
  .hero-poster-back {
    width: clamp(235px, 26vw, 310px);
  }

  .hero-stamp {
    right: -1%;
    bottom: 5%;
  }

  .heading-row,
  .journal-heading .heading-row {
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.6fr);
    gap: 30px;
  }

  .detail-content {
    padding: 48px 36px 31px;
  }

  .detail-panel {
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  }
}

@media (max-width: 900px) {
  :root {
    --pad: clamp(20px, 4.8vw, 42px);
  }

  .site-header {
    height: 74px;
  }

  .site-header.is-scrolled {
    height: 64px;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: var(--pad);
    left: var(--pad);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 9px 17px;
    border: 1px solid var(--line);
    background: rgba(13, 13, 17, 0.97);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
  }

  .site-header.nav-open .site-nav {
    display: flex;
  }

  .nav-link {
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
  }

  .nav-link:last-child {
    border-bottom: 0;
  }

  .nav-link::after {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 92svh;
    padding-top: 128px;
    padding-bottom: 90px;
  }

  .hero-inner {
    display: block;
  }

  .hero-copy {
    max-width: 690px;
  }

  .hero-stage {
    display: none;
  }

  .hero-title {
    font-size: clamp(84px, 15vw, 140px);
  }

  .hero-title .hero-title-indent {
    margin-left: clamp(36px, 11vw, 110px);
  }

  .hero-side-note {
    left: -34px;
    font-size: 9px;
  }

  .hero-bg-wash {
    background:
      linear-gradient(90deg, rgba(8, 8, 11, 0.97) 0%, rgba(8, 8, 11, 0.78) 48%, rgba(8, 8, 11, 0.35) 100%),
      linear-gradient(0deg, var(--bg) 0%, rgba(9, 9, 12, 0.35) 25%, transparent 62%),
      radial-gradient(circle at 72% 44%, transparent 0%, rgba(0, 0, 0, 0.32) 100%);
  }

  .hero-bg img {
    object-position: 62% center;
    opacity: 0.82;
  }

  .intro {
    padding: 100px 0 95px;
  }

  .intro-grid {
    grid-template-columns: 1fr;
    gap: 38px;
    align-items: start;
    margin-top: 40px;
  }

  .intro-copy {
    max-width: 620px;
  }

  .collection,
  .journal {
    padding-top: 95px;
    padding-bottom: 100px;
  }

  .heading-row,
  .journal-heading .heading-row {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .heading-aside {
    max-width: 500px;
  }

  .toolbar {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 15px 0;
  }

  .toolbar .select-group,
  .toolbar .fav-filter {
    grid-column: auto;
    grid-row: auto;
  }

  .toolbar .select-group {
    flex-wrap: wrap;
  }

  .toolbar .fav-filter {
    width: fit-content;
  }

  .mood-row {
    flex-wrap: wrap;
    gap: 12px 18px;
  }

  .mood-label {
    flex-basis: 100%;
  }

  .result-count {
    margin-left: auto;
  }

  .grid-footer {
    flex-wrap: wrap;
  }

  .grid-footer .text-button {
    width: 100%;
    margin-top: 2px;
    margin-left: 0;
  }

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

  .stats-card,
  .activity-card,
  .note-card {
    min-height: 0;
  }

  .note-card {
    grid-column: auto;
    min-height: 390px;
  }

  .note-card textarea {
    min-height: 190px;
  }

  .activity-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
  }

  .activity-item:nth-last-child(2) {
    border-bottom: 0;
  }

  .modal {
    padding: 0;
  }

  .detail-panel {
    width: 100%;
    height: 100svh;
    max-height: 100svh;
    grid-template-columns: 1fr;
    grid-template-rows: 250px minmax(0, 1fr);
    border: 0;
  }

  .detail-visual-wash {
    background:
      linear-gradient(0deg, #0d0d10 0%, rgba(13, 13, 16, 0.22) 55%, rgba(13, 13, 16, 0.12) 100%),
      linear-gradient(90deg, rgba(13, 13, 16, 0.2), transparent 60%);
  }

  .detail-backdrop {
    filter: saturate(0.8) brightness(0.7);
  }

  .detail-poster {
    top: auto;
    bottom: -79px;
    left: 24px;
    width: 112px;
    transform: rotate(-1deg);
  }

  .detail-visual-meta {
    display: none;
  }

  .detail-content {
    padding: 59px 24px 38px;
  }

  .detail-content h2 {
    font-size: clamp(38px, 7vw, 54px);
  }

  .detail-tagline {
    margin-top: 18px;
    font-size: 18px;
  }

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

  .random-panel {
    width: min(500px, calc(100% - 28px));
    max-height: calc(100svh - 28px);
    overflow-y: auto;
    padding: 25px 22px 22px;
  }

  .random-stage {
    width: min(176px, 52vw);
  }

  .drawer-panel {
    width: min(460px, 100%);
  }

  .footer-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .footer-bottom {
    line-height: 1.8;
  }
}

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

@media (max-width: 620px) {
  .brand-text small {
    display: none;
  }

  .brand-text strong {
    font-size: 13px;
  }

  .library-trigger {
    padding-left: 10px;
  }

  .library-trigger span {
    display: none;
  }

  .header-actions {
    gap: 6px;
  }

  .hero {
    min-height: 88svh;
    padding-top: 116px;
    padding-bottom: 82px;
  }

  .hero-eyebrow {
    font-size: 8px;
    letter-spacing: 0.12em;
  }

  .hero-eyebrow em {
    display: none;
  }

  .eyebrow-line {
    width: 24px;
  }

  .hero-side-note {
    top: 4px;
    left: -24px;
    font-size: 8px;
  }

  .hero-title {
    font-size: clamp(64px, 19vw, 106px);
    letter-spacing: -0.055em;
  }

  .hero-title .hero-title-indent {
    margin-left: clamp(25px, 8vw, 50px);
  }

  .hero-jp {
    margin-top: 17px;
    font-size: 8px;
  }

  .hero-lead {
    margin-top: 17px;
    font-size: 12px;
    line-height: 1.95;
  }

  .hero-meta {
    gap: 8px;
    margin-top: 19px;
    font-size: 8px;
  }

  .hero-score {
    margin-left: 0;
  }

  .hero-actions {
    gap: 8px;
    margin-top: 25px;
  }

  .hero-actions .button {
    min-height: 45px;
    padding: 0 16px;
    font-size: 10px;
  }

  .hero-actions .button svg {
    width: 15px;
    height: 15px;
  }

  .hero-screening {
    margin-top: 21px;
    font-size: 7px;
  }

  .hero-bottom {
    bottom: 20px;
  }

  .scroll-cue {
    font-size: 6px;
  }

  .hero-stat {
    font-size: 6px;
  }

  .hero-stat span {
    margin: 0 4px;
  }

  .intro {
    padding: 84px 0 82px;
  }

  .section-label {
    font-size: 8px;
  }

  .intro-title {
    font-size: clamp(42px, 11.5vw, 62px);
  }

  .intro-copy {
    padding-left: 18px;
  }

  .intro-lead {
    font-size: 17px;
  }

  .intro-copy > p:not(.intro-lead) {
    font-size: 11px;
  }

  .collection,
  .journal {
    padding-top: 80px;
    padding-bottom: 86px;
  }

  .section-heading {
    margin-bottom: 37px;
  }

  .heading-row {
    margin-top: 23px;
  }

  .heading-row h2 {
    font-size: clamp(42px, 12vw, 62px);
  }

  .heading-row h2 > span {
    margin-top: 12px;
    font-size: 10px;
  }

  .heading-aside p {
    font-size: 10px;
  }

  .anime-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 12px;
    margin-top: 26px;
  }

  .card-poster {
    border-color: rgba(237, 229, 213, 0.11);
  }

  .card-index {
    top: 9px;
    left: 9px;
    font-size: 7px;
  }

  .card-type {
    top: 27px;
    left: 9px;
    font-size: 6px;
  }

  .card-fav {
    top: 7px;
    right: 7px;
    width: 30px;
    height: 30px;
  }

  .card-fav svg {
    width: 12px;
    height: 12px;
  }

  .card-status {
    bottom: 9px;
    left: 9px;
    padding: 3px 6px;
    font-size: 6px;
  }

  .card-open {
    display: none;
  }

  .card-info {
    padding-top: 11px;
  }

  .card-title {
    font-size: 16px;
    line-height: 1.35;
  }

  .card-score {
    margin-top: 3px;
    font-size: 7px;
  }

  .card-score svg {
    width: 8px;
    height: 8px;
  }

  .card-jp {
    margin: 4px 0 7px;
    font-size: 6px;
  }

  .card-meta {
    gap: 4px;
    font-size: 7px;
  }

  .card-meta span + span::before {
    margin-right: 4px;
  }

  .card-meta span:nth-child(3) {
    display: none;
  }

  .toolbar .select-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .select-wrap select {
    width: 100%;
  }

  .mood-row {
    padding: 13px 0;
  }

  .mood-pills {
    gap: 1px;
  }

  .mood-pill {
    padding: 5px 9px;
    font-size: 9px;
  }

  .result-count {
    font-size: 8px;
  }

  .result-count strong {
    font-size: 17px;
  }

  .active-filters {
    align-items: flex-start;
  }

  .grid-footer {
    margin-top: 46px;
    gap: 10px;
  }

  .grid-footer > span {
    display: none;
  }

  .grid-footer p {
    font-size: 9px;
  }

  .stats-main {
    justify-content: flex-start;
    gap: 20px;
  }

  .progress-ring {
    width: 132px;
  }

  .stats-numbers {
    gap: 11px;
    padding-left: 16px;
  }

  .stats-numbers strong {
    font-size: 21px;
  }

  .activity-list {
    display: block;
  }

  .activity-item:nth-last-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .note-card {
    min-height: 360px;
  }

  .note-card textarea {
    min-height: 170px;
  }

  .closing {
    padding: 108px 0 112px;
  }

  .closing h2 {
    font-size: clamp(30px, 8.4vw, 42px);
    line-height: 1.35;
  }

  .closing-actions {
    margin-top: 31px;
  }

  .closing-actions .button {
    min-height: 45px;
    padding: 0 16px;
    font-size: 10px;
  }

  .footer-inner {
    padding-top: 37px;
  }

  .footer-main {
    padding-bottom: 27px;
  }

  .footer-main > p {
    font-size: 13px;
  }

  .footer-bottom {
    gap: 7px 15px;
    font-size: 6px;
  }

  .footer-bottom span:last-child {
    display: none;
  }

  .detail-panel {
    grid-template-rows: 215px minmax(0, 1fr);
  }

  .detail-poster {
    bottom: -65px;
    left: 18px;
    width: 95px;
  }

  .detail-content {
    padding: 51px 19px 30px;
  }

  .detail-eyebrow {
    font-size: 7px;
  }

  .detail-content h2 {
    font-size: 36px;
    letter-spacing: -0.04em;
  }

  .detail-badges {
    margin-top: 13px;
  }

  .detail-badges span {
    padding: 3px 7px;
    font-size: 7px;
  }

  .detail-tagline {
    margin: 16px 0 9px;
    font-size: 16px;
  }

  .detail-synopsis {
    font-size: 11px;
    line-height: 1.9;
  }

  .detail-note {
    margin: 18px 0;
    padding: 12px 14px;
  }

  .detail-note p {
    font-size: 13px;
  }

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

  .status-group {
    width: 100%;
  }

  .status-group button {
    flex: 1;
    padding: 7px 4px;
    font-size: 8px;
  }

  .star-rating button {
    font-size: 24px;
  }

  .detail-actions {
    margin: 20px 0 23px;
  }

  .detail-actions .button {
    flex: 1;
    min-height: 43px;
    padding: 0 10px;
    font-size: 9px;
  }

  .random-panel {
    padding: 23px 17px 19px;
  }

  .random-head {
    font-size: 6px;
  }

  .random-panel h2 {
    margin: 11px 0 15px;
    font-size: 30px;
  }

  .random-stage {
    width: min(160px, 48vw);
  }

  .random-result {
    min-height: 67px;
    margin-top: 14px;
  }

  .random-result h3 {
    font-size: 24px;
  }

  .random-actions .button {
    padding: 0 12px;
    font-size: 9px;
  }

  .drawer-panel {
    padding: 26px 18px 18px;
  }

  .drawer-head h2 {
    font-size: 34px;
  }

  .library-summary {
    margin-top: 18px;
    padding: 14px 0;
  }

  .library-summary strong {
    font-size: 23px;
  }

  .library-tabs button {
    padding: 8px 8px;
    font-size: 9px;
  }

  .toast {
    bottom: 16px;
    font-size: 9px;
  }
}

@media (max-width: 380px) {
  .anime-grid {
    gap: 24px 10px;
  }

  .card-title {
    font-size: 15px;
  }

  .card-meta span:nth-child(2) {
    display: none;
  }

  .hero-title {
    font-size: 61px;
  }

  .hero-actions .button {
    padding: 0 12px;
  }

  .hero-actions .button span {
    font-size: 9px;
  }
}

/* Motion preferences ------------------------------------------------------- */
@media (hover: none) {
  .card-fav {
    opacity: 1;
    transform: none;
  }

  .card-open {
    display: none;
  }

  .anime-card:hover .card-poster {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .anime-card {
    opacity: 1;
    transform: none;
  }
}
