/* ===== fonts.css ===== */
/* Keep faces lean — unused weights were downloading on every visit (PSI). */

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/poppins-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/poppins-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/poppins-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/poppins-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Comfortaa';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/comfortaa-cyr-600.woff2') format('woff2'),
    url('/fonts/comfortaa-600.woff2') format('woff2');
  unicode-range: U+0400-04FF, U+0500-052F, U+2DE0-2DFF, U+A640-A69F;
}

@font-face {
  font-family: 'Comfortaa';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/comfortaa-600.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: 'Comfortaa';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/comfortaa-cyr-700.woff2') format('woff2'),
    url('/fonts/comfortaa-700.woff2') format('woff2');
  unicode-range: U+0400-04FF, U+0500-052F, U+2DE0-2DFF, U+A640-A69F;
}

@font-face {
  font-family: 'Comfortaa';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/comfortaa-700.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: 'Jura';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/jura-cyr-700.woff2') format('woff2'),
    url('/fonts/jura-700.woff2') format('woff2');
  unicode-range: U+0400-04FF, U+0500-052F, U+2DE0-2DFF, U+A640-A69F;
}

@font-face {
  font-family: 'Jura';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/jura-700.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;
}

/* ===== index.css ===== */
:root {
  --bg: #18181b;
  --surface: #27272a;
  --surface-2: #2c2c30;
  --surface-3: #232326;
  --surface-hover: #323232;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.12);
  --accent: #cc1c39;
  --accent-hover: #a51935;
  --accent-glow: #5f0625;
  --accent-soft: rgba(204, 28, 57, 0.18);
  --accent-ring: rgba(204, 28, 57, 0.45);
  --rose: #fecdd3;
  --rose-strong: #fca5a5;
  --max: min(1080px, 100%);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --space-page: clamp(1.15rem, 2.5vw, 2rem);
  --pad-x: clamp(0.85rem, 2.8vw, 1.75rem);

  --font-display: 'Comfortaa', system-ui, sans-serif;
  --font-eyebrow: 'Jura', 'Comfortaa', system-ui, sans-serif;
  --font-body: 'Poppins', 'Comfortaa', system-ui, sans-serif;
  --card-bg: linear-gradient(160deg, #2c2c30 0%, #27272a 55%, #232326 100%);
  color-scheme: dark;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

html,
body {
  min-height: 100%;
  max-width: 100%;
}

html {
  overflow-x: clip;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

#root {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  min-height: 0;
}

vsc-controller,
.vsc-controller {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

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

video {
  max-width: 100%;
}

/* Keep aspect in browser-native video fullscreen (ultrawide). */
video:fullscreen,
video:-webkit-full-screen {
  object-fit: contain !important;
  object-position: center center !important;
  width: 100% !important;
  height: 100% !important;
  background: #000;
}

button,
input,
select,
textarea {
  font: inherit;
  max-width: 100%;
}

.app-shell {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  min-height: 0;
}

.app-main {
  flex: 1;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.page-wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  box-sizing: border-box;
  min-width: 0;
}

/* Critical anime layout — keep in blocking CSS so /anime/* is not a left column + void
   while AnimePage.css is still on the wire (slow nets / deferred sheets). */
.anime-page__layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 2rem 2.25rem;
  align-items: start;
}

.anime-page__aside {
  display: grid;
  gap: 0.65rem;
  width: 180px;
  max-width: 100%;
}

.anime-page__info {
  min-width: 0;
}

.anime-page__poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--card-bg);
}

@media (max-width: 720px) {
  .anime-page__layout {
    grid-template-columns: 1fr;
  }

  .anime-page__aside {
    width: min(180px, 42vw);
  }
}


.page {
  padding-top: var(--space-page);
  padding-bottom: 3rem;
}

.page__head {
  margin-bottom: 1.35rem;
}

.page__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.2vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.page__lead {
  margin: 0.55rem 0 0;
  color: var(--muted);
  max-width: 48ch;
  font-size: 0.95rem;
}

.search {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.search__field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.search__field:focus-within {
  border-color: var(--accent-ring);
  background: rgba(204, 28, 57, 0.06);
  color: var(--rose);
}

.search__field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0.85rem 0;
  font: inherit;
  font-size: 1rem;
  outline: none;
}

.section {
  margin-top: 2.35rem;
}

.section:first-of-type {
  margin-top: 0;
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 1.2rem;
  min-width: 0;
}

.section__title {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.section__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.85rem 0.42rem 0.95rem;
  border: 1px solid rgba(204, 28, 57, 0.5);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: none;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.section__link::after {
  content: '';
  width: 0.38rem;
  height: 0.38rem;
  border-right: 1.7px solid currentColor;
  border-top: 1.7px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.9;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.section__link:hover {
  color: #fff;
  text-decoration: none;
  border-color: rgba(204, 28, 57, 0.85);
  background: rgba(204, 28, 57, 0.1);
  box-shadow: none;
  transform: translateY(-1px);
}

.section__link:hover::after {
  transform: rotate(45deg) translate(1px, -1px);
  opacity: 1;
}

.section__link:active {
  transform: translateY(0);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    color 0.22s ease;
}

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

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--primary {
  background: rgba(204, 28, 57, 0.22);
  border-color: rgba(204, 28, 57, 0.35);
  color: #fff;
  box-shadow: 0 6px 18px rgba(204, 28, 57, 0.16);
}

.btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 8px 22px rgba(204, 28, 57, 0.3);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--text);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-strong);
}

.btn--soft {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--muted);
}

