:root {
  color-scheme: light;
  --paper: #fcfbfe;
  --ink: #262139;
  --muted: #5d526c;
  --violet: #6046a1;
  --deep-violet: #49317f;
  --teal: #236c60;
  --lavender: #eee6f8;
  --mint: #e1f0e9;
  --gutter: clamp(1.125rem, 4.7vw, 4rem);
  font-family: "Avenir Next", "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: var(--paper);
  color: var(--ink);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
a { color: inherit; }
button { font: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid #834dcc;
  outline-offset: 4px;
}

.wrap {
  width: min(72rem, calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 5;
  inset: 0.75rem auto auto 0.75rem;
  padding: 0.7rem 1rem;
  transform: translateY(-180%);
  background: var(--paper);
}

.skip-link:focus { transform: none; }

.site-header {
  position: relative;
  z-index: 3;
  background: var(--paper);
  border-bottom: 1px solid #eae4f2;
}

.header-inner, .footer-inner, .site-nav, .wordmark {
  display: flex;
  align-items: center;
}

.header-inner {
  min-height: 4.625rem;
  justify-content: space-between;
  gap: 0.75rem;
}

.wordmark {
  width: fit-content;
  gap: 0.65rem;
  white-space: nowrap;
  font-size: 1.46rem;
  font-weight: 900;
  letter-spacing: -0.055em;
  text-decoration: none;
}

.wordmark img {
  border: 1px solid #e8e0f2;
  border-radius: 27%;
}

.wordmark b { color: var(--violet); }

.site-nav { gap: clamp(0.65rem, 2.5vw, 2rem); }

.site-nav a, .language-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 700;
}

.site-nav a:hover, .language-link:hover { color: var(--violet); }

.language-link {
  padding-inline: 0.95rem;
  border: 1px solid #ded5e9;
  border-radius: 999px;
  color: var(--deep-violet);
}

.hero {
  overflow: clip;
  background:
    radial-gradient(ellipse at 84% 84%, #dcefe8 0%, transparent 54%),
    radial-gradient(ellipse at 14% 8%, #e9dcf7 0%, transparent 55%),
    #f7f3fa;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.97fr);
  align-items: center;
  gap: clamp(1.4rem, 4.1vw, 3.75rem);
  padding-block: clamp(3.5rem, 7vw, 6.5rem) clamp(4.2rem, 8vw, 7.1rem);
}

.hero h1 {
  margin-top: 0.9rem;
  font-size: clamp(2.35rem, 5.16vw, 4.6rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.075em;
}

:lang(ja) .hero h1 {
  font-size: clamp(2.05rem, 4.87vw, 4.25rem);
  line-height: 1.26;
  letter-spacing: -0.08em;
}

.hero h1 em {
  color: var(--violet);
  font-style: normal;
}

.hero-title-marks {
  --mark-color: currentColor;
  --stroke: 0.17em;
  display: inline-flex;
  gap: 0.13em;
  margin-inline-end: 0.13em;
  vertical-align: -0.025em;
}

.hero-title-marks .mark {
  width: 0.74em;
  height: 0.74em;
}

.hero-title-marks .mark-x::before, .hero-title-marks .mark-x::after {
  width: 126%;
}

.hero-description {
  max-width: 28rem;
  margin-top: 1.35rem;
  font-size: clamp(1rem, 1.58vw, 1.13rem);
  line-height: 1.88;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.65rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.7rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 0.88rem;
  font-size: 0.98rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

.button-primary {
  background: var(--deep-violet);
  color: #fff;
  box-shadow: 0 0.35rem 0.75rem #3d24632b;
}

.button-primary:hover { background: #392266; }
.button:active { transform: translateY(2px); }

.button-quiet {
  border-color: #cfbedf;
  background: #fff7;
  color: var(--deep-violet);
}

.button-quiet:hover { background: #fff; }

.release-status {
  margin-top: 1.2rem;
  color: var(--muted);
  font-size: 0.89rem;
  font-weight: 650;
}

.hero-visual {
  position: relative;
  isolation: isolate;
  padding-inline: clamp(0rem, 1.25vw, 1rem);
}

.board-backdrop {
  position: absolute;
  z-index: -1;
  inset: 3% 0% 7%;
  border: 1px solid #fff9;
  border-radius: 2.45rem;
  background: linear-gradient(150deg, #ddcdf5, #d1e7df 93%);
  box-shadow: 0 1.15rem 3.5rem #4432611b;
  transform: rotate(-8deg);
}

.board-demo {
  position: relative;
  scroll-margin-top: 1.4rem;
  padding: clamp(0.9rem, 2.4vw, 1.65rem);
  border: 1px solid #fff;
  border-radius: clamp(1.45rem, 4vw, 2.2rem);
  background: linear-gradient(150deg, #fff, #faf6fd);
  box-shadow: 0 1.2rem 3.25rem #3c2c651e, inset 0 -2px 0 #e6dcef;
}

.board-cover {
  display: block;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.board-cover:hover {
  transform: translateY(-3px);
  box-shadow: 0 1.5rem 3.25rem #3c2c6529, inset 0 -2px 0 #e6dcef;
}

.board-cover-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.board-cover-heading strong {
  font-size: clamp(1rem, 1.75vw, 1.22rem);
  font-weight: 850;
  letter-spacing: -0.035em;
}

.board-cover-heading > span {
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  background: var(--lavender);
  color: var(--deep-violet);
  font-size: 0.86rem;
  font-weight: 750;
  white-space: nowrap;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(5px, 0.85vw, 11px);
}

.tile, .mini-cell {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1;
  border: 1px solid #e9e0f2;
  border-radius: 21%;
  background: #fff;
  box-shadow: 0 3px 0 #eae2f2;
}

.tile {
  --stroke: clamp(3px, 0.64vw, 8px);
  padding: 0;
  appearance: none;
}

.tile[data-mark="o"] { background: #f0e8fb; }
.tile[data-mark="x"] { background: #e8f5ee; }

.mark {
  position: relative;
  display: block;
  width: 54%;
  height: 54%;
}

.mark-o {
  border: var(--stroke, 4px) solid var(--mark-color, var(--violet));
  border-radius: 50%;
}

.mark-x::before, .mark-x::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 120%;
  height: var(--stroke, 4px);
  border-radius: 1rem;
  background: var(--mark-color, var(--teal));
  transform: translate(-50%, -50%) rotate(45deg);
}

.mark-x::after { transform: translate(-50%, -50%) rotate(-45deg); }

.tile[data-effect="win"] {
  border-color: #936bc3;
  background: #e3d1f5;
  box-shadow: 0 3px 0 #cbb0e8, inset 0 0 0 2px #fff9;
  animation: settle 360ms ease both;
}

.tile[data-effect="blast"] {
  border-color: #d09751;
  background: #fff0d5;
  box-shadow: 0 3px 0 #f1d5aa;
}

.tile[data-effect="blast"]::after, .static-spark {
  content: "";
  position: absolute;
  inset: 16%;
  background: #e49a42;
  clip-path: polygon(50% 0, 61% 36%, 100% 50%, 63% 61%, 50% 100%, 39% 63%, 0 50%, 37% 38%);
}

.tile[data-effect="blast"]::after { animation: burst 520ms ease-out both; }

@keyframes settle {
  40% { transform: translateY(-5%); }
}

@keyframes burst {
  0% { transform: scale(0.25); opacity: 0.25; }
  38% { transform: scale(1.65); opacity: 1; }
  100% { transform: scale(0.7); opacity: 0.3; }
}

.no-script {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 620;
  line-height: 1.5;
}

.hero-bomb {
  position: absolute;
  right: -11%;
  bottom: -17%;
  width: 39%;
  height: auto;
  pointer-events: none;
  transform: rotate(10deg);
  filter: drop-shadow(0 14px 14px #39295a28);
}

.section { padding-block: clamp(3.4rem, 7.5vw, 6.6rem); }

.section-title {
  font-size: clamp(2rem, 4.45vw, 3.65rem);
  font-weight: 900;
  line-height: 1.19;
  letter-spacing: -0.06em;
}

:lang(ja) .section-title {
  font-size: clamp(1.95rem, 4.1vw, 3.25rem);
  line-height: 1.3;
}

.rule-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.05rem, 3.2vw, 2.75rem);
  margin-top: 1.8rem;
}

.rule-step h3 {
  margin-top: 1rem;
  font-size: clamp(1.14rem, 1.85vw, 1.42rem);
  font-weight: 850;
  letter-spacing: -0.03em;
}

.rule-step p {
  margin-top: 0.4rem;
  color: var(--muted);
  line-height: 1.75;
}

.rule-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(5px, 1vw, 11px);
  width: 100%;
  min-height: 6.25rem;
  aspect-ratio: 2.6;
  border-radius: 1.35rem;
}

.place-visual { background: #ede3fa; }
.plant-visual { background: #e5f0eb; }
.blast-visual { background: #f8ecdc; }

.mini-cell {
  --stroke: clamp(3px, 0.38vw, 5px);
  width: clamp(1.85rem, 4.1vw, 3.3rem);
}

.last-cell {
  border-color: #a686ce;
  background: #f3e6ff;
  transform: translateY(-8%) rotate(-6deg);
}

.plant-cell {
  width: clamp(3.1rem, 6vw, 4.5rem);
  aspect-ratio: 1;
  border: 1px dashed #82b5a3;
  border-radius: 0.95rem;
  background: #f7fffb;
  transform: translateY(11%);
}

.plant-visual img {
  position: absolute;
  width: clamp(4.1rem, 8.25vw, 6.3rem);
  height: auto;
  transform: translate(12%, -13%) rotate(12deg);
}

.blast-visual .mini-cell:first-child { transform: rotate(-9deg); }
.blast-visual .mini-cell:last-child { transform: rotate(8deg); }
.blast-cell { background: #fff6e8; }

.modes {
  overflow: clip;
  background:
    radial-gradient(ellipse at 86% 90%, #314b49 0%, transparent 49%),
    radial-gradient(ellipse at 68% 5%, #443260 0%, transparent 63%),
    #271f39;
  color: #fcf9ff;
}

.modes-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.07fr) minmax(0, 0.93fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 6rem);
}

.mode-list { margin-top: 1.45rem; }

.mode-list > div {
  border-bottom: 1px solid #e8daff30;
  padding-block: 0.95rem;
}

.mode-list dt {
  color: #fff;
  font-size: 1.17rem;
  font-weight: 800;
}

.mode-list dd {
  margin-top: 0.32rem;
  color: #e0d7e9;
  line-height: 1.65;
}

.replay-note {
  margin-top: 1.2rem;
  color: #c7e5d9;
  font-size: 0.96rem;
  line-height: 1.7;
}

.app-preview {
  max-width: 29rem;
  margin-inline: auto;
  text-align: center;
}

.phone-stage {
  position: relative;
  isolation: isolate;
  padding: 0.4rem clamp(1rem, 4vw, 4.5rem) 1.05rem;
}

.phone-stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8% 1%;
  border: 1px solid #eee2ff44;
  border-radius: 2.75rem;
  background: linear-gradient(142deg, #9976c54a, #7bd7bc2b);
  transform: rotate(-13deg);
}

.phone-screen {
  width: min(100%, 16.6rem);
  height: auto;
  aspect-ratio: 9 / 17;
  object-fit: cover;
  object-position: center 65%;
  border: clamp(5px, 0.65vw, 8px) solid #171126;
  border-radius: clamp(1.55rem, 3.25vw, 2.45rem);
  background: var(--lavender);
  box-shadow: 0 1.25rem 2.75rem #10082066;
  transform: rotate(4.5deg);
}

.phone-screen-match { aspect-ratio: auto; }

.mode-bomb {
  position: absolute;
  right: -8%;
  bottom: 2%;
  width: clamp(6rem, 13vw, 10rem);
  height: auto;
  transform: rotate(10deg);
  filter: drop-shadow(0 12px 12px #150b3e50);
}

.app-preview figcaption {
  margin-top: 0.4rem;
  color: #e2d6ef;
  font-size: 0.86rem;
}

.footer-inner {
  min-height: 6.2rem;
  justify-content: space-between;
  gap: 0.9rem;
}

.footer-inner small { color: var(--muted); }

@media (max-width: 52rem) {
  .hero-layout, .modes-layout { grid-template-columns: minmax(0, 1fr); }
  .hero-layout { gap: clamp(2.2rem, 8vw, 3.4rem); }
  .hero h1, :lang(ja) .hero h1 {
    font-size: clamp(2.42rem, 8.9vw, 4.2rem);
  }
  .hero-visual { width: min(100%, 28rem); margin-inline: auto; }
  .board-demo { padding: clamp(0.9rem, 3.7vw, 1.3rem); }
  .hero-bomb { right: -8%; bottom: -15%; width: 35%; }
  .modes-copy { max-width: 34rem; }
}

@media (max-width: 39rem) {
  .header-inner { min-height: 4.15rem; }
  .wordmark { font-size: 1.24rem; gap: 0.45rem; }
  .wordmark img { width: 2.1rem; height: 2.1rem; }
  .site-nav a[href="#modes"] { display: none; }
  .site-nav .language-link { padding-inline: 0.7rem; }
  .hero-layout { padding-block: 2.4rem 3.8rem; }
  .hero-description { margin-top: 1rem; }
  .hero-actions { margin-top: 1.2rem; }
  .release-status { margin-top: 0.9rem; }
  .board-grid { gap: 6px; }
  .tile { --stroke: clamp(4px, 1.3vw, 6px); }
  .hero-bomb { right: -5%; bottom: -11%; width: 28%; }
  .rule-steps { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .rule-visual { aspect-ratio: 3.2; }
  .mini-cell { width: 2.65rem; }
  .footer-inner { flex-wrap: wrap; padding-block: 0.9rem; }
  .footer-inner small { order: 3; width: 100%; }
}

@media (max-width: 23rem) {
  .site-nav { gap: 0.55rem; }
  .site-nav a { font-size: 0.81rem; }
  .wordmark { font-size: 1.13rem; }
  .wordmark img { width: 1.8rem; height: 1.8rem; }
  .hero h1, :lang(ja) .hero h1 { font-size: 2.13rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .board-cover, .tile, .tile::after { animation: none !important; transition: none !important; }
}

.legal-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.legal-links a, .legal-article a { text-decoration: underline; text-underline-offset: .2em; }
.legal-article { max-width: 48rem; padding-block: clamp(2rem, 6vw, 5rem); line-height: 1.75; }
.legal-article h1 { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.2; }
.legal-article h2 { font-size: 1.3rem; margin: 2rem 0 .4rem; }
.legal-article p { margin: .5rem 0; }
.legal-article .legal-date { color: var(--muted); margin-block: .8rem 1.5rem; }
.legal-article address { margin-top: .75rem; }

.web-ad { width: min(100%, 60rem); margin: 1.5rem auto; }
.web-ad:has(.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
.play-sidebar .web-ad { margin: .5rem auto 0; }
