/* ===========================
   phosphene/issue.css
   Editorial "field report" landing.
   Self-contained — does NOT extend phosphene.css.
   =========================== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink:        #0a0807;
  --ink-2:      #110e0b;
  --paper:      #f5ede0;
  --paper-dim:  #c2b5a0;
  --paper-mute: #7a6f5e;
  --rule:       rgba(245, 237, 224, 0.14);
  --rule-soft:  rgba(245, 237, 224, 0.06);
  --amber:      #ff8a3c;
  --amber-soft: rgba(255, 138, 60, 0.18);

  --serif: 'Fraunces', ui-serif, Georgia, serif;
  --mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --jp:    'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;

  /* Tunable Fraunces variation defaults */
  --frax-opsz-display: 144;
  --frax-opsz-body:    14;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --content-max:  1240px;
  --gutter:       max(28px, 4vw);
}

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; overflow-x: hidden; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-weight: 380;
  font-variation-settings: "opsz" var(--frax-opsz-body), "SOFT" 30, "WONK" 0;
  font-size: clamp(17px, 1.05vw + 12px, 19px);
  line-height: 1.55;
  letter-spacing: 0.005em;
  min-height: 100vh;
  position: relative;
}

/* Subtle paper grain on the ink */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background-image: radial-gradient(rgba(245,237,224,0.018) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: screen;
  opacity: 0.6;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--amber); color: var(--ink); }

/* ===========================
   Masthead
   =========================== */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 14px var(--gutter);
  background: rgba(10, 8, 7, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.masthead-mark {
  font-family: var(--jp);
  font-size: 18px;
  letter-spacing: 0.1em;
  color: var(--paper);
  text-transform: none;
}

.masthead-meta {
  display: flex;
  gap: 22px;
  justify-content: center;
}
.masthead-meta span { white-space: nowrap; }
.masthead-meta .dot { color: var(--paper-mute); }

.masthead-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}
.masthead-nav a:hover { color: var(--paper); }

.dl-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 16px;
  border: 1px solid var(--paper);
  color: var(--paper);
  border-radius: 999px;
  transition: background 200ms var(--ease), color 200ms var(--ease);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
}
.dl-pill:hover { background: var(--paper); color: var(--ink); }
.dl-pill .arr { display: inline-block; transform: translateY(1px); }

@media (max-width: 760px) {
  .masthead { grid-template-columns: auto auto; }
  .masthead-meta { display: none; }
}

/* ===========================
   Page frame
   =========================== */

main {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  position: relative;
  padding: 7rem 0 6rem;
  border-top: 1px solid var(--rule);
}
.section:first-of-type { border-top: 0; }

.section-num {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--paper-mute);
  margin-bottom: 1.8rem;
}
.section-num::before { content: "§ "; opacity: 0.55; }

.section-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin-bottom: 1.2rem;
}

.section-title {
  font-family: var(--serif);
  font-weight: 360;
  font-variation-settings: "opsz" var(--frax-opsz-display), "SOFT" 50, "WONK" 1;
  font-size: clamp(2.4rem, 5.4vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-wrap: balance;
}
.section-title em {
  font-style: italic;
  font-variation-settings: "opsz" var(--frax-opsz-display), "SOFT" 100, "WONK" 1;
  color: var(--amber);
}

.section-lede {
  font-size: 1.18em;
  line-height: 1.5;
  color: var(--paper);
  max-width: 38em;
  margin-top: 1.4rem;
}

.section-body {
  margin-top: 1.4rem;
  max-width: 36em;
  color: var(--paper-dim);
  font-size: 1.02em;
}
.section-body p + p { margin-top: 1.1rem; }
.section-body em {
  font-style: italic;
  font-variation-settings: "opsz" 20, "SOFT" 50, "WONK" 1;
  color: var(--paper);
}
.section-body a {
  color: var(--paper);
  border-bottom: 1px solid var(--paper-mute);
  transition: border-color 160ms var(--ease);
}
.section-body a:hover { border-bottom-color: var(--amber); }

/* ===========================
   Cover (hero)
   =========================== */

.cover {
  padding: 5rem 0 4rem;
  border-top: 0;
  position: relative;
}

.cover-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--paper-mute);
  margin-bottom: 2.2rem;
  display: flex;
  align-items: center;
  gap: 14px;
}
.cover-eyebrow::before,
.cover-eyebrow::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--rule);
  max-width: 80px;
}

