@font-face {
  font-family: "ManaMetalSerif";
  src: url("/assets/ChocolateClassicalSans-Regular.woff2") format("woff2");
  font-display: swap;
}

:root {
  --mm-ink: #f7edd0;
  --mm-muted: rgba(247, 237, 208, 0.72);
  --mm-faint: rgba(247, 237, 208, 0.14);
  --mm-line: rgba(232, 188, 92, 0.26);
  --mm-gold: #e2b957;
  --mm-amber: #ffdb84;
  --mm-red: #b54233;
  --mm-green: #4f8a76;
  --mm-coal: #0d1010;
  --mm-coal-2: #151412;
  --mm-paper: #f3e7c3;
  --mm-dark-text: #25190e;
  --mm-gold-text: #0b0b0b;
  --mm-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  --mm-original-background: url("https://image.manametal.net/other/web_background.webp");
}

html {
  scroll-behavior: smooth;
}

body {
  display: block;
  align-items: initial;
  justify-content: initial;
  min-height: 100vh;
  height: auto;
  margin: 0;
  color: var(--mm-ink);
  background:
    linear-gradient(180deg, rgba(13, 16, 16, 0.98), rgba(17, 15, 13, 0.96)),
    var(--mm-original-background) center / cover fixed;
  font-family: "ManaMetalSerif", Georgia, "Noto Serif TC", serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 9px 9px;
  opacity: 0.5;
}

.mm-page,
.mm-page * {
  box-sizing: border-box;
}

.mm-page button,
.mm-page input,
.mm-page select,
.mm-page textarea {
  width: auto;
  height: auto;
  color: inherit;
  background: none;
  border: 0;
  font: inherit;
}

.mm-page a {
  color: inherit;
}

.mm-page img {
  max-width: 100%;
  image-rendering: auto;
}

.mm-skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--mm-dark-text);
  background: var(--mm-amber);
  transform: translateY(-140%);
}

.mm-skip:focus {
  transform: translateY(0);
}

.mm-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(16px, 4vw, 54px);
  background: linear-gradient(180deg, rgba(9, 11, 11, 0.86), rgba(9, 11, 11, 0.44));
  border-bottom: 1px solid rgba(226, 185, 87, 0.18);
  backdrop-filter: blur(14px);
}

.mm-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.mm-brand img {
  width: 54px;
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.42));
}

.mm-brand-mark {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.mm-brand-mark strong {
  color: #fff7dc;
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
}

.mm-brand-mark span {
  color: var(--mm-amber);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.mm-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.mm-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mm-nav-link,
.mm-ghost-link,
.mm-locale-button,
.mm-locale-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  color: var(--mm-ink);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.mm-locale-button {
  gap: 8px;
  min-width: 88px;
}

.mm-locale-icon {
  font-size: 17px;
  line-height: 1;
}

.mm-locale-code {
  color: var(--mm-amber);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.mm-nav-link:hover,
.mm-nav-link:focus-visible,
.mm-ghost-link:hover,
.mm-ghost-link:focus-visible,
.mm-locale-button:hover,
.mm-locale-button:focus-visible,
.mm-locale-option:hover,
.mm-locale-option:focus-visible {
  color: #fff7dc;
  background: rgba(226, 185, 87, 0.12);
  border-color: rgba(226, 185, 87, 0.34);
  outline: none;
}

.mm-nav-primary,
.mm-button-primary,
.mm-button-secondary,
.mm-button-dark,
.mm-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  text-decoration: none;
  border: 1px solid rgba(255, 219, 132, 0.46);
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, border-color 160ms ease, background 160ms ease;
}

.mm-nav-primary,
.mm-button-primary {
  color: var(--mm-gold-text);
  font-weight: 700;
  background:
    linear-gradient(180deg, rgba(255, 244, 197, 0.9), rgba(226, 185, 87, 0.92)),
    var(--mm-gold);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.mm-page .mm-nav-primary,
.mm-page .mm-button-primary,
.mm-page a.mm-nav-primary,
.mm-page a.mm-button-primary {
  color: var(--mm-gold-text) !important;
  font-weight: 800;
  text-shadow: none;
}

.mm-button-primary {
  min-height: 58px;
  padding: 0 28px;
  font-size: clamp(20px, 2.3vw, 28px);
}

.mm-button-secondary,
.mm-button-dark,
.mm-pill {
  color: var(--mm-ink);
  background: rgba(9, 11, 11, 0.58);
  backdrop-filter: blur(10px);
}

.mm-button-secondary {
  min-height: 58px;
  padding: 0 26px;
  font-size: clamp(18px, 1.7vw, 22px);
}

.mm-button-dark {
  min-height: 46px;
  padding: 0 18px;
}

.mm-pill {
  min-height: 36px;
  padding: 0 14px;
  color: var(--mm-muted);
  border-color: rgba(247, 237, 208, 0.2);
}

.mm-nav-primary:hover,
.mm-nav-primary:focus-visible,
.mm-button-primary:hover,
.mm-button-primary:focus-visible,
.mm-button-secondary:hover,
.mm-button-secondary:focus-visible,
.mm-button-dark:hover,
.mm-button-dark:focus-visible,
.mm-pill:hover,
.mm-pill:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.08);
  outline: none;
}

.mm-locale {
  position: relative;
}

.mm-locale-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  min-width: 150px;
  padding: 8px;
  background: rgba(10, 12, 12, 0.94);
  border: 1px solid var(--mm-line);
  box-shadow: var(--mm-shadow);
}

