:root {
  color-scheme: light;
  --bg: #fff8fb;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: #ffffff;
  --line: rgba(91, 59, 74, 0.13);
  --text: #2c2028;
  --muted: #8b7180;
  --soft: #5f4c58;
  --accent: #f7a9c4;
  --accent-2: #d9608c;
  --gold: #b8832e;
  --shadow: 0 22px 58px rgba(181, 113, 146, 0.2);
  --page-wash: linear-gradient(180deg, rgba(255, 248, 251, 0.72), #fff8fb 54%);
  --sidebar-bg: rgba(255, 255, 255, 0.78);
  --brand-gradient: linear-gradient(135deg, #ffd8e7, #f7a9c4);
  --brand-text: #7e3150;
  --nav-active-bg: rgba(247, 169, 196, 0.18);
  --continue-bg: rgba(255, 238, 245, 0.72);
  --track-bg: rgba(91, 59, 74, 0.1);
  --input-bg: rgba(255, 255, 255, 0.9);
  --placeholder: rgba(95, 76, 88, 0.5);
  --avatar-bg: #ffe6ef;
  --hero-wash: linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 248, 251, 0.82) 39%, rgba(255, 248, 251, 0.12) 100%);
  --hero-wash-mobile: linear-gradient(0deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 248, 251, 0.74) 54%, rgba(255, 248, 251, 0.16) 100%);
  --hero-bottom: linear-gradient(0deg, rgba(255, 248, 251, 0.86), transparent);
  --token-bg: rgba(255, 255, 255, 0.74);
  --primary-text: #4f1f33;
  --ghost-bg: rgba(255, 255, 255, 0.74);
  --select-bg: #ffffff;
  --chip-bg: rgba(255, 255, 255, 0.78);
  --chip-active-border: rgba(217, 96, 140, 0.38);
  --chip-active-bg: rgba(247, 169, 196, 0.26);
  --chip-active-text: #75314d;
  --card-bg: rgba(255, 255, 255, 0.82);
  --card-active-border: rgba(217, 96, 140, 0.55);
  --card-active-shadow: 0 0 0 2px rgba(247, 169, 196, 0.24);
  --player-bg: #fceaf1;
  --orb-bg: rgba(247, 169, 196, 0.94);
  --orb-active-bg: rgba(217, 96, 140, 0.94);
  --orb-shadow: 0 18px 42px rgba(91, 59, 74, 0.28);
  --soft-panel-bg: rgba(255, 255, 255, 0.72);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171018;
  --panel: rgba(31, 23, 33, 0.86);
  --panel-strong: #241923;
  --line: rgba(255, 220, 236, 0.14);
  --text: #fff5fa;
  --muted: #c8aeba;
  --soft: #eed8e2;
  --accent: #f7a9c4;
  --accent-2: #ff85b5;
  --gold: #ffd58f;
  --shadow: 0 24px 70px rgba(13, 6, 13, 0.42);
  --page-wash: linear-gradient(180deg, rgba(23, 16, 24, 0.88), #171018 58%);
  --sidebar-bg: rgba(18, 12, 19, 0.82);
  --brand-gradient: linear-gradient(135deg, #f7a9c4, #8b4b68);
  --brand-text: #fff5fa;
  --nav-active-bg: rgba(247, 169, 196, 0.16);
  --continue-bg: rgba(55, 35, 51, 0.72);
  --track-bg: rgba(255, 220, 236, 0.12);
  --input-bg: rgba(32, 22, 33, 0.9);
  --placeholder: rgba(238, 216, 226, 0.48);
  --avatar-bg: #3c2433;
  --hero-wash: linear-gradient(90deg, rgba(23, 16, 24, 0.97) 0%, rgba(23, 16, 24, 0.8) 40%, rgba(23, 16, 24, 0.26) 100%);
  --hero-wash-mobile: linear-gradient(0deg, rgba(23, 16, 24, 0.98) 0%, rgba(23, 16, 24, 0.76) 54%, rgba(23, 16, 24, 0.18) 100%);
  --hero-bottom: linear-gradient(0deg, rgba(23, 16, 24, 0.88), transparent);
  --token-bg: rgba(43, 30, 44, 0.78);
  --primary-text: #3a1727;
  --ghost-bg: rgba(43, 30, 44, 0.78);
  --select-bg: #241923;
  --chip-bg: rgba(43, 30, 44, 0.72);
  --chip-active-border: rgba(247, 169, 196, 0.44);
  --chip-active-bg: rgba(247, 169, 196, 0.18);
  --chip-active-text: #ffeaf3;
  --card-bg: rgba(35, 25, 36, 0.84);
  --card-active-border: rgba(247, 169, 196, 0.62);
  --card-active-shadow: 0 0 0 2px rgba(247, 169, 196, 0.18);
  --player-bg: #130c13;
  --orb-bg: rgba(247, 169, 196, 0.96);
  --orb-active-bg: rgba(255, 133, 181, 0.96);
  --orb-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
  --soft-panel-bg: rgba(43, 30, 44, 0.72);
  --hero-wash: linear-gradient(90deg, rgba(23, 16, 24, 0.97) 0%, rgba(23, 16, 24, 0.82) 64%, rgba(23, 16, 24, 0.48) 100%);
  --hero-bottom: linear-gradient(0deg, rgba(23, 16, 24, 0.94), transparent);
}

html[data-theme$="-red"] { --accent: #ff8aa8; --accent-2: #e5486f; --brand-gradient: linear-gradient(135deg, #ffd0dc, #ff6f94); --nav-active-bg: rgba(229, 72, 111, 0.18); }
html[data-theme$="-orange"] { --accent: #ffb06e; --accent-2: #df6e1f; --brand-gradient: linear-gradient(135deg, #ffe0bd, #ff9b52); --nav-active-bg: rgba(223, 110, 31, 0.18); }
html[data-theme$="-yellow"] { --accent: #f4d45e; --accent-2: #b58b00; --brand-gradient: linear-gradient(135deg, #fff1a8, #f2cc4a); --nav-active-bg: rgba(181, 139, 0, 0.18); }
html[data-theme$="-green"] { --accent: #8bdc9d; --accent-2: #2d9850; --brand-gradient: linear-gradient(135deg, #cbf5d5, #6ed083); --nav-active-bg: rgba(45, 152, 80, 0.18); }
html[data-theme$="-cyan"] { --accent: #85d9e8; --accent-2: #2d91aa; --brand-gradient: linear-gradient(135deg, #c8f4fb, #6acde0); --nav-active-bg: rgba(45, 145, 170, 0.18); }
html[data-theme$="-blue"] { --accent: #8eb8ff; --accent-2: #477fe0; --brand-gradient: linear-gradient(135deg, #d7e6ff, #7faaff); --nav-active-bg: rgba(71, 127, 224, 0.18); }
html[data-theme$="-violet"] { --accent: #c7a3ff; --accent-2: #8d62df; --brand-gradient: linear-gradient(135deg, #eadcff, #b68cff); --nav-active-bg: rgba(141, 98, 223, 0.18); }

html[data-theme^="light-"] {
  color-scheme: light;
  --bg: #fbfcff;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: #ffffff;
  --text: #251f25;
  --muted: #746976;
  --soft: #554d58;
  --page-wash: linear-gradient(180deg, rgba(255,255,255,0.76), var(--bg) 58%);
  --sidebar-bg: rgba(255,255,255,0.8);
  --input-bg: rgba(255,255,255,0.92);
  --card-bg: rgba(255,255,255,0.84);
  --soft-panel-bg: rgba(255,255,255,0.74);
}

html[data-theme^="dark-"] {
  color-scheme: dark;
  --bg: #11151b;
  --panel: rgba(24, 28, 36, 0.88);
  --panel-strong: #1c2029;
  --line: rgba(230, 238, 255, 0.14);
  --text: #f8fbff;
  --muted: #b9c1ce;
  --soft: #dce4ef;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --page-wash: linear-gradient(180deg, rgba(17,21,27,0.9), #11151b 58%);
  --sidebar-bg: rgba(14, 17, 22, 0.84);
  --hero-wash: linear-gradient(90deg, rgba(17, 21, 27, 0.96) 0%, rgba(17, 21, 27, 0.84) 52%, rgba(17, 21, 27, 0.48) 100%);
  --hero-wash-mobile: linear-gradient(0deg, rgba(17, 21, 27, 0.98) 0%, rgba(17, 21, 27, 0.78) 58%, rgba(17, 21, 27, 0.32) 100%);
  --hero-bottom: linear-gradient(0deg, rgba(17, 21, 27, 0.94), transparent);
  --continue-bg: rgba(28, 32, 41, 0.78);
  --track-bg: rgba(230, 238, 255, 0.12);
  --input-bg: rgba(25, 29, 38, 0.92);
  --placeholder: rgba(220, 228, 239, 0.42);
  --avatar-bg: rgba(230, 238, 255, 0.12);
  --token-bg: rgba(35, 40, 51, 0.76);
  --ghost-bg: rgba(25, 29, 38, 0.78);
  --select-bg: #171c25;
  --chip-bg: rgba(35, 40, 51, 0.72);
  --chip-active-border: color-mix(in srgb, var(--accent-2) 62%, transparent);
  --chip-active-bg: color-mix(in srgb, var(--accent) 18%, transparent);
  --chip-active-text: #f8fbff;
  --card-bg: rgba(28, 32, 41, 0.84);
  --card-active-border: color-mix(in srgb, var(--accent-2) 68%, transparent);
  --card-active-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
  --soft-panel-bg: rgba(35, 40, 51, 0.74);
  --player-bg: #0f131a;
  --orb-bg: var(--accent);
  --orb-active-bg: var(--accent-2);
  --orb-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
  --primary-text: #10141c;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
  background: var(--page-wash), var(--bg);
}

html[data-theme^="dark"] body {
  background: var(--page-wash), var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
}

[hidden],
.admin-only[hidden] {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 26px 18px;
  border-right: 1px solid var(--line);
  background: var(--sidebar-bg);
  overflow: hidden;
  transition:
    opacity 160ms ease,
    padding 160ms ease,
    border-color 160ms ease;
}

.sidebar > * {
  min-width: 196px;
}

.sidebar-collapsed .sidebar {
  padding-right: 0;
  padding-left: 0;
  border-color: transparent;
  opacity: 0;
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--brand-gradient);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 34%, transparent);
  color: var(--brand-text);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  line-height: 1;
}

.brand small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item,
.primary-btn,
.ghost-btn,
.icon-btn,
.chip,
.episode-btn {
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  border-color: var(--line);
  background: var(--nav-active-bg);
  color: var(--text);
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  min-width: 22px;
  color: var(--accent-2);
}

.continue-box {
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--continue-bg);
}

.continue-box span {
  color: var(--muted);
  font-size: 12px;
}

.continue-box strong {
  display: block;
  margin: 8px 0 12px;
}

.mini-progress,
.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--track-bg);
}

.mini-progress span,
.progress-track span {
  display: block;
  width: 58%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 38%, #fff));
}

.main-view {
  min-width: 0;
  padding: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.sidebar-toggle {
  display: grid;
  place-items: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--accent-2);
  font-weight: 900;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(640px, 100%);
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
}

.search-field span {
  color: var(--accent-2);
  font-size: 23px;
  line-height: 1;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  min-width: 0;
}

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

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

.theme-toggle,
.account-pill,
.contact-pill,
.notification-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--input-bg);
  color: var(--soft);
  font-weight: 800;
  white-space: nowrap;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.theme-toggle:hover,
.account-pill:hover,
.contact-pill:hover,
.notification-pill:hover,
.profile-pill:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent-2) 42%, transparent);
  color: var(--text);
}

