:root {
  --bg: #03050a;
  --panel: rgba(8, 13, 20, 0.78);
  --panel-soft: rgba(12, 18, 27, 0.62);
  --line: rgba(232, 238, 246, 0.22);
  --line-strong: rgba(255, 255, 255, 0.4);
  --text: #f7f2ec;
  --muted: #b8c1cc;
  --dim: #7d8796;
  --blue: #2f8fff;
  --ice: #9be7ff;
  --red: #e33728;
  --gold: #d6a45d;
  --green: #82c66e;
  --violet: #875fff;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(520px, 1.5fr) minmax(260px, 0.9fr);
  align-items: center;
  gap: 24px;
  padding: 18px clamp(18px, 3vw, 42px);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0));
}

.brand {
  display: grid;
  gap: 4px;
  width: max-content;
  font-family: Georgia, "Times New Roman", serif;
  text-shadow: 0 0 18px rgba(88, 166, 255, 0.38);
}

.brand-title {
  position: relative;
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1;
  letter-spacing: 0.04em;
}

.brand-title::after {
  position: absolute;
  top: -8px;
  left: 47%;
  width: 26px;
  height: 46px;
  content: "";
  background:
    linear-gradient(90deg, transparent 45%, #cfeaff 48% 52%, transparent 55%),
    linear-gradient(0deg, transparent 44%, #4da3ff 48% 52%, transparent 56%);
  filter: drop-shadow(0 0 8px #4da3ff);
}

.brand-sub {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.74rem;
  letter-spacing: 0.28em;
}

.nav {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 2.2vw, 34px);
}

.nav a {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 54px;
  color: rgba(255, 255, 255, 0.9);
}

.nav strong {
  font-size: 0.96rem;
}

.nav span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
  font-family: Georgia, "Times New Roman", serif;
}

.nav a:hover,
.tool-link:hover {
  color: var(--ice);
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 18px;
}

.search-box {
  display: flex;
  width: min(300px, 100%);
  height: 42px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.24);
}

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

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.tool-link {
  font-size: 1.4rem;
  line-height: 1;
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  padding: 96px clamp(18px, 3.6vw, 64px) 34px;
}

.hero-bg,
.hero-vignette {
  position: absolute;
  inset: 0;
}

.hero-bg {
  background-image: url("assets/element-cross-cover-current.png?v=20260531-cover3");
  background-position: center top;
  background-size: cover;
}

.hero-vignette {
  background:
    radial-gradient(circle at 50% 22%, rgba(33, 112, 255, 0.18), transparent 20%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.4), transparent 30%, transparent 70%, rgba(0, 0, 0, 0.46)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.12) 48%, rgba(0, 0, 0, 0.82) 74%, #03050a 100%);
}

.hero-center {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  width: min(640px, 92vw);
  margin: 22vh auto 0;
  text-align: center;
  text-shadow: 0 6px 28px rgba(0, 0, 0, 0.9);
}

.hero-center h1 {
  position: relative;
  margin: 0 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.8rem, 8.2vw, 8.1rem);
  line-height: 0.78;
  letter-spacing: 0.02em;
}

.hero-center h1 span {
  color: #8e0d09;
}

.hero-subtitle {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 2vw, 1.45rem);
  letter-spacing: 0.22em;
}

.hero-copy {
  max-width: 360px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.9;
}

.read-button {
  display: inline-flex;
  min-width: 230px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 12px 28px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.94);
  color: #04060b;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.35);
}

.read-button:hover {
  background: #fff;
}

.hero-dots {
  display: flex;
  gap: 18px;
  margin-top: 16px;
}

.hero-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.hero-dots .active {
  background: #fff;
  box-shadow: 0 0 12px #fff;
}

.hero-names {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.name {
  position: absolute;
  display: grid;
  gap: 12px;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.95);
}

.name small {
  color: rgba(255, 255, 255, 0.84);
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
}