.btn--soft:hover,
.btn--soft.is-on {
  color: #fff;
  border-color: var(--accent-ring);
  background: rgba(204, 28, 57, 0.16);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 0.35rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.chip:hover {
  border-color: var(--accent-ring);
  background: rgba(204, 28, 57, 0.1);
}

.chip.is-active {
  border-color: rgba(204, 28, 57, 0.55);
  background: rgba(204, 28, 57, 0.22);
  color: #fff;
}

.chip__meta {
  color: var(--muted);
  font-size: 0.72rem;
}

.chip.is-active .chip__meta {
  color: rgba(255, 255, 255, 0.72);
}

.state-msg {
  color: var(--muted);
  padding: 2rem 0;
}

.state-msg--error {
  color: var(--rose-strong);
}

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

@media (max-width: 640px) {
  .search {
    flex-direction: column;
  }

  .search__input {
    min-height: 2.75rem;
    font-size: 16px; 
  }

  .search .btn {
    min-height: 2.75rem;
    width: 100%;
  }
}

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

/* ===== Header.css ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(1.2);
  background: rgba(24, 24, 27, 0.72);
  border-bottom: 1px solid var(--line);
  width: 100%;
  max-width: 100%;
}

html[data-page='admin'] .header {
  display: none !important;
}

.header__inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem var(--pad-x, 1.75rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem 1.25rem;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
  justify-self: start;
}

.header__mark {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.4rem;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(204, 28, 57, 0.22);
}

.header__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  line-height: 1;
}

.header__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: clamp(0.45rem, 1.2vw, 1.15rem);
  min-width: 0;
  flex: none;
  max-width: 100%;
}

.header__nav-mobile {
  display: none !important;
}

.header__nav a {
  position: relative;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.header__nav a:hover,
.header__nav a.active {
  color: var(--text);
}

.header__nav a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.55rem;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.header__auth {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 2.15rem;
  padding: 0.35rem 0.95rem !important;
  border: 1px solid rgba(204, 28, 57, 0.55) !important;
  border-radius: 999px;
  background: transparent !important;
  color: #fff !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  font-size: 0.84rem !important;
  letter-spacing: 0.05em;
  text-decoration: none !important;
  box-shadow: none !important;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    color 0.2s ease;
}

.header__auth:hover {
  color: #fff !important;
  border-color: rgba(204, 28, 57, 0.85) !important;
  background: rgba(204, 28, 57, 0.12) !important;
  box-shadow: none !important;
  transform: translateY(-1px);
}

.header__auth:active {
  transform: translateY(0);
}

.header__user {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
}

.header__user img {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  object-fit: cover;
}

.header__tools {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  justify-self: end;
  margin-left: 0;
}

.header__tools-link {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.header__tools-link:hover,
.header__tools-link.active {
  color: var(--text);
}

.header__tools-name {
  max-width: 11rem;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.header__tools-name .uname {
  max-width: 11rem;
  overflow: visible;
  text-overflow: ellipsis;
  vertical-align: bottom;
}


.header__account {
  position: relative;
  z-index: 90;
}

.header__account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  cursor: pointer;
  padding: 0.2rem 0.15rem;
  border-radius: 999px;
}

.header__account-trigger img {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.12);
}

.header__account-fallback {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(145deg, #2a2a2e, #141416);
  color: #e4e4e7;
  font-size: 0.85rem;
  font-weight: 700;
}

.header__account-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(228, 228, 231, 0.55);
  margin-left: 0.05rem;
  transition: transform 0.2s ease;
}

.header__account.is-open .header__account-caret,
.header__account:hover .header__account-caret {
  transform: rotate(180deg);
}

.header__account-menu {
  position: absolute;
  top: 100%;
  right: 0;
  padding-top: 0.65rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.22s ease;
}

.header__account:hover .header__account-menu,
.header__account.is-open .header__account-menu,
.header__account-menu--portal {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.header__account-menu--portal {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  /* Invisible hit-area bridge over the gap to the trigger */
  padding-top: 12px;
  margin-top: -10px;
  z-index: 220;
}

.header__account-menu--portal .header__account-panel {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.header__account-panel {
  width: 14.75rem;
  min-width: 14.75rem;
  padding: 0.7rem 0.55rem 0.4rem;
  display: grid;
  gap: 0.5rem;
  border-radius: var(--radius, 14px);

  background:
    radial-gradient(ellipse 85% 65% at 100% 0%, rgba(204, 28, 57, 0.1), transparent 55%),
    linear-gradient(165deg, var(--surface-2) 0%, var(--surface) 48%, var(--surface-3) 100%);
  border: 1px solid var(--line-strong, var(--line));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.22),
    0 22px 52px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(12px) saturate(1.05);
}

.header__account-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.05rem 0.3rem 0.05rem;
}

.header__account-ava-wrap {
  position: relative;
  flex-shrink: 0;
  width: 2.55rem;
  height: 2.55rem;
}

.header__account-ava {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
  display: block;
}

.header__account-ava--f {
  display: inline-grid;
  place-items: center;
  background: linear-gradient(145deg, var(--surface-2), var(--bg));
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  font-family: var(--font-display);
}

.header__account-lvl-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #18181b;
  border: 1.5px solid rgba(167, 139, 250, 0.65);
  color: #e9d5ff;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.15rem;
  text-align: center;
  box-shadow: 0 0 0 2px var(--surface-3);
}

.header__account-meta {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 0.12rem;
  align-content: center;
}

.header__account-name-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.header__account-name {
  flex: 1 1 auto;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fafafa;
  overflow: hidden;
  min-width: 0;
}

.header__account-name .uname-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  max-width: 100%;
  min-width: 0;
}

.header__account-name .uname {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header__account-name .premium-badge,
.header__account-premium {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.header__account-role {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  max-width: 7.5rem;
  padding: 0.14rem 0.45rem 0.14rem 0.32rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #d4d4d8;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header__account-role-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  flex-shrink: 0;
}

.header__account-role-ico .k-emoji,
.header__account-role-ico svg {
  width: 0.72rem;
  height: 0.72rem;
  display: block;
}

.header__account-role--admin,
.header__account-role.role-badge--admin {
  color: #fecdd3;
  background: rgba(225, 29, 72, 0.16);
  border-color: transparent;
}

.header__account-role--mod,
.header__account-role.role-badge--mod {
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.14);
  border-color: rgba(14, 165, 233, 0.28);
}

.header__account-role--banned,
.header__account-role.role-badge--banned {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.28);
}

.header__account-role--user {
  color: #a1a1aa;
}

.header__account-sub {
  font-size: 0.74rem;
  font-weight: 500;
  color: #71717a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header__account-level {
  margin: 0 0.2rem;
  padding: 0.7rem 0.8rem 0.75rem;
  border-radius: var(--radius-sm, 10px);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  display: grid;
  gap: 0.5rem;
}

.header__account-level-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem;
  align-items: center;
}

.header__account-level-shield {
  position: relative;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  color: #a1a1aa;
}

.header__account-level-shield em {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 800;
  color: #e4e4e7;
  padding-top: 0.1rem;
}

.header__account-level-text strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #f4f4f5;
}

.header__account-level-text span,
.header__account-level-right span {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.7rem;
  color: #a1a1aa;
  font-weight: 500;
}

.header__account-level-right {
  text-align: right;
}

.header__account-level-right strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #f4f4f5;
}

.header__account-level-bar {
  height: 0.38rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.header__account-level-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #64748b, #94a3b8 70%, #cbd5e1);
}

.header__account-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  padding: 0.2rem 0.25rem 0.35rem;
  text-align: center;
}

