:root {
  --msm-primary: #d80c24;
  --msm-yellow: #ffcf54;
  --msm-blue: #62a0e8;
  --msm-safe: #20c997;
  --msm-safe-dark: #118c6d;
  --msm-safe-soft: #e9fff7;
  --msm-ink: #222;
  --msm-muted: #7b7f86;
  --msm-border: #e4e4e4;
  --msm-bg: #fff;
  --msm-alt: #f4f4f4;
  --msm-max: 1120px;
  --msm-pad: clamp(14px, 3vw, 24px);
}

html,
body.msm-body {
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
  width: 100% !important;
  overflow-x: hidden !important;
  background: var(--msm-bg) !important;
  color: var(--msm-ink) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
  letter-spacing: 0 !important;
}

.msm-body *,
.msm-body *::before,
.msm-body *::after {
  box-sizing: border-box !important;
  letter-spacing: 0 !important;
}

.msm-body a {
  color: inherit;
}

.msm-body [hidden] {
  display: none !important;
}

.msm-h {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid var(--msm-border);
}

.msm-h-inner {
  display: flex;
  position: relative;
  align-items: center;
  gap: 22px;
  width: min(100%, var(--msm-max));
  min-height: 68px;
  margin: 0 auto;
  padding: 0 max(var(--msm-pad), 22px);
}

.msm-logo {
  flex: 0 0 auto;
  color: var(--msm-primary);
  font-weight: 800;
  font-size: 24px;
  text-decoration: none;
  white-space: nowrap;
}

.msm-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.msm-h.is-nav-center .msm-nav {
  justify-content: center;
}

.msm-nav a {
  color: var(--msm-ink);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
  font-size: 14px;
}

.msm-icon-btn,
.msm-login-btn,
.msm-user-btn,
.msm-logout-btn {
  display: inline-grid;
  place-items: center;
  min-height: 36px;
  border: 1px solid var(--msm-border);
  background: #fff;
  color: var(--msm-ink);
  border-radius: 18px;
  padding: 0 14px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.msm-login-btn {
  min-width: 82px;
}

.msm-user-btn {
  background: linear-gradient(135deg, #32e6a8, #71d7ff);
  border-color: #83ead0;
  color: #063f35;
  box-shadow: 0 4px 12px rgba(32, 201, 151, .22);
}

.msm-logout-btn {
  background: #ffe9ef;
  border-color: #ffc4d0;
  color: #9f1239;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(244, 114, 152, .16);
}

.msm-search-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: var(--msm-pad);
  z-index: 80;
  width: min(420px, calc(100vw - 28px));
  background: #fff;
  border: 1px solid var(--msm-border);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,.16);
  padding: 14px;
}

.msm-search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.msm-search-box label {
  display: grid;
  gap: 4px;
  font-weight: 800;
}

.msm-search-box input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--msm-border);
  border-radius: 4px;
  padding: 0 10px;
  font: inherit;
}

.msm-search-box button {
  min-height: 40px;
  border: 1px solid var(--msm-border);
  border-radius: 4px;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.msm-search-results {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  max-height: 320px;
  overflow: auto;
}

.msm-search-results a {
  display: grid;
  gap: 2px;
  padding: 9px;
  color: var(--msm-ink);
  text-decoration: none;
  border-radius: 4px;
  background: var(--msm-alt);
}

.msm-search-results span,
.msm-search-empty {
  color: var(--msm-muted);
  font-size: 13px;
}

.msm-list-hero {
  width: 100%;
  background: #fff;
}

.msm-list-hero img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.msm-main {
  width: min(100%, var(--msm-max));
  margin: 0 auto;
  padding: 28px var(--msm-pad) 56px;
}

.msm-site-intro {
  border: 1px solid var(--msm-border);
  border-left: 5px solid var(--msm-primary);
  background: #fff;
  border-radius: 6px;
  padding: 20px;
  margin: 0 0 28px;
}

.msm-site-intro h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.25;
}

.msm-site-intro p {
  margin: 0;
  color: #3f4650;
  font-weight: 600;
}

.msm-list-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 20px;
}

