@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-wordmark.woff2") format("woff2");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f5f1e8;
  --ink: #161b29;
  --muted: #524e48;
  --rule: #bbb3a5;
  --accent: #a92f19;
  --accent-hover: #862311;
  font: 16px/1.6 system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  overflow-wrap: anywhere;
}

a { color: inherit; }

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

/* Local static previews show Japanese before the Pages locale handler runs. */
html[lang="ja"] [data-language="en"],
html[lang="en"] [data-language="ja"] { display: none; }

.wrap {
  width: min(1440px, calc(100% - 72px));
  margin-inline: auto;
  container-type: inline-size;
}

.header-inner,
.header-links,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0 28px;
}

.header-inner {
  min-height: 58px;
  border-bottom: 2px solid var(--ink);
}

.brand {
  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.section-nav,
.language-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.section-nav a,
.language-nav a {
  padding-block: 9px;
  font-size: 0.85rem;
  font-weight: 680;
  text-decoration: none;
  white-space: nowrap;
}

.section-nav a:hover,
.language-nav a:hover,
.language-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

.language-nav { gap: 10px; }

.language-nav a + a::before {
  content: "/";
  display: inline-block;
  margin-inline-end: 10px;
  color: var(--muted);
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2cqi;
  padding-block: 1.25cqi 1.8cqi;
  border-bottom: 2px solid var(--ink);
}

.masthead h1 {
  min-width: 0;
  margin: 0;
  font: 900 19cqi/0.86 "Barlow Condensed", Impact, sans-serif;
  letter-spacing: -0.015em;
}

.masthead img {
  display: block;
  flex: none;
  width: 10.7cqi;
  height: auto;
  border-radius: 20%;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(25px, 3cqi, 48px);
  padding-block: clamp(23px, 2.6cqi, 38px) clamp(28px, 3.6cqi, 52px);
}

.hero-copy { padding-top: 0.5cqi; }

.hero h2 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(1.95rem, 4.35cqi, 4.1rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.055em;
  overflow-wrap: normal;
}

html[lang="en"] .hero h2,
html[lang="en"] .site-section h2 { letter-spacing: -0.035em; }

.hero-description {
  max-width: 26em;
  margin: 0.95em 0 1.25em;
  font-size: clamp(0.98rem, 1.4cqi, 1.24rem);
  font-weight: 550;
}

.app-store-download { text-align: center; }

.app-store-badge { display: inline-block; }

.app-store-badge img {
  display: block;
  width: auto;
  height: 48px;
}

.preview-play:hover { background: var(--accent-hover); }

.service {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.preview { min-width: 0; }
.preview figure { margin: 0; }

.preview figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 650;
}

.preview-frame {
  position: relative;
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}

.preview video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1280 / 590;
  background: var(--ink);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.preview-play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: clamp(49px, 7cqi, 88px);
  aspect-ratio: 1;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 1px solid var(--paper);
  border-radius: 50%;
  background: var(--accent);
  color: var(--paper);
  cursor: pointer;
}

.preview-play::before {
  display: inline-block;
  margin-left: 12%;
  border-block: clamp(7px, 1cqi, 14px) solid transparent;
  border-left: clamp(12px, 1.7cqi, 23px) solid currentColor;
  vertical-align: middle;
  content: "";
}

.site-section {
  padding-block: clamp(24px, 2.7cqi, 42px);
  border-top: 2px solid var(--ink);
}

.site-section h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3.65cqi, 3.15rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.055em;
}

.rules-section > [data-language],
.rules-grid { display: grid; }

.rules-section > [data-language] { grid-template-columns: 1fr 3fr; }
.rules-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.rule {
  padding-inline: clamp(12px, 2cqi, 28px);
  border-inline-start: 1px solid var(--rule);
}

.rule:last-child { padding-inline-end: 0; }

.rule h3,
.report h3 {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: clamp(1rem, 1.65cqi, 1.45rem);
  font-weight: 800;
  line-height: 1.35;
}

.rule p,
.report p:not(.service) {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 24px clamp(28px, 5cqi, 72px);
}

.faq h2 { margin-bottom: 17px; }
.faq-list { border-block: 1px solid var(--rule); }
details + details { border-top: 1px solid var(--rule); }

summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 5px 12px 0;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

summary::-webkit-details-marker { display: none; }
summary:hover { color: var(--accent); }
summary:focus-visible { outline-offset: -2px; }

summary::after {
  content: "";
  flex: 0 0 8px;
  height: 8px;
  transform: translateY(-2px) rotate(45deg);
  border-right: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
}

details[open] summary::after { transform: translateY(2px) rotate(225deg); }

details p {
  margin: 0;
  padding: 0 25px 14px 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.report {
  align-self: start;
  padding: 3px 0 3px 22px;
  border-inline-start: 1px solid var(--rule);
}

.contact {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
  font-weight: 750;
  text-underline-offset: 4px;
}

.contact:hover { color: var(--ink); }

.site-footer {
  padding-block: 16px 24px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer > span { font-weight: 800; }
.site-footer a { text-underline-offset: 4px; }

@media (max-width: 920px) {
  .wrap { width: calc(100% - 48px); }
  .rules-section > [data-language] { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .rule:first-child { padding-inline-start: 0; border-inline-start: 0; }
}

@media (max-width: 700px) {
  .wrap { width: calc(100% - 36px); }

  .masthead { padding-block: 3.5cqi 4.6cqi; }

  .hero,
  .support-grid { grid-template-columns: minmax(0, 1fr); }

  .hero { gap: 22px; }
  .hero h2 { font-size: clamp(2rem, 8.5cqi, 3.1rem); }
  .hero-description { margin-block: 11px 15px; }

}

@media (max-width: 520px) {
  .header-inner { flex-wrap: wrap; justify-content: space-between; padding-top: 6px; }
  .header-links { display: contents; }
  .section-nav { flex-basis: 100%; order: 1; }

  .rules-grid { grid-template-columns: minmax(0, 1fr); }
  .rule, .rule:first-child { padding: 12px 0; border: 0; border-top: 1px solid var(--rule); }
  .rule:last-child { padding-bottom: 0; }
  .report { padding: 0; border: 0; }
}