.name.volt { left: 5.4%; bottom: 24%; color: #e8f1ff; }
.name.ash { left: 21%; bottom: 25%; color: #fff0e8; }
.name.null { right: 29%; bottom: 23%; color: #f7f4ef; }
.name.mirage { right: 6%; bottom: 25%; color: #cfe9ff; }

.hero-dashboard {
  position: absolute;
  right: clamp(18px, 3.6vw, 64px);
  bottom: 34px;
  left: clamp(18px, 3.6vw, 64px);
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(310px, 0.9fr);
  gap: 16px;
}

.glass-panel {
  background: linear-gradient(135deg, rgba(13, 19, 28, 0.82), rgba(4, 7, 12, 0.72));
  border: 1px solid var(--line);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.latest-panel,
.info-panel {
  padding: 14px 18px;
}

.panel-heading {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 12px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 1.25rem;
}

.panel-heading span,
.panel-en {
  color: var(--dim);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-heading a {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
}

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

.episode-card {
  position: relative;
  display: grid;
  min-height: 168px;
  align-content: end;
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--line);
  background: #111722;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.episode-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: var(--cover);
  background-position: center;
  background-size: cover;
  opacity: 0.86;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.episode-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.92));
}

.episode-card:hover::before {
  opacity: 1;
  transform: scale(1.05);
}

.episode-card > * {
  position: relative;
  z-index: 1;
}

.episode-card h3 {
  margin: 0 0 5px;
  font-size: 1.05rem;
}

.episode-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.86rem;
}

.info-panel h2 {
  margin: 0 0 2px;
  font-size: 1.1rem;
}

dl {
  display: grid;
  gap: 7px;
  margin: 12px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

dl div {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 12px;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
}

.creator-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 14px;
  align-items: center;
  margin: 14px 0 16px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.04);
}

.creator-card span,
.creator-card a {
  display: block;
}

.creator-card span {
  color: var(--dim);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.creator-card a {
  margin-top: 5px;
  color: var(--ice);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.creator-card img {
  display: block;
  width: 108px;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #fff;
}

.story-brief h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.story-brief p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.site-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-stats span {
  color: var(--muted);
  font-size: 0.86rem;
}

.site-stats strong {
  color: var(--ice);
  font-size: 1.25rem;
  letter-spacing: 0;
}

.share-panel {
  margin-top: 16px;
}

.share-panel h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

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

.share-button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.share-button:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.1);
}

.share-button.instagram {
  border-color: rgba(232, 82, 141, 0.46);
}

.share-button.threads {
  border-color: rgba(255, 255, 255, 0.34);
}

.share-button.facebook {
  border-color: rgba(80, 140, 255, 0.48);
}

.share-button.dcard {
  border-color: rgba(59, 172, 255, 0.48);
}

.share-button.line {
  border-color: rgba(60, 210, 96, 0.48);
}

.share-status {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--ice);
  font-size: 0.8rem;
  font-weight: 800;
}

.comment-overview {
  margin-top: 16px;
}

.comment-overview h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.comment-ticker {
  position: relative;
  height: 190px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
}

.comment-ticker::before,
.comment-ticker::after {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 1;
  height: 30px;
  content: "";
  pointer-events: none;
}

.comment-ticker::before {
  top: 0;
  background: linear-gradient(180deg, #070b12, rgba(7, 11, 18, 0));
}

.comment-ticker::after {
  bottom: 0;
  background: linear-gradient(0deg, #070b12, rgba(7, 11, 18, 0));
}

.comment-ticker-list {
  display: grid;
  gap: 10px;
  padding: 12px;
  animation: commentTicker 22s linear infinite;
}

.comment-ticker:hover .comment-ticker-list {
  animation-play-state: paused;
}

.comment-ticker article {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.24);
}

.comment-ticker strong {
  color: var(--ice);
  font-size: 0.86rem;
}

.comment-ticker span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
}