.msm-list-head h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.msm-list-head nav {
  display: flex;
  gap: 10px;
}

.msm-list-head nav a,
.msm-series-sort a {
  border: 1px solid var(--msm-border);
  border-radius: 18px;
  padding: 6px 14px;
  text-decoration: none;
  font-weight: 700;
  color: var(--msm-muted);
  background: #fff;
  white-space: nowrap;
}

.msm-list-head nav a.is-active,
.msm-series-sort a.is-current {
  color: #fff;
  background: var(--msm-ink);
  border-color: var(--msm-ink);
}

.msm-series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}

.msm-series-card {
  position: relative;
}

.msm-series-card a {
  display: block;
  color: var(--msm-ink);
  text-decoration: none;
}

.msm-series-card-img,
.msm-front-thumb-empty {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1280 / 672;
  object-fit: cover;
  background: linear-gradient(135deg, #efefef, #fafafa);
  border: 1px solid var(--msm-border);
  overflow: hidden;
}

.msm-front-thumb-empty b {
  font-size: 42px;
  color: var(--msm-primary);
}

.msm-updated {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #ff3d00;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  border-radius: 3px;
  padding: 2px 7px;
}

.msm-series-card h2 {
  margin: 10px 0 2px;
  font-size: 18px;
  line-height: 1.35;
}

.msm-series-card p {
  margin: 0;
  color: var(--msm-muted);
  font-size: 14px;
}

.msm-series-detail {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
}

.msm-series-hero-img {
  display: block;
}

.msm-series-hero-media {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1280 / 672;
  object-fit: cover;
  border: 1px solid var(--msm-border);
  background: var(--msm-alt);
}

.msm-day {
  color: var(--msm-muted);
  font-weight: 700;
  margin-bottom: 4px;
}

.msm-series-hero-info h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.25;
}

.msm-series-hero-info h1 span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.msm-author {
  margin: 0 0 14px;
  font-weight: 700;
}

.msm-description {
  border-top: 1px solid var(--msm-border);
  padding-top: 14px;
  color: #343434;
}

.msm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.msm-tags a {
  border: 1px solid var(--msm-border);
  border-radius: 16px;
  padding: 3px 10px;
  color: var(--msm-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

.msm-fanletter {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--msm-primary);
  border-radius: 18px;
  color: var(--msm-primary);
  padding: 0 18px;
  text-decoration: none;
  font-weight: 800;
}

.msm-react {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--msm-muted);
  margin-top: 18px;
}

.msm-fav-button,
.msm-view-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
}

.msm-fav-button {
  border: 1px solid #f4c7d2;
  background: #fff7fa;
  color: #b91c4a;
  padding: 0 10px;
  cursor: pointer;
}

.msm-fav-button:hover,
.msm-fav-button.is-active {
  background: #ffe1e9;
  border-color: #f6a8ba;
  color: #9f1239;
}

.msm-fav-button:disabled {
  opacity: .65;
  cursor: wait;
}

.msm-view-count {
  color: #69717d;
}

.msm-ranking-main {
  padding-top: 30px;
}

.msm-ranking-head {
  display: block;
  margin-bottom: 26px;
  text-align: center;
}

.msm-ranking-head h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
}

.msm-ranking-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: -8px 0 26px;
}

.msm-ranking-switch a {
  display: inline-grid;
  place-items: center;
  min-height: 40px;
  border: 1px solid var(--msm-border);
  border-radius: 999px;
  background: #fff;
  color: var(--msm-ink);
  padding: 0 18px;
  text-decoration: none;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(20, 28, 38, .08);
}

