/*
 * SNK Music Player — the page for player.snk.plus.
 *
 * The palette and the two display faces are the app's own Vellum Sage theme,
 * and the fonts are served from this directory: the product is offline, so its
 * page does not call a CDN either.
 */

@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('assets/fonts/karla-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
                 U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('assets/fonts/karla-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Marcellus';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/marcellus-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
                 U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Marcellus';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/marcellus-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Vellum Sage, straight from the app. */
  --bg: #f5f2e7;
  --paper: #fffdf6;
  --ink-rgb: 47, 51, 40;
  --ink: rgb(var(--ink-rgb));
  --ink-soft: rgba(var(--ink-rgb), 0.7);
  --ink-faint: rgba(var(--ink-rgb), 0.45);
  --ink-ghost: rgba(var(--ink-rgb), 0.3);
  --line: rgba(var(--ink-rgb), 0.14);
  --status: #7d8c5c;
  --accent: #b8724f;
  --accent-deep: #8f5236;
  --on-accent: #fffdf6;

  /* Both faces cover Latin only; Chinese falls through to the system stack. */
  --font-ui: Karla, -apple-system, BlinkMacSystemFont, 'Segoe UI Variable Text', 'Segoe UI',
             'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-display: Marcellus, Georgia, 'Songti SC', serif;
  --font-mono: ui-monospace, Menlo, 'Cascadia Mono', monospace;

  --page: 1180px;
  --pad: clamp(20px, 5vw, 32px);

  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The ruled paper the app draws behind its own views. */
.rules {
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(var(--ink-rgb), .04) 0 1px, transparent 1px 34px);
  pointer-events: none;
  z-index: 0;
}

main, .site-head, .site-foot { position: relative; z-index: 1; }

/* Language: both versions live in the markup, one of them is shown. */
i[lang] { font-style: normal; }
[data-lang='zh'] i[lang='en'],
[data-lang='en'] i[lang='zh'] { display: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: .01em; }
a { color: var(--accent-deep); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
code { font-family: var(--font-mono); font-size: .92em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------------------------------------------------------------- header */

.site-head {
  max-width: var(--page);
  margin: 0 auto;
  padding: 22px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; color: inherit; }
.brand-mark { font-family: var(--font-display); font-size: 23px; }
.brand-sub {
  font-size: 10.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.lang { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 2px; padding: 2px; }
.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 12.5px;
  letter-spacing: .06em;
  padding: 5px 13px;
  border-radius: 1px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.lang-btn[aria-pressed='true'] { background: var(--ink); color: var(--bg); }

/* ------------------------------------------------------------------ hero */

section { max-width: var(--page); margin: 0 auto; padding: 0 var(--pad); }

.hero {
  padding-top: 32px;
  padding-bottom: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 44px;
}

.eyebrow {
  margin: 0;
  font-size: 10.5px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--status);
}

h1 {
  margin: 16px 0 0;
  font-size: clamp(34px, 6.2vw, 58px);
  line-height: 1.12;
  text-wrap: balance;
}

.lede {
  margin: 20px 0 0;
  max-width: 46ch;
  font-size: clamp(16px, 1.6vw, 17.5px);
  color: var(--ink-soft);
  text-wrap: pretty;
}

.cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 14px; }

.button {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 13px 24px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.3;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.button:hover { background: rgba(var(--ink-rgb), .06); color: var(--ink); }
.button .button-note { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 8px 22px rgba(184, 114, 79, .26);
}
.button.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--on-accent); }
.button.primary .button-note { color: rgba(255, 253, 246, .75); }

.cta-meta { margin: 16px 0 0; font-size: 13.5px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 8px; }
.cta-meta .sep { color: var(--ink-ghost); }
.cta-meta b { font-weight: 600; }

.hero-shot { margin: 0; }

/* On a phone the app's own text would shrink past reading size, so the frame
   scrolls sideways instead of scaling the screenshot down to nothing. */
.shot { overflow-x: auto; overscroll-behavior-x: contain; }
.hero-shot img, .panel img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 24px 60px rgba(20, 22, 18, .14);
}
@media (max-width: 700px) {
  .shot img { width: 720px; max-width: none; }
}

