/* まるっとスライドパズル — home.css（E：ホーム・ステージえらび）
 * 色・ボタンは base.css の変数とクラスを使う。
 */
.home [hidden], .stages [hidden] { display: none !important; }

/* ====================================================================
   ホーム
   ==================================================================== */
.home-inner {
  flex: 1 1 auto; min-height: 0; width: 100%; max-width: 520px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 10px;
}

/* ---- 題名 ---- */
.home-head { position: relative; flex: 0 0 auto; display: flex; justify-content: center; align-items: center; padding: 2px 64px 0; }
.logo { margin: 0; display: flex; flex-direction: column; align-items: center; line-height: 1.1; text-align: center; }
.logo-small { font-size: 14px; font-weight: 800; color: var(--ink-soft); letter-spacing: .08em; text-shadow: 0 1px 0 var(--white), 0 0 6px var(--white); }
.logo-main { display: inline-flex; align-items: baseline; flex-wrap: wrap; justify-content: center; gap: 2px; margin-top: 3px; }
.logo-maru, .logo-slide {
  font-weight: 900; letter-spacing: .02em;
  text-shadow: 0 2px 0 var(--white), 2px 0 0 var(--white), -2px 0 0 var(--white), 0 -2px 0 var(--white),
               2px 2px 0 var(--white), -2px 2px 0 var(--white), 0 4px 0 rgba(74, 52, 38, .18);
}
.logo-maru { font-size: 29px; color: var(--fumi); }
.logo-slide { font-size: 25px; color: var(--ink); }

.home-starchip {
  display: inline-flex; align-items: center; gap: 2px; white-space: nowrap;
  background: rgba(255, 253, 248, .92); border-radius: 999px; padding: 4px 12px; font-size: 16px; font-weight: 900;
  box-shadow: var(--shadow-sm), inset 0 0 0 2px rgba(74, 52, 38, .08);
}
.home-head .home-starchip { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.chip-star { color: var(--star); }

/* ---- 木の額 ---- */
.home-art { flex: 1 1 auto; min-height: 150px; position: relative; display: flex; align-items: center; justify-content: center; }
.home-hang { display: flex; flex-direction: column; align-items: center; }
.home-frame {
  appearance: none; border: 0; margin: 0; cursor: pointer; position: relative; display: block;
  width: 240px; height: 240px; padding: 5.2%; border-radius: 6px; color: inherit;
  background:
    repeating-linear-gradient(97deg, rgba(255, 236, 205, .07) 0 2px, rgba(70, 40, 20, .06) 2px 5px, transparent 5px 13px),
    linear-gradient(160deg, #CF9A60 0%, #A86F3E 34%, #C08852 56%, #8C5A32 100%);
  box-shadow:
    0 16px 30px rgba(74, 52, 38, .32), 0 3px 0 rgba(74, 52, 38, .28),
    inset 0 0 0 2px rgba(255, 228, 190, .38), inset 0 0 0 4px rgba(90, 55, 30, .3),
    inset 0 3px 6px rgba(255, 240, 220, .3);
  transition: transform .2s ease;
}
.home-frame:focus-visible { outline: 3px solid var(--miso); outline-offset: 4px; }
.home-frame.can-cycle:active { transform: scale(.985); }
.home-mat {
  position: relative; display: block; width: 100%; height: 100%; padding: 4.5%;
  background: linear-gradient(#FFFBF2, #FBF1DE);
  box-shadow: inset 0 0 0 2px rgba(90, 55, 30, .5), inset 0 4px 10px rgba(60, 35, 15, .22);
}
.home-pic {
  display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(74, 52, 38, .18), 0 2px 6px rgba(74, 52, 38, .2);
  transition: opacity .17s ease, transform .17s ease; -webkit-user-drag: none;
}
.home-frame.is-swap .home-pic { opacity: 0; transform: scale(.97); }
.home-noimg {
  display: none; position: absolute; inset: 4.5%; align-items: center; justify-content: center; font-size: 42px;
  background: linear-gradient(135deg, #FFE1B8, #F8C9D8 50%, #CFE4F5); border-radius: 2px;
}
.home-frame.is-noimg .home-pic { visibility: hidden; }
.home-frame.is-noimg .home-noimg { display: flex; }
/* 額のガラスに、ときどき光がよぎる */
.home-shine {
  position: absolute; inset: 9%; pointer-events: none; overflow: hidden; border-radius: 2px;
}
.home-shine::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; width: 32%; left: -50%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent);
  transform: skewX(-12deg); animation: home-shine 11s ease-in-out 2s infinite;
}
@keyframes home-shine { 0%, 82% { left: -50%; } 100% { left: 130%; } }
.home-frame.is-wiggle { animation: home-wiggle .45s ease; }
@keyframes home-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-1.4deg); } 60% { transform: rotate(1deg); } }