.mm-locale-menu[hidden] {
  display: none;
}

.mm-locale-option {
  justify-content: flex-start;
  min-height: 34px;
  width: 100%;
  text-align: left;
}

.mm-hero {
  position: relative;
  min-height: 94svh;
  display: grid;
  align-items: end;
  padding: 120px clamp(18px, 5vw, 72px) 70px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(7, 8, 8, 0.88) 0%, rgba(7, 8, 8, 0.64) 42%, rgba(7, 8, 8, 0.16) 100%),
    linear-gradient(180deg, rgba(9, 11, 11, 0.08), rgba(9, 11, 11, 0.9)),
    var(--mm-original-background) center / cover fixed;
}

.mm-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(13, 16, 16, 0.98));
}

.mm-hero-inner {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  animation: mm-rise 700ms ease both;
}

.mm-kicker {
  margin: 0 0 14px;
  color: var(--mm-amber);
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mm-hero h1,
.mm-page-title {
  margin: 0;
  color: #fff7dc;
  font-size: clamp(52px, 10vw, 124px);
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow: 0 16px 44px rgba(0, 0, 0, 0.56);
}

.mm-hero-copy {
  width: min(640px, 100%);
  margin: 22px 0 0;
  color: var(--mm-muted);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.7;
}

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

.mm-hero-foot {
  position: absolute;
  right: clamp(18px, 5vw, 72px);
  bottom: 32px;
  z-index: 2;
  display: flex;
  gap: 18px;
  color: rgba(247, 237, 208, 0.68);
  font-size: 14px;
}

.mm-section,
.mm-reader {
  padding: clamp(54px, 8vw, 104px) clamp(18px, 5vw, 72px);
}

.mm-section-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.mm-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.mm-section-heading h2,
.mm-reader-heading h1 {
  margin: 0;
  color: #fff7dc;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

.mm-section-heading p,
.mm-reader-heading p {
  max-width: 560px;
  margin: 10px 0 0;
  color: var(--mm-muted);
  font-size: 17px;
  line-height: 1.7;
}

.mm-announcement-band {
  margin-top: -1px;
  padding-top: 34px;
  background: linear-gradient(180deg, rgba(13, 16, 16, 0.98), rgba(20, 21, 18, 0.98));
  border-top: 1px solid rgba(226, 185, 87, 0.18);
  border-bottom: 1px solid rgba(226, 185, 87, 0.18);
}

.mm-announcement-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.mm-news-item {
  display: grid;
  gap: 10px;
  min-height: 120px;
  padding: 14px;
  color: var(--mm-ink);
  text-decoration: none;
  background: rgba(247, 237, 208, 0.06);
  border: 1px solid rgba(247, 237, 208, 0.12);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.mm-version-item {
  display: grid;
  grid-template-columns: minmax(72px, 0.85fr) minmax(92px, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--mm-ink);
  text-align: left;
  text-decoration: none;
  background: rgba(247, 237, 208, 0.045);
  border: 1px solid rgba(247, 237, 208, 0.1);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.mm-news-item:hover,
.mm-news-item:focus-visible,
.mm-version-item:hover,
.mm-version-item:focus-visible,
.mm-news-item.is-active,
.mm-version-item.is-active {
  transform: translateY(-2px);
  background: rgba(226, 185, 87, 0.12);
  border-color: rgba(226, 185, 87, 0.5);
  outline: none;
}

.mm-news-thumb {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.mm-news-meta,
.mm-version-meta,
.mm-article-date {
  color: rgba(247, 237, 208, 0.58);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.mm-news-title,
.mm-version-title {
  margin: 0;
  color: #fff7dc;
  font-size: 19px;
  line-height: 1.35;
}

.mm-category-badge {
  justify-self: start;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  color: #fff7dc;
  font-size: 13px;
  line-height: 1;
  background: rgba(247, 237, 208, 0.1);
  border: 1px solid rgba(247, 237, 208, 0.18);
}

.mm-category-0 {
  color: #fff1c8;
  background: rgba(181, 66, 51, 0.5);
  border-color: rgba(255, 155, 126, 0.38);
}

.mm-category-1 {
  color: #dcecff;
  background: rgba(55, 103, 151, 0.48);
  border-color: rgba(145, 198, 255, 0.34);
}

.mm-category-2 {
  color: var(--mm-gold-text);
  font-weight: 700;
  background: rgba(226, 185, 87, 0.9);
  border-color: rgba(255, 244, 197, 0.48);
}

.mm-category-3 {
  color: #e7fff6;
  background: rgba(79, 138, 118, 0.48);
  border-color: rgba(162, 232, 204, 0.34);
}

.mm-version-title {
  font-size: 20px;
  line-height: 1;
}

.mm-version-scale {
  justify-self: end;
  min-width: 72px;
  padding: 5px 9px;
  color: var(--mm-gold-text);
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  text-align: center;
  background: rgba(226, 185, 87, 0.86);
  border: 1px solid rgba(255, 244, 197, 0.38);
}

.mm-feature-stack {
  display: grid;
  gap: 34px;
}

.mm-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.62fr);
  gap: clamp(22px, 5vw, 64px);
  align-items: center;
  min-height: 420px;
}

.mm-feature:nth-child(even) {
  grid-template-columns: minmax(300px, 0.62fr) minmax(0, 1fr);
}

.mm-feature:nth-child(even) .mm-feature-copy {
  order: 2;
}

.mm-feature-media {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background-position: center;
  background-size: cover;
  box-shadow: var(--mm-shadow);
}

.mm-feature-media::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 219, 132, 0.24);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.44);
}

.mm-feature-copy {
  display: grid;
  gap: 16px;
}

.mm-feature-copy h3 {
  margin: 0;
  color: #fff7dc;
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1;
}

.mm-feature-copy p {
  margin: 0;
  color: var(--mm-muted);
  font-size: 18px;
  line-height: 1.8;
}

.mm-step-grid,
.mm-community-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.mm-step,
.mm-community {
  padding: 22px;
  background: rgba(247, 237, 208, 0.06);
  border: 1px solid rgba(247, 237, 208, 0.12);
}

.mm-step h3,
.mm-community h3 {
  margin: 0 0 12px;
  color: #fff7dc;
  font-size: 24px;
}

.mm-step p,
.mm-community p {
  margin: 0 0 18px;
  color: var(--mm-muted);
  line-height: 1.7;
}

.mm-final-cta {
  text-align: center;
  background:
    linear-gradient(180deg, rgba(9, 11, 11, 0.7), rgba(9, 11, 11, 0.96)),
    var(--mm-original-background) center / cover fixed;
}

.mm-final-cta h2 {
  margin: 0;
  color: #fff7dc;
  font-size: clamp(36px, 6vw, 70px);
}

.mm-final-cta p {
  width: min(660px, 100%);
  margin: 18px auto 28px;
  color: var(--mm-muted);
  font-size: 18px;
  line-height: 1.8;
}

.mm-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 28px clamp(18px, 5vw, 72px);
  color: rgba(247, 237, 208, 0.62);
  background: rgba(6, 7, 7, 0.98);
  border-top: 1px solid rgba(226, 185, 87, 0.18);
}

