* {
  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;
}

/* 以下は他のクォッカ作品の legal.css から持ってきた図解パーツ。
   2026-08-18に遊び方ページを guide.html へ一本化した際、使い手が居なくなった
   (guide.html は自前のスタイルを持っている)。他の規約ページには影響しない。 */

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

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

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

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

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

/* 遊び方ページに埋め込むミニ盤面。--size で 3x3 等を切り替える。
   .on = 表(クォッカの顔) / .off = 裏。 .target = タップした場所。 */
.mini-board {
  --size: 3;
  display: grid;
  grid-template-columns: repeat(var(--size), 30px);
  grid-auto-rows: 30px;
  gap: 3px;
  padding: 6px;
  background: #ffffff;
  border: 2px solid #ffe3ec;
  border-radius: 10px;
  flex-shrink: 0;
}

.mini-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  border-radius: 5px;
  background: linear-gradient(155deg, #cbb59a 0%, #8a745c 100%);
}

.mini-cell.on {
  background: linear-gradient(155deg, #ffe6b0 0%, #f2b73f 100%);
}

.mini-cell.target {
  outline: 2px solid #4a9ad4;
  outline-offset: -2px;
}

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

.status-chip {
  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;
}

/* サイズごとのクリアボーナス表。 */
.bonus-table td, .bonus-table th {
  text-align: center;
}

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

  th {
    width: 34%;
    white-space: normal;
  }

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

  .mini-board {
    grid-template-columns: repeat(var(--size), 26px);
    grid-auto-rows: 26px;
  }

  .mini-cell {
    font-size: 14px;
  }
}
