:root {
  --bg: #141312;
  --surface-lowest: #0f0e0d;
  --surface-low: #1c1b1a;
  --surface: #201f1e;
  --surface-high: #2b2a29;
  --surface-bright: #3a3938;
  --text: #e6e2df;
  --text-muted: rgba(230, 226, 223, 0.72);
  --primary: #ffb3ad;
  --primary-deep: #901418;
  --secondary: #e9c176;
  --outline: rgba(88, 65, 62, 0.45);
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 179, 173, 0.3);
  border: 2px solid var(--bg);
  border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 179, 173, 0.5);
}

::-webkit-scrollbar-corner {
  background: var(--bg);
}

/* Firefox support */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 179, 173, 0.3) var(--bg);
  box-sizing: border-box;
}

html, body { margin: 0; padding: 0; }

body {
  background: radial-gradient(circle at 50% -10%, rgba(255, 179, 173, 0.1), transparent 40%), var(--bg);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  line-height: 1.8;
}

a { color: var(--secondary); text-decoration: none; }
img { display: block; max-width: 100%; }

.key-btn {
  display: inline-block;
  min-width: 1.5em;
  padding: 0.12em 0.45em 0.18em;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 0.88em;
  font-weight: 600;
  line-height: 1.2;
  vertical-align: 0.08em;
  text-align: center;
  border-radius: 0;
  border: 1px solid rgba(88, 65, 62, 0.65);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.key-btn-white {
  color: #2a2624;
  background: linear-gradient(180deg, #f5f2ef 0%, #dcd8d4 100%);
  border-color: rgba(60, 55, 52, 0.45);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 2px 0 rgba(0, 0, 0, 0.4);
}

mark {
  background: transparent;
  color: inherit;
  text-decoration-line: underline;
  text-decoration-style: wavy;
  text-decoration-color: #c23b3b;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-skip-ink: none;
}

.container { width: min(1160px, 92vw); margin: 0 auto; }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(255, 179, 173, 0.12);
  background: linear-gradient(180deg, rgba(20, 19, 18, 0.31), rgba(20, 19, 18, 0.28));
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  font-family: "Newsreader", serif;
  font-size: clamp(20px, 4vw, 28px);
  font-style: italic;
  color: var(--primary);
  letter-spacing: 0.03em;
}

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

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(230, 226, 223, 0.84);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: 280ms ease;
}

.nav-icon {
  width: 13px;
  height: 13px;
  object-fit: contain;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--outline);
  background: rgba(20, 19, 18, 0.75);
  color: var(--text);
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.hero {
  min-height: 38vh;
  display: grid;
  align-items: end;
  background: linear-gradient(180deg, rgba(20, 19, 18, 0.2), rgba(20, 19, 18, 0.92)),
    url("pictures/paper_bg.png") center top / cover no-repeat;
}

.hero-inner { padding: 108px 0 42px; }

.eyebrow {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--secondary);
}

h1, h2, h3 {
  margin: 0;
  font-family: "Newsreader", serif;
  line-height: 1.14;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(28px, 6.8vw, 56px);
  font-style: italic;
  text-shadow: 0 0 20px rgba(255, 179, 173, 0.22);
}

h2 { font-size: clamp(25px, 5vw, 36px); }
h3 { font-size: clamp(20px, 3.4vw, 24px); }

.subtitle {
  margin-top: 14px;
  max-width: 820px;
  color: var(--text-muted);
}

/* 系統頁 — 建議配備（stitch 風：左框線、小標、規格列） */
.system-specs {
  margin-top: 0;
}

.system-specs-title {
  margin: 0 0 10px;
  font-family: "Newsreader", serif;
  font-size: clamp(26px, 4vw, 34px);
  font-style: italic;
  font-weight: 400;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.system-specs-lede {
  margin: 0 0 8px;
  max-width: 52rem;
  color: var(--secondary);
}

.system-specs-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: 28px;
  align-items: start;
  margin-top: 22px;
}

.system-specs-column {
  min-width: 0;
}

.system-specs-block {
  padding-left: 1.75rem;
  border-left: 1px solid rgba(255, 179, 173, 0.28);
}

.system-specs-block-primary {
  border-left-color: rgba(255, 179, 173, 0.42);
}

.system-specs-eyebrow {
  display: block;
  margin-bottom: 14px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(230, 226, 223, 0.55);
}

.system-specs-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.system-specs-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 16px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(88, 65, 62, 0.45);
  font-size: 0.92rem;
  line-height: 1.55;
}