.theme-toggle span:first-child {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--avatar-bg);
  color: var(--accent-2);
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--input-bg);
  color: var(--soft);
  white-space: nowrap;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.account-pill {
  max-width: 190px;
}

.contact-pill {
  max-width: 210px;
}

.notification-pill {
  position: relative;
}

.notification-pill strong {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--primary-text);
  font-size: 12px;
}

.notification-pill:not(.has-unread) strong {
  background: var(--chip-bg);
  color: var(--muted);
}

.account-pill span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--profile-color, var(--avatar-bg));
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
}

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

.avatar.has-image {
  background: var(--avatar-bg);
}

.hero {
  position: relative;
  min-height: 174px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, var(--panel-strong), rgba(255, 255, 255, 0.7)),
    url("assets/hero.png") center 38% / cover;
  box-shadow: var(--shadow);
}

html[data-theme^="dark"] .hero {
  background:
    var(--hero-wash),
    url("assets/player-night.png") center / cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 22%;
  background: var(--hero-bottom);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(760px, 100%);
  min-height: inherit;
  padding: 22px 24px;
}

.eyebrow {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 8px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.03;
}

.hero-copy p {
  margin-top: 10px;
  max-width: 56ch;
  color: var(--soft);
  font-size: 15px;
  line-height: 1.55;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.meta-token {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--token-bg);
  color: var(--soft);
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 17px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-btn {
  background: var(--accent);
  color: var(--primary-text);
}

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

.danger-btn {
  border-color: color-mix(in srgb, #ff6d8f 48%, var(--line));
  color: color-mix(in srgb, #ff8aa8 70%, var(--text));
}

.primary-btn:hover,
.ghost-btn:hover,
.icon-btn:hover,
.chip:hover,
.episode-btn:hover {
  transform: translateY(-1px);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  margin-top: 14px;
}

.content-grid[hidden],
.admin-panel[hidden],
.chat-page[hidden],
.community-page[hidden],
.notifications-drawer[hidden],
.chat-drawer[hidden],
.messages-drawer[hidden],
.search-field[hidden],
.admin-new-field[hidden],
.admin-existing-field[hidden],
.anime-upload-field[hidden],
.manga-upload-field[hidden],
.admin-users-list[hidden],
#adminCreateTitle[hidden] {
  display: none;
}

.catalog-panel,
.watch-panel,
.admin-panel,
.chat-page {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.catalog-panel {
  order: 2;
  padding: 18px;
}

.admin-panel {
  margin-top: 18px;
  padding: 18px;
}

.chat-page {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 18px;
}

.chat-page-layout {
  display: grid;
  grid-template-rows: minmax(360px, 58vh) auto;
  gap: 14px;
  min-height: 0;
}

.chat-page-messages {
  min-height: 0;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel-bg);
}

.chat-page-form {
  max-width: 760px;
}

.profile-page {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.profile-page[hidden],
.settings-page[hidden] {
  display: none;
}

.profile-hero {
  min-height: 300px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), color-mix(in srgb, var(--accent) 24%, transparent)),
    var(--brand-gradient);
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

html[data-theme^="dark"] .profile-hero {
  background:
    linear-gradient(135deg, rgba(20, 13, 20, 0.82), color-mix(in srgb, var(--accent) 18%, transparent)),
    var(--brand-gradient);
}

.profile-hero-shade {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  min-height: 300px;
  padding: 28px;
  background: linear-gradient(90deg, rgba(20, 12, 20, 0.68), rgba(20, 12, 20, 0.16));
  color: #fff;
}

.profile-hero .avatar {
  border: 3px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
}

.profile-hero h2 {
  margin: 3px 0 8px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 0.98;
}

.profile-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 16px;
  line-height: 1.55;
}

.profile-public-code {
  display: inline-flex;
  margin: 0 0 10px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 900;
}

.profile-edit-link {
  margin-top: 16px;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.profile-dashboard {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  grid-template-areas:
    "stats stats"
    "favorites ratings"
    "activity activity";
  gap: 16px;
  align-items: start;
}

.settings-page {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
  grid-template-areas:
    "profile site"
    "profile privacy";
  gap: 16px;
  align-items: start;
}

.profile-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.profile-settings-card {
  grid-area: profile;
  display: grid;
  gap: 14px;
}

.settings-site-card {
  grid-area: site;
  display: grid;
  gap: 14px;
}

.settings-privacy-card {
  grid-area: privacy;
  display: grid;
  gap: 14px;
}

.settings-profile-preview {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel-bg);
}

.settings-profile-preview strong,
.settings-profile-preview small {
  display: block;
}

.settings-profile-preview small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.profile-stats-card {
  grid-area: stats;
}

.profile-favorites-card {
  grid-area: favorites;
}

.profile-ratings-card {
  grid-area: ratings;
}

.profile-activity-card {
  grid-area: activity;
}

.profile-settings-card .avatar-upload span {
  min-height: 48px;
}

.privacy-grid {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel-bg);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.profile-stats > div {
  min-height: 94px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel-bg);
}