.header__account-stats span {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: #71717a;
  text-transform: uppercase;
}

.header__account-stats strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: #fafafa;
}

.header__account-list {
  display: grid;
  gap: 0.02rem;
  padding: 0;
  max-height: min(52vh, 22rem);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.header__account-foot {
  padding-top: 0.15rem;
  border-top: 1px solid var(--line);
}

.account-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  box-sizing: border-box;
  border: 0;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text);
  padding: 0.52rem 0.6rem;
  border-radius: var(--radius-sm, 10px);
  background: transparent;
  transition:
    background 0.16s ease,
    color 0.16s ease;
}

.account-item:hover {
  background: var(--accent-soft);
  color: #fff;
}

.account-item__ico {
  flex-shrink: 0;
  width: 1.2rem;
  height: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.account-item:hover .account-item__ico {
  color: var(--rose);
}

.account-item__ico svg {
  display: block;
}

.account-item__ico--out {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 8px;
  background: rgba(204, 28, 57, 0.14);
  color: #f87171;
}

.account-item__label {
  min-width: 0;
}

.account-item--logout {
  color: #f87171;
  font-weight: 650;
  margin-top: 0.05rem;
}

.account-item--logout:hover {
  color: #fecaca;
  background: rgba(204, 28, 57, 0.12);
}

.account-item--logout:hover .account-item__ico--out {
  color: #fecaca;
  background: rgba(204, 28, 57, 0.22);
}


.account-chip {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 0;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: transparent;
}

.account-chip:hover {
  background: rgba(255, 255, 255, 0.06);
}

.account-chip--logout {
  color: rgba(255, 255, 255, 0.72);
}


.notif-bell {
  position: relative;
}

.notif-bell__btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}

.notif-bell.is-open .notif-bell__btn,
.notif-bell__btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.notif-bell__badge {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.05rem;
  text-align: center;
}

.notif-bell__drop {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 80;
  width: 22rem;
  max-width: min(22rem, calc(100vw - 1.5rem));
  max-height: min(70vh, 26rem);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--line-strong, var(--line));
  border-radius: var(--radius, 14px);
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(204, 28, 57, 0.07), transparent 50%),
    linear-gradient(165deg, var(--surface-2) 0%, var(--surface) 55%, var(--surface-3) 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.22),
    0 18px 48px rgba(0, 0, 0, 0.45);
}

.notif-bell__drop--portal {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  z-index: 220;
}

.notif-bell__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
}

.notif-bell__head strong {
  font-size: 0.9rem;
}

.notif-bell__read-all {
  border: 0;
  background: transparent;
  color: var(--rose-strong);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
}

.notif-bell__read-all:disabled {
  opacity: 0.4;
  cursor: default;
}

.notif-bell__list {
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  overflow: auto;
}

.notif-bell__item {
  width: 100%;
  display: grid;
  gap: 0.2rem;
  text-align: left;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0.65rem 0.7rem;
  cursor: pointer;
}

.notif-bell__item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.notif-bell__item.is-unread {
  background: rgba(204, 28, 57, 0.1);
}

.notif-bell__title {
  font-size: 0.86rem;
  font-weight: 600;
}

.notif-bell__body {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-bell__item time {
  color: var(--muted);
  font-size: 0.72rem;
}

.notif-bell__empty {
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1rem 0.85rem;
}

.header__burger {
  display: none;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
}

.header__burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.header__burger.is-open span:first-child {
  transform: translateY(5px) rotate(45deg);
}

.header__burger.is-open span:last-child {
  transform: translateY(-5px) rotate(-45deg);
}

@media (max-width: 1100px) {
  .header__nav a {
    font-size: 0.78rem;
  }
}

@media (max-width: 980px) {
  .header__tools-name {
    display: none;
  }

  .header__tools {
    gap: 0.75rem;
  }
}


@media (max-width: 1024px) {
  .header__burger {
    display: flex;
  }

  .header__inner {
    display: flex;
    gap: 0.85rem;
    padding: 0.85rem var(--pad-x, 1.1rem);
    padding-top: max(0.85rem, env(safe-area-inset-top, 0px));
    min-height: 3.6rem;
  }

  .header.is-nav-open {
    z-index: 200;
  }

  .header__nav {
    display: none !important;
  }

  .header__nav-portal {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 220;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    height: 100dvh;
    margin: 0;
    padding: 0;
    background: rgba(18, 18, 20, 0.98);
    border: 0;
    box-shadow: none;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .header__nav-portal.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .header__nav-portal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-shrink: 0;
    min-height: 3.6rem;
    padding:
      max(0.85rem, env(safe-area-inset-top, 0px))
      var(--pad-x, 1.15rem)
      0.85rem;
    border-bottom: 1px solid var(--line);
  }

  .header__nav-portal-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: var(--text);
  }

  .header__nav-portal-close {
    appearance: none;
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #f4f4f5;
    font: inherit;
    font-size: 1.65rem;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .header__nav-portal-close:hover,
  .header__nav-portal-close:active {
    background: rgba(204, 28, 57, 0.22);
    border-color: rgba(204, 28, 57, 0.45);
    color: #fff;
  }

  .header__nav-portal-links {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding:
      0.35rem
      var(--pad-x, 1.15rem)
      calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }

  .header__inner {
    position: relative;
    z-index: 150;
  }

  .header__nav-portal a {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 1.05rem 0.15rem;
    min-height: 3.15rem;
    border-bottom: 1px solid var(--line);
    white-space: normal;
    color: var(--muted);
    text-decoration: none;
  }

  .header__nav-portal a:last-child {
    border-bottom: 0;
  }

  .header__nav-portal a.active::after {
    display: none;
  }

  .header__nav-portal a.active,
  .header__nav-portal a:hover {
    color: var(--text);
  }

  .header__tools {
    margin-left: auto;
    gap: 0.55rem;
    min-width: 0;
  }

  .header__auth {
    min-height: 2.55rem;
    font-size: 0.88rem !important;
    padding: 0.45rem 1.05rem !important;
  }
}

@media (max-width: 720px) {
  .header__mark {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.42rem;
  }

  .header__name {
    font-size: 1.2rem;
    letter-spacing: 0.12em;
  }

  .header__account-trigger {
    min-height: 2.75rem;
    padding: 0.25rem 0.15rem;
  }

  .header__account-trigger img,
  .header__account-fallback {
    width: 34px;
    height: 34px;
  }

  .header__account-fallback {
    font-size: 0.85rem;
  }

  .header__account-caret {
    border-left-width: 4.5px;
    border-right-width: 4.5px;
    border-top-width: 5px;
  }

  .notif-bell__btn {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
  }

  .notif-bell__btn svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  .header__burger {
    width: 2.75rem;
    height: 2.75rem;
  }

  .header__burger span {
    width: 1.35rem;
  }

  .header__burger.is-open span:first-child {
    transform: translateY(0.4rem) rotate(45deg);
  }

  .header__burger.is-open span:last-child {
    transform: translateY(-0.4rem) rotate(-45deg);
  }

  .header__account-panel {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

/* ===== AnimeCard.css ===== */
.anime-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  max-width: 100%;
}

.anime-card__media {
  position: relative;
  aspect-ratio: 2 / 3;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card-bg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  transition:
    box-shadow 0.25s ease,
    border-color 0.25s ease;
  contain: layout paint;
}

.anime-card:hover .anime-card__media {
  border-color: var(--accent-ring);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.3);
}

.anime-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
}