.system-specs-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.system-specs-k {
  flex: 1 1 auto;
  min-width: 5.5em;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(230, 226, 223, 0.52);
}

.system-specs-v {
  flex: 1 1 12rem;
  text-align: right;
  color: var(--text-muted);
}

.system-specs-aside {
  padding: 18px 20px;
  border-radius: 0;
}

.system-specs-aside-title {
  margin: 0 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(230, 226, 223, 0.72);
}

.system-specs-aside-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .system-specs-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .system-specs-v {
    text-align: left;
    width: 100%;
  }

  .system-specs-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

.section { padding: 32px 0; }

.split {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 18px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.panel {
  background: linear-gradient(160deg, rgba(32, 31, 30, 0.9), rgba(43, 42, 41, 0.9));
  border: 1px solid var(--outline);
  padding: 24px;
}

.panel-glass {
  background: rgba(54, 52, 51, 0.58);
  border: 1px solid rgba(88, 65, 62, 0.35);
  backdrop-filter: blur(10px);
}

.panel p, .panel li { color: var(--text-muted); }

.poem-kai {
  margin: 0;
  text-align: center;
  font-style: italic;
  line-height: 1.95;
  letter-spacing: 0.06em;
  font-family: "Noto Serif TC", "DFKai-SB", "BiauKai", "KaiTi", "STKaiti TC", serif;
}

.poem-panel {
  background:
    linear-gradient(180deg, rgba(32, 31, 30, 0.468), rgb(0, 0, 0)),
    url("pictures/paper_bg.png") center bottom / cover no-repeat;
}

.home-links a {
  display: block;
  background: var(--surface-low);
  border: 1px solid var(--outline);
  padding: 22px 20px;
  color: var(--text);
  transition: 280ms ease;
}

.home-links a:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 179, 173, 0.34);
  background: var(--surface-high);
}

.home-links p { margin: 6px 0 0; color: var(--text-muted); }

.home-links h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 auto;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.gallery figure {
  margin: 0;
  background: var(--surface-high);
  border: 1px solid var(--outline);
  padding: 10px;
}

.gallery img {
  aspect-ratio: 4 / 3;
  object-fit: contain;
  object-position: center;
  background: var(--surface-lowest);
  filter: grayscale(0.2);
  transition: 380ms ease;
  cursor: zoom-in;
}

.gallery figure:hover img { filter: grayscale(0); transform: scale(1.02); }

.gallery figcaption {
  font-size: 13px;
  padding-top: 8px;
  color: var(--text-muted);
}

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

.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.character-card {
  background: var(--surface-high);
  border: 1px solid var(--outline);
  padding: 10px;
  cursor: default;
  perspective: 900px;
  transition: 280ms ease;
}

.character-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 179, 173, 0.35);
  background: var(--surface-bright);
}

.character-card img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
  transform-origin: center;
  backface-visibility: hidden;
}

.character-card h4 {
  margin: 10px 0 0;
  font-size: 16px;
  color: var(--text);
}

.character-card p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.character-card-wide {
  grid-column: 1 / -1;
}

.event-characters-section .character-card img {
  width: 160px;
  height: auto;
  margin: 0 auto;
}

.event-people-strip {
  grid-column: 1 / -1;
  justify-self: start;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 12px;
}

.event-people-strip img {
  width: auto;
  height: auto;
  max-height: 110px;
  max-width: none;
  background: var(--surface-high);
  border: 1px solid var(--outline);
  padding: 6px;
}

.character-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(5px);
}

.character-modal.open { display: flex; }

.character-modal-panel {
  width: min(980px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: linear-gradient(160deg, rgba(32, 31, 30, 0.96), rgba(43, 42, 41, 0.96));
  border: 1px solid rgba(255, 179, 173, 0.28);
  padding: 20px;
}

.character-modal-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: block;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 179, 173, 0.3);
  background: rgba(20, 19, 18, 0.75);
  color: var(--text);
  cursor: pointer;
}

.character-modal-content {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 18px;
  margin-top: 10px;
}

.character-modal-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.character-modal-images img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
  background: var(--surface-lowest);
  border: 1px solid var(--outline);
}

.character-modal-text h3 {
  margin-bottom: 10px;
}

.character-modal-text p {
  margin: 0;
  color: var(--text-muted);
}

.list {
  margin: 12px 0 0;
  padding-left: 18px;
}