.comment-ticker p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@keyframes commentTicker {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-50%);
  }
}

.system-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 16px;
  padding: 24px clamp(18px, 3.6vw, 64px) 76px;
  background:
    radial-gradient(circle at 20% 0%, rgba(47, 143, 255, 0.13), transparent 28%),
    #03050a;
}

.system-panel,
.factors-panel {
  padding: 20px 24px;
}

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

.element-grid article,
.factor-grid article {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  text-align: center;
}

.element-grid strong {
  font-size: 1.14rem;
}

.element-grid small {
  color: var(--muted);
  text-transform: uppercase;
}

.element-grid em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.factor-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.sigil {
  position: relative;
  display: block;
  width: 62px;
  height: 62px;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 0 22px currentColor;
}

.sigil::before,
.sigil::after {
  position: absolute;
  inset: 12px;
  content: "";
  border: 2px solid currentColor;
  transform: rotate(45deg);
}

.sigil::after {
  inset: 22px;
  border-radius: 50%;
  transform: none;
  background: currentColor;
}

.fire { color: var(--red); }
.volt { color: var(--blue); }
.glacier { color: var(--ice); }
.mirage { color: var(--green); }
.grave { color: var(--gold); }
.choir { color: #f2f0e8; }
.null,
.null-blue { color: var(--violet); }

.admin-section {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(320px, 0.58fr);
  gap: clamp(22px, 5vw, 70px);
  padding: 76px clamp(18px, 3.6vw, 64px);
  background:
    radial-gradient(circle at 78% 18%, rgba(227, 55, 40, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.admin-copy h2,
.reader-head h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.admin-copy p,
#readerMeta {
  color: var(--muted);
  line-height: 1.8;
}

.publish-note {
  padding: 14px 16px;
  border-left: 3px solid var(--gold);
  background: rgba(214, 164, 93, 0.08);
}

.subtle-note {
  border-color: rgba(155, 231, 255, 0.7);
  background: rgba(47, 143, 255, 0.08);
}

.upload-form {
  display: grid;
  gap: 15px;
  padding: 22px;
}

.mode-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(47, 143, 255, 0.32);
  background: rgba(47, 143, 255, 0.09);
}

.mode-card strong {
  color: var(--ice);
}

.mode-card span {
  color: var(--muted);
  line-height: 1.6;
}

.admin-login,
.upload-fields {
  display: grid;
  gap: 15px;
}

.admin-login h3 {
  margin: 0;
  font-size: 1.05rem;
}

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

.small-button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.92);
  color: #05070b;
  cursor: pointer;
  font-weight: 900;
}

.small-button.ghost {
  background: transparent;
  color: var(--text);
}

.locked-message {
  padding: 14px 16px;
  border: 1px solid rgba(214, 164, 93, 0.36);
  background: rgba(214, 164, 93, 0.08);
  color: var(--muted);
  line-height: 1.7;
}

.upload-form label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.upload-form input,
.upload-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.upload-form textarea {
  resize: vertical;
  line-height: 1.7;
}

.characters-section {
  padding: 76px clamp(18px, 3.6vw, 64px);
  background:
    radial-gradient(circle at 78% 20%, rgba(135, 95, 255, 0.14), transparent 26%),
    #03050a;
}

.announcements-section {
  margin: 24px clamp(18px, 3.6vw, 64px) 0;
  padding: 20px 24px;
}

.announcement-list {
  display: grid;
  gap: 10px;
}

.announcement-card {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.045);
}

.announcement-card h3,
.announcement-card p {
  margin: 0;
}

.announcement-card span {
  display: block;
  margin: 6px 0;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 900;
}

.announcement-card p {
  color: var(--muted);
  line-height: 1.7;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.character-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(13, 19, 28, 0.88), rgba(4, 7, 12, 0.78));
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.character-card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: #111722;
}

.character-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.character-body h3,
.character-body p {
  margin: 0;
}