/* 額の下の札（木の板） */
.home-plaque {
  position: relative; z-index: 1; margin-top: -14px; max-width: 94%;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 5px 16px 6px; border-radius: 10px; color: var(--ink);
  background: linear-gradient(#F0D3A6, #DDB07A);
  box-shadow: 0 3px 0 rgba(120, 78, 40, .35), 0 6px 12px rgba(74, 52, 38, .18), inset 0 1px 0 rgba(255, 245, 225, .7);
}
.plaque-label { font-size: 14px; font-weight: 800; color: #7A5638; letter-spacing: .06em; line-height: 1.3; }
/* 題名は2行まで折り返して全部見せる（ことばの切れ目＝空白で折る） */
.plaque-title {
  font-size: 17px; font-weight: 900; line-height: 1.35; max-width: 100%;
  word-break: keep-all; overflow-wrap: anywhere; line-break: strict;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.plaque-more { font-size: 14px; font-weight: 800; color: #7A5638; line-height: 1.3; }

/* ラボメンバーのひとこと（lines.js に home があるときだけ） */
.home-say {
  flex: 0 0 auto; margin: 0 auto; max-width: 100%; text-align: center; font-size: 16px; line-height: 1.4;
  background: rgba(255, 253, 248, .86); border-radius: 14px; padding: 6px 14px; box-shadow: var(--shadow-sm);
}
.say-who { font-size: 15px; margin-right: 4px; }
.say-who.who-f { color: #C9701C; } .say-who.who-m { color: #2F74A8; } .say-who.who-k { color: #C4567B; }

/* ---- 主役のボタン ---- */
.home-actions { flex: 0 0 auto; display: flex; flex-direction: column; gap: 10px; }
.home-ctas { display: flex; flex-direction: column; gap: 10px; }
.home-cta { width: 100%; justify-content: flex-start; gap: 14px; text-align: left; padding: 8px 20px 8px 12px; min-height: 66px; border-radius: 20px; }
.cta-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.cta-label { font-size: 21px; font-weight: 900; }
.cta-sub { font-size: 15px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-primary .cta-sub { color: rgba(255, 255, 255, .95); }
.cta-thumb {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 12px; background: #FFE9CC center / cover no-repeat;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 2px 4px rgba(0, 0, 0, .15);
}
.cta-thumb.is-empty { background: linear-gradient(135deg, #FFE1B8, #F8C9D8); }
.cta-icon-grid {
  flex: 0 0 auto; width: 48px; height: 48px; padding: 5px; border-radius: 12px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; background: rgba(74, 52, 38, .08);
}
.cta-icon-grid i { display: block; border-radius: 3px; background: var(--fumi); }
.cta-icon-grid i:nth-child(3n+2) { background: var(--miso); }
.cta-icon-grid i:nth-child(4), .cta-icon-grid i:nth-child(8) { background: var(--keika); }
.cta-icon-grid i.gap { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(74, 52, 38, .2); }
.btn-primary .cta-icon-grid { background: rgba(255, 255, 255, .22); }
.btn-primary .cta-icon-grid i { background: rgba(255, 255, 255, .95); }
.btn-primary .cta-icon-grid i.gap { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .6); }

/* ---- ほかの入口（小さめのタイル） ---- */
.home-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.home-tile {
  appearance: none; border: 0; cursor: pointer; position: relative; color: var(--ink);
  min-height: 90px; padding: 10px 4px 8px; border-radius: 16px; background: rgba(255, 253, 248, .96);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  box-shadow: var(--shadow-sm), inset 0 0 0 2px rgba(74, 52, 38, .1);
  transition: transform .08s ease, box-shadow .08s ease;
}
.home-tile:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px rgba(74, 52, 38, .1); }
.home-tile:focus-visible { outline: 3px solid var(--miso); outline-offset: 2px; }
.tile-label { font-size: 16px; font-weight: 900; line-height: 1.2; white-space: nowrap; }
.tile-sub { font-size: 14px; font-weight: 700; color: var(--ink-soft); line-height: 1.2; white-space: nowrap; }
.home-tile.is-dim .tile-icon { opacity: .55; }
.tile-dot { display: none; }
.home-tile.is-new .tile-dot {
  display: block; position: absolute; top: 8px; right: 10px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--keika); box-shadow: 0 0 0 2px var(--white);
}
.tile-icon { position: relative; display: block; width: 38px; height: 34px; margin-bottom: 2px; }

/* カレンダー（きょうの日付つき） */
.icon-cal { background: var(--white); border-radius: 7px; overflow: hidden; box-shadow: inset 0 0 0 2px rgba(74, 52, 38, .25); }
.cal-top { position: absolute; left: 0; right: 0; top: 0; height: 9px; background: var(--keika); }
.cal-day { position: absolute; left: 0; right: 0; bottom: 1px; text-align: center; font-size: 17px; font-weight: 900; line-height: 24px; }
.cal-stamp {
  display: none; position: absolute; right: -9px; bottom: -7px; width: 22px; height: 22px; border-radius: 50%;
  align-items: center; justify-content: center; font-size: 14px; color: #fff; background: var(--ok);
  box-shadow: 0 0 0 2px var(--white); transform: rotate(-10deg);
}
.home-tile.is-done .cal-stamp { display: flex; }
.home-tile.is-done .icon-cal { overflow: visible; }

/* じゆうに（小さな盤） */
.icon-free { width: 34px; height: 34px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border-radius: 8px; background: var(--wood-light); }
.icon-free i { display: block; border-radius: 3px; background: var(--fumi); }
.icon-free i:nth-child(2) { background: var(--miso); }
.icon-free i:nth-child(3) { background: var(--keika); }
.icon-free i.gap { background: rgba(255, 253, 248, .6); }

/* アルバム（小さな額） */
.icon-album { width: 38px; height: 32px; padding: 4px; border-radius: 4px; background: linear-gradient(160deg, #CF9A60, #8C5A32); }
.icon-album-in {
  display: block; width: 100%; height: 100%; border-radius: 1px;
  background:
    radial-gradient(circle at 70% 34%, var(--star) 0 3px, transparent 3.5px),
    linear-gradient(to top, #8CC79A 0 34%, transparent 34%),
    linear-gradient(#BFE1F6, #E9F5FC);
}

/* ---- 下の小さなボタン ---- */
.home-foot { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.home-small { min-height: 48px; font-size: 16px; padding: 6px 14px; color: var(--ink); background: rgba(255, 253, 248, .72); gap: 6px; }
.small-ic {
  display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center;
  font-size: 14px; background: rgba(74, 52, 38, .1);
}
.home-ver { font-size: 14px; font-weight: 700; color: var(--ink); padding: 2px 10px; border-radius: 999px; background: rgba(255, 253, 248, .72); }

/* 低い画面（360×640 など） */
@media (max-height: 700px) {
  .home-inner { gap: 8px; }
  .logo-small { display: none; }
  .logo-maru { font-size: 25px; } .logo-slide { font-size: 22px; }
  .home-cta { min-height: 58px; padding-top: 6px; padding-bottom: 6px; }
  .cta-label { font-size: 19px; }
  .cta-thumb, .cta-icon-grid { width: 42px; height: 42px; }
  .home-tile { min-height: 76px; padding-top: 6px; }
  .tile-icon { transform: scale(.85); margin: -2px 0 0; }
  .home-small { min-height: 40px; }
  .home-say { display: none; }
  .plaque-label { display: none; }
}
@media (max-width: 370px) {
  .tile-label { font-size: 15px; }
  .home-head { padding: 2px 58px 0; }
  .home-head .home-starchip { padding: 3px 9px; font-size: 15px; }
}

/* 横長（PC・タブレット横）：左に額、右に操作 */
@media (min-width: 760px) and (min-aspect-ratio: 5/4) {
  .home-inner {
    max-width: 1120px; display: grid; column-gap: 40px; row-gap: 14px; align-items: center;
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 440px);
    grid-template-rows: 1fr auto auto auto auto 1fr;
    grid-template-areas: "art ." "art head" "art say" "art actions" "art foot" "art .";
  }
  .home-art { grid-area: art; height: 100%; min-height: 0; }
  .home-head { grid-area: head; padding: 0 0 6px; flex-direction: column; gap: 10px; }
  .home-head .home-starchip { position: static; transform: none; }
  .logo-maru { font-size: 38px; } .logo-slide { font-size: 32px; }
  .logo-small { font-size: 14px; }
  .home-say { grid-area: say; }
  .home-actions { grid-area: actions; }
  .home-foot { grid-area: foot; }
  .plaque-title { font-size: 18px; }
}

/* ====================================================================
   ステージえらび
   ==================================================================== */
.st-inner { flex: 1 1 auto; min-height: 0; width: 100%; max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.st-top .title { text-shadow: 0 0 6px var(--white), 0 1px 0 var(--white); }
.st-back, .st-arrow { font-size: 32px; line-height: 1; padding-bottom: 4px; font-weight: 900; }

/* ---- コースの色（やさしい＝みどり／ふつう＝オレンジ／むずかしい＝こい青むらさき） ---- */
.c-easy   { --cc: var(--ok);   --cc-dark: #3A8452; --cc-soft: #E7F5EB; }
.c-normal { --cc: var(--fumi); --cc-dark: #B9650F; --cc-soft: #FFF0DC; }
.c-hard   { --cc: #5B4FA8;     --cc-dark: #3F3486; --cc-soft: #ECE9F8; }
/* コースの小さな札（どこでも使える） */
.course-chip {
  display: inline-block; vertical-align: 1px; white-space: nowrap; font-size: 14px; font-weight: 900; line-height: 1.5;
  color: #fff; background: var(--cc, var(--fumi)); border-radius: 999px; padding: 0 9px;
}

/* ---- コースの切りかえ（3つならんだ大きなボタン） ---- */
.st-courses { flex: 0 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.st-cbtn {
  appearance: none; border: 0; margin: 0; cursor: pointer; position: relative; color: var(--ink); min-width: 0;
  min-height: 56px; padding: 7px 3px 6px; border-radius: 14px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: rgba(255, 253, 248, .94);
  box-shadow: var(--shadow-sm), inset 0 0 0 2px rgba(74, 52, 38, .14);
  transition: transform .08s ease, box-shadow .12s ease, background-color .12s ease;
}
.st-cbtn:active { transform: translateY(2px); }
.st-cbtn:focus-visible { outline: 3px solid var(--miso); outline-offset: 2px; }
.st-cbtn-name { font-size: 17px; font-weight: 900; line-height: 1.2; color: var(--cc-dark); white-space: nowrap; }
.st-cbtn-note { font-size: 14px; font-weight: 700; line-height: 1.25; letter-spacing: -.04em; color: var(--ink-soft); word-break: keep-all; overflow-wrap: anywhere; }
.st-cbtn-prog { font-size: 14px; font-weight: 900; line-height: 1.25; color: var(--ink); white-space: nowrap; }
.st-cbtn-check {
  display: none; position: absolute; top: -7px; left: -5px; width: 24px; height: 24px; border-radius: 50%;
  align-items: center; justify-content: center; font-size: 15px; font-weight: 900; color: #fff;
  background: var(--cc-dark); box-shadow: 0 0 0 2px var(--white);
}
/* 選んでいるコース：色の地＋太い枠＋✓（色だけに頼らない） */
.st-cbtn.is-on {
  background: var(--cc-soft);
  box-shadow: inset 0 0 0 3px var(--cc), 0 3px 0 var(--cc-dark), 0 5px 12px rgba(74, 52, 38, .16);
}
.st-cbtn.is-on .st-cbtn-check { display: flex; }
.st-cbtn.is-on .st-cbtn-name { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 3px; text-decoration-color: var(--cc); margin-bottom: 4px; }   /* 下線が ひとこと に重ならないように */
.st-cbtn.is-all .st-cbtn-prog::after { content: " ✓"; color: var(--cc-dark); }

/* 進みぐあい */
.st-prog {
  flex: 0 0 auto; display: flex; flex-direction: column; gap: 5px; padding: 8px 14px 10px;
  background: rgba(255, 253, 248, .9); border-radius: 14px; box-shadow: var(--shadow-sm);
}
.st-prog-text { font-size: 16px; font-weight: 800; color: var(--ink-soft); }
.st-prog-num { font-size: 18px; font-weight: 900; color: var(--ink); }
.st-prog-bonus { margin-left: 8px; font-size: 15px; color: var(--miso); }
.st-prog-bar { display: block; height: 8px; border-radius: 99px; background: rgba(74, 52, 38, .12); overflow: hidden; }
.st-prog-fill { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--fumi), var(--keika)); transition: width .4s ease; }
.st-inner[data-course="easy"] .st-prog-fill { background: linear-gradient(90deg, #8FD0A0, var(--ok)); }
.st-inner[data-course="hard"] .st-prog-fill { background: linear-gradient(90deg, #8D84D0, #5B4FA8); }
.st-prog-row { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 10px; }
/* 選んでいるコースのひとこと：ボタンにひとことを出せない低い画面だけ */
.st-prog-note { display: none; font-size: 15px; font-weight: 800; color: var(--ink); }
/* はじめての人へ */
.st-first { font-size: 15px; font-weight: 800; color: var(--ink); line-height: 1.35; }
.st-first::before { content: "💡 "; }
.st-prog.is-first .st-prog-text { display: none; }

/* コースをぜんぶ そろえたとき（下の大きなボタンの代わり） */
.st-done {
  flex: 0 0 auto; align-self: center; width: 100%; max-width: 460px; min-height: 52px;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 6px 14px;
  font-size: 17px; font-weight: 900; color: var(--cc-dark, var(--ink)); border-radius: 999px;
  background: var(--cc-soft, rgba(255, 253, 248, .9)); box-shadow: inset 0 0 0 3px var(--cc, var(--fumi));
}
.st-inner[data-course="easy"] .st-done { --cc: var(--ok); --cc-dark: #3A8452; --cc-soft: #E7F5EB; }
.st-inner[data-course="normal"] .st-done { --cc: var(--fumi); --cc-dark: #B9650F; --cc-soft: #FFF0DC; }
.st-inner[data-course="hard"] .st-done { --cc: #5B4FA8; --cc-dark: #3F3486; --cc-soft: #ECE9F8; }

/* ページの見出し */
.st-phead { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.st-round { flex: 1 1 auto; min-width: 0; text-align: center; line-height: 1.25; }
.st-round-name { font-size: 21px; font-weight: 900; text-shadow: 0 0 6px var(--white), 0 1px 0 var(--white); }
.st-round-sub {
  display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 4px;
  font-size: 15px; font-weight: 800; color: var(--ink-soft);
  background: rgba(255, 253, 248, .8); border-radius: 999px; padding: 2px 10px;
}
.st-size-chip { font-size: 14px; background: var(--paper-2); color: var(--ink); border-radius: 6px; padding: 0 6px; }
.st-round-stars { margin-left: 10px; font-size: 16px; font-weight: 900; color: var(--ink); vertical-align: 2px; background: rgba(255, 253, 248, .9); border-radius: 999px; padding: 1px 9px; box-shadow: var(--shadow-sm); text-shadow: none; }
.st-arrow[disabled] { opacity: .3; }

/* 札のならび */
.st-view { flex: 1 1 auto; min-height: 0; position: relative; touch-action: pan-y; padding: 2px; }
.st-grid {
  height: 100%; display: grid; gap: 8px; align-content: center;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(54px, 104px));
  transition: transform .18s ease-out;
}
.st-grid.is-wide { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 260px)); gap: 14px; }
.st-grid.is-drag { transition: none; }
.st-grid.in-r { animation: st-in-r .28s cubic-bezier(.2, .8, .3, 1) backwards; }
.st-grid.in-l { animation: st-in-l .28s cubic-bezier(.2, .8, .3, 1) backwards; }
.st-grid.is-edge-l { animation: st-edge-l .3s ease; }
.st-grid.is-edge-r { animation: st-edge-r .3s ease; }
@keyframes st-in-r { from { opacity: 0; transform: translateX(48px); } to { opacity: 1; transform: none; } }
@keyframes st-in-l { from { opacity: 0; transform: translateX(-48px); } to { opacity: 1; transform: none; } }
@keyframes st-edge-l { 40% { transform: translateX(14px); } }
@keyframes st-edge-r { 40% { transform: translateX(-14px); } }

/* ステージの札 */
.st-card {
  appearance: none; border: 0; margin: 0; cursor: pointer; position: relative; color: var(--ink); min-width: 0; min-height: 0;
  display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 7px; text-align: left;
  background: rgba(255, 253, 248, .97); border-radius: 16px;
  box-shadow: var(--shadow-sm), inset 0 0 0 2px rgba(74, 52, 38, .1);
  transition: transform .08s ease, box-shadow .08s ease;
}
.st-card:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px rgba(74, 52, 38, .1); }
.st-card:focus-visible { outline: 3px solid var(--miso); outline-offset: 2px; }
.st-card.is-clear { background: linear-gradient(135deg, #FFFDF8 60%, #FFF3D6); }
.st-card.is-next { box-shadow: 0 0 0 3px var(--fumi), 0 4px 0 #C97318, 0 6px 16px rgba(243, 154, 61, .35); animation: st-glow 2.4s ease-in-out infinite; }
@keyframes st-glow { 50% { box-shadow: 0 0 0 5px rgba(243, 154, 61, .55), 0 4px 0 #C97318, 0 6px 20px rgba(243, 154, 61, .45); } }
.st-card.is-lock { background: rgba(255, 253, 248, .58); color: var(--ink-soft); box-shadow: inset 0 0 0 2px rgba(74, 52, 38, .1); cursor: default; }
.st-card.is-shake { animation: st-shake .36s ease; }
@keyframes st-shake { 20% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 80% { transform: translateX(-2px); } }

.st-thumb {
  position: relative; flex: 0 0 auto; height: 100%; max-height: 88px; aspect-ratio: 1 / 1;
  border-radius: 10px; overflow: hidden; background: var(--paper-2);
  box-shadow: inset 0 0 0 2px rgba(74, 52, 38, .1);
}
.st-thumb-img { position: absolute; inset: 0; background: center / cover no-repeat; }
.st-card:not(.is-clear) .st-thumb-img { filter: blur(5px) saturate(.75); transform: scale(1.2); opacity: .75; }
.st-thumb-q {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 900; color: #fff; text-shadow: 0 1px 3px rgba(74, 52, 38, .6);
}
/* ひとやすみの札：14px 以上。絵が 84px より細い（スマホの縦）ときは「休」だけ */
.st-thumb { container-type: inline-size; }
.st-rest {
  position: absolute; left: 0; right: 0; bottom: 0; text-align: center; white-space: nowrap; overflow: hidden;
  font-size: 15px; font-weight: 900; line-height: 1.5; color: #fff; background: rgba(66, 150, 92, .94);
}
.st-rest-long { display: none; }
@container (min-width: 84px) {
  .st-rest-long { display: inline; }
  .st-rest-short { display: none; }
}
/* かぎ */
.st-lock { position: absolute; left: 50%; top: 50%; width: 22px; height: 26px; transform: translate(-50%, -54%); }
.lock-ring { position: absolute; left: 4px; top: 0; width: 14px; height: 14px; border: 3px solid rgba(74, 52, 38, .35); border-bottom: 0; border-radius: 8px 8px 0 0; }
.lock-body { position: absolute; left: 0; bottom: 0; width: 22px; height: 15px; border-radius: 4px; background: rgba(74, 52, 38, .35); }
.st-card.is-rest .st-lock { transform: translate(-50%, -78%); }

.st-meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.15; }
.st-num-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.st-num { font-size: 26px; font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.st-size { font-size: 14px; font-weight: 800; background: var(--paper-2); color: var(--ink); border-radius: 6px; padding: 1px 6px; }
.st-card.is-lock .st-size { background: rgba(74, 52, 38, .07); color: var(--ink-soft); }
.st-stars { font-size: 17px; letter-spacing: 1px; white-space: nowrap; }
.st-stars .off { color: rgba(74, 52, 38, .18); }
.st-stars.is-faint .off { color: rgba(74, 52, 38, .1); }
.st-state { font-size: 15px; font-weight: 800; color: var(--ink-soft); white-space: nowrap; }
.st-card.is-next .st-state { color: #C9701C; }

/* 横長：札をたてに（絵が上） */
.st-grid.is-wide .st-card { flex-direction: column; align-items: stretch; padding: 8px; gap: 8px; }
.st-grid.is-wide .st-thumb { height: auto; width: 100%; max-height: none; flex: 1 1 auto; min-height: 0; aspect-ratio: auto; }
.st-grid.is-wide .st-meta { flex: 0 0 auto; align-items: center; text-align: center; }
.st-grid.is-wide .st-num-row { justify-content: center; }
.st-grid.is-wide .st-rest { font-size: 16px; }

/* ページの点 */
.st-dots { flex: 0 0 auto; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 7px; min-height: 14px; }
.st-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(74, 52, 38, .2); box-shadow: 0 0 0 1.5px rgba(255, 253, 248, .8); transition: transform .2s ease; }
.st-dot.is-some { background: var(--wood-light); }
.st-dot.is-all { background: var(--fumi); }
.st-dot.is-cur { transform: scale(1.5); box-shadow: 0 0 0 1.5px var(--ink); }

.st-play { flex: 0 0 auto; width: 100%; max-width: 460px; align-self: center; }

.st-state.is-next-pill { align-self: flex-start; color: #fff !important; background: var(--fumi); border-radius: 999px; padding: 0 10px; font-size: 15px; line-height: 1.5; }
.st-grid.is-wide .st-state.is-next-pill { align-self: center; }

/* 低めの画面：ボタンのひとことは省き、選んでいるコースのひとことを進みぐあいの所に1行で */
@media (max-height: 760px) {
  .st-cbtn { min-height: 52px; padding: 5px 4px; }
  .st-cbtn-note { display: none; }
  .st-prog-note { display: inline; }
  .st-prog-row .st-prog-text { display: none; }
}
@media (max-height: 700px) {
  .st-inner { gap: 6px; }
  .st-cbtn { min-height: 48px; padding: 4px; gap: 0; }
  .st-cbtn-name { font-size: 16px; }
  .st-prog-note, .st-first { font-size: 14px; }
  .st-prog { padding: 5px 12px 7px; gap: 3px; }
  .st-prog-num { font-size: 16px; }
  .st-round-name { font-size: 19px; }
  .st-num { font-size: 22px; }
  .st-play { min-height: 52px; font-size: 18px; }
  .st-grid { gap: 6px; }
}

/* 横向きのスマホ（とても低い画面）：コースのボタンを1行に、進みぐあいの帯は省く（数はボタンにある） */
@media (max-height: 520px) and (min-aspect-ratio: 5/4) {
  /* 上の段に［もどる］・コース・星をならべる（題名「ステージ」は省く） */
  .st-inner {
    display: grid; gap: 5px 8px; align-items: stretch;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  }
  .st-top { display: contents; }
  .st-top .title { display: none; }
  .st-back { grid-column: 1; grid-row: 1; align-self: center; }
  .st-courses { grid-column: 2; grid-row: 1; }
  .st-top .home-starchip { grid-column: 3; grid-row: 1; align-self: center; }
  .st-prog { grid-column: 1 / -1; grid-row: 2; }
  .st-phead { grid-column: 1 / -1; grid-row: 3; }
  .st-view { grid-column: 1 / -1; grid-row: 4; }
  .st-dots { grid-column: 1 / -1; grid-row: 5; }
  .st-play, .st-done { grid-column: 1 / -1; grid-row: 6; justify-self: center; }
  .st-cbtn { flex-direction: row; gap: 8px; min-height: 48px; padding: 4px 10px; }
  .st-cbtn-check { top: 50%; left: 6px; transform: translateY(-50%); width: 22px; height: 22px; }
  .st-cbtn.is-on { padding-left: 32px; }
  .st-prog { display: none; }
  .st-prog.is-first { display: flex; padding: 4px 12px; }
  .st-prog.is-first .st-prog-row, .st-prog.is-first .st-prog-bar { display: none; }
  .st-round-sub { display: none; }
  .st-round-name { font-size: 18px; }
  .st-arrow { width: 44px; min-width: 44px; height: 44px; }
  .st-play { min-height: 48px; font-size: 17px; padding-top: 4px; padding-bottom: 4px; }
  .st-done { min-height: 48px; }
  .st-grid.is-wide { gap: 8px; }
  /* 札は横向き（絵が左）。低い札でも絵が見えるように */
  .st-grid.is-wide .st-card { flex-direction: row; align-items: center; padding: 5px 6px 5px 5px; gap: 6px; }
  .st-grid.is-wide .st-thumb { height: 100%; width: auto; max-height: 76px; flex: 0 0 auto; aspect-ratio: 1 / 1; }
  .st-grid.is-wide .st-meta { flex: 1 1 auto; align-items: flex-start; text-align: left; }
  .st-grid.is-wide .st-num-row { justify-content: flex-start; column-gap: 4px; }
  .st-grid.is-wide .st-num { font-size: 22px; }
  .st-grid.is-wide .st-stars { font-size: 14px; letter-spacing: -1px; }
  .st-grid.is-wide .st-state.is-next-pill { align-self: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .home-shine::after, .st-card.is-next, .st-grid.in-r, .st-grid.in-l, .st-grid.is-edge-l, .st-grid.is-edge-r,
  .home-frame.is-wiggle, .st-card.is-shake { animation: none; }
  .home-pic, .st-grid { transition: none; }
}
