/* クリスマスカードメーカー。画面の枠と色はクリスマスツリーメーカー(xmastree-maker.css。#lm に xmastree-maker も付ける)と同じで、ここはカードだけの部品(xc-*)。 */

/* 選ぶボタンの一覧(地の色・塗り方・地の柄・向き・並べ方・文字の色)。スクロールさせず、同じ大きさでそろえて全部並べる */
.xc-grid { display:grid; gap:6px; margin-bottom:6px; }
.xc-grid-3 { grid-template-columns:repeat(3, minmax(0, 1fr)); }
.xc-grid-4 { grid-template-columns:repeat(4, minmax(0, 1fr)); }
.xc-grid-5 { grid-template-columns:repeat(5, minmax(0, 1fr)); }
.xc-grid-6 { grid-template-columns:repeat(6, minmax(0, 1fr)); }
.xc-opt { min-width:0; padding:6px 2px 5px; border:2px solid var(--line); border-radius:12px; background:var(--surface); color:var(--text); display:flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:4px; cursor:pointer; font:700 11px "Noto Sans JP",sans-serif; transition:transform .12s; }
.xc-opt[aria-pressed="true"] { border-color:var(--accent-hi); background:var(--surface2); color:var(--accent-hi); }
.xc-opt:active { transform:scale(.95); }
.xc-opt .xt-swatch { width:30px; height:30px; margin:0; flex:none; }
.xc-opt canvas { width:34px; height:34px; display:block; flex:none; }
.xc-opt-name { max-width:100%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; line-height:1.3; }
/* 向き: カードの形の小さな四角(高さをそろえるため、30px の箱のまんなかに) */
.xc-orient-box { display:block; flex:none; width:calc(var(--w) * 30px); height:calc(var(--h) * 30px); margin:calc((30px - var(--h) * 30px) / 2) 0; border:2px solid currentColor; border-radius:3px; }
/* 並べ方: 3×2の見本 */
.xc-layouts .xc-opt { padding:4px 4px 6px; }
.xc-layouts .xc-opt canvas { width:100%; height:auto; aspect-ratio:1 / 1; }
.xc-layout-icon { width:100%; aspect-ratio:1 / 1; display:grid; place-items:center; border-radius:8px; background:var(--surface2); color:var(--sub); }
.xc-layout-icon .ms { font-size:36px; }

/* かざり: 飾りの一覧(地は、白い飾りも見える灰色)。3つまで選べるときは、選んだ飾りにチェック */
.xc-piece-grid { grid-template-columns:repeat(6, minmax(0, 1fr)); }
.xc-piece-grid.is-multi .xt-orn[aria-pressed="true"]::after { content:"check"; position:absolute; top:2px; right:2px; width:18px; height:18px; border-radius:50%; background:var(--accent); color:#fff; font:14px/18px "Material Symbols Rounded"; text-align:center; }

/* ことば: 入力欄と例文を1つの枠にまとめる(例文は入力欄の下の帯) */
.xc-input { margin-top:6px; border:2px solid var(--line); border-radius:12px; background:var(--surface); overflow:hidden; }
.xc-input:focus-within { border-color:var(--accent-hi); }
.xc-input .xc-text { margin:0; border:0; border-radius:0; min-height:72px; }
.xc-input .xc-suggests { margin:0; padding:6px 8px 8px; border-top:1px dashed var(--line); background:var(--surface2); }
.xc-input .xc-suggest { background:var(--surface); }
/* ことば: 例文(押すと入力欄に入る)。タブや札と見分けがつくよう、角の小さい四角に「入れる」の印 */
.xc-suggests { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:4px; }
.xc-suggest { display:inline-flex; align-items:center; gap:4px; min-height:32px; padding:4px 10px 4px 6px; border:1px dashed var(--line); border-radius:6px; background:transparent; color:var(--text); font:500 12px "Noto Sans JP",sans-serif; cursor:pointer; }
.xc-suggest .ms { font-size:16px; color:var(--sub); }
.xc-suggest:hover { border-color:var(--accent-hi); background:var(--surface); }
.xc-suggest:active { transform:scale(.97); }
/* ことば: 言葉の札・入力・書体の見本・文字の色 */
.xc-phrases { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:6px; }
.xc-phrases .chip { height:auto; min-height:36px; padding:4px 12px; font-size:12px; white-space:nowrap; }
.xc-text { width:100%; box-sizing:border-box; min-height:84px; margin-top:6px; padding:10px 12px; border:2px solid var(--line); border-radius:12px; background:var(--surface); color:var(--text); font:16px/1.4 "Noto Sans JP",sans-serif; resize:none; }
.xc-text:focus { outline:none; border-color:var(--accent-hi); }
.xc-fonts { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:6px; }
.xc-font { min-width:0; padding:6px 6px 4px; border:2px solid var(--line); border-radius:14px; background:var(--surface); color:var(--text); display:flex; flex-direction:column; align-items:center; cursor:pointer; overflow:hidden; }
.xc-font[aria-pressed="true"] { border-color:var(--accent-hi); background:var(--surface2); }
.xc-font-sample { max-width:100%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:17px; line-height:1.5; }
/* 書体の帯: 見本を大きく(横にスクロール) */
.xc-font-strip .thumb { width:168px; height:84px; background:var(--surface); border-color:var(--line); }
.xc-font-strip .thumb[aria-pressed="true"] { border-color:var(--accent-hi); background:var(--surface2); }
.xmascard-maker .xc-font-strip .thumb > .thumb-canvas { width:100%; overflow:hidden; background:none; padding:0 4px; }
.xc-font-strip .xc-font-sample { display:block; width:100%; padding:0 6px; box-sizing:border-box; text-align:center; font-size:19px; line-height:1.3; color:var(--text); text-overflow:clip; }
.xc-font-strip .thumb-name { font-size:11px; }
.xc-font small { color:var(--sub); font:700 11px "Noto Sans JP",sans-serif; }

/* 量: 5段。点の数で多さを見せる */
.xc-amount-dots { display:flex; flex-wrap:wrap; justify-content:center; gap:2px; width:30px; min-height:18px; align-content:center; }
.xc-amount-dots i { width:6px; height:6px; border-radius:50%; background:currentColor; opacity:.7; }

/* かざり: ツリーを作りかえる(Pro)。ツリーメーカーを重ねて開く大きめのボタンと、元にもどす */
.xc-tree-tools { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:10px; }
.xc-tree-open { flex:1 1 auto; min-height:44px; display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:6px 14px; border:2px solid var(--accent-hi); border-radius:14px; background:var(--surface); color:var(--accent-hi); font:700 14px "Noto Sans JP",sans-serif; cursor:pointer; }
.xc-tree-open:hover { background:var(--surface2); }
.xc-tree-open:active { transform:scale(.97); }
.xc-tree-open .ms { font-size:20px; }
.xc-tree-open .td-pro-badge { width:20px; height:20px; flex:0 0 20px; }