.profile-stats strong {
  display: block;
  color: var(--text);
  font-size: 30px;
  line-height: 1;
}

.profile-stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.profile-title-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.profile-title-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 88px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
}

.profile-title-cover {
  display: grid;
  place-items: center;
  width: 62px;
  aspect-ratio: 1 / 1.5;
  overflow: hidden;
  border-radius: 8px;
  background: var(--brand-gradient);
  color: var(--primary-text);
  font-weight: 900;
}

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

.profile-title-card strong,
.profile-title-card small {
  display: block;
  min-width: 0;
}

.profile-title-card strong {
  color: var(--text);
  line-height: 1.25;
}

.profile-title-card {
  cursor: default;
}

.profile-title-card small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.profile-activity {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.profile-activity article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel-bg);
}

.profile-activity strong,
.profile-activity span {
  min-width: 0;
}

.profile-activity span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-panel textarea {
  width: 100%;
  min-height: 430px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: var(--input-bg);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
}

.admin-panel {
  align-content: start;
}

.admin-upload-form {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(220px, 0.9fr) minmax(260px, 1.1fr);
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel-bg);
}

.admin-type-switch {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.admin-type-field {
  display: none !important;
}

.admin-description-field {
  grid-column: 1 / -1;
}

.admin-file-upload {
  align-self: end;
}

.admin-upload-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 2px;
}

