/* 復古遊戲畫質升級指南 - an AV input menu.
 *
 * Near-black panels, a phosphor-green accent and a faint scanline texture on
 * the header only: the look of the on-screen menu of a scaler, which is the one
 * interface every reader of this site has stared at in frustration. Topics are
 * numbered like inputs (IN1, IN2...). The article body stays light and plain,
 * because long Chinese text on a dark ground is tiring to read and the chrome is
 * the only place the theme needs to speak.
 *
 * Han text wants more leading than Latin, so body copy is set at 1.9.
 */

:root[data-site="mclassic"] {
  --paper: #fbfbf8;
  --paper-alt: #eef0ec;
  --ink: #111512;
  --ink-soft: #384039;
  --ink-faint: #667066;
  --accent: #0f7a3d;
  --accent-soft: #e0f3e8;
  --panel: #0c0f0d;
  --phosphor: #39e07f;
  --line: #dde2dc;
  --radius: 4px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --han: "PingFang HK", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root[data-site="mclassic"] {
    --paper: #101311;
    --paper-alt: #171b18;
    --ink: #eaf0ea;
    --ink-soft: #c5cdc6;
    --ink-faint: #93a094;
    --accent: #5fe39a;
    --accent-soft: #14301f;
    --line: #28302a;
  }
}

:root[data-site="mclassic"] body { background: var(--paper); color: var(--ink); font-family: var(--han); }

.mc-header { background: var(--panel); color: #d8f5e2; background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 3px); }
.mc-bar { display: flex; align-items: center; gap: 1rem; padding-block: .8rem; }
.mc-mark { text-decoration: none; display: grid; line-height: 1.1; }
.mc-mark-zh { color: #fff; font-weight: 800; font-size: 1.35rem; letter-spacing: .04em; }
.mc-mark-en { color: var(--phosphor); font-family: var(--mono); font-size: .66rem; letter-spacing: .18em; }
.mc-lang { display: flex; gap: .25rem; margin-left: auto; font-family: var(--mono); font-size: .75rem; }
.mc-lang a { color: #a9c7b4; text-decoration: none; border: 1px solid #2c3a31; padding: .2rem .5rem; border-radius: 3px; }
.mc-lang a.is-current { color: var(--panel); background: var(--phosphor); border-color: var(--phosphor); }
.mc-search input { width: 13rem; max-width: 100%; background: #151b17; border: 1px solid #2c3a31; color: #e3f7ea; border-radius: 3px; padding: .45rem .7rem; font-family: var(--mono); font-size: .82rem; }
.mc-toggle .nav-toggle-bars, .mc-toggle .nav-toggle-bars::before, .mc-toggle .nav-toggle-bars::after { background: #d8f5e2; }
.mc-inputs { border-top: 1px solid #1f2922; }
.mc-inputs-inner { display: flex; gap: 1.1rem; overflow-x: auto; padding-block: .5rem; scrollbar-width: none; }
.mc-inputs-inner a { white-space: nowrap; color: #bcd5c5; text-decoration: none; font-size: .85rem; }
.mc-inputs-inner a:hover, .mc-inputs-inner a.is-current { color: var(--phosphor); }
.mc-in { font-family: var(--mono); font-size: .66rem; color: var(--phosphor); margin-right: .35rem; opacity: .85; }
@media (max-width: 760px) { .mc-search { display: none; } }

.mc-hero { background: var(--panel); color: #e4f5ea; padding-block: 2.6rem 3rem; }
.mc-hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); color: #fff; margin: 0 0 .7rem; max-width: 20ch; line-height: 1.25; }
.mc-hero-lede { color: #b7cdbf; font-size: 1.08rem; max-width: 58ch; margin: 0 0 1.8rem; line-height: 1.8; }
.mc-chain { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.mc-chain li { position: relative; }
.mc-chain li:not(:last-child)::after { content: "→"; position: absolute; right: -.55rem; top: 50%; transform: translateY(-50%); color: var(--phosphor); font-family: var(--mono); }
.mc-chain a { display: grid; gap: .3rem; padding: .9rem; border: 1px solid #2b3a30; border-radius: var(--radius); color: #e4f5ea; text-decoration: none; background: #111713; }
.mc-chain a:hover { border-color: var(--phosphor); }
.mc-chain-k { font-family: var(--mono); color: var(--phosphor); font-size: .7rem; }
@media (max-width: 640px) {
  .mc-chain { grid-template-columns: 1fr 1fr; }
  .mc-chain li::after { display: none; }
}

.mc-hubs { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); margin-top: 2.4rem; }
.mc-hub { border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 1rem; background: var(--paper); }
.mc-hub h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
.mc-hub h2 a { color: var(--ink); text-decoration: none; }
.mc-hub ul { list-style: none; margin: 0; padding: 0; }
.mc-hub li { font-size: .9rem; padding-block: .25rem; border-bottom: 1px dotted var(--line); }
.mc-hub li a { color: var(--ink-soft); text-decoration: none; }

.mc-footer { margin-top: 4rem; background: var(--panel); color: #b7cdbf; }
.mc-footer a { color: #cfe6d7; text-decoration: none; }
.mc-footer-grid { display: grid; gap: 2rem; grid-template-columns: 2fr 3fr 1fr; padding-block: 2rem; }
.mc-footer-topics { columns: 2; }
.mc-footer nav a { display: block; padding-block: .15rem; font-size: .88rem; }
.mc-footer-tag { font-size: .88rem; }
.mc-footer-legal { border-top: 1px solid #1f2922; padding-block: 1rem 1.4rem; font-size: .74rem; }
.mc-footer-legal p { margin: .2rem 0; }
@media (max-width: 760px) { .mc-footer-grid { grid-template-columns: 1fr; } }

:root[data-site="mclassic"] .prose { max-width: 42em; font-size: 1.04rem; }
:root[data-site="mclassic"] .prose p { line-height: 1.9; }
:root[data-site="mclassic"] { --accent-ink: var(--accent); }
