@import url("https://fonts.googleapis.com/css2?family=Changa:wght@500;600;700;800&display=swap");

:root {
  --ink: #2d2d35;
  --muted: #787986;
  --paper: #ffffff;
  --soft: #f3f5f8;
  --line: #e5e8ef;
  --nav: #37307f;
  --nav-dark: #29245f;
  --accent: #dd3333;
  --accent-2: #f97316;
  --cyan: #12b6d8;
  --green: #39f40f;
  --shadow: 0 16px 45px rgba(35, 38, 52, 0.12);
  --radius: 8px;
  --content: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  background: #eeeeee;
  color: var(--ink);
  font-family: "Changa", Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

body[data-page="public"] {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

body[data-page="public"] * {
  -webkit-tap-highlight-color: transparent;
}

body[data-page="public"] :not(input):not(textarea):not(select):not([contenteditable="true"]) {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

body[data-page="public"] :not(input):not(textarea):not(select):not([contenteditable="true"])::selection {
  background: transparent;
  color: inherit;
}

body[data-page="public"] input,
body[data-page="public"] textarea,
body[data-page="public"] select,
body[data-page="public"] [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

body[data-page="public"] a,
body[data-page="public"] img,
body[data-page="public"] button {
  -webkit-user-drag: none;
  user-drag: none;
}

body[data-page="admin"] {
  background:
    radial-gradient(circle at top right, rgba(18, 182, 216, 0.12), transparent 32vw),
    linear-gradient(180deg, #eef1f7 0%, #e7ebf3 100%);
  font-family: Arial, Helvetica, sans-serif;
}

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

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

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  min-height: 76px;
  padding: 8px 10px;
  background: var(--nav);
  color: #fff;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}

.admin-header {
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  padding-inline: 14px;
}

.admin-header .brand {
  justify-content: flex-start;
  font-size: 1.45rem;
}

.admin-public-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

.admin-public-link:focus-visible {
  outline: 3px solid rgba(18, 182, 216, 0.55);
  outline-offset: 2px;
}

.admin-content {
  width: min(100%, 1120px);
  padding: 24px 16px 72px;
  background: transparent;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-width: 0;
  gap: 8px;
  color: #fff;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.32);
  white-space: nowrap;
}

.brand span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand img {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: contain;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.22));
}

.icon-button {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
}

.icon-button:focus-visible,
.drawer-close:focus-visible,
.upload-fab:focus-visible,
.form-actions button:focus-visible,
.download-link:focus-visible {
  outline: 3px solid rgba(18, 182, 216, 0.55);
  outline-offset: 2px;
}

.nav-toggle span {
  display: block;
  width: 34px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
}

.nav-toggle {
  gap: 5px;
}

.search-toggle svg,
.search-submit svg,
.upload-fab svg,
.meta svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-toggle .close-icon {
  display: none;
  width: 24px;
  height: 24px;
}

.search-toggle[aria-expanded="true"] .search-icon {
  display: none;
}

.search-toggle[aria-expanded="true"] .close-icon {
  display: block;
}

.search-panel {
  position: sticky;
  top: 76px;
  z-index: 24;
  max-height: 0;
  overflow: hidden;
  background: #fff;
  border-bottom: 0 solid transparent;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition:
    max-height 220ms ease,
    opacity 160ms ease,
    transform 220ms ease,
    box-shadow 220ms ease;
}

.search-panel.is-open {
  max-height: 82px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.08);
}

.search-wrap {
  position: relative;
  display: block;
  align-items: center;
  max-width: var(--content);
  margin: 0 auto;
  padding: 12px 20px 14px;
  color: #555;
  transform: translateY(-6px);
  transition: transform 220ms ease;
}

.search-panel.is-open .search-wrap {
  transform: translateY(0);
}

.search-wrap input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 50px;
  border: 1px solid #d7d7d7;
  border-radius: 0;
  padding: 0 52px 0 12px;
  color: #2f3037;
  background: #fff;
  font-size: 0.98rem;
  font-weight: 500;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.search-wrap input::placeholder {
  color: #8a8a8a;
  opacity: 1;
}

.search-wrap input:focus {
  border-color: #c9c9c9;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.search-submit {
  position: absolute;
  top: 12px;
  right: 20px;
  width: 48px;
  height: 50px;
  border: 0;
  border-left: 1px solid transparent;
  background: transparent;
  color: #555;
  display: grid;
  place-items: center;
  padding: 0;
}

.search-submit svg {
  width: 22px;
  height: 22px;
  stroke-width: 3;
}

.drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: min(86vw, 340px);
  overflow-y: auto;
  background: var(--nav);
  color: #fff;
  transform: translateX(-103%);
  transition: transform 220ms ease;
  box-shadow: 12px 0 34px rgba(0, 0, 0, 0.22);
}

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

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: none;
  border: 0;
  background: rgba(18, 20, 30, 0.46);
}