.msm-ranking-switch a.is-current {
  border-color: var(--msm-safe);
  background: linear-gradient(135deg, #32e6a8, #71d7ff);
  color: #063f35;
}

.msm-ranking-badge {
  position: relative;
  display: grid;
  place-items: center start;
  flex: 0 0 auto;
  width: 76px;
  min-height: 46px;
  border-radius: 8px;
  color: #1f2937;
  text-decoration: none;
  font-weight: 900;
  line-height: 1.1;
  border: 1px solid #dce2ea;
  border-left: 5px solid #a8b3c2;
  background: linear-gradient(135deg, #fff, #f6f8fb);
  box-shadow: 0 5px 14px rgba(23, 31, 42, .08);
  padding: 7px 8px 7px 10px;
  font-size: 15px;
}

.msm-ranking-badge::before {
  content: "RANK";
  display: block;
  color: #7b8491;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.msm-ranking-badge.is-gold {
  border-color: #f0d88b;
  border-left-color: #d8a300;
  color: #3c2900;
  background: linear-gradient(135deg, #fff8db, #ffe7a3);
}

.msm-ranking-badge.is-silver {
  border-color: #c9d1dc;
  border-left-color: #8390a0;
  background: linear-gradient(135deg, #fff, #eef2f7);
}

.msm-ranking-badge.is-bronze {
  border-color: #deb895;
  border-left-color: #b96b32;
  color: #3a1d0d;
  background: linear-gradient(135deg, #fff2e6, #f2c59a);
}

.msm-ranking-number {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 1px;
  width: 76px;
  min-height: 46px;
  color: #1f2937;
  border: 1px solid #dce2ea;
  border-left: 5px solid var(--msm-safe);
  border-radius: 8px;
  background: #fff;
  padding: 7px 8px 7px 10px;
}

.msm-ranking-number span {
  color: var(--msm-muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.msm-ranking-number b {
  font-size: 23px;
  line-height: 1;
}

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

.msm-ranking-item {
  display: grid;
  grid-template-columns: 84px 154px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--msm-border);
}

.msm-ranking-cover {
  display: block;
  width: 154px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--msm-border);
  background: #f6f7f8;
  text-decoration: none;
}

.msm-ranking-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.msm-ranking-title {
  display: inline-block;
  max-width: 100%;
  color: var(--msm-ink);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.3;
  text-decoration: none;
}

.msm-ranking-info p {
  margin: 4px 0 8px;
  color: #4f5965;
  font-weight: 700;
}

.msm-ranking-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--msm-muted);
  font-weight: 800;
}

.msm-ranking-pages {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--msm-border);
}

.msm-ranking-pages a {
  display: grid;
  place-items: center;
  min-width: 54px;
  min-height: 48px;
  border: 1px solid var(--msm-border);
  border-radius: 6px;
  background: #fff;
  color: var(--msm-ink);
  padding: 5px 10px;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(20, 28, 38, .06);
}

.msm-ranking-pages a.is-current {
  border-color: var(--msm-safe);
  background: var(--msm-safe-soft);
  color: var(--msm-safe-dark);
}

.msm-ranking-pages b {
  font-size: 18px;
  line-height: 1;
}

.msm-ranking-pages span {
  color: var(--msm-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.msm-empty-state {
  border: 1px solid var(--msm-border);
  border-radius: 6px;
  padding: 24px;
  font-weight: 800;
  color: var(--msm-muted);
  background: #fff;
}

.msm-readable {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0;
}

.msm-readable a {
  flex: 1;
  min-height: 48px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
}

.msm-readable a:first-child {
  color: #fff;
  background: var(--msm-primary);
}

.msm-readable a:last-child {
  color: #063f35;
  background: linear-gradient(135deg, #34e4a9, #86e7ff);
  border: 1px solid #8df0d8;
  box-shadow: 0 6px 18px rgba(32, 201, 151, .2);
}

.msm-readable a:first-child:last-child {
  color: #fff;
  background: var(--msm-primary);
  border: none;
  box-shadow: none;
}

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

.msm-series-sort {
  display: flex;
  gap: 8px;
  padding: 18px 0;
  overflow-x: auto;
}

.msm-episode-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  color: var(--msm-ink);
  text-decoration: none;
  border-top: 1px solid var(--msm-border);
  padding: 12px 0;
}

.msm-episode-thumb {
  width: 120px;
  aspect-ratio: 120 / 63;
  object-fit: cover;
  border: 1px solid var(--msm-border);
  background: var(--msm-alt);
}

.msm-episode-title {
  font-weight: 800;
  min-width: 0;
}

.msm-episode-date {
  color: var(--msm-muted);
  font-size: 13px;
  white-space: nowrap;
}

.msm-episode-access {
  min-width: 70px;
  text-align: center;
  color: var(--msm-primary);
  font-weight: 800;
}

.msm-comics-info {
  margin-top: 36px;
}

.msm-comics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.msm-comics-row a {
  border: 1px solid var(--msm-border);
  border-radius: 4px;
  padding: 8px 12px;
  text-decoration: none;
  font-weight: 700;
}

.msm-f {
  border-top: 1px solid var(--msm-border);
  background: var(--msm-alt);
  padding: 28px var(--msm-pad);
}

.msm-f-main {
  display: flex;
  gap: 24px;
  align-items: start;
  width: min(100%, var(--msm-max));
  margin: 0 auto;
}

.msm-f.is-nav-center .msm-f-main {
  justify-content: center;
  text-align: center;
}

.msm-f.is-nav-center nav {
  justify-content: center;
}

.msm-f-logo {
  color: var(--msm-primary);
  font-weight: 900;
  text-decoration: none;
}

.msm-f nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.msm-f nav a {
  color: var(--msm-ink);
  font-weight: 700;
  text-decoration: none;
}

.msm-f-note {
  width: min(100%, var(--msm-max));
  margin: 16px auto 0;
  color: var(--msm-muted);
  font-size: 12px;
}

.msm-f.is-note-center .msm-f-note {
  text-align: center;
}

.msm-auth-main {
  display: grid;
  place-items: start center;
}

.msm-auth-card {
  width: min(100%, 460px);
  border: 1px solid var(--msm-border);
  border-radius: 6px;
  padding: 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.msm-auth-card h1 {
  margin: 0 0 8px;
  text-align: center;
}

.msm-auth-card p {
  color: var(--msm-muted);
}

.msm-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 18px 0;
}

.msm-auth-tabs button,
.msm-auth-form button {
  border: 1px solid var(--msm-border);
  border-radius: 4px;
  background: #fff;
  min-height: 42px;
  font-weight: 800;
  cursor: pointer;
}

.msm-auth-tabs button.is-active,
.msm-auth-form button {
  background: linear-gradient(135deg, #34e4a9, #86e7ff);
  border-color: #8df0d8;
  color: #063f35;
  box-shadow: 0 6px 18px rgba(32, 201, 151, .18);
}

.msm-auth-form {
  display: none;
  gap: 12px;
}

.msm-auth-form.is-active {
  display: grid;
}

.msm-auth-form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.msm-auth-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--msm-border);
  border-radius: 4px;
  padding: 0 12px;
  font: inherit;
}

.msm-auth-card .msm-password-help {
  margin: -4px 0 0;
  color: #5f6b7a;
  font-size: 13px;
  font-weight: 700;
}

.msm-auth-result {
  text-align: center;
}

.msm-auth-result h1 {
  font-size: 28px;
  color: var(--msm-ink);
}

.msm-auth-result p {
  margin: 14px 0 22px;
  font-weight: 700;
  line-height: 1.8;
}

.msm-auth-result.is-success {
  border-color: #9dc9ff;
  background: #f5faff;
}

.msm-auth-result.is-error {
  border-color: #ff9bab;
  background: #fff6f8;
}

.msm-auth-top-link {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  min-width: 180px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #34e4a9, #86e7ff);
  color: #063f35;
  text-decoration: none;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(32, 201, 151, .18);
}

.msm-auth-notice,
.msm-form-message {
  width: min(100%, 460px);
  color: var(--msm-safe-dark);
  font-weight: 900;
}

.msm-auth-notice,
.msm-form-message:not(:empty) {
  border: 2px solid #ffb3bf;
  border-left-width: 6px;
  border-radius: 6px;
  background: #fff2f4;
  color: #d80c24 !important;
  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.55;
  font-weight: 900;
}

.msm-form-message.is-success {
  border-color: #9dc9ff;
  background: #eef6ff;
  color: #075db3 !important;
}

.msm-auth-notice.is-success {
  border-color: #9dc9ff;
  background: #eef6ff;
  color: #075db3 !important;
}

.msm-form-message.is-error {
  border-color: #ff9bab;
  background: #fff0f3;
  color: #d80c24 !important;
}

.msm-auth-notice.is-error {
  border-color: #ff9bab;
  background: #fff0f3;
  color: #d80c24 !important;
}

.msm-reader-loading.is-error {
  color: #fff !important;
  background: rgba(216, 12, 36, .92);
  padding: 18px;
  text-align: center;
  font-size: 17px;
  font-weight: 900;
}

.msm-view-viewer {
  background: #0e0f12 !important;
}

.msm-ep-h {
  position: fixed;
  background: rgba(255,255,255,.96);
}

.msm-ep-h .msm-h-inner {
  width: 100%;
  max-width: none;
  min-height: 58px;
}

.msm-ep-close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #333;
  font-size: 40px;
  line-height: 1;
  text-decoration: none;
}

.msm-ep-main {
  width: 100%;
  min-height: 100vh;
  padding-top: 58px;
  background: #0e0f12;
}

.msm-ep-content,
.msm-ep-viewer {
  width: 100%;
  min-height: calc(100vh - 58px);
}

.msm-reader-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: calc(100vh - 136px);
  min-height: 360px;
  padding: 14px var(--msm-pad);
  overflow: auto;
}

.msm-page-wrap {
  display: grid;
  place-items: center;
  width: min(100%, 1040px);
  height: 100%;
  min-height: 0;
}

.msm-image-spread {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  transform-origin: center center;
}

.msm-image-page {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: block;
  background: #fff;
  box-shadow: 0 10px 40px rgba(0,0,0,.45);
  object-fit: contain;
}

.msm-image-spread.is-spread .msm-image-page {
  flex: 0 1 calc(50% - 4px);
  width: calc(50% - 4px);
}

.msm-image-spread.is-single .msm-image-page {
  flex: 0 1 100%;
  width: 100%;
}

.msm-image-page[hidden] {
  display: none !important;
}

.msm-reader-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  pointer-events: none;
}

