/* 白背景メーカー。画面の枠は水文字メーカー(water-maker.css)と同じで、ここは白背景メーカーだけの見た目。
   主の色は、白に合う、くすんだ青みのグレー(雪・銀のイメージ)。選んだ印は淡い青 */
html.maker-theme-light:has(.whitebg-maker), .whitebg-maker.theme-light {
  --bg:#f4f5f7; --surface:#ffffff; --surface2:#eceff3; --line:#dde1e7; --text:#24272d; --sub:#666b74;
  --stage:#e9ecf0; --stage-dot:rgba(90,104,128,.12);
  --accent:#5f7393; --accent-deep:#46586f; --accent-hi:#4f78b0; --step-ring:rgba(79,120,176,.2); --step-done-text:#ffffff;
}
.whitebg-maker.theme-dark { --bg:#15171b; --surface:#1e2127; --surface2:#272b33; --line:#353a44; --text:#eef0f4; --sub:#a9afba; --stage:#1b1e23; --stage-dot:rgba(255,255,255,.06); --accent:#7f95b8; --accent-deep:#5a6d8c; --accent-hi:#a9c4ec; --step-ring:rgba(169,196,236,.22); }

/* キャンバスの地は、白背景との境目が分かる、少し濃いグレーに小さな点 */
.whitebg-maker .stage { background-color:var(--stage); background-image:radial-gradient(var(--stage-dot) 1.5px, transparent 1.5px); background-size:18px 18px; box-shadow:inset 0 0 0 1px var(--line); touch-action:none; overflow:hidden; }
.whitebg-maker .stage canvas#gl { width:auto; height:auto; max-width:none; max-height:none; border-radius:10px; box-shadow:0 6px 22px rgba(30,40,60,.16), 0 0 0 1px rgba(30,40,60,.06); }
.whitebg-maker .stage.tappable { cursor:pointer; user-select:none; -webkit-user-select:none; }
.whitebg-maker .stage.wb-placing canvas { cursor:crosshair; }
.whitebg-maker .stage.is-grabbing canvas { cursor:grabbing; }
.whitebg-maker .stage .stage-label { box-shadow:0 1px 4px rgba(0,0,0,.14); }
.whitebg-maker .stage .tap-hint { padding:4px 10px 4px 8px; border-radius:999px; background:rgba(70,88,111,.9); color:#fff; font-weight:800; text-shadow:none; box-shadow:0 2px 8px rgba(0,0,0,.15); }
.whitebg-maker .stage .tap-hint .ms { color:#fff; }
.wb-kick { animation:wbKick .32s ease; }
@keyframes wbKick { 0% { transform:scale(1) } 40% { transform:scale(.975) } 100% { transform:scale(1) } }

/* タップした所のきらめき */
.wb-spark { position:absolute; z-index:4; width:8px; height:8px; margin:-4px 0 0 -4px; pointer-events:none; background:#fff; clip-path:polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); filter:drop-shadow(0 0 3px rgba(120,150,200,.9)); animation:wbSpark .6s ease-out forwards; }
@keyframes wbSpark { 0% { opacity:1; transform:translate(0,0) scale(.6) } 100% { opacity:0; transform:translate(var(--dx), var(--dy)) scale(1.4) rotate(90deg) } }

/* 変わったものの名前 */
.wb-say { position:absolute; z-index:5; top:12px; left:50%; transform:translateX(-50%); padding:4px 12px; border-radius:999px; background:rgba(70,88,111,.92); color:#fff; font-size:13px; font-weight:800; white-space:nowrap; pointer-events:none; opacity:0; }
.wb-say.is-on { animation:wbSay 1.1s ease forwards; }
@keyframes wbSay { 0% { opacity:0; transform:translate(-50%, 6px) } 12% { opacity:1; transform:translate(-50%, 0) } 78% { opacity:1 } 100% { opacity:0; transform:translate(-50%, -6px) } }
/* じぶんで置く: まだ何も置いていないときの案内 */
/* 見え方の切り替え(重ねて見る / この柄だけ)。キャンバスの左上 */
.wb-view { position:absolute; z-index:4; top:10px; left:10px; display:flex; gap:2px; padding:3px; border-radius:999px; background:rgba(255,255,255,.92); box-shadow:0 2px 8px rgba(30,40,60,.18); }
.wb-view[hidden] { display:none; }
.wb-view-btn { min-height:36px; padding:0 12px 0 8px; border:0; border-radius:999px; background:transparent; color:#5a6678; display:flex; align-items:center; gap:4px; font:800 12px "Noto Sans JP",sans-serif; white-space:nowrap; cursor:pointer; }
.wb-view-btn .ms { font-size:18px; }
.wb-view-btn[aria-pressed="true"] { background:var(--accent); color:#fff; }
.wb-view-btn:focus-visible { outline:2px solid var(--accent-hi); outline-offset:2px; }
.wb-free-guide { position:absolute; z-index:3; left:50%; top:50%; transform:translate(-50%, -50%); display:flex; align-items:center; gap:8px; padding:10px 16px; border-radius:999px; background:rgba(70,88,111,.92); color:#fff; font-size:15px; white-space:nowrap; pointer-events:none; box-shadow:0 4px 14px rgba(0,0,0,.18); }
.wb-free-guide[hidden] { display:none; }
.wb-hand { font-size:26px; animation:wbTap 1.1s ease-in-out infinite; }
@keyframes wbTap { 0%,100% { transform:translateY(0) scale(1) } 45% { transform:translateY(4px) scale(.9) } }
@media (prefers-reduced-motion: reduce) { .wb-kick, .wb-hand { animation:none; } .wb-say.is-on { animation:none; opacity:1; } }

/* パネル */
.whitebg-panel .wb-note { margin:6px 0 4px; color:var(--sub); font-size:12px; line-height:1.55; text-align:center; }
/* 使い道(大きさ): キャンバスの背景(点々の場所)の外に置く。キャンバスの形を決める設定なので、作品の上やキャンバスの中には置かない。
   スマホ: キャンバスの背景の上に横に3つ。PC: キャンバスの背景の左に縦に3つ(アイコンの下に名前) */
.whitebg-stage .stage-art { box-sizing:border-box; padding:14px; }
/* 後ろの枠は付けない(ボタンだけ並べる)。選んでいないボタンは地も付けない(アイコンと名前だけ)。ポインターをのせた時だけ薄い地を出す */
.whitebg-maker .wb-sizes { display:flex; justify-content:center; gap:6px; width:max-content; max-width:calc(100% - 16px); margin:0 auto 8px; padding:0; }
.wb-size { min-height:40px; padding:0 16px; border:0; border-radius:10px; background:transparent; color:var(--sub); display:flex; align-items:center; justify-content:center; gap:5px; font:700 13px "Noto Sans JP",sans-serif; white-space:nowrap; cursor:pointer; }
.wb-size .ms { font-size:20px; }
.wb-size:hover { background:var(--surface2); }
.wb-size:focus-visible { outline:2px solid var(--accent-hi); outline-offset:2px; }
.wb-size[aria-pressed="true"] { background:var(--accent-hi); color:#fff; }
/* 暗い画面の選んだ印は淡い青なので、文字は濃い色にする(白だと読めない) */
.whitebg-maker.theme-dark .wb-size[aria-pressed="true"] { color:#16202e; }
.whitebg-stage .stage-label { display:none; }   /* 手順名は上の丸で分かる */
@media (max-width:899px) {
  .whitebg-maker.lm-side .workspace { grid-template-rows:auto auto minmax(0, 1fr); gap:0; }
  .whitebg-maker.lm-side .workspace .panel { margin-top:10px; }
  /* 柄の切り替えがある手順: 大きさ・キャンバス・柄の切り替え・パネル の4段 */
  .whitebg-maker.lm-side .workspace.wb-has-layers { grid-template-rows:auto auto auto minmax(0, 1fr); }
}
@media (max-width:420px) { .wb-size { padding:0 12px; } }
@media (min-width:900px) and (min-height:520px) {
  .whitebg-maker.lm-side .workspace { grid-template-columns:auto minmax(0, 1fr) 400px; gap:0 16px; }
  /* 柄の切り替えは、キャンバスの列の下の段に置く。大きさとパネルは今の場所のまま */
  .whitebg-maker.lm-side .workspace.wb-has-layers { grid-template-rows:minmax(0, 1fr) auto; }
  .whitebg-maker.lm-side .workspace.wb-has-layers > .wb-sizes { grid-column:1; grid-row:1; }
  .whitebg-maker.lm-side .workspace.wb-has-layers > .stage { grid-column:2; grid-row:1; }
  .whitebg-maker.lm-side .workspace.wb-has-layers > .wb-layers { grid-column:2; grid-row:2; margin-bottom:8px; }
  .whitebg-maker.lm-side .workspace.wb-has-layers > .panel { grid-column:3; grid-row:1 / span 2; }
  /* 縦の列は、ボタンの幅+左右の余白の幅にする(スマホ用の max-width で縮めない。縮めるとボタンがはみ出す) */
  .whitebg-maker .wb-sizes { flex-direction:column; align-self:start; width:max-content; max-width:none; margin:0; padding:0; gap:8px; }
  .wb-size { flex:none; }
  .wb-size { flex-direction:column; width:76px; min-height:68px; padding:6px 4px; border-radius:14px; gap:3px; font-size:12px; white-space:normal; line-height:1.25; text-align:center; }
  .wb-size .ms { font-size:26px; }
}

/* タブ(デザインの種類・ととのえる の設定) */
/* 柄の切り替え(柄1〜3・重ねる・消す)。柄・ととのえる・仕上げ の一番上 */
.wb-layers { display:flex; align-items:stretch; justify-content:center; gap:6px; margin:8px 0 0; min-width:0; }
.wb-layer { min-width:0; min-height:44px; padding:4px 10px 4px 5px; border:2px solid var(--line); border-radius:12px; background:var(--surface); color:var(--sub); display:flex; align-items:center; gap:6px; font:800 13px "Noto Sans JP",sans-serif; white-space:nowrap; cursor:pointer; }
.wb-layer .wb-motif-canvas { width:30px; height:30px; flex:none; border-radius:6px; }
.wb-layer[aria-pressed="true"] { border-color:var(--accent-hi); background:color-mix(in srgb, var(--accent-hi) 12%, var(--surface)); color:var(--accent-deep); }
/* 柄が4つのとき: スマホの幅に収まるよう、見本と余白を少し詰める */
.wb-layers.is-tight { gap:4px; }
.wb-layers.is-tight .wb-layer { padding:4px 7px 4px 4px; gap:4px; }
.wb-layers.is-tight .wb-layer .wb-motif-canvas { width:26px; height:26px; }
.wb-layers.is-tight .wb-layer-remove { margin-left:0; width:40px; }
.wb-layer-add { width:44px; padding:0; justify-content:center; border-style:dashed; background:transparent; color:var(--accent-hi); }
.wb-layer-add .ms { font-size:22px; }
.wb-layer-remove { margin-left:4px; width:44px; min-height:44px; flex:none; border:0; border-radius:12px; background:transparent; color:var(--sub); display:grid; place-items:center; cursor:pointer; }
.wb-layer-remove .ms { font-size:21px; }
.wb-layer:focus-visible, .wb-layer-remove:focus-visible { outline:2px solid var(--accent-hi); outline-offset:2px; }
.wb-tabs { display:grid; grid-template-columns:repeat(var(--n), minmax(0, 1fr)); gap:2px; margin:0 0 10px; padding:3px; border-radius:14px; background:var(--surface2); }
.wb-tab { min-width:0; min-height:44px; padding:3px 2px; border:0; border-radius:11px; background:transparent; color:var(--sub); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; font:700 11px "Noto Sans JP",sans-serif; cursor:pointer; }
.wb-tab .ms { font-size:19px; }
.wb-tab span:last-child { max-width:100%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.wb-tab[aria-selected="true"] { background:var(--surface); color:var(--accent-hi); box-shadow:0 1px 4px rgba(30,40,60,.16); }

/* 色見本 */
.wb-swatches { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:6px; }
.wb-swatches-color { grid-template-columns:repeat(5, minmax(0, 1fr)); }
.wb-swatch { min-width:0; padding:6px 2px 5px; border:2px solid transparent; border-radius:12px; background:transparent; color:var(--text); display:flex; flex-direction:column; align-items:center; gap:4px; font:700 11px "Noto Sans JP",sans-serif; cursor:pointer; }
.wb-swatch-dot { width:38px; height:38px; border-radius:50%; background:var(--sw); box-shadow:inset 0 0 0 1px rgba(30,40,60,.18); transition:transform .12s; }
.wb-swatch-dot.is-light { box-shadow:inset 0 0 0 1px rgba(30,40,60,.28), 0 1px 3px rgba(30,40,60,.12); }
.wb-swatch-name { max-width:100%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.wb-swatch[aria-pressed="true"] { border-color:var(--accent-hi); background:color-mix(in srgb, var(--accent-hi) 12%, transparent); }
.wb-swatch:active .wb-swatch-dot { transform:scale(.9); }

/* 模様の一覧 */
/* 柄の一覧は5列。イラスト(四角・光の粒を含む19個)が4段に収まり、下の「これにする」まで見える */
.wb-motifs { display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:4px; }
.wb-motif { min-width:0; padding:3px 3px 4px; border:2px solid transparent; border-radius:12px; background:transparent; color:var(--text); display:flex; flex-direction:column; align-items:center; gap:2px; font:700 10.5px "Noto Sans JP",sans-serif; cursor:pointer; transition:transform .12s; }
.wb-motif-canvas { width:100%; aspect-ratio:1 / 1; display:block; border-radius:8px; box-shadow:inset 0 0 0 1px var(--line), 0 0 0 1px var(--line); }
.wb-motif-name { max-width:100%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.wb-motif[aria-pressed="true"] { border-color:var(--accent-hi); background:color-mix(in srgb, var(--accent-hi) 12%, transparent); color:var(--accent-hi); }
.wb-motif:active { transform:scale(.95); }
/* 写真の模様は Pro(「写真」の切り替えボタンに王冠)。じぶんの写真は一覧の最後の「＋」から入れ、右下の印で別の写真に変える */
.wb-motif { position:relative; }
.wb-pro-head { margin:10px 2px 6px; display:flex; align-items:center; gap:6px; color:var(--sub); font:700 12px "Noto Sans JP",sans-serif; }
.wb-pro-head::after { content:""; flex:1; height:1px; background:var(--line); }
.wb-pro-head .td-pro-badge { width:18px; height:18px; flex:0 0 18px; }
.wb-kind .td-pro-badge.wb-kind-pro { width:18px; height:18px; flex:0 0 18px; margin-left:2px; }
.wb-motif-add-icon { width:100%; aspect-ratio:1 / 1; display:grid; place-items:center; box-sizing:border-box; border:1.5px dashed var(--line); border-radius:8px; color:var(--sub); }
.wb-motif-add-icon .ms { font-size:26px; }
.wb-motif-add:hover .wb-motif-add-icon { border-color:var(--accent-hi); color:var(--accent-hi); }
.wb-motif-change { position:absolute; right:5px; bottom:20px; width:22px; height:22px; display:grid; place-items:center; border-radius:50%; background:var(--surface, #fff); color:var(--text); box-shadow:0 1px 4px rgba(0,0,0,.2); cursor:pointer; }
.wb-motif-change .ms { font-size:15px; }

/* 置き方: アイコンつきの大きなボタン */
.wb-arranges { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; }
.wb-arrange { min-width:0; min-height:58px; padding:6px 4px; border:2px solid var(--line); border-radius:14px; background:var(--surface); color:var(--text); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; font:700 13px "Noto Sans JP",sans-serif; cursor:pointer; transition:transform .12s; }
.wb-arrange .ms { font-size:24px; color:var(--accent); }
.wb-arrange[aria-pressed="true"] { border-color:var(--accent-hi); background:color-mix(in srgb, var(--accent-hi) 12%, var(--surface)); color:var(--accent-hi); }
.wb-arrange[aria-pressed="true"] .ms { color:var(--accent-hi); }
.wb-arrange:active { transform:scale(.96); }
.wb-free-tools { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:6px; margin:8px 0 2px; }
.wb-free-tools .chip { display:inline-flex; align-items:center; gap:4px; }
.wb-free-tools .chip .ms { font-size:18px; }
.wb-count { color:var(--sub); font-size:12px; font-weight:700; }

/* 段階のつまみ */
.wb-slider-row { display:grid; grid-template-columns:92px minmax(0, 1fr) 64px; align-items:center; gap:8px; min-height:52px; margin-bottom:6px; padding:0 12px; border:2px solid var(--line); border-radius:14px; background:var(--surface); }
/* 名前の欄は7文字(「タイルの大きさ」)まで1行。それより長い名前は2行に折り返す(はみ出してつまみに重ならないように) */
.wb-slider-label { min-width:0; font-size:13px; font-weight:800; line-height:1.25; overflow-wrap:anywhere; }
.wb-slider { width:100%; accent-color:var(--accent-hi); }
.wb-slider-value { font-size:12px; text-align:right; color:var(--accent-hi); }

/* キャンバスの場所: 白背景は縦長(スマホ)もあるので、横並びの画面では、右の設定と同じ高さまで使う */
@media (min-width:900px) and (min-height:520px) {
  .whitebg-maker.lm-side .stage, .whitebg-maker.lm-side .stage.stage-done { aspect-ratio:auto; width:100%; height:calc(100vh - 214px); }
  /* 柄の切り替えがある手順は、キャンバスの枠を上の段の高さにぴったり合わせる(決め打ちの高さのままだと、枠が切り替えに重なって選んだ印が欠ける) */
  .whitebg-maker.lm-side .workspace.wb-has-layers > .stage { height:auto; align-self:stretch; min-height:0; }
}
/* スマホ: 縦長の待ち受けは、キャンバスの場所も縦長にする(設定の場所は残す) */
@media (max-width:899px) {
  .whitebg-maker .stage.wb-size-phone { aspect-ratio:4 / 5; width:min(calc(100% - 16px), calc(min(52vh, 560px) * 4 / 5)); }
}

/* 2〜5個の切り替え(なぞる・大きさ・境目など) */
.wb-toggle-block { display:grid; grid-template-columns:64px minmax(0, 1fr); align-items:center; gap:8px; margin:8px 0; }
.wb-toggle-label { font-size:12px; font-weight:800; color:var(--sub); }
/* 段ごとに分ける(自動で割り振るボタン) */
.wb-split { display:flex; align-items:center; justify-content:center; gap:6px; width:100%; min-height:42px; margin:4px 0 8px; }
.wb-toggle-block.is-wide { grid-template-columns:minmax(0, 1fr); gap:4px; }
.wb-toggle-block.is-wide .wb-toggle-label { text-align:center; }
.wb-toggle-block.is-wide .wb-toggle { gap:2px; }
.wb-toggle-block.is-wide .wb-toggle-btn { padding:2px 1px; gap:2px; white-space:nowrap; }
.wb-toggle-block.is-wide .wb-toggle-btn .ms { font-size:16px; }
.wb-toggle { display:grid; grid-template-columns:repeat(var(--n), minmax(0, 1fr)); gap:4px; padding:3px; border-radius:12px; background:var(--surface2); }
.wb-toggle-btn { min-width:0; min-height:38px; padding:2px 4px; border:0; border-radius:9px; background:transparent; color:var(--sub); display:flex; align-items:center; justify-content:center; gap:3px; font:700 12px "Noto Sans JP",sans-serif; cursor:pointer; }
.wb-toggle-btn .ms { font-size:17px; }
.wb-toggle-btn span:last-child { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.wb-toggle-btn[aria-pressed="true"] { background:var(--surface); color:var(--accent-hi); box-shadow:0 1px 3px rgba(30,40,60,.14); }

/* 置く場所: 見本つき */
.wb-places { display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:6px; }
.wb-place { min-width:0; padding:3px 3px 4px; border:2px solid transparent; border-radius:12px; background:transparent; color:var(--text); display:flex; flex-direction:column; align-items:center; gap:3px; font:700 11px "Noto Sans JP",sans-serif; cursor:pointer; }
.wb-place[aria-pressed="true"] { border-color:var(--accent-hi); background:color-mix(in srgb, var(--accent-hi) 12%, transparent); color:var(--accent-hi); }

/* モチーフの種類(イラスト/写真)の切り替え */
.wb-kind { margin:0 0 8px; }
/* グラデーション: 見本つき(置く場所と同じ形)。6つ */
.wb-gradients { grid-template-columns:repeat(6, minmax(0, 1fr)); gap:4px; margin-bottom:6px; }
.wb-gradients .wb-place { padding:3px 1px 4px; font-size:10.5px; }
/* かがやき: 白い光が見えない地のときの案内 */
/* 地を暗くする(オン・オフ)。ほかのつまみの行と同じ枠で、右にスイッチ */
.wb-dark-row { display:flex; align-items:center; gap:10px; width:100%; min-height:52px; margin:0 0 6px; padding:8px 12px; border:2px solid var(--line); border-radius:14px; background:var(--surface); color:var(--text); text-align:left; font:inherit; cursor:pointer; }
.wb-dark-row > .ms { flex:none; font-size:20px; color:var(--sub); }
.wb-dark-row[aria-checked="true"] > .ms { color:var(--accent-hi); }
.wb-dark-text { flex:1; min-width:0; display:grid; gap:1px; }
.wb-dark-text b { font-size:13px; font-weight:800; }
.wb-dark-text small { font-size:11px; color:var(--sub); line-height:1.4; }
.wb-switch { flex:none; position:relative; width:40px; height:24px; border-radius:999px; background:var(--line); transition:background .18s; }
.wb-switch::after { content:''; position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(30,40,60,.25); transition:transform .18s; }
.wb-dark-row[aria-checked="true"] .wb-switch { background:var(--accent-hi); }
.wb-dark-row[aria-checked="true"] .wb-switch::after { transform:translateX(16px); }
.wb-dark-row:focus-visible { outline:3px solid rgba(189,74,120,.55); outline-offset:2px; }
/* 決めるボタンが1つだけの手順(色)は、パネルの幅いっぱいにする(左に寄せない) */
.whitebg-panel .actions > .btn-main:only-child { grid-column:1 / -1; }

/* 手描き */
.wb-draw-row { display:flex; gap:8px; align-items:stretch; }
.wb-draw-row .wb-motif { width:25%; flex:none; }
.wb-draw-btn { flex:1; min-height:72px; border:2px dashed var(--line); border-radius:14px; background:var(--surface); color:var(--text); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; cursor:pointer; font-family:"Noto Sans JP",sans-serif; }
.wb-draw-btn .ms { font-size:24px; color:var(--accent); }
.wb-draw-btn b { font-size:13px; }
.wb-draw-btn small { font-size:11px; color:var(--sub); }

/* 手描きの画面 */
.wb-pad-layer { position:fixed; inset:0; z-index:60; display:grid; place-items:center; padding:12px; background:rgba(20,24,32,.45); }
.wb-pad { width:min(440px, 100%); max-height:calc(100vh - 24px); overflow-y:auto; padding:14px 16px 16px; border-radius:20px; background:var(--surface); color:var(--text); box-shadow:0 12px 40px rgba(0,0,0,.25); }
.wb-pad { position:relative; }
.wb-pad-head { display:flex; align-items:center; gap:2px; font-size:16px; }
.wb-pad-head > b { margin-right:auto; }
.wb-pad-help-btn { color:var(--sub); }
.wb-pad-help-btn[aria-expanded="true"] { color:var(--accent-hi); }
.wb-pad-help { position:absolute; z-index:5; top:52px; left:16px; right:16px; padding:12px 14px; border-radius:14px; background:var(--surface); box-shadow:0 8px 28px rgba(20,30,50,.22), 0 0 0 1px var(--line); font-size:13px; line-height:1.6; }
.wb-pad-help[hidden] { display:none; }
.wb-pad-help p { margin:0; }
.wb-pad-help p + p { margin-top:6px; }
.wb-pad-field { display:grid; grid-template-columns:76px minmax(0, 1fr); align-items:center; gap:8px; min-height:52px; margin-bottom:6px; padding:6px 12px; border:2px solid var(--line); border-radius:14px; background:var(--surface); }
.wb-pad-choices.is-brush { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:4px; }
.wb-pad-seg { min-height:46px; padding:4px 2px; border:1.5px solid var(--line); border-radius:10px; background:var(--surface); color:var(--sub); display:grid; justify-items:center; align-content:center; gap:1px; font:700 11px/1.2 "Noto Sans JP",sans-serif; cursor:pointer; }
.wb-pad-seg .ms { font-size:18px; }
.wb-pad-seg[aria-pressed="true"] { border-color:var(--accent-hi); color:var(--accent-hi); background:color-mix(in srgb, var(--accent-hi) 10%, var(--surface)); }
.wb-pad-choices.is-ink { display:flex; justify-content:space-between; gap:4px; }
.wb-pad-swatch { width:26px; height:26px; padding:0; border:0; border-radius:50%; background:var(--sw); box-shadow:inset 0 0 0 1px rgba(30,40,60,.18), 0 0 0 1px var(--line); cursor:pointer; flex:none; }
.wb-pad-swatch.is-light { box-shadow:inset 0 0 0 1px rgba(30,40,60,.3), 0 0 0 1px var(--line); }
.wb-pad-swatch[aria-pressed="true"] { box-shadow:inset 0 0 0 1px rgba(30,40,60,.18), 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-hi); }
.wb-pad-swatch:focus-visible, .wb-pad-seg:focus-visible { outline:3px solid rgba(189,74,120,.55); outline-offset:2px; }
.wb-pad-paper { position:relative; width:min(100%, 320px); aspect-ratio:1 / 1; margin:6px auto 8px; border-radius:14px; overflow:hidden; background:#eef0f4; box-shadow:inset 0 0 0 1px var(--line); }
.wb-pad-paper canvas { position:absolute; inset:0; width:100%; height:100%; display:block; }
.wb-pad-canvas { z-index:2; touch-action:none; cursor:crosshair; }
.wb-pad-guide { z-index:1; pointer-events:none; }
.wb-pad .actions { margin-top:8px; flex-wrap:wrap; }
/* 「この模様にする」は、下の段いっぱいに置く(3つを並べると、最後の1つだけ左に寄って見える) */
.wb-pad .actions > .btn-main { grid-column:1 / -1; flex:1 1 100%; }
/* 描画パッド: スマホ幅では左の名前の列を細くして、筆の名前を1行に収める */
@media (max-width: 480px) {
  .wb-pad .wb-slider-row { grid-template-columns:44px minmax(0, 1fr) 56px; padding:0 10px; }
  .wb-pad-field { grid-template-columns:44px minmax(0, 1fr); padding:6px 10px; }
  .wb-pad-seg { white-space:nowrap; }
}
/* 描画パッド: 行は線で囲まず、うすい塗りで区切る。筆は上のタブ(質感・モチーフ・手描き)と同じく、選んだものだけ白く浮かせる */
.wb-pad .wb-slider-row, .wb-pad-field { border:0; background:var(--surface2); }
.wb-pad-seg { border:0; background:transparent; }
.wb-pad-seg[aria-pressed="true"] { background:var(--surface); color:var(--accent-hi); box-shadow:0 1px 4px rgba(30,40,60,.16); }
.whitebg-maker.theme-dark .wb-pad-swatch:not([aria-pressed="true"]) { box-shadow:inset 0 0 0 1px rgba(255,255,255,.08), 0 0 0 1px rgba(255,255,255,.28); }