.drawer-backdrop.is-open {
  display: block;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.drawer-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
  font-size: 1.2rem;
  font-weight: 700;
}

.drawer-brand span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-brand img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: contain;
}

.drawer-close {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  padding: 7px 9px;
  background: transparent;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.drawer-nav a,
.drawer-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  width: 100%;
  padding: 0 26px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #fff;
  font-size: 1.42rem;
  font-weight: 400;
  text-transform: uppercase;
  text-align: left;
}

.drawer-menu-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

.drawer-menu-toggle.is-open svg {
  transform: rotate(90deg);
}

.drawer-nav a.is-active,
.drawer-nav a[aria-current="page"],
.drawer-nav a:hover,
.drawer-menu-toggle.is-active,
.drawer-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.09);
}

.admin-drawer-nav a.is-active,
.admin-drawer-nav a[aria-current="page"] {
  background: rgba(215, 49, 61, 0.26);
  color: #fff;
  font-weight: 700;
}

.genre-submenu {
  max-height: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  transition: max-height 260ms ease;
}

.genre-submenu.is-open {
  max-height: 72vh;
  overflow-y: auto;
}

.genre-submenu a {
  min-height: 58px;
  padding-left: 42px;
  font-size: 1.25rem;
}

.main-content {
  width: min(100%, var(--content));
  min-width: 0;
  margin: 0 auto;
  padding: 18px 12px 56px;
  background: #fff;
  min-height: calc(100vh - 136px);
}