.character-body span {
  color: var(--gold);
  font-size: 0.86rem;
  font-weight: 900;
}

.character-body p {
  color: var(--muted);
  line-height: 1.65;
}

.catalog-section {
  margin: 24px clamp(18px, 3.6vw, 64px) 0;
  padding: 20px 24px;
}

.catalog-list {
  display: grid;
  gap: 10px;
}

.volume-group {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
}

.volume-heading {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 14px;
  border: 0;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.volume-heading:hover {
  background: rgba(255, 255, 255, 0.075);
}

.folder-icon {
  color: var(--gold);
  font-size: 0.9rem;
}

.volume-heading h3 {
  margin: 0;
  font-size: 1.08rem;
}

.volume-heading em {
  color: var(--gold);
  font-size: 0.84rem;
  font-weight: 900;
  font-style: normal;
  white-space: nowrap;
}

.volume-episodes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.catalog-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.manage-item[draggable="true"] {
  cursor: grab;
}

.manage-item.dragging {
  opacity: 0.5;
}

.drag-handle {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--muted);
  cursor: grab;
}

.catalog-item strong,
.catalog-item span {
  display: block;
}

.catalog-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.catalog-item em {
  color: var(--ice);
  font-style: normal;
  font-weight: 900;
}

.character-upload {
  display: grid;
  gap: 15px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.announcement-upload,
.preview-panel {
  display: grid;
  gap: 15px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.page-preview-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.upload-size-meter {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(130, 220, 255, 0.28);
  background: rgba(77, 199, 255, 0.07);
}

.upload-size-meter strong {
  color: var(--ice);
}

.upload-size-meter span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.upload-size-meter[data-level="warning"] {
  border-color: rgba(213, 170, 98, 0.55);
  background: rgba(213, 170, 98, 0.1);
}

.upload-size-meter[data-level="warning"] strong {
  color: var(--gold);
}

.upload-size-meter[data-level="danger"] {
  border-color: rgba(255, 96, 96, 0.58);
  background: rgba(255, 74, 74, 0.1);
}

.upload-size-meter[data-level="danger"] strong {
  color: #ff9c9c;
}

.page-preview-item {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.045);
  cursor: grab;
}

.page-preview-item.dragging {
  opacity: 0.45;
}

.page-preview-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #111722;
}

.page-preview-item span {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.form-button {
  width: 100%;
  border: 0;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--ice);
  font-weight: 800;
}

.manage-panel {
  display: grid;
  gap: 12px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.manage-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.manage-heading h3 {
  margin: 0;
  font-size: 1.05rem;
}

.manage-heading span {
  color: var(--muted);
  font-size: 0.86rem;
}

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

.manage-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.045);
}

.manage-item strong,
.manage-item span {
  display: block;
}

.manage-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

.delete-button {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid rgba(227, 55, 40, 0.72);
  border-radius: 3px;
  background: rgba(227, 55, 40, 0.12);
  color: #ffb4ad;
  cursor: pointer;
  font-weight: 900;
}

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

.edit-button {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid rgba(155, 231, 255, 0.68);
  border-radius: 3px;
  background: rgba(47, 143, 255, 0.12);
  color: var(--ice);
  cursor: pointer;
  font-weight: 900;
}

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

.reader-section {
  padding: 76px clamp(0px, 4vw, 56px);
  background: #030407;
}

.reader-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 28px clamp(18px, 4vw, 56px) 0;
}

.comments-panel {
  width: min(100%, 980px);
  margin: 28px auto 0;
  padding: clamp(18px, 3vw, 28px);
}

.comment-form {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.comment-form label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 800;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  padding: 12px 13px;
  font: inherit;
}

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

.comment-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
}

.comment-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.comment-card strong {
  color: var(--ice);
}

.comment-card time {
  color: var(--muted);
  font-size: 0.84rem;
}