.mm-footer a {
  color: var(--mm-ink);
  text-decoration: none;
}

.mm-reader {
  min-height: 100vh;
  padding-top: 124px;
  background:
    linear-gradient(180deg, rgba(13, 16, 16, 0.88), rgba(13, 16, 16, 0.98)),
    var(--mm-original-background) center / cover fixed;
}

.mm-reader-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.mm-reader-heading {
  margin-bottom: 30px;
}

.mm-reader-layout {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.mm-list-panel,
.mm-article-panel {
  background: rgba(8, 10, 10, 0.76);
  border: 1px solid rgba(247, 237, 208, 0.14);
  box-shadow: var(--mm-shadow);
  backdrop-filter: blur(14px);
}

.mm-list-panel {
  position: sticky;
  top: 92px;
  max-height: calc(100svh - 116px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.mm-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(247, 237, 208, 0.12);
}

.mm-list-toolbar h2 {
  margin: 0;
  color: #fff7dc;
  font-size: 22px;
}

.mm-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(247, 237, 208, 0.12);
}

.mm-category-tab {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  color: rgba(247, 237, 208, 0.72);
  background: rgba(247, 237, 208, 0.05);
  border: 1px solid rgba(247, 237, 208, 0.12);
  cursor: pointer;
  transition: transform 160ms ease, color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.mm-category-tab:hover,
.mm-category-tab:focus-visible,
.mm-category-tab.is-active {
  color: #fff7dc;
  background: rgba(226, 185, 87, 0.14);
  border-color: rgba(226, 185, 87, 0.46);
  outline: none;
}

.mm-category-tab:hover,
.mm-category-tab:focus-visible {
  transform: translateY(-1px);
}

.mm-list {
  display: grid;
  gap: 10px;
  padding: 14px;
  overflow: auto;
}

.mm-list[data-announcement-list] {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mm-list[data-announcement-list] .mm-news-item {
  flex: 0 0 auto;
  grid-template-rows: auto auto auto minmax(52px, auto);
  align-content: start;
}

.mm-list[data-announcement-list] .mm-news-thumb,
.mm-list[data-announcement-list] .mm-news-title {
  display: block;
}

.mm-list[data-announcement-list] .mm-news-title {
  min-height: 2.7em;
  overflow-wrap: anywhere;
}

.mm-list-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid rgba(247, 237, 208, 0.12);
}

.mm-article-panel {
  min-height: 620px;
  padding: clamp(22px, 4vw, 44px);
}

.mm-article-cover {
  display: none;
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  margin-bottom: 26px;
  border: 1px solid rgba(247, 237, 208, 0.16);
}

.mm-article-cover[src] {
  display: block;
}

.mm-article-title {
  margin: 8px 0 10px;
  color: #fff7dc;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
}

.mm-markdown {
  color: rgba(247, 237, 208, 0.86);
  font-size: 18px;
  line-height: 1.85;
}

.mm-markdown h2,
.mm-markdown h3,
.mm-markdown h4 {
  color: #fff7dc;
  line-height: 1.22;
}

.mm-markdown h2 {
  margin: 34px 0 12px;
  font-size: 34px;
}

.mm-markdown h3 {
  margin: 28px 0 10px;
  font-size: 26px;
}

.mm-markdown h4 {
  margin: 22px 0 8px;
  font-size: 21px;
}

.mm-markdown p {
  margin: 0 0 16px;
}

.mm-markdown ul,
.mm-markdown ol {
  margin: 0 0 18px;
  padding-left: 1.4em;
}

.mm-markdown li {
  margin: 6px 0;
}

.mm-markdown a {
  color: var(--mm-amber);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.mm-markdown code {
  padding: 2px 6px;
  color: #fff1c8;
  background: rgba(247, 237, 208, 0.1);
  border: 1px solid rgba(247, 237, 208, 0.12);
}

.mm-markdown blockquote {
  margin: 0 0 18px;
  padding: 12px 16px;
  color: rgba(247, 237, 208, 0.76);
  border-left: 3px solid var(--mm-gold);
  background: rgba(247, 237, 208, 0.06);
}

.mm-markdown img {
  display: block;
  width: min(100%, 860px);
  margin: 22px auto;
  border: 1px solid rgba(247, 237, 208, 0.16);
}

.mm-empty,
.mm-loading {
  margin: 0;
  padding: 18px;
  color: var(--mm-muted);
  border: 1px dashed rgba(247, 237, 208, 0.2);
}

@keyframes mm-rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1020px) {
  .mm-nav-links {
    display: none;
  }

  .mm-announcement-strip,
  .mm-step-grid,
  .mm-community-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mm-feature,
  .mm-feature:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .mm-feature:nth-child(even) .mm-feature-copy {
    order: initial;
  }

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

  .mm-list-panel {
    position: relative;
    top: auto;
    max-height: none;
  }
}

@media (max-width: 680px) {
  body {
    background-attachment: fixed;
  }

  .mm-header {
    padding: 10px 14px;
  }

  .mm-brand img {
    width: 44px;
  }

  .mm-brand-mark span {
    display: none;
  }

  .mm-nav-primary {
    min-height: 36px;
    padding: 0 12px;
  }

  .mm-hero {
    min-height: 92svh;
    padding: 102px 16px 64px;
    background-position: 58% center;
  }

  .mm-hero h1,
  .mm-page-title {
    font-size: clamp(46px, 18vw, 70px);
  }

  .mm-hero-foot {
    left: 16px;
    right: 16px;
    bottom: 18px;
    justify-content: space-between;
    font-size: 12px;
  }

  .mm-hero-actions,
  .mm-section-heading,
  .mm-list-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .mm-button-primary,
  .mm-button-secondary,
  .mm-button-dark,
  .mm-pill {
    width: 100%;
  }

  .mm-announcement-strip,
  .mm-step-grid,
  .mm-community-grid {
    grid-template-columns: 1fr;
  }

  .mm-feature-media {
    min-height: 240px;
  }

  .mm-reader {
    padding-top: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