.anime-card__score {
  position: absolute;
  left: 0.55rem;
  bottom: 0.55rem;
  font-family: var(--font-eyebrow);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(204, 28, 57, 0.9);
  color: #fff;
  max-width: calc(100% - 1rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.anime-card__rating {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-xs);
  background: rgba(24, 24, 27, 0.82);
  color: #fbbf24;
}

.anime-card__meta {
  min-width: 0;
}

.anime-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.anime-card__info {
  margin: 0.3rem 0 0;
  font-size: 0.76rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== AnimeGrid.css ===== */
.anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1.4rem 1rem;
  width: 100%;
  min-width: 0;
  align-items: start;
  justify-items: stretch;
}

.anime-grid__empty {
  color: var(--muted);
  text-align: center;
  padding: 3rem 1rem;
}

.anime-card--skel {
  pointer-events: none;
}

.anime-card--skel .anime-card__media {
  animation: none;
  background: rgba(255, 255, 255, 0.06);
}

.anime-card__skel-line {
  height: 0.85rem;
  margin-top: 0.35rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  width: 88%;
}

.anime-card__skel-line--short {
  width: 55%;
  margin-top: 0.4rem;
}

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

@media (min-width: 900px) {
  .anime-grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 1.65rem 1.2rem;
  }
}

/* ===== Home.css ===== */
.home .page__title {
  letter-spacing: 0.12em;
}

.home .search {
  margin-bottom: 1rem;
}

.home__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 2rem;
}

.home__links .chip {
  cursor: pointer;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
  font: inherit;
}

.home__links .chip:hover,
.home__links a.chip:hover {
  border-color: var(--accent-ring);
  background: rgba(204, 28, 57, 0.12);
  color: var(--rose);
}

.home__links button.chip:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ===== Search.css ===== */
.search__field--suggest {
  position: relative;
}

.search__suggest {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 0.15rem;
  max-height: min(52vh, 360px);
  overflow: auto;
  padding: 0.4rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

.search__suggest-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-xs);
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s ease;
}

.search__suggest-item:hover {
  background: rgba(204, 28, 57, 0.18);
}

.search__suggest-item img {
  flex-shrink: 0;
  width: 36px;
  height: 52px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--surface);
}