.msm-reader-stage.is-ready .msm-reader-loading {
  display: none;
}

.msm-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 33.33%;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.msm-hit-prev {
  left: 0;
}

.msm-hit-next {
  right: 0;
}

.msm-reader-toolbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  min-height: 78px;
  padding: 10px var(--msm-pad);
  background: #17191f;
  color: #fff;
  border-top: 1px solid #2b2f38;
  flex-wrap: wrap;
}

.msm-reader-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid #303642;
  border-radius: 6px;
  background: #11141a;
}

.msm-reader-toolbar button,
.msm-reader-toolbar input {
  min-height: 36px;
  border: 1px solid #3a3f4a;
  border-radius: 4px;
  background: #242933;
  color: #fff;
  padding: 0 10px;
  font: inherit;
  font-weight: 800;
}

.msm-reader-toolbar button.is-selected {
  color: #fff;
  background: #2f6fed;
  border-color: #74a2ff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}

.msm-reader-pagebox {
  display: inline-flex;
  align-items: center;
  min-width: 86px;
}

.msm-reader-pagebox > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.msm-reader-nav {
  order: -10;
}

.msm-reader-nav button,
.msm-reader-nav .msm-reader-pagebox {
  flex: 0 0 auto;
}

.msm-reader-nav .msm-reader-pagebox {
  background: #1e2430;
  border: 1px solid #3a3f4a;
  border-radius: 4px;
  padding: 0 6px;
}

.msm-reader-nav input {
  background: #fff;
  color: #111;
}

.msm-ep-viewer.is-left-send .msm-reader-nav {
  flex-direction: row-reverse;
}

.msm-ep-viewer.is-right-send .msm-reader-nav {
  flex-direction: row;
}

.msm-reader-toolbar input {
  width: 68px;
  text-align: center;
}

.msm-reader-hint {
  margin: 0;
  padding: 10px var(--msm-pad) 0;
  color: #aeb6c5;
  background: #0e0f12;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.msm-reader-volumes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px var(--msm-pad) 28px;
  background: #0e0f12;
}

.msm-reader-volumes a {
  color: #fff;
  text-decoration: none;
  border: 1px solid #3a3f4a;
  border-radius: 4px;
  padding: 8px 12px;
  font-weight: 800;
}

.msm-viewer-error {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #0e0f12;
  color: #fff;
}

@media (max-width: 820px) {
  .msm-h-inner {
    gap: 12px 14px;
    padding: 8px var(--msm-pad) 0;
  }

  .msm-logo {
    font-size: 20px;
  }

  .msm-nav {
    order: 3;
    flex-basis: 100%;
    padding-bottom: 10px;
  }

  .msm-h.is-nav-center .msm-nav {
    justify-content: flex-start;
  }

  .msm-h-inner {
    flex-wrap: wrap;
    position: relative;
  }

  .msm-search-panel {
    top: 100%;
    right: 14px;
    left: 14px;
    width: auto;
  }

  .msm-list-head,
  .msm-f-main {
    display: grid;
  }

  .msm-series-detail {
    grid-template-columns: 1fr;
  }

  .msm-series-hero-img {
    margin: 0 calc(-1 * var(--msm-pad));
  }

  .msm-series-hero-media {
    border-left: 0;
    border-right: 0;
  }

  .msm-episode-item {
    grid-template-columns: 86px minmax(0, 1fr) auto;
  }

  .msm-readable {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .msm-episode-thumb {
    width: 86px;
  }

  .msm-ranking-item {
    grid-template-columns: 66px 104px minmax(0, 1fr);
    gap: 12px;
  }

  .msm-ranking-badge {
    width: 62px;
    min-height: 42px;
    font-size: 12px;
    padding: 6px 7px 6px 8px;
  }

  .msm-ranking-badge::before {
    font-size: 9px;
  }

  .msm-ranking-number {
    width: 62px;
    min-height: 42px;
    padding: 6px 7px 6px 8px;
  }

  .msm-ranking-number b {
    font-size: 20px;
  }

  .msm-ranking-cover {
    width: 104px;
  }

  .msm-ranking-title {
    font-size: 17px;
  }

  .msm-ranking-info p {
    font-size: 13px;
  }

  .msm-episode-date {
    display: none;
  }

  .msm-login-btn,
  .msm-user-btn,
  .msm-logout-btn {
    padding: 0 10px;
    font-size: 13px;
  }

  .msm-page-wrap {
    width: 100%;
    height: 100%;
  }

  .msm-reader-stage {
    height: calc(100svh - 156px);
    min-height: 300px;
    padding: 10px var(--msm-pad);
  }

  .msm-reader-toolbar {
    justify-content: start;
    overflow-x: auto;
    flex-wrap: nowrap;
    min-height: 88px;
    gap: 6px;
  }

  .msm-reader-group {
    flex: 0 0 auto;
  }

  .msm-reader-toolbar button,
  .msm-reader-toolbar input {
    font-size: 13px;
    padding-inline: 8px;
  }

  .msm-image-spread.is-spread {
    gap: 4px;
  }

  .msm-image-spread.is-spread .msm-image-page {
    max-width: calc(50% - 2px);
  }
}

@media (max-width: 430px) {
  .msm-main {
    padding-top: 20px;
  }

  .msm-icon-btn {
    display: none;
  }

  .msm-series-grid {
    grid-template-columns: 1fr;
  }

  .msm-ranking-item {
    grid-template-columns: 54px 88px minmax(0, 1fr);
    gap: 9px;
  }

  .msm-ranking-cover {
    width: 88px;
  }

  .msm-ranking-badge {
    width: 52px;
    min-height: 38px;
    font-size: 11px;
    border-left-width: 4px;
    padding: 5px 6px;
  }

  .msm-ranking-badge::before {
    font-size: 8px;
  }

  .msm-ranking-number {
    width: 52px;
    min-height: 38px;
    border-left-width: 4px;
    padding: 5px 6px;
  }

  .msm-ranking-number b {
    font-size: 18px;
  }

  .msm-ranking-number span {
    font-size: 10px;
  }

  .msm-ranking-title {
    font-size: 15px;
  }

  .msm-ranking-counts {
    font-size: 13px;
  }

  .msm-auth-card {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
}
