/* ==== ui03：作業台の並べ直し。問い・道具・答えを真ん中に集め、数字キーは書いている所の横へ（app.css の最後に読む） ==== */
.atelier .keys[hidden], .atelier .answer[hidden] { display: none !important; }
/* 入力を受け付ける筆算は、開く途中も的を動かさない（立体回転は座標のずれ・画面外への移動を招く）。 */
.atelier[data-layout=column] { animation-name: column-open; }
@keyframes column-open { from { opacity: .3; } to { opacity: 1; } }
/* 注文の紙：窓の右の壁にテープでとめる（見出し・注文・問い・ヒントの電球） */
.atelier .order {
  position: absolute; left: 496px; top: 56px; width: 380px; max-height: 318px; z-index: 3; padding: 0 16px 14px;
  background: var(--grain), linear-gradient(175deg, #fffcf4, var(--paper) 40%, var(--paper2)); border-radius: 4px 4px 12px 12px;
  box-shadow: inset 0 0 0 1px rgba(160,120,70,.18), 0 2px 0 #eadbbd, 0 3px 0 rgba(150,110,60,.28), 0 16px 26px -8px var(--cast);
}
.atelier .order::after { content: ""; position: absolute; left: 50%; top: -12px; width: 86px; height: 26px; margin-left: -43px; transform: rotate(-3deg);
  background: linear-gradient(90deg, rgba(255,255,255,.25), rgba(255,255,255,0) 30%, rgba(255,255,255,.2)), rgba(222,203,150,.72);
  clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 4% 96%, 0 50%); pointer-events: none; }