.search__suggest-item span {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.search__suggest-item strong {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: anywhere;
}

@media (max-width: 480px) {
  .search__suggest-item strong {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

.search__suggest-item small {
  color: var(--muted);
  font-size: 0.78rem;
}

.search__suggest-empty {
  margin: 0;
  padding: 0.75rem 0.65rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.search__suggest-more {
  width: 100%;
  margin-top: 0.15rem;
  padding: 0.65rem 0.7rem;
  border: 0;
  border-radius: var(--radius-xs);
  background: rgba(204, 28, 57, 0.14);
  color: var(--rose);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.search__suggest-more:hover {
  background: rgba(204, 28, 57, 0.24);
}

/* ===== mobile.css ===== */


:root {
  --pad-x: clamp(0.85rem, 2.8vw, 1.75rem);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --touch-min: 44px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  touch-action: manipulation;
}

body {
  padding-bottom: var(--safe-bottom);
  overflow-x: clip;
  touch-action: manipulation;
  overscroll-behavior-y: contain;
}

.page-wrap {
  padding-left: max(var(--pad-x), env(safe-area-inset-left, 0px));
  padding-right: max(var(--pad-x), env(safe-area-inset-right, 0px));
}

button,
a,
.chip,
.btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}


@media (pointer: coarse) {
  .anime-card:hover .anime-card__media {
    transform: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  }

  .anime-card:hover .anime-card__media img {
    transform: none;
  }

  .btn,
  .chip,
  .anime-page__tab,
  .anime-page__cinema-btn,
  .anime-page__vote,
  .player__dd-btn,
  .kage-video__btn,
  .lists__tab,
  .catalog__menu-btn {
    min-height: var(--touch-min);
  }
}


@media (max-width: 1024px) {
  :root {
    --radius: 12px;
    --radius-sm: 9px;
  }

  .page {
    padding-bottom: calc(2.25rem + var(--safe-bottom));
  }
}


@media (max-width: 820px) {
  .site-bg__blur {
    display: none;
  }

  .site-bg__grid {
    display: none;
  }

  .header,
  .kage-video__bar,
  .kage-video__vol-hud,
  .kage-video__tap-hint,
  .player-prefs {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Compact menus: no blur. Full-screen sheets keep blur via their own rules. */
  .player__dd-menu {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .player.is-menu .player__dd-menu,
  .player__dd-menu--sheet,
  .kage-video__menu--sheet {
    backdrop-filter: blur(16px) saturate(1.1) !important;
    -webkit-backdrop-filter: blur(16px) saturate(1.1) !important;
  }

  .kage-video__menu:not(.kage-video__menu--sheet) {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .site-bg__grid {
    opacity: 0.35;
    background-size: 48px 48px;
  }

  .anime-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 0.75rem;
  }

  .anime-card {
    gap: 0.5rem;
    animation: none;
    min-width: 0;
  }

  .anime-card__title {
    font-size: 0.86rem;
  }

  .anime-card__info {
    font-size: 0.72rem;
  }

  .anime-card__media {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
  }

  .footer__inner {
    padding-top: 1.75rem;
    padding-bottom: calc(1.15rem + var(--safe-bottom));
  }

  .catalog__panel {
    padding: 0.85rem;
  }

  .catalog__quick {
    gap: 0.4rem;
  }

  .chip {
    padding: 0.45rem 0.75rem;
  }

  .anime-page {
    padding-top: 0.75rem;
    padding-bottom: calc(1.75rem + var(--safe-bottom));
  }

  .anime-page__crumbs {
    margin-bottom: 0.75rem;
  }


  .anime-page__watch {
    margin: 1rem calc(-1 * var(--pad-x)) 0.85rem;
    max-width: none;
    width: calc(100% + 2 * var(--pad-x));
  }

  .anime-page.is-minimal .anime-page__watch {
    margin-top: 0.55rem;
  }

  .anime-page__tab {
    min-height: 2.15rem;
    padding: 0.35rem 0.45rem;
    font-size: 0.7rem;
  }

  .anime-page__sources .anime-page__tab {
    min-height: 2.1rem;
    padding: 0.3rem 0.25rem;
  }

  .anime-page__watch-bar {
    margin-top: 0.55rem;
    padding: 0 var(--pad-x);
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .anime-page__cinema-btn {
    min-height: 2.4rem;
    padding: 0.4rem 1rem;
    font-size: 0.78rem;
  }

  .anime-page__vote {
    min-height: 2.4rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
  }

  .anime-page__votes {
    gap: 0.35rem;
  }

  .anime-page__order-list {
    grid-template-columns: 1fr;
  }

  .player {
    border-radius: 0;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.06);
    max-width: 100%;
  }

  .player__viewport,
  .player__stage {
    max-width: 100%;
  }

  .player__top {
    padding: 0.45rem max(0.75rem, var(--pad-x, 0.85rem)) 1.4rem;
    max-width: 100%;
  }

  .player__selects {
    max-width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.3rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

  .player.is-menu .player__selects {
    overflow: visible !important;
  }

  .player.is-menu {
    overflow: visible;
  }

  .player.is-menu .player__dd-menu {
    z-index: 150;
    max-height: min(62dvh, 420px);
  }

  /* Portrait: full-screen menus (sheet class also portals — keep fallback) */
  .player.is-menu .player__dd-menu:not(.player__dd-menu--sheet),
  html[data-page='anime'] .player.is-menu .player__dd-menu:not(.player__dd-menu--sheet) {
    position: fixed !important;
    inset: 0 !important;
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    max-height: none !important;
    height: 100% !important;
    z-index: 320 !important;
    animation: none !important;
    border-radius: 0 !important;
    border: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding:
      max(2.25rem, calc(env(safe-area-inset-top, 0px) + 1.75rem))
      max(1.75rem, calc(env(safe-area-inset-right, 0px) + 1.35rem))
      max(2.25rem, calc(env(safe-area-inset-bottom, 0px) + 1.75rem))
      max(1.75rem, calc(env(safe-area-inset-left, 0px) + 1.35rem));
    background: rgba(18, 18, 22, 0.72) !important;
    backdrop-filter: blur(16px) saturate(1.1) !important;
    -webkit-backdrop-filter: blur(16px) saturate(1.1) !important;
    box-shadow: none !important;
  }

  .player.is-menu .player__dd-menu-head {
    padding: 0.45rem 0.2rem 0.65rem;
  }

  .player.is-menu .player__dd-menu-title {
    font-size: 1rem;
    text-transform: none;
    letter-spacing: 0.02em;
    color: #f4f4f5;
  }

  .player.is-menu .player__dd-menu-close {
    display: inline-flex !important;
    width: 2.35rem;
    height: 2.35rem;
    font-size: 1.45rem;
  }

  .player.is-menu .player__dd-scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
  }

  html[data-page='anime'] .player.is-menu .player__dd-menu--wide .player__dd-scroll,
  html[data-page='anime'] .player.is-menu .player__dd-menu:not(.player__dd-menu--list) .player__dd-scroll,
  .player.is-menu .player__dd-menu--wide .player__dd-scroll,
  .player.is-menu .player__dd-menu:not(.player__dd-menu--list) .player__dd-scroll {
    display: flex;
    flex-direction: column;
    align-content: flex-start;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.25rem;
    padding: 0.45rem;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  html[data-page='anime'] .player.is-menu .player__dd-menu--wide .player__dd-item,
  html[data-page='anime'] .player.is-menu .player__dd-menu:not(.player__dd-menu--list) .player__dd-item,
  .player.is-menu .player__dd-menu--wide .player__dd-item,
  .player.is-menu .player__dd-menu:not(.player__dd-menu--list) .player__dd-item {
    flex: 0 0 auto;
    min-height: 2.75rem;
    height: auto;
    align-self: stretch;
    border-radius: 10px;
  }

  html[data-page='anime'] .player.is-menu .player__dd-menu--list .player__dd-scroll,
  .player.is-menu .player__dd-menu--list .player__dd-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
    align-content: start;
    align-items: stretch;
    gap: 0.3rem;
    padding: 0.45rem;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  html[data-page='anime'] .player.is-menu .player__dd-menu--list .player__dd-item,
  .player.is-menu .player__dd-menu--list .player__dd-item {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: 2.55rem;
    height: auto;
    align-self: start;
    padding: 0.4rem 0.35rem;
    border-radius: 10px;
    text-align: center;
  }

  html[data-page='anime'] .player.is-menu .player__dd-menu--list .player__dd-item-main,
  .player.is-menu .player__dd-menu--list .player__dd-item-main {
    align-items: center;
  }

  html[data-page='anime'] .player.is-menu .player__dd-menu--list .player__ep-word,
  .player.is-menu .player__dd-menu--list .player__ep-word {
    display: none;
  }

  html[data-page='anime'] .player.is-menu .player__dd-menu--list .player__ep-num,
  .player.is-menu .player__dd-menu--list .player__ep-num {
    font-size: 0.95rem;
    font-weight: 800;
  }

  .anime-page__watch:has(.player.is-menu) {
    z-index: 260;
  }

  .anime-page__watch:has(.player.is-menu) .anime-page__toolbar,
  .anime-page__watch:has(.player.is-menu) .anime-page__toolbar-end {
    z-index: 0 !important;
  }

  .anime-page__watch:has(.player.is-menu) .player {
    position: relative;
    z-index: 20;
  }

  .player.is-menu .player__dd-scroll {
    max-height: min(58dvh, 390px);
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .player.is-menu .player__dd-scroll .player__dd-item {
    touch-action: pan-y;
  }

  .player__selects::-webkit-scrollbar {
    display: none;
  }

  .player__dd-btn {
    min-height: 2.35rem;
    padding: 0.38rem 0.5rem 0.38rem 0.6rem;
    font-size: 0.72rem;
    max-width: min(9rem, 42vw);
  }

  .player__side,
  .player__side--prev,
  .player__side--next {
    display: none !important;
  }

  .player__age {
    font-size: 0.68rem;
    padding: 0.28rem 0.45rem;
  }

  .kage-video__dock {
    bottom: 0 !important;
    padding: 0.45rem 0.5rem 0.4rem !important;
    transform: none !important;
  }

  .kage-video.is-ui .kage-video__dock {
    transform: none !important;
  }

  .kage-video__bar {
    gap: 0.05rem;
    min-height: 2.4rem;
    flex-wrap: nowrap;
    max-width: 100%;
  }

  .kage-video__btn {
    width: 2.45rem;
    height: 2.45rem;
    flex-shrink: 0;
  }

  .kage-video__time {
    font-size: 0.7rem;
    letter-spacing: -0.01em;
    flex-shrink: 1;
    min-width: 0;
  }

  .kage-video__title {
    display: none;
  }

  .kage-video__vol .kage-video__range {
    display: none !important;
  }

  .kage-video__seek {
    height: 22px;
    margin-bottom: 0.1rem;
  }

  .kage-video__seek:hover {
    height: 22px;
  }

  .kage-video__track {
    height: 3px;
  }

  .kage-video__thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  .player:fullscreen .kage-video__dock,
  .player:-webkit-full-screen .kage-video__dock {
    padding-bottom: max(0.4rem, var(--safe-bottom)) !important;
  }

  .kage-video__bigplay {
    width: 3.5rem;
    height: 3.5rem;
    box-shadow:
      0 0 0 5px rgba(204, 28, 57, 0.14),
      0 10px 22px rgba(0, 0, 0, 0.4);
  }

  .kage-video__tip-video,
  .kage-video__tip-time {
    display: none !important;
  }

  .lists__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem 0.6rem;
  }

  .history__row,
  .history__meta,
  .history__link {
    min-width: 0;
  }

  .settings-head,
  .account-layout,
  .auth-card,
  .auth-shell,
  .profile-page,
  .profile-hero {
    min-width: 0;
    max-width: 100%;
  }
}


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

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

  .lists__tabs {
    gap: 0.35rem;
  }

  .lists__tab {
    font-size: 0.8rem;
    padding: 0.4rem 0.7rem;
  }

  .catalog__pager {
    flex-wrap: wrap;
    gap: 0.65rem;
  }

  .catalog__panel-actions {
    width: 100%;
  }

  .catalog__panel-actions .btn {
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 0;
  }

  .home__links {
    gap: 0.4rem;
  }

  .section__link {
    font-size: 0.76rem;
    padding: 0.38rem 0.7rem 0.38rem 0.8rem;
  }

  .search__suggest {
    left: 0;
    right: 0;
    width: auto;
    max-width: 100%;
  }
}


@media (max-width: 480px) {
  .anime-grid {
    gap: 0.85rem 0.55rem;
  }

  .anime-page__fav .btn,
  .btn--fav {
    font-size: 0.82rem;
    padding: 0.55rem 0.65rem;
  }

  .player__dd-btn {
    max-width: min(6.6rem, 38vw);
  }

  .kage-video__vol .kage-video__range {
    display: none !important;
  }

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

  .minimal-fab--float .minimal-fab__text {
    max-width: 7.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .page__lead {
    max-width: none;
  }
}


@media (max-width: 374px) {
  .anime-grid {
    gap: 0.75rem 0.45rem;
  }

  .anime-card__title {
    font-size: 0.8rem;
  }

  .anime-card__rating,
  .anime-card__score {
    font-size: 0.62rem;
    padding: 0.15rem 0.32rem;
  }

  .player__dd-btn {
    max-width: min(5.5rem, 34vw);
    font-size: 0.68rem;
    padding: 0.32rem 0.4rem;
  }

  .kage-video__btn {
    width: 2.2rem;
    height: 2.2rem;
  }

  .kage-video__time {
    font-size: 0.64rem;
  }

  .section__head {
    gap: 0.5rem;
  }

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

  .footer__col--info {
    grid-column: auto;
  }

  .anime-page__layout {
    grid-template-columns: 100px minmax(0, 1fr) !important;
    gap: 0.75rem 0.65rem !important;
  }
}


@media (max-width: 900px) and (orientation: landscape) {
  .header__inner {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }

  .anime-page__watch {
    margin-top: 0.85rem;
  }

  .kage-video__dock {
    padding-bottom: 0.4rem;
  }

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


/* Phone landscape: short height, often width > 720px — use max-height */
@media (orientation: landscape) and (max-height: 540px) {
  :root {
    --pad-x: 0.65rem;
  }

  .header__inner {
    min-height: 2.35rem;
    padding-top: max(0.25rem, env(safe-area-inset-top, 0px));
    padding-bottom: 0.25rem;
    gap: 0.45rem;
  }

  .header__name {
    font-size: 0.95rem;
  }

  .header__mark {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 0.4rem;
  }

  .header__tools {
    gap: 0.35rem;
  }

  .header__account-trigger,
  .header__burger {
    width: 2.15rem;
    height: 2.15rem;
  }

  /* Dock eats vertical space — hide; header burger covers nav */
  .mobile-dock {
    display: none !important;
  }

  .app-main {
    padding-bottom: 0.75rem !important;
  }

  .footer {
    display: none !important;
  }

  .page {
    padding-bottom: 0.75rem;
  }

  .anime-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.65rem 0.55rem;
  }

  /* Compact anime page — center the 16:9 stage, do not pin it to the top */
  html[data-page='anime'] .header {
    position: sticky;
    top: 0;
    z-index: 90;
  }

  html[data-page='anime'] .site-bg {
    opacity: 0.25;
  }

  html[data-page='anime'] .anime-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100svh - 2.6rem);
    min-height: calc(100dvh - 2.6rem);
    padding-top: 0;
    padding-bottom: 0;
  }

  html[data-page='anime'] .anime-page__crumbs {
    display: none !important;
  }

  html[data-page='anime'] .anime-page__layout,
  html[data-page='anime'] .anime-page__minimal-cover {
    display: none !important;
  }

  html[data-page='anime'] .anime-page__watch {
    margin: 0 auto !important;
    width: 100% !important;
    max-width: none !important;
  }

  html[data-page='anime'] .player {
    max-height: calc(100svh - 2.6rem);
    max-height: calc(100dvh - 2.6rem);
    margin-inline: auto;
  }

  html[data-page='anime'] .player__viewport {
    aspect-ratio: 16 / 9;
    width: min(100%, calc((100svh - 2.6rem) * 16 / 9));
    width: min(100%, calc((100dvh - 2.6rem) * 16 / 9));
    max-height: calc(100svh - 2.6rem);
    max-height: calc(100dvh - 2.6rem);
    height: auto;
    margin-inline: auto;
  }

  html[data-page='anime'] .player__stage,
  html[data-page='anime'] .kage-video {
    width: 100%;
    height: 100%;
  }

  html[data-page='anime'] .anime-page__player-loading {
    min-height: min(52dvh, 240px);
  }

  html[data-page='anime'] .anime-page__toolbar {
    margin-bottom: 0.35rem;
    gap: 0.35rem;
  }

  html[data-page='anime'] .anime-page__watch-bar {
    margin-top: 0.4rem;
    gap: 0.4rem;
  }

  html[data-page='anime'] .countdown {
    margin: 0.25rem auto 0.45rem;
    gap: 0.3rem;
  }

  html[data-page='anime'] .countdown__label {
    font-size: 0.62rem;
    letter-spacing: 0.06em;
  }

  html[data-page='anime'] .countdown__digits {
    gap: 0.45rem 0.75rem;
  }

  html[data-page='anime'] .countdown__digits div {
    min-width: 2.4rem;
  }

  html[data-page='anime'] .countdown__digits strong {
    font-size: 1.15rem;
  }

  html[data-page='anime'] .player__top {
    padding: 0.35rem 0.55rem;
    gap: 0.35rem;
  }

  html[data-page='anime'] .player__dd-btn {
    min-height: 2rem;
    max-width: min(8.5rem, 28vw);
    font-size: 0.7rem;
    padding: 0.28rem 0.45rem 0.28rem 0.55rem;
  }

  html[data-page='anime'] .player__speed-btn {
    min-height: 2rem;
    min-width: 2.2rem;
    font-size: 0.72rem;
  }

  html[data-page='anime'] .player__side {
    display: none !important;
  }

  html[data-page='anime'] .player__play-btn {
    width: 3.5rem;
    height: 3.5rem;
  }

  html[data-page='anime'] .player__resume {
    max-width: min(22rem, 70vw);
    padding: 0.55rem 0.75rem;
    font-size: 0.78rem;
  }

  html[data-page='anime'] .kage-video__dock {
    padding: 0.4rem 0.65rem max(0.35rem, env(safe-area-inset-bottom, 0px));
  }

  html[data-page='anime'] .kage-video__btn {
    width: 2.15rem;
    height: 2.15rem;
  }

  /* Episode / season / dub: full-screen on short landscape phones */
  html[data-page='anime'] .player.is-menu .player__dd-menu,
  .player.is-menu .player__dd-menu {
    position: fixed !important;
    inset: 0 !important;
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    max-height: none !important;
    height: 100% !important;
    z-index: 320 !important;
    animation: none !important;
    border-radius: 0 !important;
    background: rgba(18, 18, 22, 0.72) !important;
    backdrop-filter: blur(16px) saturate(1.1) !important;
    -webkit-backdrop-filter: blur(16px) saturate(1.1) !important;
  }

  .player.is-menu .player__dd-menu-close {
    display: inline-flex !important;
  }

  html[data-page='anime'] .player.is-menu .player__dd-menu--list .player__dd-scroll,
  .player.is-menu .player__dd-menu--list .player__dd-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
    align-content: start;
    align-items: stretch;
    gap: 0.3rem;
    padding: 0.45rem;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  html[data-page='anime'] .player.is-menu .player__dd-menu--list .player__dd-item,
  .player.is-menu .player__dd-menu--list .player__dd-item {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: 2.45rem;
    height: auto;
    align-self: start;
    padding: 0.35rem 0.3rem;
    border-radius: 10px;
    text-align: center;
  }

  html[data-page='anime'] .player.is-menu .player__dd-menu--list .player__dd-item-main,
  .player.is-menu .player__dd-menu--list .player__dd-item-main {
    align-items: center;
  }

  html[data-page='anime'] .player.is-menu .player__dd-menu--list .player__ep-word,
  .player.is-menu .player__dd-menu--list .player__ep-word {
    display: none;
  }

  html[data-page='anime'] .player.is-menu .player__dd-menu--list .player__ep-num,
  .player.is-menu .player__dd-menu--list .player__ep-num {
    font-size: 0.95rem;
    font-weight: 800;
  }

  html[data-page='anime'] .player.is-menu .player__dd-menu--wide .player__dd-scroll,
  html[data-page='anime'] .player.is-menu .player__dd-menu:not(.player__dd-menu--list) .player__dd-scroll,
  .player.is-menu .player__dd-menu--wide .player__dd-scroll,
  .player.is-menu .player__dd-menu:not(.player__dd-menu--list) .player__dd-scroll {
    display: flex;
    flex-direction: column;
    align-content: flex-start;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.25rem;
    padding: 0.45rem;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  html[data-page='anime'] .player.is-menu .player__dd-menu--wide .player__dd-item,
  html[data-page='anime'] .player.is-menu .player__dd-menu:not(.player__dd-menu--list) .player__dd-item,
  .player.is-menu .player__dd-menu--wide .player__dd-item,
  .player.is-menu .player__dd-menu:not(.player__dd-menu--list) .player__dd-item {
    flex: 0 0 auto;
    min-height: 2.75rem;
    height: auto;
    align-self: stretch;
    border-radius: 10px;
  }
}


@media (min-width: 1280px) {
  .anime-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

/* Phones in landscape (CSS width often >820): full-screen menus + quick pills space */
@media (max-width: 1024px) and (hover: none),
       (max-width: 1024px) and (pointer: coarse) {
  .player.is-menu .player__dd-menu {
    position: fixed !important;
    inset: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    height: 100% !important;
    z-index: 320 !important;
    animation: none !important;
    border-radius: 0 !important;
    background: rgba(18, 18, 22, 0.72) !important;
    backdrop-filter: blur(16px) saturate(1.1) !important;
    -webkit-backdrop-filter: blur(16px) saturate(1.1) !important;
  }

  .player.is-menu .player__dd-menu-close {
    display: inline-flex !important;
  }

  .player.is-menu .player__dd-scroll {
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    align-content: start;
  }

  .player.is-menu .player__dd-menu:not(.player__dd-menu--list) .player__dd-scroll,
  .player.is-menu .player__dd-menu--wide .player__dd-scroll {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
  }

  .player.is-menu .player__dd-menu:not(.player__dd-menu--list) .player__dd-item,
  .player.is-menu .player__dd-menu--wide .player__dd-item {
    flex: 0 0 auto;
    min-height: 2.75rem;
    height: auto;
  }

  .player.is-menu .player__dd-menu--list .player__dd-scroll {
    align-content: start;
  }

  .anime-page.is-minimal .anime-page__watch,
  html.is-minimal .anime-page__watch {
    overflow: visible;
    position: relative;
    z-index: 2;
  }

  .anime-page.is-minimal .player.is-menu,
  html.is-minimal .player.is-menu {
    overflow: visible !important;
    z-index: 40;
  }

  .anime-page.is-minimal .player.is-menu .player__top,
  html.is-minimal .player.is-menu .player__top {
    overflow: visible !important;
  }
}

@media (min-width: 1440px) {
  :root {
    --max: min(1120px, 100%);
  }
}

@media (min-width: 1920px) {
  :root {
    --max: min(1200px, 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .anime-card,
  .player,
  .site-bg__blur {
    animation: none !important;
  }
}

@media (update: slow) {
  .site-bg,
  .anime-card__media img {
    filter: none !important;
  }

  .header {
    backdrop-filter: none;
    background: rgba(24, 24, 27, 0.97);
  }
}

/* ===== Footer.css ===== */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(24, 24, 27, 0.2), rgba(12, 12, 14, 0.92)),
    rgba(18, 18, 20, 0.95);
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
}

html[data-page='admin'] .footer {
  display: none !important;
}

.footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.75rem var(--pad-x, 1.75rem) 1.35rem;
  box-sizing: border-box;
  width: 100%;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 2.4fr);
  gap: 2rem 2.25rem;
  align-items: start;
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 1.25rem;
}

.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.16em;
}

.footer__mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.45rem;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(204, 28, 57, 0.22);
}

.footer__social {
  display: inline-flex;
  margin-top: 0.85rem;
  color: var(--rose);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.footer__social:hover {
  color: var(--text);
}

.footer__tagline,
.footer__text {
  margin: 0;
  max-width: 32ch;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.footer__minimal {
  display: none;
  margin-top: 0.9rem;
}

@media (max-width: 1024px) {
  .footer__minimal {
    display: block;
  }
}

.footer__col--info .footer__links {
  margin-bottom: 0.75rem;
}

.footer__heading {
  margin: 0 0 0.75rem;
  font-family: var(--font-eyebrow);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}

.footer__links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.footer__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s ease;
}

.footer__links a:hover {
  color: var(--rose);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 2.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.footer__copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 900px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

  .footer__col--info {
    grid-column: 1 / -1;
  }

  .footer__text {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .footer__inner {
    padding: 1.75rem var(--pad-x, 1rem) calc(1.25rem + var(--safe-bottom, 0px));
  }

  .footer__tagline {
    max-width: none;
    font-size: 0.8rem;
  }

  .footer__cols {
    gap: 1.15rem 1rem;
  }

  .footer__heading {
    margin-bottom: 0.55rem;
  }

  .footer__links {
    gap: 0.4rem;
  }

  .footer__links a {
    font-size: 0.84rem;
  }

  .footer__link--desk {
    display: none;
  }

  .footer__bottom {
    margin-top: 1.5rem;
    padding-top: 1rem;
  }
}

/* ===== MobileDock.css ===== */


.mobile-dock {
  display: none;
}

html[data-page='admin'] .mobile-dock {
  display: none !important;
}

@media (max-width: 1024px) {
  .mobile-dock {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    pointer-events: none;
  }

  .mobile-dock[data-open-search='1'] {
    z-index: 160;
    inset: 0;
    bottom: auto;
    height: 100%;
  }

  .mobile-dock__bar {
    pointer-events: auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    gap: 0.15rem;
    margin: 0;
    width: 100%;
    max-width: none;
    padding: 0.35rem 0.45rem calc(0.4rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
    background: rgba(12, 12, 14, 0.94);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.35);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .mobile-dock__item {
    appearance: none;
    border: 0;
    background: transparent;
    color: #9ca3af;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 0.18rem;
    min-height: 3.15rem;
    padding: 0.2rem 0.15rem 0.15rem;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .mobile-dock__ico {
    display: grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    color: inherit;
    transition: transform 0.15s ease, color 0.15s ease;
  }

  .mobile-dock__ico svg {
    display: block;
  }

  .mobile-dock__label {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.1;
    white-space: nowrap;
  }

  .mobile-dock__item.is-active {
    color: var(--accent);
  }

  .mobile-dock__item.is-active .mobile-dock__ico {
    transform: translateY(-1px);
  }

  .mobile-dock__item--search {
    position: relative;
    z-index: 1;
  }

  .mobile-dock__fab {
    display: grid;
    place-items: center;
    width: 3.05rem;
    height: 3.05rem;
    margin-top: -1.15rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    box-shadow:
      0 0 0 4px rgba(12, 12, 14, 0.95),
      0 8px 20px rgba(204, 28, 57, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  }

  .mobile-dock__fab svg {
    display: block;
  }

  .mobile-dock__item--search.is-active .mobile-dock__fab,
  .mobile-dock__item--search:active .mobile-dock__fab {
    background: var(--accent-hover);
    transform: scale(0.96);
  }

  .mobile-dock__item--search .mobile-dock__label {
    margin-top: 0.05rem;
  }


  .mobile-dock__sheet {
    pointer-events: auto;
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .mobile-dock[data-open-search='1'] .mobile-dock__bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
  }

  .mobile-dock__sheet-backdrop {
    appearance: none;
    border: 0;
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
  }

  .mobile-dock__sheet-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0;
    padding: calc(0.75rem + env(safe-area-inset-top, 0px)) 0.85rem 1rem;
    border-radius: 0 0 16px 16px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #141416;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  }

  .mobile-dock__sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
    font-weight: 700;
    font-size: 0.95rem;
  }

  .mobile-dock__sheet-close {
    appearance: none;
    border: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #e4e4e7;
    font-size: 0.95rem;
    cursor: pointer;
  }

  .search--dock .search__field {
    border-color: rgba(204, 28, 57, 0.45);
  }


  .app-main {
    padding-bottom: calc(5.25rem + var(--safe-bottom, 0px));
  }

  .footer {
    padding-bottom: calc(5.5rem + var(--safe-bottom, 0px));
  }

  .minimal-fab--float {
    display: none !important;
  }
}

@media (max-width: 1024px) and (orientation: landscape) and (max-height: 540px) {
  .mobile-dock {
    display: none !important;
  }

  .app-main {
    padding-bottom: 0.35rem;
  }

  .footer {
    padding-bottom: 0.5rem;
  }
}

