/* 3D文字メーカー。画面の枠は水文字メーカー(water-maker.css)と同じで、ここは3D文字だけの見た目 */

/* キャンバスは透明に描く(保存は透過PNG)。画面では、影が見える明るい壁の色を敷く */
.solid-maker .stage {
  background:
    radial-gradient(120% 90% at 50% 35%, #f6f4f8 0%, #e6e2ea 55%, #d3cdd9 100%);
  touch-action:none;
}
.solid-maker .stage .stage-label { box-shadow:0 1px 4px rgba(0,0,0,.15); }
.solid-maker .stage .hint { color:#4a3f4c; text-shadow:0 0 6px #fff, 0 0 2px #fff; }
.solid-maker .stage .tap-hint { color:#4a3f4c; text-shadow:0 0 6px #fff; }
/* キャンバスで直接動かせるときの案内: 白い札にアイコン(何をすればよいかが一目で分かるように) */
.solid-maker .stage .hint.is-action {
  left:50%; right:auto; transform:translateX(-50%); display:inline-flex; align-items:center; gap:6px; white-space:nowrap;
  padding:7px 14px 7px 10px; border-radius:999px; background:rgba(255,255,255,.94); color:#3a2f40; text-shadow:none;
  box-shadow:0 2px 10px rgba(40,20,40,.18); font-size:13px;
}
.solid-maker .stage .hint.is-action .ms { font-size:20px; color:#d4427c; }
@media (prefers-reduced-motion: no-preference) {
  .solid-maker .stage .hint.is-action .ms { animation:solid-hint-nudge 2.6s ease-in-out infinite; }
}
@keyframes solid-hint-nudge { 0%, 70%, 100% { transform:rotate(0); } 80% { transform:rotate(-14deg); } 90% { transform:rotate(14deg); } }
@media (max-width:600px) { .solid-maker .stage .hint.is-action { font-size:12px; padding:6px 12px 6px 8px; bottom:8px; } }
.solid-maker .stage.turnable { cursor:grab; user-select:none; }
.solid-maker .stage.turnable.tappable { cursor:grab; }
.solid-maker .stage.is-turning { cursor:grabbing; }

/* 色・効果のタブ(ぷっくり系の「効果」と同じ見た目。数に合わせて等分) */
.solid-maker .solid-tabs { display:grid; grid-template-columns:repeat(var(--n, 3), minmax(0, 1fr)); gap:6px; margin-bottom:12px; }
.solid-maker .solid-tabs .chip { width:100%; min-height:44px; padding-left:4px; padding-right:4px; }
.solid-maker .solid-note { margin:0 0 10px; color:var(--sub); font-size:12px; line-height:1.5; text-align:center; }

/* 段階の見本(厚み・遠近感・光・影など)。自分の文字で描いた立体を等分に並べる */
.solid-maker .solid-choice { min-width:0; margin-bottom:10px; }
.solid-maker .solid-choice h2 { margin:0 0 6px; }
.solid-maker .solid-choice .thumb { min-width:0; height:108px; }
.solid-maker .solid-choice .thumb-name { font-size:12px; white-space:nowrap; }
@media (max-width:420px) { .solid-maker .solid-choice .thumb { height:96px; } .solid-maker .solid-choice .thumb-name { font-size:11px; } }

/* 文字なしの段階ボタン(遠近感・かど・光と影・ぬり方・縁の太さ)。数に合わせて等分。アイコンつきは図を上に */
.solid-maker .solid-options { display:grid; grid-template-columns:repeat(var(--n, 3), minmax(0, 1fr)); gap:6px; }
.solid-maker .solid-options .solid-option { display:flex; align-items:center; justify-content:center; width:100%; height:auto; min-height:44px; padding:6px 4px; white-space:nowrap; }
.solid-maker .solid-options .solid-option.has-icon { min-height:76px; flex-direction:column; gap:4px; padding:8px 4px 6px; }
.solid-maker .solid-option-icon { width:36px; height:36px; flex:0 0 auto; }
.solid-maker .solid-option[aria-pressed="true"] .solid-option-icon { color:var(--accent); }
@media (max-width:420px) { .solid-maker .solid-option { font-size:12px; } }

/* 色の丸。1列に並べて横にスクロールする(ほかのメーカーの色選びと同じ)。名前は上に1つだけ出す */
.solid-maker .solid-color-name { display:flex; justify-content:center; margin:2px 0 8px; }
.solid-maker .solid-color-name b { font-size:17px; }
.solid-maker .solid-palette {
  display:flex; gap:10px; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:none; scrollbar-color:rgba(82,75,79,.34) transparent;
  padding:6px 6px 10px; margin:0 -6px 12px;
}
/* スクロールバーは、スクロールしているあいだだけ出す(is-scrolling は scrollbarReveal が付け外しする) */
.solid-maker .solid-palette.is-scrolling { scrollbar-width:thin; }
.solid-maker .solid-palette::-webkit-scrollbar { height:0; }
.solid-maker .solid-palette.is-scrolling::-webkit-scrollbar { height:6px; }
.solid-maker .solid-palette::-webkit-scrollbar-track { background:transparent; }
.solid-maker .solid-palette::-webkit-scrollbar-thumb { border-radius:999px; background:rgba(82,75,79,.34); }
.solid-maker .solid-dot {
  flex:0 0 auto; width:44px; height:44px; padding:0; border-radius:50%; border:2px solid rgba(255,255,255,.18);
  background:var(--dot); box-shadow:inset 0 -6px 10px rgba(0,0,0,.14), inset 0 4px 6px rgba(255,255,255,.3); cursor:pointer;
}
.solid-maker .solid-dot[aria-pressed="true"] { border-color:#fff; box-shadow:0 0 0 3px var(--accent), inset 0 -6px 10px rgba(0,0,0,.14), inset 0 4px 6px rgba(255,255,255,.3); }
.solid-maker.theme-light .solid-dot { border-color:rgba(0,0,0,.12); }
.solid-maker .solid-dot:focus-visible { outline:3px solid #fff; outline-offset:3px; }

/* 光の向きを決める太陽(光・影のタブで、キャンバスの上に出す) */
.solid-maker .solid-sun {
  position:absolute; z-index:3; width:48px; height:48px; margin:-24px 0 0 -24px; padding:0; border:0; border-radius:50%;
  display:grid; place-items:center; color:#7a4a00; cursor:grab; touch-action:none;
  background:radial-gradient(circle at 40% 35%, #fff7c2 0%, #ffd84a 55%, #f5a623 100%);
  box-shadow:0 0 0 4px rgba(255,216,74,.28), 0 0 24px 6px rgba(255,210,80,.55);
}
.solid-maker .solid-sun .ms { font-size:28px; }
.solid-maker .solid-sun.is-dragging { cursor:grabbing; transform:scale(1.1); }
.solid-maker .solid-sun:focus-visible { outline:3px solid #fff; outline-offset:3px; }
@media (prefers-reduced-motion: no-preference) {
  .solid-maker .solid-sun:not(.is-dragging) { animation:solid-sun-glow 2.4s ease-in-out infinite; }
}
@keyframes solid-sun-glow { 50% { box-shadow:0 0 0 7px rgba(255,216,74,.18), 0 0 30px 10px rgba(255,210,80,.5); } }

/* 奥の点(「立体」のタブで出す)。太陽と同じ動かし方で、見た目は控えめな濃い丸 */
.solid-maker .solid-sun.solid-back {
  width:40px; height:40px; margin:-20px 0 0 -20px; color:#fff;
  background:radial-gradient(circle at 40% 35%, #8a7a92 0%, #4a3f52 70%, #33293a 100%);
  box-shadow:0 0 0 3px rgba(255,255,255,.85), 0 2px 10px rgba(0,0,0,.35);
  animation:none;
}
.solid-maker .solid-sun.solid-back .ms { font-size:22px; }

/* 奥行きの向きの操作パッド。まんなかの四角が文字、丸い点を動かす */
/* 見出しの右に小さな「リセット」(見出しは まんなかのまま) */
.solid-maker .solid-reset-row { display:flex; justify-content:center; margin:2px 0 8px; }
.solid-maker .solid-reset { display:inline-flex; align-items:center; gap:4px; height:30px; padding:0 14px; font-size:12px; }
.solid-maker .solid-reset .ms { font-size:16px; }
.solid-maker .solid-reset:disabled { opacity:.35; cursor:default; }
/* 明るさのスライダー(両はしに暗い・明るいの印) */
.solid-maker .solid-slider-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; padding:2px 4px; color:var(--sub); }
.solid-maker .solid-slider-row .ms { font-size:22px; }
.solid-maker .solid-slider { width:100%; margin:0; accent-color:#f28ab0; height:28px; }
.solid-maker .solid-backpad { display:block; width:100%; max-width:250px; height:auto; margin:0 auto 6px; color:#c9b9cf; touch-action:none; cursor:pointer; user-select:none; }
.solid-maker.theme-light .solid-backpad { color:#c9b2c4; }
.solid-maker .solid-backpad:focus-visible { outline:3px solid #fff; outline-offset:2px; border-radius:14px; }
.solid-maker .solid-backpad-bg { fill:rgba(255,255,255,.05); stroke:rgba(255,255,255,.14); stroke-width:1.5; }
/* 明るい画面: パッドの地と枠を、明るい地の上でも見えるようにする */
.solid-maker.theme-light .solid-backpad-bg { fill:var(--surface); stroke:var(--line); }
.solid-maker.theme-light .solid-backpad-tile { fill:#ffffff; stroke:var(--line); }
.solid-maker .solid-backpad-tile { fill:#f4eef6; }
.solid-maker .solid-backpad-glyph { fill:#3a2f40; font-size:20px; font-weight:800; }
.solid-maker .solid-backpad-dot { fill:var(--accent); stroke:#fff; stroke-width:3; }
.solid-maker .solid-backpad.is-dragging .solid-backpad-dot { stroke-width:4; }
/* 見本の絵は背景が透明なので、タイルの灰色の地の上に、切らずに収める(タイルの地は water-maker.css。白い文字や白いフチも見える) */
.solid-maker .thumb > .thumb-canvas img { object-fit:contain; }
/* 元に戻す: 太陽・奥の点が右上に来たときは、solidSun が --undo-top / --undo-right でよける */
.solid-maker .stage-undo { top:var(--undo-top, 10px); right:var(--undo-right, 10px); transition:top .15s ease, right .15s ease; }
