/* ゲーム本体（game/src/ui/styles.css）と同じ色と文字。 */
:root {
  --ink: #16191d;
  --paper: #f3f1e9;
  --sheet: #fbfaf5;
  --lime: #d8fa65;
  --purple: #6351c6;
  --muted: #5d6459;
  --line: #dcdcd2;
  --panel: #e5e8dc;
  --sans: "Yu Gothic UI", "Yu Gothic", "Hiragino Sans", Meiryo, system-ui, sans-serif;
  --display: Impact, "Arial Narrow Bold", "Arial Narrow", sans-serif;
  --label: Arial, Helvetica, sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.85;
  font-synthesis: none;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding-block: clamp(24px, 6vh, 64px);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* 窓 */
.window {
  width: 100%;
  max-width: 680px;
  background: var(--sheet);
  border: 2px solid var(--ink);
  box-shadow: 10px 10px 0 #16191d55;
}

.window-head {
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(18px, 5vw, 32px) 24px;
}

.brand {
  display: block;
  color: inherit;
  text-decoration: none;
  transform: rotate(-5deg);
  font-family: var(--display);
  font-style: italic;
  font-size: 34px;
  line-height: 0.85;
  letter-spacing: -1px;
}

.brand > span {
  display: block;
}

.brand-world {
  display: block;
  font: 700 11px/1.2 var(--label);
  font-style: normal;
  letter-spacing: 3px;
  color: var(--lime);
  margin-bottom: 8px;
}

.brand-dot {
  color: var(--lime);
}

/* 言語の切り替え */
.lang-switch {
  display: flex;
  border: 1px solid #3c3e40;
  flex-shrink: 0;
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--paper);
  font: 700 12px/1 var(--label);
  letter-spacing: 1px;
  padding: 10px 14px;
  cursor: pointer;
}

.lang-switch button + button {
  border-left: 1px solid #3c3e40;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--lime);
  color: var(--ink);
}

.lang-switch button:focus-visible,
.button:focus-visible,
.brand:focus-visible {
  outline: 3px solid #9981ff;
  outline-offset: 3px;
}

.window-body {
  padding: clamp(24px, 5vw, 40px) clamp(18px, 5vw, 40px) clamp(28px, 5vw, 40px);
}

/* 文字 */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  font: 700 12px/1.4 var(--label);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--purple);
  transform: rotate(45deg);
  flex-shrink: 0;
}

[lang="ja"] .eyebrow,
.eyebrow:lang(ja) {
  font-family: var(--sans);
  letter-spacing: 1px;
}

.title {
  margin: 0 0 18px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(38px, 9vw, 56px);
  line-height: 0.95;
  letter-spacing: -1px;
  text-wrap: balance;
}

.title:lang(ja) {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 800;
  font-size: clamp(28px, 7vw, 38px);
  line-height: 1.3;
  letter-spacing: 0;
}

/* 日本語の見出しを、言葉の途中で折り返さない。 */
.phrase {
  display: inline-block;
}

.lead {
  font-size: 16px;
  margin: 0 0 28px;
  max-width: 34em;
}

p {
  margin: 0 0 12px;
}

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

a[href^="mailto:"] {
  white-space: nowrap;
}

code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.92em;
  background: var(--panel);
  padding: 1px 5px;
}

/* 準備中などの知らせ */
.panel {
  background: var(--panel);
  border-left: 4px solid var(--ink);
  padding: 18px 20px;
  margin: 0 0 28px;
}

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

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.panel-head .eyebrow {
  margin: 0;
}

.chip {
  display: inline-block;
  background: var(--ink);
  color: var(--lime);
  font: 700 11px/1 var(--label);
  letter-spacing: 1.5px;
  padding: 6px 9px;
  text-transform: uppercase;
}

.chip:lang(ja) {
  font-family: var(--sans);
  letter-spacing: 1px;
}

/* ボタン */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}

.button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 var(--lime);
}

.button.outline {
  background: transparent;
  color: var(--ink);
}

.button.outline:hover {
  box-shadow: 3px 3px 0 var(--ink);
}

.button .arrow {
  font-family: var(--label);
}

/* まだ行き先の無いボタン（準備中のストアなど）。場所はそのまま、薄くして押せなくする。 */
.button.is-disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

/* ストアなどへのボタンの並び */
.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* プライバシーポリシーの項目 */
.updated {
  font: 700 12px/1.4 var(--label);
  letter-spacing: 1px;
  color: var(--muted);
  margin: 0 0 24px;
}

.updated:lang(ja) {
  font-family: var(--sans);
}

.policy {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: policy;
}

.policy > li {
  counter-increment: policy;
  border-top: 1px solid var(--line);
  padding: 22px 0 10px;
}

.policy h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
}

.policy h2::before {
  content: counter(policy, decimal-leading-zero);
  font: 400 22px/1 var(--display);
  color: var(--purple);
  min-width: 1.6em;
}

.policy ul {
  margin: 0 0 12px;
  padding-left: 1.2em;
}

.policy li li + li {
  margin-top: 6px;
}

.policy li li::marker {
  color: var(--purple);
}

/* 窓の下の行 */
.window-foot {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 520px) {
  .window {
    box-shadow: 6px 6px 0 #16191d55;
  }

  .window-head {
    align-items: flex-start;
  }

  .brand {
    font-size: 30px;
  }

  .button {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}