.cover-title {
  font-family: var(--serif);
  font-weight: 320;
  font-variation-settings: "opsz" var(--frax-opsz-display), "SOFT" 60, "WONK" 1;
  font-size: clamp(1.9rem, 5.2vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-wrap: balance;
  text-align: center;
}
.cover-title em {
  font-style: italic;
  font-variation-settings: "opsz" var(--frax-opsz-display), "SOFT" 100, "WONK" 1;
}
.cover-title .colored {
  background: linear-gradient(105deg, var(--amber) 0%, #ffd3a3 60%, var(--paper) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.cover-sub {
  margin: 2rem auto 0;
  max-width: 38em;
  text-align: center;
  font-size: 1.12em;
  line-height: 1.5;
  color: var(--paper-dim);
}
.cover-sub em {
  font-style: italic;
  font-variation-settings: "opsz" 22, "SOFT" 60, "WONK" 1;
  color: var(--paper);
}

.cover-actions {
  margin-top: 2.6rem;
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: transform 200ms var(--ease),
              background 200ms var(--ease),
              border-color 200ms var(--ease),
              color 200ms var(--ease);
}
.btn-primary {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--paper);
}
.btn-primary:hover { transform: translateY(-1px); background: var(--amber); border-color: var(--amber); color: var(--ink); }
.btn-ghost {
  border: 1px solid var(--rule);
  color: var(--paper-dim);
}
.btn-ghost:hover { color: var(--paper); border-color: var(--paper); }

.btn .arr { display: inline-block; transition: transform 200ms var(--ease); }
.btn:hover .arr { transform: translateX(2px) translateY(1px); }

.cover-micro {
  margin-top: 1.4rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-mute);
}

/* Hero video, full-bleed under the cover text */
.cover-plate {
  margin: 5rem calc(-1 * var(--gutter)) 0;
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--ink-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.cover-plate video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92);
}
.cover-plate-caption {
  position: absolute;
  bottom: 14px;
  left: 22px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(245, 237, 224, 0.7);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* ===========================
   Drop cap + pull quote
   =========================== */

.dropcap::first-letter {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" var(--frax-opsz-display), "SOFT" 100, "WONK" 1;
  font-weight: 380;
  float: left;
  font-size: 5.2em;
  line-height: 0.85;
  padding: 0.08em 0.18em 0 0;
  color: var(--paper);
  margin-bottom: -0.1em;
}

.pullquote {
  margin: 3rem auto;
  max-width: 30em;
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 96, "SOFT" 100, "WONK" 1;
  font-weight: 360;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.018em;
  text-align: center;
  color: var(--paper);
  position: relative;
}
.pullquote::before, .pullquote::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  background: var(--paper-mute);
  margin: 1.4rem auto;
}

/* ===========================
   Three steps
   =========================== */

.steps {
  margin-top: 3.4rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 30px;
  counter-reset: step;
}
.step {
  padding-top: 0.8rem;
  border-top: 1px solid var(--rule);
  position: relative;
}
.step-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--paper-mute);
  margin-bottom: 1rem;
}
.step h3 {
  font-family: var(--serif);
  font-weight: 380;
  font-variation-settings: "opsz" 60, "SOFT" 50, "WONK" 1;
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--paper);
  margin-bottom: 0.7rem;
}
.step p {
  color: var(--paper-dim);
  font-size: 1em;
  line-height: 1.55;
}
@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
}