.atelier .order .from { margin: 0 -16px 10px; padding: 16px 16px 10px; }
.atelier .order .what { margin: 0; padding-right: 76px; font-size: 21px; line-height: 1.5; }
.atelier .order .what .formula { font-size: 30px; }
.atelier .order > .ask { position: static !important; width: auto !important; max-width: none !important; margin-top: 10px !important; padding: 12px 0 0 !important;
  background: none !important; box-shadow: none !important; border: 0 !important; border-top: 2px dashed #dcc9a6 !important; border-radius: 0 !important; }
.atelier .order > .ask::before { display: none; }
.atelier .order .bubble { font-size: 25px; }
.atelier .order .steps .hint-line { font-size: 15px; color: #8b7864; white-space: normal; }
/* ヒント：電球1つ。見た数だけ点が灯る */
.atelier .order .hint { position: absolute; right: 10px; top: 46px; width: 68px; height: 76px; min-height: 0; padding: 4px 0 6px; flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 13px; line-height: 1.1; color: #7a6656;
  background: rgba(255,250,240,.75); border: 1.5px dashed #cdb38a; border-radius: 14px; }
.atelier .order .hint img { width: 36px; height: 36px; pointer-events: none; }
.atelier .order .hint .pips { display: flex; gap: 4px; margin-top: 2px; }
.atelier .order .hint .pips b { width: 6px; height: 6px; border-radius: 50%; background: #e2d4b8; }
.atelier .order .hint .pips b.on { background: #d9a443; }
.atelier .order .hint.seen { border-style: solid; border-color: #d9a443; background: #fff6df; color: #7d5f30; }
.atelier .order .hint:disabled { opacity: .55; }
.atelier .order .done-stamp { right: 10px; top: auto; bottom: 8px; width: 70px; height: 70px; font-size: 12px; }
/* 道具の台紙は天板の真ん中。数字だけの問は台紙を出さない */
.atelier svg.tray.blank { visibility: hidden; }
.atelier svg.tray.picture .hit { cursor: default; }
/* 答えの欄：道具のすぐ横（右）。数字だけの問は台の真ん中に大きく */
.atelier .answer { position: absolute; z-index: 4; margin: 0; }
.atelier[data-layout=tool] .answer { left: 914px; top: 380px; width: 254px; display: flex; flex-direction: column; align-items: stretch; gap: 6px;
  padding: 10px 10px 12px; border-radius: 12px; background: var(--grain), #fffaf0; box-shadow: inset 0 0 0 1px rgba(160,120,70,.18), 0 3px 0 #e2cfab, 0 10px 16px -8px var(--cast); }
.atelier[data-layout=tool][data-tool=numberline] .answer, .atelier[data-layout=tool][data-tool=measure] .answer { top: 380px; }
.atelier[data-layout=tool] .answer .fields { display: flex; flex-direction: column; gap: 4px; }
.atelier .answer .shiki { position: static; outline: 0; }
.atelier[data-layout=tool] .answer .shiki { font-size: 26px; text-align: center; box-shadow: none; background: none; padding: 0; }
.atelier[data-layout=tool] .answer .shiki .field .val { font-size: 30px; }
.atelier[data-layout=keys] .answer { left: 300px; width: 600px; top: 420px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.atelier[data-layout=keys] .answer .shiki { font-size: 46px; letter-spacing: .04em; padding: 10px 26px; border-radius: 16px; background: var(--grain), #fffaf0;
  box-shadow: inset 0 0 0 1px rgba(160,120,70,.18), 0 3px 0 #e2cfab, 0 12px 18px -8px var(--cast); }
.atelier[data-layout=keys] .answer .shiki .field { height: 72px; vertical-align: middle; }
.atelier[data-layout=keys] .answer .shiki .field .val { font-size: 46px; height: 60px; min-width: 84px; }
.atelier[data-layout=keys] .answer .fields { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; padding: 10px 20px; border-radius: 16px;
  background: var(--grain), #fffaf0; box-shadow: inset 0 0 0 1px rgba(160,120,70,.18), 0 3px 0 #e2cfab, 0 12px 18px -8px var(--cast); font-size: 22px; }
.atelier[data-layout=keys] .answer .fields .field { font-size: 22px; }
.atelier[data-layout=keys] .answer .fields .field .val { font-size: 40px; }
/* 場面の式：台紙のすぐ下。数のカードを □ ÷ □ に置く */
.atelier .answer.scene { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 0; background: none; box-shadow: none; }
.atelier .scene-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 6px 14px; border-radius: 14px; background: var(--grain), #fffaf0;
  box-shadow: inset 0 0 0 1px rgba(160,120,70,.18), 0 3px 0 #e2cfab, 0 10px 14px -8px var(--cast); font-size: 26px; font-weight: 700; color: #3b2f2a; }
.atelier .scene-line .lead { font-size: 16px; color: #8b7864; margin-right: 2px; }
.atelier .scene-line .slot { min-width: 104px; height: 52px; padding: 0 12px; white-space: nowrap; flex: none; border-radius: 10px; border: 2px dashed #cdb38a; background: #fff; font-size: 22px; font-weight: 700; color: var(--teal2); display: flex; align-items: center; justify-content: center; }
.atelier .scene-line .slot.filled { border-style: solid; border-color: var(--teal); }
.atelier .scene-line .field { height: 52px; font-size: 17px; }
.atelier .scene-line .field .val { height: 42px; font-size: 30px; min-width: 52px; }
.atelier .chips { display: flex; gap: 10px; }
.atelier .chips .chip { min-width: 96px; height: 50px; padding: 0 16px; border: 0; border-radius: 12px; font-size: 21px; font-weight: 700; color: #3b2f2a; display: flex; align-items: center; justify-content: center;
  background: var(--grain), linear-gradient(#fffcf5, #f3e5c6); box-shadow: inset 0 0 0 1px rgba(160,120,70,.25), 0 3px 0 #d8c194; }

/* 数字キー：書いている所の横に出る小さな紙のキー（JS が置き場所を決める） */
:root:not(.compact) .atelier .keys { position: absolute; left: 914px; z-index: 8; margin: 0; display: grid; grid-template-columns: repeat(3, 62px); gap: 6px; padding: 8px;
  border-radius: 16px; background: var(--grain), rgba(255,250,240,.96); box-shadow: inset 0 0 0 1px rgba(160,120,70,.2), 0 3px 0 #e2cfab, 0 14px 22px -8px var(--cast); }
@media (prefers-reduced-motion: no-preference) { :root:not(.compact) .atelier .keys { transition: left .18s ease, top .18s ease; } }
/* 筆算は連続入力するので、次のますへ移る間にキーの的を動かさない。 */
:root:not(.compact) .atelier[data-layout=column] .keys { transition: none; }
:root:not(.compact) .atelier .keys .key { width: 62px; min-width: 0; font-size: 26px; }
.atelier .keys .key[data-key="0"] { grid-column: span 2; width: auto !important; }
.atelier .keys .key-del { grid-column: auto; font-size: 16px; }
/* できた品：右の受け皿にひとりでに並ぶ */
.atelier .made { position: absolute; z-index: 2; pointer-events: none; }
.atelier .made img { position: absolute; height: auto; filter: drop-shadow(0 4px 3px rgba(60,35,15,.3)); }
/* 背の低い画面（iPhone 横）：注文の紙は左上、答えとキーは右の列にそろえる */
.compact .atelier .order { left: 12px; top: 8px; width: 556px; max-height: 154px; padding: 0 15px 6px; /* 縮んだ画面でも左の余白が実寸12px以上 */ }
.compact .atelier .order .from { display: none; }
.compact .atelier .order .what { padding-top: 10px; font-size: 16px; line-height: 1.35; padding-right: 64px; }
.compact .atelier .order .what .formula { font-size: 22px; }
.compact .atelier .order > .ask { margin-top: 4px !important; padding-top: 6px !important; }
.compact .atelier .order .bubble { font-size: 19px; }
.compact .atelier .order .hint { top: 6px; right: 6px; width: 58px; height: 64px; }
.compact .atelier .order .hint img { width: 28px; height: 28px; }
.compact .atelier .answer { left: 580px !important; top: 8px !important; width: 310px !important; }
.compact .atelier[data-layout=keys] .answer .shiki { font-size: 30px; }
.compact .atelier[data-layout=keys] .answer .shiki .field .val { font-size: 32px; height: 46px; min-width: 60px; }
.compact .atelier[data-layout=keys] .answer .shiki .field { height: 56px; }
.compact .atelier .keys { position: absolute; left: 600px; top: 150px; right: auto; bottom: auto; display: grid; grid-template-columns: repeat(3, 84px); gap: 4px; margin: 0; }
.compact .atelier .keys .key { height: 54px; }
.compact .atelier .made { display: none; }
.compact .atelier .scene-line { font-size: 20px; }
.narrow .atelier .order .hint, .narrow .atelier .chips .chip, .narrow .atelier .scene-line .slot { min-height: calc(46px * var(--inv)); }
.narrow .atelier[data-layout=tool] .answer { left: 900px; width: 270px; }
.atelier .scene-line .unknown { font-size: 30px; color: #8b7864; }
.atelier .scene-line .form-swap { height: 48px; padding: 0 14px; margin-left: 6px; border: 0; border-radius: 10px; font-size: 15px; font-weight: 700; color: var(--teal2); background: #eef6f2; box-shadow: inset 0 0 0 2px #b9d6cc; display: flex; align-items: center; justify-content: center; }
.atelier .chips { align-items: center; }
.atelier .scene-answer { display: flex; gap: 4px; margin-left: 12px; padding: 2px 10px; border-radius: 12px; background: var(--grain), #fffaf0; box-shadow: inset 0 0 0 1px rgba(160,120,70,.18), 0 3px 0 #e2cfab; }
.atelier .scene-answer .field { height: 50px; font-size: 17px; }
.atelier .scene-answer .field .val { height: 40px; font-size: 28px; min-width: 52px; }

.atelier svg.tray.picture .tool-btn { opacity: .35; }
.compact .atelier .answer .shiki { display: block; font-size: 24px; text-align: center; }
.compact .atelier .answer.scene { left: 580px !important; top: 8px !important; width: 310px !important; }
.compact .atelier .answer.scene .chips { gap: 6px; }
.compact .atelier .answer.scene .scene-line .slot { min-width: 80px; height: 54px; font-size: 17px; }
.compact .atelier .answer.scene ~ .keys { top: 190px; }
.compact .atelier[data-layout=column] .order { left: 580px; width: 310px; max-height: 176px; } /* 下の余白が切れない高さ。キー（top 186）より上 */
.compact .atelier[data-layout=column] .keys { top: 186px; left: 640px; } /* 3けたの筆算でも一の位のますにかぶせない */
.compact .atelier[data-layout=column] .note { left: 12px; top: 8px; max-width: 556px; }
.compact .atelier .answer.scene .scene-line { font-size: 18px; padding: 2px 10px; }
.compact .atelier .answer.scene .chips .chip { height: 54px; font-size: 17px; }
/* ==== ui04：問題・道具・答え・キーを天板にまとめる ==== */
/* できた品は壁の穴あきボードの棚に並ぶ（天板の右は答えとキーの場所） */
.atelier .made { left: 900px; top: 112px; width: 206px; height: 120px; }
.atelier .made::after { content: ""; position: absolute; left: -6px; right: -6px; bottom: -2px; height: 10px; border-radius: 3px; background: linear-gradient(#c79a68, #a4764a); box-shadow: 0 4px 6px -2px rgba(60,35,15,.4); }
.atelier .made img { left: calc(var(--i) * 26px); top: auto; bottom: 6px; width: 72px; }
/* 袋は台紙を低く、テープは使う所だけ切り出して、式と答えを台紙のすぐ下に */
.atelier[data-tool=bags] svg.tray { height: 230px; }
.atelier[data-tool=tape] svg.tray { height: 200px; }
.atelier .answer.scene { top: 620px; width: 640px; }
.atelier[data-tool=tape] .answer.scene { top: 592px; }
.atelier .answer.scene .scene-line { flex-wrap: nowrap; }
.atelier .answer.scene .scene-answer { margin-left: 10px; }
.atelier .answer.scene .chips { flex-wrap: wrap; align-items: center; }
.atelier .scene-line .slot.pick { border-style: solid; border-color: var(--gold2, #c9962e); background: #fff6df; box-shadow: 0 0 0 3px rgba(217,164,67,.35); }
.atelier .scene-line .op-slot { width: 46px; height: 52px; border-radius: 10px; border: 2px dashed #cdb38a; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--teal2); }
.atelier .scene-line .op-slot.filled { border-style: solid; border-color: var(--teal); }
.atelier .ops { display: flex; gap: 6px; margin-left: 8px; padding-left: 10px; border-left: 2px dashed #dcc9a6; }
.atelier .ops .opk { width: 50px; height: 50px; border: 0; border-radius: 12px; font-size: 28px; font-weight: 700; color: #3b2f2a; display: flex; align-items: center; justify-content: center;
  background: var(--grain), linear-gradient(#fffcf5, #f3e5c6); box-shadow: inset 0 0 0 1px rgba(160,120,70,.25), 0 3px 0 #d8c194; }
.atelier .ops .opk.on { color: #fff; background: var(--teal); box-shadow: 0 3px 0 var(--teal2); }
.atelier .chips .chip.used { opacity: .35; box-shadow: none; background: repeating-linear-gradient(45deg, #f4ecd9 0 6px, #efe4cc 6px 12px); }
.compact .atelier .ops .opk { width: 54px; height: 54px; font-size: 24px; }
.compact .atelier .answer.scene .scene-line .op-slot { width: 40px; height: 54px; }
.atelier .answer.scene { left: 320px; }
.atelier .form-swap { height: 50px; padding: 0 14px; border: 0; border-radius: 12px; font-size: 16px; font-weight: 700; color: var(--teal2); background: #eef6f2; box-shadow: inset 0 0 0 2px #b9d6cc; display: flex; align-items: center; justify-content: center; }
/* 右の列に答えとキーがある時、届けるは台紙の下へ（キーに重ねない） */
.atelier[data-layout=tool]:has(.keys:not([hidden])) .go { right: 380px; }
/* 欄が2つの時も横に並べて低くする（キーを右下の「お店へ」にかけない） */
.atelier[data-layout=tool] .answer.many .fields { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 2px; /* 欄が4つの大きな数は2段に折る */ }
.atelier[data-layout=tool] .answer.many .field { padding: 0 2px; font-size: 16px; }
.atelier[data-layout=tool] .answer.many .field .val { min-width: 40px; }
/* 背の低い画面（900×470）の直し */
.compact .atelier svg.tray.tall { left: 270px; } /* ますの紙は P1 の右（P1 を紙で隠さない）、キーはそのすぐ右 */
.compact .atelier[data-tool=numberline] svg.tray:is([data-mode=round],[data-mode=range]) { top: 132px; height: 310px; } /* 注文の紙の下 */
/* 場面の式：台紙を低くし、式と答えはその下に1列で。キーは右の列の上、届けるは右下 */
.compact .atelier:has(.answer.scene) svg.tray { top: 146px; height: 200px; }
.compact .atelier .answer.scene { left: 120px !important; top: 352px !important; width: 600px !important; gap: 6px; }
.compact .atelier .answer.scene .scene-answer .field { height: 54px; }
.compact .atelier .answer.scene .scene-answer .field .val { height: 44px; font-size: 24px; }
.compact .atelier .answer.scene .chips { flex-wrap: nowrap; }
.compact .atelier .form-swap { height: 54px; font-size: 14px; padding: 0 10px; }
.compact .atelier:has(.answer.scene) .keys { top: 40px !important; }
.compact .atelier:has(.answer.scene) .go { top: 400px; right: 14px; }
.compact .atelier[data-tool=numberline] .go { right: 14px; }
/* 大きな数（欄が4つ）：背の低い画面では2列2段にして、数字キーと重ねない */
.compact .atelier[data-tool=numberline] .answer.many .fields:has(> .field:nth-child(4)) .field { width: calc(50% - 1px); font-size: 12px; }
.compact .atelier[data-tool=numberline] .answer.many .fields:has(> .field:nth-child(4)) .field .val { font-size: 22px; }
/* iPhone 横（画面が0.83倍に縮む）：押せる物は css 54px で実寸44pt以上（final2） */
/* 面積の問：答えは2段（全部でと単位を同じ段）にしてキーと重ねず、届けるはキーの下（台紙のタイルにかぶせない） */
.compact .atelier[data-tool=measure] .answer.many .fields { display: contents; }
.compact .atelier[data-layout=tool][data-tool=measure]:has(.keys:not([hidden])) .go { right: 14px; }
/* ==== ui10：紙とキーは天板の上（奥のはし〜手前のはし）、道具の紙は P1 の葉にかけない（struct01 の1・4・5） ==== */
:root:not(.compact) .atelier svg.tray:not(.tall) { left: 316px; width: 590px; } /* P1 の葉の右（約310px）より右。答えの列（914px）の手前まで */
:root:not(.compact) .atelier svg.tray.tall { top: 384px; } /* 筆算のますの紙の下のはしを天板の手前のはし（681px）より上に */

:root:not(.compact) .atelier .keys .key { height: 46px; } /* 答えの欄の下に置いても天板の手前のはしを越えない高さ（44pt以上） */
/* 背の低い画面：天板を手前へのばした分、絵を下げる。道具の紙が大きい問は P1 を画面の左の外へ（紙の下に P1 がもぐらない） */
.compact .atelier .paper-scene { transform: translate(-40px, -260px) scale(.9); }
.compact .atelier:has(svg.tray:not(.tall):not(.blank)) .paper-scene { transform: translate(-415px, -372px) scale(1.2); } /* 寄って P1 を左の外へ（右の壁のはしは画面の外のまま） */
:root:not(.compact) .atelier[data-operation=div] svg.tray.tall { top: 384px; height: 286px; } /* わり算の紙（厂と商の段）も天板の奥行きに収める */
.compact .atelier[data-operation=div] svg.tray.tall { top: 112px; }
/* 筆算（背の低い画面）：届けるはキーの列の下へ（ますの紙の下の段にかけない。わり算の紙は背が高い）。キーの段のすき間を2pxにして入れる */
.compact .atelier[data-layout=column] .keys { row-gap: 2px; }
.compact .atelier[data-layout=column] .go { right: 14px; top: 412px; }
:root:not(.compact) .atelier .keys { top: 456px; } /* JS が置く前のはじめの所も天板の上（456+218＝674） */
/* ==== fix16u：点検16 の分かりやすさの直し ==== */
/* 道具のある問：キーは右の列の答えの欄のすぐ下。4列にして天板の上に収める（図・欄・道具のボタンにかけない） */
:root:not(.compact) .atelier[data-layout=tool] .keys { grid-template-columns: repeat(4, 54px); }
:root:not(.compact) .atelier[data-layout=tool] .keys .key { width: 54px; }
:root:not(.compact) .atelier[data-layout=tool] .keys .key[data-key="0"] { grid-column: auto; }
:root:not(.compact) .atelier[data-layout=tool] .keys .key-del { grid-column: span 2; width: auto; }
/* 答えの欄を低く：面積の欄と単位は2段に、分数は単位を右に、大きな数は欄を折り返す */
.atelier[data-layout=tool] .answer.many { flex-direction: row; flex-wrap: wrap; justify-content: center; align-content: flex-start; gap: 4px; }
.atelier[data-layout=tool] .answer:has(.unit-choice) { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; align-content: flex-start; gap: 4px; }
.atelier[data-layout=tool] .answer:has(.unit-choice) .fields { display: contents; }
.atelier[data-layout=tool] .answer:has(.unit-choice) .field { font-size: 14px; gap: 2px; padding: 0 4px; }
.atelier[data-layout=tool] .answer .unit-choice { margin-top: 0; gap: 6px; }
.atelier[data-layout=tool] .answer .unit-choice button { min-width: 54px; padding: 0 6px; font-size: 20px; }
.atelier[data-layout=tool][data-tool=measure] .answer.many .fields { display: contents; }
.atelier[data-layout=tool][data-tool=measure] .answer.many .field { font-size: 14px; gap: 2px; padding: 0 4px; }
:root:not(.compact) .atelier[data-layout=tool][data-tool=numberline] .answer.many .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 100%; }
:root:not(.compact) .atelier[data-layout=tool][data-tool=numberline] .answer.many .field { width: auto; height: 48px; min-height: 48px; justify-content: center; gap: 4px; padding: 0 4px; font-size: 12px; }
:root:not(.compact) .atelier[data-layout=tool][data-tool=numberline] .answer.many .field span { white-space: normal; max-width: 3.2em; line-height: 1.15; text-align: center; }
:root:not(.compact) .atelier[data-layout=tool][data-tool=numberline] .answer.many .field .val { min-width: 56px; height: 36px; font-size: 22px; }
.atelier[data-layout=tool] .answer.frac { flex-direction: row; justify-content: center; align-items: center; gap: 10px; font-size: 22px; }
:root:not(.compact) .atelier[data-layout=tool] .answer.frac .frac-in .field { height: 48px; }
:root:not(.compact) .atelier[data-layout=tool] .answer.frac .frac-in .field .val { height: 36px; }
.compact .atelier .answer.frac { flex-direction: row; justify-content: center; align-items: center; gap: 10px; }
/* 分数のますは、押す前から枠を出す（どこに書くかが見える） */
.frac-in .field:not(.active) { border: 2px dashed #cdb38a; background: rgba(255,255,255,.7); }
/* 届けるが押せない時の、あいている欄 */
.atelier .field.need:not(.active) { border: 2px dashed #d9a443; background: #fff8e6; }
/* 筆算：いま書くます（どの位に入るか）を光らせる */
svg.tray .cell.active { fill: #fff6df; stroke: #d9a443; stroke-width: 5; }
@media (prefers-reduced-motion: no-preference) { svg.tray .cell.active { animation: cell-now 1.4s ease-in-out infinite; } }
@keyframes cell-now { 50% { fill: #ffe9b8; } }
/* ヒント1：道具の見る所を光らせる */
.atelier svg.tray.look { outline: 4px dashed rgba(217,164,67,.85); outline-offset: 4px; }
svg.tray .hit.look { fill: rgba(217,164,67,.16); stroke: #d9a443; stroke-width: 4; stroke-dasharray: 10 7; }
@media (prefers-reduced-motion: no-preference) { svg.tray .hit.look { animation: look-here 1.4s ease-in-out infinite; } }
@keyframes look-here { 50% { fill: rgba(217,164,67,.3); } }
/* 絵の段：始めの形に重ねる分け方の点線（点検17。9＋7 の 7 を 1｜6 など） */
svg.tray .split-under { fill: none; stroke: #fffaf0; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
svg.tray .split-line { fill: none; stroke: #2f6f73; stroke-width: 4.5; stroke-dasharray: 10 7; stroke-linecap: round; stroke-linejoin: round; }
/* 向きの手がかり（点検18）：動かす分・行き先は金色、矢印で向き。答えの数は書かない */
svg.tray .go-area { fill: rgba(236,180,72,.32); stroke: #c98a1e; stroke-width: 2.5; }
svg.tray .go-slot { fill: rgba(236,180,72,.14); stroke: #c98a1e; stroke-width: 2; stroke-dasharray: 5 4; }
svg.tray .go-under { fill: none; stroke: #fffaf0; stroke-width: 10; stroke-linecap: round; opacity: .9; }
svg.tray .go-line { fill: none; stroke: #c98a1e; stroke-width: 4.5; stroke-linecap: round; }
svg.tray .go-head { fill: #c98a1e; stroke: #fffaf0; stroke-width: 2; stroke-linejoin: round; }
svg.tray .go-ghost { opacity: .45; }
svg.tray .split-piece { fill: rgba(255,255,255,.35); stroke: #2f6f73; stroke-width: 3; stroke-dasharray: 9 7; }
svg.tray .rule.tick { stroke-width: 2; }
/* 残りの問の数：注文の紙の右上に小さな印（済んだ＝色、いま＝金のふち） */
.atelier .order .pace { position: absolute; right: 16px; top: 18px; display: flex; gap: 5px; pointer-events: none; }
.atelier .order .pace[hidden] { display: none; }
.atelier .order .pace b { width: 12px; height: 12px; border-radius: 3px; background: #efe3c9; box-shadow: inset 0 0 0 1.5px #cdb38a; }
.atelier .order .pace b.done { background: var(--teal); box-shadow: none; }
.atelier .order .pace b.now { background: #fff6df; box-shadow: inset 0 0 0 2.5px #d9a443; }
.compact .atelier .order .pace { top: auto; bottom: 6px; right: 70px; }
/* はじめての箱づめの見本 */
svg.tray .pack-demo { pointer-events: none; }
svg.tray .pack-arrow { fill: none; stroke: #d9a443; stroke-width: 4; stroke-dasharray: 10 8; }
svg.tray .pack-say { font-size: 22px; font-weight: 700; fill: #6b5640; paint-order: stroke; stroke: #fffaf2; stroke-width: 6px; }
/* K-ADD-06：分けてたす（何十どうし・ばらどうし・あわせての3段。分ける数も本人が書く欄。点検17） */
.atelier .answer.byplace .bp-rows { display: grid; grid-template-columns: auto auto auto auto auto auto; align-items: center; column-gap: 6px; row-gap: 8px; }
.atelier .answer.byplace .bp-row { display: contents; }
.atelier .answer.byplace .place { font-style: normal; font-size: 17px; color: #8b7864; white-space: nowrap; justify-self: end; margin-right: 6px; grid-column: 1; }
.atelier .answer.byplace .field { font-size: 26px; color: #3b2f2a; min-width: 64px; justify-content: center; }
.atelier .answer.byplace .op { font-size: 26px; color: #3b2f2a; }
.atelier .answer.byplace .bp-row:last-child .field { grid-column: 2 / span 1; }
/* はじめの数の分（左）・たす数の分（右）：列の上の見出しと欄の地の色をそろえる（点検18） */
.atelier .answer.byplace .bp-head b { justify-self: center; font-size: 15px; font-weight: 700; padding: 2px 8px; border-radius: 8px; white-space: nowrap; }
.atelier .answer.byplace .bp-a { background: #dcefed; color: #2b6460; }
.atelier .answer.byplace .bp-b { background: #f6e0e4; color: #9a4258; }
.atelier .answer.byplace .field.bp-a, .atelier .answer.byplace .field.bp-b { color: #3b2f2a; }
.compact .atelier .answer.byplace .bp-head b { font-size: 12px; padding: 1px 6px; }
.atelier .answer.byplace .post { font-size: 22px; color: #3b2f2a; grid-column: 3 / span 1; }
.atelier .order:has(.pace:not([hidden])) .from { padding-right: 110px; } /* 見出しが長くても残りの印に重ねない */
.compact .atelier[data-layout=column] .keys { left: 664px; } /* 3けたの筆算でも、ますの紙のふちにかけない（点検16） */
.compact .atelier .answer.byplace { left: 262px !important; top: 166px !important; width: 330px !important; } /* 3段の欄は台の上に（右の列のキーにかけない） */
.compact .atelier .answer.byplace .field { height: 54px; font-size: 20px; }
/* K-ADD-06 の3段の台紙（ほかの答えの欄と同じ紙） */
.atelier .answer.byplace .bp-rows { padding: 12px 22px; border-radius: 16px; background: var(--grain), #fffaf0; box-shadow: inset 0 0 0 1px rgba(160,120,70,.18), 0 3px 0 #e2cfab, 0 12px 18px -8px var(--cast); }
.atelier .answer.byplace .place { color: #6b5640; }
.atelier .answer.byplace .field .val { font-size: 34px; min-width: 56px; }
.compact .atelier .answer.byplace .field .val { font-size: 24px; min-width: 40px; }
.compact .atelier .answer.byplace .bp-rows { padding: 8px 12px; column-gap: 4px; row-gap: 4px; }
.compact .atelier .answer.byplace .op { font-size: 20px; }
.compact .atelier .answer.byplace .place { font-size: 14px; }
/* 手順の文が長い時（K-NUM-08 など）は字を少し小さくして1行に収める（2行に折ると金の下線が紙の幅いっぱいになる。fix17u2） */
.atelier .order .steps span.long { font-size: 13px; letter-spacing: -.02em; }
.compact .atelier .order .steps span.long { font-size: 12px; }
