/* hanatsumi · village edition
   the palette of evned's Lampaul: cream paper by day, plum by night. no glow, no scanlines.
   EB Garamond for reading, VT323 for the pixel-ish display type.
   Same class vocabulary and the same variable names as style-vaporwave.css, so a page
   switches by changing its <link>.
*/

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=VT323&display=swap');

:root {
  color-scheme: light;
  --bg: #e6dfc6;          /* paper, a step lighter than the game's cream */
  --bg-deep: #d2c9a5;     /* cream: panels, cards */
  --text: #4b3d44;        /* near-black plum, 7.7:1 on --bg */
  --muted: #574852;       /* plum-dark, 6.4:1 */
  --accent: #79444a;      /* clay-dark: headings, links (5.8:1) */
  --accent-soft: #425270; /* blue-dark (5.9:1) */
  --teal: #4b726e;        /* sage-dark: rules and borders only, not text */
  --rule: #ab9b8e;        /* grey-warm-light */
  --ink: #4b3d44;         /* outlines on the map signs, in either theme */
  --sign: #d2c9a5;
  --glow-pink: none;
  --glow-teal: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #3d3237;
    --bg-deep: #4b3d44;
    --text: #d2c9a5;      /* cream, 7.4:1 on --bg */
    --muted: #ab9b8e;     /* 4.6:1 */
    --accent: #d1b187;    /* sand-light, 6.1:1 */
    --accent-soft: #8caba1; /* sage-light, 4.9:1 */
    --teal: #8caba1;
    --rule: #574852;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #3d3237;
  --bg-deep: #4b3d44;
  --text: #d2c9a5;
  --muted: #ab9b8e;
  --accent: #d1b187;
  --accent-soft: #8caba1;
  --teal: #8caba1;
  --rule: #574852;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'EB Garamond', ui-serif, Georgia, "Times New Roman", serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 19px;
  font-feature-settings: "kern", "liga", "onum";
  max-width: 38rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
  min-height: 100vh;
}

/* ---- Links ---- */
a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule);
  text-underline-offset: 4px;
  transition: color 0.15s, text-decoration-color 0.15s;
}
a:hover { color: var(--accent-soft); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; }

/* ---- Back link ---- */
.back {
  display: inline-block;
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 2.5rem;
}
.back:hover { color: var(--accent); }

/* ---- Site header ---- */
header.site {
  margin-bottom: 2rem;
  position: relative;
}
header.site h1 {
  font-family: 'VT323', ui-monospace, monospace;
  font-weight: 400;
  font-size: 4rem;
  line-height: 1;
  letter-spacing: 0.04em;
  margin: 0 0 0.3rem;
  color: var(--accent);
}
header.site .tagline {
  font-style: italic;
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0;
}
/* the 花 ornament, quiet */
header.site::after {
  content: '花';
  position: absolute;
  top: -1.2rem;
  right: -0.5rem;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 5rem;
  color: var(--teal);
  opacity: 0.16;
  pointer-events: none;
}

.intro {
  font-style: italic;
  color: var(--muted);
  margin: 0 0 2.5rem;
}

/* ---- Collection nav (homepage) ---- */
nav.collections { margin: 2.5rem 0 1rem; }
nav.collections ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}
nav.collections li { border-bottom: 1px solid var(--rule); }
nav.collections a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.8rem 0.4rem;
  text-decoration: none;
  color: var(--text);
}
nav.collections a:hover { color: var(--accent); background: color-mix(in srgb, var(--bg-deep) 50%, transparent); }
nav.collections .name {
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
}
nav.collections .desc {
  color: var(--muted);
  font-style: italic;
  font-size: 0.95rem;
  text-align: right;
}

/* ---- Collection list (entries inside a section) ---- */
ul.collection-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}
ul.collection-list li { border-bottom: 1px solid var(--rule); }
ul.collection-list a {
  display: block;
  padding: 1.1rem 0.4rem;
  text-decoration: none;
  color: var(--text);
}
ul.collection-list a:hover { color: var(--accent); background: color-mix(in srgb, var(--bg-deep) 50%, transparent); }
ul.collection-list .title { font-size: 1.2rem; margin-bottom: 0.2rem; }
ul.collection-list .meta {
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---- Article ---- */
article header {
  margin-bottom: 2rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--rule);
}
article header h1 {
  font-family: 'VT323', ui-monospace, monospace;
  font-weight: 400;
  font-size: 2.8rem;
  line-height: 1.1;
  letter-spacing: 0.03em;
  margin: 0 0 0.4rem;
  color: var(--accent);
}
article header .meta {
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0;
}
article .body p { margin: 0 0 1.2rem; }
article .body blockquote {
  border-left: 2px solid var(--teal);
  padding: 0.3rem 0 0.3rem 1.4rem;
  margin: 1.8rem 0;
  font-style: italic;
  font-size: 1.05rem;
}
article .body blockquote p { margin: 0 0 0.5rem; }
article .body blockquote p:last-child { margin: 0; }
article .body blockquote cite {
  display: block;
  text-align: right;
  margin-top: 0.6rem;
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  font-style: normal;
  color: var(--muted);
}
article .body em { font-style: italic; color: var(--accent-soft); }
article .body strong { font-weight: 600; color: var(--accent); }

/* ---- Demo notice ---- */
.demo-notice {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--muted);
  margin: 0 0 1.8rem;
  padding: 0.7rem 1rem;
  border-left: 2px solid var(--teal);
  background: var(--bg-deep);
}
.demo-notice code {
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 1em;
  padding: 0 0.3rem;
  background: var(--bg);
  border-radius: 3px;
}

/* ---- Footer ---- */
footer.site {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
footer.site p { margin: 0; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--accent); }

/* ---- Mobile ---- */
@media (max-width: 480px) {
  body { font-size: 18px; padding: 2.5rem 1.2rem 3rem; }
  header.site h1 { font-size: 3.2rem; }
  header.site::after { font-size: 3.8rem; top: -0.8rem; right: -0.2rem; }
  article header h1 { font-size: 2.2rem; }
  nav.collections a { flex-direction: column; gap: 0.1rem; }
  nav.collections .desc { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