/* ===========================
   Showcases
   =========================== */

.plate-full {
  margin: 3rem auto 0;
  max-width: 720px;
  position: relative;
  background: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}
.plate-full img {
  display: block;
  width: 100%;
  height: auto;
}
.plate-cap {
  margin: 1.2rem auto 0;
  max-width: 720px;
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 18, "SOFT" 80, "WONK" 1;
  font-size: 0.92em;
  color: var(--paper-dim);
  text-align: center;
}

.plate-pair {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}
.plate {
  background: var(--ink-2);
  border: 1px solid var(--rule);
  overflow: hidden;
}
.plate img { display: block; width: 100%; height: auto; }
.plate-menubar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, rgba(255, 138, 60, 0.08), rgba(245, 237, 224, 0.04));
  padding: 36px;
}
.plate-menubar img { width: 100%; height: auto; max-width: 100%; }
@media (max-width: 820px) {
  .plate-pair { grid-template-columns: 1fr; }
  .plate-menubar { padding: 22px; }
}

/* ===========================
   List of what you get
   =========================== */

.specs {
  list-style: none;
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.specs li {
  padding: 18px 22px 18px 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 14px;
  align-items: baseline;
  color: var(--paper);
  font-size: 1.02em;
}
.specs li:nth-child(odd) { padding-right: 32px; border-right: 1px solid var(--rule); }
.specs li:nth-child(even) { padding-left: 22px; }
.specs li .spec-key {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-mute);
  min-width: 2.2em;
  flex-shrink: 0;
}
@media (max-width: 760px) {
  .specs { grid-template-columns: 1fr; }
  .specs li:nth-child(odd) { padding-right: 0; border-right: 0; }
  .specs li:nth-child(even) { padding-left: 0; }
}

/* ===========================
   Download block
   =========================== */

.download-block {
  text-align: center;
  padding: 2rem 0;
}
.download-version {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" var(--frax-opsz-display), "SOFT" 100, "WONK" 1;
  font-weight: 340;
  font-size: clamp(5rem, 11vw, 9rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--paper);
  display: inline-block;
}
.download-version .colored {
  background: linear-gradient(115deg, var(--amber), #ffd3a3 70%, var(--paper));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.download-tag {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--paper-mute);
  margin-top: 1.4rem;
  margin-bottom: 2.4rem;
}
.download-block .btn-primary { padding: 18px 30px; font-size: 12px; }
.download-fine {
  margin-top: 1.6rem;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-mute);
}
.download-fine a { color: var(--paper-dim); border-bottom: 1px solid var(--rule); }
.download-fine a:hover { color: var(--amber); border-bottom-color: var(--amber); }

/* ===========================
   FAQ
   =========================== */

.faq-list {
  margin-top: 3rem;
  border-top: 1px solid var(--rule);
}
.faq details {
  border-bottom: 1px solid var(--rule);
  padding: 1.4rem 0;
  position: relative;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-weight: 380;
  font-variation-settings: "opsz" 40, "SOFT" 50, "WONK" 1;
  font-size: 1.2rem;
  color: var(--paper);
  display: flex;
  align-items: baseline;
  gap: 16px;
  letter-spacing: -0.005em;
  transition: color 160ms var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::marker { display: none; }
.faq summary::before {
  content: counter(faqctr, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--paper-mute);
  min-width: 2.4em;
  flex-shrink: 0;
}
.faq-list { counter-reset: faqctr; }
.faq details { counter-increment: faqctr; }

.faq summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--paper-mute);
  line-height: 1;
  transition: transform 200ms var(--ease), color 200ms var(--ease);
  transform-origin: center;
}
.faq details[open] summary::after { transform: rotate(45deg); color: var(--amber); }
.faq summary:hover { color: var(--amber); }
.faq details[open] summary { color: var(--amber); }

