/* =====================================================================
   MASTER OF IVES — DMM GAMES PLAYER Official Site
   Integration layer on top of style.css: bilingual toggle, DMM header
   framing, Play button, start-popup modal, compliance/legal pages.
   Brand system + palette come from style.css (Visual Style Guide v1.0).
   ===================================================================== */

/* ---------- Japanese typography (JA is primary) ---------- */
/* Exo 2 / Oswald cover Latin; Noto Sans JP catches Japanese glyphs cleanly. */
body { font-family: "Exo 2", "Noto Sans JP", system-ui, sans-serif; }
h1, h2, h3, .display, .eyebrow, .btn, .btn-play, .fbtn, .nav-links a, .kv dt {
  font-family: "Oswald", "Noto Sans JP", sans-serif;
}

/* Keep the official DMM age gate visually faithful — our global h1 reset
   (uppercase / Oswald / letter-spacing) must not restyle its heading. */
#common-age-verification,
.common-age-verification-heading,
.common-age-verification-description {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
}
.common-age-verification-heading { text-transform: none; letter-spacing: normal; }

/* ---------- Bilingual (JA primary / EN toggle) ---------- */
html[data-lang="ja"] .en { display: none !important; }
html[data-lang="en"] .ja { display: none !important; }
/* until i18n.js runs, show JA only (avoids flash of both) */
html:not([data-lang]) .en { display: none !important; }

.lang-switch { display: inline-flex; gap: 4px; align-items: center; }
.lang-switch button {
  font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .08em;
  font-size: .72rem; font-weight: 600; padding: 5px 10px; border-radius: 8px; cursor: pointer;
  color: var(--ink-dim); background: rgba(255,255,255,.05); border: 1px solid var(--line);
  transition: .15s;
}
.lang-switch button:hover { color: var(--mist); border-color: rgba(255,255,255,.28); }
.lang-switch button[aria-pressed="true"] {
  color: #fff; border-color: var(--neon); background: rgba(255,79,216,.16); box-shadow: var(--glow-neon);
}

/* ---------- DMM required header (rule 2.1) ---------- */
/* dmm-header/dmmheader.css styles #dmm_ntgnavi; this just seats it above our nav. */
.dmm-header { position: relative; z-index: 60; }

/* ---------- Play button (rule 6.1) ---------- */
.btn-play {
  font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
  font-size: 1.05rem; padding: 16px 40px; border-radius: 14px; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 12px; color: #fff;
  background: linear-gradient(135deg, var(--neon), var(--raspberry));
  box-shadow: var(--glow-neon), 0 10px 30px rgba(255,79,216,.25);
  transition: transform .15s, box-shadow .2s; position: relative;
}
.btn-play:hover { transform: translateY(-2px); box-shadow: var(--glow-neon), 0 16px 40px rgba(255,79,216,.4); }
.btn-play::before {
  content: ""; width: 0; height: 0; border-style: solid;
  border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #fff;
}
.play-band { text-align: center; padding: 20px 0 6px; }
.play-note { font-size: .8rem; color: var(--ink-dim); margin-top: 12px; }

/* ---------- Start-popup modal (frames the official DMM popup) ---------- */
.dmm-modal-overlay {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  background: rgba(5,4,15,.72); backdrop-filter: blur(6px); padding: 20px;
}
.dmm-modal-overlay[hidden] { display: none; }
.dmm-modal {
  position: relative; width: min(640px, 96vw);
  border-radius: 18px; overflow: hidden; border: 1px solid rgba(255,255,255,.14);
  box-shadow: var(--shadow), 0 0 60px rgba(150,80,255,.35); background: #fff;
}
.dmm-modal-frame { display: block; width: 100%; height: 400px; border: 0; background: #fff; }
.dmm-modal-close {
  position: absolute; top: 8px; right: 10px; z-index: 2; width: 34px; height: 34px;
  border-radius: 50%; border: none; cursor: pointer; font-size: 22px; line-height: 1;
  color: #422100; background: rgba(0,0,0,.06);
}
.dmm-modal-close:hover { background: rgba(0,0,0,.14); }

/* ---------- System requirements table (rule 2.7) ---------- */
.spec-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th {
  font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .06em;
  font-size: .74rem; color: var(--neon); width: 34%; white-space: nowrap;
}
.spec-table td { color: var(--mist); }
.spec-note { color: var(--ink-dim); }

/* ---------- Startup-guide steps (rule 6.4) ---------- */
.steps { counter-reset: st; display: grid; gap: 16px; }
.step {
  position: relative; padding: 20px 22px 20px 68px;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line); border-radius: var(--radius);
}
.step::before {
  counter-increment: st; content: counter(st);
  position: absolute; left: 20px; top: 18px; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; font-family: "Oswald", sans-serif; font-weight: 700; color: #0a0420;
  background: linear-gradient(135deg, var(--neon), var(--gold));
}
.step h3 { margin: 0 0 4px; }

/* ---------- News / notifications list (rule 6.4) ---------- */
.news-list { display: grid; gap: 12px; }
.news-item {
  display: grid; grid-template-columns: auto auto 1fr; gap: 14px; align-items: baseline;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card);
}
.news-item time { font-family: "Oswald", sans-serif; color: var(--ink-dim); font-size: .82rem; white-space: nowrap; }
.news-tag {
  font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  padding: 3px 9px; border-radius: 999px; color: #0a0420; background: var(--blue); white-space: nowrap;
}
.news-tag.event { background: var(--gold); }
.news-tag.info { background: var(--neon); color: #fff; }
@media (max-width: 560px){ .news-item { grid-template-columns: 1fr; } }

/* ---------- Legal / long-form pages ---------- */
.legal { max-width: 860px; }
.legal h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin-bottom: 8px; }
.legal h3 { font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .05em;
  color: var(--mist); font-size: 1.02rem; margin: 26px 0 8px; }
.legal p, .legal li { color: var(--ink-dim); }
.legal ol, .legal ul { padding-left: 22px; }
.legal .ph { color: var(--gold); background: rgba(255,201,61,.10); border: 1px dashed rgba(255,201,61,.5);
  border-radius: 5px; padding: 1px 7px; font-family: "Oswald", sans-serif; font-size: .85em; letter-spacing: .03em; }
.legal .lead { color: var(--mist); font-size: 1.04rem; }
.legal table.tbl th { width: 32%; }

.subnav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; }
.subnav a { font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .06em;
  font-size: .8rem; color: var(--ink-dim); }
.subnav a:hover { color: var(--neon); }

/* ---------- Footer link columns ---------- */
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.foot-links a { color: var(--ink-dim); font-size: .84rem; }
.foot-links a:hover { color: var(--neon); }
.back-home { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; }