.comment-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.75;
  white-space: pre-wrap;
}

.ghost-reader {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.reader-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(18px, 4vw, 56px) 24px;
}

.comic-scroll {
  display: grid;
  justify-items: center;
  width: min(100%, 980px);
  margin: 0 auto;
  background: #07090d;
  border-inline: 1px solid rgba(255, 255, 255, 0.1);
}

.comic-scroll img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.empty-reader {
  display: grid;
  min-height: 480px;
  place-content: center;
  gap: 10px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.empty-reader strong {
  color: var(--text);
  font-size: 2rem;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 3.6vw, 64px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.character-dialog {
  width: min(920px, calc(100vw - 28px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #060912;
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
}

.character-dialog::backdrop {
  background: rgba(0, 0, 0, 0.74);
}

.character-dialog[open] {
  display: grid;
  grid-template-columns: minmax(260px, 0.48fr) minmax(0, 0.52fr);
}

.character-dialog img {
  width: 100%;
  height: 100%;
  max-height: 82vh;
  object-fit: contain;
  background: #111722;
}

.dialog-copy {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: clamp(22px, 4vw, 42px);
}

.dialog-copy span {
  color: var(--gold);
  font-weight: 900;
}

.dialog-copy h2,
.dialog-copy p {
  margin: 0;
}

.dialog-copy h2 {
  font-size: clamp(1.8rem, 4vw, 3.4rem);
}

.dialog-copy p {
  color: var(--muted);
  line-height: 1.85;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.54);
  color: var(--text);
  cursor: pointer;
  font-size: 1.5rem;
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 12px;
    position: absolute;
  }

  .nav {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .header-tools {
    justify-content: flex-start;
  }

  .hero {
    min-height: 980px;
    padding-top: 156px;
  }

  .hero-center {
    margin-top: 18vh;
  }

  .hero-dashboard,
  .system-wrap,
  .admin-section {
    grid-template-columns: 1fr;
  }

  .hero-dashboard {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    margin-top: 120px;
  }

  .name {
    display: none;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 16px 18px;
  }

  .header-tools {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 144px 14px 28px;
  }

  .hero-bg {
    background-position: 57% top;
  }

  .hero-center {
    margin-top: 18vh;
  }

  .hero-center h1 {
    font-size: 3.2rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .read-button {
    min-width: 210px;
  }

  .hero-dashboard {
    margin-top: 86px;
  }

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

  .episode-card {
    min-height: 176px;
  }

  .element-grid,
  .factor-grid,
  .character-grid,
  .volume-episodes,
  .page-preview-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .system-wrap,
  .admin-section {
    padding-inline: 14px;
  }

  .reader-head,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .comic-scroll {
    border-inline: 0;
  }

  .reader-actions .read-button {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .volume-episodes,
  .character-dialog[open] {
    grid-template-columns: 1fr;
  }

  .character-dialog img {
    max-height: 56vh;
  }
}

/* Exact cover mode: the uploaded concept image is the full first-screen design. */
.app-header {
  display: none;
}

.hero {
  display: block !important;
  min-height: 0 !important;
  padding: 0 !important;
  background: #03050a;
  overflow: hidden;
}

.hero img {
  display: block;
  width: 100%;
  height: auto;
}

.content-wrap {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(310px, 0.9fr);
  gap: 16px;
  padding: 24px clamp(18px, 3.6vw, 64px) 12px;
  background:
    radial-gradient(circle at 20% 0%, rgba(47, 143, 255, 0.12), transparent 28%),
    #03050a;
}

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

@media (max-width: 760px) {
  .hero {
    padding: 0 !important;
  }

  .hero img {
    width: 100%;
    min-width: 0;
    transform: none;
  }

  .content-wrap {
    padding-inline: 14px;
  }

  .creator-card {
    grid-template-columns: 1fr;
  }

  .creator-card img {
    width: min(100%, 180px);
  }
}