.faq details > p {
  margin-top: 1rem;
  margin-left: 3.6em;
  max-width: 38em;
  color: var(--paper-dim);
  font-size: 1em;
  line-height: 1.55;
}
.faq details > p a {
  color: var(--paper);
  border-bottom: 1px solid var(--paper-mute);
}
.faq details > p a:hover { border-bottom-color: var(--amber); }

@media (max-width: 600px) {
  .faq details > p { margin-left: 0; }
}

/* ===========================
   Final CTA
   =========================== */

.final {
  margin: 0 calc(-1 * var(--gutter));
  padding: 7rem var(--gutter) 7rem;
  text-align: center;
  border-top: 1px solid var(--rule);
  background:
    radial-gradient(ellipse at 50% 0%, var(--amber-soft), transparent 50%),
    var(--ink);
}
.final h2 {
  font-family: var(--serif);
  font-weight: 320;
  font-variation-settings: "opsz" var(--frax-opsz-display), "SOFT" 80, "WONK" 1;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--paper);
  text-wrap: balance;
  max-width: 16em;
  margin: 0 auto;
}
.final h2 em {
  font-style: italic;
  font-variation-settings: "opsz" var(--frax-opsz-display), "SOFT" 100, "WONK" 1;
  color: var(--amber);
}
.final p {
  margin-top: 1.4rem;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--paper-dim);
}
.final .btn { margin-top: 2.6rem; }

/* ===========================
   Colophon (footer)
   =========================== */

.colophon {
  padding: 4rem var(--gutter) 3rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-mute);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 28px;
  align-items: center;
}
.colophon a { color: var(--paper-dim); border-bottom: 1px solid var(--rule); transition: color 160ms var(--ease), border-color 160ms var(--ease); }
.colophon a:hover { color: var(--amber); border-bottom-color: var(--amber); }
.colophon-center {
  text-align: center;
  font-family: var(--jp);
  font-size: 16px;
  letter-spacing: 0.16em;
  color: var(--paper-dim);
  text-transform: none;
}
.colophon-right { text-align: right; }
@media (max-width: 720px) {
  .colophon { grid-template-columns: 1fr; text-align: center; gap: 18px; }
  .colophon-right { text-align: center; }
}

/* ===========================
   Misc helpers
   =========================== */

hr.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 4rem 0;
}

.note {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-mute);
}

/* Reduce motion for those who ask */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* =================================================================
   Internet Yamero harmonization — overrides the field-report tokens
   above so Phosphene shares the site system. (See DESIGN.md §7.3.)
   ================================================================= */
:root {
  --ink:        #0d0a10;
  --ink-2:      #161019;
  --paper:      #f2e7ef;
  --paper-dim:  #ddc9d8;
  --paper-mute: #9c8699;
  --rule:       rgba(255, 134, 191, 0.20);
  --rule-soft:  rgba(255, 134, 191, 0.08);
  --amber:      #ff86bf;
  --amber-soft: rgba(255, 95, 166, 0.18);
  --serif:      'EB Garamond', 'Zen Kaku Gothic New', system-ui, serif;
}

/* Void ground + 8-bit heart watermark (issue's `background` shorthand
   drops the image, so re-apply it here). */