.admin-upload-form .auth-status {
  grid-column: 1 / -1;
  min-height: 20px;
}

.admin-users-panel {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel-bg);
}

.admin-users-panel .section-head {
  margin-bottom: 4px;
}

.compact-head h2 {
  font-size: 18px;
}

.admin-users-toggle {
  min-height: 38px;
}

.admin-role-form {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(160px, 0.55fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.admin-users-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.admin-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  text-align: left;
}

.admin-user-row span,
.admin-user-row strong,
.admin-user-row code {
  display: block;
}

.admin-user-row code {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.admin-user-row small {
  flex: 0 0 auto;
  color: var(--accent-2);
  font-weight: 900;
}

.admin-config-title {
  margin: 18px 0 0;
  color: var(--text);
  font-size: 16px;
}

.admin-config-save {
  margin-top: 10px;
}

.chat-drawer,
.messages-drawer,
.notifications-drawer {
  position: fixed;
  top: 82px;
  bottom: auto;
  left: 248px;
  z-index: 20;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: min(620px, calc(100vh - 106px));
  max-height: calc(100vh - 106px);
  width: min(390px, calc(100vw - 28px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.messages-drawer {
  width: min(760px, calc(100vw - 28px));
}

.notifications-drawer {
  left: auto;
  right: 22px;
  width: min(420px, calc(100vw - 28px));
}

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

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

.compact-action {
  min-height: 40px;
  padding: 0 12px;
  font-size: 13px;
}

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

.chat-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  margin: 12px 0;
  overflow: auto;
  padding-right: 4px;
}

.chat-message {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel-bg);
}

.chat-message header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.chat-message time {
  color: var(--muted);
  font-size: 12px;
}

.chat-message p {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  color: var(--soft);
  line-height: 1.45;
}

.message-delete {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.chat-form {
  display: grid;
  gap: 8px;
}

.chat-form textarea {
  width: 100%;
  min-height: 78px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  resize: vertical;
  background: var(--input-bg);
  color: var(--text);
}

.notifications-list,
.community-list,
.forum-post-list {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow: auto;
}

.notification-item {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel-bg);
  text-align: left;
}

.notification-item.unread {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--soft-panel-bg));
}

.notification-item span,
.notification-item small {
  color: var(--muted);
  font-weight: 800;
}

.community-page {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.community-form,
.admin-community-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.community-form-wide {
  grid-column: 1 / -1;
}

.community-card,
.admin-mini-form,
.forum-thread {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel-bg);
}

.community-card.pinned {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
}

.community-card-head,
.community-actions,
.forum-post header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.community-card h3,
.forum-thread h2 {
  margin: 3px 0 0;
}

.community-card p,
.forum-post p {
  margin: 10px 0 0;
  color: var(--soft);
  line-height: 1.55;
  white-space: pre-wrap;
}

.community-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.community-author:hover {
  color: var(--accent-2);
}

.avatar.profile-link,
button.avatar.profile-link {
  border: 0;
  cursor: pointer;
}

.avatar.profile-link:hover {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}

.mini-avatar {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}

.schedule-card {
  display: grid;
  grid-template-columns: minmax(92px, 0.22fr) minmax(0, 1fr);
  gap: 14px;
}

.schedule-date {
  display: grid;
  place-items: center;
  min-height: 74px;
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text);
  font-weight: 900;
  text-align: center;
}

.forum-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.38fr) minmax(0, 1fr);
  gap: 14px;
  min-height: 520px;
}