.hero-shot figcaption, .panel-note {
  margin: 14px 0 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 68ch;
  text-wrap: pretty;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: center;
    gap: 56px;
    padding-top: 48px;
    padding-bottom: 96px;
  }
  .hero-shot figcaption { max-width: none; }
}

/* -------------------------------------------------------------- sections */

h2 { margin: 0; font-size: clamp(26px, 3.4vw, 34px); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 12px;
}
.section-note { margin: 0; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.section-note b { font-weight: 600; color: var(--ink-soft); }

.features {
  padding-top: 66px;
  padding-bottom: 66px;
  background: var(--paper);
  max-width: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.features > * { max-width: var(--page); margin-inline: auto; }

.feature-grid {
  margin-top: 40px;
  display: grid;
  gap: 36px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.feature { border-top: 2px solid var(--ink); padding-top: 18px; }
.numeral { font-family: var(--font-display); font-size: 21px; color: var(--ink-ghost); }
.numeral.accent { color: var(--accent); }
.feature h3 { margin: 8px 0 0; font-size: 23px; }
.feature p { margin: 10px 0 0; font-size: 14.5px; line-height: 1.75; color: var(--ink-soft); text-wrap: pretty; }

/* ------------------------------------------------------------- the tabs */

.screens { padding-top: 76px; }

.tabs { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  appearance: none;
  font: inherit;
  font-size: 13.5px;
  padding: 8px 17px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.tab:hover { border-color: rgba(var(--ink-rgb), .3); color: var(--ink); }
.tab[aria-selected='true'] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.panel { margin-top: 22px; }
.panel .panel-note { margin: 0 0 16px; }
.panel[hidden] { display: none; }

/* -------------------------------------------------------------- the list */

.more { padding-top: 76px; }
.more h2 { border-bottom: 2px solid var(--ink); padding-bottom: 12px; }
.more-list {
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
}
.more-list h3 { margin: 0; font-size: 20px; }
.more-list p { margin: 8px 0 0; font-size: 14.5px; line-height: 1.75; color: var(--ink-soft); text-wrap: pretty; }

/* ---------------------------------------------------------- the download */

.download { padding-top: 82px; padding-bottom: 76px; }

.cards {
  margin-top: 30px;
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.card {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 24px 24px 20px;
}
.card h3 { margin: 0; font-size: 24px; }
.card .req { margin: 4px 0 0; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }

.files { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.files li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 1px dotted rgba(var(--ink-rgb), .22);
}
.files li:last-child { border-bottom: 0; padding-bottom: 0; }
.files a { font-size: 15px; text-decoration: none; border-bottom: 1px solid rgba(184, 114, 79, .4); }
.files a:hover { border-bottom-color: var(--accent); }
.files .size { font-size: 13px; color: var(--ink-soft); }
.files .hash { margin-left: auto; font-size: 11.5px; color: var(--ink-faint); }

.fineprint { margin: 16px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--ink-soft); text-wrap: pretty; }
.fineprint.warn { border-left: 2px solid var(--accent); padding-left: 12px; }

.checksums { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 16px; }
.checksums summary { cursor: pointer; font-size: 13.5px; color: var(--ink-soft); }
.checksums summary:hover { color: var(--ink); }
.sums { margin-top: 14px; width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.sums th {
  text-align: left;
  font-weight: 500;
  font-size: 12.5px;
  padding: 6px 14px 6px 0;
  white-space: nowrap;
  color: var(--ink-soft);
}
.sums td { padding: 6px 0; }
.sums code { font-size: 11px; color: var(--ink-faint); word-break: break-all; }

/* ---------------------------------------------------------------- footer */

.site-foot {
  max-width: var(--page);
  margin: 0 auto;
  padding: 30px var(--pad) 46px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.foot-brand { margin: 0; font-family: var(--font-display); font-size: 20px; }
.site-foot .fineprint { margin-top: 6px; max-width: 52ch; }