body {
  background-color: #0d0a10;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg fill-opacity='0.09'%3E%3Cg transform='translate(26,32) scale(1.7)' fill='%23ff86bf'%3E%3Crect x='2' width='4' height='2'/%3E%3Crect x='8' width='4' height='2'/%3E%3Crect y='2' width='14' height='2'/%3E%3Crect y='4' width='14' height='2'/%3E%3Crect x='2' y='6' width='10' height='2'/%3E%3Crect x='4' y='8' width='6' height='2'/%3E%3Crect x='6' y='10' width='2' height='2'/%3E%3C/g%3E%3Cg transform='translate(140,96) scale(1.7)' fill='%2376e6e0'%3E%3Crect x='2' width='4' height='2'/%3E%3Crect x='8' width='4' height='2'/%3E%3Crect y='2' width='14' height='2'/%3E%3Crect y='4' width='14' height='2'/%3E%3Crect x='2' y='6' width='10' height='2'/%3E%3Crect x='4' y='8' width='6' height='2'/%3E%3Crect x='6' y='10' width='2' height='2'/%3E%3C/g%3E%3Cg transform='translate(70,164) scale(1.3)' fill='%23a6f0a0'%3E%3Crect x='2' width='4' height='2'/%3E%3Crect x='8' width='4' height='2'/%3E%3Crect y='2' width='14' height='2'/%3E%3Crect y='4' width='14' height='2'/%3E%3Crect x='2' y='6' width='10' height='2'/%3E%3Crect x='4' y='8' width='6' height='2'/%3E%3Crect x='6' y='10' width='2' height='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-size: 220px 220px;
  font-weight: 500;
  font-size: clamp(18px, 1.05vw + 13px, 20px);
}

/* Swap the paper grain for the liminal glow */
body::before {
  z-index: 0;
  opacity: 1;
  mix-blend-mode: normal;
  background:
    radial-gradient(90% 55% at 50% -10%, rgba(255, 95, 166, 0.13), transparent 60%),
    radial-gradient(70% 50% at 10% 28%, rgba(194, 164, 242, 0.09), transparent 60%),
    radial-gradient(64% 50% at 92% 72%, rgba(118, 230, 224, 0.06), transparent 60%),
    radial-gradient(140% 120% at 50% 45%, transparent 52%, rgba(0,0,0,0.55) 100%);
}

