/* ひっさんキッチン — くらいの おうちで、筆算を すこしずつ。 */
.hissan-screen {
  --hc-w: 72px;
  --hc-big: 72px;
  --hc-small: 40px;
  --hc-head: 54px;
  --hs-ink: #5a4452;
  --hs-muted: #8a7480;
  --hs-pink: #f08aa6;
  --hs-pink-soft: #fde6ee;
  --hs-mint: #8fd3b6;
  --hs-mint-soft: #e3f6ee;
  --hs-butter: #ffe08a;
  --hs-butter-soft: #fff5d6;
  --hs-lav: #b9a4ee;
  --hs-lav-soft: #efe9fc;
  color: var(--hs-ink);
  min-height: 0;
}

.hissan-art {
  display: inline-block;
  width: 56px;
  height: 56px;
  background: var(--src) center / contain no-repeat;
  filter: drop-shadow(0 3px 3px rgba(120, 80, 100, .22));
}
.hissan-art.is-big { width: 112px; height: 112px; }

/* =========================================================
   みち（レッスンの いちらん）
   ========================================================= */
.hissan-map {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
  border: 1px solid #ecd9de;
  border-radius: 26px;
  background: linear-gradient(160deg, #fffaf6, #fdf3f6 55%, #f4fbf7);
  box-shadow: 0 10px 28px rgba(110, 76, 96, .1);
}
.hissan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hissan-head h2 { margin: 0; font-size: 1.5rem; }
.hissan-head p { margin: 2px 0 0; color: var(--hs-muted); font-size: .92rem; }
.hissan-total {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--hs-butter-soft);
  border: 2px solid var(--hs-butter);
  font-weight: 900;
  color: #8a6416;
  white-space: nowrap;
}
.hissan-path { display: grid; gap: 10px; }
.hissan-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  padding: 8px 10px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid #f0e2e6;
}
.hissan-row-label {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border-radius: 18px;
  font-weight: 900;
}
.hissan-row-label b { font-size: 2rem; line-height: 1; }
.hissan-row-label span { font-size: .85rem; }
.hissan-row--add .hissan-row-label { background: var(--hs-pink-soft); color: #c0587b; }
.hissan-row--sub .hissan-row-label { background: var(--hs-mint-soft); color: #3f8f72; }
.hissan-row--mul .hissan-row-label { background: var(--hs-butter-soft); color: #a77a14; }
.hissan-row--div .hissan-row-label { background: var(--hs-lav-soft); color: #7e66c4; }
.hissan-stops {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.hissan-row--mul .hissan-stops,
.hissan-row--sub .hissan-stops { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.hissan-row--div .hissan-stops { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.hissan-stop {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  min-height: 108px;
  padding: 6px 6px 4px;
  border: 2px solid #efdde3;
  border-radius: 20px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  text-align: center;
  transition: transform .15s, box-shadow .15s;
}
.hissan-stop:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 8px 16px rgba(120, 80, 100, .16); }
.hissan-stop strong { font-size: .86rem; line-height: 1.3; }
.hissan-stop-art { position: relative; display: block; line-height: 0; }
.hissan-stop .hissan-art { width: 50px; height: 50px; }
.hissan-lock { position: absolute; right: -8px; bottom: -4px; font-size: 1.1rem; font-style: normal; line-height: 1; }
.hissan-stop-stars { display: flex; gap: 1px; font-size: 1rem; line-height: 1; }
.hissan-stop-stars i { font-style: normal; color: #e6dbe0; }
.hissan-stop-stars i.on { color: #f4b53c; text-shadow: 0 1px 0 #fff3c9; }
.hissan-stop.is-locked { filter: grayscale(.85); opacity: .55; cursor: not-allowed; }
.hissan-stop.is-cleared { background: linear-gradient(160deg, #fff, #fff7e4); border-color: #f2d98f; }
.hissan-stop.is-next { border-color: var(--hs-pink); box-shadow: 0 0 0 4px rgba(240, 138, 166, .2); animation: hissan-bounce 1.6s ease-in-out infinite; }
.hissan-here {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--hs-pink);
  color: #fff;
  font-size: .72rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

/* =========================================================
   あそぶ画面
   ========================================================= */
.hissan-play {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 10px 14px 14px;
  border: 1px solid #ecd9de;
  border-radius: 26px;
  background: linear-gradient(160deg, #fffaf6, #fdf3f6 55%, #f4fbf7);
  box-shadow: 0 10px 28px rgba(110, 76, 96, .1);
}
.hissan-bar { display: flex; align-items: center; gap: 12px; min-height: 0; }
.hissan-back { min-height: 44px; padding: 6px 14px; white-space: nowrap; }
.hissan-title { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.hissan-title b { font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hissan-mode { padding: 4px 14px; border-radius: 999px; font-size: .88rem; font-weight: 900; }
.hissan-mode--demo { background: var(--hs-butter-soft); color: #946a10; border: 2px solid var(--hs-butter); }
.hissan-mode--guided { background: var(--hs-mint-soft); color: #2f8564; border: 2px solid var(--hs-mint); }
.hissan-mode--solo { background: var(--hs-lav-soft); color: #6b52b8; border: 2px solid var(--hs-lav); }
.hissan-dots { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hissan-dots i { display: block; width: 16px; height: 16px; border-radius: 50%; background: #eadfe3; border: 2px solid #fff; box-shadow: 0 1px 2px rgba(120, 80, 100, .25); }
.hissan-dots i.now { background: var(--hs-butter); transform: scale(1.2); }
.hissan-dots i.done { background: var(--hs-pink); }

.hissan-stage {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr) minmax(250px, 300px);
  gap: 14px;
  min-height: 0;
}
.hissan-side { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.hissan-talk { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; align-items: start; }
.hissan-pet { width: 76px; }
.hissan-pet .pet-companion { width: 100%; min-width: 0; }
.hissan-say {
  position: relative;
  margin: 4px 0 0;
  padding: 10px 12px;
  min-height: 62px;
  border: 2px solid #f0cfdb;
  border-radius: 18px;
  background: #fff;
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.5;
}
.hissan-say::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 16px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-left: 2px solid #f0cfdb;
  border-bottom: 2px solid #f0cfdb;
  transform: rotate(45deg);
}

/* くらいの おうち（いちご） */
.hissan-houses { display: flex; gap: 6px; flex: 0 1 330px; min-height: 0; max-height: 46vh; }
.hissan-house {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0 4px 6px;
  border: 2px solid #f1e0e6;
  border-radius: 8px 8px 16px 16px;
  background: #fff;
}
.hissan-roof {
  display: block;
  width: calc(100% + 12px);
  height: 18px;
  margin: -14px 0 0;
  background: var(--roof, #f6b6c8);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.hissan-house:nth-child(odd) { --roof: #f6b6c8; }
.hissan-house:nth-child(even) { --roof: #a8dcc6; }
.hissan-house b { font-size: .72rem; color: var(--hs-muted); white-space: nowrap; }
.hissan-house small { margin-top: auto; font-size: 1.05rem; font-weight: 900; color: var(--hs-pink); }
.hissan-stuff { display: flex; flex-wrap: wrap; align-content: flex-start; justify-content: center; gap: 2px; width: 100%; min-height: 60px; }
.hissan-token {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  background: url('./assets/sprites/math/03.png') center / contain no-repeat;
  transition: opacity .3s, transform .3s;
}
.hissan-token--u1,
.hissan-token--u2,
.hissan-token--u3 {
  width: 44px;
  height: 26px;
  border: 2px solid #e98aa6;
  border-radius: 7px;
  background:
    radial-gradient(circle at 20% 30%, #ef5d7e 0 3px, transparent 3.5px) 0 0 / 20% 50% repeat,
    #fff1f5;
}
.hissan-token--u2 { background: #fff6dc; border-color: #e5b43c; }
.hissan-token--u3 { background: #efe9fc; border-color: #9a83dd; }
.hissan-token b { position: absolute; inset: 0; display: grid; place-items: center; font-size: .72rem; color: #a2405f; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.hissan-token.is-b { filter: hue-rotate(250deg) saturate(1.3); }
.hissan-token.is-gone { opacity: .22; transform: scale(.7); filter: grayscale(1); }
.hissan-token.is-new { animation: hissan-drop .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.hissan-house.is-moved { animation: hissan-house-pop .5s ease-out; }

.hissan-ribbon { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.hissan-ribbon li { padding: 3px 10px; border-radius: 999px; background: #f2eaee; color: var(--hs-muted); font-size: .76rem; font-weight: 800; }
.hissan-ribbon li.is-now { background: var(--hs-pink); color: #fff; transform: scale(1.06); box-shadow: 0 2px 6px rgba(240, 138, 166, .5); }

/* つくえ（ノート） */
.hissan-desk { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 0; align-items: center; justify-content: center; }
.hissan-order { display: flex; align-items: baseline; gap: 12px; font-size: 1.7rem; font-weight: 900; }
.hissan-order i { font-style: normal; color: var(--hs-muted); }
.hissan-order { position: relative; }
.hissan-order b { color: var(--hs-pink); }
.hissan-order b.is-answer { color: #2f8564; padding: 0 14px; border: 4px solid var(--hs-mint); border-radius: 18px; background: #fff; animation: hissan-stamp .55s cubic-bezier(.3, 1.8, .5, 1) both; }
.hissan-order .hissan-sparkle.s1 { left: auto; right: -6px; top: -10px; }
.hissan-order .hissan-sparkle.s2 { right: -22px; top: 10px; }
.hissan-order .hissan-sparkle.s3 { left: -18px; top: -6px; }
.hissan-desk.is-solved .hissan-order b { color: var(--hs-mint); }
.hissan-paper {
  position: relative;
  display: grid;
  place-items: center;
  padding: 14px 20px 12px;
  border: 3px solid #fff;
  border-radius: 26px;
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, #f0e5f6 31px 32px),
    #fffdf8;
  box-shadow: 0 8px 0 #f0cfdb, 0 14px 22px rgba(101, 75, 96, .14);
  max-width: 100%;
  overflow: hidden;
}
.hissan-board { display: grid; position: relative; }
.hissan-head-cell { display: grid; justify-items: center; align-content: end; gap: 0; }
.hissan-head-cell .hissan-roof { width: 46px; height: 18px; margin: 0; }
.hissan-head-cell:nth-child(odd) .hissan-roof { --roof: #a8dcc6; }
.hissan-head-cell:nth-child(even) .hissan-roof { --roof: #f6b6c8; }
.hissan-head-cell span { font-size: .72rem; font-weight: 800; color: var(--hs-muted); }
.hissan-rule { align-self: center; height: 4px; border-radius: 3px; background: #6b5360; }
.hissan-rule.is-over { align-self: start; height: 3px; margin-top: 0; }

.hissan-cell {
  position: relative;
  display: grid;
  place-items: center;
  margin: 3px;
  min-width: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--hs-ink);
  font: inherit;
  font-size: calc(var(--hc-w) * .52);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.hissan-cell.is-sign { color: var(--hs-pink); font-size: calc(var(--hc-w) * .42); }
.hissan-cell.is-bracket { font-size: calc(var(--hc-w) * .6); font-weight: 300; color: #6b5360; }
.hissan-cell.is-label { font-size: .85rem; color: var(--hs-muted); }
.hissan-cell.is-struck > span { text-decoration: line-through; text-decoration-color: var(--hs-pink); text-decoration-thickness: 3px; opacity: .65; }
.hissan-cell.is-slot {
  border: 2px dashed #e5c3d0;
  background: rgba(255, 255, 255, .85);
}
.hissan-cell.is-slot.is-filled { border: 2px solid #f0cfdb; background: #fff; animation: hissan-pop .35s cubic-bezier(.3, 1.6, .5, 1); }
.hissan-cell.is-slot.is-active { border-color: var(--hs-pink); background: #fff7fa; box-shadow: 0 0 0 4px rgba(240, 138, 166, .25); animation: hissan-glow 1.3s ease-in-out infinite; }
.hissan-cell.is-slot.is-picked { border-color: var(--hs-lav); box-shadow: 0 0 0 4px rgba(185, 164, 238, .3); }
.hissan-cell.is-wrong { animation: hissan-shake .4s ease; border-color: #f0a37a; }
button.hissan-cell { cursor: pointer; }
.hissan-cell .is-ghost { color: #d9bcc8; }
.hissan-caret { display: block; width: 3px; height: 1.5rem; border-radius: 2px; background: var(--hs-pink); animation: hissan-blink 1s steps(2) infinite; }
.hissan-cell.is-mark { font-size: calc(var(--hc-w) * .3); border-radius: 12px; color: #c0587b; background: var(--hs-pink-soft); border: 2px solid #f4bdce; }
.hissan-cell.is-mark.is-borrow { color: #2f8564; background: var(--hs-mint-soft); border-color: #a6dcc5; }
.hissan-cell.is-mark:not(.is-filled) { background: rgba(255, 255, 255, .7); border-style: dashed; }
.hissan-cell s { position: absolute; top: -2px; left: 4px; font-size: .62rem; color: #b79aa6; text-decoration: line-through; line-height: 1; }
.hissan-cell.is-quotient { color: #6b52b8; }
.hissan-cell.is-rest { color: #c0587b; }

.hissan-note {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px 6px 14px 6px;
  background: var(--hs-butter);
  box-shadow: 0 5px 0 #e0bb4e, 0 8px 14px rgba(120, 90, 30, .2);
  transform: rotate(2.5deg);
  font-size: 1.15rem;
  font-weight: 900;
  color: #6c4e0e;
}
.hissan-note b { display: inline-flex; align-items: center; min-width: 44px; min-height: 30px; padding: 0 6px; border-bottom: 3px dashed #b88f1d; font-size: 1.5rem; justify-content: center; }
.hissan-note u { display: inline-block; width: 3px; height: 1.2rem; margin-left: 2px; background: #6c4e0e; animation: hissan-blink 1s steps(2) infinite; text-decoration: none; }
.hissan-note.is-active { animation: hissan-wobble 1.8s ease-in-out infinite; }

.hissan-answer {
  position: absolute;
  right: 10px;
  bottom: 8px;
  display: grid;
  justify-items: center;
  gap: 0;
  padding: 8px 20px 10px;
  border: 4px solid var(--hs-mint);
  border-radius: 22px;
  background: #fff;
  color: #2f8564;
  transform: rotate(-4deg);
  box-shadow: 0 8px 18px rgba(63, 143, 114, .3);
  animation: hissan-stamp .55s cubic-bezier(.3, 1.8, .5, 1) both;
}
.hissan-answer span { font-size: .8rem; font-weight: 900; }
.hissan-answer b { font-size: 2.2rem; line-height: 1.1; }

/* すうじパッド */
.hissan-pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(64px, 88px); gap: 8px; align-content: center; }
.hissan-key {
  min-height: 64px;
  border: 2px solid #ecd3dc;
  border-radius: 20px;
  background: #fff9fc;
  box-shadow: 0 5px 0 #ecd3dc;
  color: var(--hs-ink);
  font: inherit;
  font-size: 1.9rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform .08s, box-shadow .08s, background .15s;
}
.hissan-key:nth-child(3n + 1) { background: #ffeef4; }
.hissan-key:nth-child(3n + 2) { background: #efe9fc; }
.hissan-key:nth-child(3n) { background: #e8f7f0; }
.hissan-key:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #ecd3dc; }
.hissan-key--erase, .hissan-key--hint { font-size: .95rem; white-space: nowrap; padding: 0 4px; background: #fff6e6 !important; }
.hissan-key--hint.is-on { background: var(--hs-butter) !important; }
.hissan-key:disabled { opacity: .45; cursor: not-allowed; }
.hissan-pad--demo, .hissan-pad--done { grid-auto-rows: auto; display: grid; grid-template-columns: 1fr; align-content: center; justify-items: center; gap: 10px; text-align: center; }
.hissan-pad--demo p { margin: 0; color: var(--hs-muted); font-size: .88rem; }
.hissan-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 96px;
  padding: 10px 18px;
  border: 0;
  border-radius: 26px;
  background: linear-gradient(180deg, #ffc27d, #f5a04f);
  box-shadow: 0 7px 0 #d27f2f, 0 12px 20px rgba(160, 90, 30, .25);
  color: #fff;
  font: inherit;
  font-size: 1.4rem;
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(160, 90, 30, .4);
  cursor: pointer;
}
.hissan-next.is-go { background: linear-gradient(180deg, #a6e3c4, #5cc399); box-shadow: 0 7px 0 #3a9b75, 0 12px 20px rgba(40, 120, 90, .25); animation: hissan-bounce 1.4s ease-in-out infinite; }
.hissan-next:active { transform: translateY(5px); box-shadow: 0 2px 0 #d27f2f; }

/* レッスン おわり */
.hissan-finish {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  background: rgba(90, 60, 80, .45);
  backdrop-filter: blur(3px);
}
.hissan-finish-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  width: min(520px, 90vw);
  padding: 22px 26px;
  border: 4px solid #fff;
  border-radius: 32px;
  background: linear-gradient(160deg, #fffaf3, #fdeff4 60%, #effaf5);
  box-shadow: 0 24px 60px rgba(70, 40, 60, .4);
  text-align: center;
  animation: hissan-stamp .5s cubic-bezier(.3, 1.6, .5, 1) both;
}
.hissan-finish-card h3 { margin: 0; font-size: 1.5rem; }
.hissan-finish-art { position: relative; }
.hissan-finish-stars { display: flex; gap: 6px; margin: 0; font-size: 2.4rem; line-height: 1; }
.hissan-finish-stars i { font-style: normal; color: #eadfe3; }
.hissan-finish-stars i.on { color: #f4b53c; animation: hissan-pop .5s both; }
.hissan-finish-stars i.on:nth-child(2) { animation-delay: .15s; }
.hissan-finish-stars i.on:nth-child(3) { animation-delay: .3s; }
.hissan-finish-note { margin: 0; color: var(--hs-muted); }
.hissan-finish-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.hissan-finish-actions button { min-height: 52px; }
.hissan-sparkle { position: absolute; font-style: normal; color: #f4b53c; font-size: 1.6rem; animation: hissan-twinkle 1.4s ease-in-out infinite; }
.hissan-sparkle.s1 { left: -14px; top: 4px; }
.hissan-sparkle.s2 { right: -10px; top: 18px; animation-delay: .4s; }
.hissan-sparkle.s3 { left: 40%; top: -14px; animation-delay: .8s; }

@keyframes hissan-pop { 0% { transform: scale(.4); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes hissan-glow { 0%, 100% { box-shadow: 0 0 0 3px rgba(240, 138, 166, .2); } 50% { box-shadow: 0 0 0 7px rgba(240, 138, 166, .38); } }
@keyframes hissan-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes hissan-blink { 50% { opacity: 0; } }
@keyframes hissan-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes hissan-wobble { 0%, 100% { transform: rotate(2.5deg); } 50% { transform: rotate(-1.5deg); } }
@keyframes hissan-stamp { 0% { transform: scale(2) rotate(-12deg); opacity: 0; } 100% { opacity: 1; } }
@keyframes hissan-drop { 0% { transform: translateY(-30px) scale(.5); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes hissan-house-pop { 0% { background: #fff0f5; } 100% { background: #fff; } }
@keyframes hissan-twinkle { 0%, 100% { transform: scale(.7) rotate(0); opacity: .5; } 50% { transform: scale(1.2) rotate(20deg); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .hissan-screen * { animation: none !important; transition: none !important; }
}

/* 縦長・せまい画面: 上から順に */
@media (max-width: 899px), (orientation: portrait) {
  .hissan-board { --hc-w: min(64px, calc((100vw - 84px) / var(--cols, 6))); }
  .hissan-stage { grid-template-columns: minmax(0, 1fr); }
  .hissan-play { min-width: 0; }
  .hissan-bar { flex-wrap: wrap; }
  .hissan-title { flex-wrap: wrap; flex-basis: 100%; order: 3; }
  .hissan-title b { white-space: normal; }
  .hissan-dots { margin-left: auto; }
  .hissan-side, .hissan-desk { min-width: 0; }
  .hissan-pad { grid-template-columns: repeat(3, minmax(64px, 1fr)); max-width: 380px; margin: 0 auto; width: 100%; }
  .hissan-stops { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .hissan-row { grid-template-columns: 1fr; }
  .hissan-row-label { grid-auto-flow: column; justify-content: center; gap: 8px; min-height: 40px; }
  .hissan-houses { min-height: 130px; }
}

/* 横長タブレット: ひと画面に */
@media (min-width: 900px) and (orientation: landscape) {
  #screen[data-screen="hissan"] { overflow-y: hidden; }
  #screen[data-screen="hissan"] > .hissan-screen { height: 100%; }
  .hissan-map { height: 100%; grid-template-rows: auto minmax(0, 1fr); }
  .hissan-path { grid-template-rows: repeat(4, minmax(0, 1fr)); min-height: 0; }
  .hissan-row { min-height: 0; }
  .hissan-stop { min-height: 0; height: 100%; }
  .hissan-play { height: 100%; }
  .hissan-stage { grid-template-rows: minmax(0, 1fr); }
  .hissan-desk { overflow: hidden; }
  /* ノートは中身の大きさのまま（入りきらないときは JS が少し縮める） */
  .hissan-paper { max-width: none; overflow: visible; flex: none; }
  .hissan-pad { align-content: center; max-height: 100%; }
}
@media (min-width: 900px) and (max-width: 1120px) and (orientation: landscape) {
  .hissan-screen { --hc-w: 56px; --hc-big: 56px; --hc-small: 36px; --hc-head: 50px; }
  .hissan-stage { grid-template-columns: minmax(200px, 250px) minmax(0, 1fr) minmax(220px, 250px); gap: 10px; }
  .hissan-key { min-height: 56px; font-size: 1.6rem; }
}

.hissan-point {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: auto 0 0;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--hs-butter-soft);
  border: 2px dashed var(--hs-butter);
  color: #7a5a14;
  font-size: .86rem;
  font-weight: 800;
  line-height: 1.5;
}
.hissan-point i { font-style: normal; font-size: 1.2rem; }
.hissan-note b.is-ghost { color: rgba(108, 78, 14, .35); }

.hissan-cell.is-slot.is-hintcell { border-color: var(--hs-butter); background: var(--hs-butter-soft); animation: hissan-glow 1.3s ease-in-out infinite; }

.hissan-cell.is-slot.is-decoy { border-color: #ecdce3; background: rgba(255, 255, 255, .55); }
.hissan-cell.is-slot.is-next-soft { border-color: #eeb4c8; border-style: solid; }