.forum-topic {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel-bg);
  color: var(--text);
  text-align: left;
}

.forum-topic-wrap {
  display: grid;
  gap: 6px;
}

.forum-delete {
  justify-self: end;
  margin-left: 0;
}

.forum-topic.active {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--soft-panel-bg));
}

.forum-topic span,
.forum-topic small {
  color: var(--muted);
  font-weight: 800;
}

.forum-post-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.profile-search {
  width: min(100%, 520px);
}

.profile-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.public-profile-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel-bg);
  overflow: hidden;
}

.public-profile-main {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.public-profile-main strong,
.public-profile-main small,
.public-profile-main em {
  display: block;
  min-width: 0;
}

.public-profile-main strong {
  font-size: 18px;
  overflow-wrap: anywhere;
}

.public-profile-main small {
  margin-top: 4px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}

.public-profile-main em {
  margin-top: 7px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  line-height: 1.35;
}

.forum-thread {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
}

.forum-post {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
}

.admin-mini-form {
  display: grid;
  gap: 10px;
  align-content: start;
}

.compact-search {
  margin-top: 12px;
}

.friend-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.friend-add-row input {
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: var(--input-bg);
  color: var(--text);
}

.message-layout {
  display: grid;
  grid-template-columns: minmax(190px, 0.45fr) minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  margin-top: 12px;
}

.message-users {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  padding-right: 2px;
}

.message-user {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel-bg);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.message-user.active {
  border-color: var(--card-active-border);
  background: var(--chip-active-bg);
}

.message-user strong,
.message-user small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-user small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.message-thread-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 8px;
  min-height: 0;
}

.message-thread-panel > strong {
  font-size: 18px;
}

.message-thread-panel textarea {
  width: 100%;
  min-height: 78px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  resize: vertical;
  background: var(--input-bg);
  color: var(--text);
}

.dm-panel {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.dm-messages {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 210px;
  max-height: none;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
}

.dm-message {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  max-width: 78%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel-bg);
}

.dm-message.mine {
  justify-self: end;
  grid-template-columns: minmax(0, 1fr) 30px;
  border-color: var(--chip-active-border);
  background: var(--chip-active-bg);
}

.dm-message.mine .avatar {
  order: 2;
}

.dm-message.mine span {
  order: 1;
}

.dm-message p {
  margin-top: 4px;
  color: var(--soft);
}

.dm-panel textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
}

.watch-panel {
  order: 1;
  position: static;
  align-self: start;
  padding: 16px;
}

.player-back {
  display: none;
  margin-bottom: 12px;
}

.main-view:not(.player-mode) .watch-panel,
.main-view:not(.player-mode) .hero {
  display: none;
}

.main-view:not(.player-mode) .content-grid {
  grid-template-columns: 1fr;
}

.main-view:not(.player-mode) .catalog-panel {
  order: 1;
}

.main-view.player-mode .player-back {
  display: inline-flex;
}

.main-view.player-mode .catalog-panel {
  display: none;
}

.main-view.player-mode .content-grid {
  grid-template-columns: minmax(0, 980px);
  justify-content: center;
}

.section-head,
.watch-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

h2 {
  margin-top: 4px;
  font-size: 24px;
}

select {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: var(--select-bg);
  color: var(--text);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.chip {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--soft);
}

.chip.active {
  border-color: var(--chip-active-border);
  background: var(--chip-active-bg);
  color: var(--chip-active-text);
}

.anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: clamp(18px, 3vw, 38px);
  align-items: start;
}

.anime-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 382px;
  padding: 14px 14px 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px 8px 34px 34px;
  background:
    linear-gradient(180deg, transparent 0 42%, rgba(91, 59, 74, 0.08) 100%),
    var(--card-bg);
  text-align: center;
}

.anime-card.active {
  border-color: var(--card-active-border);
  box-shadow: var(--card-active-shadow);
}

.poster {
  position: relative;
  width: min(100%, 210px);
  height: auto;
  min-height: 0;
  aspect-ratio: 1 / 1.5;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.5), transparent 16%),
    linear-gradient(145deg, var(--poster-a), var(--poster-b));
  box-shadow: 0 14px 32px rgba(91, 59, 74, 0.16);
}

.poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster::before,
.poster::after {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.poster::before {
  width: 56%;
  aspect-ratio: 1;
  right: -16%;
  top: 15%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.1);
}

.poster::after {
  display: none;
}

.poster-code {
  position: absolute;
  left: 9px;
  bottom: 9px;
  z-index: 1;
  color: rgba(255, 255, 255, 0.82);
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
}

.poster:has(img) .poster-code {
  display: none;
}

.anime-card[data-type="manga"] .poster {
  border-right: 8px solid rgba(91, 59, 74, 0.18);
  border-radius: 6px 12px 12px 6px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.12), transparent 18%),
    var(--brand-gradient);
}

.anime-card[data-type="manga"] .poster::before {
  display: none;
}

html[data-theme*="-"] .poster {
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.42), transparent 16%),
    var(--brand-gradient);
}

.card-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  min-width: 0;
  width: 100%;
  padding: 13px 4px 0;
}

