/* ===================================================================
   トップ（仕様書 4.1）。
   =================================================================== */
.hero { background: var(--aqua); color: #fff; }
.hero-inner {
  max-width: calc(var(--content-width) + var(--gutter) * 2); margin: 0 auto;
  padding: 64px var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 48px; align-items: center;
}
.hero h1 { color: #fff; font-size: 46px; line-height: 1.35; margin: 14px 0 18px; }
.hero-lead { font-size: 16px; max-width: 34em; }
/* はじめての方への入口（ヒーローの中。チュートリアルへ） */
.hero-start {
  display: flex; align-items: center; gap: 14px; max-width: 34em; margin-top: 22px; padding: 14px 16px;
  background: #fff; box-shadow: var(--shadow-card); color: var(--ink); text-decoration: none; transition: background 0.15s;
}
.hero-start:hover, .hero-start:focus-visible { background: var(--aqua-pale); }
.hero-start-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: var(--aqua); color: #fff; }
.hero-start-text { display: grid; gap: 2px; min-width: 0; }
.hero-start-text strong { font-size: 16px; color: var(--ink); }
.hero-start-text span { font-size: 13px; color: var(--text-sub); }
.hero-start-chevron { flex: none; margin-left: auto; display: inline-flex; color: var(--aqua-text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-actions .btn { min-width: 200px; }
.hero-note { margin-top: 12px; font-size: 13px; opacity: 0.92; }
.hero-board { color: var(--text); }
.hero-board .card-head { font-size: 14px; font-weight: 700; }

.top-page { padding-top: 56px; }
.top-section + .top-section { margin-top: 64px; }
.section-title { font-size: 28px; margin-bottom: 24px; }
.section-title::before { content: ''; display: block; width: 46px; height: 4px; background: var(--aqua); margin-bottom: 14px; }
.section-head { margin-bottom: 20px; }
.section-head .section-title { margin-bottom: 6px; }
.sub-lead { color: var(--text-sub); }

/* 遊びかたを選ぶ */
.choose-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.choose-card { display: flex; flex-direction: column; }
.choose-visual { height: 150px; display: flex; align-items: center; justify-content: center; }
.choose-visual svg { width: 48px; height: 48px; stroke-width: 1.4; }
.choose-card .card-body { flex: 1 1 auto; display: grid; gap: 10px; align-content: start; padding: 24px 28px; }
.choose-card h3 { font-size: 20px; }
.choose-card p { color: var(--text-sub); font-size: 14.5px; }
.choose-band { display: flex; min-height: 54px; }
.choose-band a {
  flex: 1 1 0; display: flex; align-items: center; justify-content: center;
  background: var(--slate); color: #fff; font-weight: 700; font-size: 15px; text-decoration: none;
}
.choose-band a.band-primary { background: var(--aqua); }
.choose-band a:hover { filter: brightness(0.94); }
.sp-list { display: none; }

/* ルール */
.rules-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.rule-figure {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--bg); padding: 18px 12px; min-height: 132px; border-bottom: 1px solid var(--line-light);
}
.rule-figure .mini-board { width: 92px; flex: none; }
.rule-figure .mini-board.wide { width: 150px; }
.rule-figure .arrow { color: var(--slate); }
.rule-card h3 { font-size: 17px; margin-bottom: 6px; }
.rule-card p { font-size: 14px; line-height: 1.75; }
.rule-no { color: var(--aqua-text); font-weight: 700; font-size: 13px; }
.more-link { margin-top: 12px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; }

/* 学ぶ: はじめてのルール（横長のカード。いちばん上） */
.start-card { display: flex; align-items: stretch; margin-bottom: var(--gap); text-decoration: none; color: inherit; }
.start-card:hover .start-go, .start-card:focus-visible .start-go { background: var(--aqua-text); }
.start-visual { flex: none; width: 140px; display: flex; align-items: center; justify-content: center; }
.start-visual svg { width: 44px; height: 44px; }
.start-body { flex: 1 1 auto; display: grid; gap: 4px; align-content: center; padding: 20px 24px; min-width: 0; }
.start-body strong { font-size: 20px; color: var(--ink); }
.start-body span:last-child { color: var(--text-sub); font-size: 14px; }
.start-tag { justify-self: start; padding: 2px 10px; background: var(--aqua-pale); color: var(--aqua-text); font-size: 12px; font-weight: 700; }
.start-go { flex: none; display: flex; align-items: center; gap: 4px; padding: 0 28px; background: var(--aqua); color: #fff; font-weight: 700; transition: background 0.15s; }

/* 学ぶ */
.learn-card { display: flex; flex-direction: column; }
.learn-card .card-body { flex: 1 1 auto; }
.learn-card h3 { font-size: 18px; }
.learn-card .talk { margin: 0 0 8px; }
.guide-parts { display: flex; gap: 24px; flex-wrap: wrap; color: var(--text-sub); font-size: 14px; }
.guide-parts strong { font-size: 26px; color: var(--ink); margin-right: 2px; }
.daily-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.daily-states { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.daily-states li {
  display: grid; gap: 2px; padding: 12px; text-align: center;
  background: var(--bg); font-size: 13px;
}
.daily-states li strong { color: var(--ink); font-size: 15px; }
.daily-states li.solved { background: var(--aqua); color: #fff; }
.daily-states li.solved strong { color: #fff; }
.daily-states li.tried { background: var(--aqua-pale); box-shadow: inset 0 0 0 1.5px var(--aqua); color: var(--aqua-text); }

@media (max-width: 1023px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-board { max-width: 520px; }
  .rules-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .hero-inner { padding: 28px var(--gutter) 32px; gap: 24px; }
  .hero h1 { font-size: 29px; line-height: 1.4; margin: 10px 0 12px; }
  .hero-lead { font-size: 14.5px; }
  .hero-actions { margin-top: 20px; }
  .hero-start { margin-top: 18px; padding: 12px; gap: 12px; }
  .hero-start-icon { width: 36px; height: 36px; }
  .hero-start-text strong { font-size: 14.5px; }
  .hero-start-text span { font-size: 12px; }
  .start-card { flex-wrap: wrap; margin-bottom: 16px; }
  .start-visual { width: 72px; }
  .start-visual svg { width: 32px; height: 32px; }
  .start-body { flex: 1 1 0; padding: 14px 16px; }
  .start-body strong { font-size: 17px; }
  .start-body span:last-child { font-size: 13px; }
  .start-go { flex: 1 1 100%; justify-content: center; min-height: 48px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-board { display: none; }
  .top-page { padding-top: 28px; }
  .top-section + .top-section { margin-top: 40px; }
  .section-title { font-size: 22px; margin-bottom: 14px; }
  .pc-grid { display: none; }
  .sp-list { display: block; }
  .rules-grid { gap: 12px; }
  .rule-figure { min-height: 96px; padding: 12px 8px; gap: 6px; }
  .rule-figure .mini-board { width: 58px; }
  .rule-figure .mini-board.wide { width: 96px; }
  .rule-card .card-body { padding: 12px; }
  .rule-card p { font-size: 13px; }
  .learn-grid { grid-template-columns: minmax(0, 1fr); }
}

.rule-figure .mini-board { width: min(92px, 32%); }
.rule-figure .mini-board.wide { width: min(150px, 42%); }
.rule-figure .arrow svg { width: 18px; height: 18px; }
@media (max-width: 767px) {
  .rule-figure { gap: 4px; padding: 12px 6px; }
}

/* ルールのアニメーション（上の .rule-figure の決まりを置き換える） */
.rule-card .rule-figure { display: grid; gap: 8px; padding: 16px; min-height: 0; justify-content: stretch; }
.rule-board { width: 100%; }
.rule-step { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--text-sub); }
.rule-play { width: 32px; height: 32px; border: 0; background: none; color: var(--slate); display: flex; align-items: center; justify-content: center; }
.rule-play:hover { background: var(--line-light); }
.clip-source { margin-top: 10px; }
@media (max-width: 767px) {
  .rule-card .rule-figure { padding: 10px; }
  .rule-board.ul-board { --label: 18px; }
}

/* 学ぶ（遊びかたを選ぶと同じカード。ボタンはスレート） */
.learn-grid .choose-band a { background: var(--slate); }
.learn-grid .daily-states { margin-top: 2px; }
.learn-grid .guide-parts strong { font-size: 22px; }
@media (max-width: 767px) {
  .learn-grid .choose-visual { height: 96px; }
  .learn-grid .card-body { padding: 18px 20px; }
}

/* 旧UIへの導線（制作中のあいだだけ） */
.ui-switch { margin-top: 14px; font-size: 12px; }
.ui-switch a { color: #fff; opacity: 0.85; }
.ui-switch a:hover { opacity: 1; }