.footer {
  border-top: 1px solid rgba(255, 179, 173, 0.1);
  text-align: center;
  color: rgba(230, 226, 223, 0.5);
  padding: 26px 0 40px;
  font-size: 13px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 14, 13, 0.9);
  backdrop-filter: blur(4px);
}

.lightbox.open { display: flex; }

.lightbox-frame {
  max-width: min(1200px, 96vw);
  max-height: 92vh;
  background: var(--surface-low);
  border: 1px solid rgba(255, 179, 173, 0.25);
  padding: 10px;
}

.lightbox-frame img {
  width: auto;
  max-width: 100%;
  max-height: calc(92vh - 70px);
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 179, 173, 0.28);
  background: rgba(20, 19, 18, 0.75);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
}

.guide-embed iframe {
  width: 100%;
  min-height: 980px;
  border: 0;
  background: var(--surface-lowest);
}

.freetalk-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px;
}

.freetalk-sidebar {
  border-right: 1px solid var(--outline);
  padding-right: 14px;
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 112px);
  overflow: auto;
}

.freetalk-nav {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.freetalk-nav-item {
  width: 100%;
  border: 1px solid var(--outline);
  background: var(--surface-low);
  color: var(--text);
  text-align: left;
  padding: 10px 11px;
  cursor: pointer;
  transition: 220ms ease;
}

.freetalk-nav-item span {
  display: block;
  font-size: 13px;
  line-height: 1.5;
}

.freetalk-nav-item small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 11px;
}

.freetalk-nav-item:hover,
.freetalk-nav-item.active {
  border-color: rgba(255, 179, 173, 0.44);
  background: var(--surface-high);
}

.freetalk-content {
  padding: 18px;
  scroll-margin-top: 96px;
}

.freetalk-back-top {
  position: fixed;
  right: max(18px, env(safe-area-inset-right, 0px));
  bottom: max(22px, env(safe-area-inset-bottom, 0px));
  z-index: 25;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--outline);
  border-radius: 999px;
  background: var(--surface-high);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.freetalk-back-top:hover {
  border-color: rgba(255, 179, 173, 0.44);
  background: var(--surface-low);
}

.freetalk-back-top:focus-visible {
  outline: 2px solid rgba(255, 179, 173, 0.55);
  outline-offset: 2px;
}

.freetalk-back-top:active {
  transform: scale(0.96);
}

.freetalk-site-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
  align-items: stretch;
}

.freetalk-site-compare-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  text-align: center;
}

.freetalk-compare-thumb {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  height: clamp(200px, 32vw, 280px);
  padding: 8px;
  background: var(--surface-lowest);
  border: 1px solid var(--outline);
  border-radius: 6px;
}

.freetalk-compare-thumb img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
}

.freetalk-site-compare-item figcaption {
  font-size: 13px;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .freetalk-site-compare {
    grid-template-columns: 1fr;
  }

  .freetalk-compare-thumb {
    height: auto;
    min-height: 180px;
    max-height: 320px;
  }
}

/* Post-08: 舊介面試做圖（第六～十一張）橫排，不放大 */
.freetalk-ui-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  margin: 10px 0 14px;
  max-width: 100%;
}

.freetalk-ui-strip-item {
  margin: 0;
  flex: 0 0 auto;
  line-height: 0;
}

.freetalk-ui-strip-item img {
  display: block;
  max-width: min(112px, 22vw);
  max-height: 84px;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--outline);
  border-radius: 4px;
  background: var(--surface-lowest);
}

/* 段落內 (第十二張)～(第十七張) 對照圖：不撐滿寬、不刻意放大 */
.freetalk-ui-inline-img {
  display: inline-block;
  margin: 6px 0 4px;
  max-width: 100%;
  line-height: 0;
}

.freetalk-ui-inline-img img {
  display: block;
  max-width: min(280px, 92%);
  max-height: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--outline);
  border-radius: 4px;
  background: var(--surface-lowest);
}

.freetalk-content-head h3 {
  font-size: clamp(21px, 2.9vw, 32px);
}

.freetalk-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: center;
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

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

.freetalk-meta-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.88;
}

.freetalk-date {
  margin: 8px 0 0;
  color: var(--text-muted);
}

.freetalk-body {
  margin-top: 16px;
}

/* ----- Download page (stitch-inspired, site palette) ----- */
.hero-download {
  min-height: 42vh;
}

.download-hero-inner .subtitle.download-hero-tagline {
  margin-top: 12px;
  max-width: 36rem;
  font-style: italic;
  color: var(--text-muted);
}