.card-body strong {
  display: -webkit-box;
  min-height: 46px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

.card-body span {
  display: -webkit-box;
  min-height: 38px;
  margin-top: 7px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.card-body .progress-track {
  width: 100%;
  margin: 12px 0 10px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin-top: auto;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

html[data-theme^="dark"] .anime-card {
  background:
    linear-gradient(180deg, transparent 0 42%, color-mix(in srgb, var(--accent) 8%, transparent) 100%),
    var(--card-bg);
}

html[data-theme^="dark"] .poster {
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
}

html[data-theme^="dark"] .poster::before,
html[data-theme^="dark"] .poster::after {
  border-color: color-mix(in srgb, var(--accent) 18%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.empty-state {
  padding: 36px 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.compact-empty {
  padding: 16px 12px;
  font-size: 13px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--soft);
  font-size: 13px;
}

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: var(--player-bg);
}

.player.short-video {
  aspect-ratio: 9 / 16;
  width: min(100%, 460px);
  margin-inline: auto;
}

.video-player,
.video-empty {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

html[data-theme^="dark"] .video-empty {
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28)),
    url("assets/player-night.png") center / cover;
}

.video-player {
  background: #000000;
  object-fit: contain;
}

.video-empty {
  overflow: hidden;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.14)),
    url("assets/hero.png") center / cover;
}

.video-player[hidden],
.video-empty[hidden],
.manga-reader[hidden] {
  display: none;
}

.player.manga-mode {
  aspect-ratio: auto;
  min-height: min(86dvh, 960px);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel-strong) 94%, transparent), var(--player-bg)),
    var(--panel-strong);
}

.reader-settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.reader-settings label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.reader-settings span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.reader-settings select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.manga-reader {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(70px, 0.18fr) minmax(0, 1fr) minmax(70px, 0.18fr);
  gap: 0;
  padding: 18px;
  overflow: auto;
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 42%),
    var(--player-bg);
}

.reader-page {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  align-self: stretch;
  min-width: 0;
  margin: 0;
}

.reader-page img {
  display: block;
  max-width: 100%;
  max-height: calc(min(86dvh, 960px) - 88px);
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.player[data-reader-fit="width"] .reader-page img {
  width: 100%;
  max-height: none;
}

.player[data-reader-fit="contain"] .reader-page img {
  width: auto;
  max-width: 100%;
  max-height: calc(min(86dvh, 960px) - 88px);
}

.player[data-reader-bg="paper"] .manga-reader {
  background: #f1eadc;
}

.player[data-reader-bg="soft"] .manga-reader {
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 44%),
    color-mix(in srgb, var(--panel) 88%, var(--accent) 12%);
}

.player[data-reader-bg="paper"] .reader-page figcaption {
  color: #4c463e;
}

.reader-page figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.reader-zone {
  position: relative;
  z-index: 2;
  min-width: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.reader-zone::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 160ms ease;
}

.reader-zone::after {
  position: absolute;
  inset: 50% auto auto 50%;
  color: var(--accent-2);
  font-size: 26px;
  font-weight: 900;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 160ms ease;
}

.reader-prev::after {
  content: "‹";
}

.reader-next::after {
  content: "›";
}

.reader-zone:hover::before,
.reader-zone:hover::after,
.reader-zone:focus-visible::before,
.reader-zone:focus-visible::after {
  opacity: 1;
}

.player-art,
.player-shade {
  position: absolute;
  inset: 0;
}

.player-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
}

.player-shade {
  background:
    radial-gradient(circle at 50% 42%, transparent 0 24%, rgba(0, 0, 0, 0.2) 40%, rgba(0, 0, 0, 0.82) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 54%);
}

.play-orb {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--orb-bg);
  color: var(--primary-text);
  transform: translate(-50%, -50%);
  box-shadow: var(--orb-shadow);
  font-size: 25px;
}

.player.is-playing .play-orb {
  background: var(--orb-active-bg);
  color: #ffffff;
}

.player-caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
}

.player-caption span {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
}

.player-caption strong {
  display: block;
  margin-top: 3px;
  font-size: 20px;
}

.watch-info {
  margin-top: 14px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--gold);
  font-size: 20px;
}

.side-description {
  margin-top: 12px;
  color: var(--soft);
  line-height: 1.6;
}

.watch-progress {
  min-height: 18px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel-bg);
}

.rating-row span {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.rating-row button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--gold);
  font-size: 18px;
  line-height: 1;
}

.rating-row button.active {
  background: var(--chip-active-bg);
}

.source-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 16px;
}

.source-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.source-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.source-field input {
  width: 100%;
  min-height: 40px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: var(--input-bg);
  color: var(--text);
}

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

.source-field input[aria-invalid="true"] {
  border-color: color-mix(in srgb, var(--accent-2) 72%, transparent);
}

.source-actions {
  display: flex;
  align-self: end;
  gap: 8px;
}

.source-submit,
.source-reset {
  align-self: end;
  min-height: 40px;
  padding: 0 13px;
  border-radius: 8px;
  font-weight: 800;
}

.source-submit {
  background: var(--accent);
  color: var(--primary-text);
}

.source-reset {
  border: 1px solid var(--line);
  background: var(--chip-bg);
  color: var(--soft);
}

.source-status {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

.episode-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
  gap: 8px;
  margin-top: 16px;
  max-height: 142px;
  overflow: auto;
  padding-right: 2px;
}

.episode-btn {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--soft);
}

.episode-btn.active {
  border-color: var(--chip-active-border);
  background: var(--chip-active-bg);
  color: var(--text);
}

.details-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.details-list div {
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel-bg);
}

.details-list span,
.details-list strong {
  display: block;
  overflow-wrap: anywhere;
}

