/* ROCKCUBE public pages. Colours follow the game's first theme (rockcube/UI/Theme.swift). */
:root {
  --bg-top: #f9b3a4;
  --bg-bottom: #f5a08f;
  --cream: #fff6e6;
  --ink: #5236c9;
  --ink-soft: #6f5bc7;
  --text: #3a2f63;
  --purple: #7c5cf0;
  --yellow: #fad43c;
  --line: #ecd9c4;

  /* Inner padding of boxes, chosen by how much text the box holds. */
  --pad-s: 1em;
  --pad-m: 1.5em;
  --pad-l: 2.25em;

  --font: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; background: var(--bg-bottom); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.9;
  letter-spacing: 0.02em;
  font-kerning: normal;
  color: var(--text);
  background: var(--bg-bottom) linear-gradient(180deg, var(--bg-top), var(--bg-bottom)) no-repeat;
  background-size: 100% 40em;
}

/* Japanese line breaking, inherited from the root so the rules below can override it. */
html {
  line-break: strict;
  word-break: normal;
  overflow-wrap: normal;
  text-spacing-trim: trim-start;
}

/* Short display text breaks only at the <wbr> marks placed between phrases. */
h1, h2, .phrase {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* Long text: phrase-aware wrapping where the browser has it, strict line breaking elsewhere. */
@supports (word-break: auto-phrase) {
  .doc p, .doc li, .doc dd { word-break: auto-phrase; }
}

.nowrap { white-space: nowrap; }
.url { overflow-wrap: break-word; }

a { color: var(--ink); text-underline-offset: 0.2em; }
a:hover { color: var(--purple); }

img { max-width: 100%; height: auto; display: block; }

/* ---------- layout ---------- */

.wrap {
  width: min(100% - 2.5em, 60em);
  margin-inline: auto;
}

.site-header {
  padding: 1.25em 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 0.75em;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  color: var(--cream);
  text-decoration: none;
  font-weight: 900;
  font-size: 1.15em;
  letter-spacing: 0.08em;
}

.brand img {
  width: 2.4em;
  height: 2.4em;
  border-radius: 0.55em;
}

.card {
  background: var(--cream);
  border-radius: 2em;
  box-shadow: 0 0.5em 0 rgba(82, 54, 201, 0.22);
}

/* ---------- home ---------- */

.hero {
  padding: var(--pad-l) var(--pad-m);
  text-align: center;
  margin-block: 1em 3em;
}

.hero .logo {
  width: min(70%, 20em);
  margin: 0 auto 0.5em;
}

h1 {
  font-size: 1.7em;
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: 0;
  font-feature-settings: "palt" 1;
  color: var(--ink);
  margin: 0 0 0.6em;
}

.hero h1 { font-size: 1.5em; }

.hero h1 .kana {
  display: block;
  font-size: 0.6em;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

.lead {
  max-width: 30em;
  margin: 0 auto 1.4em;
}

.badge {
  display: inline-block;
  padding: 0.7em 1.6em;
  border-radius: 999em;
  background: var(--purple);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 0.3em 0 #5236c9;
}

.note {
  font-size: 0.85em;
  color: var(--ink-soft);
  margin: 1.2em 0 0;
}

.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(62%, 15em);
  gap: 1em;
  overflow-x: auto;
  padding: 0.25em 1.25em 1.5em;
  margin: 0 0 3em;
  scroll-snap-type: x mandatory;
}

.shots img {
  border-radius: 1.4em;
  scroll-snap-align: center;
  box-shadow: 0 0.4em 0 rgba(82, 54, 201, 0.22);
}

@media (min-width: 70em) {
  .shots {
    grid-auto-columns: 1fr;
    overflow: visible;
    width: min(100% - 2.5em, 72em);
    margin-inline: auto;
    padding-inline: 0;
  }
}

.features {
  display: grid;
  gap: 1.5em;
  grid-template-columns: repeat(auto-fit, minmax(15em, 1fr));
  margin-bottom: 3.5em;
}

.feature {
  padding: var(--pad-m);
}

h2 {
  font-size: 1.2em;
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: 0;
  font-feature-settings: "palt" 1;
  color: var(--ink);
  margin: 2.2em 0 0.5em;
}

.feature h2 { margin-top: 0; }
.feature p { margin: 0; }

/* ---------- documents ---------- */

.doc {
  padding: var(--pad-l);
  margin-block: 1em 3.5em;
}

/* Long-form text: the card is sized so a line stays under 45 characters. */
.doc { max-width: 44.5em; margin-inline: auto; }

.doc .date {
  color: var(--ink-soft);
  font-size: 0.9em;
  margin-top: 0;
}

.doc p { margin: 0 0 1em; }

.doc ul, .doc ol {
  padding-left: 1.4em;
  margin: 0 0 1em;
}

.doc li { margin-bottom: 0.4em; }

.doc dl { margin: 0; }

.doc dt {
  font-weight: 900;
  color: var(--ink);
  margin-top: 1.4em;
}

.doc dd {
  margin: 0.2em 0 0;
  padding-bottom: 1.2em;
  border-bottom: 0.08em solid var(--line);
}

.doc dd p:last-child { margin-bottom: 0; }

.back { margin-top: 2.5em; }

@media (max-width: 36em) {
  .doc { padding: var(--pad-m); border-radius: 1.5em; }
  .hero { padding: var(--pad-m) var(--pad-s); }
  h1 { font-size: 1.45em; }
}

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

.site-footer {
  background: var(--cream);
  padding: var(--pad-l) 0;
  font-size: 0.92em;
}

.site-footer nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 1.6em;
}

.site-footer address {
  font-style: normal;
  color: var(--ink-soft);
  line-height: 1.8;
}

.site-footer small { display: block; margin-top: 1em; color: var(--ink-soft); letter-spacing: 0.04em; }