.download-page {
  padding-top: 8px;
}

.download-files-lead {
  margin-bottom: 10px;
}

.download-subhead-lead {
  text-align: center;
}

.download-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}

.download-meta-card {
  margin: 0;
}

.download-meta-title {
  margin: 0 0 14px;
  font-family: "Newsreader", serif;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  color: var(--text);
}

.download-meta-title-warn {
  color: #b85c5c;
}

.download-meta-card-warn {
  border-color: rgba(194, 59, 59, 0.28);
}

.download-body {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-muted);
}

.download-body p {
  margin: 0 0 14px;
}

.download-body p:last-child {
  margin-bottom: 0;
}

.download-body strong {
  color: var(--text);
}

.download-reminder {
  margin-bottom: 28px;
}

.download-section-main {
  background: linear-gradient(160deg, rgba(32, 31, 30, 0.92), rgba(43, 42, 41, 0.92));
  border: 1px solid var(--outline);
  padding: 28px 24px 32px;
  margin-bottom: 22px;
}

.download-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.download-section-h2 {
  margin: 0;
  font-family: "Newsreader", serif;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
}

.download-new-badge {
  display: inline-block;
  vertical-align: middle;
  max-width: none;
}

.download-version-line {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--text);
}

.download-warn-line {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.75;
  color: #c23b3b;
}

.download-subhead {
  margin: 22px 0 16px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.download-subhead-small {
  font-size: 15px;
  margin-top: 20px;
}

.download-subhead-alert {
  color: #da4444;
}

.download-date-tag {
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: none;
  margin-right: 6px;
}

.download-body-tight {
  margin-bottom: 10px;
}

.download-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid rgba(88, 65, 62, 0.45);
  background: rgba(88, 65, 62, 0.35);
}

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

.download-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  padding: 22px 20px 18px;
  background: var(--surface-low);
  transition: background 280ms ease, border-color 280ms ease;
}

.download-tile:hover {
  background: var(--surface-high);
}

.download-tile-label {
  margin: 0 0 6px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(230, 226, 223, 0.45);
}

.download-tile-title {
  margin: 0 0 10px;
  font-family: "Newsreader", serif;
  font-size: 1.45rem;
  line-height: 1.2;
  color: var(--text);
}

.download-tile-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-muted);
}

.download-cta {
  display: block;
  margin-top: 18px;
  padding: 14px 16px;
  text-align: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 179, 173, 0.35);
  transition: background 220ms ease, color 220ms ease;
}

.download-cta-primary {
  background: var(--primary-deep);
  color: var(--text);
}

.download-cta-primary:hover {
  background: var(--primary);
  color: #1a1817;
}

.download-cta-secondary {
  background: var(--surface-high);
  color: var(--text);
}

.download-cta-secondary:hover {
  background: var(--surface-bright);
  color: var(--text);
}

.download-cta-soft {
  font-weight: 600;
  border-width: 1px;
  border-style: solid;
}

.download-cta-soft:hover {
  filter: brightness(1.08);
}

.download-cta-pack-red {
  background: #9a2a2a;
  color: #ffecec;
  border-color: rgba(255, 130, 120, 0.45);
  font-weight: 600;
}

.download-cta-pack-red:hover {
  background: #b83333;
  color: #fff;
}

.download-cta-pack-red-b {
  background: #7c2424;
  border-color: rgba(255, 110, 100, 0.35);
}

.download-cta-pack-red-b:hover {
  background: #952e2e;
}

/* 淺色按鈕：各區塊用不同色調區分 */
.download-cta-tint-pack-a {
  background: rgba(255, 192, 186, 0.5);
  color: #3a2c2a;
  border-color: rgba(180, 100, 95, 0.35);
}

.download-cta-tint-pack-b {
  background: rgba(233, 205, 150, 0.45);
  color: #3a3420;
  border-color: rgba(160, 120, 60, 0.3);
}

.download-cta-tint-body-mf {
  background: rgba(170, 200, 228, 0.42);
  color: #243038;
  border-color: rgba(90, 130, 170, 0.35);
}

.download-cta-tint-body-od {
  background: rgba(220, 205, 175, 0.48);
  color: #353028;
  border-color: rgba(130, 110, 80, 0.3);
}

.download-cta-tint-body-mega {
  background: rgba(210, 190, 225, 0.42);
  color: #2e2835;
  border-color: rgba(120, 95, 145, 0.32);
}

