html[data-lang="ko"] main [lang]:not([lang="ko"]),
html[data-lang="en"] main [lang]:not([lang="en"]),
html[data-lang="ja"] main [lang]:not([lang="ja"]),
html[data-lang="zh-Hans"] main [lang]:not([lang="zh-Hans"]) {
  display: none !important;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
html[data-lang="ja"] body,
html[data-lang="zh-Hans"] body { word-break: normal; line-break: strict; }

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

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.doc {
  max-width: 46rem;
  padding-block: clamp(32px, 6vw, 72px) 0;
}
.doc .crumb {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  font-weight: 700;
}
.doc .crumb a { text-decoration: none; color: var(--text-muted); }
.doc .crumb a:hover { color: var(--text); }
.doc h1 {
  margin: 0 0 8px;
  font-size: clamp(1.875rem, 1.4rem + 1.8vw, 2.625rem);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.doc .meta { margin: 0 0 32px; color: var(--text-muted); font-size: 0.9375rem; }
.doc h2 {
  margin: 40px 0 10px;
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 800;
}
.doc h3 { margin: 24px 0 6px; font-size: 1.0625rem; font-weight: 800; }
.doc p, .doc li { color: var(--text); }
.doc p { margin: 0 0 12px; }
.doc ul, .doc ol { margin: 0 0 12px; padding-left: 1.25rem; }
.doc li { margin-bottom: 6px; }
.doc a { color: inherit; text-underline-offset: 3px; }
.doc .note {
  margin: 24px 0;
  padding: 14px 16px;
  border-left: 4px solid var(--yellow);
  background: var(--surface);
  border-radius: 0 10px 10px 0;
}
.doc dl.kv { margin: 0 0 12px; }
.doc dl.kv div {
  display: grid;
  gap: 2px 20px;
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 640px) {
  .doc dl.kv div { grid-template-columns: 10rem 1fr; }
}
.doc dl.kv dt { font-weight: 700; }
.doc dl.kv dd { margin: 0; }
.doc details {
  border-bottom: 1px solid var(--line);
  padding-block: 4px;
}
.doc summary {
  padding-block: 12px;
  font-weight: 700;
  cursor: pointer;
}
.doc details p { color: var(--text-muted); }

.doc a.mail {
  display: inline-block;
  margin: 4px 0 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--brown);
  color: var(--yellow);
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 11px;
  border: 1.5px solid var(--mine-well);
  border-radius: 999px;
  background: #fff4bd;
  color: var(--mine-ink);
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.4;
}
.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e0a100;
  box-shadow: 0 0 0 3px rgba(224, 161, 0, 0.25);
}

.pick-card { position: relative; }
.pick-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 2.5px solid transparent;
  border-radius: inherit;
  pointer-events: none;
  transition: border-color 150ms ease;
}
.pick-card:is(:hover, :focus-visible, :active)::before { border-color: var(--pick-color, var(--text)); }

.board-peek {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 10px;
  background: var(--mine-well);
}

.t {
  display: block;
  aspect-ratio: 1;
  background: var(--tile-closed) center / 100% 100% no-repeat;
}
.t-open { background-image: var(--tile-open); }
.t-flag { background-image: var(--tile-flagged); }
.t-mine { background-image: var(--tile-mine); }
.t-boom { background-image: var(--tile-exploded); }
.t-1 { background-image: var(--tile-1); }
.t-2 { background-image: var(--tile-2); }
.t-3 { background-image: var(--tile-3); }
.t-4 { background-image: var(--tile-4); }
.t-5 { background-image: var(--tile-5); }
.t-6 { background-image: var(--tile-6); }
.t-7 { background-image: var(--tile-7); }
.t-8 { background-image: var(--tile-8); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
