* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 22px 24px 40px;
  font-family: "M PLUS Rounded 1c", -apple-system, "Hiragino Sans", "Yu Gothic", sans-serif;
  color: #5b4a4a;
  background: #fffdfb;
  line-height: 1.8;
  font-size: 14px;
}

h1 {
  font-size: 20px;
  font-weight: 800;
  color: #e85d84;
  margin: 0 0 10px;
}

h2 {
  font-size: 15px;
  font-weight: 700;
  color: #e85d84;
  margin: 26px 0 8px;
  border-bottom: 2px solid #ffe3ec;
  padding-bottom: 4px;
}

p {
  margin: 8px 0;
}

ul, ol {
  padding-left: 1.4em;
  margin: 8px 0;
}

li {
  margin: 4px 0;
}

a {
  color: #e85d84;
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}

th, td {
  border: 1px solid #ffe3ec;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #ffe3ec;
  width: 30%;
  white-space: nowrap;
}

hr {
  border: none;
  border-top: 2px solid #ffe3ec;
  margin: 22px 0;
}

.meta {
  color: #9c8d8d;
  font-size: 13px;
}

.disclaimer {
  background: #fff6ea;
  border: 2px solid #ffe9d1;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
  color: #8a6d4a;
  margin-top: 22px;
}

/* 以下は遊び方ページ(rules.html)専用の図解パーツ。他の規約ページには影響しない。 */

.rules-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}

.rules-hero img {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.rules-hero h1 {
  margin: 0 0 4px;
}

.figure-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 10px;
  padding: 18px 14px 26px;
  background: #fff6fa;
  border: 2px solid #ffe3ec;
  border-radius: 16px;
}

.figure-caption {
  text-align: center;
  color: #9c8d8d;
  font-size: 12px;
  margin: -4px 0 18px;
}

.tile {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #cdeed8;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.tile.obstacle {
  background: #e3e0d5;
}

.tile.blank {
  background: #f2f7f0;
  border: 2px dashed #c9e4d3;
}

.tile img {
  width: 40px;
  height: 40px;
}

.tile-label {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #9c8d8d;
  white-space: nowrap;
}

.tile-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 14px;
}

.figure-arrow {
  font-size: 20px;
  color: #e85d84;
  flex-shrink: 0;
}

.dpad-demo {
  display: grid;
  grid-template-columns: repeat(3, 38px);
  grid-template-rows: repeat(3, 38px);
  gap: 6px;
  margin: 14px auto 0;
  width: fit-content;
}

.dpad-demo .key {
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #ffe3ec;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #e85d84;
  font-weight: 700;
}

.dpad-demo .key.empty {
  visibility: hidden;
}

.key-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 12px 0 8px;
  flex-wrap: wrap;
}

.key-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 2px solid #ffe3ec;
  font-weight: 700;
  font-size: 12px;
  color: #e85d84;
}

.color-swatch-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 14px 0;
}

.color-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(91, 74, 74, 0.18);
}

/* スマホなど幅の狭い画面向け。参加画面から開くポップアップ(iframe)内でも、
   iframeの幅を基準にこの指定が効く。 */
@media (max-width: 480px) {
  body {
    padding: 18px 14px 32px;
  }

  /* 「商品代金以外の必要料金」のような長い見出しがnowrapのままだと、
     横幅が足りずに表全体が画面からはみ出してしまうので、折り返しを許可する。 */
  th {
    width: 34%;
    white-space: normal;
  }

  .rules-hero {
    gap: 10px;
  }

  .rules-hero img {
    width: 46px;
    height: 46px;
  }

  .figure-row {
    gap: 8px;
    padding: 16px 10px 26px;
  }
}