.details-list span {
  color: var(--muted);
  font-size: 12px;
}

.details-list strong {
  margin-top: 5px;
}

.comments-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

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

.comments-head h2 {
  font-size: 22px;
}

.comments-head > span {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--accent-2);
  font-weight: 800;
}

.comments-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.comment-item,
.comment-empty {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel-bg);
}

.comment-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
}

.comment-avatar {
  width: 38px;
  height: 38px;
  font-size: 13px;
}

.comment-body {
  min-width: 0;
}

.comment-body header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.comment-item strong {
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.comment-item time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.comment-item p,
.comment-empty {
  color: var(--soft);
  font-size: 14px;
  line-height: 1.5;
}

.comment-item p {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.comment-delete {
  margin-top: 8px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.comment-form {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.comment-form textarea {
  width: 100%;
  min-width: 0;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: var(--input-bg);
  color: var(--text);
}

.comment-form textarea::placeholder {
  color: var(--placeholder);
}

.comment-form .primary-btn {
  justify-self: end;
}

.comment-form .primary-btn:disabled,
.comment-form textarea:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.age-dialog,
.account-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  box-shadow: var(--shadow);
}

.account-dialog {
  width: min(560px, calc(100vw - 32px));
}

.age-dialog::backdrop,
.account-dialog::backdrop {
  background: rgba(28, 15, 24, 0.52);
  backdrop-filter: blur(6px);
}

.age-dialog-card,
.account-dialog-card {
  position: relative;
  padding: 24px;
  background: var(--panel-strong);
}

.age-dialog-card h2,
.account-dialog-card h2 {
  margin-top: 8px;
  font-size: 26px;
  line-height: 1.14;
}

.age-dialog-card p,
.account-dialog-card p {
  margin-top: 10px;
  color: var(--soft);
  line-height: 1.55;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--soft);
  font-size: 20px;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.auth-tabs[hidden] {
  display: none;
}

.auth-tab {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--soft);
  font-weight: 800;
}

.auth-tab.active {
  border-color: var(--chip-active-border);
  background: var(--chip-active-bg);
  color: var(--text);
}

.account-view {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.account-view[hidden] {
  display: none;
}

#accountView .avatar-editor,
#accountView > .auth-field,
#accountView > .profile-settings,
#saveProfileButton {
  display: none;
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-field input,
.auth-field textarea,
.auth-field select {
  width: 100%;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: var(--input-bg);
  color: var(--text);
}

.auth-field input,
.auth-field select {
  min-height: 42px;
}

.auth-field textarea {
  resize: vertical;
  padding-top: 11px;
}

.auth-field input::placeholder,
.auth-field textarea::placeholder {
  color: var(--placeholder);
}

.auth-status {
  min-height: 18px;
  color: var(--accent-2);
  font-size: 13px;
}

.account-card,
.profile-editor-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel-bg);
}

.account-card strong,
.account-card p,
.profile-editor-head strong,
.profile-editor-head p {
  display: block;
  margin: 0;
}

.account-card p,
.profile-editor-head p {
  margin-top: 5px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.4;
}

.profile-id-row {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel-bg);
}

.profile-id-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-id-row code {
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.account-large {
  width: 72px;
  height: 72px;
  min-width: 72px;
  font-size: 20px;
}

.avatar-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(96px, 0.65fr);
  gap: 10px;
  align-items: end;
}

.avatar-upload {
  display: grid;
  min-height: 42px;
  cursor: pointer;
}

.avatar-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.avatar-upload span {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px dashed var(--chip-active-border);
  border-radius: 8px;
  background: var(--chip-active-bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.color-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel-bg);
}

.color-dot {
  width: 30px;
  height: 30px;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--dot-color);
}

.color-dot[data-color="#f7a9c4"] {
  --dot-color: #f7a9c4;
}

.color-dot[data-color="#d7eef1"] {
  --dot-color: #d7eef1;
}

.color-dot[data-color="#fff1b8"] {
  --dot-color: #fff1b8;
}

.color-dot[data-color="#dcc8ff"] {
  --dot-color: #dcc8ff;
}

.color-dot.active {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.profile-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-panel-bg);
}

.settings-row {
  display: grid;
  gap: 7px;
}

.settings-row span,
.settings-check span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.settings-row select {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: var(--select-bg);
  color: var(--text);
}

.settings-check {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 9px;
}

.settings-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-2);
}

.voice-peers {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.voice-peer {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
}

.voice-peer small {
  color: var(--muted);
  font-size: 12px;
}

.voice-log {
  display: grid;
  gap: 6px;
  max-height: 190px;
  margin-top: 12px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
}

.voice-log-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--soft-panel-bg);
  font-size: 12px;
}

.voice-log-row time {
  color: var(--muted);
}

.voice-log-row[data-level="error"] span {
  color: #ff6d9f;
  font-weight: 800;
}

.voice-log-row[data-level="warn"] span {
  color: var(--gold);
  font-weight: 800;
}

.system-log-view {
  min-height: 220px;
  max-height: 360px;
  white-space: pre;
}

.not-found-page {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(300px, 1fr);
  gap: 18px;
  align-items: stretch;
  margin-top: 18px;
}

.not-found-page[hidden] {
  display: none;
}

.not-found-copy,
.snake-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.not-found-copy {
  display: grid;
  align-content: center;
  gap: 12px;
}

.not-found-copy h2 {
  margin: 0;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.98;
}

