:root {
  --brand: #ffc400;
  --green: #03cf5d;
  --green-dark: #04a64c;
  --bg: #ffffff;
  --panel: #ffffff;
  --line: #e5e5e5;
  --line-strong: #d6d6d6;
  --text: #111111;
  --muted: #9a9a9a;
  --soft: #fafafa;
  --danger: #c24141;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: .45;
}

.hidden {
  display: none !important;
}

.shell {
  min-height: 100vh;
}

.login-panel {
  width: min(420px, calc(100% - 32px));
  margin: 12vh auto 0;
  display: grid;
  gap: 24px;
  padding: 34px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.admin-panel {
  min-height: 100vh;
  display: grid;
  align-content: start;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 28px;
  min-height: 72px;
  padding: 0 56px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.brand-block {
  display: grid;
  gap: 2px;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

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

.brand-block span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.workspace {
  width: min(1280px, calc(100% - 72px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

.tabs,
.toolbar,
.hero-actions,
.bottom-actions > div,
.bottom-actions.right,
.episode-tabs,
.episode-mode-tabs,
.check {
  display: flex;
  align-items: center;
}

.tabs {
  gap: 2px;
}

.tab,
.logout-button {
  border: 0;
  background: transparent;
  color: #777;
  padding: 14px 16px;
  font-weight: 900;
}

.tab.active {
  color: var(--green);
}

.logout-button {
  justify-self: end;
  border: 0;
  background: transparent;
  padding: 8px 0;
  color: var(--muted);
}

.tab-panel,
.stack {
  display: grid;
  gap: 18px;
}

.section-head,
.edit-page-head,
.editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-head.slim {
  min-height: auto;
}

.toolbar {
  gap: 8px;
  flex-wrap: wrap;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 36px;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 32px;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 14px;
  font-size: 18px;
}

.muted,
.message {
  color: var(--muted);
}

.message {
  min-height: 22px;
  margin: 0;
  font-size: 14px;
}

.message.error {
  color: var(--danger);
}

.form-message {
  min-height: 24px;
  margin-top: -10px;
  text-align: right;
}

.grid {
  display: grid;
  gap: 16px;
}

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

.grid.compact {
  gap: 12px;
}

.card,
.edit-page,
.editor-page {
  border: 1px solid var(--line-strong);
  background: var(--panel);
  padding: 26px;
}

label {
  display: grid;
  gap: 8px;
  color: #222;
  font-size: 14px;
  font-weight: 900;
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.check {
  display: inline-flex;
  width: auto;
  justify-content: flex-start;
  min-height: 44px;
  gap: 10px;
  align-self: end;
  color: #222;
}

.check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--green);
  flex: 0 0 auto;
}

.check span {
  display: inline-block;
  line-height: 1.35;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #fff;
  padding: 12px 13px;
  color: var(--text);
  outline: none;
}

input[type="checkbox"] {
  width: auto;
}

select[multiple] {
  min-height: 98px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(3, 207, 93, .1);
}

.search-input {
  width: 320px;
}

.small-select {
  width: 132px;
}

.primary,
.secondary,
.ghost,
.danger,
.outline-large,
.primary-outline,
.green-wide {
  border: 1px solid transparent;
  background: #fff;
  padding: 12px 18px;
  font-weight: 900;
}

.primary {
  background: var(--green);
  color: #fff;
}

.secondary,
.ghost,
.outline-large {
  border-color: var(--line-strong);
  color: #111;
}

.danger {
  border-color: rgba(194, 65, 65, .32);
  color: var(--danger);
}

.primary-outline {
  border-color: var(--green);
  color: var(--green);
}

.green-wide {
  width: min(420px, 100%);
  min-height: 74px;
  background: var(--green);
  color: #fff;
  font-size: 26px;
}

.text-button,
.danger-link {
  border: 0;
  background: transparent;
  color: #111;
  padding: 0;
  font-weight: 900;
}

.danger-link {
  color: #333;
}

.danger-link.strong {
  color: #b91c1c;
}

.destructive-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

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

.metric-card {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 18px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.list {
  display: grid;
  gap: 8px;
  max-height: 560px;
  overflow: auto;
}

.compact-list {
  max-height: 340px;
}

.list-item {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px;
}

.item-meta,
.data-row small,
.episode-row small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

.novel-list {
  display: grid;
  border-top: 1px solid var(--line);
  background: #fff;
}

.novel-row {
  display: grid;
  grid-template-columns: 42px 84px minmax(260px, 1fr) 100px 100px 70px 140px;
  gap: 18px;
  align-items: center;
  min-height: 116px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 16px 0;
  color: var(--text);
  text-align: left;
}

.novel-list-header {
  display: grid;
  grid-template-columns: 42px 84px minmax(260px, 1fr) 100px 100px 70px 140px;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.novel-selection-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.novel-selection-controls .check {
  margin-right: auto;
}

.novel-select {
  display: flex;
  justify-content: center;
}

.novel-row:hover {
  background: #fbfff8;
}

.novel-cover-thumb {
  width: 72px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--soft);
}

.novel-cover-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.novel-cover-thumb .cover-empty {
  font-size: 11px;
}

.novel-row-main {
  display: grid;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 12px 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.novel-row-main strong {
  font-size: 20px;
}

.novel-row-main small,
.novel-row-meta {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.data-table {
  display: grid;
  border: 1px solid var(--line);
  background: #fff;
}

.data-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 110px 80px 80px 140px;
  gap: 12px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 14px 16px;
  color: var(--text);
  text-align: left;
}

.data-row:last-child {
  border-bottom: 0;
}

.data-button:hover {
  background: #fbfff8;
}

.data-head {
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.data-row strong,
.data-row small {
  display: block;
}

.empty {
  padding: 52px 24px;
  color: var(--muted);
  text-align: center;
}

.compact-empty {
  padding: 24px;
}

.admin-log-section {
  display: grid;
  gap: 14px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.admin-log-list {
  display: grid;
  border-top: 1px solid var(--line);
  background: #fff;
}

.log-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 160px;
  gap: 16px;
  align-items: center;
  min-height: 58px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 0;
  text-align: left;
}

.log-row:hover {
  background: #fbfff8;
}

.log-row span,
.log-row small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.scheduled-row {
  grid-template-columns: minmax(0, 1fr) 112px;
}

.scheduled-status {
  color: var(--green);
  font-weight: 900;
  text-align: center;
}

.work-page {
  gap: 34px;
}

.work-hero {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 42px;
  align-items: start;
  padding: 14px 24px 34px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.hero-cover,
.cover-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--soft);
}

.hero-cover {
  width: 260px;
  aspect-ratio: 3 / 4;
}

.hero-cover img,
.cover-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

.hero-copy {
  min-height: 320px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding-top: 10px;
}

.hero-meta {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 900;
}

.hero-stat {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
}

.hero-desc {
  margin: 54px 0 10px;
  max-width: 760px;
  color: #888;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.75;
}

.hero-actions {
  gap: 12px;
}

.hero-actions .outline-large {
  min-width: 260px;
  min-height: 58px;
  font-size: 18px;
}

.work-content {
  display: grid;
  gap: 38px;
  align-items: start;
}

.work-content.single {
  grid-template-columns: 1fr;
}

.episode-area {
  background: #fff;
}

.episode-tabs {
  gap: 18px;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
}

.episode-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.episode-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 20px;
  font-weight: 900;
}

.episode-tab.active {
  color: var(--green);
}

.episode-list {
  display: grid;
}

.episode-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 96px 40px;
  gap: 14px;
  align-items: center;
  min-height: 116px;
  border-bottom: 1px solid var(--line);
}

.episode-select {
  display: flex;
  justify-content: center;
}

.episode-select-all {
  margin-right: auto;
  white-space: nowrap;
}

.episode-main {
  border: 0;
  background: transparent;
  padding: 20px 0;
  text-align: left;
}

.episode-main strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.row-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.row-menu {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.kebab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
}

.row-menu-panel {
  position: absolute;
  top: 34px;
  right: 0;
  z-index: 20;
  width: 132px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
}

.row-menu-panel button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.row-menu-panel button:hover:not(:disabled) {
  background: #f6f6f6;
}

.row-menu-panel button:disabled {
  color: #bbb;
  cursor: default;
}

.row-menu-panel .danger-text {
  color: #d55a45;
}

.small-action {
  padding: 7px 8px;
  font-size: 12px;
}

.status-quick-select {
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 800;
}

.edit-page,
.editor-page,
.reader-page {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 42px 64px;
}

.edit-page-head,
.editor-top,
.reader-top {
  min-height: 56px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.reader-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-reader {
  display: grid;
  gap: 22px;
  padding: 42px 0 80px;
}

.reader-meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.reader-body {
  white-space: pre-wrap;
  color: #333;
  font-size: 18px;
  font-weight: 700;
  line-height: 2;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.guide-text {
  margin: 24px 0 28px;
  color: #888;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.8;
}

.edit-form {
  gap: 22px;
}

.cover-preview {
  width: 160px;
  aspect-ratio: 3 / 4;
}

.cover-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 18px;
  align-items: end;
}

.cover-preview {
  position: relative;
}

.cover-preview-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 8px;
  background: rgba(0, 0, 0, .54);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.tag-editor {
  display: grid;
  gap: 10px;
}

.tag-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tag-chip-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  background: #fff;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 900;
}

.tag-chip:hover {
  border-color: var(--green);
  color: var(--green);
}

.tag-empty {
  margin: 0;
  font-size: 13px;
}

.md-import-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 0;
}

.md-import-help {
  margin: -8px 0 0;
  font-size: 13px;
}

.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

.file-button input {
  display: none;
}

.episode-batch-controls {
  gap: 20px;
  padding-top: 4px;
}

.episode-registration-modes {
  display: flex;
  gap: 8px;
  padding: 6px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f5f5f5;
}

.episode-registration-mode {
  flex: 1;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.episode-registration-mode.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.combined-episode-registration,
.compact-stack {
  gap: 10px;
}

.combined-import-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, 180px));
  gap: 16px;
  align-items: end;
}

.combined-review-head,
.combined-pricing-tools {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
}

.combined-review-head {
  justify-content: space-between;
}

.combined-pricing-tools {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafafa;
}

.combined-pricing-tools > strong {
  align-self: center;
  margin-right: auto;
}

.combined-pricing-tools label {
  width: 150px;
}

.combined-validation-summary:empty {
  display: none;
}

.combined-validation-summary {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.combined-validation-summary p {
  margin: 4px 0;
}

.combined-validation-summary .warning {
  color: #9a6700;
}

.combined-episode-table-wrap {
  max-height: 640px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.combined-episode-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #fff;
}

.combined-episode-table th,
.combined-episode-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.combined-episode-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f3f3;
  font-size: 13px;
}

.combined-episode-table tr.unselected {
  opacity: 0.48;
}

.combined-episode-table .combined-number,
.combined-episode-table .combined-price {
  width: 90px;
}

.combined-episode-table .combined-title {
  min-width: 210px;
}

.combined-body-preview {
  min-width: 240px;
  max-width: 360px;
}

.combined-body-preview strong,
.combined-body-preview span {
  display: block;
}

.combined-body-preview span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.combined-status {
  color: #257942;
  font-weight: 800;
  font-size: 12px;
}

.combined-status.error {
  color: var(--danger);
}

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

.episode-entry-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 2px solid #dedede;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
}

.additional-episode-card {
  background: #fafafa;
}

.episode-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.episode-entry-head h3 {
  margin: 0;
  font-size: 20px;
}

.episode-number-row {
  width: min(320px, 100%);
}

.episode-payment-row {
  display: grid;
  grid-template-columns: 160px 140px;
  gap: 20px;
  align-items: end;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.add-episode-button {
  justify-self: stretch;
  width: 100%;
  min-height: 52px;
}

.notice-entry-card {
  padding: 0;
  border: 0;
  box-shadow: none;
}

.notice-entry-card .episode-entry-head {
  display: none;
}

@media (max-width: 720px) {
  .episode-entry-card {
    padding: 18px;
  }

  .episode-payment-row {
    grid-template-columns: 1fr;
  }

  .episode-registration-modes,
  .combined-review-head,
  .combined-pricing-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .combined-import-grid {
    grid-template-columns: 1fr;
  }

  .combined-pricing-tools label {
    width: 100%;
  }

  .novel-list-header {
    display: none;
  }
}

.editor-status-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.schedule-panel {
  width: min(520px, calc(100vw - 32px));
}

.compact-actions {
  padding-top: 14px;
}

.compact-actions .outline-large,
.compact-actions .primary-outline {
  min-width: 140px;
}

.bottom-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.bottom-actions.right {
  justify-content: flex-end;
}

.bottom-actions .outline-large,
.bottom-actions .primary-outline {
  min-width: 180px;
  min-height: 54px;
}

.editor-page {
  padding-top: 0;
}

.editor-top {
  margin: 0 -64px 34px;
  padding: 22px 64px;
}

.episode-form h1 {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
  font-size: 34px;
}

.episode-mode-tabs {
  gap: 0;
}

.episode-mode {
  min-width: 132px;
  min-height: 52px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-weight: 900;
}

.episode-mode.active {
  border-color: var(--green);
  color: var(--green);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .24);
  padding: 32px;
}

.modal-panel {
  width: min(980px, 100%);
  max-height: calc(100vh - 64px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  background: #fff;
  padding: 28px;
}

.preview-panel {
  width: min(860px, calc(100vw - 64px));
}

.preview-body {
  display: grid;
  gap: 12px;
  padding-top: 8px;
}

.preview-body h3 {
  margin: 0;
  font-size: 26px;
}

#previewText {
  min-height: 260px;
  max-height: 52vh;
  overflow: auto;
  white-space: pre-wrap;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  color: #333;
  font-size: 16px;
  line-height: 1.8;
}

.log-detail {
  max-height: 58vh;
  overflow: auto;
  color: #333;
  font-size: 13px;
  line-height: 1.6;
}

.log-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.log-detail-grid div,
.log-change section {
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px;
}

.log-detail-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.log-memo {
  margin: 0 0 16px;
  border: 1px solid rgba(3, 207, 93, .24);
  background: #f6fff9;
  padding: 12px 14px;
  color: #333;
  font-weight: 800;
}

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

.log-change h3 {
  margin: 0 0 8px;
}

.log-change p {
  margin: 0 0 10px;
  color: #333;
  font-weight: 900;
}

.log-change pre {
  max-height: 260px;
  overflow: auto;
  margin: 0;
  color: #555;
  font-size: 12px;
  white-space: pre-wrap;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 1000px) {
  .admin-header {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px;
  }

  .workspace {
    width: calc(100% - 28px);
    padding: 20px 0 44px;
  }

  .work-hero,
  .work-content,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .hero-cover {
    width: min(260px, 100%);
  }

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

  .data-row,
  .novel-row {
    grid-template-columns: 1fr;
  }

  .episode-controls,
  .episode-row {
    grid-template-columns: 1fr;
  }

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

  .section-head,
  .edit-page-head,
  .editor-top,
  .bottom-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .edit-page,
  .editor-page,
  .reader-page {
    padding: 24px;
  }

  .reader-top {
    margin: 0 -24px;
    padding: 0 24px 18px;
  }

  .admin-reader {
    gap: 18px;
    padding: 28px 0 64px;
  }

  .admin-reader h1 {
    margin: 0;
    font-size: 32px;
    line-height: 1.28;
  }

  .reader-meta {
    font-size: 13px;
    line-height: 1.5;
  }

  .reader-body {
    font-size: 17px;
    line-height: 1.9;
  }

  .cover-edit-row {
    grid-template-columns: 1fr;
  }

  .editor-top {
    margin: 0 -24px 24px;
    padding: 18px 24px;
  }
}

@media (max-width: 640px) {
  .reader-page {
    width: 100%;
    padding: 0 18px 34px;
  }

  .reader-top {
    position: sticky;
    top: 0;
    z-index: 5;
    min-height: 50px;
    margin: 0 -18px;
    padding: 10px 18px;
    background: #fff;
  }

  .reader-top .toolbar {
    width: auto;
  }

  .reader-top button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  .admin-reader {
    gap: 14px;
    padding: 24px 0 56px;
  }

  .admin-reader h1 {
    font-size: 26px;
    line-height: 1.32;
  }

  .reader-meta {
    font-size: 12px;
  }

  .reader-body {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.85;
    letter-spacing: 0;
  }
}