.notice {
  position: relative;
  margin: 10px auto 32px;
  min-height: 70px;
  padding: 10px 34px 10px 14px;
  border-radius: 8px;
  background: var(--green);
  color: #193018;
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 800;
  text-align: center;
  overflow-wrap: anywhere;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.notice strong {
  color: #123bd1;
}

.notice button {
  position: absolute;
  top: 7px;
  right: 8px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 700;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  border-bottom: 4px solid #2f3034;
}

.section-title span {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  background: #2f3034;
  color: #fff;
  border-radius: 3px 3px 0 0;
  font-size: 1.06rem;
  font-weight: 700;
}

.feed {
  display: grid;
  gap: 38px;
}

.post-card {
  min-width: 0;
  background: var(--paper);
  border-bottom: 1px solid #eeeeee;
  padding-bottom: 28px;
  -webkit-tap-highlight-color: transparent;
}

.post-cover {
  display: block;
  overflow: hidden;
  border-radius: 0;
  background: #1b1c24;
  aspect-ratio: 16 / 9;
}

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

.post-kicker {
  margin: 18px 0 8px;
  color: var(--accent);
  font-size: 1.08rem;
  line-height: 1.35;
  font-weight: 800;
}

.post-title {
  margin: 0 0 16px;
  color: #333333;
  font-size: clamp(1.58rem, 6vw, 2.12rem);
  line-height: 1.32;
  font-weight: 800;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.post-title a {
  display: block;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  user-select: none;
  touch-action: manipulation;
}

.post-title a:hover,
.post-title a:focus-visible,
.post-title a:active {
  color: var(--accent);
}

.post-title::selection,
.post-title *::selection {
  background: transparent;
  color: inherit;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: #9c9c9c;
  font-size: 1.02rem;
  line-height: 1.4;
  font-weight: 700;
}

.meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.meta svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 24px;
  border: 1px dashed #ccd2dc;
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
  background: var(--soft);
}

.search-loading {
  display: grid;
  place-items: center;
  gap: 14px;
  min-height: 260px;
  padding: 34px 20px;
  color: #555;
  text-align: center;
}

.search-loading p {
  margin: 0;
  color: #5f6068;
  font-size: 1rem;
  font-weight: 700;
}

.search-spinner {
  width: 46px;
  height: 46px;
  border: 4px solid #eeeeee;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: axz-spin 780ms linear infinite;
}

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

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 7px;
  margin: 30px 0 10px;
  padding: 24px 0 4px;
  border-top: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

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

.pagination-link,
.pagination-next,
.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 38px;
  border-radius: 4px;
  color: #303038;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.pagination-link {
  background: #fff;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}

.pagination-link.is-active,
.pagination-next {
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}

.pagination-link:hover,
.pagination-link:focus-visible,
.pagination-link:active {
  background: var(--accent);
  color: #fff;
}

.pagination-link:active {
  transform: translateY(1px);
}

.pagination-next svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pagination-ellipsis {
  min-width: 20px;
  letter-spacing: 0;
}

.public-widgets {
  display: grid;
  gap: 28px;
  margin-top: 36px;
}

.social-widget,
.popular-widget,
.about-widget {
  min-width: 0;
}

.social-widget p {
  margin: 0 0 18px;
  color: #4d4f58;
  font-size: 1.06rem;
  font-weight: 700;
}

.social-widget strong {
  color: var(--accent);
}

.telegram-banner {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 128px;
  margin: 18px 0;
  padding: 16px;
  border: 2px solid #cbd8ec;
  border-radius: 8px;
  background: #fff;
  color: #0c2c66;
  font-size: 1.75rem;
  line-height: 1.15;
  font-weight: 500;
}

.telegram-banner img {
  width: 96px;
  height: 96px;
}

.telegram-banner span {
  overflow-wrap: anywhere;
}

.popular-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.popular-list a {
  display: block;
  color: var(--accent);
  font-size: 1.02rem;
  line-height: 1.45;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.about-widget {
  display: grid;
  gap: 22px;
  padding: 0 0 8px;
  background: #fff;
  color: #000;
}

.about-widget h2 {
  margin: 0;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: #25262d;
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 800;
}

.about-widget p {
  margin: 0;
  color: #000;
  font-size: 15px;
  line-height: 1.75;
  font-weight: 700;
}

.about-widget .about-center {
  text-align: center;
}

.about-telegram-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  align-items: center;
  gap: 18px;
  width: min(100%, 560px);
  min-height: 132px;
  margin: 10px auto;
  padding: 18px 28px;
  border: 3px solid #18b7de;
  border-radius: 8px;
  background: #fff;
  color: #22c1e7;
  font-size: 1.42rem;
  line-height: 1.25;
  text-align: center;
  font-weight: 500;
}

.about-telegram-card span {
  overflow-wrap: anywhere;
}

.about-telegram-card img {
  width: 86px;
  height: 86px;
}

.detail {
  min-width: 0;
  padding-bottom: 26px;
  background: #fff;
}

.detail-header {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.detail-header .post-kicker {
  margin: 0;
  text-transform: uppercase;
}

.detail-header .post-meta {
  color: #9b9ba5;
  font-weight: 700;
}

.detail-title {
  margin: 0;
  padding: 0;
  color: #2f3034;
  font-size: 2.25rem;
  line-height: 1.3;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.detail-cover {
  width: 100%;
  margin: 0 0 28px;
  text-align: center;
}

.detail-cover img {
  width: auto;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 0;
  background: #111;
}

.poster-frame {
  width: min(100%, 420px);
  margin: 34px auto 24px;
  text-align: center;
}

.poster-frame img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(27, 29, 41, 0.14);
}

.poster-frame figcaption {
  margin-top: 10px;
  color: var(--accent);
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 700;
}

.block-heading {
  margin: 34px 0 18px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: var(--accent);
  text-align: center;
  font-size: 2.05rem;
  font-weight: 700;
}

.info-heading {
  margin: 34px 0 18px;
  color: #000;
  font-size: 25px;
  line-height: 1.2;
  font-weight: 700;
}

.series-info {
  display: grid;
  gap: 10px;
  margin: 26px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.info-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: start;
}

.info-row dt {
  color: #24252d;
  font-weight: 700;
}

.info-row dd {
  margin: 0;
  color: #555761;
  font-weight: 500;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-list a {
  color: var(--accent);
}

.series-section {
  margin: 30px 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.series-info-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 28px;
  color: #000;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 700;
}

.series-info-list li {
  padding-left: 4px;
}

.series-info-list strong {
  white-space: nowrap;
  color: #000;
}

.series-info-list span {
  color: #42444c;
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.series-info-list .tag-list {
  display: inline;
}

.series-info-list .tag-list a {
  display: inline;
  color: var(--accent);
  font-weight: 700;
  overflow-wrap: normal;
  word-break: normal;
  white-space: nowrap;
}

.download-intro {
  margin: 24px 0 30px;
  color: #000;
  font-size: 15px;
  line-height: 1.75;
  font-weight: 700;
}

.storyline {
  margin: 26px 0;
  color: #4c4e58;
  font-size: 1.04rem;
  font-weight: 400;
}

.storyline p {
  margin: 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: #000;
  font-size: 15px;
  line-height: 1.75;
  font-weight: 700;
}

.screenshot-grid {
  display: grid;
  gap: 14px;
}

.screenshot-grid img {
  width: 100%;
  border-radius: 4px;
  background: #111;
  object-fit: cover;
}

.episode-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.episode-message {
  margin: 0 0 28px;
  padding: 22px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #43444d;
  background: #fbfcfe;
  text-align: center;
  font-size: 1.16rem;
  line-height: 1.55;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.episode-row {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 26px 8px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.episode-row strong {
  color: #43444d;
  font-size: 1.3rem;
  line-height: 1.4;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.episode-row small {
  color: var(--muted);
  font-weight: 800;
}

.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 44px;
  border-radius: 8px;
  color: var(--accent);
  background: #fff;
  font-size: 1.2rem;
  font-weight: 700;
}

.download-link:hover {
  background: #fff4f5;
}

.pack-box {
  margin: 34px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.season-box {
  margin: 34px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.season-box h2 {
  margin: 0 0 16px;
  color: #24252d;
  text-align: center;
  font-size: 1.45rem;
}

.season-links {
  display: grid;
  gap: 12px;
}

.season-links a {
  display: grid;
  gap: 4px;
  justify-items: center;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #3f4048;
  text-align: center;
}

.season-links span {
  color: var(--accent);
  font-weight: 700;
}

.pack-box h2 {
  margin: 0 0 18px;
  color: var(--accent-2);
  text-align: center;
  font-size: 1.65rem;
  font-weight: 700;
}

.pack-box h2::after {
  content: "";
  display: block;
  width: 86px;
  height: 5px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: var(--accent-2);
}

.pack-links {
  display: grid;
  gap: 12px;
}

.pack-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
  color: #3f4048;
  font-size: 1.16rem;
  font-weight: 700;
  text-align: center;
}

.download-page {
  position: relative;
  display: grid;
  gap: 30px;
  min-height: calc(100vh - 76px);
  margin: -18px -14px -56px;
  padding: 104px 28px 42px;
  overflow: hidden;
  background:
    linear-gradient(rgba(247, 249, 255, 0.76), rgba(247, 249, 255, 0.94)),
    url("assets/animexzone-logo-512.png") center 28px / min(78vw, 420px) no-repeat,
    linear-gradient(135deg, #eef5ff 0%, #f7f1ff 48%, #eefcff 100%);
}

.download-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.download-card,
.download-disclaimer {
  position: relative;
  z-index: 1;
}

.download-card {
  border: 1px solid rgba(229, 232, 239, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 35px rgba(31, 34, 48, 0.12);
}

.download-title-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 24px 22px;
  text-align: left;
}

.download-title-thumb {
  width: 76px;
  height: 56px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 7px;
  object-fit: cover;
  background: #101116;
  box-shadow: 0 6px 16px rgba(31, 34, 48, 0.16);
}

.download-title-card h1 {
  margin: 0;
  color: #24252d;
  font-size: 2rem;
  line-height: 1.25;
  font-weight: 700;
}

.download-options {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 28px;
}

.quality-card {
  display: grid;
  gap: 22px;
  justify-items: center;
  padding: 28px 18px;
  text-align: center;
}

.quality-card h2 {
  margin: 0;
  color: #24252d;
  font-size: 1.85rem;
  line-height: 1.2;
  font-weight: 700;
}

.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.filepress-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 154px;
  width: min(154px, 100%);
  max-width: 154px;
  min-width: 0;
  min-height: 50px;
  padding: 10px 14px;
  border-radius: 7px;
  background: #687483;
  color: #fff;
  font-size: 1.12rem;
  line-height: 1.15;
  font-weight: 700;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12);
}

.filepress-button:hover {
  background: #56616e;
}

.download-button-1 {
  background: #dd3348;
}

.download-button-1:hover {
  background: #c82d40;
}

.download-button-2 {
  background: #3f4650;
}

.download-button-2:hover {
  background: #343a43;
}

.download-missing {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.redirect-page {
  display: grid;
  align-items: start;
  min-height: calc(100vh - 76px);
  margin: -18px -14px -56px;
  padding: 96px 18px 48px;
  background:
    linear-gradient(rgba(247, 249, 255, 0.78), rgba(247, 249, 255, 0.92)),
    url("assets/animexzone-logo-512.png") center 28px / min(78vw, 420px) no-repeat,
    linear-gradient(135deg, #eef5ff 0%, #f7f1ff 48%, #eefcff 100%);
}

.redirect-card {
  position: relative;
  isolation: isolate;
  width: min(100%, 500px);
  margin: 0 auto;
  overflow: hidden;
  padding: 24px 18px;
  border: 1px solid rgba(216, 221, 231, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  text-align: center;
}

.redirect-card::before {
  content: "";
  position: absolute;
  inset: 20px;
  z-index: -1;
  background: url("assets/animexzone-logo-512.png") center / 220px no-repeat;
  opacity: 0.07;
}

.redirect-count,
.redirect-help-title,
.redirect-help-text {
  margin: 0;
  color: #3c3d46;
  font-weight: 700;
}

.redirect-card h1 {
  margin: 12px 0 18px;
  color: #24252d;
  font-size: 1.35rem;
  line-height: 1.35;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.redirect-download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  min-height: 54px;
  margin: 0 0 22px;
  border-radius: 8px;
  background: #2768d8;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(39, 104, 216, 0.24);
}

.redirect-download-button:hover {
  background: #1f58bd;
}

.redirect-download-button.is-waiting {
  background: #6f7683;
  box-shadow: 0 10px 22px rgba(83, 88, 100, 0.18);
}

.redirect-help-title {
  margin-top: 4px;
}

.redirect-help-text {
  margin-top: 8px;
  color: #5a5d68;
  font-size: 0.95rem;
  white-space: pre-line;
}

.redirect-pass-note {
  margin: 12px 0 0;
  color: #7a818d;
  font-size: 0.86rem;
  font-weight: 700;
}

.download-disclaimer {
  margin: 12px -28px -42px;
  padding: 28px 26px 34px;
  background: rgba(255, 255, 255, 0.94);
  color: #68707c;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
}

.download-disclaimer p {
  margin: 0;
}

.download-disclaimer p + p {
  margin-top: 22px;
}

.download-disclaimer strong {
  color: #168be8;
}

.suggestions {
  display: grid;
  gap: 18px;
}

.suggestion-card {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: 196px;
  border-radius: 4px;
  background: #161722;
  color: #fff;
}

.suggestion-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.54;
}

.suggestion-card span {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: 22px;
  text-align: center;
  font-size: 1.55rem;
  line-height: 1.32;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.55);
}

.author-box {
  margin: 34px 0 28px;
}

.author-box-head {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 4px solid #2d2d2d;
}

.author-box-head span {
  display: inline-flex;
  align-items: center;
  min-height: 58px;
  padding: 0 26px;
  border-radius: 4px 4px 0 0;
  background: #2d2d2d;
  color: #fff;
  font-size: 1.2rem;
  line-height: 1.2;
  font-weight: 800;
}

.author-box-head a {
  align-self: center;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: #303030;
  background: #fff;
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.author-profile {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 24px;
  align-items: center;
  padding: 34px 0 44px;
}

.author-profile img {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  object-fit: cover;
}

.author-profile h3 {
  margin: 0 0 18px;
  color: #2c2d32;
  font-size: 1.8rem;
  line-height: 1.15;
  font-weight: 800;
}

.author-profile p {
  margin: 0;
  color: #3c3d42;
  font-size: 1.15rem;
  line-height: 1.45;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.telegram-box {
  display: grid;
  gap: 16px;
  margin-top: 34px;
  padding: 20px;
  border-radius: 8px;
  background: #312b76;
  color: #fff;
}

.telegram-box p {
  margin: 0;
  font-weight: 700;
}

.telegram-card {
  display: grid;
  grid-template-columns: 1fr 72px;
  align-items: center;
  gap: 12px;
  min-height: 108px;
  padding: 18px;
  border: 3px solid var(--cyan);
  border-radius: 8px;
  color: #4ed4ef;
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 500;
}

.telegram-card span {
  overflow-wrap: anywhere;
}

.telegram-card img {
  width: 72px;
  height: 72px;
}

.admin {
  display: grid;
  gap: 24px;
}

.admin-tabs {
  position: sticky;
  top: 76px;
  z-index: 20;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px;
  border: 1px solid rgba(216, 221, 231, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 34px rgba(35, 38, 52, 0.11);
  backdrop-filter: blur(10px);
  scrollbar-width: thin;
}

.admin-tabs button,
.dashboard-actions button {
  flex: 0 0 auto;
  min-height: 40px;
  border: 1px solid #d8dde7;
  border-radius: 8px;
  padding: 9px 13px;
  background: #fff;
  color: #30313a;
  font-size: 0.94rem;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.admin-tabs button.is-active,
.dashboard-actions button:hover,
.admin-tabs button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 20px rgba(215, 49, 61, 0.18);
}

.admin-tabs button:hover,
.dashboard-actions button:hover {
  transform: translateY(-1px);
}

.dashboard-actions button.danger-action {
  border-color: #f1b8bd;
  color: #b42331;
}

.dashboard-actions button.danger-action:hover {
  border-color: #b42331;
  background: #b42331;
  color: #fff;
}

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

.stat-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 16px;
  border: 1px solid rgba(216, 221, 231, 0.9);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
  box-shadow: 0 12px 26px rgba(35, 38, 52, 0.08);
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
}

.stat-card span {
  color: var(--muted);
  font-weight: 700;
}

.stat-card strong {
  color: #24252d;
  font-size: clamp(1.45rem, 3.5vw, 1.9rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

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

.admin-section {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding-top: 2px;
}

.admin-section + .admin-section {
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.admin-section-head {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.admin-section-head h2 {
  margin: 0;
  color: #24252d;
  font-size: clamp(1.24rem, 2.8vw, 1.55rem);
  line-height: 1.2;
  font-weight: 700;
}

.admin-section-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.admin-section-grid {
  display: grid;
  gap: 16px;
}

.admin-hero {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(55, 48, 127, 0.96), rgba(36, 37, 45, 0.98)),
    url("assets/animexzone-logo-512.png") right -60px center / 220px no-repeat;
  color: #fff;
  box-shadow: 0 18px 42px rgba(41, 36, 95, 0.24);
}

.admin-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  line-height: 1.2;
}

.admin-hero p {
  margin: 0;
  color: #d7d9e2;
  font-weight: 400;
}

.admin-hero .admin-mode {
  margin-top: 10px;
  color: #fff;
  font-weight: 700;
}

.admin-status,
.auth-error {
  margin: 0;
  color: #555761;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.auth-error {
  color: var(--accent);
}

.admin-status code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92rem;
}

.admin-panel {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(216, 221, 231, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(35, 38, 52, 0.08);
}

.field-grid {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: #34343c;
  font-weight: 700;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-width: 0;
  border: 1px solid #d8dde7;
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: #33343b;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(18, 182, 216, 0.85);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(18, 182, 216, 0.14);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field textarea.shortener-links {
  min-height: 84px;
}

.field textarea.direct-links {
  min-height: 84px;
  background: #fbfcff;
}

.field small {
  color: var(--muted);
  font-weight: 400;
}

.field.is-muted textarea,
.field textarea:disabled {
  background: #f1f3f7;
  color: #8c8d98;
  cursor: not-allowed;
}

.genre-value-input,
.quality-value-input {
  background: #f7f8fb;
  color: #555761;
}

.genre-picker,
.quality-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid #d8dde7;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.quality-picker {
  max-height: none;
}

.genre-chip,
.quality-chip {
  min-height: 36px;
  border: 1px solid #d8dde7;
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff;
  color: #34343c;
  font-size: 0.92rem;
  font-weight: 700;
}

.genre-chip.is-selected,
.quality-chip.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.quality-link-grid {
  display: grid;
  gap: 12px;
}

.quality-link-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d8dde7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(35, 38, 52, 0.05);
}

.quality-link-field {
  display: grid;
  gap: 6px;
}

.quality-link-field span {
  color: #555865;
  font-size: 0.86rem;
  font-weight: 800;
}

.button-label-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.button-chip {
  min-height: 30px;
  border: 1px solid rgba(221, 51, 51, 0.28);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(221, 51, 51, 0.08);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.button-chip:hover,
.button-chip:focus-visible {
  background: var(--accent);
  color: #fff;
}

.quality-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #34343c;
  font-weight: 700;
}

.quality-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.season-link-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.season-link-picker button {
  min-height: 44px;
  border: 1px solid #d8dde7;
  border-radius: 8px;
  padding: 10px 14px;
  background: #fff;
  color: #30313a;
  font-weight: 700;
}

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

.form-actions button,
.form-actions label {
  flex: 0 1 auto;
  min-width: 118px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  background: #30313a;
  color: #fff;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.form-actions button:hover,
.form-actions label:hover,
.mini-post-actions button:hover,
.mini-post-actions a:hover,
.season-link-picker button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(35, 38, 52, 0.12);
}

.form-actions .danger {
  background: var(--accent);
}

.form-actions .light {
  border: 1px solid #d8dde7;
  background: #fff;
  color: #30313a;
}

.form-actions input[type="file"] {
  display: none;
}

.mini-list {
  display: grid;
  gap: 12px;
}

.admin-list-count {
  color: #676b76;
  font-size: 0.92rem;
  font-weight: 700;
}

.admin-list-toolbar {
  display: grid;
  gap: 7px;
}

.admin-list-toolbar label {
  color: #34343c;
  font-weight: 700;
}

.admin-list-toolbar input {
  width: 100%;
  min-width: 0;
  border: 1px solid #d8dde7;
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: #33343b;
  font-weight: 700;
}

.admin-list-toolbar input:focus {
  border-color: rgba(18, 182, 216, 0.85);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(18, 182, 216, 0.14);
}

.admin-export-all {
  justify-self: start;
}

.admin-empty {
  padding: 14px;
  border: 1px dashed #ccd2dc;
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-weight: 700;
}

.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 8px 0 0;
}

.admin-pagination button,
.admin-pagination span {
  min-width: 38px;
  min-height: 38px;
  border: 1px solid #d8dde7;
  border-radius: 8px;
  background: #fff;
  color: #30313a;
  font-weight: 800;
}

.admin-pagination button {
  cursor: pointer;
}

.admin-pagination button.is-active {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.admin-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.admin-pagination span {
  display: inline-grid;
  place-items: center;
  border-color: transparent;
  background: transparent;
}

.mini-post {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(216, 221, 231, 0.92);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(35, 38, 52, 0.06);
}

.mini-post.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(215, 49, 61, 0.1);
}

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

.mini-post-main img {
  width: 72px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  background: #f0f2f7;
}

.mini-post strong {
  display: block;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.mini-post small,
.mini-post em {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 700;
}

.mini-post-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 8px;
}

.mini-post-actions button,
.mini-post-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 1px solid #d8dde7;
  border-radius: 7px;
  padding: 6px 10px;
  background: #fff;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.selected-anime {
  margin: 0;
  color: #4d4f58;
  font-weight: 700;
}

.selected-anime strong {
  color: var(--accent);
}

.quick-episode-panel[hidden] {
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 70;
  width: min(92vw, 420px);
  transform: translate(-50%, 120px);
  padding: 13px 16px;
  border-radius: 8px;
  background: #24252d;
  color: #fff;
  text-align: center;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: transform 180ms ease;
}

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

.upload-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 35;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 28px rgba(215, 49, 61, 0.35);
}

.upload-fab svg {
  width: 30px;
  height: 30px;
  stroke-width: 3.2;
}

.site-footer {
  width: min(100%, var(--content));
  margin: 0 auto;
  padding: 24px 16px 84px;
  background: var(--nav);
  color: #e9ecf2;
  text-align: center;
  font-weight: 400;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 560px) {
  .site-header {
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    min-height: 52px;
    padding: 4px 8px;
  }

  .admin-header {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .brand {
    gap: 7px;
    font-size: 1.18rem;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.28);
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .admin-header .brand {
    font-size: 1.08rem;
  }

  .admin-public-link {
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.88rem;
  }

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

  .nav-toggle span {
    width: 30px;
    height: 4px;
  }

  .search-panel {
    top: 52px;
  }

  .main-content {
    padding: 14px 20px 46px;
    min-height: calc(100vh - 104px);
  }

  .notice {
    margin: 10px auto 36px;
    min-height: 72px;
    padding: 10px 34px 10px 14px;
    font-size: 1rem;
    line-height: 1.5;
  }

  .feed {
    gap: 42px;
  }

  .feed .post-card {
    padding-bottom: 30px;
  }

  .feed .post-cover {
    aspect-ratio: 16 / 9;
  }

  .feed .post-kicker {
    margin: 14px 0 5px;
    font-size: 0.98rem;
    line-height: 1.55;
    font-weight: 800;
  }

  .feed .post-title {
    margin-bottom: 15px;
    font-size: 1.56rem;
    line-height: 1.4;
    font-weight: 800;
  }

  .feed .meta {
    gap: 8px 16px;
    font-size: 0.86rem;
    line-height: 1.4;
  }

  .feed .meta svg {
    width: 15px;
    height: 15px;
  }

  .admin-content {
    padding: 14px 10px 46px;
  }

  .section-title {
    margin-bottom: 14px;
  }

  .section-title span {
    min-height: 42px;
    padding: 0 12px;
    font-size: 0.98rem;
  }

  .detail-title {
    font-size: 1.7rem;
  }

  .poster-frame figcaption,
  .block-heading {
    font-size: 1.55rem;
  }

  .episode-row strong {
    font-size: 1.12rem;
  }

  .download-title-card h1 {
    font-size: 1.5rem;
  }

  .quality-card h2 {
    font-size: 1.45rem;
  }

  .redirect-card h1 {
    font-size: 1.18rem;
  }

  .download-disclaimer {
    font-size: 1.02rem;
  }

  .suggestion-card span {
    font-size: 1.24rem;
  }

  .search-loading {
    min-height: 220px;
    padding: 28px 14px;
  }

  .telegram-card {
    font-size: 1.16rem;
  }

  .admin-hero h1 {
    font-size: 1.65rem;
  }

  .admin-panel,
  .admin-hero,
  .series-info,
  .pack-box {
    padding: 14px;
  }

  .admin-hero {
    background:
      linear-gradient(135deg, rgba(55, 48, 127, 0.98), rgba(36, 37, 45, 0.98)),
      url("assets/animexzone-logo-512.png") right -52px top -38px / 160px no-repeat;
  }

  .admin {
    gap: 22px;
  }

  .admin-tabs {
    top: 66px;
    margin-inline: -2px;
    padding: 7px;
    gap: 7px;
  }

  .admin-tabs button,
  .dashboard-actions button {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 0.9rem;
  }

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

  .stat-card {
    min-height: 96px;
    padding: 13px;
  }

  .stat-card strong {
    font-size: 1.4rem;
  }

  .admin-section + .admin-section {
    padding-top: 22px;
  }

  .admin-section-head h2 {
    font-size: 1.22rem;
  }

  .genre-picker {
    max-height: 260px;
    gap: 7px;
    padding: 8px;
  }

  .genre-chip,
  .quality-chip {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 0.86rem;
  }

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

  .form-actions button,
  .form-actions label {
    width: 100%;
    min-width: 0;
  }

  .season-link-picker {
    grid-template-columns: 1fr;
  }

  .season-link-picker button {
    width: 100%;
  }

  .mini-post-main {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 10px;
  }

  .mini-post-main img {
    width: 60px;
    height: 46px;
  }

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

  .mini-post-actions button,
  .mini-post-actions a {
    min-width: 0;
    padding-inline: 6px;
    font-size: 0.9rem;
  }

  .telegram-banner,
  .telegram-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .telegram-banner {
    min-height: 0;
    padding: 14px;
    font-size: 1.35rem;
  }

  .telegram-banner img {
    width: 82px;
    height: 82px;
  }

  .telegram-card img {
    width: 64px;
    height: 64px;
  }

  .download-page {
    min-height: calc(100vh - 66px);
    margin: -14px -10px -46px;
    padding: 72px 16px 34px;
    gap: 20px;
    background:
      linear-gradient(rgba(247, 249, 255, 0.82), rgba(247, 249, 255, 0.94)),
      url("assets/animexzone-logo-512.png") center 24px / 260px no-repeat,
      linear-gradient(135deg, #eef5ff 0%, #f7f1ff 48%, #eefcff 100%);
  }

  .download-title-card,
  .quality-card {
    padding: 20px 14px;
  }

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

  .download-title-thumb {
    width: 64px;
    height: 48px;
  }

  .filepress-button,
  .redirect-download-button {
    width: 100%;
    min-width: 0;
  }

  .filepress-button {
    flex: 1 1 calc(50% - 7px);
    width: auto;
    min-width: 112px;
    max-width: 154px;
  }

  .download-disclaimer {
    margin: 8px -16px -34px;
    padding: 22px 16px 28px;
  }

  .redirect-page {
    min-height: calc(100vh - 66px);
    margin: -14px -10px -46px;
    padding: 78px 12px 36px;
    background:
      linear-gradient(rgba(247, 249, 255, 0.82), rgba(247, 249, 255, 0.94)),
      url("assets/animexzone-logo-512.png") center 24px / 260px no-repeat,
      linear-gradient(135deg, #eef5ff 0%, #f7f1ff 48%, #eefcff 100%);
  }

  .redirect-card {
    padding: 20px 14px;
  }
}

@media (max-width: 420px) {
  .brand span {
    max-width: calc(100vw - 178px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .admin-header .brand span {
    max-width: calc(100vw - 158px);
  }

  .info-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .author-box-head {
    gap: 8px;
  }

  .author-box-head span {
    min-height: 52px;
    padding: 0 16px;
    font-size: 1rem;
  }

  .author-box-head a {
    padding: 11px 12px;
    font-size: 0.74rem;
  }

  .author-profile {
    grid-template-columns: 58px 1fr;
    gap: 16px;
    padding: 28px 0 38px;
  }

  .author-profile img {
    width: 58px;
    height: 58px;
  }

  .author-profile h3 {
    margin-bottom: 12px;
    font-size: 1.45rem;
  }

  .author-profile p {
    font-size: 1rem;
  }

}

@media (max-width: 360px) {
  .site-header {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    min-height: 50px;
    padding: 4px 7px;
  }

  .admin-header {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }

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

  .brand {
    font-size: 1.04rem;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .admin-public-link {
    min-height: 34px;
    padding: 0 8px;
    font-size: 0.8rem;
  }

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

  .search-panel {
    top: 50px;
  }

  .drawer-nav a,
  .drawer-menu-toggle {
    min-height: 62px;
    padding-inline: 18px;
    font-size: 1.15rem;
  }

  .genre-submenu a {
    min-height: 52px;
    padding-left: 30px;
    font-size: 1.05rem;
  }

  .post-title,
  .detail-title {
    font-size: 1.45rem;
  }

  .mini-post-actions {
    grid-template-columns: 1fr;
  }

  .pagination {
    justify-content: center;
    gap: 4px;
    padding-top: 20px;
  }

  .pagination-link,
  .pagination-next,
  .pagination-ellipsis {
    min-width: 24px;
    height: 40px;
    font-size: 0.86rem;
  }

  .pagination-link {
    background: transparent;
  }

  .pagination-link.is-active,
  .pagination-next {
    min-width: 40px;
    border-radius: 4px;
  }

  .pagination-next svg {
    width: 16px;
    height: 16px;
  }

  .pagination-ellipsis {
    min-width: 18px;
  }
}


@media (min-width: 760px) {
  .site-header {
    grid-template-columns: 66px 1fr 66px;
  }

  .main-content {
    padding: 28px 24px 64px;
  }

  .admin-content {
    padding: 30px 24px 72px;
  }

  .download-page {
    margin: -28px -24px -64px;
    padding: 116px 42px 48px;
  }

  .redirect-page {
    margin: -28px -24px -64px;
    padding: 116px 28px 56px;
  }

  .download-disclaimer {
    margin: 12px -42px -48px;
  }

  .feed {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .post-title {
    font-size: 2.35rem;
  }

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

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

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

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

  .admin-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .defaults-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
    align-items: start;
  }

  .quick-episode-grid {
    grid-template-columns: 84px 1.2fr 1.9fr 92px;
  }

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

  .mini-post {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .mini-post-actions {
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  }

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

@media (min-width: 1080px) {
  .field-grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .admin-section-grid.defaults-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