.not-found-copy p {
  max-width: 520px;
  margin: 0;
  color: var(--soft);
  line-height: 1.55;
}

.not-found-copy .primary-btn {
  justify-self: start;
}

.snake-card {
  display: grid;
  gap: 12px;
}

.snake-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-weight: 900;
}

.snake-headline span {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 34px;
  border-radius: 999px;
  background: var(--chip-active-bg);
  color: var(--accent-2);
}

#catSnakeCanvas {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1;
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  touch-action: none;
}

.snake-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.snake-actions > * {
  flex: 1 1 150px;
}

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

  .watch-panel {
    position: static;
  }

  .catalog-panel,
  .watch-panel {
    order: initial;
  }
}

@media (max-width: 780px) {
  body {
    background: var(--bg);
  }

  * {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }

  .app-shell {
    backdrop-filter: none;
  }

  .hero,
  .catalog-panel,
  .watch-panel,
  .admin-panel,
  .chat-page,
  .community-page,
  .profile-card,
  .profile-hero,
  .chat-drawer,
  .messages-drawer,
  .notifications-drawer {
    box-shadow: none;
  }

  .brand-mark,
  .play-orb {
    box-shadow: none;
  }

  .poster::after {
    display: none;
  }

  .anime-card,
  .comment-item,
  .chat-message {
    content-visibility: auto;
    contain-intrinsic-size: 330px;
  }

  .avatar-editor,
  .profile-settings,
	  .profile-dashboard,
	  .settings-layout,
	  .not-found-page,
	  .community-form,
	  .admin-community-grid,
	  .forum-layout,
  .schedule-card,
  .profile-stats,
  .admin-upload-form,
  .admin-role-form {
    grid-template-columns: 1fr;
  }

  .profile-dashboard {
    grid-template-areas:
      "stats"
      "favorites"
      "ratings"
      "activity";
  }

  .settings-layout {
    grid-template-areas:
      "profile"
      "site"
      "privacy";
  }

  .profile-activity-card {
    grid-column: auto;
  }

  .profile-hero,
  .profile-hero-shade {
    min-height: 250px;
  }

  .profile-hero-shade {
    align-items: flex-end;
    padding: 18px;
  }

  .profile-title-list {
    grid-template-columns: 1fr;
  }

  .profile-activity article {
    display: grid;
  }

  .profile-activity span {
    white-space: normal;
  }

	  .player.manga-mode {
	    min-height: min(78dvh, 720px);
	  }

  .manga-reader {
    grid-template-columns: 1fr 1fr;
    padding: 8px;
  }

  .reader-page {
    grid-column: 1 / -1;
    grid-row: 1;
  }

	  .reader-page img {
	    max-height: calc(min(78dvh, 720px) - 58px);
	  }

  .reader-zone {
    grid-row: 1;
    min-height: 100%;
  }

  .reader-prev {
    grid-column: 1;
  }

  .reader-next {
    grid-column: 2;
  }

  .reader-zone::before,
  .reader-zone::after {
    display: none;
  }

  .admin-upload-actions {
    grid-column: auto;
  }

  .admin-head-actions {
    justify-content: stretch;
  }

  .admin-head-actions > * {
    flex: 1 1 140px;
  }

  .chat-drawer,
  .messages-drawer,
  .notifications-drawer {
    top: 12px;
    right: 12px;
    bottom: auto;
    left: 12px;
    height: min(560px, calc(100vh - 24px));
    max-height: calc(100vh - 24px);
    width: auto;
  }

  .chat-page-layout {
    grid-template-rows: minmax(320px, 56vh) auto;
  }

  .reader-settings {
    grid-template-columns: 1fr;
  }

  .message-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .message-users {
    grid-auto-flow: row;
    max-height: 180px;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 0;
  }

  .message-thread-panel {
    min-height: 0;
  }

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

  .dm-messages {
    min-height: 180px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-collapsed .sidebar {
    height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-bottom: 0;
  }

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

	  .nav-item {
	    justify-content: flex-start;
	    min-height: 46px;
	  }

	  .continue-box {
	    display: none;
	  }

  .main-view {
    padding: 14px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

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

  .theme-toggle,
  .account-pill,
  .contact-pill,
  .notification-pill {
    width: 100%;
    max-width: none;
  }

	  .profile-pill {
    grid-column: 1 / -1;
    justify-content: space-between;
    width: 100%;
	  }

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

	  .not-found-copy,
	  .snake-card {
	    padding: 16px;
	    box-shadow: none;
	  }

  .hero {
    min-height: 250px;
    background: var(--panel);
  }

  .video-empty {
    background:
      linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.22)),
      var(--player-bg);
  }

  .hero-copy {
    justify-content: flex-end;
  }
}

@media (max-width: 520px) {
  .brand {
    justify-content: center;
  }

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

  .anime-card {
    min-height: 300px;
    padding: 10px 10px 14px;
  }

  .poster {
    width: 100%;
    max-width: 170px;
  }

  .section-head,
  .watch-info {
    align-items: flex-start;
    flex-direction: column;
  }

  select,
  .source-submit,
  .source-reset {
    width: 100%;
  }

  .source-form {
    grid-template-columns: 1fr;
  }

  .source-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

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

  .episode-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-hero-shade {
    align-items: center;
    flex-direction: column;
    justify-content: flex-end;
    text-align: center;
  }

  .profile-hero p {
    font-size: 14px;
  }
}