.download-cta-tint-patch-mf {
  background: rgba(175, 218, 200, 0.42);
  color: #1f332c;
  border-color: rgba(70, 130, 100, 0.32);
}

.download-cta-tint-patch-od {
  background: rgba(240, 228, 200, 0.5);
  color: #383220;
  border-color: rgba(160, 140, 90, 0.28);
}

.download-cta-tint-patch-mega {
  background: rgba(255, 200, 195, 0.38);
  color: #402826;
  border-color: rgba(180, 100, 95, 0.28);
}

.download-cta-tint-save-od {
  background: rgba(160, 205, 235, 0.45);
  color: #1f3040;
  border-color: rgba(70, 120, 160, 0.35);
}

.download-cta-tint-save-mega {
  background: rgba(245, 210, 195, 0.45);
  color: #3d2820;
  border-color: rgba(180, 110, 85, 0.3);
}

.download-cta-tint-end-mf {
  background: rgba(200, 225, 195, 0.48);
  color: #243024;
  border-color: rgba(90, 120, 85, 0.32);
}

.download-cta-tint-end-od {
  background: rgba(225, 200, 215, 0.45);
  color: #34242c;
  border-color: rgba(140, 100, 120, 0.3);
}

.download-tile-grid-save .download-tile {
  min-height: 180px;
}

.download-section-main .download-body .download-tile-grid {
  margin-top: 18px;
}

.download-footnote {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.download-rule {
  margin: 26px 0;
  border: 0;
  border-top: 1px solid rgba(88, 65, 62, 0.45);
}

.download-link-list {
  margin: 8px 0 0;
  padding-left: 1.1em;
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-muted);
}

.download-link-list li {
  margin-bottom: 6px;
}

.download-changelog-panel {
  margin-bottom: 22px;
}

.download-changelog {
  max-height: 140px;
  overflow-y: auto;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px dashed rgba(88, 65, 62, 0.55);
  background: rgba(15, 14, 13, 0.55);
  font-size: 12px;
  line-height: 1.65;
  color: rgba(230, 226, 223, 0.55);
}

.download-k-note {
  margin-bottom: 0;
}

.text-k-key {
  color: #da4444;
  font-weight: 700;
}

@media (max-width: 900px) {
  .download-meta-grid {
    grid-template-columns: 1fr;
  }

  .download-tile-grid,
  .download-tile-grid-dual {
    grid-template-columns: 1fr;
  }
}

.guide-article img { max-width: 100%; height: auto; }
.guide-article a { word-break: break-word; }
.freetalk-post { display: none; }
.freetalk-post.active { display: block; }

@media (max-width: 940px) {
  .split { grid-template-columns: 1fr; }
  .hero-inner { padding-top: 100px; }
  .character-modal-content { grid-template-columns: 1fr; }
  .freetalk-layout { grid-template-columns: 1fr; }
  .freetalk-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--outline);
    padding-right: 0;
    padding-bottom: 10px;
  }
}

@media (max-width: 990px) {
  .header-inner {
    align-items: flex-start;
    gap: 10px;
    position: relative;
  }

  .brand {
    font-size: clamp(18px, 6vw, 24px);
    max-width: calc(100% - 52px);
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    border-color: rgba(255, 179, 173, 0.72);
    color: var(--primary);
    background: rgba(20, 19, 18, 0.85);
  }

  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(420px, 97vw);
    max-height: calc(100vh - 96px);
    overflow: auto;
    padding: 8px;
    border: 1px solid rgba(255, 179, 173, 0.18);
    background: linear-gradient(160deg, rgba(25, 24, 23, 0.98), rgba(19, 18, 17, 0.98));
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    font-size: 14px;
    letter-spacing: 0;
    text-transform: none;
  }

  .nav.open {
    display: grid;
  }

  .nav a {
    min-height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: rgba(230, 226, 223, 0.86);
    background: rgba(38, 36, 35, 0.85);
    border: 1px solid rgba(255, 179, 173, 0.12);
    padding: 6px 4px;
    line-height: 1.15;
    text-align: center;
    border-bottom-color: rgba(255, 179, 173, 0.12);
    font-size: 14px;
  }

  .nav-icon {
    width: 12px;
    height: 12px;
  }

  .nav a:hover,
  .nav a.active {
    color: var(--primary);
    border-color: rgba(255, 179, 173, 0.36);
    background: rgba(47, 44, 42, 0.92);
  }

}