/* Display: IM Fell English (antique Oxford types) + Shippori Mincho for CJK */
.cover-title, .final h2, .masthead-mark, .section-title, main h2, main h3 {
  font-family: 'IM Fell English', 'Shippori Mincho', serif;
  font-variation-settings: normal;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.masthead-mark { font-weight: 800; }
.cover-title { font-size: clamp(1.9rem, 4.2vw, 3.4rem); }
.section-title { font-size: clamp(1.9rem, 3.8vw, 3.2rem); }
.final h2 { font-size: clamp(1.7rem, 3.4vw, 2.8rem); }
.cover-eyebrow, .masthead-meta, .masthead-nav, .cover-micro, .colophon,
.cover-plate-caption, .dl-pill {
  font-family: 'DotGothic16', monospace;
}

/* Accents → jirai pink, with a cyan emphasis */
.colored, .cover-title em, .final em, main em { color: var(--amber); font-style: italic; }
::selection { background: #ff86bf; color: #0d0a10; }

/* Pills → capsule gradient */
.btn-primary, .dl-pill {
  background: linear-gradient(120deg, #76e6e0, #ff86bf 60%, #ff5fa6) !important;
  color: #0d0a10 !important;
  border: none !important;
  box-shadow: 0 0 22px -6px #ff5fa6, 0 0 22px -10px #76e6e0;
}
.btn-ghost { border: 1px solid var(--rule) !important; color: var(--paper) !important; }
.btn-ghost:hover { border-color: rgba(118,230,224,0.4) !important; color: #76e6e0 !important; }

/* Heat-haze mark needs no fill clipping */
.masthead-mark.heat-haze { text-shadow: -0.02em 0 rgba(255,95,166,0.6), 0.02em 0 rgba(118,230,224,0.5); }

/* =================================================================
   Refrax — cyan-forward accent (rx no.001 / refraction) + screenshot
   ================================================================= */
:root {
  --amber: #5fe9e0;
  --amber-soft: rgba(118, 230, 224, 0.18);
}
.cover-title .colored {
  background: linear-gradient(105deg, #76e6e0 0%, #bdf6f2 55%, #f2e7ef 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
::selection { background: #76e6e0; color: #0d0a10; }

.refrax-shot {
  max-width: 1000px;
  margin: clamp(2rem, 6vw, 4.5rem) auto 0;
  padding: 0 var(--gutter);
  text-align: center;
}
.refrax-shot img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 24px 80px -24px rgba(118, 230, 224, 0.28), 0 8px 30px rgba(0, 0, 0, 0.5);
}
.refrax-shot figcaption {
  margin-top: 0.9rem;
  font-family: 'DotGothic16', monospace;
  font-size: 11px; letter-spacing: 0.04em;
  color: var(--paper-mute);
}

/* ---- Stat band (ported from piru base) ---------------------------- */
.statband {
  margin-top: 3.4rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.stat { background: var(--ink-2); padding: 1.7rem 1.1rem; text-align: center; }
.stat-num {
  font-family: 'Dela Gothic One', 'Zen Kaku Gothic New', sans-serif;
  font-size: clamp(1.7rem, 3.8vw, 2.7rem);
  line-height: 1;
  color: var(--paper);
}
.stat-num .colored {
  display: inline-block;
  background: linear-gradient(115deg, #76e6e0, #bdf6f2 65%, var(--paper));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.stat-label {
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-mute);
  line-height: 1.5;
}
@media (max-width: 760px) { .statband { grid-template-columns: 1fr 1fr; } }

/* =================================================================
   Refrax icon — recomposed live from its vector layers (crisp + alive).
   Dark-appearance blends from the .icon manifest: Rays = screen @0.9,
   Sphere = normal @0.7, Flare @0.95 scale 1.3. Squircle + bg gradient
   replace the icon's background fill.
   ================================================================= */
.refrax-icon {
  position: relative;
  width: clamp(160px, 30vw, 248px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 23%;
  background: linear-gradient(180deg, #3b2d58 0%, #0b0110 72%);
  box-shadow:
    0 22px 70px -16px rgba(118, 230, 224, 0.20),
    0 12px 44px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  isolation: isolate;
  animation: ri-breathe 6.5s ease-in-out infinite;
}
.refrax-icon img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.ri-rays { position: absolute; inset: 0; mix-blend-mode: screen; opacity: 0.9; }
.ri-band { animation: ri-shimmer 5s ease-in-out infinite; animation-delay: calc(var(--i) * -0.7s); will-change: opacity, transform; }
.ri-ray { opacity: 0.95; animation: ri-raypulse 6.5s ease-in-out infinite; }
.ri-sphere { opacity: 0.7; }
.ri-flare { transform: scale(1.3) translateX(-1.25%); transform-origin: 50% 50%; animation: ri-twinkle 7.5s ease-in-out infinite; will-change: opacity, transform; }

@keyframes ri-shimmer { 0%, 100% { opacity: 0.74; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-0.7%); } }
@keyframes ri-raypulse { 0%, 100% { opacity: 0.8; } 50% { opacity: 1; } }
@keyframes ri-twinkle { 0%, 100% { opacity: 0.55; transform: scale(1.30) translateX(-1.25%); } 50% { opacity: 1; transform: scale(1.345) translateX(-1.25%); } }
@keyframes ri-breathe {
  0%, 100% { box-shadow: 0 22px 64px -18px rgba(118,230,224,0.15), 0 12px 44px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.07), inset 0 0 0 1px rgba(255,255,255,0.04); }
  50%      { box-shadow: 0 22px 82px -12px rgba(118,230,224,0.34), 0 12px 44px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.07), inset 0 0 0 1px rgba(255,255,255,0.04); }
}
@media (prefers-reduced-motion: reduce) { .refrax-icon, .refrax-icon * { animation: none !important; } }

/* =================================================================
   Refrax hero — wide prism scene (supersedes .refrax-icon).
   Glow elements use screen blend so they bloom against the void.
   ================================================================= */
.refrax-scene { width: min(100%, 1080px); margin: 0.5rem auto 0; }
.refrax-scene svg { width: 100%; height: auto; display: block; overflow: visible; }
.rs-fan, .rs-rays, #rs-beam, .rs-flare, .rs-halo, #rs-entry { mix-blend-mode: screen; }
#rs-sphere { cursor: grab; }
/* move via CSS transforms (GPU-composited, no per-frame repaint in WebKit).
   view-box origin 0,0 makes `translate() rotate()` match the SVG attribute math. */
#rs-sphere, #rs-dispersion { transform-box: view-box; transform-origin: 0 0; will-change: transform; }

/* target ◎ — aim the bent light here */
.rt-ring { transform-box: fill-box; transform-origin: center; transition: stroke 0.3s ease; animation: rt-pulse 3.4s ease-in-out infinite; }
@keyframes rt-pulse { 0%,100% { opacity: 0.7; } 50% { opacity: 1; } }
#rs-target.is-hit .rt-ring  { stroke: rgba(118,230,224,0.95); filter: drop-shadow(0 0 9px rgba(118,230,224,0.85)); animation: rt-hit 0.5s ease-out; }
#rs-target.is-hit .rt-ring2 { stroke: rgba(255,134,191,0.9); }
#rs-target.is-hit .rt-dot   { fill: #ffffff; }
@keyframes rt-hit { 0% { transform: scale(1); } 45% { transform: scale(1.28); } 100% { transform: scale(1); } }

/* reward sparkles (appended local to the target group) */
.rt-spark { transform-box: fill-box; transform-origin: center; animation: rt-spark 0.7s ease-out forwards; }
@keyframes rt-spark { from { transform: translate(0,0); opacity: 1; } to { transform: translate(var(--dx), var(--dy)); opacity: 0; } }

/* hint + reward readout */
.rs-hint, .rs-score { text-align: center; font-family: 'DotGothic16', monospace; font-size: 11px; letter-spacing: 0.12em; }
.rs-hint  { margin: 0.6rem 0 0; color: var(--paper-mute); transition: opacity 0.5s ease; }
.rs-hint.gone { opacity: 0; }
.rs-score { margin: 0.25rem 0 0; min-height: 1.1em; color: #76e6e0; opacity: 0; transition: opacity 0.4s ease; }
.rs-score.show { opacity: 1; }

.rs-fan   { animation: rs-fan 7s ease-in-out infinite; }
.rs-rays  { animation: rs-rays 5s ease-in-out infinite; }
.rs-beam  { animation: rs-beam 6s ease-in-out infinite; }
.rs-glow  { animation: rs-glow 9s ease-in-out infinite; }
.rs-flare { animation: rs-flare 5.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes rs-fan   { 0%,100% { opacity: 0.82; } 50% { opacity: 1; } }
@keyframes rs-rays  { 0%,100% { opacity: 0.68; } 50% { opacity: 1; } }
@keyframes rs-beam  { 0%,100% { opacity: 0.85; } 50% { opacity: 1; } }
@keyframes rs-glow  { 0%,100% { opacity: 0.38; } 50% { opacity: 0.6; } }
@keyframes rs-flare { 0%,100% { opacity: 0.6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .refrax-scene * { animation: none !important; } }

/* badge88 text: yamero's --ink is light, but issue.css flips --ink dark — keep it readable */
.badge88 { color: var(--paper); border-color: var(--rule); }
.badge88:hover { color: var(--amber); border-color: var(--amber); }

/* ===========================
   The caveat — 服用注意
   =========================== */

.caveat {
  margin: 2.8rem auto 0;
  max-width: 40em;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--amber);
  background: linear-gradient(120deg, rgba(240,168,78,0.06), transparent 60%);
  padding: 1.3rem 1.5rem;
  font-size: 0.98em;
  color: var(--paper-dim);
}
.caveat b {
  display: block;
  font-family: 'DotGothic16', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 400;
  margin-bottom: 0.6rem;
}
.caveat a { color: var(--paper); border-bottom: 1px solid var(--paper-mute); }
.caveat a:hover { border-bottom-color: var(--amber); }
.caveat code { font-family: var(--mono); font-size: 0.9em; color: var(--paper); }
