:root {
  color-scheme: light;
  --ink: #241839;
  --muted: #624875;
  --paper: #fffbf1;
  --line: #d6c4df;
  --lavender: #eee2fc;
  --sun: #ffcf6b;
  font-family: "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: #f8f1e6;
  color: var(--ink);
  line-height: 1.75;
}
a { color: inherit; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid #7346a1; outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(2rem, 6.5vw, 3.7rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); }
h3 { font-size: 1.1rem; }
.wrap { inline-size: min(100% - 36px, 1000px); margin-inline: auto; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding-block: 16px;
}
.site-brand, .play-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  text-decoration: none;
}
.site-brand img { display: block; }
.play-link {
  min-block-size: 44px;
  padding: 4px 13px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--sun);
  box-shadow: 0 2px var(--ink);
}
.play-link:hover { background: #ffda8e; }

.guide-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(24px, 5vw, 56px);
  padding: clamp(24px, 5vw, 52px);
  border-radius: 22px;
  background: var(--ink);
  color: var(--paper);
}
.hero-copy .lead {
  margin-block: 14px 6px;
  color: var(--sun);
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  font-weight: 750;
}
.hero-copy > p:last-child { color: #eee3f5; }
.match-demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(7px, 2vw, 16px);
  inline-size: 100%;
  max-inline-size: 420px;
  margin-inline: auto;
}
.demo-panel {
  overflow: hidden;
  border-radius: 12px;
  background: var(--lavender);
  color: var(--ink);
  text-align: center;
  font-size: .875rem;
  font-weight: 750;
}
.demo-panel > span { display: block; padding: 4px 3px; }
.demo-board {
  position: relative;
  margin: 8px 8px 0;
  border-radius: 7px;
  aspect-ratio: 1;
  background: radial-gradient(circle, #957ba8 1px, transparent 1.5px) center / 25% 25% #fffaf1;
}
.demo-arrow { color: var(--sun); font-size: 1.4rem; line-height: 1; }
.demo-match {
  position: absolute;
  inset: var(--y) auto auto var(--x);
  inline-size: 25%;
  block-size: clamp(5px, 1vw, 10px);
  transform: translateY(-50%) rotate(var(--angle, 0deg));
  transform-origin: left center;
  border-radius: 999px;
  background: linear-gradient(90deg, #563275 0 23%, #9067ad 23%);
}
.demo-top { --x: 25%; --y: 25%; }
.demo-side { --x: 50%; --y: 25%; --angle: 90deg; }
.demo-move {
  --x: 50%;
  --y: 50%;
  --angle: 90deg;
  background: linear-gradient(90deg, #a25618 0 23%, #e6a947 23%);
}
.demo-target .demo-move { --x: 25%; --angle: 0deg; }

.guide-rules { margin-block: clamp(29px, 6vw, 52px) 0; }
.rule-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-block: 15px 0;
  padding: 0;
  list-style: none;
  counter-reset: rules;
}
.rule-list li {
  padding: clamp(14px, 2.5vw, 22px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  counter-increment: rules;
}
.rule-list h3::before {
  display: inline-grid;
  place-items: center;
  inline-size: 1.8em;
  block-size: 1.8em;
  margin-inline-end: .45em;
  border-radius: 50%;
  background: var(--lavender);
  content: counter(rules);
  font-size: .8em;
}
.guide-rules p { margin-block-start: 7px; }
.guide-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
  padding-block: 24px;
}
.adsense-slot {
  display: grid;
  align-items: center;
  min-block-size: 100px;
  inline-size: min(100%, 728px);
  margin: 10px auto 0;
  border: 1px dashed #aa94b8;
  border-radius: 10px;
  color: var(--muted);
  font-size: .83rem;
}
.adsense-slot > span { text-align: center; }

.privacy-policy {
  max-inline-size: 760px;
  margin-inline: auto;
  padding: clamp(20px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
}
.privacy-policy h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.privacy-policy section { margin-block-start: 26px; }
.privacy-policy h2 { font-size: 1.25rem; }
.privacy-policy p { margin-block-start: 8px; }
.policy-date { color: var(--muted); font-size: .9rem; }
.privacy-policy a { display: inline-block; color: #603781; }
.policy-languages {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-block: 12px;
  font-size: .9rem;
}
.policy-languages a {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  padding-inline: 10px;
  border-radius: 8px;
}
.policy-languages a[aria-current="page"] {
  background: var(--lavender);
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}
.site-footer {
  padding-block: 24px;
  color: var(--muted);
  text-align: center;
  font-size: .9rem;
}

@media (max-width: 680px) {
  .guide-hero, .rule-list, .guide-notes { grid-template-columns: minmax(0, 1fr); }
}
